LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   [SOLVED] Fatal Error:raw.c:dlt_raw_encode() : DLT_RAW plugin does not support packet encoding (https://www.linuxquestions.org/questions/linux-newbie-8/%5Bsolved%5D-fatal-error-raw-c-dlt_raw_encode-dlt_raw-plugin-does-not-support-packet-encoding-841853/)

pawelch 11-02-2010 05:13 AM

[SOLVED] Fatal Error:raw.c:dlt_raw_encode() : DLT_RAW plugin does not support packet encoding
 
hi all,

I am trying to change the IP address of the traffic that has been stored. I have tried different commands:

Code:

tcprewrite --endpoints=10.16.101.58:10.16.101.55 --cachefile=example.cache --infile=test.pcap --outfile=new.pcap
Code:

tcprewrite --infile=test.pcap --outfile=out.pcap --dstipmap=198.168.222.64:10.16.101.58
however, either from these two commands end up with a following error:

Code:

Fatal Error: From ./plugins/dlt_raw/raw.c:dlt_raw_encode() line 216:
DLT_RAW plugin does not support packet encoding

I could not find anything about it in google, unless I have searched in a wrong way.

when I searched for a solution and generic commands I used those two websites: website1 website2

Commands have been tested using a casual user account as well as a privileged one (root).

Thank you for your time and help accordingly.

pawelch 11-03-2010 06:32 AM

[SOLVED] Fatal Error:raw.c:dlt_raw_encode() : DLT_RAW plugin does not support packet encoding
 
I have not figured one thing. with raw packets (by raw I mean when they are stored as a flow of raw data) it is necessary to translate that data to:

a) layer 2 first and then to
b) layer 3

in command-like language, for (a) it was enough to equip the flow with a random mac-address (note I have used --dlt-enet (ethernet) formating):

Code:

sudo tcprewrite --infile=smaller.pcap --dlt=enet --outfile=out.pcap --enet-dmac=00:55:22:AF:C6:37 --enet-smac=00:44:66:FC:29:AF
and then for(b) just change the ip address with:

Code:

sudo tcprewrite --infile=out.pcap --outfile=out11.pcap --dstipmap=192.168.2.2:1.1.1.1 --srcipmap=192.168.2.2:1.1.1.1
Problem is sorted, hopefully it will help people getting the error from the title


All times are GMT -5. The time now is 09:37 PM.