- * Interface request structure used by socket
- * ioctl's SIOCSIFxxxx (set interface parameter)
- * and SIOCGIFxxxx (get parameter).
+ * The ifaddr structure contains information about one address
+ * of an interface. They are maintained by the different address families,
+ * are allocated and attached when an address is set, and are linked
+ * together so all addresses for an interface can be located.
+ */
+struct ifaddr {
+ struct sockaddr *ifa_addr; /* address of interface */
+ struct sockaddr *ifa_dstaddr; /* other end of p-to-p link */
+#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */
+ struct sockaddr *ifa_netmask; /* used to determine subnet */
+ struct ifnet *ifa_ifp; /* back-pointer to interface */
+ struct ifaddr *ifa_next; /* next address for interface */
+ int (*ifa_rtrequest)(); /* check or clean routes (+ or -)'d */
+ struct rtentry *ifa_rt; /* ??? for ROUTETOIF */
+ u_short ifa_flags; /* mostly rt_flags for cloning */
+ u_short ifa_llinfolen; /* extra to malloc for link info */
+};
+#define IFA_ROUTE RTF_UP /* route installed */
+/*
+ * Interface request structure used for socket
+ * ioctl's. All interface ioctl's must have parameter
+ * definitions which begin with ifr_name. The
+ * remainder may be interface specific.