[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

64 bit little endian



hej

Jeg er ved at modificere en driver til trådløst netwærk. Jeg har nu adgang
til alle pakker, der kommer forbi driveren. Dvs. jeg henter informationen
fra pakkerne nogenlunde som her:

funktion ( , ,struct sk_buff *skb)
{
...
...
	for(i = 0; i < pakke længde; i++)
	{

		if((i % 16) == 0)
		{
			printk("\n");
		}
		//data[i] er unsigned char
		printk("%02x ", skb->data[i]);

	}
}

Test udskrift fra /var/log/messages:

Dec  8 11:05:33 malinko kernel: SKB:
Dec  8 11:05:33 malinko kernel: 80 00 00 00 ff ff ff ff ff ff 00 30 65 06
5c 6f
Dec  8 11:05:33 malinko kernel: 00 30 65 06 5c 6f 20 ee 7a 11 21 46 f6 05
00 00
Dec  8 11:05:33 malinko kernel: 64 00 11 00 00 05 4b 4d 6e 65 74 01 04 82
84 0b
Dec  8 11:05:33 malinko kernel: 16 03 01 01 05 04 00 01 00 00 80 06 00 60
1d 00
Dec  8 11:05:33 malinko kernel: 32 00 00 60 1d 00 76 06 00 00 00 00 01 00
00 00
Dec  8 11:05:33 malinko kernel: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00
Dec  8 11:05:33 malinko kernel: 00 00 00 00
Dec  8 11:05:33 malinko kernel:  END OF SKB


En del er denne data er et 8x8 bytes eller 64 bits (little endian) timestamp:
7a 11 21 46 f6 05 00 00

Spørgsmålet er så endelig - Hvordan arbejder jeg nemmest med dette
timestamp og får dette konverteret til et læseligt tal?
Timestamp'et skulle også gerne på en eller anden måde ende i en struct?

(Min processer er en alm. intel arch - hedder det vist:-))

Mvh.
Martin


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:10 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *