Zephyr API Documentation 4.3.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
10
11#ifndef ZEPHYR_INCLUDE_NET_IGMP_H_
12#define ZEPHYR_INCLUDE_NET_IGMP_H_
13
22
23#include <zephyr/types.h>
24
25#include <zephyr/net/net_if.h>
26#include <zephyr/net/net_ip.h>
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
33struct igmp_param {
35 size_t sources_len;
36 bool include;
37};
38
55#if defined(CONFIG_NET_IPV4_IGMP)
56int net_ipv4_igmp_join(struct net_if *iface, const struct net_in_addr *addr,
57 const struct igmp_param *param);
58#else
59static inline int net_ipv4_igmp_join(struct net_if *iface, const struct net_in_addr *addr,
60 const struct igmp_param *param)
61{
62 ARG_UNUSED(iface);
63 ARG_UNUSED(addr);
64 ARG_UNUSED(param);
65
66 return -ENOSYS;
67}
68#endif
69
78#if defined(CONFIG_NET_IPV4_IGMP)
79int net_ipv4_igmp_leave(struct net_if *iface, const struct net_in_addr *addr);
80#else
81static inline int net_ipv4_igmp_leave(struct net_if *iface,
82 const struct net_in_addr *addr)
83{
84 ARG_UNUSED(iface);
85 ARG_UNUSED(addr);
86
87 return -ENOSYS;
88}
89#endif
90
91#ifdef __cplusplus
92}
93#endif
94
98
99#endif /* ZEPHYR_INCLUDE_NET_IGMP_H_ */
static int net_ipv4_igmp_join(struct net_if *iface, const struct net_in_addr *addr, const struct igmp_param *param)
Join a given multicast group.
Definition igmp.h:59
static int net_ipv4_igmp_leave(struct net_if *iface, const struct net_in_addr *addr)
Leave a given multicast group.
Definition igmp.h:81
#define ENOSYS
Function not implemented.
Definition errno.h:82
Public API for network interface.
IPv6 and IPv4 definitions.
IGMP parameters.
Definition igmp.h:33
bool include
Source list filter type.
Definition igmp.h:36
struct net_in_addr * source_list
List of sources to include or exclude.
Definition igmp.h:34
size_t sources_len
Length of source list.
Definition igmp.h:35
Network Interface structure.
Definition net_if.h:731
IPv4 address struct.
Definition net_ip.h:155