Zephyr API Documentation 4.0.0-rc3
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
mld.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 Intel Corporation
3 * Copyright (c) 2024 Nordic Semiconductor ASA
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
12#ifndef ZEPHYR_INCLUDE_NET_MLD_H_
13#define ZEPHYR_INCLUDE_NET_MLD_H_
14
24#include <errno.h>
25
26#include <zephyr/net/net_if.h>
27#include <zephyr/net/net_ip.h>
28#include <zephyr/toolchain.h>
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
42#if defined(CONFIG_NET_IPV6_MLD)
43int net_ipv6_mld_join(struct net_if *iface, const struct in6_addr *addr);
44#else
45static inline int
46net_ipv6_mld_join(struct net_if *iface, const struct in6_addr *addr)
47{
48 ARG_UNUSED(addr);
49 ARG_UNUSED(iface);
50
51 return -ENOTSUP;
52}
53#endif /* CONFIG_NET_IPV6_MLD */
54
63#if defined(CONFIG_NET_IPV6_MLD)
64int net_ipv6_mld_leave(struct net_if *iface, const struct in6_addr *addr);
65#else
66static inline int
67net_ipv6_mld_leave(struct net_if *iface, const struct in6_addr *addr)
68{
69 ARG_UNUSED(iface);
70 ARG_UNUSED(addr);
71
72 return -ENOTSUP;
73}
74#endif /* CONFIG_NET_IPV6_MLD */
75
76#ifdef __cplusplus
77}
78#endif
79
84#endif /* ZEPHYR_INCLUDE_NET_MLD_H_ */
System error numbers.
static int net_ipv6_mld_join(struct net_if *iface, const struct in6_addr *addr)
Join a given multicast group.
Definition mld.h:46
static int net_ipv6_mld_leave(struct net_if *iface, const struct in6_addr *addr)
Leave a given multicast group.
Definition mld.h:67
#define ENOTSUP
Unsupported value.
Definition errno.h:114
Public API for network interface.
IPv6 and IPv4 definitions.
IPv6 address struct.
Definition net_ip.h:142
Network Interface structure.
Definition net_if.h:680
Macros to abstract toolchain specific capabilities.