|
|
1.1 ! root 1: /* interface.h 4.1 83/01/11 */ ! 2: ! 3: /* ! 4: * Routing table management daemon. ! 5: */ ! 6: ! 7: /* ! 8: * An ``interface'' is similar to an ifnet structure, ! 9: * except it doesn't contain q'ing info, and it also ! 10: * handles ``logical'' interfaces (remote gateways ! 11: * that we want to keep polling even if they go down). ! 12: * The list of interfaces which we maintain is used ! 13: * in supplying the gratuitous routing table updates. ! 14: */ ! 15: struct interface { ! 16: struct interface *int_next; ! 17: struct sockaddr int_addr; /* address on this host */ ! 18: union { ! 19: struct sockaddr intu_broadaddr; ! 20: struct sockaddr intu_dstaddr; ! 21: } int_intu; ! 22: #define int_broadaddr int_intu.intu_broadaddr /* broadcast address */ ! 23: #define int_dstaddr int_intu.intu_dstaddr /* other end of p-to-p link */ ! 24: int int_metric; /* init's routing entry */ ! 25: int int_flags; /* see below */ ! 26: int int_net; /* network # */ ! 27: struct ifdebug int_input, int_output; /* packet tracing stuff */ ! 28: int int_ipackets; /* input packets received */ ! 29: int int_opackets; /* output packets sent */ ! 30: char *int_name; /* from kernel if structure */ ! 31: u_short int_transitions; /* times gone up-down */ ! 32: }; ! 33: ! 34: /* ! 35: * 0x1 to 0x10 are reused from the kernel's ifnet definitions, ! 36: * the others agree with the RTS_ flags defined below ! 37: */ ! 38: #define IFF_UP 0x1 /* interface is up */ ! 39: #define IFF_BROADCAST 0x2 /* broadcast address valid */ ! 40: #define IFF_DEBUG 0x4 /* turn on debugging */ ! 41: #define IFF_ROUTE 0x8 /* routing entry installed */ ! 42: #define IFF_POINTOPOINT 0x10 /* interface is point-to-point link */ ! 43: #define IFF_PASSIVE 0x20 /* can't tell if up/down */ ! 44: #define IFF_INTERFACE 0x40 /* hardware interface */ ! 45: #define IFF_REMOTE 0x80 /* interface isn't on this machine */ ! 46: ! 47: struct interface *if_ifwithaddr(); ! 48: struct interface *if_ifwithnet(); ! 49: struct interface *if_iflookup();
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.