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
951fc9df
Commit
951fc9df
authored
Dec 31, 2003
by
Ingo Molnar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Do type checking in {udp,inet6,raw6,inet}_sk().
parent
12173d80
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
include/linux/ip.h
include/linux/ip.h
+4
-1
include/linux/ipv6.h
include/linux/ipv6.h
+9
-2
include/linux/udp.h
include/linux/udp.h
+4
-1
No files found.
include/linux/ip.h
View file @
951fc9df
...
@@ -159,7 +159,10 @@ struct inet_sock {
...
@@ -159,7 +159,10 @@ struct inet_sock {
struct
inet_opt
inet
;
struct
inet_opt
inet
;
};
};
#define inet_sk(__sk) (&((struct inet_sock *)__sk)->inet)
static
inline
struct
inet_opt
*
inet_sk
(
const
struct
sock
*
__sk
)
{
return
&
((
struct
inet_sock
*
)
__sk
)
->
inet
;
}
#endif
#endif
...
...
include/linux/ipv6.h
View file @
951fc9df
...
@@ -270,8 +270,15 @@ struct tcp6_sock {
...
@@ -270,8 +270,15 @@ struct tcp6_sock {
struct
ipv6_pinfo
inet6
;
struct
ipv6_pinfo
inet6
;
};
};
#define inet6_sk(__sk) ((struct raw6_sock *)__sk)->pinet6
static
inline
struct
ipv6_pinfo
*
inet6_sk
(
const
struct
sock
*
__sk
)
#define raw6_sk(__sk) (&((struct raw6_sock *)__sk)->raw6)
{
return
((
struct
raw6_sock
*
)
__sk
)
->
pinet6
;
}
static
inline
struct
raw6_opt
*
raw6_sk
(
const
struct
sock
*
__sk
)
{
return
&
((
struct
raw6_sock
*
)
__sk
)
->
raw6
;
}
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
#define __ipv6_only_sock(sk) (inet6_sk(sk)->ipv6only)
#define __ipv6_only_sock(sk) (inet6_sk(sk)->ipv6only)
...
...
include/linux/udp.h
View file @
951fc9df
...
@@ -60,7 +60,10 @@ struct udp_sock {
...
@@ -60,7 +60,10 @@ struct udp_sock {
struct
udp_opt
udp
;
struct
udp_opt
udp
;
};
};
#define udp_sk(__sk) (&((struct udp_sock *)__sk)->udp)
static
inline
struct
udp_opt
*
udp_sk
(
const
struct
sock
*
__sk
)
{
return
&
((
struct
udp_sock
*
)
__sk
)
->
udp
;
}
#endif
#endif
...
...
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