WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2016-Feb-03 12:57:48

wenchao88
Member
Registered: 2015-Aug-22
Posts: 26

How to get detailed information type of packets

Hi, I am working on the 802.11 MAC. I want to distinguish the type of data packets flowing through WARP. However, when I print out the type using

header->frame_control_1

I can only find two types: MAC_FRAME_CTRL1_TYPE_DATA (0x08), and MAC_FRAME_CTRL1_SUBTYPE_BEACON (0x80). However, when I look at the WARP log, I find there are more detailed information about the types

pkt_type    uint8    Packet type: 1 = other data, 2 = encapsulated Ethernet, 3 = LTG, 11 = management, 21 = control

My question is

1. How can I get detailed information about the type of packets?

2. Is it possible to identify the protocol of the packet, such as http, ftp, etc.

Thank you

Offline

 

#2 2016-Feb-03 13:50:28

chunter
Administrator
From: Mango Communications
Registered: 2006-Aug-24
Posts: 1212

Re: How to get detailed information type of packets

The function in the framework that fills in that "pkt_type" field is wlan_mac_high_pkt_type(). In addition to looking at the frame_control_1 byte that you are referring to, that function looks at frame_control_2 to see if the packet is encrypted. If it isn't encrypted, that function looks deeper into the payload of the packet for the LLC header that is created during the encapsulation process. That LLC header can distinguish between ARP packets and IPv4 packets, but not anything deeper than that.

You can further classify the packet to different protocols by looking deeper into the payload and scanning for the IP structure that you are looking for.

Offline

 

#3 2016-Nov-24 03:12:56

MobLna
Member
Registered: 2016-Nov-24
Posts: 2

Re: How to get detailed information type of packets

Hello,
I have the similar question about how to get detailed information of packets.
I want to get info about type of a packets ,when it received (precision microseconds),length of the packet(duaration).Timestamp and from where it comes and print it in some file.
Could you pls tell me which functions I can use
Thank you

Last edited by MobLna (2016-Nov-24 06:34:21)

Offline

 

#4 2016-Nov-24 09:41:07

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: How to get detailed information type of packets

I would suggest getting started with the example Python scripts. All the parameters you list are included in the node log and are used in the example scripts.

Offline

 

#5 2016-Nov-28 02:50:11

MobLna
Member
Registered: 2016-Nov-24
Posts: 2

Re: How to get detailed information type of packets

thanks for the reply,but I have a question about time.In that log files I didn't find any timing data.I want to check time of arrivals of packets(timestamp) with microseconds precision.Is it possible?

Last edited by MobLna (2016-Nov-28 02:51:01)

Offline

 

#6 2016-Nov-28 03:31:21

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: How to get detailed information type of packets

Every log entry has a 'timestamp' field. For TX_LOW events the timestmap field records the node's MAC Time when the Tx PHY is started. For RX_OFDM events the timestamp field records the MAC Time when the Rx PHY detects a valid payload. In both cases the MAC Time is accurate to the sample period (sub-microsecond).

Offline

 

Board footer