WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2007-Jun-27 15:42:38

vikasg
Member
Registered: 2007-Jun-16
Posts: 14

IP Addresses in txBuffer.data

We are using latest OFDM reference design and printed out complete txBuffer.data but couldn't find the source and destination IP addresses. Could you please tell us the format of txBuffer.data
Thank you

Last edited by vikasg (2007-Jun-27 15:43:47)

Offline

 

#2 2007-Jun-27 15:53:24

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

Re: IP Addresses in txBuffer.data

The reference design implements a wired-wireless bridge. The WARP boards do not have IP addresses. txBuffer.data contains whatever bytes were received over Ethernet, so the format will depend entirely on what kind of packet you're generating on the wire. To understand what bytes your seeing, I suggest looking at references for Ethernet and IP frame formats (like this and this).

Offline

 

#3 2007-Jun-27 18:21:46

vikasg
Member
Registered: 2007-Jun-16
Posts: 14

Re: IP Addresses in txBuffer.data

1.  We are using VLC media player to stream video. so at the transmitter side, UDP packet received at MAC layer (from IP layer) should contain IP addresses of source and destination. The UDP packet should be contained in txBuffer.data. we are using following code for printing txBuffer.data --

unsigned char temp;
for(i = 0; i< txBuffer.length; i++) {
          temp = txBuffer.data[i];
          printf(" %d  th byte : %x \n", i,temp);
}


However, the output does not contain either the source or the destination IP addresses.

2. As txBuffer.data is declared as
     volatile Xuint32 *data __attribute__ ((aligned (8)));
   
   I was thinking if there is any problem in printing *data ... as it is aligned. Could you please suggest?

Thank you.

Last edited by vikasg (2007-Jun-27 18:41:44)

Offline

 

#4 2007-Jun-27 21:16:37

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

Re: IP Addresses in txBuffer.data

You may be seeing the result of the endian change between the PowerPC/PLB and OFDM core's VHDL. If so, all the bytes you expect are there, they're just flipped in chunks of 8.

Try a loop like this (I haven't actually tried this code, but it gives the basic idea):

Code:

unsigned char temp;
for(i = 0; i<txBuffer.length; i=i+8) {
	for(j = 7; j>=0; j--) {
		temp = txBuffer.data[i + j];
		printf(" %d  th byte : %x \n", (i + (7-j)), temp);
	}
}

Offline

 

Board footer