diff options
author | Jiri Pirko <jiri@resnulli.us> | 2013-04-05 14:37:35 +0200 |
---|---|---|
committer | Jiri Pirko <jiri@resnulli.us> | 2013-04-05 16:30:16 +0200 |
commit | 8296a5bf075543eef2167afdfecb222e70866744 (patch) | |
tree | 7a7818d470a192ff84583dde4f94ec86e7e6bdfa /include | |
parent | 49739ab207af9b134dbc57fe613f7ae2cf45594b (diff) | |
download | libndp-8296a5bf075543eef2167afdfecb222e70866744.tar.gz |
add support for Route Information Option (rfc4191)
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Diffstat (limited to 'include')
-rw-r--r-- | include/ndp.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/ndp.h b/include/ndp.h index de1ea58..1c53358 100644 --- a/include/ndp.h +++ b/include/ndp.h @@ -52,6 +52,12 @@ enum ndp_msg_type { NDP_MSG_ALL, /* Matches all */ }; +enum ndp_route_preference { + NDP_ROUTE_PREF_LOW = 3, + NDP_ROUTE_PREF_MEDIUM = 0, + NDP_ROUTE_PREF_HIGH = 1, +}; + int ndp_msg_new(struct ndp_msg **p_msg, enum ndp_msg_type msg_type); void ndp_msg_destroy(struct ndp_msg *msg); void *ndp_msg_payload(struct ndp_msg *msg); @@ -96,6 +102,7 @@ enum ndp_msg_opt_type { NDP_MSG_OPT_PREFIX, /* Prefix Information */ NDP_MSG_OPT_REDIR, /* Redirected Header */ NDP_MSG_OPT_MTU, /* MTU */ + NDP_MSG_OPT_ROUTE, /* Route Information */ }; int ndp_msg_next_opt_offset(struct ndp_msg *msg, int offset, @@ -118,6 +125,12 @@ uint32_t ndp_msg_opt_prefix_preferred_time(struct ndp_msg *msg, int offset); uint32_t ndp_msg_opt_mtu(struct ndp_msg *msg, int offset); +struct in6_addr *ndp_msg_opt_route_prefix(struct ndp_msg *msg, int offset); +uint8_t ndp_msg_opt_route_prefix_len(struct ndp_msg *msg, int offset); +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); + 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, |