diff options
author | Rob Landley <rob@landley.net> | 2013-04-26 02:41:05 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2013-04-26 02:41:05 -0500 |
commit | f01534401412812bc1d904812dfb4b0a31ee8fff (patch) | |
tree | db23ecd59e456f54cfd071eeca8806328e29b8d9 /toys/pending/ifconfig.c | |
parent | a4a6dfb584a3de8c947d2ccf159b53bf56daebb7 (diff) | |
download | toybox-f01534401412812bc1d904812dfb4b0a31ee8fff.tar.gz |
Add posix headers to toynet.h, move xioctl() to lib.c, introduce lib/net.c and move xsocket() to it.
Diffstat (limited to 'toys/pending/ifconfig.c')
-rw-r--r-- | toys/pending/ifconfig.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/toys/pending/ifconfig.c b/toys/pending/ifconfig.c index 0a511506..14a7de2d 100644 --- a/toys/pending/ifconfig.c +++ b/toys/pending/ifconfig.c @@ -32,7 +32,6 @@ config IFCONFIG #include "toys.h" #include "toynet.h" -#include <net/if.h> #include <net/if_arp.h> #include <net/ethernet.h> @@ -61,9 +60,6 @@ struct if_list { unsigned long long val[16]; }; -#define HW_NAME_LEN 20 -#define HW_TITLE_LEN 30 - #define IO_MAP_INDEX 0x100 //from kernel header ipv6.h @@ -96,19 +92,6 @@ struct ifreq_inet6 { # define INFINIBAND_ALEN 20 #endif -void xioctl(int fd, int request, void *data) -{ - if (ioctl(fd, request, data) < 0) perror_exit("ioctl %d", request); -} - -int xsocket(int domain, int type, int protocol) -{ - int fd = socket(domain, type, protocol); - - if (fd < 0) perror_exit("socket %x %x", type, protocol); - return fd; -} - /* * verify the host is local unix path. * if so, set the swl input param accordingly. |