diff options
author | wdenk <wdenk> | 2005-04-01 00:25:43 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2005-04-01 00:25:43 +0000 |
commit | ea287debe1980182adbe8c63b71bb82193dad5b7 (patch) | |
tree | 34044b91763e6e85704b7a54acd34c042931461d /net/bootp.c | |
parent | ef2807c667a91135fbb91b805b852ccfbff03587 (diff) | |
download | u-boot-ea287debe1980182adbe8c63b71bb82193dad5b7.zip u-boot-ea287debe1980182adbe8c63b71bb82193dad5b7.tar.gz u-boot-ea287debe1980182adbe8c63b71bb82193dad5b7.tar.bz2 |
* Patch by Masami Komiya, 30 Mar 2005:
add SNTP support and expand time server and time offset fields of
DHCP support. See doc/README.SNTP
* Patch by Steven Scholz, 13 Dec 2004:
Fix bug in at91rm920 ethernet driver
Diffstat (limited to 'net/bootp.c')
-rw-r--r-- | net/bootp.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/net/bootp.c b/net/bootp.c index 4bca50d..ee0982e 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -448,6 +448,10 @@ static int DhcpExtended (u8 * e, int message_type, IPaddr_t ServerID, IPaddr_t R *e++ = 1; /* Subnet Mask */ *cnt += 1; #endif +#if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_TIMEOFFSET) + *e++ = 2; + *cnt += 1; +#endif #if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_GATEWAY) *e++ = 3; /* Router Option */ *cnt += 1; @@ -472,6 +476,10 @@ static int DhcpExtended (u8 * e, int message_type, IPaddr_t ServerID, IPaddr_t R *e++ = 40; /* NIS Domain name request */ *cnt += 1; #endif +#if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_NTPSERVER) + *e++ = 42; + *cnt += 1; +#endif *e++ = 255; /* End of the list */ /* Pad to minimal length */ @@ -718,6 +726,12 @@ static void DhcpOptionsProcess (uchar * popt) case 1: NetCopyIP (&NetOurSubnetMask, (popt + 2)); break; +#if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_TIMEOFFSET) + case 2: /* Time offset */ + NetCopyLong (&NetTimeOffset, (ulong *) (popt + 2)); + NetTimeOffset = ntohl (NetTimeOffset); + break; +#endif case 3: NetCopyIP (&NetOurGatewayIP, (popt + 2)); break; @@ -741,6 +755,11 @@ static void DhcpOptionsProcess (uchar * popt) memcpy (&NetOurRootPath, popt + 2, size); NetOurRootPath[size] = 0; break; +#if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_NTPSERVER) + case 42: /* NTP server IP */ + NetCopyIP (&NetNtpServerIP, (popt + 2)); + break; +#endif case 51: NetCopyLong (&dhcp_leasetime, (ulong *) (popt + 2)); break; |