36 strcpy(stype,
"PIMMSG_Asset");
40 strcpy(stype,
"PIMMSG_Bootstrap");
44 strcpy(stype,
"PIMMSG_CandidateRPAdvertisement");
48 strcpy(stype,
"PIMMSG_Graft");
52 strcpy(stype,
"PIMMSG_GraftAck");
56 strcpy(stype,
"PIMMSG_Hello");
60 strcpy(stype,
"PIMMSG_JoinPrune");
64 strcpy(stype,
"PIMMSG_Register");
68 strcpy(stype,
"PIMMSG_RegisterStop");
86 fnNetSimError(
"Unknown PIM MSG %d in %s", type, __FUNCTION__);
120 for (i = 0; i < destCount; i++)
128 memset(&pevent, 0,
sizeof pevent);
162 char* bin = subnet->
bin_ip;
164 while (*bin && *bin != 0)
@ PACKET_PIM_REGISTERSTOP
#define fnNetSimError(x,...)
static double get_pim_size(PIMMSG type)
static int pimtype_to_ctrltype(PIMMSG type, char *stype)
void set_PIM_MSG(NetSim_PACKET *packet, void *msg)
void set_pim_hdr(ptrPIM_HDR hdr, PIMMSG type)
NetSim_PACKET * create_pim_packet(PIMMSG type, void *opt, double time, NETSIM_ID source, NETSIM_IPAddress sourceAddrss, UINT destCount, NETSIM_ID *destList, NETSIM_IPAddress group, UINT ttl)
ptrENCODED_GROUP_ADDR encode_group_addr(NETSIM_IPAddress ip)
ptrENCODED_SOURCE_ADDR encode_source_addr(NETSIM_IPAddress ip, NETSIM_IPAddress subnet)
void * get_PIM_MSG(NetSim_PACKET *packet)
void send_pim_msg(NETSIM_ID d, double time, NetSim_PACKET *packet)
static UINT8 get_masklen(NETSIM_IPAddress subnet)
ptrENCODED_UNICAST_ADDR encode_unicast_addr(NETSIM_IPAddress ip)
@ PIMMSG_CandidateRPAdvertisement
enum enum_pim_msg_type PIMMSG
void add_dest_to_packet(NetSim_PACKET *packet, NETSIM_ID dest)
#define DEVICE_TYPE(DeviceId)
#define fn_NetSim_Packet_CreatePacket(layer)
#define fnpAddEvent(pstruEvent)
struct stru_NetSim_Packet * pPacket
netsimDEVICE_TYPE nDeviceType
IP_PROTOCOL_NUMBER IPProtocol
NETWORK_LAYER_PROTOCOL nNetworkProtocol
NETSIM_IPAddress szDestIP
void * Packet_NetworkProtocol
NETSIM_IPAddress szSourceIP
struct stru_NetSim_Packet_AppLayer * pstruAppData
char szPacketType[MAX_PACKET_TYPE_LEN]
struct stru_NetSim_Packet_NetworkLayer * pstruNetworkData
unsigned int nControlDataType
struct stru_ip::@5::ipv4 IPV4
NETSIM_IPAddress GroupMulticastAddr
NETSIM_IPAddress SourceAddr
NETSIM_IPAddress unicastAddr