27 sprintf(str,
"%s/%s",
pszIOPath,
"pim_sm_log.txt");
56 memset(&pevent, 0,
sizeof pevent);
69 static bool isFirst =
true;
92 print_pim_sm_log(
"Router %d, Time %0.3lf: Sending hello packet", d, time / 1000);
99 for (i = 0; i <
DEVICE(d)->nNumOfInterface; i++)
112 fnNetSimError(
"PIM is configure for router %d without any WAN port\n", d);
158 print_pim_sm_log(
"Router %d, Time %0.3lf: %s packet is received on %d interface",
199 print_pim_sm_log(
"Router %d, Time %0.3lf: Sending hello packet", d, t / 1000);
239 fnNetSimError(
"PIM Configuration is wrong. RP is not configured for group address %s\n",
246 fnNetSimError(
"PIM Configuration is wrong. %s can't be RP of group %s.\n",
IP_SUBEVENT
Enumeration for ip sub-events.
@ EVENT_PIM_NEIGHBOR_TIMEOUT
#define IP_COMPARE(ip1, ip2)
#define STR_TO_IP4(ipstr)
#define fnNetSimError(x,...)
ptrPIM_GROUP pim_find_group(NETSIM_ID d, NETSIM_IPAddress addr)
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)
void pim_route_add(NETSIM_ID d, NETSIM_ID i, UINT metric, NETSIM_IPAddress dest)
IP_PROTOCOL_ACTION pim_decide_action(NetSim_PACKET *packet, NETSIM_ID d)
void pim_join_group(NETSIM_ID d, NETSIM_IPAddress group)
static bool isReservedGroup(NETSIM_IPAddress addr)
void pim_configure(NETSIM_ID d, void *xmlNetSimNode)
void process_pim_packet()
static void close_pim_sm_log()
void Router_PIM_Init(NETSIM_ID d)
void pim_add_timeout_event(NETSIM_ID d, double time, IP_SUBEVENT eve, NETSIM_IPAddress group)
static void init_pim_sm_log()
void print_pim_sm_log(char *format,...)
void pim_handle_timer_event()
static bool isPIMReqd(NETSIM_ID d)
struct stru_pim_var * ptrPIM_VAR
NETSIM_IPAddress ALL_PIM_ROUTERS_ADDRESS
#define SET_PIM_VAR(d, var)
EXPORTED char * pszIOPath
#define getXmlVar(var, name, xmlNode, flag, type, protocol)
#define DEVICE_TYPE(DeviceId)
#define DEVICE_NWLAYER(DeviceId)
EXPORTED struct stru_NetSim_EventDetails * pstruEventDetails
#define DEVICE_INTERFACE(DeviceId, InterfaceId)
#define fn_NetSim_Packet_FreePacket(pstruPacket)
#define fnpAddEvent(pstruEvent)
struct stru_NetSim_Packet * pPacket
netsimDEVICE_TYPE nDeviceType
char szPacketType[MAX_PACKET_TYPE_LEN]
unsigned int nControlDataType
char str_ip[_NETSIM_IP_LEN]
double triggeredHelloDelay