1*24308Ssklower /* interface.h 4.2 84/04/09 */ 2*24308Ssklower 3*24308Ssklower /* 4*24308Ssklower * Routing table management daemon. 5*24308Ssklower */ 6*24308Ssklower 7*24308Ssklower /* 8*24308Ssklower * An ``interface'' is similar to an ifnet structure, 9*24308Ssklower * except it doesn't contain q'ing info, and it also 10*24308Ssklower * handles ``logical'' interfaces (remote gateways 11*24308Ssklower * that we want to keep polling even if they go down). 12*24308Ssklower * The list of interfaces which we maintain is used 13*24308Ssklower * in supplying the gratuitous routing table updates. 14*24308Ssklower * We list only one address for each interface, the AF_XNS one. 15*24308Ssklower */ 16*24308Ssklower #define NIFADDR 3 17*24308Ssklower struct interface { 18*24308Ssklower struct interface *int_next; 19*24308Ssklower struct sockaddr int_addr; /* address on this host */ 20*24308Ssklower union { 21*24308Ssklower struct sockaddr intu_broadaddr; 22*24308Ssklower struct sockaddr intu_dstaddr; 23*24308Ssklower } int_intu; 24*24308Ssklower #define int_broadaddr int_intu.intu_broadaddr /* broadcast address */ 25*24308Ssklower #define int_dstaddr int_intu.intu_dstaddr /* other end of p-to-p link */ 26*24308Ssklower int int_metric; /* init's routing entry */ 27*24308Ssklower int int_flags; /* see below */ 28*24308Ssklower struct ifdebug int_input, int_output; /* packet tracing stuff */ 29*24308Ssklower int int_ipackets; /* input packets received */ 30*24308Ssklower int int_opackets; /* output packets sent */ 31*24308Ssklower char *int_name; /* from kernel if structure */ 32*24308Ssklower u_short int_transitions; /* times gone up-down */ 33*24308Ssklower int int_ripsock[2]; /* socket to listen for RIP packets on */ 34*24308Ssklower }; 35*24308Ssklower 36*24308Ssklower /* 37*24308Ssklower * 0x1 to 0x100 are reused from the kernel's ifnet definitions, 38*24308Ssklower * the others agree with the RTS_ flags defined elsewhere. 39*24308Ssklower */ 40*24308Ssklower #define IFF_UP 0x1 /* interface is up */ 41*24308Ssklower #define IFF_BROADCAST 0x2 /* broadcast address valid */ 42*24308Ssklower #define IFF_DEBUG 0x4 /* turn on debugging */ 43*24308Ssklower #define IFF_ROUTE 0x8 /* routing entry installed */ 44*24308Ssklower #define IFF_POINTOPOINT 0x10 /* interface is point-to-point link */ 45*24308Ssklower #define IFF_LOCAL 0x100 /* local network, host part encoded */ 46*24308Ssklower 47*24308Ssklower #define IFF_PASSIVE 0x2000 /* can't tell if up/down */ 48*24308Ssklower #define IFF_INTERFACE 0x4000 /* hardware interface */ 49*24308Ssklower #define IFF_REMOTE 0x8000 /* interface isn't on this machine */ 50*24308Ssklower 51*24308Ssklower struct interface *if_ifwithaddr(); 52*24308Ssklower struct interface *if_ifwithnet(); 53*24308Ssklower struct interface *if_iflookup(); 54