Added definition of initial ifreq_bsd containing only padding data

This commit is contained in:
Fabrizio Bertocci 2021-05-13 08:54:47 -04:00
parent 0b20b4cdf8
commit b08a23283d

View file

@ -94,6 +94,7 @@ struct ifconf {
} ifc_ifcu; } ifc_ifcu;
}; };
/* Shortcuts to the ifconf buffer or ifreq array */ /* Shortcuts to the ifconf buffer or ifreq array */
#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */ #define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
#define ifc_req ifc_ifcu.ifcu_req /* array of structures */ #define ifc_req ifc_ifcu.ifcu_req /* array of structures */
@ -115,9 +116,20 @@ struct ifreq {
short ifru_flags; short ifru_flags;
int ifru_ivalue; int ifru_ivalue;
int ifru_mtu; int ifru_mtu;
char ifru_map[24]; /* Unsupported, used as padding */ char ifru_pad[24]; /* ifru_map, used as padding */
} ifr_ifru; } ifr_ifru;
}; };
struct ifreq_bsd {
union {
char ifrn_name[IFNAMSIZ];
} ifr_ifrn;
union {
char ifru_pad[16];
} ifr_ifru;
};
#define ifr_name ifr_ifrn.ifrn_name /* interface name */ #define ifr_name ifr_ifrn.ifrn_name /* interface name */
#define ifr_addr ifr_ifru.ifru_addr /* address */ #define ifr_addr ifr_ifru.ifru_addr /* address */
#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-p lnk */ #define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-p lnk */