Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
196ce521
Commit
196ce521
authored
Jan 10, 2012
by
Cyrill Gorcunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sockets: unix -- Retrieve backlog length for stream sockets
Signed-off-by:
Cyrill Gorcunov
<
gorcunov@openvz.org
>
parent
34b2ba0c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
sockets.c
sockets.c
+9
-4
No files found.
sockets.c
View file @
196ce521
...
...
@@ -46,6 +46,7 @@ struct unix_sk_desc {
unsigned
int
state
;
unsigned
int
peer_ino
;
unsigned
int
rqlen
;
unsigned
int
wqlen
;
unsigned
int
namelen
;
char
*
name
;
unsigned
int
*
icons
;
...
...
@@ -143,7 +144,6 @@ static int can_dump_unix_sk(struct unix_sk_desc *sk)
return
1
;
}
#define USK_DEF_BACKLOG 16
static
int
dump_one_unix
(
struct
socket_desc
*
_sk
,
char
*
fd
,
struct
cr_fdset
*
cr_fdset
)
{
struct
unix_sk_desc
*
sk
=
(
struct
unix_sk_desc
*
)
_sk
;
...
...
@@ -157,7 +157,7 @@ static int dump_one_unix(struct socket_desc *_sk, char *fd, struct cr_fdset *cr_
ue
.
type
=
sk
->
type
;
ue
.
state
=
sk
->
state
;
ue
.
namelen
=
sk
->
namelen
;
ue
.
backlog
=
USK_DEF_BACKLOG
;
/* FIXME */
ue
.
backlog
=
sk
->
wqlen
;
ue
.
pad
=
0
;
ue
.
peer
=
sk
->
peer_ino
;
...
...
@@ -284,8 +284,13 @@ static int unix_collect_one(struct unix_diag_msg *m, struct rtattr **tb)
d
->
icons
[
len
/
sizeof
(
u32
)]
=
0
;
}
if
(
tb
[
UNIX_DIAG_RQLEN
])
d
->
rqlen
=
*
(
int
*
)
RTA_DATA
(
tb
[
UNIX_DIAG_RQLEN
]);
if
(
tb
[
UNIX_DIAG_RQLEN
])
{
struct
unix_diag_rqlen
*
rq
;
rq
=
(
struct
unix_diag_rqlen
*
)
RTA_DATA
(
tb
[
UNIX_DIAG_RQLEN
]);
d
->
rqlen
=
rq
->
udiag_rqueue
;
d
->
wqlen
=
rq
->
udiag_wqueue
;
}
show_one_unix
(
"Collected"
,
d
);
...
...
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