Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
2fb3049c
Commit
2fb3049c
authored
Jun 25, 2003
by
Hideaki Yoshifuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV6]: Make several ndisc private stuff static.
parent
5da50850
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
21 deletions
+20
-21
include/net/ndisc.h
include/net/ndisc.h
+0
-14
net/ipv6/ndisc.c
net/ipv6/ndisc.c
+20
-7
No files found.
include/net/ndisc.h
View file @
2fb3049c
...
...
@@ -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
);
...
...
net/ipv6/ndisc.c
View file @
2fb3049c
...
...
@@ -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,8 +173,8 @@ 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
,
struct
nd_opt_hdr
*
end
)
st
atic
st
ruct
nd_opt_hdr
*
ndisc_next_option
(
struct
nd_opt_hdr
*
cur
,
struct
nd_opt_hdr
*
end
)
{
int
type
;
if
(
!
cur
||
!
end
||
cur
>=
end
)
...
...
@@ -173,8 +186,8 @@ 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
,
struct
ndisc_options
*
ndopts
)
st
atic
st
ruct
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment