Zephyr API Documentation 4.0.0-rc3
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
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
48#if defined(CONFIG_NET_IPV4_IGMP)
49int net_ipv4_igmp_join(struct net_if *iface, const struct in_addr *addr,
50 const struct igmp_param *param);
51#else
52static inline int net_ipv4_igmp_join(struct net_if *iface, const struct in_addr *addr,
53 const struct igmp_param *param)
54{
55 ARG_UNUSED(iface);
56 ARG_UNUSED(addr);
57 ARG_UNUSED(param);
58
59 return -ENOSYS;
60}
61#endif
62
71#if defined(CONFIG_NET_IPV4_IGMP)
72int net_ipv4_igmp_leave(struct net_if *iface, const struct in_addr *addr);
73#else
74static inline int net_ipv4_igmp_leave(struct net_if *iface,
75 const struct in_addr *addr)
76{
77 ARG_UNUSED(iface);
78 ARG_UNUSED(addr);
79
80 return -ENOSYS;
81}
82#endif
83
84#ifdef __cplusplus
85}
86#endif
87
92#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:52
static int net_ipv4_igmp_leave(struct net_if *iface, const struct in_addr *addr)
Leave a given multicast group.
Definition igmp.h:74
#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 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
IPv4 address struct.
Definition net_ip.h:154
Network Interface structure.
Definition net_if.h:680