Lines Matching refs:netif
90 #include "lwip/netif.h"
138 static struct igmp_group *igmp_lookup_group(struct netif *ifp, ip_addr_t *addr);
143 static err_t igmp_ip_output_if(struct pbuf *p, ip_addr_t *src, ip_addr_t *dest, struct netif *netif);
176 LWIP_DEBUGF(IGMP_DEBUG, (" on if %p\n", group->netif));
188 * @param netif network interface on which start IGMP processing
191 igmp_start(struct netif *netif)
195 LWIP_DEBUGF(IGMP_DEBUG, ("igmp_start: starting IGMP processing on if %p\n", netif));
197 group = igmp_lookup_group(netif, &allsystems);
204 if (netif->igmp_mac_filter != NULL) {
207 LWIP_DEBUGF(IGMP_DEBUG, (") on if %p\n", netif));
208 netif->igmp_mac_filter(netif, &allsystems, IGMP_ADD_MAC_FILTER);
220 * @param netif network interface on which stop IGMP processing
223 igmp_stop(struct netif *netif)
233 if (group->netif == netif) {
243 if (netif->igmp_mac_filter != NULL) {
246 LWIP_DEBUGF(IGMP_DEBUG, (") on if %p\n", netif));
247 netif->igmp_mac_filter(netif, &(group->group_address), IGMP_DEL_MAC_FILTER);
264 * @param netif network interface on which report IGMP memberships
267 igmp_report_groups(struct netif *netif)
271 LWIP_DEBUGF(IGMP_DEBUG, ("igmp_report_groups: sending IGMP reports on if %p\n", netif));
274 if (group->netif == netif) {
290 igmp_lookfor_group(struct netif *ifp, ip_addr_t *addr)
295 if ((group->netif == ifp) && (ip_addr_cmp(&(group->group_address), addr))) {
316 igmp_lookup_group(struct netif *ifp, ip_addr_t *addr)
330 group->netif = ifp;
389 igmp_input(struct pbuf *p, struct netif *inp, ip_addr_t *dest)
452 if ((groupref->netif == inp) && (!(ip_addr_cmp(&(groupref->group_address), &allsystems)))) {
497 igmp->igmp_msgtype, group->group_state, &group, group->netif));
512 * @return ERR_OK if group was joined on the netif(s), an err_t otherwise
519 struct netif *netif;
525 /* loop through netif's */
526 netif = netif_list;
527 while (netif != NULL) {
529 if ((netif->flags & NETIF_FLAG_IGMP) && ((ip_addr_isany(ifaddr) || ip_addr_cmp(&(netif->ip_addr), ifaddr)))) {
531 group = igmp_lookup_group(netif, groupaddr);
544 if ((group->use==0) && (netif->igmp_mac_filter != NULL)) {
547 LWIP_DEBUGF(IGMP_DEBUG, (") on if %p\n", netif));
548 netif->igmp_mac_filter(netif, groupaddr, IGMP_ADD_MAC_FILTER);
565 /** @todo undo any other netif already joined */
571 netif = netif->next;
582 * @return ERR_OK if group was left on the netif(s), an err_t otherwise
589 struct netif *netif;
595 /* loop through netif's */
596 netif = netif_list;
597 while (netif != NULL) {
599 if ((netif->flags & NETIF_FLAG_IGMP) && ((ip_addr_isany(ifaddr) || ip_addr_cmp(&(netif->ip_addr), ifaddr)))) {
601 group = igmp_lookfor_group(netif, groupaddr);
619 if (netif->igmp_mac_filter != NULL) {
622 LWIP_DEBUGF(IGMP_DEBUG, (") on if %p\n", netif));
623 netif->igmp_mac_filter(netif, groupaddr, IGMP_DEL_MAC_FILTER);
644 netif = netif->next;
683 LWIP_DEBUGF(IGMP_DEBUG, (" on if %p\n", group->netif));
735 * IP address of the netif used to send is used as source address)
739 * @param netif the netif on which to send this packet
742 * returns errors returned by netif->output
745 igmp_ip_output_if(struct pbuf *p, ip_addr_t *src, ip_addr_t *dest, struct netif *netif)
752 return ip_output_if_opt(p, src, dest, IGMP_TTL, 0, IP_PROTO_IGMP, netif, ra, ROUTER_ALERTLEN);
776 ip_addr_copy(src, group->netif->ip_addr);
795 igmp_ip_output_if(p, &src, dest, group->netif);