Deleted Added
full compact
print-sctp.c (162017) print-sctp.c (172683)
1/* Copyright (c) 2001 NETLAB, Temple University
2 * Copyright (c) 2001 Protocol Engineering Lab, University of Delaware
3 *
4 * Jerry Heinz <gheinz@astro.temple.edu>
5 * John Fiore <jfiore@joda.cis.temple.edu>
6 * Armando L. Caro Jr. <acaro@cis.udel.edu>
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 21 unchanged lines hidden (view full) ---

30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 */
35
36#ifndef lint
37static const char rcsid[] _U_ =
1/* Copyright (c) 2001 NETLAB, Temple University
2 * Copyright (c) 2001 Protocol Engineering Lab, University of Delaware
3 *
4 * Jerry Heinz <gheinz@astro.temple.edu>
5 * John Fiore <jfiore@joda.cis.temple.edu>
6 * Armando L. Caro Jr. <acaro@cis.udel.edu>
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 21 unchanged lines hidden (view full) ---

30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 */
35
36#ifndef lint
37static const char rcsid[] _U_ =
38"@(#) $Header: /tcpdump/master/tcpdump/print-sctp.c,v 1.16.2.4 2005/07/07 01:24:38 guy Exp $ (NETLAB/PEL)";
38"@(#) $Header: /tcpdump/master/tcpdump/print-sctp.c,v 1.16.2.5 2007/09/13 18:04:58 guy Exp $ (NETLAB/PEL)";
39#endif
40
41#ifdef HAVE_CONFIG_H
42#include "config.h"
43#endif
44
45#include <tcpdump-stdinc.h>
46

--- 154 unchanged lines hidden (view full) ---

201 printf("[Payload");
202
203 if (!suppress_default_print) {
204 payloadPtr = (const u_char *) (++dataHdrPtr);
205 printf(":");
206 if (htons(chunkDescPtr->chunkLength) <
207 sizeof(struct sctpDataPart)+
208 sizeof(struct sctpChunkDesc)+1) {
39#endif
40
41#ifdef HAVE_CONFIG_H
42#include "config.h"
43#endif
44
45#include <tcpdump-stdinc.h>
46

--- 154 unchanged lines hidden (view full) ---

201 printf("[Payload");
202
203 if (!suppress_default_print) {
204 payloadPtr = (const u_char *) (++dataHdrPtr);
205 printf(":");
206 if (htons(chunkDescPtr->chunkLength) <
207 sizeof(struct sctpDataPart)+
208 sizeof(struct sctpChunkDesc)+1) {
209 /* Less than 1 byte of chunk payload */
209 printf("bogus chunk length %u]",
210 htons(chunkDescPtr->chunkLength));
211 return;
212 }
213 default_print(payloadPtr,
214 htons(chunkDescPtr->chunkLength) -
215 (sizeof(struct sctpDataPart)+
210 printf("bogus chunk length %u]",
211 htons(chunkDescPtr->chunkLength));
212 return;
213 }
214 default_print(payloadPtr,
215 htons(chunkDescPtr->chunkLength) -
216 (sizeof(struct sctpDataPart)+
216 sizeof(struct sctpChunkDesc)+1));
217 sizeof(struct sctpChunkDesc)));
217 } else
218 printf("]");
219 }
220 break;
221 }
222 case SCTP_INITIATION :
223 {
224 const struct sctpInitiation *init;

--- 134 unchanged lines hidden ---
218 } else
219 printf("]");
220 }
221 break;
222 }
223 case SCTP_INITIATION :
224 {
225 const struct sctpInitiation *init;

--- 134 unchanged lines hidden ---