28#define RIP_PACKET_SIZE_WITH_HEADER 512
31#define EXPIRED_ROUTE 16
40 typedef struct stru_RIP_TempRouting_database RIP_TEMPROUTING_DATABASE;
42 typedef enum enum_RIP_command RIP_COMMAND;
43 typedef enum enum_RIP_Subevent_Type SUB_EVENT;
48 enum enum_RIP_Subevent_Type
50 SEND_RIP_UPDATE_PKT=APP_PROTOCOL_RIP*100+1,
52 RIP_GARBAGE_COLLECTION,
53 ROUTING_TABLE_UPDATION,
66 enum enum_RIP_ControlPacketType
68 RIP_Packet = APP_PROTOCOL_RIP*100+1,
144 int n_garbage_collection_timer;
145 unsigned int n_RIP_Version:8;
148 unsigned short int nStatus;
150 bool nStaticRoutingFlag;
156 int fn_NetSim_RIP_InitialTable_Creation(NETSIM_ID nDeviceId);
159 int fn_NetSim_RIP_UpdatingEntriesinRoutingDatabase(
struct stru_NetSim_Network *,
int,NETSIM_IPAddress,NETSIM_IPAddress,NETSIM_IPAddress,NETSIM_ID,
double,
unsigned int);
162 _declspec(dllexport)
int fn_NetSim_RIP_ReceivingOf_RIP_Message(
struct stru_NetSim_Network* ,NetSim_EVENTDETAILS* );
165 _declspec(dllexport)
int fn_NetSim_RIP_TriggeredUpdate(
struct stru_NetSim_Network *,NetSim_EVENTDETAILS *);
167 int fn_NetSim_RIP_Run_F();
175 _declspec(dllexport)
int fn_NetSim_RIP_Configure_F(
void** var);
178 _declspec (dllexport)
int fn_NetSim_RIP_Init(
struct stru_NetSim_Network *NETWORK_Formal,NetSim_EVENTDETAILS *pstruEventDetails_Formal,
char *pszAppPath_Formal,
char *pszWritePath_Formal,
int nVersion_Type,
void **fnPointer);
179 int fn_NetSim_RIP_Init_F(
struct stru_NetSim_Network * ,NetSim_EVENTDETAILS * ,
char * ,
char * ,
int ,
void **fnPointer);
181 _declspec (dllexport)
int fn_NetSim_RIP_Run();
183 _declspec(dllexport)
int fn_NetSim_RIP_Finish();
184 int fn_NetSim_RIP_Finish_F();
186 _declspec (dllexport)
char *fn_NetSim_RIP_Trace(
int nSubEvent);
187 char *fn_NetSim_RIP_Trace_F(
int nSubEvent);
189 _declspec(dllexport)
int fn_NetSim_RIP_FreePacket(NetSim_PACKET* );
190 int fn_NetSim_RIP_FreePacket_F(NetSim_PACKET* );
192 _declspec(dllexport)
int fn_NetSim_RIP_CopyPacket(NetSim_PACKET* ,NetSim_PACKET* );
193 int fn_NetSim_RIP_CopyPacket_F(NetSim_PACKET* ,NetSim_PACKET* );
195 _declspec(dllexport)
int fn_NetSim_RIP_Metrics(PMETRICSWRITER metricsWriter);
196 int fn_NetSim_RIP_Metrics_F(PMETRICSWRITER metricsWriter);
198 int fn_NetSim_RIP_DistanceVectorAlgorithm(
struct stru_NetSim_Network *NETWORK,NetSim_EVENTDETAILS *pstruEventDetails);
199 int fn_NetSim_RIP_Update_Timer(
struct stru_NetSim_Network *pstruNETWORK,NetSim_EVENTDETAILS *pstruEventDetails);
200 int fn_NetSim_RIP_Timeout_Timer(
struct stru_NetSim_Network *pstruNETWORK,NetSim_EVENTDETAILS *pstruEventDetails);
201 int fn_NetSim_RIP_Garbage_Collection_Timer(
struct stru_NetSim_Network *pstruNETWORK,NetSim_EVENTDETAILS *pstruEventDetails);
202 bool isRIPConfigured(NETSIM_ID d);
203 DEVICE_ROUTER* get_RIP_var(NETSIM_ID d);
204 void set_RIP_var(NETSIM_ID d, DEVICE_ROUTER* rip);
unsigned int nVersion
The version field is used to specify the RIP version (version 1 or 2)
unsigned int nMetric
Cost to reach the destination.
unsigned int nAddress_family_identifier
This is used to identify the Address family of the IP address.
NETSIM_IPAddress szSubnet_Mask
Destination Subnet Mask.
NETSIM_IPAddress szIPv4_address
Destination IPv4 address.
NETSIM_IPAddress szNext_Hop
char * pszFilePath
Stores File path.
int n_Update_timer
These variable values are get from configuration.xml,in RFC the update timer is mentioned as 30-secon...
unsigned int nRIP_Update
Used to check the updates in the router.
int nDataDropped
Used to store the dropped packets.
char * pszFileName
Stores File Name.
Routing database structure Reference : RFC 2453, November 1998, Page 8.
NETSIM_ID nInterface
The physical network which must be used to reach the first router.
double dTimer
The amount of time since the entry was last updated.
unsigned int nMetric
Distance to the destination.
NETSIM_IPAddress szRouter
The first router along the route to the destination.
NETSIM_IPAddress szAddress
IP address of the destination host or destination network.
NETSIM_IPAddress szSubnetmask
Subnet mask for the destination network.