#include "addrtoname.h"
#include "extract.h"
#include "ip.h"
-#ifdef INET6
#include "ip6.h"
-#endif
/* Definitions from:
*
{
const struct sctpHeader *sctpPktHdr;
const struct ip *ip;
-#ifdef INET6
const struct ip6_hdr *ip6;
-#endif
const void *endPacketPtr;
u_short sourcePort, destPort;
int chunkCount;
if( (u_long) endPacketPtr > (u_long) ndo->ndo_snapend)
endPacketPtr = (const void *) ndo->ndo_snapend;
ip = (const struct ip *)bp2;
-#ifdef INET6
if (IP_V(ip) == 6)
ip6 = (const struct ip6_hdr *)bp2;
else
ip6 = NULL;
-#endif /*INET6*/
ND_TCHECK(*sctpPktHdr);
if (sctpPacketLength < sizeof(struct sctpHeader))
sourcePort = EXTRACT_16BITS(&sctpPktHdr->source);
destPort = EXTRACT_16BITS(&sctpPktHdr->destination);
-#ifdef INET6
if (ip6) {
ND_PRINT((ndo, "%s.%d > %s.%d: sctp",
ip6addr_string(ndo, &ip6->ip6_src),
ip6addr_string(ndo, &ip6->ip6_dst),
destPort));
} else
-#endif /*INET6*/
{
ND_PRINT((ndo, "%s.%d > %s.%d: sctp",
ipaddr_string(ndo, &ip->ip_src),