]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/libsystemd-network/icmp6-util.h
Merge pull request #32266 from yuwata/libsystemd-network-trivial-cleanups
[thirdparty/systemd.git] / src / libsystemd-network / icmp6-util.h
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3
4 /***
5 Copyright © 2014-2015 Intel Corporation. All rights reserved.
6 ***/
7
8 #include <net/ethernet.h>
9 #include <netinet/in.h>
10 #include <stdbool.h>
11 #include <sys/uio.h>
12
13 #include "time-util.h"
14
15 #define IN6_ADDR_ALL_ROUTERS_MULTICAST \
16 ((const struct in6_addr) { { { \
17 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
18 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, \
19 } } } )
20
21 #define IN6_ADDR_ALL_NODES_MULTICAST \
22 ((const struct in6_addr) { { { \
23 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
24 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, \
25 } } } )
26
27 int icmp6_bind(int ifindex, bool is_router);
28 int icmp6_send(int fd, const struct in6_addr *dst, const struct iovec *iov, size_t n_iov);
29 int icmp6_receive(
30 int fd,
31 void *buffer,
32 size_t size,
33 struct in6_addr *ret_sender,
34 triple_timestamp *ret_timestamp);