NetSim Source Code Help v14.4
All 13 Components
 
Loading...
Searching...
No Matches
OSPF_Neighbor.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_NEIGHBOR_H_
17#define _NETSIM_OSPF_NEIGHBOR_H_
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22 enum enum_ospf_neighbor_state
23 {
24 OSPFNEIGHSTATE_DOWN,
25 OSPFNEIGHSTATE_Init,
26 OSPFNEIGHSTATE_Attempt,
27 OSPFNEIGHSTATE_ExStart,
28 OSPFNEIGHSTATE_2Way,
29 OSPFNEIGHSTATE_Exchange,
30 OSPFNEIGHSTATE_Full,
31 OSPFNEIGHSTATE_Loading,
32 };
33 static char strNeighborState[][50] = { "DOWN",
34 "Init",
35 "Attempt",
36 "ExStart",
37 "2-Way",
38 "Exchange",
39 "Full",
40 "Loading" };
41
43 {
44 NETSIM_ID devId;
45 NETSIM_ID devInterface;
46
47 OSPFNEIGHSTATE state;
48
49 bool isInactivityTimerAdded;
50 UINT64 inactivityTimerId;
51
52 bool isMaster;
53 UINT DDSeqNo;
54 ptrOSPFPACKETHDR lastrecvDDPacket;
55 ptrOSPFPACKETHDR lastSentDDPacket;
56 OSPFID neighborId;
57 UINT8 neighborPriority;
58 NETSIM_IPAddress neighborIPAddr;
59 UINT8 neighborOption;
60 UINT8 IMMS;
61 OSPFID neighborDesignateRouter;
62 OSPFID neighborDesignateBackupRouter;
63 double lastDDMsgSentTime;
64
65 ptrOSPFLIST neighLSReqList; // Link state request list
66 ptrOSPFLIST neighDBSummaryList; // Database summary list
67 ptrOSPFLIST neighLSRxtList; // Link state retransmission list
68 ptrOSPFLIST linkStateSendList;
69 bool LSRxtTimer;
70 UINT LSRxtSeqNum;
71 UINT LSReqTimerSequenceNumber;
72 double lastHelloRecvTime;
73 };
74
76 {
77 NETSIM_IPAddress neighborIP;
78 UINT rxmtSeqNum;
79 OSPFID advertisingRouter;
80 OSPFMSG msgType;
81 }LSRXTTIMERDETAILS, *ptrLSRXTTIMERDETAILS;
82
83#ifdef __cplusplus
84}
85#endif
86#endif //_NETSIM_OSPF_NEIGHBOR_H_