equal
deleted
inserted
replaced
|
1 #!/bin/sh |
|
2 # Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 # All rights reserved. |
|
4 # This component and the accompanying materials are made available |
|
5 # under the terms of the License "Symbian Foundation License v1.0" |
|
6 # which accompanies this distribution, and is available |
|
7 # at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
8 # |
|
9 # Initial Contributors: |
|
10 # Nokia Corporation - initial contribution. |
|
11 # |
|
12 # Contributors: |
|
13 # |
|
14 # Description: |
|
15 # Convert the output of tcsim into a libpcap format packet file. |
|
16 # Note: the timestamp is not converted |
|
17 # Usage: tcsim2pcap <infile >outfile |
|
18 # Ethereal <http://www.ethereal.com> is expected to be installed to get the |
|
19 # text2pcap program. |
|
20 # tcsim is a packet simulation tool used here to generate synthetic TCP/IP |
|
21 # packets. It is part of tcng, the next generation traffic control architecture |
|
22 # for the Linux operating system. More information can be obtained at |
|
23 # http://tcng.sourceforge.net/ This script was tested with tcng version 9f |
|
24 # November 7, 2003 |
|
25 # danfa |
|
26 # |
|
27 # |
|
28 |
|
29 sed -e '/^[0-9\.]\+ [^E]/d' -e 's/^.*://' -e 's/\([0-9a-f][0-9a-f]\)\([0-9a-f][0-9a-f]\)/\1 \2/g' | \ |
|
30 sed -e 's/\([0-9a-f][0-9a-f]\)\([0-9a-f][0-9a-f]\)/\1 \2/g' -e 's/^/00000000/'|\ |
|
31 text2pcap -l 12 - - |