Zephyr API Documentation  3.5.0
A Scalable Open Source RTOS
3.5.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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
38#if defined(CONFIG_NET_IPV4_IGMP)
39int net_ipv4_igmp_join(struct net_if *iface, const struct in_addr *addr);
40#else
41static inline int net_ipv4_igmp_join(struct net_if *iface,
42 const struct in_addr *addr)
43{
44 ARG_UNUSED(iface);
45 ARG_UNUSED(addr);
46
47 return -ENOSYS;
48}
49#endif
50
59#if defined(CONFIG_NET_IPV4_IGMP)
60int net_ipv4_igmp_leave(struct net_if *iface, const struct in_addr *addr);
61#else
62static inline int net_ipv4_igmp_leave(struct net_if *iface,
63 const struct in_addr *addr)
64{
65 ARG_UNUSED(iface);
66 ARG_UNUSED(addr);
67
68 return -ENOSYS;
69}
70#endif
71
72#ifdef __cplusplus
73}
74#endif
75
80#endif /* ZEPHYR_INCLUDE_NET_IGMP_H_ */
static int net_ipv4_igmp_join(struct net_if *iface, const struct in_addr *addr)
Join a given multicast group.
Definition: igmp.h:41
static int net_ipv4_igmp_leave(struct net_if *iface, const struct in_addr *addr)
Leave a given multicast group.
Definition: igmp.h:62
#define ENOSYS
Function not implemented.
Definition: errno.h:83
Public API for network interface.
IPv6 and IPv4 definitions.
IPv4 address struct.
Definition: net_ip.h:151
Network Interface structure.
Definition: net_if.h:595