summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2013-04-12 18:15:39 +0200
committerJiri Pirko <jiri@resnulli.us>2013-04-17 17:17:48 +0200
commit70540ef693a54785ff7696ff938943a4b272ec3f (patch)
tree51d3eff040fa531f7c7d53ebb8243f1b1c093a8e /include
parent266a76d719ed860972563b28645280a14eb53dcf (diff)
downloadlibndp-70540ef693a54785ff7696ff938943a4b272ec3f.tar.gz
add support for DNS Search List (rfc6106)
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Diffstat (limited to 'include')
-rw-r--r--include/ndp.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/ndp.h b/include/ndp.h
index c19e27f..d6603f4 100644
--- a/include/ndp.h
+++ b/include/ndp.h
@@ -107,6 +107,7 @@ enum ndp_msg_opt_type {
NDP_MSG_OPT_MTU, /* MTU */
NDP_MSG_OPT_ROUTE, /* Route Information */
NDP_MSG_OPT_RDNSS, /* Recursive DNS Server */
+ NDP_MSG_OPT_DNSSL, /* DNS Search List */
};
int ndp_msg_next_opt_offset(struct ndp_msg *msg, int offset,
@@ -145,6 +146,16 @@ struct in6_addr *ndp_msg_opt_rdnss_addr(struct ndp_msg *msg, int offset,
addr; \
addr = ndp_msg_opt_rdnss_addr(msg, offset, ++addr_index))
+uint32_t ndp_msg_opt_dnssl_lifetime(struct ndp_msg *msg, int offset);
+char *ndp_msg_opt_dnssl_domain(struct ndp_msg *msg, int offset,
+ int domain_index);
+
+#define ndp_msg_opt_dnssl_for_each_domain(domain, domain_index, msg, offset) \
+ for (domain_index = 0, \
+ domain = ndp_msg_opt_dnssl_domain(msg, offset, domain_index); \
+ domain; \
+ domain = ndp_msg_opt_dnssl_domain(msg, offset, ++domain_index))
+
typedef int (*ndp_msgrcv_handler_func_t)(struct ndp *ndp, struct ndp_msg *msg,
void *priv);
int ndp_msgrcv_handler_register(struct ndp *ndp, ndp_msgrcv_handler_func_t func,