WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2019-Apr-25 21:33:30

wckim
Member
Registered: 2017-Apr-04
Posts: 17

Modifying payload

Hello all,

In these days, I am modifying C source of a WARP AP using 802.11 Reference Design.

I know that the WARP AP process a data frame to an Ethernet packet in 'mpdu_rx_process of ''wlan_mac_ap.c'.

Here, I want to modify the Ethernet packet's original data (ex. 01234) to malicious data (ex. 00000).

I'd appreciate it if you could tell me how to modify the source.

Thank you always.

Offline

 

#2 2019-Apr-26 10:45:46

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

Re: Modifying payload

mpdu_rx_process processes packets which are received from the wireless interface. This function handles de-encapsulation of the wireless packet (via the wlan_eth_decap() helper function) to re-create an Ethernet packet ready for transmission over the Ethernet interface. The de-encapsulation function accesses the packet contents (header addresses, DHCP payload if present) to re-create the Ethernet packet. You could insert your code here to further modify the packet contents before it is transmitted over the Ethernet interface.

Offline

 

#3 2019-Apr-29 05:28:39

wckim
Member
Registered: 2017-Apr-04
Posts: 17

Re: Modifying payload

Thank you for your response.

Sorry, I didn't recognize my code version.

I'm using on RefDes_v1.6.1, but sadly I could not find wlan_eth_decap() function.

Is there a wlan_eth_decap() on RefDes_v1.6.1?

Or are there any related codes with wlan_eth_decap() function on my version?

Offline

 

#4 2019-Apr-29 08:49:44

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

Re: Modifying payload

1.6.1 is a very old version of the design, we've made many improvements since then, so I'd recommend updating to the latest.

That said, decapsulation was handled by wlan_mpdu_eth_send() back in that version of the design.

Offline

 

#5 2019-Apr-30 02:31:35

wckim
Member
Registered: 2017-Apr-04
Posts: 17

Re: Modifying payload

Thanks a lot.

I changed the version to 1.7.8.

However, I still could not find the code dealing with an Ethernet frame's data value on 'wlan_eth_decap()'.

I want to modify the Ethernet frame's data values, unlike the original data values.

Can you give some example codes that can modify the Ethernet frame's data values on 'wlan_eth_decap()' parts or any other parts?

Last edited by wckim (2019-Apr-30 02:31:46)

Offline

 

#6 2019-Apr-30 09:03:47

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

Re: Modifying payload

We do not have any example code for the customization you describe. You will need to learn how the existing code works, then make your modifications. The 'wlan_eth_decap()' (wireless->wired) and 'wlan_eth_encap()' (wired->wireless) functions are the best places to start for custom code that must access/modify the contents of Ethernet packets.

Offline

 

Board footer