NetSim Source Code Help
Loading...
Searching...
No Matches
OSPF_Neighbor.c File Reference
#include "main.h"
#include "OSPF.h"
#include "OSPF_Msg.h"
#include "OSPF_Neighbor.h"
#include "OSPF_Enum.h"
#include "OSPF_Interface.h"
#include "OSPF_List.h"
Include dependency graph for OSPF_Neighbor.c:

Go to the source code of this file.

Macros

#define is_neighbor_DR(ospf, neigh)   (!OSPFID_COMPARE(ospf->designaterRouter,neigh->neighborId))
 
#define is_neighbor_backupDR(ospf, neigh)   (!OSPFID_COMPARE(ospf->backupDesignaterRouter,neigh->neighborId))
 

Functions

static void ospf_neighbor_attempt_adjacency (ptrOSPF_NEIGHBOR neigh)
 
static void ospf_neighbor_change_state (ptrOSPF_NEIGHBOR neigh, OSPFNEIGHSTATE state)
 
ptrOSPF_NEIGHBOR OSPF_NEIGHBOR_FIND (ptrOSPF_IF ospf, OSPFID id)
 
ptrOSPF_NEIGHBOR OSPF_NEIGHBOR_FIND_BY_IP (ptrOSPF_IF thisInterface, NETSIM_IPAddress ip)
 
ptrOSPF_NEIGHBOR ospf_neighbor_new (NETSIM_IPAddress ip, OSPFID rid)
 
void ospf_neighbor_add (ptrOSPF_IF ospf, ptrOSPF_NEIGHBOR neigh)
 
void ospf_neighbor_remove (ptrOSPF_PDS ospf, ptrOSPF_IF thisInterface, ptrOSPF_NEIGHBOR neigh)
 
void ospf_neighbor_handle_1way_event ()
 
static bool is_adjacency_should_established (ptrOSPF_IF ospf, ptrOSPF_NEIGHBOR neigh)
 
static void ospf_handle_2wayReceived_event_in_init_state (ptrOSPF_IF ospf, ptrOSPF_NEIGHBOR neigh)
 
void ospf_neighbor_handle_2wayReceived_event ()
 
void ospf_neighbor_handle_helloReceived_event ()
 
static void ospf_neighbor_addToRxtList (ptrOSPF_PDS ospf, ptrOSPF_IF thisInterface, ptrOSPF_NEIGHBOR neigh, ptrOSPFLSAHDR lsa)
 
static void ospf_neighbor_update_DBSummaryList (ptrOSPF_PDS ospf, ptrOSPF_IF thisInterface, ptrOSPF_NEIGHBOR neigh, ptrOSPFLIST list)
 
static void ospf_neighbor_create_DBSummaryList (ptrOSPF_PDS pds, ptrOSPF_IF ospf, ptrOSPF_NEIGHBOR neigh)
 
void ospf_neighbor_handle_negotiationDone_event ()
 
void ospf_neighbor_handle_exchangeDone_event ()
 
void ospf_neighbor_handle_start_event ()
 
static void restart_inactivity_timer (ptrOSPF_IF ospf, ptrOSPF_NEIGHBOR neigh)
 
void ospf_neighbor_handle_inactivityTimer_event ()
 
bool ospf_is_router_fullAdjacentWithDR (ptrOSPF_IF ospf)
 
bool ospf_is_dr_router_fulladjacentwithAnother (ptrOSPF_IF ospf)
 
bool ospf_neighbor_isAnyNeighborInExchangeOrLoadingState (ptrOSPF_PDS ospf)
 
ptrOSPFLSAHDR ospf_neighbor_searchSendList (ptrOSPFLIST list, ptrOSPFLSAHDR lsa)
 
void ospf_neighbor_insertToSendList (ptrOSPFLIST list, ptrOSPFLSAHDR lsa, double time)
 
NETSIM_ID ospf_neighbor_getInterfaceIdforThisNeighbor (ptrOSPF_PDS ospf, NETSIM_IPAddress neighIPaddr)
 
void ospf_neighbor_handle_LoadingDoneEvent ()
 
void ospf_neighbor_handle_KillNbrEvent ()
 

Macro Definition Documentation

◆ is_neighbor_backupDR

#define is_neighbor_backupDR (   ospf,
  neigh 
)    (!OSPFID_COMPARE(ospf->backupDesignaterRouter,neigh->neighborId))

Definition at line 23 of file OSPF_Neighbor.c.

◆ is_neighbor_DR

#define is_neighbor_DR (   ospf,
  neigh 
)    (!OSPFID_COMPARE(ospf->designaterRouter,neigh->neighborId))

Definition at line 22 of file OSPF_Neighbor.c.

Function Documentation

◆ is_adjacency_should_established()

static bool is_adjacency_should_established ( ptrOSPF_IF  ospf,
ptrOSPF_NEIGHBOR  neigh 
)
static

Definition at line 199 of file OSPF_Neighbor.c.

Here is the caller graph for this function:

◆ ospf_handle_2wayReceived_event_in_init_state()

static void ospf_handle_2wayReceived_event_in_init_state ( ptrOSPF_IF  ospf,
ptrOSPF_NEIGHBOR  neigh 
)
static

Definition at line 222 of file OSPF_Neighbor.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ospf_is_dr_router_fulladjacentwithAnother()

bool ospf_is_dr_router_fulladjacentwithAnother ( ptrOSPF_IF  ospf)

Definition at line 509 of file OSPF_Neighbor.c.

Here is the caller graph for this function:

◆ ospf_is_router_fullAdjacentWithDR()

bool ospf_is_router_fullAdjacentWithDR ( ptrOSPF_IF  ospf)

Definition at line 496 of file OSPF_Neighbor.c.

Here is the caller graph for this function:

◆ ospf_neighbor_add()

void ospf_neighbor_add ( ptrOSPF_IF  ospf,
ptrOSPF_NEIGHBOR  neigh 
)

Definition at line 137 of file OSPF_Neighbor.c.

Here is the caller graph for this function:

◆ ospf_neighbor_addToRxtList()

static void ospf_neighbor_addToRxtList ( ptrOSPF_PDS  ospf,
ptrOSPF_IF  thisInterface,
ptrOSPF_NEIGHBOR  neigh,
ptrOSPFLSAHDR  lsa 
)
static

Definition at line 293 of file OSPF_Neighbor.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ospf_neighbor_attempt_adjacency()

static void ospf_neighbor_attempt_adjacency ( ptrOSPF_NEIGHBOR  neigh)
static

Definition at line 25 of file OSPF_Neighbor.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ospf_neighbor_change_state()

static void ospf_neighbor_change_state ( ptrOSPF_NEIGHBOR  neigh,
OSPFNEIGHSTATE  state 
)
static

Definition at line 43 of file OSPF_Neighbor.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ospf_neighbor_create_DBSummaryList()

static void ospf_neighbor_create_DBSummaryList ( ptrOSPF_PDS  pds,
ptrOSPF_IF  ospf,
ptrOSPF_NEIGHBOR  neigh 
)
static

Definition at line 347 of file OSPF_Neighbor.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OSPF_NEIGHBOR_FIND()

ptrOSPF_NEIGHBOR OSPF_NEIGHBOR_FIND ( ptrOSPF_IF  ospf,
OSPFID  id 
)

Definition at line 93 of file OSPF_Neighbor.c.

Here is the caller graph for this function:

◆ OSPF_NEIGHBOR_FIND_BY_IP()

ptrOSPF_NEIGHBOR OSPF_NEIGHBOR_FIND_BY_IP ( ptrOSPF_IF  thisInterface,
NETSIM_IPAddress  ip 
)

Definition at line 106 of file OSPF_Neighbor.c.

Here is the caller graph for this function:

◆ ospf_neighbor_getInterfaceIdforThisNeighbor()

NETSIM_ID ospf_neighbor_getInterfaceIdforThisNeighbor ( ptrOSPF_PDS  ospf,
NETSIM_IPAddress  neighIPaddr 
)

Definition at line 567 of file OSPF_Neighbor.c.

Here is the caller graph for this function:

◆ ospf_neighbor_handle_1way_event()

void ospf_neighbor_handle_1way_event ( )

Definition at line 182 of file OSPF_Neighbor.c.

Here is the call graph for this function:

◆ ospf_neighbor_handle_2wayReceived_event()

void ospf_neighbor_handle_2wayReceived_event ( )

Definition at line 240 of file OSPF_Neighbor.c.

Here is the call graph for this function:

◆ ospf_neighbor_handle_exchangeDone_event()

void ospf_neighbor_handle_exchangeDone_event ( )

Definition at line 381 of file OSPF_Neighbor.c.

Here is the call graph for this function:

◆ ospf_neighbor_handle_helloReceived_event()

void ospf_neighbor_handle_helloReceived_event ( )

Definition at line 257 of file OSPF_Neighbor.c.

Here is the call graph for this function:

◆ ospf_neighbor_handle_inactivityTimer_event()

void ospf_neighbor_handle_inactivityTimer_event ( )

Definition at line 439 of file OSPF_Neighbor.c.

Here is the call graph for this function:

◆ ospf_neighbor_handle_KillNbrEvent()

void ospf_neighbor_handle_KillNbrEvent ( )

Definition at line 601 of file OSPF_Neighbor.c.

Here is the call graph for this function:

◆ ospf_neighbor_handle_LoadingDoneEvent()

void ospf_neighbor_handle_LoadingDoneEvent ( )

Definition at line 586 of file OSPF_Neighbor.c.

Here is the call graph for this function:

◆ ospf_neighbor_handle_negotiationDone_event()

void ospf_neighbor_handle_negotiationDone_event ( )

Definition at line 358 of file OSPF_Neighbor.c.

Here is the call graph for this function:

◆ ospf_neighbor_handle_start_event()

void ospf_neighbor_handle_start_event ( )

Definition at line 415 of file OSPF_Neighbor.c.

◆ ospf_neighbor_insertToSendList()

void ospf_neighbor_insertToSendList ( ptrOSPFLIST  list,
ptrOSPFLSAHDR  lsa,
double  time 
)

Definition at line 558 of file OSPF_Neighbor.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ospf_neighbor_isAnyNeighborInExchangeOrLoadingState()

bool ospf_neighbor_isAnyNeighborInExchangeOrLoadingState ( ptrOSPF_PDS  ospf)

Definition at line 521 of file OSPF_Neighbor.c.

Here is the caller graph for this function:

◆ ospf_neighbor_new()

ptrOSPF_NEIGHBOR ospf_neighbor_new ( NETSIM_IPAddress  ip,
OSPFID  rid 
)

Definition at line 118 of file OSPF_Neighbor.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ospf_neighbor_remove()

void ospf_neighbor_remove ( ptrOSPF_PDS  ospf,
ptrOSPF_IF  thisInterface,
ptrOSPF_NEIGHBOR  neigh 
)

Definition at line 148 of file OSPF_Neighbor.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ospf_neighbor_searchSendList()

ptrOSPFLSAHDR ospf_neighbor_searchSendList ( ptrOSPFLIST  list,
ptrOSPFLSAHDR  lsa 
)

Definition at line 539 of file OSPF_Neighbor.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ospf_neighbor_update_DBSummaryList()

static void ospf_neighbor_update_DBSummaryList ( ptrOSPF_PDS  ospf,
ptrOSPF_IF  thisInterface,
ptrOSPF_NEIGHBOR  neigh,
ptrOSPFLIST  list 
)
static

Definition at line 322 of file OSPF_Neighbor.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ restart_inactivity_timer()

static void restart_inactivity_timer ( ptrOSPF_IF  ospf,
ptrOSPF_NEIGHBOR  neigh 
)
static

Definition at line 421 of file OSPF_Neighbor.c.

Here is the call graph for this function:
Here is the caller graph for this function: