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: * @(#)defs.h 5.3 (Berkeley) 5/30/86
7: */
8:
9: /*
10: * Internal data structure definitions for
11: * user routing process. Based on Xerox NS
12: * protocol specs with mods relevant to more
13: * general addressing scheme.
14: */
15: #include <sys/types.h>
16: #include <sys/socket.h>
17:
18: #include <net/route.h>
19: #include <netinet/in.h>
20: #include <protocols/routed.h>
21:
22: #include <stdio.h>
23: #include <netdb.h>
24:
25: #include "trace.h"
26: #include "interface.h"
27: #include "table.h"
28: #include "af.h"
29:
30: /*
31: * When we find any interfaces marked down we rescan the
32: * kernel every CHECK_INTERVAL seconds to see if they've
33: * come up.
34: */
35: #define CHECK_INTERVAL (1*60)
36:
37: #define equal(a1, a2) \
38: (bcmp((caddr_t)(a1), (caddr_t)(a2), sizeof (struct sockaddr)) == 0)
39: #define min(a,b) ((a)>(b)?(b):(a))
40:
41: struct sockaddr_in addr; /* address of daemon's socket */
42:
43: int s; /* source and sink of all data */
44: int kmem;
45: int supplier; /* process should supply updates */
46: int install; /* if 1 call kernel */
47: int lookforinterfaces; /* if 1 probe kernel for new up interfaces */
48: int performnlist; /* if 1 check if /vmunix has changed */
49: int externalinterfaces; /* # of remote and local interfaces */
50: int timeval; /* local idea of time */
51:
52: char packet[MAXPACKETSIZE+1];
53: struct rip *msg;
54:
55: char **argv0;
56: struct servent *sp;
57:
58: extern char *sys_errlist[];
59: extern int errno;
60:
61: struct in_addr inet_makeaddr();
62: int inet_addr();
63: char *malloc();
64: int exit();
65: int sendmsg();
66: int supply();
67: int timer();
68: int cleanup();
Defined variables
addr
defined in line
41; used 27 times
argv0
defined in line
55; used 2 times
kmem
defined in line
44; used 1 times
msg
defined in line
53; used 35 times
- in /usr/src/etc/routed/input.c line
37-45(3),
51,
76,
84,
101-102(2),
138-142(2)
- in /usr/src/etc/routed/main.c line
128-133(6)
- in /usr/src/etc/routed/output.c line
66,
73-74(2),
102,
114
- in /usr/src/etc/routed/timer.c line
58-63(6)
- in /usr/src/etc/routed/trace.c line
227-234(5),
240,
246,
258
s
defined in line
43; used 36 times
- in /usr/src/etc/routed/af.c line
84-85(2),
95
- in /usr/src/etc/routed/input.c line
86
- in /usr/src/etc/routed/main.c line
54-55(2),
96,
144-149(3),
177-195(7)
- in /usr/src/etc/routed/output.c line
51,
100,
116
- in /usr/src/etc/routed/startup.c line
32,
39,
45-47(2),
56,
76,
83,
89-93(2),
147-151(2),
263
- in /usr/src/etc/routed/tables.c line
153,
199-201(2),
215
sp
defined in line
56; used 5 times
Defined macros
equal
defined in line
37; used 5 times
min
defined in line
39; used 3 times
Usage of this include