1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #ifndef foosdndiscredirectfoo
3 #define foosdndiscredirectfoo
6 systemd is free software; you can redistribute it and/or modify it
7 under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation; either version 2.1 of the License, or
9 (at your option) any later version.
11 systemd is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public License
17 along with systemd; If not, see <https://www.gnu.org/licenses/>.
21 #include <net/ethernet.h>
22 #include <netinet/in.h>
23 #include <netinet/ip6.h>
24 #include <sys/types.h>
27 #include "_sd-common.h"
29 _SD_BEGIN_DECLARATIONS
;
31 typedef struct sd_ndisc_redirect sd_ndisc_redirect
;
33 sd_ndisc_redirect
* sd_ndisc_redirect_ref(sd_ndisc_redirect
*na
);
34 sd_ndisc_redirect
* sd_ndisc_redirect_unref(sd_ndisc_redirect
*na
);
35 _SD_DEFINE_POINTER_CLEANUP_FUNC(sd_ndisc_redirect
, sd_ndisc_redirect_unref
);
37 int sd_ndisc_redirect_set_sender_address(sd_ndisc_redirect
*rd
, const struct in6_addr
*addr
);
38 int sd_ndisc_redirect_get_sender_address(sd_ndisc_redirect
*na
, struct in6_addr
*ret
);
39 int sd_ndisc_redirect_get_target_address(sd_ndisc_redirect
*na
, struct in6_addr
*ret
);
40 int sd_ndisc_redirect_get_destination_address(sd_ndisc_redirect
*na
, struct in6_addr
*ret
);
41 int sd_ndisc_redirect_get_target_mac(sd_ndisc_redirect
*na
, struct ether_addr
*ret
);
42 int sd_ndisc_redirect_get_redirected_header(sd_ndisc_redirect
*na
, struct ip6_hdr
*ret
);