]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/libsystemd-network/icmp6-util.h
sd-ndisc: make ndisc_send() and icmp6_send() take struct in6_addr
[thirdparty/systemd.git] / src / libsystemd-network / icmp6-util.h
CommitLineData
db9ecf05 1/* SPDX-License-Identifier: LGPL-2.1-or-later */
940367a0
TG
2#pragma once
3
4/***
810adae9 5 Copyright © 2014-2015 Intel Corporation. All rights reserved.
940367a0
TG
6***/
7
8#include <net/ethernet.h>
ca114462 9#include <netinet/in.h>
37c011e7 10#include <stdbool.h>
ca114462 11#include <sys/uio.h>
940367a0 12
88d5a3db
PF
13#include "time-util.h"
14
2c28eb02
YW
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 } } } )
e2e81228 20
2c28eb02
YW
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 } } } )
e2e81228 26
37c011e7 27int icmp6_bind(int ifindex, bool is_router);
ac336e75 28int icmp6_send(int fd, const struct in6_addr *dst, const struct iovec *iov, size_t n_iov);
51211638
YW
29int icmp6_receive(
30 int fd,
31 void *buffer,
32 size_t size,
33 struct in6_addr *ret_sender,
34 triple_timestamp *ret_timestamp);