1 1.1 brezak /* 2 1.1 brezak * The mrouted program is covered by the license in the accompanying file 3 1.1 brezak * named "LICENSE". Use of the mrouted program represents acceptance of 4 1.1 brezak * the terms and conditions listed in that file. 5 1.1 brezak * 6 1.1 brezak * The mrouted program is COPYRIGHT 1989 by The Board of Trustees of 7 1.1 brezak * Leland Stanford Junior University. 8 1.1 brezak * 9 1.1 brezak * 10 1.1 brezak * $Id: vif.h,v 1.1 1994/01/11 20:16:06 brezak Exp $ 11 1.1 brezak */ 12 1.1 brezak 13 1.1 brezak /* 14 1.1 brezak * User level Virtual Interface structure 15 1.1 brezak * 16 1.1 brezak * A "virtual interface" is either a physical, multicast-capable interface 17 1.1 brezak * (called a "phyint") or a virtual point-to-point link (called a "tunnel"). 18 1.1 brezak * (Note: all addresses, subnet numbers and masks are kept in NETWORK order.) 19 1.1 brezak */ 20 1.1 brezak struct uvif { 21 1.1 brezak u_short uv_flags; /* VIFF_ flags defined below */ 22 1.1 brezak u_char uv_metric; /* cost of this vif */ 23 1.1 brezak u_char uv_threshold; /* min ttl required to forward on vif */ 24 1.1 brezak u_long uv_lcl_addr; /* local address of this vif */ 25 1.1 brezak u_long uv_rmt_addr; /* remote end-point addr (tunnels only) */ 26 1.1 brezak u_long uv_subnet; /* subnet number (phyints only) */ 27 1.1 brezak u_long uv_subnetmask; /* subnet mask (phyints only) */ 28 1.1 brezak u_long uv_subnetbcast;/* subnet broadcast addr (phyints only) */ 29 1.1 brezak char uv_name[IFNAMSIZ]; /* interface name */ 30 1.1 brezak struct listaddr *uv_groups; /* list of local groups (phyints only) */ 31 1.1 brezak struct listaddr *uv_neighbors; /* list of neighboring routers */ 32 1.1 brezak }; 33 1.1 brezak 34 1.1 brezak #define VIFF_KERNEL_FLAGS (VIFF_TUNNEL|VIFF_SRCRT) 35 1.1 brezak #define VIFF_DOWN 0x0100 /* kernel state of interface */ 36 1.1 brezak #define VIFF_DISABLED 0x0200 /* administratively disabled */ 37 1.1 brezak #define VIFF_QUERIER 0x0400 /* I am the subnet's querier */ 38 1.1 brezak 39 1.1 brezak 40 1.1 brezak struct listaddr { 41 1.1 brezak struct listaddr *al_next; /* link to next addr, MUST BE FIRST */ 42 1.1 brezak u_long al_addr; /* local group or neighbor address */ 43 1.1 brezak u_long al_timer; /* for timing out group or neighbor */ 44 1.1 brezak }; 45 1.1 brezak 46 1.1 brezak 47 1.1 brezak #define NO_VIF ((vifi_t)MAXVIFS) /* An invalid vif index */ 48