NetSim Source Code Help
Loading...
Searching...
No Matches
PIM_SM.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  stru_pim_neighbor_state
 
struct  stru_pim_state
 
struct  stru_pim_state::stru_DR_state
 
struct  stru_pim_JP_state
 
struct  stru_pim_neighbor
 
struct  stru_pim_group
 
struct  stru_pim_var
 

Macros

#define _NETSIM_PIM_SM_H_
 
#define time_interval   UINT16
 
#define Propagation_delay_default   500
 
#define t_override_default   2500
 
#define PIM_HELLO_PERIOD_DEFAULT   30
 
#define PIM_TRIGGERED_HELLO_DELAY_DEFAULT   5
 
#define PIM_DR_PRIORITY_DEFAULT   1
 
#define PIM_PROPAGATION_DELAY_DEFAULT   Propagation_delay_default
 
#define PIM_OVERRIDE_INTERVAL_DEFAULT   t_override_default
 
#define PIM_T_PERIODIC_DEFAULT   60
 
#define PIM_STATE_ALLOC()   (ptrPIM_STATE)list_alloc(sizeof(PIM_STATE),offsetof(PIM_STATE,ele))
 
#define PIM_STATE_NEXT(state)   state = (ptrPIM_STATE)LIST_NEXT(state)
 
#define PIM_STATE_ADD(l, m)   LIST_ADD_LAST((void**)l,m)
 
#define PIM_NEIGHBOR_ALLOC()   (ptrPIM_NEIGHBOR)list_alloc(sizeof(PIM_NEIGHBOR),offsetof(PIM_NEIGHBOR,ele))
 
#define PIM_NEIGHBOR_NEXT(neigh)   neigh = (ptrPIM_NEIGHBOR)LIST_NEXT(neigh)
 
#define PIM_NEIGHBOR_ADD(l, m)   LIST_ADD_LAST((void**)l,m)
 
#define PIM_GROUP_ALLOC()   (ptrPIM_GROUP)list_alloc(sizeof(PIM_GROUP),offsetof(PIM_GROUP,ele))
 
#define PIM_GROUP_NEXT(gr)   gr = (ptrPIM_GROUP)LIST_NEXT(gr)
 
#define PIM_GROUP_ADD(l, m)   LIST_ADD_LAST((void**)l,m)
 
#define GET_PIM_VAR(d)   ((ptrPIM_VAR)(GET_IP_DEVVAR(d)->pim))
 
#define SET_PIM_VAR(d, var)   (GET_IP_DEVVAR(d)->pim = (void*)var)
 

Typedefs

typedef struct stru_pim_neighbor_state PIM_NEIGH_STATE
 
typedef struct stru_pim_neighbor_stateptrPIM_NEIGH_STATE
 
typedef struct stru_pim_state PIM_STATE
 
typedef struct stru_pim_stateptrPIM_STATE
 
typedef struct stru_pim_JP_state PIM_JP_STATE
 
typedef struct stru_pim_JP_stateptrPIM_JP_STATE
 
typedef struct stru_pim_neighbor PIM_NEIGHBOR
 
typedef struct stru_pim_neighborptrPIM_NEIGHBOR
 
typedef struct stru_pim_group PIM_GROUP
 
typedef struct stru_pim_groupptrPIM_GROUP
 
typedef struct stru_pim_var PIM_VAR
 
typedef struct stru_pim_varptrPIM_VAR
 

Enumerations

enum  EN_DIS { DISABLE , ENABLE }
 
enum  LMS { LMS_NoInfo , LMS_Include , LMS_Exclude }
 
enum  JPS {
  JPS_NI , JPS_J , JPS_PP , JPS_P ,
  JPS_JP
}
 
enum  AWS { AWS_NI , AWS_L , AWS_W }
 
enum  UJPS { UJPS_NotJoined , UJPS_Joined , UJPS_NotPruned , UJPS_Pruned }
 

Functions

void pim_add_timeout_event (NETSIM_ID d, double time, IP_SUBEVENT eve, NETSIM_IPAddress groupAddress)
 
void configure_PIM ()
 
void pim_route_add (NETSIM_ID d, NETSIM_ID i, UINT metric, NETSIM_IPAddress dest)
 
NETSIM_IPAddress pimroute_find_nexthop (NETSIM_ID d, NETSIM_IPAddress dest)
 
int pim_route_msg ()
 
ptrPIM_NEIGHBOR find_neighbor (NETSIM_ID d, NETSIM_IPAddress ip)
 
ptrPIM_NEIGHBOR create_and_add_neighbor (NETSIM_ID d, NETSIM_ID ifId, NETSIM_IPAddress address)
 
void elect_DR (NETSIM_ID d, NETSIM_ID ifid)
 
ptrPIM_GROUP create_group (NETSIM_ID d, NETSIM_IPAddress addr, NETSIM_IPAddress RP)
 
ptrPIM_GROUP pim_find_group (NETSIM_ID d, NETSIM_IPAddress addr)
 
void pim_add_interface_to_group (NETSIM_ID d, NETSIM_ID i, ptrPIM_GROUP g)
 
void send_hello_msg (NETSIM_ID d, double time)
 
bool process_pim_hello_packet ()
 
void pim_send_joinprune (NETSIM_ID d, double time, ptrPIM_GROUP group)
 
bool pim_process_join ()
 
void print_pim_sm_log (char *format,...)
 
void print_RPT_Tree (NETSIM_ID rp, ptrPIM_GROUP group)
 

Variables

NETSIM_IPAddress ALL_PIM_ROUTERS_ADDRESS
 

Macro Definition Documentation

◆ _NETSIM_PIM_SM_H_

#define _NETSIM_PIM_SM_H_

Definition at line 28 of file PIM_SM.h.

◆ GET_PIM_VAR

#define GET_PIM_VAR (   d)    ((ptrPIM_VAR)(GET_IP_DEVVAR(d)->pim))

Definition at line 226 of file PIM_SM.h.

◆ PIM_DR_PRIORITY_DEFAULT

#define PIM_DR_PRIORITY_DEFAULT   1

Definition at line 42 of file PIM_SM.h.

◆ PIM_GROUP_ADD

#define PIM_GROUP_ADD (   l,
 
)    LIST_ADD_LAST((void**)l,m)

Definition at line 200 of file PIM_SM.h.

◆ PIM_GROUP_ALLOC

#define PIM_GROUP_ALLOC ( )    (ptrPIM_GROUP)list_alloc(sizeof(PIM_GROUP),offsetof(PIM_GROUP,ele))

Definition at line 198 of file PIM_SM.h.

◆ PIM_GROUP_NEXT

#define PIM_GROUP_NEXT (   gr)    gr = (ptrPIM_GROUP)LIST_NEXT(gr)

Definition at line 199 of file PIM_SM.h.

◆ PIM_HELLO_PERIOD_DEFAULT

#define PIM_HELLO_PERIOD_DEFAULT   30

Definition at line 40 of file PIM_SM.h.

◆ PIM_NEIGHBOR_ADD

#define PIM_NEIGHBOR_ADD (   l,
 
)    LIST_ADD_LAST((void**)l,m)

Definition at line 180 of file PIM_SM.h.

◆ PIM_NEIGHBOR_ALLOC

#define PIM_NEIGHBOR_ALLOC ( )    (ptrPIM_NEIGHBOR)list_alloc(sizeof(PIM_NEIGHBOR),offsetof(PIM_NEIGHBOR,ele))

Definition at line 178 of file PIM_SM.h.

◆ PIM_NEIGHBOR_NEXT

#define PIM_NEIGHBOR_NEXT (   neigh)    neigh = (ptrPIM_NEIGHBOR)LIST_NEXT(neigh)

Definition at line 179 of file PIM_SM.h.

◆ PIM_OVERRIDE_INTERVAL_DEFAULT

#define PIM_OVERRIDE_INTERVAL_DEFAULT   t_override_default

Definition at line 44 of file PIM_SM.h.

◆ PIM_PROPAGATION_DELAY_DEFAULT

#define PIM_PROPAGATION_DELAY_DEFAULT   Propagation_delay_default

Definition at line 43 of file PIM_SM.h.

◆ PIM_STATE_ADD

#define PIM_STATE_ADD (   l,
 
)    LIST_ADD_LAST((void**)l,m)

Definition at line 148 of file PIM_SM.h.

◆ PIM_STATE_ALLOC

#define PIM_STATE_ALLOC ( )    (ptrPIM_STATE)list_alloc(sizeof(PIM_STATE),offsetof(PIM_STATE,ele))

Definition at line 146 of file PIM_SM.h.

◆ PIM_STATE_NEXT

#define PIM_STATE_NEXT (   state)    state = (ptrPIM_STATE)LIST_NEXT(state)

Definition at line 147 of file PIM_SM.h.

◆ PIM_T_PERIODIC_DEFAULT

#define PIM_T_PERIODIC_DEFAULT   60

Definition at line 45 of file PIM_SM.h.

◆ PIM_TRIGGERED_HELLO_DELAY_DEFAULT

#define PIM_TRIGGERED_HELLO_DELAY_DEFAULT   5

Definition at line 41 of file PIM_SM.h.

◆ Propagation_delay_default

#define Propagation_delay_default   500

Definition at line 36 of file PIM_SM.h.

◆ SET_PIM_VAR

#define SET_PIM_VAR (   d,
  var 
)    (GET_IP_DEVVAR(d)->pim = (void*)var)

Definition at line 227 of file PIM_SM.h.

◆ t_override_default

#define t_override_default   2500

Definition at line 37 of file PIM_SM.h.

◆ time_interval

#define time_interval   UINT16

Definition at line 35 of file PIM_SM.h.

Typedef Documentation

◆ PIM_GROUP

typedef struct stru_pim_group PIM_GROUP

◆ PIM_JP_STATE

◆ PIM_NEIGH_STATE

◆ PIM_NEIGHBOR

◆ PIM_STATE

typedef struct stru_pim_state PIM_STATE

◆ PIM_VAR

typedef struct stru_pim_var PIM_VAR

◆ ptrPIM_GROUP

typedef struct stru_pim_group * ptrPIM_GROUP

◆ ptrPIM_JP_STATE

◆ ptrPIM_NEIGH_STATE

◆ ptrPIM_NEIGHBOR

◆ ptrPIM_STATE

typedef struct stru_pim_state* ptrPIM_STATE

◆ ptrPIM_VAR

typedef struct stru_pim_var * ptrPIM_VAR

Enumeration Type Documentation

◆ AWS

enum AWS
Enumerator
AWS_NI 
AWS_L 
AWS_W 

Definition at line 72 of file PIM_SM.h.

◆ EN_DIS

enum EN_DIS
Enumerator
DISABLE 
ENABLE 

Definition at line 50 of file PIM_SM.h.

◆ JPS

enum JPS
Enumerator
JPS_NI 
JPS_J 
JPS_PP 
JPS_P 
JPS_JP 

Definition at line 63 of file PIM_SM.h.

◆ LMS

enum LMS
Enumerator
LMS_NoInfo 
LMS_Include 
LMS_Exclude 

Definition at line 56 of file PIM_SM.h.

◆ UJPS

enum UJPS
Enumerator
UJPS_NotJoined 
UJPS_Joined 
UJPS_NotPruned 
UJPS_Pruned 

Definition at line 79 of file PIM_SM.h.

Function Documentation

◆ configure_PIM()

void configure_PIM ( )

Definition at line 34 of file PIM_Config.c.

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

◆ create_and_add_neighbor()

ptrPIM_NEIGHBOR create_and_add_neighbor ( NETSIM_ID  d,
NETSIM_ID  ifId,
NETSIM_IPAddress  address 
)

Definition at line 46 of file PIM_Neighbor.c.

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

◆ create_group()

ptrPIM_GROUP create_group ( NETSIM_ID  d,
NETSIM_IPAddress  addr,
NETSIM_IPAddress  RP 
)

Definition at line 32 of file PIM_Group.c.

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

◆ elect_DR()

void elect_DR ( NETSIM_ID  d,
NETSIM_ID  ifid 
)

Definition at line 95 of file PIM_Neighbor.c.

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

◆ find_neighbor()

ptrPIM_NEIGHBOR find_neighbor ( NETSIM_ID  d,
NETSIM_IPAddress  ip 
)

Definition at line 20 of file PIM_Neighbor.c.

Here is the caller graph for this function:

◆ pim_add_interface_to_group()

void pim_add_interface_to_group ( NETSIM_ID  d,
NETSIM_ID  i,
ptrPIM_GROUP  g 
)

Definition at line 56 of file PIM_Group.c.

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

◆ pim_add_timeout_event()

void pim_add_timeout_event ( NETSIM_ID  d,
double  time,
IP_SUBEVENT  eve,
NETSIM_IPAddress  groupAddress 
)

Definition at line 50 of file PIM_SM.c.

Here is the caller graph for this function:

◆ pim_find_group()

ptrPIM_GROUP pim_find_group ( NETSIM_ID  d,
NETSIM_IPAddress  addr 
)

Definition at line 20 of file PIM_Group.c.

Here is the caller graph for this function:

◆ pim_process_join()

bool pim_process_join ( )

Definition at line 193 of file PIM_Join.c.

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

◆ pim_route_add()

void pim_route_add ( NETSIM_ID  d,
NETSIM_ID  i,
UINT  metric,
NETSIM_IPAddress  dest 
)

Definition at line 72 of file PIM_Route.c.

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

◆ pim_route_msg()

int pim_route_msg ( )

Definition at line 59 of file PIM_Route_Msg.c.

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

◆ pim_send_joinprune()

void pim_send_joinprune ( NETSIM_ID  d,
double  time,
ptrPIM_GROUP  group 
)

Definition at line 128 of file PIM_Join.c.

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

◆ pimroute_find_nexthop()

NETSIM_IPAddress pimroute_find_nexthop ( NETSIM_ID  d,
NETSIM_IPAddress  dest 
)

Definition at line 165 of file PIM_Route.c.

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

◆ print_pim_sm_log()

void print_pim_sm_log ( char *  format,
  ... 
)

Definition at line 38 of file PIM_SM.c.

Here is the caller graph for this function:

◆ print_RPT_Tree()

void print_RPT_Tree ( NETSIM_ID  rp,
ptrPIM_GROUP  group 
)

Definition at line 59 of file PIM_Print.c.

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

◆ process_pim_hello_packet()

bool process_pim_hello_packet ( )

Definition at line 162 of file PIM_Hello.c.

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

◆ send_hello_msg()

void send_hello_msg ( NETSIM_ID  d,
double  time 
)

Definition at line 142 of file PIM_Hello.c.

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

Variable Documentation

◆ ALL_PIM_ROUTERS_ADDRESS

NETSIM_IPAddress ALL_PIM_ROUTERS_ADDRESS

Definition at line 48 of file PIM_SM.h.