Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
igmp.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021 Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
11#ifndef ZEPHYR_INCLUDE_NET_IGMP_H_
12#define ZEPHYR_INCLUDE_NET_IGMP_H_
13
21#include <zephyr/types.h>
22
23#include <zephyr/net/net_if.h>
24#include <zephyr/net/net_ip.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
31struct igmp_param {
33 size_t sources_len;
34 bool include;
35};
36
46#if defined(CONFIG_NET_IPV4_IGMP)
47int net_ipv4_igmp_join(struct net_if *iface, const struct in_addr *addr,
48 const struct igmp_param *param);
49#else
50static inline int net_ipv4_igmp_join(struct net_if *iface, const struct in_addr *addr,
51 const struct igmp_param *param)
52{
53 ARG_UNUSED(iface);
54 ARG_UNUSED(addr);
55 ARG_UNUSED(param);
56
57 return -ENOSYS;
58}
59#endif
60
69#if defined(CONFIG_NET_IPV4_IGMP)
70int net_ipv4_igmp_leave(struct net_if *iface, const struct in_addr *addr);
71#else
72static inline int net_ipv4_igmp_leave(struct net_if *iface,
73 const struct in_addr *addr)
74{
75 ARG_UNUSED(iface);
76 ARG_UNUSED(addr);
77
78 return -ENOSYS;
79}
80#endif
81
82#ifdef __cplusplus
83}
84#endif
85
90#endif /* ZEPHYR_INCLUDE_NET_IGMP_H_ */
static int net_ipv4_igmp_join(struct net_if *iface, const struct in_addr *addr, const struct igmp_param *param)
Join a given multicast group.
Definition: igmp.h:50
static int net_ipv4_igmp_leave(struct net_if *iface, const struct in_addr *addr)
Leave a given multicast group.
Definition: igmp.h:72
#define ENOSYS
Function not implemented.
Definition: errno.h:83
Public API for network interface.
IPv6 and IPv4 definitions.
IGMP parameters.
Definition: igmp.h:31
bool include
Source list filter type.
Definition: igmp.h:34
struct in_addr * source_list
List of sources to include or exclude.
Definition: igmp.h:32
size_t sources_len
Length of source list.
Definition: igmp.h:33
IPv4 address struct.
Definition: net_ip.h:151
Network Interface structure.
Definition: net_if.h:678