aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/toshiba.c
diff options
context:
space:
mode:
Diffstat (limited to 'wiretap/toshiba.c')
-rw-r--r--wiretap/toshiba.c118
1 files changed, 59 insertions, 59 deletions
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 <gram@alumni.rice.edu>
- *
+ *
* 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