Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Packetdrill_tarr_ext
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stefan Gense
Packetdrill_tarr_ext
Commits
15eff0eb
Commit
15eff0eb
authored
9 years ago
by
hoelscher
Browse files
Options
Downloads
Plain Diff
merge with nplab
parents
01750660
69073f4d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gtests/net/packetdrill/run_system_call.c
+38
-35
38 additions, 35 deletions
gtests/net/packetdrill/run_system_call.c
gtests/net/packetdrill/tests/bsd/sctp/recvmsg.pkt
+1
-0
1 addition, 0 deletions
gtests/net/packetdrill/tests/bsd/sctp/recvmsg.pkt
with
39 additions
and
35 deletions
gtests/net/packetdrill/run_system_call.c
+
38
−
35
View file @
15eff0eb
...
...
@@ -58,18 +58,18 @@ struct sctp_tlv {
#if defined(__FreeBSD__) || defined(linux)
static
int
check_sctp_notification
(
struct
iovec
*
iov
,
struct
expression
*
iovec_expr
,
char
**
error
);
#endif
#if defined(__FreeBSD__)
static
int
parse_expression_to_sctp_initmsg
(
struct
expression
*
expr
,
struct
sctp_initmsg
*
init
,
char
**
error
);
static
int
parse_expression_to_sctp_sndrcvinfo
(
struct
expression
*
expr
,
struct
sctp_sndrcvinfo
*
info
,
char
**
error
);
#endif
#if defined(__FreeBSD__)
static
int
parse_expression_to_sctp_sndinfo
(
struct
expression
*
expr
,
struct
sctp_sndinfo
*
info
,
char
**
error
);
static
int
parse_expression_to_sctp_prinfo
(
struct
expression
*
expr
,
struct
sctp_prinfo
*
info
,
char
**
error
);
static
int
parse_expression_to_sctp_authinfo
(
struct
expression
*
expr
,
struct
sctp_authinfo
*
info
,
char
**
error
);
static
int
parse_expression_to_sctp_sndrcvinfo
(
struct
expression
*
expr
,
struct
sctp_sndrcvinfo
*
info
,
char
**
error
);
#endif
#if defined(SCTP_DEFAULT_SNDINFO) || defined(SCTP_SNDINFO)
static
int
check_sctp_sndinfo
(
struct
sctp_sndinfo_expr
*
expr
,
struct
sctp_sndinfo
*
sctp_sndinfo
,
...
...
@@ -79,16 +79,17 @@ static int check_sctp_sndinfo(struct sctp_sndinfo_expr *expr, struct sctp_sndinf
static
int
check_sctp_initmsg
(
struct
sctp_initmsg_expr
*
expr
,
struct
sctp_initmsg
*
sctp_initmsg
,
char
**
error
);
#endif
#if defined(Linux) || defined(__FreeBSD__)
static
int
check_sctp_sndrcvinfo
(
struct
sctp_sndrcvinfo_expr
*
expr
,
struct
sctp_sndrcvinfo
*
sctp_sndrcvinfo
,
char
**
error
);
#endif
#if defined(Linux) || defined(__FreeBSD__)
#if defined(linux) || defined(__FreeBSD__)
static
int
check_sctp_rcvinfo
(
struct
sctp_rcvinfo_expr
*
expr
,
struct
sctp_rcvinfo
*
sctp_rcvinfo
,
char
**
error
);
#endif
#if defined(Linux) || defined(__FreeBSD__)
static
int
check_sctp_nxtinfo
(
struct
sctp_nxtinfo_expr
*
expr
,
struct
sctp_nxtinfo
*
sctp_nxtinfo
,
char
**
error
);
#endif
#if defined(linux) || defined(__FreeBSD__)
static
int
check_sctp_sndrcvinfo
(
struct
sctp_sndrcvinfo_expr
*
expr
,
struct
sctp_sndrcvinfo
*
sctp_sndrcvinfo
,
char
**
error
);
#endif
...
...
@@ -3498,31 +3499,7 @@ static int syscall_sctp_recvmsg(struct state *state, struct syscall_spec *syscal
#endif
}
#if defined(__FreeBSD__)
static
int
parse_expression_to_sctp_sndinfo
(
struct
expression
*
expr
,
struct
sctp_sndinfo
*
info
,
char
**
error
)
{
if
(
expr
->
type
==
EXPR_SCTP_SNDINFO
)
{
struct
sctp_sndinfo_expr
*
sndinfo_expr
=
expr
->
value
.
sctp_sndinfo
;
if
(
get_u16
(
sndinfo_expr
->
snd_sid
,
&
info
->
snd_sid
,
error
))
{
return
STATUS_ERR
;
}
if
(
get_u16
(
sndinfo_expr
->
snd_flags
,
&
info
->
snd_flags
,
error
))
{
return
STATUS_ERR
;
}
if
(
get_u32
(
sndinfo_expr
->
snd_ppid
,
&
info
->
snd_ppid
,
error
))
{
return
STATUS_ERR
;
}
if
(
get_u32
(
sndinfo_expr
->
snd_context
,
&
info
->
snd_context
,
error
))
{
return
STATUS_ERR
;
}
if
(
get_u32
(
sndinfo_expr
->
snd_assoc_id
,
&
info
->
snd_assoc_id
,
error
))
{
return
STATUS_ERR
;
}
}
else
{
return
STATUS_ERR
;
}
return
STATUS_OK
;
}
#if defined(__FreeBSD__) || defined(linux)
static
int
parse_expression_to_sctp_initmsg
(
struct
expression
*
expr
,
struct
sctp_initmsg
*
init
,
char
**
error
)
{
if
(
expr
->
type
==
EXPR_SCTP_INITMSG
)
{
struct
sctp_initmsg_expr
*
init_expr
=
expr
->
value
.
sctp_initmsg
;
...
...
@@ -3571,7 +3548,33 @@ static int parse_expression_to_sctp_sndrcvinfo(struct expression *expr, struct s
if
(
get_u32
(
sndrcvinfo_expr
->
sinfo_cumtsn
,
&
info
->
sinfo_cumtsn
,
error
))
{
return
STATUS_ERR
;
}
if
(
get_u32
(
sndrcvinfo_expr
->
sinfo_assoc_id
,
&
info
->
sinfo_assoc_id
,
error
))
{
if
(
get_u32
(
sndrcvinfo_expr
->
sinfo_assoc_id
,
(
u32
*
)
&
info
->
sinfo_assoc_id
,
error
))
{
return
STATUS_ERR
;
}
}
else
{
return
STATUS_ERR
;
}
return
STATUS_OK
;
}
#endif
#if defined(__FreeBSD__)
static
int
parse_expression_to_sctp_sndinfo
(
struct
expression
*
expr
,
struct
sctp_sndinfo
*
info
,
char
**
error
)
{
if
(
expr
->
type
==
EXPR_SCTP_SNDINFO
)
{
struct
sctp_sndinfo_expr
*
sndinfo_expr
=
expr
->
value
.
sctp_sndinfo
;
if
(
get_u16
(
sndinfo_expr
->
snd_sid
,
&
info
->
snd_sid
,
error
))
{
return
STATUS_ERR
;
}
if
(
get_u16
(
sndinfo_expr
->
snd_flags
,
&
info
->
snd_flags
,
error
))
{
return
STATUS_ERR
;
}
if
(
get_u32
(
sndinfo_expr
->
snd_ppid
,
&
info
->
snd_ppid
,
error
))
{
return
STATUS_ERR
;
}
if
(
get_u32
(
sndinfo_expr
->
snd_context
,
&
info
->
snd_context
,
error
))
{
return
STATUS_ERR
;
}
if
(
get_u32
(
sndinfo_expr
->
snd_assoc_id
,
&
info
->
snd_assoc_id
,
error
))
{
return
STATUS_ERR
;
}
}
else
{
...
...
This diff is collapsed.
Click to expand it.
gtests/net/packetdrill/tests/bsd/sctp/recvmsg.pkt
+
1
−
0
View file @
15eff0eb
...
...
@@ -52,3 +52,4 @@ spp_hbinterval=0, spp_pathmaxrxt=8, spp_pathmtu=1468, spp_flags=SPP_HB_DISABLE,
{cmsg_len=28, cmsg_level=IPPROTO_SCTP, cmsg_type=SCTP_NXTINFO, cmsg_data=
{nxt_sid=0, nxt_flags=SCTP_COMPLETE, nxt_ppid=htonl(9876), nxt_length=1000, nxt_assoc_id=3}
}] ,msg_flags=MSG_EOR}, 0) = 1000
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment