Rtos API example
lwip_igmp.c File Reference
IGMP - Internet Group Management Protocol. More...
Go to the source code of this file.
Functions | |
static struct igmp_group * | igmp_lookup_group (struct netif *ifp, const ip4_addr_t *addr) |
Search for a specific igmp group and create a new one if not found-. | |
static err_t | igmp_remove_group (struct netif *netif, struct igmp_group *group) |
Remove a group in the global igmp_group_list, but don't free it yet. | |
static void | igmp_timeout (struct netif *netif, struct igmp_group *group) |
Called if a timeout for one group is reached. | |
static void | igmp_start_timer (struct igmp_group *group, u8_t max_time) |
Start a timer for an igmp group. | |
static void | igmp_delaying_member (struct igmp_group *group, u8_t maxresp) |
Delaying membership report for a group if necessary. | |
static err_t | igmp_ip_output_if (struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, struct netif *netif) |
Sends an IP packet on a network interface. | |
static void | igmp_send (struct netif *netif, struct igmp_group *group, u8_t type) |
Send an igmp packet to a specific group. | |
void | igmp_init (void) |
Initialize the IGMP module. | |
err_t | igmp_start (struct netif *netif) |
Start IGMP processing on interface. | |
err_t | igmp_stop (struct netif *netif) |
Stop IGMP processing on interface. | |
void | igmp_report_groups (struct netif *netif) |
Report IGMP memberships for this interface. | |
struct igmp_group * | igmp_lookfor_group (struct netif *ifp, const ip4_addr_t *addr) |
Search for a group in the global igmp_group_list. | |
void | igmp_input (struct pbuf *p, struct netif *inp, const ip4_addr_t *dest) |
Called from ip_input() if a new IGMP packet is received. | |
err_t | igmp_joingroup (const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr) |
Join a group on one network interface. | |
err_t | igmp_joingroup_netif (struct netif *netif, const ip4_addr_t *groupaddr) |
Join a group on one network interface. | |
err_t | igmp_leavegroup (const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr) |
Leave a group on one network interface. | |
err_t | igmp_leavegroup_netif (struct netif *netif, const ip4_addr_t *groupaddr) |
Leave a group on one network interface. | |
void | igmp_tmr (void) |
The igmp timer function (both for NO_SYS=1 and =0) Should be called every IGMP_TMR_INTERVAL milliseconds (100 ms is default). |
Detailed Description
IGMP - Internet Group Management Protocol.
Definition in file lwip_igmp.c.
Function Documentation
static void igmp_delaying_member | ( | struct igmp_group * | group, |
u8_t | maxresp | ||
) | [static] |
Delaying membership report for a group if necessary.
- Parameters:
-
group the igmp_group for which "delaying" membership report maxresp query delay
Definition at line 712 of file lwip_igmp.c.
void igmp_init | ( | void | ) |
Initialize the IGMP module.
Definition at line 114 of file lwip_igmp.c.
void igmp_input | ( | struct pbuf * | p, |
struct netif * | inp, | ||
const ip4_addr_t * | dest | ||
) |
Called from ip_input() if a new IGMP packet is received.
- Parameters:
-
p received igmp packet, p->payload pointing to the igmp header inp network interface on which the packet was received dest destination ip address of the igmp packet
Definition at line 323 of file lwip_igmp.c.
static err_t igmp_ip_output_if | ( | struct pbuf * | p, |
const ip4_addr_t * | src, | ||
const ip4_addr_t * | dest, | ||
struct netif * | netif | ||
) | [static] |
Sends an IP packet on a network interface.
This function constructs the IP header and calculates the IP header checksum. If the source IP address is NULL, the IP address of the outgoing network interface is filled in as source address.
- Parameters:
-
p the packet to send (p->payload points to the data, e.g. next protocol header; if dest == LWIP_IP_HDRINCL, p already includes an IP header and p->payload points to that IP header) src the source IP address to send from (if src == IP4_ADDR_ANY, the IP address of the netif used to send is used as source address) dest the destination IP address to send the packet to netif the netif on which to send this packet
- Returns:
- ERR_OK if the packet was sent OK ERR_BUF if p doesn't have enough space for IP/LINK headers returns errors returned by netif->output
Definition at line 740 of file lwip_igmp.c.
struct igmp_group* igmp_lookfor_group | ( | struct netif * | ifp, |
const ip4_addr_t * | addr | ||
) | [read] |
Search for a group in the global igmp_group_list.
- Parameters:
-
ifp the network interface for which to look addr the group ip address to search for
- Returns:
- a struct igmp_group* if the group has been found, NULL if the group wasn't found.
Definition at line 218 of file lwip_igmp.c.
static struct igmp_group * igmp_lookup_group | ( | struct netif * | ifp, |
const ip4_addr_t * | addr | ||
) | [static, read] |
Search for a specific igmp group and create a new one if not found-.
- Parameters:
-
ifp the network interface for which to look addr the group ip address to search
- Returns:
- a struct igmp_group*, NULL on memory error.
Definition at line 244 of file lwip_igmp.c.
static err_t igmp_remove_group | ( | struct netif * | netif, |
struct igmp_group * | group | ||
) | [static] |
Remove a group in the global igmp_group_list, but don't free it yet.
- Parameters:
-
group the group to remove from the global igmp_group_list
- Returns:
- ERR_OK if group was removed from the list, an err_t otherwise
Definition at line 295 of file lwip_igmp.c.
void igmp_report_groups | ( | struct netif * | netif ) |
Report IGMP memberships for this interface.
- Parameters:
-
netif network interface on which report IGMP memberships
Definition at line 192 of file lwip_igmp.c.
static void igmp_send | ( | struct netif * | netif, |
struct igmp_group * | group, | ||
u8_t | type | ||
) | [static] |
Send an igmp packet to a specific group.
- Parameters:
-
group the group to which to send the packet type the type of igmp packet to send
Definition at line 757 of file lwip_igmp.c.
Start IGMP processing on interface.
- Parameters:
-
netif network interface on which start IGMP processing
Definition at line 128 of file lwip_igmp.c.
static void igmp_start_timer | ( | struct igmp_group * | group, |
u8_t | max_time | ||
) | [static] |
Start a timer for an igmp group.
- Parameters:
-
group the igmp_group for which to start a timer max_time the time in multiples of IGMP_TMR_INTERVAL (decrease with every call to igmp_tmr())
Definition at line 691 of file lwip_igmp.c.
Stop IGMP processing on interface.
- Parameters:
-
netif network interface on which stop IGMP processing
Definition at line 160 of file lwip_igmp.c.
static void igmp_timeout | ( | struct netif * | netif, |
struct igmp_group * | group | ||
) | [static] |
Called if a timeout for one group is reached.
Sends a report for this group.
- Parameters:
-
group an igmp_group for which a timeout is reached
Definition at line 666 of file lwip_igmp.c.
void igmp_tmr | ( | void | ) |
The igmp timer function (both for NO_SYS=1 and =0) Should be called every IGMP_TMR_INTERVAL milliseconds (100 ms is default).
Definition at line 639 of file lwip_igmp.c.
Generated on Sun Jul 17 2022 08:25:34 by 1.7.2