|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1983 The Regents of the University of California. ! 3: * All rights reserved. ! 4: * ! 5: * Redistribution and use in source and binary forms are permitted ! 6: * provided that: (1) source distributions retain this entire copyright ! 7: * notice and comment, and (2) distributions including binaries display ! 8: * the following acknowledgement: ``This product includes software ! 9: * developed by the University of California, Berkeley and its contributors'' ! 10: * in the documentation or other materials provided with the distribution ! 11: * and in all advertising materials mentioning features or use of this ! 12: * software. Neither the name of the University nor the names of its ! 13: * contributors may be used to endorse or promote products derived ! 14: * from this software without specific prior written permission. ! 15: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 16: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 17: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 18: * ! 19: * @(#)interface.h 5.5 (Berkeley) 6/1/90 ! 20: */ ! 21: ! 22: /* ! 23: * Routing table management daemon. ! 24: */ ! 25: ! 26: /* ! 27: * An ``interface'' is similar to an ifnet structure, ! 28: * except it doesn't contain q'ing info, and it also ! 29: * handles ``logical'' interfaces (remote gateways ! 30: * that we want to keep polling even if they go down). ! 31: * The list of interfaces which we maintain is used ! 32: * in supplying the gratuitous routing table updates. ! 33: * We list only one address for each interface, the AF_XNS one. ! 34: */ ! 35: #define NIFADDR 3 ! 36: struct interface { ! 37: struct interface *int_next; ! 38: struct sockaddr int_addr; /* address on this host */ ! 39: union { ! 40: struct sockaddr intu_broadaddr; ! 41: struct sockaddr intu_dstaddr; ! 42: } int_intu; ! 43: #define int_broadaddr int_intu.intu_broadaddr /* broadcast address */ ! 44: #define int_dstaddr int_intu.intu_dstaddr /* other end of p-to-p link */ ! 45: int int_metric; /* init's routing entry */ ! 46: int int_flags; /* see below */ ! 47: struct ifdebug int_input, int_output; /* packet tracing stuff */ ! 48: int int_ipackets; /* input packets received */ ! 49: int int_opackets; /* output packets sent */ ! 50: char *int_name; /* from kernel if structure */ ! 51: u_short int_transitions; /* times gone up-down */ ! 52: /*XNS Specific entry */ ! 53: struct sameq { ! 54: struct sameq *n; /* q of other pt-to-pt links */ ! 55: struct sameq *p; /* with same net # */ ! 56: } int_sq; ! 57: }; ! 58: ! 59: /* ! 60: * 0x1 to 0x10 are reused from the kernel's ifnet definitions, ! 61: * the others agree with the RTS_ flags defined elsewhere. ! 62: */ ! 63: #define IFF_UP 0x1 /* interface is up */ ! 64: #define IFF_BROADCAST 0x2 /* broadcast address valid */ ! 65: #define IFF_DEBUG 0x4 /* turn on debugging */ ! 66: #define IFF_ROUTE 0x8 /* routing entry installed */ ! 67: #define IFF_POINTOPOINT 0x10 /* interface is point-to-point link */ ! 68: ! 69: #define IFF_PASSIVE 0x2000 /* can't tell if up/down */ ! 70: #define IFF_INTERFACE 0x4000 /* hardware interface */ ! 71: #define IFF_REMOTE 0x8000 /* interface isn't on this machine */ ! 72: ! 73: struct interface *if_ifwithaddr(); ! 74: struct interface *if_ifwithdstaddr(); ! 75: struct interface *if_ifwithnet(); ! 76: struct interface *if_iflookup();
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.