Networking Forums

Networking Forums > Computer Networking > Linux Networking > union field length mismatch

Reply
Thread Tools Display Modes

union field length mismatch

 
 
linux.lover2004@gmail.com
Guest
Posts: n/a

 
      05-20-2005, 03:35 PM
Hello,
In linux kernel there is a struct skbuff that used to store packets. It
has many fields defined in it. thers a union
union
{
struct iphdr *iph;
struct ipv6hdr *ipv6h;
struct arphdr *arph;
struct ipxhdr *ipxh;
unsigned char *raw;

} nh;

I want to ask once IP header is added to skbuff structure all pointers
in union carry same information. We know IP header is 20 bytes long.
Then i try to send raw variable to my function in kernel module.
processip(sb->nh.raw) where sb is of typr struct skbuff
Then why strlen on (sb->nh.raw) doesnot give 20 bytes as result instead
its giving 1.
I want my function to take ip header as unsigned char and print its
strlen as 20 and want to process on it further.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
newbie: VPN and IP mismatch tg Windows Networking 6 07-13-2008 01:15 PM
Speed/Duplex settings mismatch Bardi Windows Networking 3 02-28-2006 04:39 PM
Duplex Mismatch?? Darrell Wireless Networks 2 12-13-2005 01:52 AM
WINS record ID mismatch anonymous Windows Networking 0 02-03-2004 04:26 PM
DWL900AP+ Password Mismatch kosokarl Wireless Internet 2 09-24-2003 04:32 PM



1 2 3 4 5 6 7 8 9 10 11