search for: hwlen

Displaying 13 results from an estimated 13 matches for "hwlen".

Did you mean: helen
2012 Jul 31
1
Request: Infiniband Support in ipconfig
...unately, it's a pretty simple and straightforward patch. Below is the patch for your consideration. --- usr/kinit/ipconfig/netdev.c 2012-07-31 15:13:12.744747261 -0400 +++ usr/kinit/ipconfig/netdev-ib.c 2012-07-31 15:16:26.468087750 -0400 @@ -220,6 +220,9 @@ case ARPHRD_LOOPBACK: dev->hwlen = 0; break; + case ARPHRD_INFINIBAND: + dev->hwlen = 20; + break; default: return -1; } As you can see, it simply returns the proper length of the IB interface's MAC address. Regards, -Wes
2016 Mar 21
0
[PATCH 0/1] ipconfig DHCP bug
.../kinit/ipconfig/dhcp_proto.c --- a/klibc-2.0.4/usr/kinit/ipconfig/dhcp_proto.c 2014-07-09 09:21:02.000000000 -0600 +++ b/klibc-2.0.4/usr/kinit/ipconfig/dhcp_proto.c 2016-03-21 01:51:12.747420454 -0600 @@ -201,7 +201,8 @@ static int dhcp_send(struct netdev *dev, bootp.hlen = dev->hwlen; bootp.xid = dev->bootp.xid; bootp.ciaddr = INADDR_ANY; - bootp.yiaddr = dev->ip_addr; + bootp.yiaddr = INADDR_ANY; + bootp.flags = htons(0x800); bootp.giaddr = INADDR_ANY; bootp.secs = htons(time(NULL) - dev->open_time); memcpy(bootp.chaddr, de...
2019 Jan 18
0
[klibc:master] ipconfig: Set broadcast when sending DHCPREQUEST and DHCPDISCOVER
...letion(-) diff --git a/usr/kinit/ipconfig/dhcp_proto.c b/usr/kinit/ipconfig/dhcp_proto.c index ebf79cc..d5b759b 100644 --- a/usr/kinit/ipconfig/dhcp_proto.c +++ b/usr/kinit/ipconfig/dhcp_proto.c @@ -201,8 +201,14 @@ static int dhcp_send(struct netdev *dev, struct iovec *vec) bootp.hlen = dev->hwlen; bootp.xid = dev->bootp.xid; bootp.ciaddr = INADDR_ANY; - bootp.yiaddr = dev->ip_addr; + /* yiaddr should always be set to 0 for the messages we're likely + * to send as a DHCP client: DHCPDISCOVER, DHCPREQUEST, DHCPDECLINE, + * DHCPINFORM, DHCPRELEASE + * cf. RFC2131 section 4.1.1...
2003 Apr 29
0
[PATCH] ipconfig: fix memory leak, and exit if no interfaces to configure
...g/main.c Tue Apr 29 13:22:55 2003 @@ -391,10 +391,10 @@ dev->name = devname; if (netdev_init_if(dev) == -1) - return; + goto bail; if (bootp_init_if(dev) == -1) - return; + goto bail; printf("IP-Config: %s hardware address", dev->name); for (i = 0; i < dev->hwlen; i++) @@ -406,6 +406,22 @@ if (dev->caps && netdev_up(dev) == 0) add_one_dev(dev); + return; + bail: + free(dev); +} + +static void check_for_devs(void) +{ + struct state *s; + + for (s = slist; s; s = s->next) { + if (s->dev->caps) + return; + } + + fprintf(stderr, &...
2010 Mar 16
4
ipconfig: DHCP fixes
Hi, Here are two fixes for ipconfig/dhcp, the second of them being required for my dhcp3 server to accept ipconfig's requests. Thanks, Louis Louis Rilling (2): ipconfig: Fix missing dhcp_end field ipconfig: Fix null ciaddr on DHCPREQUEST during SELECTING state usr/kinit/ipconfig/dhcp_proto.c | 4 ++-- usr/kinit/ipconfig/packet.c | 2 +- 2 files changed, 3
2017 Dec 31
4
[PATCH klibc 0/4] Fixes from Debian and Ubuntu
The following patches come from Debian and/or Ubuntu packages of klibc. Ben. Ben Hutchings (1): [klibc] run-init: Add dry-run mode Jay Vosburgh (1): [klibc] ipconfig: Use separate sockets for DHCP from multiple interfaces Mathieu Trudel-Lapierre (1): [klibc] ipconfig: Set broadcast when sending DHCPREQUEST and DHCPDISCOVER YunQiang Su (1): [klibc] mips: setjmp.S: don't
2007 Dec 10
1
[git patch] m-i-t support, ipconfig fix
...tro.at> diff --git a/usr/kinit/ipconfig/dhcp_proto.c b/usr/kinit/ipconfig/dhcp_proto.c index a1090f3..8ff1d58 100644 --- a/usr/kinit/ipconfig/dhcp_proto.c +++ b/usr/kinit/ipconfig/dhcp_proto.c @@ -161,7 +161,7 @@ static int dhcp_send(struct netdev *dev, struct iovec *vec) bootp.hlen = dev->hwlen; bootp.xid = dev->bootp.xid; bootp.ciaddr = dev->ip_addr; - bootp.giaddr = dev->bootp.gateway; + bootp.giaddr = INADDR_ANY; bootp.secs = htons(time(NULL) - dev->open_time); memcpy(bootp.chaddr, dev->hwaddr, 16); commit fbf8aa559d25685eea12248c76bcc983c68306b2 Author: maxim...
2017 Feb 04
0
[PATCH] ipconfig: handle multiple interfaces correctly
...; + n_devices++; + return 0; } @@ -675,6 +682,9 @@ static struct netdev *add_device(const char *info) if (bootp_init_if(dev) == -1) goto bail; + if (packet_open(dev) == -1) + goto bail; + printf("IP-Config: %s hardware address", dev->name); for (i = 0; i < dev->hwlen; i++) printf("%c%02x", i == 0 ? ' ' : ':', dev->hwaddr[i]); diff --git a/usr/kinit/ipconfig/netdev.h b/usr/kinit/ipconfig/netdev.h index cd853b6c078b..4b75a65ad067 100644 --- a/usr/kinit/ipconfig/netdev.h +++ b/usr/kinit/ipconfig/netdev.h @@ -45,6 +45,7 @@ struct net...
2019 Jan 18
0
[klibc:master] ipconfig: handle multiple interfaces correctly
...; + n_devices++; + return 0; } @@ -675,6 +682,9 @@ static struct netdev *add_device(const char *info) if (bootp_init_if(dev) == -1) goto bail; + if (packet_open(dev) == -1) + goto bail; + printf("IP-Config: %s hardware address", dev->name); for (i = 0; i < dev->hwlen; i++) printf("%c%02x", i == 0 ? ' ' : ':', dev->hwaddr[i]); diff --git a/usr/kinit/ipconfig/netdev.h b/usr/kinit/ipconfig/netdev.h index cd853b6..4b75a65 100644 --- a/usr/kinit/ipconfig/netdev.h +++ b/usr/kinit/ipconfig/netdev.h @@ -45,6 +45,7 @@ struct netdev { ch...
2019 Jan 18
0
[klibc:master] ipconfig: Implement classless static routes
...h */ + uint32_t gateway; /* gateway */ + struct route *next; +}; + struct netdev { - const char *name; /* Device name */ + char *name; /* Device name */ unsigned int ifindex; /* interface index */ unsigned int hwtype; /* ARPHRD_xxx */ unsigned int hwlen; /* HW address length */ @@ -44,6 +52,7 @@ struct netdev { char bootpath[BPLEN]; /* boot path */ char filename[FNLEN]; /* filename */ char *domainsearch; /* decoded, NULL or malloc-ed */ + struct route *routes; /* decoded, NULL or malloc-ed list */ long uptime;...
2018 Jun 18
1
[PATCH v3 1/2] Implement classless static routes
...h */ + uint32_t gateway; /* gateway */ + struct route *next; +}; + struct netdev { - const char *name; /* Device name */ + char *name; /* Device name */ unsigned int ifindex; /* interface index */ unsigned int hwtype; /* ARPHRD_xxx */ unsigned int hwlen; /* HW address length */ @@ -44,6 +52,7 @@ struct netdev { char bootpath[BPLEN]; /* boot path */ char filename[FNLEN]; /* filename */ char *domainsearch; /* decoded, NULL or malloc-ed */ + struct route *routes; /* decoded, NULL or malloc-ed list */ long uptime;...
2008 Sep 05
0
initial mntent.h, mount features, ipconfig fixes
...it/ipconfig/dhcp_proto.c b/usr/kinit/ipconfig/dhcp_proto.c index d4f2c09..21448f7 100644 --- a/usr/kinit/ipconfig/dhcp_proto.c +++ b/usr/kinit/ipconfig/dhcp_proto.c @@ -171,7 +171,8 @@ static int dhcp_send(struct netdev *dev, struct iovec *vec) bootp.htype = dev->hwtype; bootp.hlen = dev->hwlen; bootp.xid = dev->bootp.xid; - bootp.ciaddr = dev->ip_addr; + bootp.ciaddr = INADDR_NONE; + bootp.yiaddr = dev->ip_addr; bootp.giaddr = INADDR_ANY; bootp.secs = htons(time(NULL) - dev->open_time); memcpy(bootp.chaddr, dev->hwaddr, 16); commit 959ed5fced3403cba814c819146e8d82...
2008 Sep 07
1
[git pull v2] initial mntent.h, mount features, ipconfig fixes
...it/ipconfig/dhcp_proto.c b/usr/kinit/ipconfig/dhcp_proto.c index d4f2c09..21448f7 100644 --- a/usr/kinit/ipconfig/dhcp_proto.c +++ b/usr/kinit/ipconfig/dhcp_proto.c @@ -171,7 +171,8 @@ static int dhcp_send(struct netdev *dev, struct iovec *vec) bootp.htype = dev->hwtype; bootp.hlen = dev->hwlen; bootp.xid = dev->bootp.xid; - bootp.ciaddr = dev->ip_addr; + bootp.ciaddr = INADDR_NONE; + bootp.yiaddr = dev->ip_addr; bootp.giaddr = INADDR_ANY; bootp.secs = htons(time(NULL) - dev->open_time); memcpy(bootp.chaddr, dev->hwaddr, 16); commit 848a8ce349331cd74021cc3b8ea43f9e...