From 64b6acac6dae4c18aa1aebf368923c4bef8ed221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Mayer?= Date: Wed, 28 Aug 2002 20:30:45 +0000 Subject: Removed trailing whitespaces from .h and .c files using the winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6115 --- wiretap/acconfig.h | 10 +-- wiretap/ascend-int.h | 8 +- wiretap/ascend.c | 34 +++---- wiretap/ascend.h | 8 +- wiretap/atm.c | 8 +- wiretap/atm.h | 8 +- wiretap/buffer.c | 8 +- wiretap/buffer.h | 8 +- wiretap/cosine.c | 230 +++++++++++++++++++++++------------------------ wiretap/cosine.h | 8 +- wiretap/csids.c | 44 ++++----- wiretap/csids.h | 8 +- wiretap/dbs-etherwatch.c | 12 +-- wiretap/dbs-etherwatch.h | 8 +- wiretap/etherpeek.c | 14 +-- wiretap/etherpeek.h | 8 +- wiretap/file_wrappers.c | 8 +- wiretap/file_wrappers.h | 8 +- wiretap/i4b_trace.h | 4 +- wiretap/i4btrace.h | 8 +- wiretap/iptrace.c | 8 +- wiretap/iptrace.h | 8 +- wiretap/lanalyzer.c | 10 +-- wiretap/lanalyzer.h | 4 +- wiretap/libpcap.c | 8 +- wiretap/libpcap.h | 10 +-- wiretap/netmon.c | 10 +-- wiretap/netmon.h | 8 +- wiretap/nettl.c | 32 +++---- wiretap/nettl.h | 8 +- wiretap/netxray.c | 24 ++--- wiretap/netxray.h | 8 +- wiretap/ngsniffer.c | 34 +++---- wiretap/ngsniffer.h | 8 +- wiretap/pppdump.c | 24 ++--- wiretap/pppdump.h | 8 +- wiretap/radcom.c | 8 +- wiretap/radcom.h | 8 +- wiretap/snoop.c | 10 +-- wiretap/snoop.h | 8 +- wiretap/toshiba.c | 118 ++++++++++++------------ wiretap/toshiba.h | 8 +- wiretap/visual.c | 46 +++++----- wiretap/visual.h | 8 +- wiretap/vms.c | 8 +- wiretap/wtap-capture.h | 8 +- wiretap/wtap-int.h | 8 +- wiretap/wtap.c | 10 +-- wiretap/wtap.h | 8 +- 49 files changed, 460 insertions(+), 460 deletions(-) diff --git a/wiretap/acconfig.h b/wiretap/acconfig.h index 7f318a2d77..1648fd60c6 100644 --- a/wiretap/acconfig.h +++ b/wiretap/acconfig.h @@ -1,20 +1,20 @@ /* acconfig.h * - * $Id: acconfig.h,v 1.7 2002/04/08 01:34:39 guy Exp $ + * $Id: acconfig.h,v 1.8 2002/08/28 20:30:44 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -24,5 +24,5 @@ #undef PACKAGE #undef VERSION - + #undef HAVE_LIBZ diff --git a/wiretap/ascend-int.h b/wiretap/ascend-int.h index 4e26e9980c..d7d7e0181b 100644 --- a/wiretap/ascend-int.h +++ b/wiretap/ascend-int.h @@ -2,23 +2,23 @@ * Definitions for routines common to multiple modules in the Lucent/Ascend * capture file reading code code, but not used outside that code. * - * $Id: ascend-int.h,v 1.8 2001/12/06 08:25:52 guy Exp $ + * $Id: ascend-int.h,v 1.9 2002/08/28 20:30:44 jmayer Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs * Copyright 1998 Gerald Combs * - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/ascend.c b/wiretap/ascend.c index f3f97388f1..c62b8d15e8 100644 --- a/wiretap/ascend.c +++ b/wiretap/ascend.c @@ -1,20 +1,20 @@ /* ascend.c * - * $Id: ascend.c,v 1.30 2002/06/07 07:27:34 guy Exp $ + * $Id: ascend.c,v 1.31 2002/08/28 20:30:44 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -50,17 +50,17 @@ around quite a bit, otherwise I'd put a more specific URL here. Example 'wandsess' output data: - + RECV-iguana:241:(task: B02614C0, time: 1975432.85) 49 octets @ 8003BD94 - [0000]: FF 03 00 3D C0 06 CA 22 2F 45 00 00 28 6A 3B 40 - [0010]: 00 3F 03 D7 37 CE 41 62 12 CF 00 FB 08 20 27 00 - [0020]: 50 E4 08 DD D7 7C 4C 71 92 50 10 7D 78 67 C8 00 - [0030]: 00 + [0000]: FF 03 00 3D C0 06 CA 22 2F 45 00 00 28 6A 3B 40 + [0010]: 00 3F 03 D7 37 CE 41 62 12 CF 00 FB 08 20 27 00 + [0020]: 50 E4 08 DD D7 7C 4C 71 92 50 10 7D 78 67 C8 00 + [0030]: 00 XMIT-iguana:241:(task: B04E12C0, time: 1975432.85) 53 octets @ 8009EB16 - [0000]: FF 03 00 3D C0 09 1E 31 21 45 00 00 2C 2D BD 40 - [0010]: 00 7A 06 D8 B1 CF 00 FB 08 CE 41 62 12 00 50 20 - [0020]: 29 7C 4C 71 9C 9A 6A 93 A4 60 12 22 38 3F 10 00 - [0030]: 00 02 04 05 B4 + [0000]: FF 03 00 3D C0 09 1E 31 21 45 00 00 2C 2D BD 40 + [0010]: 00 7A 06 D8 B1 CF 00 FB 08 CE 41 62 12 00 50 20 + [0020]: 29 7C 4C 71 9C 9A 6A 93 A4 60 12 22 38 3F 10 00 + [0030]: 00 02 04 05 B4 Example 'wdd' output data: @@ -80,8 +80,8 @@ WD_DIALOUT_DISP: chunk 2515EE type IP. Note that a maximum of eight rows will be displayed (for a maximum of 128 bytes), no matter what the octet count is. - - When reading a packet, the module prepends an ascend_pkt_hdr to the + + When reading a packet, the module prepends an ascend_pkt_hdr to the data. */ @@ -264,7 +264,7 @@ int ascend_open(wtap *wth, int *err) found it. */ wth->capture.ascend->next_packet_seek_start = offset; - /* MAXen and Pipelines report the time since reboot. In order to keep + /* MAXen and Pipelines report the time since reboot. In order to keep from reporting packet times near the epoch, we subtract the first packet's timestamp from the capture file's ctime, which gives us an offset that we can apply to each packet. @@ -290,7 +290,7 @@ static gboolean ascend_read(wtap *wth, int *err, long *data_offset) ascend_pkthdr header; /* (f)lex reads large chunks of the file into memory, so file_tell() doesn't - give us the correct location of the packet. Instead, we seek to the + give us the correct location of the packet. Instead, we seek to the offset after the header of the previous packet and try to find the next packet. */ if (file_seek(wth->fh, wth->capture.ascend->next_packet_seek_start, diff --git a/wiretap/ascend.h b/wiretap/ascend.h index 6e94dc5cff..50e2c89583 100644 --- a/wiretap/ascend.h +++ b/wiretap/ascend.h @@ -1,20 +1,20 @@ /* ascend.h * - * $Id: ascend.h,v 1.8 2001/11/13 23:55:43 gram Exp $ + * $Id: ascend.h,v 1.9 2002/08/28 20:30:44 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/atm.c b/wiretap/atm.c index cf95f14d1d..180cab0483 100644 --- a/wiretap/atm.c +++ b/wiretap/atm.c @@ -1,20 +1,20 @@ /* atm.c * - * $Id: atm.c,v 1.2 2002/08/13 03:32:56 guy Exp $ + * $Id: atm.c,v 1.3 2002/08/28 20:30:44 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/atm.h b/wiretap/atm.h index dca6db6f75..a405130d3d 100644 --- a/wiretap/atm.h +++ b/wiretap/atm.h @@ -1,20 +1,20 @@ /* atm.h * - * $Id: atm.h,v 1.2 2002/08/13 03:32:56 guy Exp $ + * $Id: atm.h,v 1.3 2002/08/28 20:30:44 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/buffer.c b/wiretap/buffer.c index aae0e8fffa..3b1a088057 100644 --- a/wiretap/buffer.c +++ b/wiretap/buffer.c @@ -1,20 +1,20 @@ /* buffer.c * - * $Id: buffer.c,v 1.13 2002/07/29 06:09:58 guy Exp $ + * $Id: buffer.c,v 1.14 2002/08/28 20:30:44 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/buffer.h b/wiretap/buffer.h index e8db0d80e6..b28eebf205 100644 --- a/wiretap/buffer.h +++ b/wiretap/buffer.h @@ -1,20 +1,20 @@ /* buffer.h * - * $Id: buffer.h,v 1.10 2002/07/29 06:09:58 guy Exp $ + * $Id: buffer.h,v 1.11 2002/08/28 20:30:44 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/cosine.c b/wiretap/cosine.c index d726fddade..3ad15f09c6 100644 --- a/wiretap/cosine.c +++ b/wiretap/cosine.c @@ -1,23 +1,23 @@ /* cosine.c * - * $Id: cosine.c,v 1.4 2002/08/16 00:41:39 guy Exp $ + * $Id: cosine.c,v 1.5 2002/08/28 20:30:44 jmayer Exp $ * * CoSine IPNOS L2 debug output parsing * Copyright (c) 2002 by Motonori Shindo * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -38,102 +38,102 @@ /* - IPNOS: CONFIG VPN(100) VR(1.1.1.1)# diags - ipnos diags: Control (1/0) :: layer-2 ? - Registered commands for area "layer-2" - apply-pkt-log-profile Configure packet logging on an interface - create-pkt-log-profile Set packet-log-profile to be used for packet logging (see layer-2 pkt-log) - detail Get Layer 2 low-level details + IPNOS: CONFIG VPN(100) VR(1.1.1.1)# diags + ipnos diags: Control (1/0) :: layer-2 ? + Registered commands for area "layer-2" + apply-pkt-log-profile Configure packet logging on an interface + create-pkt-log-profile Set packet-log-profile to be used for packet logging (see layer-2 pkt-log) + detail Get Layer 2 low-level details - ipnos diags: Control (1/0) :: layer-2 create ? + ipnos diags: Control (1/0) :: layer-2 create ? create-pkt-log-profile - ipnos diags: Control (1/0) :: layer-2 create 1 32 32 0 0 0 - ipnos diags: Control (1/0) :: layer-2 create 2 32 32 100 100 0 - ipnos diags: Control (1/0) :: layer-2 apply ? - apply-pkt-log-profile + ipnos diags: Control (1/0) :: layer-2 create 1 32 32 0 0 0 + ipnos diags: Control (1/0) :: layer-2 create 2 32 32 100 100 0 + ipnos diags: Control (1/0) :: layer-2 apply ? + apply-pkt-log-profile - ipnos diags: Control (1/0) :: layer-2 apply 3 0x0701 100 0 1 - Successfully applied packet-log-profile on LI + ipnos diags: Control (1/0) :: layer-2 apply 3 0x0701 100 0 1 + Successfully applied packet-log-profile on LI - -- Note that only the control packets are logged because the data packet size parameters are 0 in profile 1 - IPNOS: CONFIG VPN(200) VR(3.3.3.3)# ping 20.20.20.43 - vpn 200 : [max tries 4, timeout 5 seconds, data length 64 bytes, ttl 255] - ping #1 ok, RTT 0.000 seconds - ping #2 ok, RTT 0.000 seconds - ping #3 ok, RTT 0.000 seconds - ping #4 ok, RTT 0.000 seconds - [finished] + -- Note that only the control packets are logged because the data packet size parameters are 0 in profile 1 + IPNOS: CONFIG VPN(200) VR(3.3.3.3)# ping 20.20.20.43 + vpn 200 : [max tries 4, timeout 5 seconds, data length 64 bytes, ttl 255] + ping #1 ok, RTT 0.000 seconds + ping #2 ok, RTT 0.000 seconds + ping #3 ok, RTT 0.000 seconds + ping #4 ok, RTT 0.000 seconds + [finished] IPNOS: CONFIG VPN(200) VR(3.3.3.3)# 2000-2-1,18:19:46.8: l2-tx (PPP:3/7/1:100), Length:16, Pro:0, Off:0, Pri:0, RM:0, Err:0 [0x4000, 0x0] - - 2000-2-1,18:19:46.8: l2-rx (PPP:3/7/1:100), Length:16, Pro:0, Off:0, Pri:0, RM:0, Err:0 [0x4001, 0x30000] - - 2000-2-1,18:19:46.8: l2-tx (PPP:3/7/1:100), Length:16, Pro:0, Off:0, Pri:0, RM:0, Err:0 [0x4000, 0x0] - - 2000-2-1,18:19:46.8: l2-rx (PPP:3/7/1:100), Length:16, Pro:0, Off:0, Pri:0, RM:0, Err:0 [0x4001, 0x8030000] - ipnos diags: Control (1/0) :: layer-2 apply 3 0x0701 100 0 0 - Successfully applied packet-log-profile on LI - ipnos diags: Control (1/0) :: layer-2 apply 3 0x0701 100 0 2 - Successfully applied packet-log-profile on LI + 2000-2-1,18:19:46.8: l2-rx (PPP:3/7/1:100), Length:16, Pro:0, Off:0, Pri:0, RM:0, Err:0 [0x4001, 0x30000] + + 2000-2-1,18:19:46.8: l2-tx (PPP:3/7/1:100), Length:16, Pro:0, Off:0, Pri:0, RM:0, Err:0 [0x4000, 0x0] + + 2000-2-1,18:19:46.8: l2-rx (PPP:3/7/1:100), Length:16, Pro:0, Off:0, Pri:0, RM:0, Err:0 [0x4001, 0x8030000] - -- Note that both control and data packets are logged because the data packet size parameter is 100 in profile 2 + ipnos diags: Control (1/0) :: layer-2 apply 3 0x0701 100 0 0 + Successfully applied packet-log-profile on LI + ipnos diags: Control (1/0) :: layer-2 apply 3 0x0701 100 0 2 + Successfully applied packet-log-profile on LI + + -- Note that both control and data packets are logged because the data packet size parameter is 100 in profile 2 Please ignore the event-log messages getting mixed up with the ping command ping 20.20.20.43 cou2000-2-1,18:20:17.0: l2-tx (PPP:3/7/1:100), Length:16, Pro:0, Off:0, Pri:0, RM:0, Err:0 [0x4000, 0x0] - 00 D0 D8 D2 FF 03 C0 21 09 29 00 08 6B 60 84 AA - - 2000-2-1,18:20:17.0: l2-rx (PPP:3/7/1:100), Length:16, Pro:0, Off:0, Pri:0, RM:0, Err:0 [0x4001, 0x30000] - 00 D0 D8 D2 FF 03 C0 21 09 29 00 08 6D FE FA AA - - 2000-2-1,18:20:17.0: l2-tx (PPP:3/7/1:100), Length:16, Pro:0, Off:0, Pri:0, RM:0, Err:0 [0x4000, 0x0] - 00 D0 D8 D2 FF 03 C0 21 0A 29 00 08 6B 60 84 AA - - 2000-2-1,18:20:17.0: l2-rx (PPP:3/7/1:100), Length:16, Pro:0, Off:0, Pri:0, RM:0, Err:0 [0x4001, 0x8030000] - 00 D0 D8 D2 FF 03 C0 21 0A 29 00 08 6D FE FA AA - - nt 1 length 500 - vpn 200 : [max tries 1, timeout 5 seconds, data length 500 bytes, ttl 255] - 2000-2-1,18:20:24.1: l2-tx (PPP:3/7/1:100), Length:536, Pro:1, Off:8, Pri:7, RM:0, Err:0 [0x4070, 0x801] - 00 D0 D8 D2 FF 03 00 21 45 00 02 10 00 27 00 00 - FF 01 69 51 14 14 14 22 14 14 14 2B 08 00 AD B8 - 00 03 00 01 10 11 12 13 14 15 16 17 18 19 1A 1B - 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B - 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B - 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B - 4C 4D 4E 4F - - ping #1 ok, RTT 0.010 seconds - 2000-2-1,18:20:24.1: l2-rx (PPP:3/7/1:100), Length:536, Pro:1, Off:8, Pri:7, RM:0, Err:0 [0x4071, 0x30801] - 00 D0 D8 D2 FF 03 00 21 45 00 02 10 00 23 00 00 - FF 01 69 55 14 14 14 2B 14 14 14 22 00 00 B5 B8 - 00 03 00 01 10 11 12 13 14 15 16 17 18 19 1A 1B - 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B - 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B - 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B - 4C 4D 4E 4F - - [finished] + 00 D0 D8 D2 FF 03 C0 21 09 29 00 08 6B 60 84 AA + + 2000-2-1,18:20:17.0: l2-rx (PPP:3/7/1:100), Length:16, Pro:0, Off:0, Pri:0, RM:0, Err:0 [0x4001, 0x30000] + 00 D0 D8 D2 FF 03 C0 21 09 29 00 08 6D FE FA AA + + 2000-2-1,18:20:17.0: l2-tx (PPP:3/7/1:100), Length:16, Pro:0, Off:0, Pri:0, RM:0, Err:0 [0x4000, 0x0] + 00 D0 D8 D2 FF 03 C0 21 0A 29 00 08 6B 60 84 AA + + 2000-2-1,18:20:17.0: l2-rx (PPP:3/7/1:100), Length:16, Pro:0, Off:0, Pri:0, RM:0, Err:0 [0x4001, 0x8030000] + 00 D0 D8 D2 FF 03 C0 21 0A 29 00 08 6D FE FA AA + + nt 1 length 500 + vpn 200 : [max tries 1, timeout 5 seconds, data length 500 bytes, ttl 255] + 2000-2-1,18:20:24.1: l2-tx (PPP:3/7/1:100), Length:536, Pro:1, Off:8, Pri:7, RM:0, Err:0 [0x4070, 0x801] + 00 D0 D8 D2 FF 03 00 21 45 00 02 10 00 27 00 00 + FF 01 69 51 14 14 14 22 14 14 14 2B 08 00 AD B8 + 00 03 00 01 10 11 12 13 14 15 16 17 18 19 1A 1B + 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B + 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B + 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B + 4C 4D 4E 4F + + ping #1 ok, RTT 0.010 seconds + 2000-2-1,18:20:24.1: l2-rx (PPP:3/7/1:100), Length:536, Pro:1, Off:8, Pri:7, RM:0, Err:0 [0x4071, 0x30801] + 00 D0 D8 D2 FF 03 00 21 45 00 02 10 00 23 00 00 + FF 01 69 55 14 14 14 2B 14 14 14 22 00 00 B5 B8 + 00 03 00 01 10 11 12 13 14 15 16 17 18 19 1A 1B + 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B + 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B + 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B + 4C 4D 4E 4F + + [finished] IPNOS: CONFIG VPN(200) VR(3.3.3.3)# 2000-2-1,18:20:27.0: l2-tx (PPP:3/7/1:100), Length:16, Pro:0, Off:0, Pri:0, RM:0, Err:0 [0x4000, 0x0] - 00 D0 D8 D2 FF 03 C0 21 09 2A 00 08 6B 60 84 AA - - 2000-2-1,18:20:27.0: l2-rx (PPP:3/7/1:100), Length:16, Pro:0, Off:0, Pri:0, RM:0, Err:0 [0x4001, 0x30000] - 00 D0 D8 D2 FF 03 C0 21 09 2A 00 08 6D FE FA AA - - 2000-2-1,18:20:27.0: l2-tx (PPP:3/7/1:100), Length:16, Pro:0, Off:0, Pri:0, RM:0, Err:0 [0x4000, 0x0] - 00 D0 D8 D2 FF 03 C0 21 0A 2A 00 08 6B 60 84 AA - - 2000-2-1,18:20:27.0: l2-rx (PPP:3/7/1:100), Length:16, Pro:0, Off:0, Pri:0, RM:0, Err:0 [0x4001, 0x30000] - 00 D0 D8 D2 FF 03 C0 21 0A 2A 00 08 6D FE FA AA - - - ipnos diags: Control (1/0) :: layer-2 apply 3 0x0701 100 0 0 - Successfully applied packet-log-profile on LI - ipnos diags: Control (1/0) :: + 00 D0 D8 D2 FF 03 C0 21 09 2A 00 08 6B 60 84 AA + + 2000-2-1,18:20:27.0: l2-rx (PPP:3/7/1:100), Length:16, Pro:0, Off:0, Pri:0, RM:0, Err:0 [0x4001, 0x30000] + 00 D0 D8 D2 FF 03 C0 21 09 2A 00 08 6D FE FA AA + + 2000-2-1,18:20:27.0: l2-tx (PPP:3/7/1:100), Length:16, Pro:0, Off:0, Pri:0, RM:0, Err:0 [0x4000, 0x0] + 00 D0 D8 D2 FF 03 C0 21 0A 2A 00 08 6B 60 84 AA + + 2000-2-1,18:20:27.0: l2-rx (PPP:3/7/1:100), Length:16, Pro:0, Off:0, Pri:0, RM:0, Err:0 [0x4001, 0x30000] + 00 D0 D8 D2 FF 03 C0 21 0A 2A 00 08 6D FE FA AA + + + ipnos diags: Control (1/0) :: layer-2 apply 3 0x0701 100 0 0 + Successfully applied packet-log-profile on LI + ipnos diags: Control (1/0) :: */ @@ -158,11 +158,11 @@ #define COSINE_HDR_MAGIC_STR2 "l2-rx" /* Magic text for start of packet */ -#define COSINE_REC_MAGIC_STR1 COSINE_HDR_MAGIC_STR1 +#define COSINE_REC_MAGIC_STR1 COSINE_HDR_MAGIC_STR1 #define COSINE_REC_MAGIC_STR2 COSINE_HDR_MAGIC_STR2 #define COSINE_HEADER_LINES_TO_CHECK 200 -#define COSINE_LINE_LENGTH 240 +#define COSINE_LINE_LENGTH 240 #define COSINE_MAX_PACKET_LEN 65536 @@ -171,16 +171,16 @@ static long cosine_seek_next_packet(wtap *wth, int *err, char *hdr); static gboolean cosine_check_file_type(wtap *wth, int *err); static gboolean cosine_read(wtap *wth, int *err, long *data_offset); static gboolean cosine_seek_read(wtap *wth, long seek_off, - union wtap_pseudo_header *pseudo_header, guint8 *pd, + union wtap_pseudo_header *pseudo_header, guint8 *pd, int len, int *err); -static int parse_cosine_rec_hdr(wtap *wth, const char *line, +static int parse_cosine_rec_hdr(wtap *wth, const char *line, union wtap_pseudo_header *pseudo_header, int *err); static int parse_cosine_hex_dump(FILE_T fh, int pkt_len, guint8* buf, int *err); static int parse_single_hex_dump_line(char* rec, guint8 *buf, guint byte_offset); -/* Returns TRUE if the line appears to be an empty line. Otherwise it +/* Returns TRUE if the line appears to be an empty line. Otherwise it returns FALSE. */ static gboolean empty_line(const guchar *line) { @@ -194,12 +194,12 @@ static gboolean empty_line(const guchar *line) } if (*line == '\0') return TRUE; - else + else return FALSE; } /* Seeks to the beginning of the next packet, and returns the - byte offset. Copy the header line to hdr. Returns -1 on failure, + byte offset. Copy the header line to hdr. Returns -1 on failure, and sets "*err" to the error and set hdr as NULL. */ static long cosine_seek_next_packet(wtap *wth, int *err, char *hdr) { @@ -215,7 +215,7 @@ static long cosine_seek_next_packet(wtap *wth, int *err, char *hdr) return -1; } if (file_gets(buf, sizeof(buf), wth->fh) != NULL) { - if (strstr(buf, COSINE_REC_MAGIC_STR1) || + if (strstr(buf, COSINE_REC_MAGIC_STR1) || strstr(buf, COSINE_REC_MAGIC_STR2)) { strncpy(hdr, buf, COSINE_LINE_LENGTH-1); hdr[COSINE_LINE_LENGTH-1] = '\0'; @@ -226,9 +226,9 @@ static long cosine_seek_next_packet(wtap *wth, int *err, char *hdr) /* We got an EOF. */ *err = 0; } else { - /* We (presumably) got an error (there's no - equivalent to "ferror()" in zlib, alas, - so we don't have a wrapper to check for + /* We (presumably) got an error (there's no + equivalent to "ferror()" in zlib, alas, + so we don't have a wrapper to check for an error). */ *err = file_error(wth->fh); } @@ -240,7 +240,7 @@ static long cosine_seek_next_packet(wtap *wth, int *err, char *hdr) } /* Look through the first part of a file to see if this is - * a CoSine L2 debug output. + * a CoSine L2 debug output. * * Returns TRUE if it is, FALSE if it isn't or if we get an I/O error; * if we get an I/O error, "*err" will be set to a non-zero value. @@ -356,7 +356,7 @@ cosine_seek_read (wtap *wth, long seek_off, return FALSE; } - if (parse_cosine_rec_hdr(NULL, line, pseudo_header, err) == -1) { + if (parse_cosine_rec_hdr(NULL, line, pseudo_header, err) == -1) { *err = file_error(wth->random_fh); if (*err == 0) { *err = WTAP_ERR_BAD_RECORD; @@ -381,14 +381,14 @@ parse_cosine_rec_hdr(wtap *wth, const char *line, union wtap_pseudo_header *pseu char if_name[COSINE_MAX_IF_NAME_LEN], direction[6]; struct tm tm; - if (sscanf(line, "%d-%d-%d,%d:%d:%d.%d:", + if (sscanf(line, "%d-%d-%d,%d:%d:%d.%d:", &yy, &mm, &dd, &hr, &min, &sec, &csec) == 7) { /* appears to be output to a control blade */ - num_items_scanned = sscanf(line, + num_items_scanned = sscanf(line, "%d-%d-%d,%d:%d:%d.%d: %5s (%127[A-Za-z0-9/:]), Length:%d, Pro:%d, Off:%d, Pri:%d, RM:%d, Err:%d [%x, %x]", &yy, &mm, &dd, &hr, &min, &sec, &csec, - direction, if_name, &pkt_len, - &pro, &off, &pri, &rm, &error, + direction, if_name, &pkt_len, + &pro, &off, &pri, &rm, &error, &code1, &code2); if (num_items_scanned != 17) { @@ -397,10 +397,10 @@ parse_cosine_rec_hdr(wtap *wth, const char *line, union wtap_pseudo_header *pseu } } else { /* appears to be output to PE */ - num_items_scanned = sscanf(line, + num_items_scanned = sscanf(line, "%5s (%127[A-Za-z0-9/:]), Length:%d, Pro:%d, Off:%d, Pri:%d, RM:%d, Err:%d [%x, %x]", - direction, if_name, &pkt_len, - &pro, &off, &pri, &rm, &error, + direction, if_name, &pkt_len, + &pro, &off, &pri, &rm, &error, &code1, &code2); if (num_items_scanned != 10) { @@ -410,7 +410,7 @@ parse_cosine_rec_hdr(wtap *wth, const char *line, union wtap_pseudo_header *pseu yy = mm = dd = hr = min = sec = csec = 0; } - if (wth) { + if (wth) { tm.tm_year = yy - 1900; tm.tm_mon = mm - 1; tm.tm_mday = dd; @@ -422,8 +422,8 @@ parse_cosine_rec_hdr(wtap *wth, const char *line, union wtap_pseudo_header *pseu wth->phdr.ts.tv_usec = csec * 10000; wth->phdr.len = pkt_len; wth->phdr.pkt_encap = WTAP_ENCAP_COSINE; - } - /* XXX need to handle other encapsulations like Cisco HDLC, + } + /* XXX need to handle other encapsulations like Cisco HDLC, Frame Relay and ATM */ if (strncmp(if_name, "TEST:", 5) == 0) { pseudo_header->cosine.encap = COSINE_ENCAP_TEST; @@ -448,8 +448,8 @@ parse_cosine_rec_hdr(wtap *wth, const char *line, union wtap_pseudo_header *pseu pseudo_header->cosine.direction = COSINE_DIR_TX; } else if (strncmp(direction, "l2-rx", 5) == 0) { pseudo_header->cosine.direction = COSINE_DIR_RX; - } - strncpy(pseudo_header->cosine.if_name, if_name, + } + strncpy(pseudo_header->cosine.if_name, if_name, COSINE_MAX_IF_NAME_LEN - 1); pseudo_header->cosine.pro = pro; pseudo_header->cosine.off = off; @@ -467,7 +467,7 @@ parse_cosine_hex_dump(FILE_T fh, int pkt_len, guint8* buf, int *err) { char line[COSINE_LINE_LENGTH]; int i, hex_lines, n, caplen = 0; - + /* Calculate the number of hex dump lines, each * containing 16 bytes of data */ hex_lines = pkt_len / 16 + ((pkt_len % 16) ? 1 : 0); @@ -499,20 +499,20 @@ parse_cosine_hex_dump(FILE_T fh, int pkt_len, guint8* buf, int *err) * * Returns number of bytes successfully read, -1 if bad. */ static int -parse_single_hex_dump_line(char* rec, guint8 *buf, guint byte_offset) +parse_single_hex_dump_line(char* rec, guint8 *buf, guint byte_offset) { int num_items_scanned, i; unsigned int bytes[16]; - num_items_scanned = sscanf(rec, "%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x", - &bytes[0], &bytes[1], &bytes[2], &bytes[3], + num_items_scanned = sscanf(rec, "%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x", + &bytes[0], &bytes[1], &bytes[2], &bytes[3], &bytes[4], &bytes[5], &bytes[6], &bytes[7], - &bytes[8], &bytes[9], &bytes[10], &bytes[11], + &bytes[8], &bytes[9], &bytes[10], &bytes[11], &bytes[12], &bytes[13], &bytes[14], &bytes[15]); if (num_items_scanned == 0) return -1; - if (num_items_scanned > 16) + if (num_items_scanned > 16) num_items_scanned = 16; for (i=0; i * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/csids.c b/wiretap/csids.c index ce819a71d3..09b9455fb6 100644 --- a/wiretap/csids.c +++ b/wiretap/csids.c @@ -1,20 +1,20 @@ /* csids.c * - * $Id: csids.c,v 1.14 2002/06/07 07:27:34 guy Exp $ + * $Id: csids.c,v 1.15 2002/08/28 20:30:44 jmayer Exp $ * * Copyright (c) 2000 by Mike Hall * Copyright (c) 2000 by Cisco Systems - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -32,10 +32,10 @@ #include #include -/* +/* * This module reads the output from the Cisco Secure Intrustion Detection - * System iplogging facility. The term iplogging is misleading since this - * logger will only output TCP. There is no link layer information. + * System iplogging facility. The term iplogging is misleading since this + * logger will only output TCP. There is no link layer information. * Packet format is 4 byte timestamp (seconds since epoch), and a 4 byte size * of data following for that packet. * @@ -58,21 +58,21 @@ struct csids_header { /* XXX - return -1 on I/O error and actually do something with 'err'. */ int csids_open(wtap *wth, int *err) { - /* There is no file header. There is only a header for each packet - * so we read a packet header and compare the caplen with iplen. They + /* There is no file header. There is only a header for each packet + * so we read a packet header and compare the caplen with iplen. They * should always be equal except with the wierd byteswap version. - * - * THIS IS BROKEN-- anytime the caplen is 0x0101 or 0x0202 up to 0x0505 - * this will byteswap it. I need to fix this. XXX --mlh + * + * THIS IS BROKEN-- anytime the caplen is 0x0101 or 0x0202 up to 0x0505 + * this will byteswap it. I need to fix this. XXX --mlh */ int tmp,iplen,bytesRead; - + gboolean byteswap = FALSE; struct csids_header hdr; bytesRead=0; - /* check the file to make sure it is a csids file. */ + /* check the file to make sure it is a csids file. */ bytesRead = file_read( &hdr, 1, sizeof( struct csids_header), wth->fh ); if( bytesRead != sizeof( struct csids_header) ) { *err = file_error( wth->fh ); @@ -121,17 +121,17 @@ int csids_open(wtap *wth, int *err) } } else { byteswap = FALSE; - } + } /* no file header. So reset the fh to 0 so we can read the first packet */ if (file_seek(wth->fh, 0, SEEK_SET, err) == -1) return -1; - wth->data_offset = 0; + wth->data_offset = 0; wth->capture.csids = g_malloc(sizeof(csids_t)); wth->capture.csids->byteswapped = byteswap; - wth->file_encap = WTAP_ENCAP_RAW_IP; - wth->file_type = WTAP_FILE_CSIDS; + wth->file_encap = WTAP_ENCAP_RAW_IP; + wth->file_type = WTAP_FILE_CSIDS; wth->snapshot_length = 0; /* not known */ wth->subtype_read = csids_read; wth->subtype_seek_read = csids_seek_read; @@ -164,7 +164,7 @@ static gboolean csids_read(wtap *wth, int *err, long *data_offset) /* Make sure we have enough room for the packet */ buffer_assure_space(wth->frame_buffer, hdr.caplen); buf = buffer_start_ptr(wth->frame_buffer); - + bytesRead = file_read( buf, 1, hdr.caplen, wth->fh ); if( bytesRead != hdr.caplen ) { *err = file_error( wth->fh ); @@ -172,7 +172,7 @@ static gboolean csids_read(wtap *wth, int *err, long *data_offset) *err = WTAP_ERR_SHORT_READ; return FALSE; } - + wth->data_offset += hdr.caplen; wth->phdr.len = hdr.caplen; @@ -219,7 +219,7 @@ csids_seek_read (wtap *wth, } hdr.seconds = pntohl(&hdr.seconds); hdr.caplen = pntohs(&hdr.caplen); - + if( len != hdr.caplen ) { *err = WTAP_ERR_BAD_RECORD; return FALSE; @@ -243,7 +243,7 @@ csids_seek_read (wtap *wth, swap++; *(swap) = BSWAP16(*swap); /* ip flags and fragoff */ } - + return TRUE; } diff --git a/wiretap/csids.h b/wiretap/csids.h index b40962abee..fecb608187 100644 --- a/wiretap/csids.h +++ b/wiretap/csids.h @@ -1,20 +1,20 @@ /* csids.h * - * $Id: csids.h,v 1.2 2000/08/11 13:32:35 deniel Exp $ + * $Id: csids.h,v 1.3 2002/08/28 20:30:44 jmayer Exp $ * * Copyright (c) 2000 by Mike Hall * Copyright (c) Cisco Systems - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/dbs-etherwatch.c b/wiretap/dbs-etherwatch.c index 66a81232e6..1c84ceecd5 100644 --- a/wiretap/dbs-etherwatch.c +++ b/wiretap/dbs-etherwatch.c @@ -1,20 +1,20 @@ /* dbs-etherwatch.c * - * $Id: dbs-etherwatch.c,v 1.8 2002/06/07 07:27:34 guy Exp $ + * $Id: dbs-etherwatch.c,v 1.9 2002/08/28 20:30:44 jmayer Exp $ * * Wiretap Library * Copyright (c) 2001 by Marc Milgram - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -134,7 +134,7 @@ static gboolean dbs_etherwatch_check_file_type(wtap *wth, int *err) char buf[DBS_ETHERWATCH_LINE_LENGTH]; int line, byte; unsigned int reclen, i, level; - + buf[DBS_ETHERWATCH_LINE_LENGTH-1] = 0; for (line = 0; line < DBS_ETHERWATCH_HEADER_LINES_TO_CHECK; line++) { @@ -367,7 +367,7 @@ parse_single_hex_dump_line(char* rec, guint8 *buf, long byte_offset) { rec[26] = '\0'; s = rec + 21; value = strtol(s, NULL, 10); - + if (value != byte_offset) { return FALSE; } diff --git a/wiretap/dbs-etherwatch.h b/wiretap/dbs-etherwatch.h index 60759f6081..fb1b53282e 100644 --- a/wiretap/dbs-etherwatch.h +++ b/wiretap/dbs-etherwatch.h @@ -1,20 +1,20 @@ /* toshiba.h * - * $Id: dbs-etherwatch.h,v 1.2 2001/11/13 23:55:43 gram Exp $ + * $Id: dbs-etherwatch.h,v 1.3 2002/08/28 20:30:44 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/etherpeek.c b/wiretap/etherpeek.c index 15cce124a3..0c1e592366 100644 --- a/wiretap/etherpeek.c +++ b/wiretap/etherpeek.c @@ -2,21 +2,21 @@ * Routines for opening EtherPeek (and TokenPeek?) files * Copyright (c) 2001, Daniel Thompson * - * $Id: etherpeek.c,v 1.21 2002/07/29 06:09:58 guy Exp $ + * $Id: etherpeek.c,v 1.22 2002/08/28 20:30:44 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -51,11 +51,11 @@ typedef struct etherpeek_v567_header { guint32 timeDate; guint32 timeStart; guint32 timeStop; - guint32 mediaType; /* Media Type Ethernet=0 Token Ring = 1 */ + guint32 mediaType; /* Media Type Ethernet=0 Token Ring = 1 */ guint32 physMedium; /* Physical Medium native=0 802.1=1 */ guint32 appVers; /* App Version Number Maj.Min.Bug.Build */ guint32 linkSpeed; /* Link Speed Bits/sec */ - guint32 reserved[3]; + guint32 reserved[3]; } etherpeek_v567_header_t; #define ETHERPEEK_V567_HDR_SIZE 48 @@ -251,7 +251,7 @@ int etherpeek_open(wtap *wth, int *err) */ return 0; } - + /* * Assume this is a V5, V6 or V7 *Peek file, and byte diff --git a/wiretap/etherpeek.h b/wiretap/etherpeek.h index f9b976d169..d0da41a915 100644 --- a/wiretap/etherpeek.h +++ b/wiretap/etherpeek.h @@ -1,20 +1,20 @@ /* etherpeek.h * - * $Id: etherpeek.h,v 1.2 2001/11/13 23:55:43 gram Exp $ + * $Id: etherpeek.h,v 1.3 2002/08/28 20:30:44 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/file_wrappers.c b/wiretap/file_wrappers.c index ae8a98706d..223e55fbe8 100644 --- a/wiretap/file_wrappers.c +++ b/wiretap/file_wrappers.c @@ -1,20 +1,20 @@ /* file_wrappers.c * - * $Id: file_wrappers.c,v 1.11 2002/06/07 07:27:34 guy Exp $ + * $Id: file_wrappers.c,v 1.12 2002/08/28 20:30:44 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/file_wrappers.h b/wiretap/file_wrappers.h index ee29c7a3bf..4950c5f59b 100644 --- a/wiretap/file_wrappers.h +++ b/wiretap/file_wrappers.h @@ -1,20 +1,20 @@ /* file_wrappers.h * - * $Id: file_wrappers.h,v 1.9 2002/06/07 07:27:34 guy Exp $ + * $Id: file_wrappers.h,v 1.10 2002/08/28 20:30:44 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/i4b_trace.h b/wiretap/i4b_trace.h index 66ef59d876..1990be1c86 100644 --- a/wiretap/i4b_trace.h +++ b/wiretap/i4b_trace.h @@ -27,7 +27,7 @@ * i4b_trace.h - header file for trace data read device * ---------------------------------------------------- * - * $Id: i4b_trace.h,v 1.2 2001/07/13 00:55:58 guy Exp $ + * $Id: i4b_trace.h,v 1.3 2002/08/28 20:30:44 jmayer Exp $ * * last edit-date: [Sun Feb 14 10:39:26 1999] * @@ -67,7 +67,7 @@ typedef struct { * ioctl via /dev/i4btrc device(s): * get/set current trace flag settings *---------------------------------------------------------------------------*/ - + #define I4B_TRC_GET _IOR('T', 0, int) /* get trace settings */ #define I4B_TRC_SET _IOW('T', 1, int) /* set trace settings */ diff --git a/wiretap/i4btrace.h b/wiretap/i4btrace.h index 9911a6c45e..28bd99e13f 100644 --- a/wiretap/i4btrace.h +++ b/wiretap/i4btrace.h @@ -1,20 +1,20 @@ /* i4btrace.h * - * $Id: i4btrace.h,v 1.2 2000/08/11 13:32:35 deniel Exp $ + * $Id: i4btrace.h,v 1.3 2002/08/28 20:30:44 jmayer Exp $ * * Wiretap Library * Copyright (c) 1999 by Bert Driehuis - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/iptrace.c b/wiretap/iptrace.c index 0e58447c29..4ac588f99e 100644 --- a/wiretap/iptrace.c +++ b/wiretap/iptrace.c @@ -1,20 +1,20 @@ /* iptrace.c * - * $Id: iptrace.c,v 1.43 2002/08/13 03:32:56 guy Exp $ + * $Id: iptrace.c,v 1.44 2002/08/28 20:30:44 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/iptrace.h b/wiretap/iptrace.h index 8a42044db2..0a0f53d63a 100644 --- a/wiretap/iptrace.h +++ b/wiretap/iptrace.h @@ -1,20 +1,20 @@ /* iptrace.h * - * $Id: iptrace.h,v 1.6 2001/11/13 23:55:43 gram Exp $ + * $Id: iptrace.h,v 1.7 2002/08/28 20:30:44 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/lanalyzer.c b/wiretap/lanalyzer.c index 79c51a12bc..5075060daf 100644 --- a/wiretap/lanalyzer.c +++ b/wiretap/lanalyzer.c @@ -1,6 +1,6 @@ /* lanalyzer.c * - * $Id: lanalyzer.c,v 1.36 2002/07/29 06:09:58 guy Exp $ + * $Id: lanalyzer.c,v 1.37 2002/08/28 20:30:44 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez @@ -377,7 +377,7 @@ lanalyzer_close(wtap *wth) static int swrite(const void* what, guint size, FILE *hd) { size_t nwritten; - + nwritten = fwrite(what, 1, size, hd); if (nwritten != size) { if (nwritten == 0 && ferror(hd)) @@ -419,7 +419,7 @@ static int s0write(guint cnt, FILE *hd) static int s8write(const guint8 s8, FILE *hd) { size_t nwritten; - + nwritten = fwrite(&s8, 1, 1, hd); if (nwritten != 1) { if (nwritten == 0 && ferror(hd)) @@ -436,7 +436,7 @@ static int s8write(const guint8 s8, FILE *hd) static int s16write(const guint16 s16, FILE *hd) { size_t nwritten; - + nwritten = fwrite(&s16, 1, 2, hd); if (nwritten != 2) { if (nwritten == 0 && ferror(hd)) @@ -453,7 +453,7 @@ static int s16write(const guint16 s16, FILE *hd) static int s32write(const guint32 s32, FILE *hd) { size_t nwritten; - + nwritten = fwrite(&s32, 1, 4, hd); if (nwritten != 4) { if (nwritten == 0 && ferror(hd)) diff --git a/wiretap/lanalyzer.h b/wiretap/lanalyzer.h index 42d030d034..b896558bdb 100644 --- a/wiretap/lanalyzer.h +++ b/wiretap/lanalyzer.h @@ -1,6 +1,6 @@ /* lanalyzer.h * - * $Id: lanalyzer.h,v 1.7 2002/07/16 07:15:08 guy Exp $ + * $Id: lanalyzer.h,v 1.8 2002/08/28 20:30:44 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez @@ -69,7 +69,7 @@ typedef guint16 TimeStamp[3]; /* 0.5 microseconds since start of trace */ * } Time; */ -/* +/* * typedef struct { * guint16 rx_channels; * guint16 rx_errors; diff --git a/wiretap/libpcap.c b/wiretap/libpcap.c index bc1b7fc39b..c37aa31534 100644 --- a/wiretap/libpcap.c +++ b/wiretap/libpcap.c @@ -1,20 +1,20 @@ /* libpcap.c * - * $Id: libpcap.c,v 1.81 2002/08/07 06:59:49 guy Exp $ + * $Id: libpcap.c,v 1.82 2002/08/28 20:30:44 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/libpcap.h b/wiretap/libpcap.h index b7cbcb7c81..0b39214339 100644 --- a/wiretap/libpcap.h +++ b/wiretap/libpcap.h @@ -1,20 +1,20 @@ /* libpcap.h * - * $Id: libpcap.h,v 1.13 2002/07/16 07:15:08 guy Exp $ + * $Id: libpcap.h,v 1.14 2002/08/28 20:30:44 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -34,7 +34,7 @@ PCAP_MODIFIED_MAGIC is for Alexey Kuznetsov's modified "libpcap" format, as generated on Linux systems that have a "libpcap" with his patches, at - + http://ftp.sunet.se/pub/os/Linux/ip-routing/lbl-tools/ applied; PCAP_SWAPPED_MODIFIED_MAGIC is the byte-swapped version. */ diff --git a/wiretap/netmon.c b/wiretap/netmon.c index 406f1625dc..c0531a86c1 100644 --- a/wiretap/netmon.c +++ b/wiretap/netmon.c @@ -1,20 +1,20 @@ /* netmon.c * - * $Id: netmon.c,v 1.60 2002/08/13 03:32:57 guy Exp $ + * $Id: netmon.c,v 1.61 2002/08/28 20:30:44 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -644,7 +644,7 @@ static gboolean netmon_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, netmon->first_record_time = phdr->ts; netmon->got_first_record_time = TRUE; } - + if (wdh->encap == WTAP_ENCAP_ATM_SNIFFER) atm_hdrsize = sizeof (struct netmon_atm_hdr); else diff --git a/wiretap/netmon.h b/wiretap/netmon.h index a1c2f523c5..44a60dbb0a 100644 --- a/wiretap/netmon.h +++ b/wiretap/netmon.h @@ -1,20 +1,20 @@ /* netmon.h * - * $Id: netmon.h,v 1.10 2002/07/16 07:15:09 guy Exp $ + * $Id: netmon.h,v 1.11 2002/08/28 20:30:45 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/nettl.c b/wiretap/nettl.c index 28de0166e2..4e6a3a2f72 100644 --- a/wiretap/nettl.c +++ b/wiretap/nettl.c @@ -1,20 +1,20 @@ /* nettl.c * - * $Id: nettl.c,v 1.30 2002/07/29 06:09:59 guy Exp $ + * $Id: nettl.c,v 1.31 2002/08/28 20:30:45 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -87,14 +87,14 @@ indicate the real and captured length of the packet (order unknown) The values 0x00000074 at positions 0x0000a0 and 0x0000a4 seems to indicate the same number as positions 0x0000c8 and 0x0000ca but added with 24. Perhaps we have here two layers of headers. -The first layer is fixed and consists of all the bytes from 0x000084 up to and +The first layer is fixed and consists of all the bytes from 0x000084 up to and including 0x0000c3 which is a generic header for all packets captured from any device. This header might be of fixed size 64 bytes and there might be something in it which indicates the type of the next header which is link type specific. Following this header there is another header for the 100baseT interface which in this case is 24 bytes long spanning positions 0x0000c4 to 0x0000db. -When someone reports that the loading of the captures breaks, we can compare +When someone reports that the loading of the captures breaks, we can compare this header above with what he/she got to learn how to distinguish between different types of link specific headers. @@ -107,7 +107,7 @@ The header for 100baseT seems to be 0-3 unknown 4-5 length1 these are probably total/captured len. unknown which. 6-7 length2 - 8-11 unknown + 8-11 unknown 12-15 secs 16-19 100 x nsec 20-23 unknown @@ -275,16 +275,16 @@ nettl_read_rec_header(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, case NETTL_SUBSYS_NS_LS_UDP : case 0xb9: /* XXX unknown encapsulation name */ case NETTL_SUBSYS_NS_LS_ICMP : - if( (encap[3] == NETTL_SUBSYS_NS_LS_IP) - || (encap[3] == NETTL_SUBSYS_NS_LS_LOOPBACK) - || (encap[3] == NETTL_SUBSYS_NS_LS_UDP) + if( (encap[3] == NETTL_SUBSYS_NS_LS_IP) + || (encap[3] == NETTL_SUBSYS_NS_LS_LOOPBACK) + || (encap[3] == NETTL_SUBSYS_NS_LS_UDP) || (encap[3] == NETTL_SUBSYS_NS_LS_TCP) ){ - phdr->pkt_encap = WTAP_ENCAP_RAW_IP; + phdr->pkt_encap = WTAP_ENCAP_RAW_IP; } else if (encap[3] == NETTL_SUBSYS_NS_LS_ICMP) { - phdr->pkt_encap = WTAP_ENCAP_UNKNOWN; + phdr->pkt_encap = WTAP_ENCAP_UNKNOWN; } else { wth->file_encap = WTAP_ENCAP_ETHERNET; - phdr->pkt_encap = WTAP_ENCAP_ETHERNET; + phdr->pkt_encap = WTAP_ENCAP_ETHERNET; } bytes_read = file_read(&ip_hdr, 1, sizeof ip_hdr, fh); @@ -322,7 +322,7 @@ nettl_read_rec_header(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, phdr->len = length; phdr->caplen = length; - + phdr->ts.tv_sec = pntohl(&ip_hdr.sec); /* this filed is in units of 0.1 us for HPUX 11 */ if (wth->capture.nettl->is_hpux_11) { @@ -365,7 +365,7 @@ nettl_read_rec_header(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, /* XXX we dont know how to identify this as ehternet frames, so we assumes everything is. We will crash and burn for anything else */ /* for encapsulated 100baseT we do this */ - phdr->pkt_encap = WTAP_ENCAP_ETHERNET; + phdr->pkt_encap = WTAP_ENCAP_ETHERNET; bytes_read = file_read(&drv_eth_hdr, 1, sizeof drv_eth_hdr, fh); if (bytes_read != sizeof drv_eth_hdr) { *err = file_error(fh); @@ -384,7 +384,7 @@ nettl_read_rec_header(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, phdr->len = length; phdr->caplen = length; - + phdr->ts.tv_sec = pntohl(&ip_hdr.sec); /* this filed is in units of 0.1 us for HPUX 11 */ if (wth->capture.nettl->is_hpux_11) { diff --git a/wiretap/nettl.h b/wiretap/nettl.h index b3c6c17060..13ba71a76c 100644 --- a/wiretap/nettl.h +++ b/wiretap/nettl.h @@ -1,20 +1,20 @@ /* nettl.h * - * $Id: nettl.h,v 1.7 2001/11/13 23:55:43 gram Exp $ + * $Id: nettl.h,v 1.8 2002/08/28 20:30:45 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/netxray.c b/wiretap/netxray.c index 19cdf27767..04f451fde3 100644 --- a/wiretap/netxray.c +++ b/wiretap/netxray.c @@ -1,20 +1,20 @@ /* netxray.c * - * $Id: netxray.c,v 1.58 2002/07/29 06:09:59 guy Exp $ + * $Id: netxray.c,v 1.59 2002/08/28 20:30:45 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -294,7 +294,7 @@ int netxray_open(wtap *wth, int *err) if (file_seek(wth->fh, pletohl(&hdr.start_offset), SEEK_SET, err) == -1) { g_free(wth->capture.netxray); return -1; - } + } wth->data_offset = pletohl(&hdr.start_offset); return 1; @@ -615,7 +615,7 @@ static gboolean netxray_dump_1_1(wtap_dumper *wdh, rec_hdr.timehi = htolel(0); rec_hdr.orig_len = htoles(phdr->len); rec_hdr.incl_len = htoles(phdr->caplen); - + nwritten = fwrite(&rec_hdr, 1, sizeof(rec_hdr), wdh->fh); if (nwritten != sizeof(rec_hdr)) { if (nwritten == 0 && ferror(wdh->fh)) @@ -625,7 +625,7 @@ static gboolean netxray_dump_1_1(wtap_dumper *wdh, return FALSE; } - /* write the packet data */ + /* write the packet data */ nwritten = fwrite(pd, 1, phdr->caplen, wdh->fh); if (nwritten != phdr->caplen) { if (nwritten == 0 && ferror(wdh->fh)) @@ -634,7 +634,7 @@ static gboolean netxray_dump_1_1(wtap_dumper *wdh, *err = WTAP_ERR_SHORT_WRITE; return FALSE; } - + netxray->nframes++; return TRUE; @@ -690,7 +690,7 @@ static gboolean netxray_dump_close_1_1(wtap_dumper *wdh, int *err) } return FALSE; } - + return TRUE; } @@ -779,7 +779,7 @@ static gboolean netxray_dump_2_0(wtap_dumper *wdh, return FALSE; } - /* write the packet data */ + /* write the packet data */ nwritten = fwrite(pd, 1, phdr->caplen, wdh->fh); if (nwritten != phdr->caplen) { if (nwritten == 0 && ferror(wdh->fh)) @@ -788,7 +788,7 @@ static gboolean netxray_dump_2_0(wtap_dumper *wdh, *err = WTAP_ERR_SHORT_WRITE; return FALSE; } - + netxray->nframes++; return TRUE; @@ -844,6 +844,6 @@ static gboolean netxray_dump_close_2_0(wtap_dumper *wdh, int *err) } return FALSE; } - + return TRUE; } diff --git a/wiretap/netxray.h b/wiretap/netxray.h index 1cf63abc17..450b24ecf5 100644 --- a/wiretap/netxray.h +++ b/wiretap/netxray.h @@ -1,20 +1,20 @@ /* netxray.h * - * $Id: netxray.h,v 1.9 2002/07/16 07:15:09 guy Exp $ + * $Id: netxray.h,v 1.10 2002/08/28 20:30:45 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c index d09aca041c..8d45b07666 100644 --- a/wiretap/ngsniffer.c +++ b/wiretap/ngsniffer.c @@ -1,20 +1,20 @@ /* ngsniffer.c * - * $Id: ngsniffer.c,v 1.84 2002/07/29 06:09:59 guy Exp $ + * $Id: ngsniffer.c,v 1.85 2002/08/28 20:30:45 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -614,7 +614,7 @@ skip_header_records(wtap *wth, int *err, gint16 version) /* * XXX - what about LAPB and LAPD? At least one - * X.25 capture has a type of NET_HDLC, but one + * X.25 capture has a type of NET_HDLC, but one * might also consider LAPD to be an HDLC * variant; if it also has a type of NET_HDLC, * we'd have to look at some other data to @@ -1581,7 +1581,7 @@ static gboolean ngsniffer_dump_close(wtap_dumper *wdh, int *err) Return value is the number of bytes in outbuf on return. */ static int -SnifferDecompress( unsigned char * inbuf, size_t inlen, +SnifferDecompress( unsigned char * inbuf, size_t inlen, unsigned char * outbuf, size_t outlen, int *err ) { unsigned char * pin = inbuf; @@ -1642,7 +1642,7 @@ SnifferDecompress( unsigned char * inbuf, size_t inlen, Run length is the low nybble of the first code byte. Byte to repeat immediately follows. Total code size: 2 bytes. - */ + */ length = code_low + 3; /* If length would put us past end of output, avoid overflow */ if ( pout + length > pout_end ) @@ -1657,12 +1657,12 @@ SnifferDecompress( unsigned char * inbuf, size_t inlen, break; case 1 : /* RLE long runs */ /* - Low 4 bits of run length is the low nybble of the - first code byte, upper 8 bits of run length is in + Low 4 bits of run length is the low nybble of the + first code byte, upper 8 bits of run length is in the next byte. Byte to repeat immediately follows. Total code size: 3 bytes. - */ + */ length = code_low + ((unsigned int)(*pin++) << 4) + 19; /* If we are already at end of input, there is no byte to repeat */ @@ -1684,12 +1684,12 @@ SnifferDecompress( unsigned char * inbuf, size_t inlen, break; case 2 : /* LZ77 long strings */ /* - Low 4 bits of offset to string is the low nybble of the - first code byte, upper 8 bits of offset is in + Low 4 bits of offset to string is the low nybble of the + first code byte, upper 8 bits of offset is in the next byte. Length of string immediately follows. Total code size: 3 bytes. - */ + */ offset = code_low + ((unsigned int)(*pin++) << 4) + 3; /* If we are already at end of input, there is no byte to repeat */ @@ -1720,12 +1720,12 @@ SnifferDecompress( unsigned char * inbuf, size_t inlen, break; default : /* (3 to 15): LZ77 short strings */ /* - Low 4 bits of offset to string is the low nybble of the - first code byte, upper 8 bits of offset is in + Low 4 bits of offset to string is the low nybble of the + first code byte, upper 8 bits of offset is in the next byte. Length of string to repeat is overloaded into code_type. Total code size: 2 bytes. - */ + */ offset = code_low + ((unsigned int)(*pin++) << 4) + 3; /* Check if offset would put us back past begin of buffer */ if ( pout - offset < outbuf ) @@ -1863,7 +1863,7 @@ ng_file_read(void *buffer, size_t elementsize, size_t numelements, wtap *wth, return -1; bytes_left = comp_stream->nbytes - comp_stream->nextout; } - + bytes_to_copy = copybytes; if (bytes_to_copy > bytes_left) bytes_to_copy = bytes_left; diff --git a/wiretap/ngsniffer.h b/wiretap/ngsniffer.h index 3c5cf3b301..2d3e48b338 100644 --- a/wiretap/ngsniffer.h +++ b/wiretap/ngsniffer.h @@ -1,20 +1,20 @@ /* ngsniffer.h * - * $Id: ngsniffer.h,v 1.11 2002/07/16 07:15:09 guy Exp $ + * $Id: ngsniffer.h,v 1.12 2002/08/28 20:30:45 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/pppdump.c b/wiretap/pppdump.c index 6de491dd1b..2fe86b40bd 100644 --- a/wiretap/pppdump.c +++ b/wiretap/pppdump.c @@ -1,19 +1,19 @@ /* pppdump.c * - * $Id: pppdump.c,v 1.23 2002/07/16 09:41:32 guy Exp $ + * $Id: pppdump.c,v 1.24 2002/08/28 20:30:45 jmayer Exp $ * * Copyright (c) 2000 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -88,7 +88,7 @@ Daniel Thompson (STMicroelectronics) #define PPPD_TIME_STEP_SHORT 0x06 #define PPPD_RESET_TIME 0x07 -/* this buffer must be at least (2*PPPD_MTU) + sizeof(ppp_header) + sizeof(lcp_header) + +/* this buffer must be at least (2*PPPD_MTU) + sizeof(ppp_header) + sizeof(lcp_header) + * sizeof(ipcp_header). PPPD_MTU is *very* rarely larger than 1500 so this value is fine */ #define PPPD_BUF_SIZE 8192 @@ -242,7 +242,7 @@ init_state(pppdump_t *state) state->offset = 0x100000; /* to detect errors during development */ } - + int pppdump_open(wtap *wth, int *err) { @@ -284,12 +284,12 @@ pppdump_open(wtap *wth, int *err) init_state(state); state->offset = 5; - wth->file_encap = WTAP_ENCAP_PPP_WITH_PHDR; - wth->file_type = WTAP_FILE_PPPDUMP; + wth->file_encap = WTAP_ENCAP_PPP_WITH_PHDR; + wth->file_type = WTAP_FILE_PPPDUMP; - wth->snapshot_length = PPPD_BUF_SIZE; /* just guessing */ - wth->subtype_read = pppdump_read; - wth->subtype_seek_read = pppdump_seek_read; + wth->snapshot_length = PPPD_BUF_SIZE; /* just guessing */ + wth->subtype_read = pppdump_read; + wth->subtype_seek_read = pppdump_seek_read; wth->subtype_close = pppdump_close; state->seek_state = g_malloc(sizeof(pppdump_t)); @@ -619,7 +619,7 @@ collate(pppdump_t* state, FILE_T fh, int *err, guint8 *pd, int *num_bytes, return TRUE; } /* if 0 bytes written, keep looping */ - + break; case PPPD_SEND_DELIM: diff --git a/wiretap/pppdump.h b/wiretap/pppdump.h index d4936a9f66..d57548ad92 100644 --- a/wiretap/pppdump.h +++ b/wiretap/pppdump.h @@ -1,19 +1,19 @@ /* pppdump.h * - * $Id: pppdump.h,v 1.2 2001/11/13 23:55:44 gram Exp $ + * $Id: pppdump.h,v 1.3 2002/08/28 20:30:45 jmayer Exp $ * * Copyright (c) 2000 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/radcom.c b/wiretap/radcom.c index cda21a448a..d8cba156c5 100644 --- a/wiretap/radcom.c +++ b/wiretap/radcom.c @@ -1,20 +1,20 @@ /* radcom.c * - * $Id: radcom.c,v 1.38 2002/07/29 06:09:59 guy Exp $ + * $Id: radcom.c,v 1.39 2002/08/28 20:30:45 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/radcom.h b/wiretap/radcom.h index 64f005556b..81051fbe63 100644 --- a/wiretap/radcom.h +++ b/wiretap/radcom.h @@ -1,20 +1,20 @@ /* radcom.h * - * $Id: radcom.h,v 1.6 2001/11/13 23:55:44 gram Exp $ + * $Id: radcom.h,v 1.7 2002/08/28 20:30:45 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/snoop.c b/wiretap/snoop.c index 83fad89986..4142f178ee 100644 --- a/wiretap/snoop.c +++ b/wiretap/snoop.c @@ -1,20 +1,20 @@ /* snoop.c * - * $Id: snoop.c,v 1.54 2002/07/29 06:09:59 guy Exp $ + * $Id: snoop.c,v 1.55 2002/08/28 20:30:45 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -74,7 +74,7 @@ static gboolean snoop_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, /* * See - * + * * http://www.opengroup.org/onlinepubs/9638599/apdxf.htm * * for the "dlpi.h" header file specified by The Open Group, which lists diff --git a/wiretap/snoop.h b/wiretap/snoop.h index 4b45a1c18e..3571c6bbaa 100644 --- a/wiretap/snoop.h +++ b/wiretap/snoop.h @@ -1,20 +1,20 @@ /* snoop.h * - * $Id: snoop.h,v 1.11 2002/07/16 07:15:09 guy Exp $ + * $Id: snoop.h,v 1.12 2002/08/28 20:30:45 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/toshiba.c b/wiretap/toshiba.c index 5bda2a6de2..8333b899bb 100644 --- a/wiretap/toshiba.c +++ b/wiretap/toshiba.c @@ -1,20 +1,20 @@ /* toshiba.c * - * $Id: toshiba.c,v 1.24 2002/06/07 07:27:35 guy Exp $ + * $Id: toshiba.c,v 1.25 2002/08/28 20:30:45 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -44,55 +44,55 @@ Example 'snoop' output data: Script started on Thu Sep 9 21:48:49 1999 -]0;gram@nirvana:/tmp$ telnet 10.0.0.254 -Trying 10.0.0.254... -Connected to 10.0.0.254. -Escape character is '^]'. - - -TR-600(tr600) System Console - -Login:admin -Password:******* -*--------------------------------------------------------* -| T O S H I B A T R - 6 0 0 | -| < Compact Router > | -| V1.02.02 | -| | -| (C) Copyright TOSHIBA Corp. 1997 All rights reserved. | -*--------------------------------------------------------* - -tr600>snoop dump b1 - Trace start?(on/off/dump/dtl)->dump - IP Address?->b1 -B1 Port Filetering -Trace start(Dump Mode)... - -tr600>[No.1] 00:00:09.14 B1:1 Tx 207.193.26.136->151.164.1.8 DNS SPORT=1028 LEN=38 CHKSUM=4FD4 ID=2390 Query RD QCNT=1 pow.zing.org? -OFFSET 0001-0203-0405-0607-0809-0A0B-0C0D-0E0F 0123456789ABCDEF LEN=67 -0000 : FF03 003D C000 0008 2145 0000 3A12 6500 ...=....!E..:.e. -0010 : 003F 11E6 58CF C11A 8897 A401 0804 0400 .?..X........... -0020 : 3500 264F D409 5601 0000 0100 0000 0000 5.&O..V......... -0030 : 0003 706F 7704 7A69 6E67 036F 7267 0000 ..pow.zing.org.. -0040 : 0100 01 ... - -[No.2] 00:00:09.25 B1:1 Rx 151.164.1.8->207.193.26.136 DNS DPORT=1028 LEN=193 CHKSUM=3E06 ID=2390 Answer RD RA QCNT=1 pow.zing.org? ANCNT=1 pow.zing.org=206.57.36.90 TTL=2652 -OFFSET 0001-0203-0405-0607-0809-0A0B-0C0D-0E0F 0123456789ABCDEF LEN=222 -0000 : FF03 003D C000 0013 2145 0000 D590 9340 ...=....!E.....@ -0010 : 00F7 116F 8E97 A401 08CF C11A 8800 3504 ...o..........5. -0020 : 0400 C13E 0609 5681 8000 0100 0100 0300 ...>..V......... -0030 : 0303 706F 7704 7A69 6E67 036F 7267 0000 ..pow.zing.org.. -0040 : 0100 01C0 0C00 0100 0100 000A 5C00 04CE ............\... -0050 : 3924 5A04 5A49 4E47 036F 7267 0000 0200 9$Z.ZING.org.... -0060 : 0100 016F 5B00 0D03 4841 4E03 5449 5703 ...o[...HAN.TIW. -0070 : 4E45 5400 C02E 0002 0001 0001 6F5B 0006 NET.........o[.. -0080 : 034E 5331 C02E C02E 0002 0001 0001 6F5B .NS1..........o[ -0090 : 001C 0854 414C 4945 5349 4E0D 434F 4E46 ...TALIESIN.CONF -00A0 : 4142 554C 4154 494F 4E03 434F 4D00 C042 ABULATION.COM..B -00B0 : 0001 0001 0001 51EC 0004 CE39 2406 C05B ......Q....9$..[ -00C0 : 0001 0001 0001 6F5B 0004 CE39 245A C06D ......o[...9$Z.m -00D0 : 0001 0001 0001 4521 0004 187C 1F01 ......E!...|.. - +]0;gram@nirvana:/tmp$ telnet 10.0.0.254 +Trying 10.0.0.254... +Connected to 10.0.0.254. +Escape character is '^]'. + + +TR-600(tr600) System Console + +Login:admin +Password:******* +*--------------------------------------------------------* +| T O S H I B A T R - 6 0 0 | +| < Compact Router > | +| V1.02.02 | +| | +| (C) Copyright TOSHIBA Corp. 1997 All rights reserved. | +*--------------------------------------------------------* + +tr600>snoop dump b1 + Trace start?(on/off/dump/dtl)->dump + IP Address?->b1 +B1 Port Filetering +Trace start(Dump Mode)... + +tr600>[No.1] 00:00:09.14 B1:1 Tx 207.193.26.136->151.164.1.8 DNS SPORT=1028 LEN=38 CHKSUM=4FD4 ID=2390 Query RD QCNT=1 pow.zing.org? +OFFSET 0001-0203-0405-0607-0809-0A0B-0C0D-0E0F 0123456789ABCDEF LEN=67 +0000 : FF03 003D C000 0008 2145 0000 3A12 6500 ...=....!E..:.e. +0010 : 003F 11E6 58CF C11A 8897 A401 0804 0400 .?..X........... +0020 : 3500 264F D409 5601 0000 0100 0000 0000 5.&O..V......... +0030 : 0003 706F 7704 7A69 6E67 036F 7267 0000 ..pow.zing.org.. +0040 : 0100 01 ... + +[No.2] 00:00:09.25 B1:1 Rx 151.164.1.8->207.193.26.136 DNS DPORT=1028 LEN=193 CHKSUM=3E06 ID=2390 Answer RD RA QCNT=1 pow.zing.org? ANCNT=1 pow.zing.org=206.57.36.90 TTL=2652 +OFFSET 0001-0203-0405-0607-0809-0A0B-0C0D-0E0F 0123456789ABCDEF LEN=222 +0000 : FF03 003D C000 0013 2145 0000 D590 9340 ...=....!E.....@ +0010 : 00F7 116F 8E97 A401 08CF C11A 8800 3504 ...o..........5. +0020 : 0400 C13E 0609 5681 8000 0100 0100 0300 ...>..V......... +0030 : 0303 706F 7704 7A69 6E67 036F 7267 0000 ..pow.zing.org.. +0040 : 0100 01C0 0C00 0100 0100 000A 5C00 04CE ............\... +0050 : 3924 5A04 5A49 4E47 036F 7267 0000 0200 9$Z.ZING.org.... +0060 : 0100 016F 5B00 0D03 4841 4E03 5449 5703 ...o[...HAN.TIW. +0070 : 4E45 5400 C02E 0002 0001 0001 6F5B 0006 NET.........o[.. +0080 : 034E 5331 C02E C02E 0002 0001 0001 6F5B .NS1..........o[ +0090 : 001C 0854 414C 4945 5349 4E0D 434F 4E46 ...TALIESIN.CONF +00A0 : 4142 554C 4154 494F 4E03 434F 4D00 C042 ABULATION.COM..B +00B0 : 0001 0001 0001 51EC 0004 CE39 2406 C05B ......Q....9$..[ +00C0 : 0001 0001 0001 6F5B 0004 CE39 245A C06D ......o[...9$Z.m +00D0 : 0001 0001 0001 4521 0004 187C 1F01 ......E!...|.. + */ /* Magic text to check for toshiba-ness of file */ @@ -357,10 +357,10 @@ parse_toshiba_rec_hdr(wtap *wth, FILE_T fh, case 'D': if (wth) wth->phdr.pkt_encap = WTAP_ENCAP_LAPD; - pseudo_header->p2p.sent = + pseudo_header->p2p.sent = (direction[0] == 'T' ? TRUE : FALSE ); break; - + default: if (wth) wth->phdr.pkt_encap = WTAP_ENCAP_ETHERNET; @@ -375,7 +375,7 @@ parse_toshiba_hex_dump(FILE_T fh, int pkt_len, guint8* buf, int *err) { char line[TOSHIBA_LINE_LENGTH]; int i, hex_lines; - + /* Calculate the number of hex dump lines, each * containing 16 bytes of data */ hex_lines = pkt_len / 16 + ((pkt_len % 16) ? 1 : 0); @@ -399,9 +399,9 @@ parse_toshiba_hex_dump(FILE_T fh, int pkt_len, guint8* buf, int *err) /* 1 2 3 4 0123456789012345678901234567890123456789012345 -0000 : FF03 003D C000 0008 2145 0000 3A12 6500 ...=....!E..:.e. -0010 : 003F 11E6 58CF C11A 8897 A401 0804 0400 .?..X........... -0020 : 0100 01 ... +0000 : FF03 003D C000 0008 2145 0000 3A12 6500 ...=....!E..:.e. +0010 : 003F 11E6 58CF C11A 8897 A401 0804 0400 .?..X........... +0020 : 0100 01 ... */ #define START_POS 7 diff --git a/wiretap/toshiba.h b/wiretap/toshiba.h index 11a01f65c6..146a7d1b41 100644 --- a/wiretap/toshiba.h +++ b/wiretap/toshiba.h @@ -1,20 +1,20 @@ /* toshiba.h * - * $Id: toshiba.h,v 1.4 2001/11/13 23:55:44 gram Exp $ + * $Id: toshiba.h,v 1.5 2002/08/28 20:30:45 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/visual.c b/wiretap/visual.c index bda0548630..8807cac5d8 100644 --- a/wiretap/visual.c +++ b/wiretap/visual.c @@ -2,21 +2,21 @@ * File read and write routines for Visual Networks cap files. * Copyright (c) 2001, Tom Nisbet tnisbet@visualnetworks.com * - * $Id: visual.c,v 1.10 2002/07/29 06:09:59 guy Exp $ + * $Id: visual.c,v 1.11 2002/08/28 20:30:45 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -228,7 +228,7 @@ static gboolean visual_read(wtap *wth, int *err, long *data_offset) /* Check for the end of the packet data. Note that a check for file EOF will not work because there are index values stored after the last packet's data. */ - if (visual->current_pkt > visual->num_pkts) + if (visual->current_pkt > visual->num_pkts) { *err = 0; /* it's just an EOF, not an error */ return FALSE; @@ -238,10 +238,10 @@ static gboolean visual_read(wtap *wth, int *err, long *data_offset) /* Read the packet header. */ errno = WTAP_ERR_CANT_READ; bytes_read = file_read(&vpkt_hdr, 1, phdr_size, wth->fh); - if (bytes_read != phdr_size) + if (bytes_read != phdr_size) { *err = file_error(wth->fh); - if (*err == 0 && bytes_read != 0) + if (*err == 0 && bytes_read != 0) { *err = WTAP_ERR_SHORT_READ; } @@ -251,7 +251,7 @@ static gboolean visual_read(wtap *wth, int *err, long *data_offset) /* Read the packet data. */ packet_size = pletohs(&vpkt_hdr.incl_len); - if (packet_size > WTAP_MAX_PACKET_SIZE) + if (packet_size > WTAP_MAX_PACKET_SIZE) { /* Probably a corrupt capture file; don't blow up trying to allocate space for an immensely-large packet. */ @@ -266,7 +266,7 @@ static gboolean visual_read(wtap *wth, int *err, long *data_offset) bytes_read = file_read(buffer_start_ptr(wth->frame_buffer), 1, packet_size, wth->fh); - if (bytes_read != (int) packet_size) + if (bytes_read != (int) packet_size) { *err = file_error(wth->fh); if (*err == 0) @@ -329,7 +329,7 @@ static void visual_close(wtap *wth) /* Read packet data for random access. This gets the packet data and rebuilds the pseudo header so that the direction flag works. */ -static gboolean visual_seek_read (wtap *wth, long seek_off, +static gboolean visual_seek_read (wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, guint8 *pd, int len, int *err) { struct visual_pkt_hdr vpkt_hdr; @@ -383,7 +383,7 @@ static gboolean visual_seek_read (wtap *wth, long seek_off, } -/* Check for media types that may be written in Visual file format. +/* Check for media types that may be written in Visual file format. Returns 0 if the specified encapsulation type is supported, an error indication otherwise. */ int visual_dump_can_write_encap(int encap) @@ -472,7 +472,7 @@ static gboolean visual_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, file header. Each packet has a capture time (in msec) relative to the file start time. Use the time of the first packet as the file start time. */ - if (visual->index_table_index == 0) + if (visual->index_table_index == 0) { /* This is the first packet. Save its start time as the file time. */ visual->start_time = phdr->ts.tv_sec; @@ -481,7 +481,7 @@ static gboolean visual_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, visual->index_table = g_malloc(1024 * sizeof *visual->index_table); visual->index_table_size = 1024; } - + /* Calculate milliseconds since capture start. */ delta_msec = phdr->ts.tv_usec / 1000; delta_msec += (phdr->ts.tv_sec - visual->start_time) * 1000; @@ -495,20 +495,20 @@ static gboolean visual_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, switch (wdh->encap) { case WTAP_ENCAP_ETHERNET: /* Ethernet */ - vpkt_hdr.encap_hint = 2; + vpkt_hdr.encap_hint = 2; break; case WTAP_ENCAP_TOKEN_RING: /* Token Ring */ - vpkt_hdr.encap_hint = 3; + vpkt_hdr.encap_hint = 3; break; case WTAP_ENCAP_PPP: /* PPP */ case WTAP_ENCAP_PPP_WITH_PHDR: - vpkt_hdr.encap_hint = 14; + vpkt_hdr.encap_hint = 14; break; case WTAP_ENCAP_CHDLC: /* HDLC Router */ - vpkt_hdr.encap_hint = 13; + vpkt_hdr.encap_hint = 13; break; case WTAP_ENCAP_FRELAY: /* Frame Relay Auto-detect */ - vpkt_hdr.encap_hint = 12; + vpkt_hdr.encap_hint = 12; break; case WTAP_ENCAP_LAPB: /* Unknown */ default: @@ -537,7 +537,7 @@ static gboolean visual_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, /* Write the packet header. */ nwritten = fwrite(&vpkt_hdr, 1, hdr_size, wdh->fh); - if (nwritten != hdr_size) + if (nwritten != hdr_size) { if (nwritten == 0 && ferror(wdh->fh)) *err = errno; @@ -548,7 +548,7 @@ static gboolean visual_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, /* Write the packet data */ nwritten = fwrite(pd, 1, phdr->caplen, wdh->fh); - if (nwritten != phdr->caplen) + if (nwritten != phdr->caplen) { if (nwritten == 0 && ferror(wdh->fh)) *err = errno; @@ -558,7 +558,7 @@ static gboolean visual_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, } /* Store the frame offset in the index table. */ - if (visual->index_table_index >= visual->index_table_size) + if (visual->index_table_index >= visual->index_table_size) { /* End of table reached. Reallocate with a larger size */ visual->index_table_size *= 2; @@ -597,7 +597,7 @@ static gboolean visual_dump_close(wtap_dumper *wdh, int *err) /* Write the index table to the file. */ n_to_write = visual->index_table_index * sizeof *visual->index_table; nwritten = fwrite(visual->index_table, 1, n_to_write, wdh->fh); - if (nwritten != n_to_write) + if (nwritten != n_to_write) { if (err != NULL) { @@ -652,7 +652,7 @@ static gboolean visual_dump_close(wtap_dumper *wdh, int *err) /* Write the file header following the magic bytes. */ nwritten = fwrite(&vfile_hdr, 1, sizeof vfile_hdr, wdh->fh); - if (nwritten != sizeof vfile_hdr) + if (nwritten != sizeof vfile_hdr) { if (err != NULL) { diff --git a/wiretap/visual.h b/wiretap/visual.h index 0d9b02aae9..6ef65146e0 100644 --- a/wiretap/visual.h +++ b/wiretap/visual.h @@ -5,21 +5,21 @@ * * Based on the code that handles netmon files. * - * $Id: visual.h,v 1.4 2002/07/16 07:15:09 guy Exp $ + * $Id: visual.h,v 1.5 2002/08/28 20:30:45 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/vms.c b/wiretap/vms.c index 8d9c911b52..adedf36ead 100644 --- a/wiretap/vms.c +++ b/wiretap/vms.c @@ -1,6 +1,6 @@ /* vms.c * - * $Id: vms.c,v 1.13 2002/06/07 07:27:35 guy Exp $ + * $Id: vms.c,v 1.14 2002/08/28 20:30:45 jmayer Exp $ * * Wiretap Library * Copyright (c) 2001 by Marc Milgram @@ -146,7 +146,7 @@ static gboolean vms_check_file_type(wtap *wth, int *err) int line, byte; unsigned int reclen, i, level; long mpos; - + buf[VMS_LINE_LENGTH-1] = 0; for (line = 0; line < VMS_HEADER_LINES_TO_CHECK; line++) { @@ -442,12 +442,12 @@ parse_single_hex_dump_line(char* rec, guint8 *buf, long byte_offset, int value; static int offsets[16] = {39,37,35,33,28,26,24,22,17,15,13,11,6,4,2,0}; char lbuf[3] = {0,0,0}; - + /* Get the byte_offset directly from the record */ s = rec; value = strtoul(s + 45 + in_off, NULL, 16); - + if (value != byte_offset) { return FALSE; } diff --git a/wiretap/wtap-capture.h b/wiretap/wtap-capture.h index e11185bade..6354bfe46c 100644 --- a/wiretap/wtap-capture.h +++ b/wiretap/wtap-capture.h @@ -1,20 +1,20 @@ /* wtap_capture.h * - * $Id: wtap-capture.h,v 1.2 2002/07/29 06:09:59 guy Exp $ + * $Id: wtap-capture.h,v 1.3 2002/08/28 20:30:45 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/wtap-int.h b/wiretap/wtap-int.h index ab433ace57..b9b3b0d686 100644 --- a/wiretap/wtap-int.h +++ b/wiretap/wtap-int.h @@ -1,20 +1,20 @@ /* wtap-int.h * - * $Id: wtap-int.h,v 1.27 2002/07/31 22:52:38 jmayer Exp $ + * $Id: wtap-int.h,v 1.28 2002/08/28 20:30:45 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/wiretap/wtap.c b/wiretap/wtap.c index 1cff832ecb..5e51c305ee 100644 --- a/wiretap/wtap.c +++ b/wiretap/wtap.c @@ -1,20 +1,20 @@ /* wtap.c * - * $Id: wtap.c,v 1.70 2002/08/06 05:40:47 guy Exp $ + * $Id: wtap.c,v 1.71 2002/08/28 20:30:45 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -237,7 +237,7 @@ const char Note that we do *not* want to call the subtype's close function, as it would free any per-subtype data, and that data may be needed by the random-access side. - + Instead, if the subtype has a "sequential close" function, we call it, to free up stuff used only by the sequential side. */ void diff --git a/wiretap/wtap.h b/wiretap/wtap.h index 37b5c15434..a37a7a6c0e 100644 --- a/wiretap/wtap.h +++ b/wiretap/wtap.h @@ -1,20 +1,20 @@ /* wtap.h * - * $Id: wtap.h,v 1.121 2002/08/16 00:41:39 guy Exp $ + * $Id: wtap.h,v 1.122 2002/08/28 20:30:45 jmayer Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- cgit v1.2.3