]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/libsystemd-network/icmp6-util.h
icmp6-util: merge icmp6_bind_router_{solicitation,advertisement}() into icmp6_bind()
[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 <stdbool.h>
10
11 #include "time-util.h"
12
13 #define IN6ADDR_ALL_ROUTERS_MULTICAST_INIT \
14 { { { 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
15 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 } } }
16
17 #define IN6ADDR_ALL_NODES_MULTICAST_INIT \
18 { { { 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
19 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 } } }
20
21 int icmp6_bind(int ifindex, bool is_router);
22 int icmp6_send_router_solicitation(int s, const struct ether_addr *ether_addr);
23 int icmp6_receive(
24 int fd,
25 void *buffer,
26 size_t size,
27 struct in6_addr *ret_sender,
28 triple_timestamp *ret_timestamp);