WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2014-Jun-26 15:54:23

sb432
Member
Registered: 2014-Jun-26
Posts: 3

Searching a value in an unknownMacframe

I am working on a project where I need to search for a specific value within all fields of a MacFrame header received from an interferer node. I don't know the structure of the packet.

For example, if I have received a packet from a node.


                   
                    cogMacframe.header.destAddr = (unsigned short int)(NODEID_TO_ADDR(0xFF)); //Broadcast
                    cogMacframe.header.timeLeft = (numUpdates-currUpdate+1)*updateDuration/1000;
                    cogMacframe.header.cogParam = nextChan;
                                       cogMacframe.header.somethingIdontknowbutIaminterested = 10;
                                      cogMacframe.header.somethingIdontknow = xyz;

Here I know that one field will certainly take the value of 10. I don't know which field is it. When I receive the packet, I want to search for this value of 10 in all the fields and get the name of the field. Then I need to change this value from 10 to lets say 16 and transmit back to an arbitrary node.

Is it possible to do it ?

Regards,

Last edited by sb432 (2014-Jun-26 16:32:49)

Offline

 

#2 2014-Jun-27 03:44:13

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

Re: Searching a value in an unknownMacframe

The first 24 bytes in every transmission of the OFDM Reference Design are for the header of the packet (Macframe definition here and corresponding phyHeader definition here). Of those bytes, only the fullRate, codeRate, and length fields matter to the PHY. Every other byte can take on different values depending on how those bytes are interpreted in whatever code you are using.

Offline

 

#3 2014-Jun-27 05:13:39

sb432
Member
Registered: 2014-Jun-26
Posts: 3

Re: Searching a value in an unknownMacframe

Thanks for that.
It could help me in putting an if condition for e.g if I suspect the value is in reserved field then I could use a condition

If reserved0==x || reserved1==x || reserved2==x


I want to know further that  I wanted to spoof a packet. For eg if Node 5 transmits to Node 6 with a sequence number 8. I am Node 2, I capture his packet, insert my own fake sequence  then transmit it back to Node6, pretending I am Node5(inserting 5 as a source address), will my spoofing be successful ?

Offline

 

Board footer