Debian Codegraph @

src/libsystemd-network/icmp6-util.h

raw
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 <netinet/in.h>
9
10 #include "sd-forward.h"
11
12 #define IN6_ADDR_ALL_ROUTERS_MULTICAST \
13 ((const struct in6_addr) { { { \
14 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
15 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, \
16 } } } )
17
18 #define IN6_ADDR_ALL_NODES_MULTICAST \
19 ((const struct in6_addr) { { { \
20 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
21 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, \
22 } } } )
23
24 int icmp6_bind(int ifindex, bool is_router);
25 int icmp6_send(int fd, const struct in6_addr *dst, const struct iovec *iov, size_t n_iov);
26 int icmp6_receive(
27 int fd,
28 void *buffer,
29 size_t size,
30 struct in6_addr *ret_sender,
31 int *ret_ifindex,
32 triple_timestamp *ret_timestamp);