]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/systemd/sd-radv.h
tree-wide: drop 'This file is part of systemd' blurb
[thirdparty/systemd.git] / src / systemd / sd-radv.h
index 0cc1d670b9a27ff21a777442e23535e347f88949..05654aa74711b3cc24c17352b5fba7eda38cbf3c 100644 (file)
@@ -1,9 +1,8 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
 #ifndef foosdradvfoo
 #define foosdradvfoo
 
 /***
-  This file is part of systemd.
-
   Copyright (C) 2017 Intel Corporation. All rights reserved.
 
   systemd is free software; you can redistribute it and/or modify it
@@ -23,6 +22,7 @@
 #include <inttypes.h>
 #include <net/ethernet.h>
 #include <netinet/in.h>
+#include <stdbool.h>
 #include <sys/types.h>
 
 #include "sd-ndisc.h"
 
 _SD_BEGIN_DECLARATIONS;
 
+#define SD_RADV_DEFAULT_MIN_TIMEOUT_USEC        (200*USEC_PER_SEC)
+#define SD_RADV_DEFAULT_MAX_TIMEOUT_USEC        (600*USEC_PER_SEC)
+
+#define SD_RADV_DEFAULT_DNS_LIFETIME_USEC       (3*SD_RADV_DEFAULT_MAX_TIMEOUT_USEC)
+
 typedef struct sd_radv sd_radv;
 typedef struct sd_radv_prefix sd_radv_prefix;
 
@@ -56,7 +61,9 @@ int sd_radv_set_router_lifetime(sd_radv *ra, uint32_t router_lifetime);
 int sd_radv_set_managed_information(sd_radv *ra, int managed);
 int sd_radv_set_other_information(sd_radv *ra, int other);
 int sd_radv_set_preference(sd_radv *ra, unsigned preference);
-int sd_radv_add_prefix(sd_radv *ra, sd_radv_prefix *p);
+int sd_radv_add_prefix(sd_radv *ra, sd_radv_prefix *p, bool dynamic);
+sd_radv_prefix *sd_radv_remove_prefix(sd_radv *ra, const struct in6_addr *prefix,
+                                      unsigned char prefixlen);
 int sd_radv_set_rdnss(sd_radv *ra, uint32_t lifetime,
                       const struct in6_addr *dns, size_t n_dns);
 int sd_radv_set_dnssl(sd_radv *ra, uint32_t lifetime, char **search_list);
@@ -66,7 +73,7 @@ int sd_radv_prefix_new(sd_radv_prefix **ret);
 sd_radv_prefix *sd_radv_prefix_ref(sd_radv_prefix *ra);
 sd_radv_prefix *sd_radv_prefix_unref(sd_radv_prefix *ra);
 
-int sd_radv_prefix_set_prefix(sd_radv_prefix *p, struct in6_addr *in6_addr,
+int sd_radv_prefix_set_prefix(sd_radv_prefix *p, const struct in6_addr *in6_addr,
                               unsigned char prefixlen);
 int sd_radv_prefix_set_onlink(sd_radv_prefix *p, int onlink);
 int sd_radv_prefix_set_address_autoconfiguration(sd_radv_prefix *p,