From bd05cfa2aabf561bb41077d168746ffafedcf289 Mon Sep 17 00:00:00 2001 From: hoelscher <jens.hoelscher@fh-muenster.de> Date: Fri, 30 Oct 2015 16:29:27 +0100 Subject: [PATCH] styling changes --- gtests/net/packetdrill/sctp_chunk_to_string.c | 4 +++- .../tests/bsd/sctp/notifications/sctp_adaptation_event.pkt | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gtests/net/packetdrill/sctp_chunk_to_string.c b/gtests/net/packetdrill/sctp_chunk_to_string.c index e7216bec..56cfbc5d 100644 --- a/gtests/net/packetdrill/sctp_chunk_to_string.c +++ b/gtests/net/packetdrill/sctp_chunk_to_string.c @@ -344,6 +344,7 @@ static int sctp_adaptation_indication_parameter_to_string( char **error) { u16 length; + length = ntohs(parameter->length); if (length < sizeof(struct sctp_parameter)) { asprintf(error, "PARAMETER too short (type=0x%04x, length=%u)", @@ -353,7 +354,7 @@ static int sctp_adaptation_indication_parameter_to_string( fputs("ADAPTATION_INDICATION[", s); fprintf(s, "type=0x%04x, ", ntohs(parameter->type)); fprintf(s, "len=%hu, ", ntohs(parameter->length)); - fprintf(s, "val=%u", parameter->adaptation_code_point); + fprintf(s, "val=%u", ntohl(parameter->adaptation_code_point)); fputs("]", s); return STATUS_OK; } @@ -363,6 +364,7 @@ static int sctp_parameter_to_string(FILE *s, char **error) { int result; + switch (ntohs(parameter->type)) { case SCTP_HEARTBEAT_INFORMATION_PARAMETER_TYPE: result = sctp_heartbeat_information_parameter_to_string(s, diff --git a/gtests/net/packetdrill/tests/bsd/sctp/notifications/sctp_adaptation_event.pkt b/gtests/net/packetdrill/tests/bsd/sctp/notifications/sctp_adaptation_event.pkt index a0e7baf2..282b3838 100644 --- a/gtests/net/packetdrill/tests/bsd/sctp/notifications/sctp_adaptation_event.pkt +++ b/gtests/net/packetdrill/tests/bsd/sctp/notifications/sctp_adaptation_event.pkt @@ -16,9 +16,9 @@ COOKIE_PRESERVATIVE[incr=12345], SUPPORTED_ADDRESS_TYPES[types=[IPv4]]] -+0.0 > sctp: INIT_ACK[flgs=0, tag=2, a_rwnd=..., os=..., is=..., tsn=10, ...] -+0.1 < sctp: COOKIE_ECHO[flgs=0, len=..., val=...] -+0.0 > sctp: COOKIE_ACK[flgs=0] +* > sctp: INIT_ACK[flgs=0, tag=2, a_rwnd=..., os=..., is=..., tsn=10, ...] ++0.0 < sctp: COOKIE_ECHO[flgs=0, len=..., val=...] +* > sctp: COOKIE_ACK[flgs=0] +0.0 accept(3, ..., ...) = 4 -- GitLab