1: /*
2: * Copyright (c) 1983 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: *
6: * @(#)interface.h 5.3 (Berkeley) 8/16/85";
7: */
8:
9: /*
10: * Routing table management daemon.
11: */
12:
13: /*
14: * An ``interface'' is similar to an ifnet structure,
15: * except it doesn't contain q'ing info, and it also
16: * handles ``logical'' interfaces (remote gateways
17: * that we want to keep polling even if they go down).
18: * The list of interfaces which we maintain is used
19: * in supplying the gratuitous routing table updates.
20: * We list only one address for each interface, the AF_XNS one.
21: */
22: #define NIFADDR 3
23: struct interface {
24: struct interface *int_next;
25: struct sockaddr int_addr; /* address on this host */
26: union {
27: struct sockaddr intu_broadaddr;
28: struct sockaddr intu_dstaddr;
29: } int_intu;
30: #define int_broadaddr int_intu.intu_broadaddr /* broadcast address */
31: #define int_dstaddr int_intu.intu_dstaddr /* other end of p-to-p link */
32: int int_metric; /* init's routing entry */
33: int int_flags; /* see below */
34: struct ifdebug int_input, int_output; /* packet tracing stuff */
35: int int_ipackets; /* input packets received */
36: int int_opackets; /* output packets sent */
37: char *int_name; /* from kernel if structure */
38: u_short int_transitions; /* times gone up-down */
39: /*XNS Specific entry */
40: struct sameq {
41: struct sameq *n; /* q of other pt-to-pt links */
42: struct sameq *p; /* with same net # */
43: } int_sq;
44: };
45:
46: /*
47: * 0x1 to 0x10 are reused from the kernel's ifnet definitions,
48: * the others agree with the RTS_ flags defined elsewhere.
49: */
50: #define IFF_UP 0x1 /* interface is up */
51: #define IFF_BROADCAST 0x2 /* broadcast address valid */
52: #define IFF_DEBUG 0x4 /* turn on debugging */
53: #define IFF_ROUTE 0x8 /* routing entry installed */
54: #define IFF_POINTOPOINT 0x10 /* interface is point-to-point link */
55:
56: #define IFF_PASSIVE 0x2000 /* can't tell if up/down */
57: #define IFF_INTERFACE 0x4000 /* hardware interface */
58: #define IFF_REMOTE 0x8000 /* interface isn't on this machine */
59:
60: struct interface *if_ifwithaddr();
61: struct interface *if_ifwithdstaddr();
62: struct interface *if_ifwithnet();
63: struct interface *if_iflookup();
Defined struct's
interface
defined in line
23; used 66 times
- in line 24(2),
60-63(8)
- in /usr/src/etc/XNSrouted/af.c line
100-101(4),
122(2)
- in /usr/src/etc/XNSrouted/if.c line
16-25(6),
46-50(4),
65-69(4),
92-96(4)
- in /usr/src/etc/XNSrouted/input.c line
44(2)
- in /usr/src/etc/XNSrouted/output.c line
28-31(4),
51(2),
66(2)
- in /usr/src/etc/XNSrouted/startup.c line
24(2),
40(2),
103(4),
151(2),
160-161(4)
- in /usr/src/etc/XNSrouted/trace.c line
33(2),
45(2),
143(2),
181(2)
sameq
defined in line
40; used 4 times
Defined macros
Usage of this include