亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? print-sctp.c

?? TCPDUMP的C語言源代碼,是在數(shù)據(jù)鏈路層的應(yīng)用
?? C
字號:
/* Copyright (c) 2001 NETLAB, Temple University * Copyright (c) 2001 Protocol Engineering Lab, University of Delaware * * Jerry Heinz <gheinz@astro.temple.edu> * John Fiore <jfiore@joda.cis.temple.edu> * Armando L. Caro Jr. <acaro@cis.udel.edu> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * * 3. Neither the name of the University nor of the Laboratory may be used *    to endorse or promote products derived from this software without *    specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */#ifndef lintstatic const char rcsid[] _U_ ="@(#) $Header: /tcpdump/master/tcpdump/print-sctp.c,v 1.21 2007-09-13 18:03:49 guy Exp $ (NETLAB/PEL)";#endif#ifdef HAVE_CONFIG_H#include "config.h"#endif#include <tcpdump-stdinc.h>#include "sctpHeader.h"#include "sctpConstants.h"#include <assert.h>#include <stdio.h>#include <string.h>#include "interface.h"#include "addrtoname.h"#include "extract.h"			/* must come after interface.h */#include "ip.h"#ifdef INET6#include "ip6.h"#endifvoid sctp_print(const u_char *bp,        /* beginning of sctp packet */		const u_char *bp2,       /* beginning of enclosing */		u_int sctpPacketLength)  /* ip packet */{  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;  const struct sctpChunkDesc *chunkDescPtr;  const void *nextChunk;  const char *sep;  sctpPktHdr = (const struct sctpHeader*) bp;  endPacketPtr = (const u_char*)sctpPktHdr+sctpPacketLength;  if( (u_long) endPacketPtr > (u_long) snapend)    endPacketPtr = (const void *) snapend;  ip = (struct ip *)bp2;#ifdef INET6  if (IP_V(ip) == 6)    ip6 = (const struct ip6_hdr *)bp2;  else    ip6 = NULL;#endif /*INET6*/  TCHECK(*sctpPktHdr);  if (sctpPacketLength < sizeof(struct sctpHeader))    {      (void)printf("truncated-sctp - %ld bytes missing!",		   (long)sctpPacketLength-sizeof(struct sctpHeader));      return;    }  /*    sctpPacketLength -= sizeof(struct sctpHeader);  packet length  */  /*  			      is now only as long as the payload  */  sourcePort = EXTRACT_16BITS(&sctpPktHdr->source);  destPort = EXTRACT_16BITS(&sctpPktHdr->destination);#ifdef INET6  if (ip6) {    (void)printf("%s.%d > %s.%d: sctp",      ip6addr_string(&ip6->ip6_src),      sourcePort,      ip6addr_string(&ip6->ip6_dst),      destPort);  } else#endif /*INET6*/  {    (void)printf("%s.%d > %s.%d: sctp",      ipaddr_string(&ip->ip_src),      sourcePort,      ipaddr_string(&ip->ip_dst),      destPort);  }  fflush(stdout);  if (vflag >= 2)    sep = "\n\t";  else    sep = " (";  /* cycle through all chunks, printing information on each one */  for (chunkCount = 0,	 chunkDescPtr = (const struct sctpChunkDesc *)	    ((const u_char*) sctpPktHdr + sizeof(struct sctpHeader));       chunkDescPtr != NULL &&	 ( (const void *)	    ((const u_char *) chunkDescPtr + sizeof(struct sctpChunkDesc))	   <= endPacketPtr);       chunkDescPtr = (const struct sctpChunkDesc *) nextChunk, chunkCount++)    {      u_int16_t chunkLength;      const u_char *chunkEnd;      u_int16_t align;      TCHECK(*chunkDescPtr);      chunkLength = EXTRACT_16BITS(&chunkDescPtr->chunkLength);      if (chunkLength < sizeof(*chunkDescPtr)) {      	printf("%s%d) [Bad chunk length %u]", sep, chunkCount+1, chunkLength);      	break;      }      TCHECK2(*((u_int8_t *)chunkDescPtr), chunkLength);      chunkEnd = ((const u_char*)chunkDescPtr + chunkLength);      align=chunkLength % 4;      if (align != 0)	align = 4 - align;      nextChunk = (const void *) (chunkEnd + align);      printf("%s%d) ", sep, chunkCount+1);      switch (chunkDescPtr->chunkID)	{	case SCTP_DATA :	  {	    const struct sctpDataPart *dataHdrPtr;	    printf("[DATA] ");	    if ((chunkDescPtr->chunkFlg & SCTP_DATA_UNORDERED)		== SCTP_DATA_UNORDERED)	      printf("(U)");	    if ((chunkDescPtr->chunkFlg & SCTP_DATA_FIRST_FRAG)		== SCTP_DATA_FIRST_FRAG)	      printf("(B)");	    if ((chunkDescPtr->chunkFlg & SCTP_DATA_LAST_FRAG)		== SCTP_DATA_LAST_FRAG)	      printf("(E)");	    if( ((chunkDescPtr->chunkFlg & SCTP_DATA_UNORDERED)		 == SCTP_DATA_UNORDERED)		||		((chunkDescPtr->chunkFlg & SCTP_DATA_FIRST_FRAG)		 == SCTP_DATA_FIRST_FRAG)		||		((chunkDescPtr->chunkFlg & SCTP_DATA_LAST_FRAG)		 == SCTP_DATA_LAST_FRAG) )	      printf(" ");	    dataHdrPtr=(const struct sctpDataPart*)(chunkDescPtr+1);	    printf("[TSN: %u] ", EXTRACT_32BITS(&dataHdrPtr->TSN));	    printf("[SID: %u] ", EXTRACT_16BITS(&dataHdrPtr->streamId));	    printf("[SSEQ %u] ", EXTRACT_16BITS(&dataHdrPtr->sequence));	    printf("[PPID 0x%x] ", EXTRACT_32BITS(&dataHdrPtr->payloadtype));	    fflush(stdout);	    if (vflag >= 2)	   /* if verbose output is specified */	      {		           /* at the command line */		const u_char *payloadPtr;		printf("[Payload");		if (!suppress_default_print) {			payloadPtr = (const u_char *) (++dataHdrPtr);			printf(":");			if (htons(chunkDescPtr->chunkLength) <			    sizeof(struct sctpDataPart)+			    sizeof(struct sctpChunkDesc)+1) {				/* Less than 1 byte of chunk payload */				printf("bogus chunk length %u]",				    htons(chunkDescPtr->chunkLength));				return;			}			default_print(payloadPtr,			      htons(chunkDescPtr->chunkLength) -			      (sizeof(struct sctpDataPart)+			      sizeof(struct sctpChunkDesc)));		} else			printf("]");	      }	    break;	  }	case SCTP_INITIATION :	  {	    const struct sctpInitiation *init;	    printf("[INIT] ");	    init=(const struct sctpInitiation*)(chunkDescPtr+1);	    printf("[init tag: %u] ", EXTRACT_32BITS(&init->initTag));	    printf("[rwnd: %u] ", EXTRACT_32BITS(&init->rcvWindowCredit));	    printf("[OS: %u] ", EXTRACT_16BITS(&init->NumPreopenStreams));	    printf("[MIS: %u] ", EXTRACT_16BITS(&init->MaxInboundStreams));	    printf("[init TSN: %u] ", EXTRACT_32BITS(&init->initialTSN));#if(0) /* ALC you can add code for optional params here */	    if( (init+1) < chunkEnd )	      printf(" @@@@@ UNFINISHED @@@@@@%s\n",		     "Optional params present, but not printed.");#endif	    break;	  }	case SCTP_INITIATION_ACK :	  {	    const struct sctpInitiation *init;	    printf("[INIT ACK] ");	    init=(const struct sctpInitiation*)(chunkDescPtr+1);	    printf("[init tag: %u] ", EXTRACT_32BITS(&init->initTag));	    printf("[rwnd: %u] ", EXTRACT_32BITS(&init->rcvWindowCredit));	    printf("[OS: %u] ", EXTRACT_16BITS(&init->NumPreopenStreams));	    printf("[MIS: %u] ", EXTRACT_16BITS(&init->MaxInboundStreams));	    printf("[init TSN: %u] ", EXTRACT_32BITS(&init->initialTSN));#if(0) /* ALC you can add code for optional params here */	    if( (init+1) < chunkEnd )	      printf(" @@@@@ UNFINISHED @@@@@@%s\n",		     "Optional params present, but not printed.");#endif	    break;	  }	case SCTP_SELECTIVE_ACK:	  {	    const struct sctpSelectiveAck *sack;	    const struct sctpSelectiveFrag *frag;	    int fragNo, tsnNo;	    const u_char *dupTSN;	    printf("[SACK] ");	    sack=(const struct sctpSelectiveAck*)(chunkDescPtr+1);	    printf("[cum ack %u] ", EXTRACT_32BITS(&sack->highestConseqTSN));	    printf("[a_rwnd %u] ", EXTRACT_32BITS(&sack->updatedRwnd));	    printf("[#gap acks %u] ", EXTRACT_16BITS(&sack->numberOfdesc));	    printf("[#dup tsns %u] ", EXTRACT_16BITS(&sack->numDupTsns));	    /* print gaps */	    for (frag = ( (const struct sctpSelectiveFrag *)			  ((const struct sctpSelectiveAck *) sack+1)),		   fragNo=0;		 (const void *)frag < nextChunk && fragNo < EXTRACT_16BITS(&sack->numberOfdesc);		 frag++, fragNo++)	      printf("\n\t\t[gap ack block #%d: start = %u, end = %u] ",		     fragNo+1,		     EXTRACT_32BITS(&sack->highestConseqTSN) + EXTRACT_16BITS(&frag->fragmentStart),		     EXTRACT_32BITS(&sack->highestConseqTSN) + EXTRACT_16BITS(&frag->fragmentEnd));	    /* print duplicate TSNs */	    for (dupTSN = (const u_char *)frag, tsnNo=0;		 (const void *) dupTSN < nextChunk && tsnNo<EXTRACT_16BITS(&sack->numDupTsns);		 dupTSN += 4, tsnNo++)	      printf("\n\t\t[dup TSN #%u: %u] ", tsnNo+1,	          EXTRACT_32BITS(dupTSN));	    break;	  }	case SCTP_HEARTBEAT_REQUEST :	  {	    const struct sctpHBsender *hb;	    hb=(const struct sctpHBsender*)chunkDescPtr;	    printf("[HB REQ] ");	    break;	  }	case SCTP_HEARTBEAT_ACK :	  printf("[HB ACK] ");	  break;	case SCTP_ABORT_ASSOCIATION :	  printf("[ABORT] ");	  break;	case SCTP_SHUTDOWN :	  printf("[SHUTDOWN] ");	  break;	case SCTP_SHUTDOWN_ACK :	  printf("[SHUTDOWN ACK] ");	  break;	case SCTP_OPERATION_ERR :	  printf("[OP ERR] ");	  break;	case SCTP_COOKIE_ECHO :	  printf("[COOKIE ECHO] ");	  break;	case SCTP_COOKIE_ACK :	  printf("[COOKIE ACK] ");	  break;	case SCTP_ECN_ECHO :	  printf("[ECN ECHO] ");	  break;	case SCTP_ECN_CWR :	  printf("[ECN CWR] ");	  break;	case SCTP_SHUTDOWN_COMPLETE :	  printf("[SHUTDOWN COMPLETE] ");	  break;	case SCTP_FORWARD_CUM_TSN :	  printf("[FOR CUM TSN] ");	  break;	case SCTP_RELIABLE_CNTL :	  printf("[REL CTRL] ");	  break;	case SCTP_RELIABLE_CNTL_ACK :	  printf("[REL CTRL ACK] ");	  break;	default :	  printf("[Unknown chunk type: 0x%x]", chunkDescPtr->chunkID);	  return;	}	if (vflag < 2)	  sep = ", (";    }    return;trunc:    printf("[|sctp]");    return;}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩三级电影网址| 国产精品青草综合久久久久99| 亚洲综合色自拍一区| 99久久免费视频.com| 中文字幕一区不卡| 欧美午夜精品电影| 午夜精品123| 欧美第一区第二区| 成人动漫一区二区在线| 亚洲欧美aⅴ...| 欧美区一区二区三区| 日韩va亚洲va欧美va久久| 日韩欧美国产一区二区在线播放| 经典三级在线一区| 国产精品视频线看| 欧美性受xxxx| 黄色资源网久久资源365| 国产亚洲成年网址在线观看| kk眼镜猥琐国模调教系列一区二区| 亚洲欧美另类图片小说| 欧美一区2区视频在线观看| 国产麻豆精品久久一二三| 日韩一区欧美一区| 欧美一级久久久久久久大片| 国产成人av影院| 亚洲一区在线观看免费观看电影高清| 日韩三级视频在线看| www.爱久久.com| 人人精品人人爱| 最好看的中文字幕久久| 日韩精品自拍偷拍| 91久久精品一区二区三| 国产在线视频一区二区三区| 亚洲自拍偷拍av| 欧美国产禁国产网站cc| 在线不卡一区二区| 波多野结衣亚洲| 国产精品二三区| 激情国产一区二区| 日韩免费一区二区三区在线播放| 国产传媒一区在线| 日韩一二在线观看| 亚洲福利一区二区| 色婷婷久久一区二区三区麻豆| 日韩免费一区二区三区在线播放| 亚洲成a人v欧美综合天堂| 色欧美片视频在线观看在线视频| 国产精品女同互慰在线看| 亚洲制服丝袜一区| 99久久国产免费看| 国产一区二区三区综合| 亚洲国产精品一区二区www在线 | 亚洲亚洲人成综合网络| 亚洲精品一区二区三区影院| 在线观看不卡一区| 99精品国产91久久久久久| 国产高清精品网站| 久久99久久久欧美国产| 午夜精品久久久久久久久久| 亚洲精品老司机| 国产精品护士白丝一区av| 久久精品日韩一区二区三区| 91精品国产手机| 欧美日韩精品电影| 色综合天天综合| 99精品偷自拍| 99国内精品久久| 成人黄色小视频在线观看| 国产激情一区二区三区| 国产在线不卡一卡二卡三卡四卡| 日本成人在线不卡视频| 麻豆国产精品官网| 免费精品99久久国产综合精品| 日韩av中文在线观看| 日韩电影免费一区| 日韩和欧美一区二区三区| 午夜精品爽啪视频| 日本成人在线不卡视频| 蜜桃传媒麻豆第一区在线观看| 免费成人深夜小野草| 久久成人免费网站| 国产精品一区二区无线| 国产成人夜色高潮福利影视| 国产精品一区二区三区网站| 成人黄色在线网站| 日本韩国一区二区三区视频| 色94色欧美sute亚洲线路一久| 日本韩国欧美国产| 欧美日韩在线电影| 日韩一区二区三区在线视频| 精品88久久久久88久久久 | 国产日韩精品一区二区浪潮av| 久久久精品欧美丰满| 国产日韩欧美制服另类| 国产精品久线观看视频| 精品国产网站在线观看| 日韩欧美一级二级三级| 国产欧美日韩在线看| 日本伊人色综合网| 日韩av午夜在线观看| 亚洲麻豆国产自偷在线| 亚洲丝袜精品丝袜在线| 国产精品理论在线观看| 综合av第一页| 自拍偷拍亚洲综合| 亚洲乱码国产乱码精品精98午夜| 国产日韩三级在线| 精品伊人久久久久7777人| 国产精品欧美一区二区三区| 亚洲美女淫视频| 蜜臀精品久久久久久蜜臀| 国产成人精品影视| 欧美色大人视频| 精品日本一线二线三线不卡| 中文字幕亚洲精品在线观看 | av在线播放成人| 欧美日本一道本| 中文乱码免费一区二区| 日韩精品成人一区二区在线| 成人国产在线观看| 555www色欧美视频| 国产欧美日产一区| 亚洲激情中文1区| 国产精品一二三区| 91.xcao| 国产精品九色蝌蚪自拍| 久久精品国产一区二区三| 91在线观看一区二区| 久久综合久久综合久久| 一区二区免费看| 成人午夜电影网站| 欧美一区在线视频| 亚洲精品高清在线| 高清视频一区二区| 欧美不卡激情三级在线观看| 亚洲一区免费观看| 91丨porny丨国产| 久久久久久黄色| 奇米精品一区二区三区四区| 色欧美日韩亚洲| 国产精品成人一区二区三区夜夜夜 | 精品视频色一区| 亚洲日本一区二区| 国产精品香蕉一区二区三区| 欧美一区二区精美| 亚洲bt欧美bt精品| 91麻豆精品在线观看| 国产欧美日韩另类视频免费观看| 日韩电影在线免费观看| 欧美日韩成人综合| 亚洲国产精品精华液网站| 色综合天天视频在线观看| 国产区在线观看成人精品| 激情文学综合插| 精品免费视频.| 欧美综合亚洲图片综合区| 欧美激情一区二区三区四区| 国产又粗又猛又爽又黄91精品| 2024国产精品视频| 国产成人免费在线视频| 亚洲影视在线播放| 欧美三级电影网| 精品一区二区在线视频| 中文字幕av一区二区三区免费看| 国内精品伊人久久久久av影院 | www.久久精品| 日韩欧美一区在线| 麻豆成人av在线| 欧美一级免费大片| 久久精品72免费观看| 欧美大片在线观看一区| 国产综合色产在线精品| 国产无遮挡一区二区三区毛片日本| 国产精品小仙女| 亚洲视频你懂的| 色成人在线视频| 丝袜美腿亚洲综合| 日韩三级高清在线| 国产成人鲁色资源国产91色综| 国产精品网站一区| 91蝌蚪porny成人天涯| 一区二区三区电影在线播| 在线观看视频一区二区| 视频一区二区不卡| 亚洲精品在线免费播放| 国产精品1024| 亚洲日本乱码在线观看| 在线看不卡av| 免费高清成人在线| 久久久亚洲国产美女国产盗摄 | eeuss影院一区二区三区| 樱花草国产18久久久久| 欧美日韩一区不卡| 国精产品一区一区三区mba桃花| 国产亚洲成av人在线观看导航| 色系网站成人免费| 美女视频黄频大全不卡视频在线播放| 久久久亚洲精华液精华液精华液| 色综合咪咪久久| 麻豆国产欧美一区二区三区|