From e3169126793f43be3d840874ffb3935a51097001 Mon Sep 17 00:00:00 2001 From: Patrik Flykt Date: Thu, 19 Jun 2014 15:38:55 +0300 Subject: sd-icmp6-nd: Add Router Solicitation and Advertisement support Provide functions to bind the ICMPv6 socket to the approriate interface and set multicast sending and receiving according to RFC 3493, section 5.2. and RFC 3542, sections 3. and 3.3. Filter out all ICMPv6 messages except Router Advertisements for the socket in question according to RFC 3542, section 3.2. Send Router Solicitations to the all routers multicast group as described in RFC 4861, section 6. and act on the received Router Advertisments according to section 6.3.7. Implement a similar API for ICMPv6 handling as is done for DHCPv4 and DHCPv6. --- src/libsystemd-network/dhcp6-internal.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/libsystemd-network/dhcp6-internal.h (limited to 'src/libsystemd-network/dhcp6-internal.h') diff --git a/src/libsystemd-network/dhcp6-internal.h b/src/libsystemd-network/dhcp6-internal.h new file mode 100644 index 0000000000..52283d7f6d --- /dev/null +++ b/src/libsystemd-network/dhcp6-internal.h @@ -0,0 +1,29 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +#pragma once + +/*** + This file is part of systemd. + + Copyright (C) 2014 Intel Corporation. All rights reserved. + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + systemd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with systemd; If not, see . +***/ + +#include + +#define log_dhcp6_client(p, fmt, ...) log_meta(LOG_DEBUG, __FILE__, __LINE__, __func__, "DHCPv6 CLIENT: " fmt, ##__VA_ARGS__) + +int dhcp_network_icmp6_bind_router_solicitation(int index); +int dhcp_network_icmp6_send_router_solicitation(int s, const struct ether_addr *ether_addr); -- cgit v1.2.3-54-g00ecf