From 360f3aeebcabf6d3ec4ea370e3992c6bad2308d6 Mon Sep 17 00:00:00 2001 From: Hoelscher <jens.hoelscher@fh-muenster.de> Date: Mon, 7 Mar 2016 15:27:54 +0100 Subject: [PATCH] add one testcase for sctp_reset_streams --- .../sctp/sctp_reconfig/sctp_reset_streams.pkt | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 gtests/net/packetdrill/tests/bsd/sctp/sctp_reconfig/sctp_reset_streams.pkt diff --git a/gtests/net/packetdrill/tests/bsd/sctp/sctp_reconfig/sctp_reset_streams.pkt b/gtests/net/packetdrill/tests/bsd/sctp/sctp_reconfig/sctp_reset_streams.pkt new file mode 100644 index 00000000..90731a2c --- /dev/null +++ b/gtests/net/packetdrill/tests/bsd/sctp/sctp_reconfig/sctp_reset_streams.pkt @@ -0,0 +1,71 @@ +--tolerance_usecs=100000 + + 0.0 socket(..., SOCK_STREAM, IPPROTO_SCTP) = 3 ++0.0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR) ++0.0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 ++0.0 bind(3, ..., ...) = 0 +// Check the handshake with an empty(!) cookie ++0.1 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress) ++0.0 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=1, ...] ++0.1 < sctp: INIT_ACK[flgs=0, tag=2, a_rwnd=1500, os=16, is=16, tsn=1, STATE_COOKIE[len=4, val=...]] ++0.0 > sctp: COOKIE_ECHO[flgs=0, len=4, val=...] ++0.1 < sctp: COOKIE_ACK[flgs=0] ++0.0 getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0 +//sendmsg(sd, msghdr, flags) + ++0.0 setsockopt(3, IPPROTO_SCTP, SCTP_PEER_ADDR_PARAMS, {spp_assoc_id=3, + spp_address={sa_family=AF_INET, + sin_port=htons(8080), + sin_addr=inet_addr("192.0.2.1")}, + spp_hbinterval=0, + spp_pathmaxrxt=8, + spp_pathmtu=1468, + spp_flags=SPP_HB_DISABLE, + spp_ipv6_flowlabel=0, + spp_dscp=0}, 152) = 0 + ++0 setsockopt(3, IPPROTO_SCTP, SCTP_ENABLE_STREAM_RESET, {assoc_id=0, assoc_value=SCTP_ENABLE_RESET_STREAM_REQ}, 8) = 0 + ++0.0 sctp_sendx(3, ..., 1000, ..., 1, {sinfo_stream=3, + sinfo_ssn=3, + sinfo_flags=0, + sinfo_ppid=htonl(1234), + sinfo_context=0, + sinfo_timetolive=0, + sinfo_tsn=2, + sinfo_cumtsn=2, + sinfo_assoc_id=3}, 0) = 1000 +* > sctp: DATA[flgs=BE, len=1016, tsn=1, sid=3, ssn=0, ppid=1234] ++0.0 < sctp: SACK[flgs=0, cum_tsn=1, a_rwnd=1500, gaps=[], dups=[]] + + ++0.0 sctp_sendx(3, ..., 1000, ..., 1, {sinfo_stream=3, + sinfo_ssn=3, + sinfo_flags=0, + sinfo_ppid=htonl(7), + sinfo_context=0, + sinfo_timetolive=0, + sinfo_tsn=1, + sinfo_cumtsn=6, + sinfo_assoc_id=3}, 0) = 1000 +* > sctp: DATA[flgs=BE, len=1016, tsn=2, sid=3, ssn=1, ppid=7] ++0.0 < sctp: SACK[flgs=0, cum_tsn=2, a_rwnd=1500, gaps=[], dups=[]] + ++0.0 sctp_sendx(3, ..., 1000, ..., 1, + {sinfo_stream=3, + sinfo_ssn=3, + sinfo_flags=0, + sinfo_ppid=htonl(7), + sinfo_context=0, + sinfo_timetolive=0, + sinfo_tsn=1, + sinfo_cumtsn=6, + sinfo_assoc_id=3}, 0) = 1000 +* > sctp: DATA[flgs=BE, len=1016, tsn=3, sid=3, ssn=2, ppid=7] ++0.0 < sctp: SACK[flgs=0, cum_tsn=3, a_rwnd=1500, gaps=[], dups=[]] + ++0 setsockopt(3, IPPROTO_SCTP, SCTP_RESET_STREAMS, {srs_flags=SCTP_STREAM_RESET_OUTGOING, + srs_number_streams=1, + srs_stream_list=[0]}, 10) = 0 + ++0 close(3) = 0 -- GitLab