mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-07-03 04:42:40 +00:00
bootp: add ntpserver option to bootp request
Signed-off-by: Luuk Paulussen <luuk.paulussen@alliedtelesis.co.nz> Acked-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Cc: Ben Warren <biggerbadderben@gmail.com>
This commit is contained in:
parent
7130a579fd
commit
09e3a67dec
1 changed files with 15 additions and 0 deletions
15
net/bootp.c
15
net/bootp.c
|
@ -228,6 +228,11 @@ static void BootpVendorFieldProcess (u8 * ext)
|
||||||
NetOurNISDomain[size] = 0;
|
NetOurNISDomain[size] = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#if defined(CONFIG_CMD_SNTP) && defined(CONFIG_BOOTP_NTPSERVER)
|
||||||
|
case 42: /* NTP server IP */
|
||||||
|
NetCopyIP(&NetNtpServerIP, (IPaddr_t *) (ext + 2));
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
/* Application layer fields */
|
/* Application layer fields */
|
||||||
case 43: /* Vendor specific info - Not yet supported */
|
case 43: /* Vendor specific info - Not yet supported */
|
||||||
/*
|
/*
|
||||||
|
@ -278,6 +283,11 @@ static void BootpVendorProcess (u8 * ext, int size)
|
||||||
|
|
||||||
if (NetBootFileSize)
|
if (NetBootFileSize)
|
||||||
debug("NetBootFileSize: %d\n", NetBootFileSize);
|
debug("NetBootFileSize: %d\n", NetBootFileSize);
|
||||||
|
|
||||||
|
#if defined(CONFIG_CMD_SNTP) && defined(CONFIG_BOOTP_NTPSERVER)
|
||||||
|
if (NetNtpServerIP)
|
||||||
|
debug("NetNtpServerIP : %pI4\n", &NetNtpServerIP);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Handle a BOOTP received packet.
|
* Handle a BOOTP received packet.
|
||||||
|
@ -538,6 +548,11 @@ static int BootpExtended (u8 * e)
|
||||||
*e++ = 32;
|
*e++ = 32;
|
||||||
e += 32;
|
e += 32;
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(CONFIG_BOOTP_NTPSERVER)
|
||||||
|
*e++ = 42;
|
||||||
|
*e++ = 4;
|
||||||
|
e += 4;
|
||||||
|
#endif
|
||||||
|
|
||||||
*e++ = 255; /* End of the list */
|
*e++ = 255; /* End of the list */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue