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
3ca3167c
Commit
3ca3167c
authored
Jan 13, 2005
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/acme/connection_sock-2.6
into nuts.davemloft.net:/disk1/BK/net-2.6
parents
812ab7f3
dfdae3a1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
28 deletions
+23
-28
include/linux/ipv6.h
include/linux/ipv6.h
+1
-2
include/linux/udp.h
include/linux/udp.h
+9
-13
net/ipv4/udp.c
net/ipv4/udp.c
+8
-8
net/ipv6/udp.c
net/ipv6/udp.c
+5
-5
No files found.
include/linux/ipv6.h
View file @
3ca3167c
...
...
@@ -262,8 +262,7 @@ struct raw6_sock {
};
struct
udp6_sock
{
struct
inet_sock
inet
;
struct
udp_opt
udp
;
struct
udp_sock
udp
;
struct
ipv6_pinfo
inet6
;
};
...
...
include/linux/udp.h
View file @
3ca3167c
...
...
@@ -40,26 +40,22 @@ struct udphdr {
#include <net/sock.h>
#include <linux/ip.h>
struct
udp_opt
{
int
pending
;
/* Any pending frames ? */
unsigned
int
corkflag
;
/* Cork is required */
__u16
encap_type
;
/* Is this an Encapsulation socket? */
struct
udp_sock
{
/* inet_sock has to be the first member */
struct
inet_sock
inet
;
int
pending
;
/* Any pending frames ? */
unsigned
int
corkflag
;
/* Cork is required */
__u16
encap_type
;
/* Is this an Encapsulation socket? */
/*
* Following member retains the infomation to create a UDP header
* when the socket is uncorked.
*/
__u16
len
;
/* total length of pending frames */
};
/* WARNING: don't change the layout of the members in udp_sock! */
struct
udp_sock
{
struct
inet_sock
inet
;
struct
udp_opt
udp
;
__u16
len
;
/* total length of pending frames */
};
static
inline
struct
udp_
opt
*
udp_sk
(
const
struct
sock
*
__
sk
)
static
inline
struct
udp_
sock
*
udp_sk
(
const
struct
sock
*
sk
)
{
return
&
((
struct
udp_sock
*
)
__sk
)
->
udp
;
return
(
struct
udp_sock
*
)
sk
;
}
#endif
...
...
net/ipv4/udp.c
View file @
3ca3167c
...
...
@@ -386,7 +386,7 @@ void udp_err(struct sk_buff *skb, u32 info)
*/
static
void
udp_flush_pending_frames
(
struct
sock
*
sk
)
{
struct
udp_
opt
*
up
=
udp_sk
(
sk
);
struct
udp_
sock
*
up
=
udp_sk
(
sk
);
if
(
up
->
pending
)
{
up
->
len
=
0
;
...
...
@@ -398,7 +398,7 @@ static void udp_flush_pending_frames(struct sock *sk)
/*
* Push out all pending data as one UDP datagram. Socket is locked.
*/
static
int
udp_push_pending_frames
(
struct
sock
*
sk
,
struct
udp_
opt
*
up
)
static
int
udp_push_pending_frames
(
struct
sock
*
sk
,
struct
udp_
sock
*
up
)
{
struct
inet_sock
*
inet
=
inet_sk
(
sk
);
struct
flowi
*
fl
=
&
inet
->
cork
.
fl
;
...
...
@@ -483,7 +483,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
size_t
len
)
{
struct
inet_sock
*
inet
=
inet_sk
(
sk
);
struct
udp_
opt
*
up
=
udp_sk
(
sk
);
struct
udp_
sock
*
up
=
udp_sk
(
sk
);
int
ulen
=
len
;
struct
ipcm_cookie
ipc
;
struct
rtable
*
rt
=
NULL
;
...
...
@@ -672,7 +672,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
static
int
udp_sendpage
(
struct
sock
*
sk
,
struct
page
*
page
,
int
offset
,
size_t
size
,
int
flags
)
{
struct
udp_
opt
*
up
=
udp_sk
(
sk
);
struct
udp_
sock
*
up
=
udp_sk
(
sk
);
int
ret
;
if
(
!
up
->
pending
)
{
...
...
@@ -902,7 +902,7 @@ static int udp_encap_rcv(struct sock * sk, struct sk_buff *skb)
#ifndef CONFIG_XFRM
return
1
;
#else
struct
udp_
opt
*
up
=
udp_sk
(
sk
);
struct
udp_
sock
*
up
=
udp_sk
(
sk
);
struct
udphdr
*
uh
=
skb
->
h
.
uh
;
struct
iphdr
*
iph
;
int
iphlen
,
len
;
...
...
@@ -988,7 +988,7 @@ static int udp_encap_rcv(struct sock * sk, struct sk_buff *skb)
*/
static
int
udp_queue_rcv_skb
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
{
struct
udp_
opt
*
up
=
udp_sk
(
sk
);
struct
udp_
sock
*
up
=
udp_sk
(
sk
);
/*
* Charge it to the socket, dropping if the queue is full.
...
...
@@ -1223,7 +1223,7 @@ static int udp_destroy_sock(struct sock *sk)
static
int
udp_setsockopt
(
struct
sock
*
sk
,
int
level
,
int
optname
,
char
__user
*
optval
,
int
optlen
)
{
struct
udp_
opt
*
up
=
udp_sk
(
sk
);
struct
udp_
sock
*
up
=
udp_sk
(
sk
);
int
val
;
int
err
=
0
;
...
...
@@ -1272,7 +1272,7 @@ static int udp_setsockopt(struct sock *sk, int level, int optname,
static
int
udp_getsockopt
(
struct
sock
*
sk
,
int
level
,
int
optname
,
char
__user
*
optval
,
int
__user
*
optlen
)
{
struct
udp_
opt
*
up
=
udp_sk
(
sk
);
struct
udp_
sock
*
up
=
udp_sk
(
sk
);
int
val
,
len
;
if
(
level
!=
SOL_UDP
)
...
...
net/ipv6/udp.c
View file @
3ca3167c
...
...
@@ -549,7 +549,7 @@ static int udpv6_rcv(struct sk_buff **pskb, unsigned int *nhoffp)
*/
static
void
udp_v6_flush_pending_frames
(
struct
sock
*
sk
)
{
struct
udp_
opt
*
up
=
udp_sk
(
sk
);
struct
udp_
sock
*
up
=
udp_sk
(
sk
);
if
(
up
->
pending
)
{
up
->
len
=
0
;
...
...
@@ -562,7 +562,7 @@ static void udp_v6_flush_pending_frames(struct sock *sk)
* Sending
*/
static
int
udp_v6_push_pending_frames
(
struct
sock
*
sk
,
struct
udp_
opt
*
up
)
static
int
udp_v6_push_pending_frames
(
struct
sock
*
sk
,
struct
udp_
sock
*
up
)
{
struct
sk_buff
*
skb
;
struct
udphdr
*
uh
;
...
...
@@ -623,7 +623,7 @@ static int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk,
struct
msghdr
*
msg
,
size_t
len
)
{
struct
ipv6_txoptions
opt_space
;
struct
udp_
opt
*
up
=
udp_sk
(
sk
);
struct
udp_
sock
*
up
=
udp_sk
(
sk
);
struct
inet_sock
*
inet
=
inet_sk
(
sk
);
struct
ipv6_pinfo
*
np
=
inet6_sk
(
sk
);
struct
sockaddr_in6
*
sin6
=
(
struct
sockaddr_in6
*
)
msg
->
msg_name
;
...
...
@@ -878,7 +878,7 @@ static int udpv6_destroy_sock(struct sock *sk)
static
int
udpv6_setsockopt
(
struct
sock
*
sk
,
int
level
,
int
optname
,
char
__user
*
optval
,
int
optlen
)
{
struct
udp_
opt
*
up
=
udp_sk
(
sk
);
struct
udp_
sock
*
up
=
udp_sk
(
sk
);
int
val
;
int
err
=
0
;
...
...
@@ -925,7 +925,7 @@ static int udpv6_setsockopt(struct sock *sk, int level, int optname,
static
int
udpv6_getsockopt
(
struct
sock
*
sk
,
int
level
,
int
optname
,
char
__user
*
optval
,
int
__user
*
optlen
)
{
struct
udp_
opt
*
up
=
udp_sk
(
sk
);
struct
udp_
sock
*
up
=
udp_sk
(
sk
);
int
val
,
len
;
if
(
level
!=
SOL_UDP
)
...
...
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