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
Kirill Smelkov
linux
Commits
5123f71c
Commit
5123f71c
authored
Mar 23, 2003
by
Hideaki Yoshifuji
Committed by
David S. Miller
Mar 23, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV6]: Use "const" qualifier.
parent
f05cd468
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
include/net/addrconf.h
include/net/addrconf.h
+3
-3
include/net/ipv6.h
include/net/ipv6.h
+7
-7
net/ipv6/addrconf.c
net/ipv6/addrconf.c
+2
-2
No files found.
include/net/addrconf.h
View file @
5123f71c
...
...
@@ -175,7 +175,7 @@ extern void addrconf_forwarding_on(void);
* Hash function taken from net_alias.c
*/
static
__inline__
u8
ipv6_addr_hash
(
struct
in6_addr
*
addr
)
static
__inline__
u8
ipv6_addr_hash
(
const
struct
in6_addr
*
addr
)
{
__u32
word
;
...
...
@@ -195,7 +195,7 @@ static __inline__ u8 ipv6_addr_hash(struct in6_addr *addr)
* compute link-local solicited-node multicast address
*/
static
inline
void
addrconf_addr_solict_mult
(
struct
in6_addr
*
addr
,
static
inline
void
addrconf_addr_solict_mult
(
const
struct
in6_addr
*
addr
,
struct
in6_addr
*
solicited
)
{
ipv6_addr_set
(
solicited
,
...
...
@@ -219,7 +219,7 @@ static inline void ipv6_addr_all_routers(struct in6_addr *addr)
__constant_htonl
(
0x2
));
}
static
inline
int
ipv6_addr_is_multicast
(
struct
in6_addr
*
addr
)
static
inline
int
ipv6_addr_is_multicast
(
const
struct
in6_addr
*
addr
)
{
return
(
addr
->
s6_addr32
[
0
]
&
__constant_htonl
(
0xFF000000
))
==
__constant_htonl
(
0xFF000000
);
}
...
...
include/net/ipv6.h
View file @
5123f71c
...
...
@@ -222,21 +222,21 @@ typedef int (*inet_getfrag_t) (const void *data,
unsigned
int
,
unsigned
int
);
extern
int
ipv6_addr_type
(
struct
in6_addr
*
addr
);
extern
int
ipv6_addr_type
(
const
struct
in6_addr
*
addr
);
static
inline
int
ipv6_addr_scope
(
struct
in6_addr
*
addr
)
static
inline
int
ipv6_addr_scope
(
const
struct
in6_addr
*
addr
)
{
return
ipv6_addr_type
(
addr
)
&
IPV6_ADDR_SCOPE_MASK
;
}
static
inline
int
ipv6_addr_cmp
(
struct
in6_addr
*
a1
,
struct
in6_addr
*
a2
)
static
inline
int
ipv6_addr_cmp
(
const
struct
in6_addr
*
a1
,
const
struct
in6_addr
*
a2
)
{
return
memcmp
((
void
*
)
a1
,
(
void
*
)
a2
,
sizeof
(
struct
in6_addr
));
return
memcmp
((
const
void
*
)
a1
,
(
const
void
*
)
a2
,
sizeof
(
struct
in6_addr
));
}
static
inline
void
ipv6_addr_copy
(
struct
in6_addr
*
a1
,
struct
in6_addr
*
a2
)
static
inline
void
ipv6_addr_copy
(
struct
in6_addr
*
a1
,
const
struct
in6_addr
*
a2
)
{
memcpy
((
void
*
)
a1
,
(
void
*
)
a2
,
sizeof
(
struct
in6_addr
));
memcpy
((
void
*
)
a1
,
(
const
void
*
)
a2
,
sizeof
(
struct
in6_addr
));
}
#ifndef __HAVE_ARCH_ADDR_SET
...
...
@@ -251,7 +251,7 @@ static inline void ipv6_addr_set(struct in6_addr *addr,
}
#endif
static
inline
int
ipv6_addr_any
(
struct
in6_addr
*
a
)
static
inline
int
ipv6_addr_any
(
const
struct
in6_addr
*
a
)
{
return
((
a
->
s6_addr32
[
0
]
|
a
->
s6_addr32
[
1
]
|
a
->
s6_addr32
[
2
]
|
a
->
s6_addr32
[
3
]
)
==
0
);
...
...
net/ipv6/addrconf.c
View file @
5123f71c
...
...
@@ -172,7 +172,7 @@ static struct ipv6_devconf ipv6_devconf_dflt =
const
struct
in6_addr
in6addr_any
=
IN6ADDR_ANY_INIT
;
const
struct
in6_addr
in6addr_loopback
=
IN6ADDR_LOOPBACK_INIT
;
int
ipv6_addr_type
(
struct
in6_addr
*
addr
)
int
ipv6_addr_type
(
const
struct
in6_addr
*
addr
)
{
int
type
;
u32
st
;
...
...
@@ -486,7 +486,7 @@ void inet6_ifa_finish_destroy(struct inet6_ifaddr *ifp)
/* On success it returns ifp with increased reference count */
static
struct
inet6_ifaddr
*
ipv6_add_addr
(
struct
inet6_dev
*
idev
,
struct
in6_addr
*
addr
,
int
pfxlen
,
ipv6_add_addr
(
struct
inet6_dev
*
idev
,
const
struct
in6_addr
*
addr
,
int
pfxlen
,
int
scope
,
unsigned
flags
)
{
struct
inet6_ifaddr
*
ifa
;
...
...
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