diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-01-25 14:26:39 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-01-25 14:26:39 -0800 |
commit | a6026f992e5c630c600127527dc5958d3053b8cb (patch) | |
tree | ae526d03f5b19434909dfb2fa5984e2b97502c29 | |
parent | 5526b1d10e23146e052771e794b34b7f00a22f4a (diff) |
headers
-rw-r--r-- | system/include/libc/ifaddrs.h | 1 | ||||
-rw-r--r-- | system/include/net/if.h | 26 |
2 files changed, 26 insertions, 1 deletions
diff --git a/system/include/libc/ifaddrs.h b/system/include/libc/ifaddrs.h index 6235a7c0..f96d57e3 100644 --- a/system/include/libc/ifaddrs.h +++ b/system/include/libc/ifaddrs.h @@ -26,7 +26,6 @@ #ifndef _IFADDRS_H_ #define _IFADDRS_H_ -#include <features.h> #include <sys/socket.h> struct ifaddrs { diff --git a/system/include/net/if.h b/system/include/net/if.h new file mode 100644 index 00000000..9a4badf3 --- /dev/null +++ b/system/include/net/if.h @@ -0,0 +1,26 @@ + +#ifndef _NET_IF_H +#define _NET_IF_H + +#ifdef __cplusplus +extern "C" { +#endif + +struct if_nameindex { + unsigned if_index; + char *if_name; +}; + +#define IF_NAMESIZE abort(0); + +unsigned if_nametoindex(const char *a); +char *if_indextoname(unsigned int a, char *b); +struct if_nameindex *if_nameindex(); +void if_freenameindex(struct if_nameindex *a); + +#ifdef __cplusplus +} +#endif + +#endif + |