X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=include%2Fnet%2Fif.h;h=774cbff0b5064186f2208f39af36516540913a9d;hb=8c0c9c69a12acc0a82590d4fd64cf633ff1dedd2;hp=00c763a482d84f6e66feefa1908038dcc16857ab;hpb=3ed8c9f2df0b5f0bfe1006037c46d4f32ec6ca7b;p=musl diff --git a/include/net/if.h b/include/net/if.h index 00c763a4..774cbff0 100644 --- a/include/net/if.h +++ b/include/net/if.h @@ -5,10 +5,11 @@ extern "C" { #endif +#include + #define IF_NAMESIZE 16 -struct if_nameindex -{ +struct if_nameindex { unsigned int if_index; char *if_name; }; @@ -21,7 +22,7 @@ void if_freenameindex (struct if_nameindex *); -#ifdef _GNU_SOURCE +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) #include @@ -41,6 +42,11 @@ void if_freenameindex (struct if_nameindex *); #define IFF_PORTSEL 0x2000 #define IFF_AUTOMEDIA 0x4000 #define IFF_DYNAMIC 0x8000 +#define IFF_LOWER_UP 0x10000 +#define IFF_DORMANT 0x20000 +#define IFF_ECHO 0x40000 +#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST| \ + IFF_ECHO|IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT) struct ifaddr { struct sockaddr ifa_addr; @@ -83,7 +89,7 @@ struct ifreq { struct ifmap ifru_map; char ifru_slave[IFNAMSIZ]; char ifru_newname[IFNAMSIZ]; - void *ifru_data; + char *ifru_data; } ifr_ifru; }; @@ -110,7 +116,7 @@ struct ifreq { struct ifconf { int ifc_len; union { - void *ifcu_buf; + char *ifcu_buf; struct ifreq *ifcu_req; } ifc_ifcu; }; @@ -119,6 +125,13 @@ struct ifconf { #define ifc_req ifc_ifcu.ifcu_req #define _IOT_ifconf _IOT(_IOTS(struct ifconf),1,0,0,0,0) +#define __UAPI_DEF_IF_IFCONF 0 +#define __UAPI_DEF_IF_IFMAP 0 +#define __UAPI_DEF_IF_IFNAMSIZ 0 +#define __UAPI_DEF_IF_IFREQ 0 +#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 0 +#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0 + #endif #ifdef __cplusplus