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.5 (Berkeley) 2/14/86";
7: */
8:
9: #include <sys/types.h>
10: #include <sys/socket.h>
11:
12: #include <net/route.h>
13: #include <netns/ns.h>
14: #include <netns/idp.h>
15: #if defined(vax) || defined(pdp11)
16: #define xnnet(x) ((u_long) (x)->rip_dst[1] << 16 | (u_long) (x)->rip_dst[0] )
17: #else
18: #define xnnet(x) ((u_long) (x)->rip_dst[0] << 16 | (u_long) (x)->rip_dst[1] )
19: #endif
20: #define IDPPORT_RIF 1
21:
22: #include <stdio.h>
23: #include <syslog.h>
24:
25: #include "protocol.h"
26: #include "trace.h"
27: #include "interface.h"
28: #include "table.h"
29: #include "af.h"
30:
31:
32: /*
33: * When we find any interfaces marked down we rescan the
34: * kernel every CHECK_INTERVAL seconds to see if they've
35: * come up.
36: */
37: #define CHECK_INTERVAL (5*60)
38:
39: #define equal(a1, a2) \
40: (bcmp((caddr_t)(a1), (caddr_t)(a2), sizeof (struct sockaddr)) == 0)
41: #define min(a,b) ((a)>(b)?(b):(a))
42:
43: struct sockaddr_ns addr; /* Daemon's Address */
44: int s; /* Socket to listen on */
45: int kmem;
46: int supplier; /* process should supply updates */
47: int install; /* if 1 call kernel */
48: int lookforinterfaces; /* if 1 probe kernel for new up interfaces */
49: int performnlist; /* if 1 check if /vmunix has changed */
50: int externalinterfaces; /* # of remote and local interfaces */
51: int timeval; /* local idea of time */
52: int noteremoterequests; /* squawk on requests from non-local nets */
53:
54: char packet[MAXPACKETSIZE+sizeof(struct idp)+1];
55: struct rip *msg;
56:
57: char **argv0;
58:
59: extern char *sys_errlist[];
60: extern int errno;
61:
62: char *malloc();
63: int exit();
64: int sendmsg();
65: int supply();
66: int timer();
67: int cleanup();
Defined variables
addr
defined in line
43; used 32 times
argv0
defined in line
57; used 2 times
kmem
defined in line
45;
never used
msg
defined in line
55; used 26 times
s
defined in line
44; used 37 times
- in /usr/src/etc/XNSrouted/af.c line
48-53(4),
106-111(2),
138-140(4),
171-172(2)
- in /usr/src/etc/XNSrouted/main.c line
111-112(2),
143,
176(2),
187-190(2),
197,
206-220(4)
- in /usr/src/etc/XNSrouted/startup.c line
41,
47,
53-55(2),
64,
77,
84,
140-144(2)
- in /usr/src/etc/XNSrouted/tables.c line
144,
187-190(2),
204
Defined macros
equal
defined in line
39; used 4 times
min
defined in line
41; used 3 times
xnnet
defined in line
18;
never used
Usage of this include