diff options
author | Jiri Pirko <jiri@resnulli.us> | 2013-04-11 17:11:02 +0200 |
---|---|---|
committer | Jiri Pirko <jiri@resnulli.us> | 2013-04-12 16:58:49 +0200 |
commit | 2cc9aea1d36fcc1ad66b5e77d56431a51ea8d8ea (patch) | |
tree | 0dc181bed5bc6ca3701f79bf512f9d8559b85436 /include | |
parent | 936550245e9168fe11dd027c47dc3fecb2625c18 (diff) | |
download | libndp-2cc9aea1d36fcc1ad66b5e77d56431a51ea8d8ea.tar.gz |
add support for Recursive DNS Server (rfc6106)
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Diffstat (limited to 'include')
-rw-r--r-- | include/ndp.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/ndp.h b/include/ndp.h index 6ce2c8b..c19e27f 100644 --- a/include/ndp.h +++ b/include/ndp.h @@ -106,6 +106,7 @@ enum ndp_msg_opt_type { NDP_MSG_OPT_REDIR, /* Redirected Header */ NDP_MSG_OPT_MTU, /* MTU */ NDP_MSG_OPT_ROUTE, /* Route Information */ + NDP_MSG_OPT_RDNSS, /* Recursive DNS Server */ }; int ndp_msg_next_opt_offset(struct ndp_msg *msg, int offset, @@ -134,6 +135,16 @@ uint32_t ndp_msg_opt_route_lifetime(struct ndp_msg *msg, int offset); enum ndp_route_preference ndp_msg_opt_route_preference(struct ndp_msg *msg, int offset); +uint32_t ndp_msg_opt_rdnss_lifetime(struct ndp_msg *msg, int offset); +struct in6_addr *ndp_msg_opt_rdnss_addr(struct ndp_msg *msg, int offset, + int addr_index); + +#define ndp_msg_opt_rdnss_for_each_addr(addr, addr_index, msg, offset) \ + for (addr_index = 0, \ + addr = ndp_msg_opt_rdnss_addr(msg, offset, addr_index); \ + addr; \ + addr = ndp_msg_opt_rdnss_addr(msg, offset, ++addr_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, |