* 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
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 @@
*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 @@
*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 @@
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 @@
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;