X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/513f782ae18791f0c925b9235da749b38159b607..0b3880c91e169db7cfbdce1b18ef4f1e3fd277de:/print-sctp.c diff --git a/print-sctp.c b/print-sctp.c index ae86e50c..19ffd74b 100644 --- a/print-sctp.c +++ b/print-sctp.c @@ -36,7 +36,7 @@ /* \summary: Stream Control Transmission Protocol (SCTP) printer */ #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif #include "netdissect-stdinc.h" @@ -89,7 +89,7 @@ * qxie1@email.mot.com * * Any bugs reported given to us we will try to fix... any fixes shared will - * be incorperated into the next SCTP release. + * be incorporated into the next SCTP release. */ /* The valid defines for all message @@ -249,7 +249,7 @@ struct sctpSendableInit{ /* Selective Acknowledgement * has the following structure with - * a optional ammount of trailing int's + * a optional amount of trailing int's * on the last part (based on the numberOfDesc * field). */ @@ -434,7 +434,8 @@ static const struct tok PayloadProto_idents[] = { }; -static inline int isForCES_port(u_short Port) +static int +isForCES_port(u_short Port) { if (Port == CHAN_HP) return 1; @@ -463,6 +464,7 @@ sctp_print(netdissect_options *ndo, const char *sep; int isforces = 0; + ndo->ndo_protocol = "sctp"; if (sctpPacketLength < sizeof(struct sctpHeader)) { ND_PRINT("truncated-sctp - %ld bytes missing!", @@ -484,16 +486,16 @@ sctp_print(netdissect_options *ndo, if (ip6) { ND_PRINT("%s.%u > %s.%u: sctp", - ip6addr_string(ndo, &ip6->ip6_src), + ip6addr_string(ndo, ip6->ip6_src), sourcePort, - ip6addr_string(ndo, &ip6->ip6_dst), + ip6addr_string(ndo, ip6->ip6_dst), destPort); } else { ND_PRINT("%s.%u > %s.%u: sctp", - ipaddr_string(ndo, &ip->ip_src), + ipaddr_string(ndo, ip->ip_src), sourcePort, - ipaddr_string(ndo, &ip->ip_dst), + ipaddr_string(ndo, ip->ip_dst), destPort); } @@ -766,5 +768,5 @@ sctp_print(netdissect_options *ndo, return; trunc: - ND_PRINT("[|sctp]"); + nd_print_trunc(ndo); }