summaryrefslogtreecommitdiffstats
path: root/src/libsystemd-network/ndisc-option.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-03-16 07:52:18 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2024-03-27 14:12:30 +0100
commit9f3587ae44ec9b437bd124eb9abbd593af45a796 (patch)
tree5424dbf450c0c4d47a374410eb97e253ec0514d2 /src/libsystemd-network/ndisc-option.h
parentMerge pull request #31965 from yuwata/logs-show-cleanups (diff)
downloadsystemd-9f3587ae44ec9b437bd124eb9abbd593af45a796.tar.xz
systemd-9f3587ae44ec9b437bd124eb9abbd593af45a796.zip
ndisc-option: add HomeAgent option support
Currently, these are not used, but will be used later in sd-radv.
Diffstat (limited to 'src/libsystemd-network/ndisc-option.h')
-rw-r--r--src/libsystemd-network/ndisc-option.h33
1 files changed, 22 insertions, 11 deletions
diff --git a/src/libsystemd-network/ndisc-option.h b/src/libsystemd-network/ndisc-option.h
index 7e7a702b80..3bf29af0c9 100644
--- a/src/libsystemd-network/ndisc-option.h
+++ b/src/libsystemd-network/ndisc-option.h
@@ -29,6 +29,11 @@ typedef struct sd_ndisc_prefix {
usec_t preferred_lifetime;
} sd_ndisc_prefix;
+typedef struct sd_ndisc_home_agent {
+ uint16_t preference;
+ usec_t lifetime;
+} sd_ndisc_home_agent;
+
typedef struct sd_ndisc_route {
uint8_t preference;
uint8_t prefixlen;
@@ -58,17 +63,18 @@ typedef struct sd_ndisc_option {
size_t offset;
union {
- sd_ndisc_raw raw; /* for testing or unsupported options */
- struct ether_addr mac; /* SD_NDISC_OPTION_SOURCE_LL_ADDRESS or SD_NDISC_OPTION_TARGET_LL_ADDRESS */
- sd_ndisc_prefix prefix; /* SD_NDISC_OPTION_PREFIX_INFORMATION */
- struct ip6_hdr hdr; /* SD_NDISC_OPTION_REDIRECTED_HEADER */
- uint32_t mtu; /* SD_NDISC_OPTION_MTU */
- sd_ndisc_route route; /* SD_NDISC_OPTION_ROUTE_INFORMATION */
- sd_ndisc_rdnss rdnss; /* SD_NDISC_OPTION_RDNSS */
- uint64_t extended_flags; /* SD_NDISC_OPTION_FLAGS_EXTENSION */
- sd_ndisc_dnssl dnssl; /* SD_NDISC_OPTION_DNSSL */
- char *captive_portal; /* SD_NDISC_OPTION_CAPTIVE_PORTAL */
- sd_ndisc_prefix64 prefix64; /* SD_NDISC_OPTION_PREF64 */
+ sd_ndisc_raw raw; /* for testing or unsupported options */
+ struct ether_addr mac; /* SD_NDISC_OPTION_SOURCE_LL_ADDRESS or SD_NDISC_OPTION_TARGET_LL_ADDRESS */
+ sd_ndisc_prefix prefix; /* SD_NDISC_OPTION_PREFIX_INFORMATION */
+ struct ip6_hdr hdr; /* SD_NDISC_OPTION_REDIRECTED_HEADER */
+ uint32_t mtu; /* SD_NDISC_OPTION_MTU */
+ sd_ndisc_home_agent home_agent; /* SD_NDISC_OPTION_HOME_AGENT */
+ sd_ndisc_route route; /* SD_NDISC_OPTION_ROUTE_INFORMATION */
+ sd_ndisc_rdnss rdnss; /* SD_NDISC_OPTION_RDNSS */
+ uint64_t extended_flags; /* SD_NDISC_OPTION_FLAGS_EXTENSION */
+ sd_ndisc_dnssl dnssl; /* SD_NDISC_OPTION_DNSSL */
+ char *captive_portal; /* SD_NDISC_OPTION_CAPTIVE_PORTAL */
+ sd_ndisc_prefix64 prefix64; /* SD_NDISC_OPTION_PREF64 */
};
} sd_ndisc_option;
@@ -150,6 +156,11 @@ int ndisc_option_add_mtu(
Set **options,
size_t offset,
uint32_t mtu);
+int ndisc_option_add_home_agent(
+ Set **options,
+ size_t offset,
+ uint16_t preference,
+ usec_t lifetime);
int ndisc_option_add_route(
Set **options,
size_t offset,