Annotation of 43BSD/etc/XNSrouted/defs.h, revision 1.1.1.1

1.1       root        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();

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.