To make the pcap2matlab litlle bit simple to use:
capture = pcap2matlab(filter, decodeas_and_dissector, filename_or_interface, capture_stop_criteria)
Lets say you are using a udp protocol and the data you would like to read is on top of it: data[0:1] (in packet showed below is 0x5d 0x2d)
Therfore in order to read a file you shall use:
- filter=[]; %there is no specific filter
- decodeas_and_dissector.somedata=base+0:base+1; (where base is the location of the 1st byte of the data (0x2a=42))
- capture_stop_criteria=[];
Now, lets assume that your data is dissected, like udp.srcport,
Therfore in order to read a file you may use:
- decodeas_and_dissector = {'udp.srcport'}
other option is like before
- decodeas_and_dissector.srcport = 34:35 %locations (0x22:0x23)
0 Comments
Sign in to comment.