4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that: (1) source code
6 * distributions retain the above copyright notice and this paragraph
7 * in its entirety, and (2) distributions including binary code include
8 * the above copyright notice and this paragraph in its entirety in
9 * the documentation or other materials provided with the distribution.
10 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
11 * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
12 * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
13 * FOR A PARTICULAR PURPOSE.
15 * Original code by Hannes Gredler (hannes@juniper.net)
18 #include <sys/cdefs.h>
21 static const char rcsid
[] _U_
=
22 "@(#) Header: /tcpdump/master/tcpdump/print-sip.c,v 1.1 2004/07/27 17:04:20 hannes Exp";
24 __RCSID("$NetBSD: tcpdump2rcsid.ex,v 1.1 2001/06/25 20:09:58 itojun Exp $");
32 #include <tcpdump-stdinc.h>
37 #include "interface.h"
43 sip_print(register const u_char
*pptr
, register u_int len
)
47 printf("SIP, length: %u%s", len
, vflag
? "\n\t" : "");
49 /* in non-verbose mode just lets print the protocol and length */
53 for (idx
= 0; idx
< len
; idx
++) {
54 if (EXTRACT_16BITS(pptr
+idx
) != 0x0d0a) { /* linefeed ? */
55 safeputchar(*(pptr
+idx
));
62 /* do we want to see an additionally hexdump ? */
64 print_unknown_data(pptr
,"\n\t",len
);