/* File IPXRIP.H : IPX Routing Information Protocol data structures */ /* Copyright (C) 1992 Indian Institute of Technology, Bombay Written by V. Srinivas and Vishwas Joglekar, Dept of Computer Science and Engineering. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define MAX_ROUTES 50 #define ROUTE_REQUEST 1 #define ROUTE_RESP 2 /* routing information */ typedef struct{ BYTE net_id[4]; WORD no_of_hops; WORD no_of_ticks; }RIP_INFO; typedef struct{ IPX_HEADER header; BYTE type[2]; /* rip pkt type */ RIP_INFO route_info[MAX_NETWORKS]; /* rip broadcast pkt */ }RIP_PKT; /* routing information table */ struct rip_table{ RIP_INFO route_info; int dev; /* interface no */ BYTE router_id[ETHER_ADDR_LEN]; /* node address of the forwarding router */ WORD net_status; WORD age_timer; struct rip_table *alternate_route; /* stores the alternate route to the same network if any, only the alternate routes with the same number of ticks are stored so as to minimize the size of the routing table */ struct rip_table *next; }; typedef struct rip_table ROUT_TABLE; struct my_route{ RIP_INFO route_info; BYTE router_id[6]; }; #define NULLRPTR (ROUT_TABLE *)0 #define NET_ID_LEN 4