get "h" and "m" flags working; clean up interface with getvol()
[unix-history] / usr / src / sbin / routed / defs.h
CommitLineData
7fe7fe74 1/* defs.h 4.14 83/01/11 */
b242391c
SL
2
3/*
4 * Internal data structure definitions for
5 * user routing process. Based on Xerox NS
6 * protocol specs with mods relevant to more
7 * general addressing scheme.
8 */
c8c4156e
SL
9#include <sys/types.h>
10#include <sys/socket.h>
4f306a0d 11
3cec0c76 12#include <net/route.h>
4f306a0d
SL
13#include <netinet/in.h>
14
c8c4156e
SL
15#include <stdio.h>
16#include <netdb.h>
4f306a0d 17
7fe7fe74
SL
18#include "protocol.h"
19#include "trace.h"
20#include "interface.h"
21#include "table.h"
22#include "af.h"
c8c4156e 23
7fe7fe74 24#define COMPAT 1 /* stay compatible with 4.1a daemons */
e0a3d4f9
SL
25
26/*
27 * When we find any interfaces marked down we rescan the
28 * kernel every CHECK_INTERVAL seconds to see if they've
29 * come up.
30 */
31#define CHECK_INTERVAL (1*60)
c8c4156e
SL
32
33#define LOOPBACKNET 0177
c8c4156e
SL
34#define equal(a1, a2) \
35 (bcmp((caddr_t)(a1), (caddr_t)(a2), sizeof (struct sockaddr)) == 0)
36#define min(a,b) ((a)>(b)?(b):(a))
37
7fe7fe74 38struct sockaddr_in addr; /* address of daemon's socket */
c8c4156e 39
7fe7fe74 40int s; /* source and sink of all data */
c8c4156e
SL
41int kmem;
42int supplier; /* process should supply updates */
43int install; /* if 1 call kernel */
7fe7fe74
SL
44int lookforinterfaces; /* if 1 probe kernel for new up interfaces */
45int performnlist; /* if 1 check if /vmunix has changed */
c8c4156e 46int externalinterfaces; /* # of remote and local interfaces */
7fe7fe74 47int timeval; /* local idea of time */
c8c4156e
SL
48
49char packet[MAXPACKETSIZE+1];
50struct rip *msg;
51
52char **argv0;
53struct servent *sp;
54
7fe7fe74
SL
55extern char *sys_errlist[];
56extern int errno;
c8c4156e 57
7fe7fe74
SL
58struct in_addr inet_makeaddr();
59int inet_addr();
60char *malloc();
61int exit();
62int sendmsg();
63int supply();
64int timer();
65int cleanup();