hello, i have NSData
...
NSData *d = [NSData dataWithBytes:(char*)&buffer length:len];
NSLog(@"%@", d); // <efbeadde 14000100 00000000 02100000 04000000 00000000 
00000000 00000000 00185918 00000000 b08259d8 1e000000>

and I have structure

typedef struct mrim_header
{
u_long  magic;
u_long  proto;
u_long  seq;
u_long  msg;
u_long  dlen;
u_longIP;
u_longPort;
u_charReserved[16];
}mrim_header;

how can i parse this data to this structure? In general, i should catch some 
unsigned long variable, i guess it's 1e000000 and it must be equal 30 so, 
before it i sent some packet and server returned to me these bytes, now i 
should parse it

Please, let me know how to do it!


      
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to