igmp_host_misc.c
systime_t igmpGetRandomDelay(systime_t maxDelay)
Generate a random delay.
Definition: igmp_common.c:373
void ipv4RemoveSrcAddr(Ipv4SrcAddrList *list, Ipv4Addr srcAddr)
Remove a source address from a given list.
Definition: ipv4_multicast.c:741
NetBuffer * ipAllocBuffer(size_t length, size_t *offset)
Allocate a buffer to hold an IP packet.
Definition: ip.c:711
error_t ipv4AddSrcAddr(Ipv4SrcAddrList *list, Ipv4Addr srcAddr)
Append a source address to a given list.
Definition: ipv4_multicast.c:701
bool_t netTimerRunning(NetTimer *timer)
Check whether the timer is running.
Definition: net_misc.c:793
systime_t netGetRemainingTime(NetTimer *timer)
Get the remaining value of the running timer.
Definition: net_misc.c:837
bool_t igmpHostGetGroupRetransmitStatus(IgmpHostGroup *group)
Get the retransmission status for a given group.
Definition: igmp_host_misc.c:1206
int_t ipv4FindSrcAddr(const Ipv4SrcAddrList *list, Ipv4Addr srcAddr)
Search the list of sources for a given IP address.
Definition: ipv4_multicast.c:778
void igmpHostChangeCompatibilityMode(IgmpHostContext *context, IgmpVersion compatibilityMode)
Change host compatibility mode.
Definition: igmp_host_misc.c:53
void igmpHostMergeReports(IgmpHostGroup *group, IpFilterMode newFilterMode, const Ipv4SrcAddrList *newFilter)
Merge difference the report and the pending report.
Definition: igmp_host_misc.c:1073
bool_t igmpHostGetRetransmitStatus(IgmpHostContext *context)
Get the retransmission status of the State-Change report.
Definition: igmp_host_misc.c:1168
void igmpHostProcessMembershipQueryV3(IgmpHostContext *context, const Ipv4PseudoHeader *pseudoHeader, const IgmpMembershipQueryV3 *message, size_t length)
Process incoming Version 3 Membership Query message.
Definition: igmp_host_misc.c:833
void igmpHostDecGroupRetransmitCounters(IgmpHostGroup *group)
Decrement retransmission counters for a given group.
Definition: igmp_host_misc.c:1238
void igmpHostRemoveSrcAddr(IgmpHostSrcAddrList *list, Ipv4Addr srcAddr)
Remove a source address from a given list.
Definition: igmp_host_misc.c:1522
NetTimer stateChangeReportTimer
Retransmission timer for state-change reports.
Definition: igmp_host.h:120
void igmpHostSendStateChangeReport(IgmpHostContext *context)
Send State-Change Report message.
Definition: igmp_host_misc.c:426
IPv4 multicast filtering.
int_t igmpHostFindSrcAddr(const IgmpHostSrcAddrList *list, Ipv4Addr srcAddr)
Search the list of sources for a given IP address.
Definition: igmp_host_misc.c:1559
Helper functions for IPv4.
@ IGMP_HOST_GROUP_STATE_DELAYING_MEMBER
Definition: igmp_host.h:59
IgmpHostGroup * igmpHostCreateGroup(IgmpHostContext *context, Ipv4Addr groupAddr)
Create a new multicast group.
Definition: igmp_host_misc.c:1299
void igmpHostSendCurrentStateReport(IgmpHostContext *context, Ipv4Addr groupAddr)
Send Current-State Report message.
Definition: igmp_host_misc.c:200
void igmpHostFlushUnusedGroups(IgmpHostContext *context)
Delete groups in "non-existent" state.
Definition: igmp_host_misc.c:1436
error_t igmpSendMessage(NetInterface *interface, Ipv4Addr destAddr, NetBuffer *buffer, size_t offset)
Send IGMP message.
Definition: igmp_common.c:157
IGMP host.
bool_t igmpHostMatchGroup(IgmpHostGroup *group, Ipv4Addr multicastAddr)
Check whether a group matches a given multicast address.
Definition: igmp_host_misc.c:1392
#define IGMP_OLDER_VERSION_QUERIER_PRESENT_TIMEOUT
Definition: igmp_common.h:114
NetTimer generalQueryTimer
Timer for scheduling responses to general queries.
Definition: igmp_host.h:119
uint32_t igmpDecodeFloatingPointValue(uint8_t code)
Decode a floating-point value.
Definition: igmp_common.c:398
void igmpHostSendLeaveGroup(IgmpHostContext *context, Ipv4Addr groupAddr)
Send Leave Group message.
Definition: igmp_host_misc.c:155
void igmpHostDeleteGroup(IgmpHostGroup *group)
Delete a multicast group.
Definition: igmp_host_misc.c:1420
void igmpHostProcessMessage(IgmpHostContext *context, const Ipv4PseudoHeader *pseudoHeader, const IgmpMessage *message, size_t length)
Process incoming IGMP message.
Definition: igmp_host_misc.c:671
error_t netBufferSetLength(NetBuffer *buffer, size_t length)
Adjust the length of a multi-part buffer.
Definition: net_mem.c:322
Helper functions for IGMP host.
IgmpHostGroup * igmpHostFindGroup(IgmpHostContext *context, Ipv4Addr groupAddr)
Search the list of multicast groups for a given group address.
Definition: igmp_host_misc.c:1359
error_t igmpHostAddSrcAddr(IgmpHostSrcAddrList *list, Ipv4Addr srcAddr)
Append a source address to a given list.
Definition: igmp_host_misc.c:1474
void igmpHostProcessMembershipQuery(IgmpHostContext *context, const Ipv4PseudoHeader *pseudoHeader, const IgmpMessage *message, size_t length)
Process incoming Membership Query message.
Definition: igmp_host_misc.c:717
void igmpHostSendMembershipReport(IgmpHostContext *context, Ipv4Addr groupAddr)
Send Membership Report message.
Definition: igmp_host_misc.c:108
void * netBufferAt(const NetBuffer *buffer, size_t offset, size_t length)
Returns a pointer to a data segment.
Definition: net_mem.c:418
void igmpHostProcessMembershipReport(IgmpHostContext *context, const Ipv4PseudoHeader *pseudoHeader, const IgmpMessage *message, size_t length)
Process incoming Membership Report message.
Definition: igmp_host_misc.c:1031
IPv4 (Internet Protocol Version 4)
TCP/IP stack core.
void igmpHostFlushReportRecords(IgmpHostContext *context, NetBuffer *buffer, size_t offset, size_t *length)
Flush report records.
Definition: igmp_host_misc.c:625
char_t * ipv4AddrToString(Ipv4Addr ipAddr, char_t *str)
Convert a binary IPv4 address to dot-decimal notation.
Definition: ipv4.c:1457
Debugging facilities.
uint16_t ipCalcChecksum(const void *data, size_t length)
IP checksum calculation.
Definition: ip.c:466