Commit 2fb3049c authored by Hideaki Yoshifuji's avatar Hideaki Yoshifuji

[IPV6]: Make several ndisc private stuff static.

parent 5da50850
......@@ -56,20 +56,6 @@ struct nd_opt_hdr {
__u8 nd_opt_len;
} __attribute__((__packed__));
struct ndisc_options {
struct nd_opt_hdr *nd_opt_array[7];
struct nd_opt_hdr *nd_opt_piend;
};
#define nd_opts_src_lladdr nd_opt_array[ND_OPT_SOURCE_LL_ADDR]
#define nd_opts_tgt_lladdr nd_opt_array[ND_OPT_TARGET_LL_ADDR]
#define nd_opts_pi nd_opt_array[ND_OPT_PREFIX_INFO]
#define nd_opts_pi_end nd_opt_piend
#define nd_opts_rh nd_opt_array[ND_OPT_REDIRECT_HDR]
#define nd_opts_mtu nd_opt_array[ND_OPT_MTU]
extern struct nd_opt_hdr *ndisc_next_option(struct nd_opt_hdr *cur, struct nd_opt_hdr *end);
extern struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len, struct ndisc_options *ndopts);
extern int ndisc_init(struct net_proto_family *ops);
......
......@@ -144,6 +144,19 @@ struct neigh_table nd_tbl = {
.gc_thresh3 = 1024,
};
/* ND options */
struct ndisc_options {
struct nd_opt_hdr *nd_opt_array[7];
struct nd_opt_hdr *nd_opt_piend;
};
#define nd_opts_src_lladdr nd_opt_array[ND_OPT_SOURCE_LL_ADDR]
#define nd_opts_tgt_lladdr nd_opt_array[ND_OPT_TARGET_LL_ADDR]
#define nd_opts_pi nd_opt_array[ND_OPT_PREFIX_INFO]
#define nd_opts_pi_end nd_opt_piend
#define nd_opts_rh nd_opt_array[ND_OPT_REDIRECT_HDR]
#define nd_opts_mtu nd_opt_array[ND_OPT_MTU]
#define NDISC_OPT_SPACE(len) (((len)+2+7)&~7)
static u8 *ndisc_fill_option(u8 *opt, int type, void *data, int data_len)
......@@ -160,7 +173,7 @@ static u8 *ndisc_fill_option(u8 *opt, int type, void *data, int data_len)
return opt + space;
}
struct nd_opt_hdr *ndisc_next_option(struct nd_opt_hdr *cur,
static struct nd_opt_hdr *ndisc_next_option(struct nd_opt_hdr *cur,
struct nd_opt_hdr *end)
{
int type;
......@@ -173,7 +186,7 @@ struct nd_opt_hdr *ndisc_next_option(struct nd_opt_hdr *cur,
return (cur <= end && cur->nd_opt_type == type ? cur : NULL);
}
struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len,
static struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len,
struct ndisc_options *ndopts)
{
struct nd_opt_hdr *nd_opt = (struct nd_opt_hdr *)opt;
......@@ -375,7 +388,7 @@ ndisc_build_ll_hdr(struct sk_buff *skb, struct net_device *dev,
* Send a Neighbour Advertisement
*/
int ndisc_output(struct sk_buff *skb)
static int ndisc_output(struct sk_buff *skb)
{
if (skb) {
struct neighbour *neigh = (skb->dst ? skb->dst->neighbour : NULL);
......@@ -701,7 +714,7 @@ static void ndisc_solicit(struct neighbour *neigh, struct sk_buff *skb)
}
}
void ndisc_recv_ns(struct sk_buff *skb)
static void ndisc_recv_ns(struct sk_buff *skb)
{
struct nd_msg *msg = (struct nd_msg *)skb->h.raw;
struct in6_addr *saddr = &skb->nh.ipv6h->saddr;
......@@ -908,7 +921,7 @@ void ndisc_recv_ns(struct sk_buff *skb)
return;
}
void ndisc_recv_na(struct sk_buff *skb)
static void ndisc_recv_na(struct sk_buff *skb)
{
struct nd_msg *msg = (struct nd_msg *)skb->h.raw;
struct in6_addr *saddr = &skb->nh.ipv6h->saddr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment