typedef struct _vif { int vif_vdld; /* link number the interface is connected to */ int vif_vdlno; /* Interface number */ int vif_hwaddr; /* Physical address */ fun_ptr *vdl_prototab; /* array of pointers to functions*/ * used as call-back functions */ char **varp_fifo; /* contains the fifo file name * associated to the communication with the varp module */ char **vip_fifo; char **vrip_fifo; in_addr_t vif_ifaddr; /* Ip address of the interface */ in_addr_t vif_ifmask; /* Network mask */ in_addr_t vif_bcaddr; /* Broadcast address */ unsigned int vif_flags; /* flags ( interface status ) */ } vif;
typedef struct _varp_entry { int varp_linkid; int varp_hwaddr; in_addr_t varp_addr; int age; unsigned int varp_flags ; } varp_entry;
typedef struct _varp_packet { int varp_type; /*message type */ int varp_link; /* linkk ID */ int varp_phw; /* hardware address */ in_addr_t varp_ip; /* IP address */ in_addr_t varp_src_ip; /* sender IP address */ int varp_src_hwaddr; /* sender hw address */ } varp_packet;
typedef struct _vrip_entry { in_addr_t dest_ip; in_addr_t dest_gw; int metric; int update_c; char id[20]; } vrip_entry;
typedef struct _vrip_packet { int command; in_addr_t dest_ip; in_addr_t dest_gw; int metric; } vrip_packet;
typedef struct _viphdr { in_addr_t vipdst; in_addr_t vipsrc; in_addr_t vip_nexthop; /* Next gateway in the path. * this parameter is setup by * the routing algorothm */ uint8_t vipttl; uint8_t vipproto; int payload_sz; /* payload size */ } viphdr; typedef struct _vip_pkt { viphdr hdr; /* the IP packet header */ char payload[200]; } vip_pkt;