NetSim Source Code Help v14.4
All 13 Components
 
Loading...
Searching...
No Matches
OSPF_Interface.h
1#pragma once
2/************************************************************************************
3* Copyright (C) 2023 *
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_INTERFACE_H_
17#define _NETSIM_OSPF_INTERFACE_H_
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22 typedef enum enum_ospf_if_type
23 {
24 OSPFIFTYPE_P2P,
25 OSPFIFTYPE_BROADCAST,
26 OSPFIFTYPE_NBMA,
27 OSPFIFTYPE_P2MP,
28 OSPFIFTYPE_VIRTUALLINK,
29 }OSPFIFTYPE;
30 static char strOSPFIFTYPE[][50] = { "POINT_TO_POINT","BROADCAST",
31 "NBMA","POINT_TO_MULTIPOINT","VITUALLINK" };
32
33 enum enum_if_state
34 {
35 OSPFIFSTATE_DOWN,
36 OSPFIFSTATE_LOOPBACK,
37 OSPFIFSTATE_WAITING,
38 OSPFIFSTATE_P2P,
39 OSPFIFSTATE_DROther,
40 OSPFIFSTATE_BACKUP,
41 OSPFIFSTATE_DR,
42 };
43 static char strOSPFIFSTATE[][50] = { "DOWN",
44 "LoopBack",
45 "Waiting",
46 "P2P",
47 "DR-Other",
48 "BackUp",
49 "DR" };
50
52 {
53 char* name;
54 NETSIM_ID configId;
55 NETSIM_ID id;
56 bool includeSubnetRts;
57
58 OSPFIFTYPE Type;
59 OSPFIFSTATE State;
60 NETSIM_IPAddress IPIfAddr;
61 NETSIM_IPAddress IPIfMask;
62 OSPFID areaId;
63 OSPFTIME helloInterval;
64 OSPFTIME routerDeadInterval;
65 OSPFTIME InfTransDelay;
66 UINT8 RouterPriority;
67 OSPFTIME waitTimer;
68 UINT neighborRouterCount;
69 ptrOSPF_NEIGHBOR* neighborRouterList;
70
71 OSPFID designaterRouter;
72 NETSIM_IPAddress designaterRouterAddr;
73
74 OSPFID backupDesignaterRouter;
75 NETSIM_IPAddress backupDesignaterRouterAddr;
76
77 UINT16 interfaceOutputCost;
78 OSPFTIME RxmtInterval;
79 UINT auType;
80 UINT auKey;
81 bool extRoutingCapability;
82 double lastFloodTimer;
83 bool isFloodTimerSet;
84 ptrOSPFLIST updateLSAList;
85 bool networkLSTimer;
86 UINT networkLSTimerSeqNumber;
87 double networkLSAOriginateTime;
88
89 //Delayed Ack
90 bool delayedAckTimer;
91 ptrOSPFLIST delayedAckList;
92 };
93
94 void ospf_interface_init(ptrOSPF_PDS ospf, ptrOSPF_IF thisInterface);
95 OSPFIFTYPE OSPFIFTYPE_FROM_STR(char* val);
96
97#ifdef __cplusplus
98}
99#endif
100#endif //_NETSIM_OSPF_NEIGHBOR_H_