NetSim Source Code Help
Loading...
Searching...
No Matches
OSPF_RoutingTable.h
Go to the documentation of this file.
1#pragma once
2/************************************************************************************
3* Copyright (C) 2020 *
4* TETCOS, Bangalore. India *
5* *
6* Tetcos owns the intellectual property rights in the Product and its content. *
7* The copying, redistribution, reselling or publication of any or all of the *
8* Product or its content without express prior written consent of Tetcos is *
9* prohibited. Ownership and / or any other right relating to the software and all *
10* intellectual property rights therein shall remain at all times with Tetcos. *
11* *
12* Author: Shashi Kant Suman *
13* *
14* ---------------------------------------------------------------------------------*/
15
16#ifndef _NETSIM_OSPF_ROUTINGTABLE_H_
17#define _NETSIM_OSPF_ROUTINGTABLE_H_
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22#define OSPF_LS_INFINITY 0xFFFFFF
23
24#ifndef ptrIP_ROUTINGTABLE
25#define ptrIP_ROUTINGTABLE void*
26#endif
27
29{
35};
36
37typedef enum
38{
44
45typedef enum
46{
52
53// A row struct for routing table
55{
59 char option;
64 void* LSOrigin;
72
74{
77};
78
79typedef enum
80{
84static char strOSPFVERTEXTYPE[][20] = { "VERTEX_ROUTER","VERTEX_NETWORK" };
85
86typedef struct
87{
91
92typedef struct
93{
100
101//OSPF Routing table
103 ptrOSPFROUTINGTABLEROW newRoute);
108 NETSIM_IPAddress destAddr,
109 OSPFDESTTYPE destType);
111 NETSIM_IPAddress destAddr,
112 OSPFDESTTYPE destType);
115
116#ifdef __cplusplus
117}
118#endif
119#endif //_NETSIM_OSPF_ROUTINGTABLE_H_
unsigned int NETSIM_ID
Definition: Animation.h:45
#define UINT
Definition: Linux.h:38
OSPFVERTEXTYPE
@ OSPFVERTEXTYPE_NETWORK
@ OSPFVERTEXTYPE_ROUTER
OSPFPATHTYPE
@ OSPFPATHTYPE_TYPE2_EXTERNAL
@ OSPFPATHTYPE_TYPE1_EXTERNAL
@ OSPFPATHTYPE_INTRA_AREA
@ OSPFPATHTYPE_INTER_AREA
void ospf_Table_updateIPTable_Dijkstra(ptrOSPF_PDS ospf, ptrOSPF_COST_LIST list)
struct ospf_routingTableRow * ptrOSPFROUTINGTABLEROW
struct OSPFNEXTHOPLISTITEM * ptrOSPFNEXTHOPLISTITEM
ptrOSPFROUTINGTABLEROW ospf_rtTable_getValidHostRoute(ptrOSPF_PDS ospf, NETSIM_IPAddress destAddr, OSPFDESTTYPE destType)
ptrOSPFROUTINGTABLEROW ospf_rtTable_getValidRoute(ptrOSPF_PDS ospf, NETSIM_IPAddress destAddr, OSPFDESTTYPE destType)
OSPFROUTEFLAG
@ OSPFROUTEFLAG_NEW
@ OSPFROUTEFLAG_INVALID
@ OSPFROUTEFLAG_NO_CHANGE
@ OSPFROUTEFLAG_CHANGED
void ospf_rtTable_addRoute(ptrOSPF_PDS ospf, ptrOSPFROUTINGTABLEROW newRoute)
struct OSPFVERTEX * ptrOSPFVERTEX
enum_ospf_dest_type
@ OSPFDESTTYPE_ABR_ASBR
@ OSPFDESTTYPE_ASBR
@ OSPFDESTTYPE_ROUTER
@ OSPFDESTTYPE_ABR
@ OSPFDESTTYPE_NETWORK
struct ospf_routingTableRow OSPFROUTINGTABLEROW
static char strOSPFVERTEXTYPE[][20]
void ospf_rtTable_updateIPTable(ptrOSPF_PDS ospf)
void ospf_rtTable_freeAllInvalidRoute(ptrOSPF_PDS ospf)
void ospf_rtTable_freeRoute(ptrOSPF_PDS ospf, ptrOSPFROUTINGTABLEROW row)
void * ptrOSPFLIST
Definition: OSPF_Typedef.h:50
enum enum_ospf_dest_type OSPFDESTTYPE
Definition: OSPF_Typedef.h:35
NETSIM_IPAddress nextHop
NETSIM_IPAddress vertexId
ptrOSPFLIST nextHopList
ptrOSPFLSAHDR lsa
OSPFVERTEXTYPE vertexType
NETSIM_IPAddress destAddr
NETSIM_IPAddress nextHop
NETSIM_IPAddress advertisingRouter
NETSIM_IPAddress addrMask
NETSIM_IPAddress outInterface
ptrOSPFROUTINGTABLEROW * rows