ndisc.h (712cba5d87a6c0e980ee5fad45734e189c4d7151) ndisc.h (adc176c5472214971d77c1a61c83db9b01e9cdc7)
1#ifndef _NDISC_H
2#define _NDISC_H
3
4/*
5 * ICMP codes for neighbour discovery messages
6 */
7
8#define NDISC_ROUTER_SOLICITATION 133

--- 17 unchanged lines hidden (view full) ---

26
27enum {
28 __ND_OPT_PREFIX_INFO_END = 0,
29 ND_OPT_SOURCE_LL_ADDR = 1, /* RFC2461 */
30 ND_OPT_TARGET_LL_ADDR = 2, /* RFC2461 */
31 ND_OPT_PREFIX_INFO = 3, /* RFC2461 */
32 ND_OPT_REDIRECT_HDR = 4, /* RFC2461 */
33 ND_OPT_MTU = 5, /* RFC2461 */
1#ifndef _NDISC_H
2#define _NDISC_H
3
4/*
5 * ICMP codes for neighbour discovery messages
6 */
7
8#define NDISC_ROUTER_SOLICITATION 133

--- 17 unchanged lines hidden (view full) ---

26
27enum {
28 __ND_OPT_PREFIX_INFO_END = 0,
29 ND_OPT_SOURCE_LL_ADDR = 1, /* RFC2461 */
30 ND_OPT_TARGET_LL_ADDR = 2, /* RFC2461 */
31 ND_OPT_PREFIX_INFO = 3, /* RFC2461 */
32 ND_OPT_REDIRECT_HDR = 4, /* RFC2461 */
33 ND_OPT_MTU = 5, /* RFC2461 */
34 ND_OPT_NONCE = 14, /* RFC7527 */
34 __ND_OPT_ARRAY_MAX,
35 ND_OPT_ROUTE_INFO = 24, /* RFC4191 */
36 ND_OPT_RDNSS = 25, /* RFC5006 */
37 ND_OPT_DNSSL = 31, /* RFC6106 */
38 ND_OPT_6CO = 34, /* RFC6775 */
39 __ND_OPT_MAX
40};
41

--- 74 unchanged lines hidden (view full) ---

116};
117
118#define nd_opts_src_lladdr nd_opt_array[ND_OPT_SOURCE_LL_ADDR]
119#define nd_opts_tgt_lladdr nd_opt_array[ND_OPT_TARGET_LL_ADDR]
120#define nd_opts_pi nd_opt_array[ND_OPT_PREFIX_INFO]
121#define nd_opts_pi_end nd_opt_array[__ND_OPT_PREFIX_INFO_END]
122#define nd_opts_rh nd_opt_array[ND_OPT_REDIRECT_HDR]
123#define nd_opts_mtu nd_opt_array[ND_OPT_MTU]
35 __ND_OPT_ARRAY_MAX,
36 ND_OPT_ROUTE_INFO = 24, /* RFC4191 */
37 ND_OPT_RDNSS = 25, /* RFC5006 */
38 ND_OPT_DNSSL = 31, /* RFC6106 */
39 ND_OPT_6CO = 34, /* RFC6775 */
40 __ND_OPT_MAX
41};
42

--- 74 unchanged lines hidden (view full) ---

117};
118
119#define nd_opts_src_lladdr nd_opt_array[ND_OPT_SOURCE_LL_ADDR]
120#define nd_opts_tgt_lladdr nd_opt_array[ND_OPT_TARGET_LL_ADDR]
121#define nd_opts_pi nd_opt_array[ND_OPT_PREFIX_INFO]
122#define nd_opts_pi_end nd_opt_array[__ND_OPT_PREFIX_INFO_END]
123#define nd_opts_rh nd_opt_array[ND_OPT_REDIRECT_HDR]
124#define nd_opts_mtu nd_opt_array[ND_OPT_MTU]
125#define nd_opts_nonce nd_opt_array[ND_OPT_NONCE]
124#define nd_802154_opts_src_lladdr nd_802154_opt_array[ND_OPT_SOURCE_LL_ADDR]
125#define nd_802154_opts_tgt_lladdr nd_802154_opt_array[ND_OPT_TARGET_LL_ADDR]
126
127#define NDISC_OPT_SPACE(len) (((len)+2+7)&~7)
128
129struct ndisc_options *ndisc_parse_options(const struct net_device *dev,
130 u8 *opt, int opt_len,
131 struct ndisc_options *ndopts);

--- 261 unchanged lines hidden (view full) ---

393int ndisc_late_init(void);
394
395void ndisc_late_cleanup(void);
396void ndisc_cleanup(void);
397
398int ndisc_rcv(struct sk_buff *skb);
399
400void ndisc_send_ns(struct net_device *dev, const struct in6_addr *solicit,
126#define nd_802154_opts_src_lladdr nd_802154_opt_array[ND_OPT_SOURCE_LL_ADDR]
127#define nd_802154_opts_tgt_lladdr nd_802154_opt_array[ND_OPT_TARGET_LL_ADDR]
128
129#define NDISC_OPT_SPACE(len) (((len)+2+7)&~7)
130
131struct ndisc_options *ndisc_parse_options(const struct net_device *dev,
132 u8 *opt, int opt_len,
133 struct ndisc_options *ndopts);

--- 261 unchanged lines hidden (view full) ---

395int ndisc_late_init(void);
396
397void ndisc_late_cleanup(void);
398void ndisc_cleanup(void);
399
400int ndisc_rcv(struct sk_buff *skb);
401
402void ndisc_send_ns(struct net_device *dev, const struct in6_addr *solicit,
401 const struct in6_addr *daddr, const struct in6_addr *saddr);
403 const struct in6_addr *daddr, const struct in6_addr *saddr,
404 u64 nonce);
402
403void ndisc_send_rs(struct net_device *dev,
404 const struct in6_addr *saddr, const struct in6_addr *daddr);
405void ndisc_send_na(struct net_device *dev, const struct in6_addr *daddr,
406 const struct in6_addr *solicited_addr,
407 bool router, bool solicited, bool override, bool inc_opt);
408
409void ndisc_send_redirect(struct sk_buff *skb, const struct in6_addr *target);

--- 31 unchanged lines hidden ---
405
406void ndisc_send_rs(struct net_device *dev,
407 const struct in6_addr *saddr, const struct in6_addr *daddr);
408void ndisc_send_na(struct net_device *dev, const struct in6_addr *daddr,
409 const struct in6_addr *solicited_addr,
410 bool router, bool solicited, bool override, bool inc_opt);
411
412void ndisc_send_redirect(struct sk_buff *skb, const struct in6_addr *target);

--- 31 unchanged lines hidden ---