Displaying 8 results from an estimated 8 matches for "bootp_parse".
2008 Jun 14
5
PATCH: ipconfig may accept DHCPOFFER as DHCPACK
.../
211c211
< case DHCPNAK: /* NAK received */
---
> case 2: /* NAK received */
diff dhcp_proto.c ../ipconfig.old/dhcp_proto.c:
74,78d73
< * Returns:
< * 0 = Not handled
< * 2 = DHCPOFFER (from dhcp_proto.h)
< * 5 = DHCPACK
< * 6 = DHCPNACK
109,110c104,105
< ret = bootp_parse(dev, hdr, exts, extlen) ? DHCPOFFER : 0;
< if (ret == DHCPOFFER && serverid != INADDR_NONE)
---
> ret = bootp_parse(dev, hdr, exts, extlen);
> if (ret == 1 && serverid != INADDR_NONE)
116c111
< ret = bootp_parse(dev, hdr, exts, extlen) ? DHCPACK : 0;
---
> r...
2012 May 22
0
[klibc:master] ipconfig: Write $DOMAINSEARCH as domain-search
...ecoded_str[dst_i] = '\0';
+#ifdef DEBUG
+ if (dst_i + 1 != decoded_size) {
+ dprintf("bug:%s():bottom: malloc(%ld), write(%ld)\n",
+ __func__, (long)decoded_size, (long)(dst_i + 1));
+ exit(1);
+ }
+#endif
+ return decoded_str;
+}
+
+/*
* Parse a bootp reply packet
*/
int bootp_parse(struct netdev *dev, struct bootp_hdr *hdr,
uint8_t *exts, int extlen)
{
+ uint8_t ext119_buf[BOOTP_EXTS_SIZE];
+ int16_t ext119_len = 0;
+
dev->bootp.gateway = hdr->giaddr;
dev->ip_addr = hdr->yiaddr;
dev->ip_server = hdr->siaddr;
@@ -143,11 +358,32 @@ int bootp_parse(...
2017 Dec 19
0
[PATCH] Implement classless static routes
...index += 4;
+
+ route->netmask_width = netmask_width;
+ route->next = NULL;
+
+ if (prev_route == NULL) {
+ routes = route;
+ } else {
+ prev_route->next = route;
+ }
+ prev_route = route;
+ }
+ return routes;
+}
+
/*
* Parse a bootp reply packet
*/
@@ -275,6 +356,8 @@ int bootp_parse(struct netdev *dev, struct bootp_hdr *hdr,
{
uint8_t ext119_buf[BOOTP_EXTS_SIZE];
int16_t ext119_len = 0;
+ uint8_t ext121_buf[BOOTP_EXTS_SIZE];
+ int16_t ext121_len = 0;
dev->bootp.gateway = hdr->giaddr;
dev->ip_addr = hdr->yiaddr;
@@ -367,6 +450,16 @@ int bootp_parse(struc...
2018 Jun 12
0
[PATCH v2] Implement classless static routes
...index += 4;
+
+ route->netmask_width = netmask_width;
+ route->next = NULL;
+
+ if (prev_route == NULL) {
+ routes = route;
+ } else {
+ prev_route->next = route;
+ }
+ prev_route = route;
+ }
+ return routes;
+}
+
/*
* Parse a bootp reply packet
*/
@@ -275,6 +356,8 @@ int bootp_parse(struct netdev *dev, struct bootp_hdr *hdr,
{
uint8_t ext119_buf[BOOTP_EXTS_SIZE];
int16_t ext119_len = 0;
+ uint8_t ext121_buf[BOOTP_EXTS_SIZE];
+ int16_t ext121_len = 0;
dev->bootp.gateway = hdr->giaddr;
dev->ip_addr = hdr->yiaddr;
@@ -367,6 +450,16 @@ int bootp_parse(struc...
2006 Jun 22
2
[patch] ipconfig add dhcp file preseeding support
...05/17#d-i_dhcp_hacking
Signed-off-by: maximilian attems <maks at sternwelten.at>
diff --git a/usr/kinit/ipconfig/bootp_proto.c b/usr/kinit/ipconfig/bootp_proto.c
index 137847c..59b03b4 100644
--- a/usr/kinit/ipconfig/bootp_proto.c
+++ b/usr/kinit/ipconfig/bootp_proto.c
@@ -74,6 +74,7 @@ int bootp_parse(struct netdev *dev, stru
dev->hostname[0] = '\0';
dev->nisdomainname[0] = '\0';
dev->bootpath[0] = '\0';
+ memcpy(&dev->filename, &hdr->boot_file, FNLEN);
if (extlen >= 4 && exts[0] == 99 && exts[1] == 130 &&...
2019 Jan 18
0
[klibc:master] ipconfig: Implement classless static routes
...index += 4;
+
+ route->netmask_width = netmask_width;
+ route->next = NULL;
+
+ if (prev_route == NULL) {
+ routes = route;
+ } else {
+ prev_route->next = route;
+ }
+ prev_route = route;
+ }
+ return routes;
+}
+
/*
* Parse a bootp reply packet
*/
@@ -275,6 +356,8 @@ int bootp_parse(struct netdev *dev, struct bootp_hdr *hdr,
{
uint8_t ext119_buf[BOOTP_EXTS_SIZE];
int16_t ext119_len = 0;
+ uint8_t ext121_buf[BOOTP_EXTS_SIZE];
+ int16_t ext121_len = 0;
dev->bootp.gateway = hdr->giaddr;
dev->ip_addr = hdr->yiaddr;
@@ -367,6 +450,16 @@ int bootp_parse(struc...
2018 Jun 18
1
[PATCH v3 1/2] Implement classless static routes
...index += 4;
+
+ route->netmask_width = netmask_width;
+ route->next = NULL;
+
+ if (prev_route == NULL) {
+ routes = route;
+ } else {
+ prev_route->next = route;
+ }
+ prev_route = route;
+ }
+ return routes;
+}
+
/*
* Parse a bootp reply packet
*/
@@ -275,6 +356,8 @@ int bootp_parse(struct netdev *dev, struct bootp_hdr *hdr,
{
uint8_t ext119_buf[BOOTP_EXTS_SIZE];
int16_t ext119_len = 0;
+ uint8_t ext121_buf[BOOTP_EXTS_SIZE];
+ int16_t ext121_len = 0;
dev->bootp.gateway = hdr->giaddr;
dev->ip_addr = hdr->yiaddr;
@@ -367,6 +450,16 @@ int bootp_parse(struc...
2008 Jun 14
2
PATCH: ipconfig may discard useful packets
...et.c | 15 ++++++++++++---
4 files changed, 43 insertions(+), 20 deletions(-)
diff --git a/usr/kinit/ipconfig/bootp_proto.c b/usr/kinit/ipconfig/bootp_proto.c
index 236bde9..7df3137 100644
--- a/usr/kinit/ipconfig/bootp_proto.c
+++ b/usr/kinit/ipconfig/bootp_proto.c
@@ -153,6 +153,10 @@ int bootp_parse(struct netdev *dev, struct bootp_hdr *hdr,
/*
* Receive a bootp reply and parse packet
+ * Returns:
+ *-1 = Error in packet_recv, try again later
+ * 0 = Unexpected packet, discarded
+ * 1 = Correctly received and parsed packet
*/
int bootp_recv_reply(struct netdev *dev)
{
@@ -167,7 +171,7...