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) 4/20/86
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: */
21: struct interface {
22: struct interface *int_next;
23: struct sockaddr int_addr; /* address on this host */
24: union {
25: struct sockaddr intu_broadaddr;
26: struct sockaddr intu_dstaddr;
27: } int_intu;
28: #define int_broadaddr int_intu.intu_broadaddr /* broadcast address */
29: #define int_dstaddr int_intu.intu_dstaddr /* other end of p-to-p link */
30: int int_metric; /* init's routing entry */
31: int int_flags; /* see below */
32: /* START INTERNET SPECIFIC */
33: u_long int_net; /* network # */
34: u_long int_netmask; /* net mask for addr */
35: u_long int_subnet; /* subnet # */
36: u_long int_subnetmask; /* subnet mask for addr */
37: /* END INTERNET SPECIFIC */
38: struct ifdebug int_input, int_output; /* packet tracing stuff */
39: int int_ipackets; /* input packets received */
40: int int_opackets; /* output packets sent */
41: char *int_name; /* from kernel if structure */
42: u_short int_transitions; /* times gone up-down */
43: };
44:
45: /*
46: * 0x1 to 0x10 are reused from the kernel's ifnet definitions,
47: * the others agree with the RTS_ flags defined elsewhere.
48: */
49: #define IFF_UP 0x1 /* interface is up */
50: #define IFF_BROADCAST 0x2 /* broadcast address valid */
51: #define IFF_DEBUG 0x4 /* turn on debugging */
52: #define IFF_LOOPBACK 0x8 /* software loopback net */
53: #define IFF_POINTOPOINT 0x10 /* interface is point-to-point link */
54:
55: #define IFF_SUBNET 0x1000 /* interface on subnetted network */
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
21; used 72 times
- in line 22(2),
60-63(8)
- in /usr/src/etc/routed/if.c line
16-25(6),
46-50(4),
65-69(4),
92-96(4)
- in /usr/src/etc/routed/inet.c line
17(2),
26(2),
54(2),
81(2),
114(2)
- in /usr/src/etc/routed/input.c line
26-27(4)
- in /usr/src/etc/routed/output.c line
25-28(4),
48(2),
63(2)
- in /usr/src/etc/routed/startup.c line
19(2),
31(2),
111(4),
163(2),
223(2),
279(2)
- in /usr/src/etc/routed/trace.c line
25(2),
37(2),
142(2),
180(2)
Defined macros
Usage of this include