NetSim Source Code Help v14.4
All 13 Components
 
Loading...
Searching...
No Matches
Routing.h
1/************************************************************************************
2* Copyright (C) 2023 *
3* TETCOS, Bangalore. India *
4* *
5* Tetcos owns the intellectual property rights in the Product and its content. *
6* The copying, redistribution, reselling or publication of any or all of the *
7* Product or its content without express prior written consent of Tetcos is *
8* prohibited. Ownership and / or any other right relating to the software and all *
9* intellectual property rights therein shall remain at all times with Tetcos. *
10* *
11* Author: Thangarasu *
12* *
13* ---------------------------------------------------------------------------------*/
14#ifndef _ROUTING_H_
15#define _ROUTING_H_
16#ifdef __cplusplus
17extern "C" {
18#endif
19#include "RIP.h"
20typedef struct stru_ROUTINGTABLES ROUTING_TABLES;
21int (*fnRouter[10])();
22/** Structure for NetSim Router */
24{
26 {
27 struct stru_RIP struRIP; //RIP
28 }uniInteriorRouting;
29 ROUTING_TABLES *pstruRoutingTables;
30 APPLICATION_LAYER_PROTOCOL AppIntRoutingProtocol;
31 APPLICATION_LAYER_PROTOCOL AppExtRoutingProtocol;
32 APPLICATION_LAYER_PROTOCOL *RoutingProtocol;
33 ptrSOCKETINTERFACE sock;
34};
35/** Structure for router buffer */
37{
38 NetSim_BUFFER *pstruBuffer;
39};
40/** Structure to store Routing Tables*/
42{
43 RIP_ROUTING_DATABASE *pstruRIP_RoutingTable;
44};
45
46_declspec(dllexport)int fn_NetSim_UpdateEntryinRoutingTable(struct stru_NetSim_Network *NETWORK,NetSim_EVENTDETAILS *pstruEventDetails,NETSIM_ID nDeviceId,NETSIM_ID nInterfaceId,unsigned int bgpRemoteAS,NETSIM_IPAddress szDestinationIP,NETSIM_IPAddress szNexthop,NETSIM_IPAddress szSubnetmask,unsigned int prefix_len,int nCost,int nFlag);
47_declspec(dllexport)int UpdateInterfaceList();
48int fnCheckRoutingPacket();
49APPLICATION_LAYER_PROTOCOL fnCheckRoutingProtocol(NETSIM_ID deviceId);
50
51#ifdef __cplusplus
52}
53#endif
54#endif