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) 8/16/85";
   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:  * We list only one address for  each interface, the AF_XNS one.
  21:  */
  22: #define NIFADDR 3
  23: struct interface {
  24:     struct  interface *int_next;
  25:     struct  sockaddr int_addr;      /* address on this host */
  26:     union {
  27:         struct  sockaddr intu_broadaddr;
  28:         struct  sockaddr intu_dstaddr;
  29:     } int_intu;
  30: #define int_broadaddr   int_intu.intu_broadaddr /* broadcast address */
  31: #define int_dstaddr int_intu.intu_dstaddr   /* other end of p-to-p link */
  32:     int int_metric;         /* init's routing entry */
  33:     int int_flags;          /* see below */
  34:     struct  ifdebug int_input, int_output;  /* packet tracing stuff */
  35:     int int_ipackets;           /* input packets received */
  36:     int int_opackets;           /* output packets sent */
  37:     char    *int_name;          /* from kernel if structure */
  38:     u_short int_transitions;        /* times gone up-down */
  39: /*XNS Specific entry */
  40:     struct  sameq {
  41:         struct sameq *n;        /* q of other pt-to-pt links */
  42:         struct sameq *p;        /* with same net # */
  43:     }   int_sq;
  44: };
  45: 
  46: /*
  47:  * 0x1 to 0x10 are reused from the kernel's ifnet definitions,
  48:  * the others agree with the RTS_ flags defined elsewhere.
  49:  */
  50: #define IFF_UP      0x1     /* interface is up */
  51: #define IFF_BROADCAST   0x2     /* broadcast address valid */
  52: #define IFF_DEBUG   0x4     /* turn on debugging */
  53: #define IFF_ROUTE   0x8     /* routing entry installed */
  54: #define IFF_POINTOPOINT 0x10        /* interface is point-to-point link */
  55: 
  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 23; used 66 times
sameq defined in line 40; used 4 times

Defined macros

IFF_DEBUG defined in line 52; never used
IFF_REMOTE defined in line 58; used 3 times
IFF_ROUTE defined in line 53; never used
IFF_UP defined in line 50; used 1 times
NIFADDR defined in line 22; never used

Usage of this include

Last modified: 1985-08-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1055
Valid CSS Valid XHTML 1.0 Strict