Networking Forums

Networking Forums > Computer Networking > Linux Networking > using struct igmphdr with skbuff

Reply
Thread Tools Display Modes

using struct igmphdr with skbuff

 
 
fafarun
Guest
Posts: n/a

 
      05-21-2009, 06:15 PM
Hello,

I work on a debien 2.6.21, and ebtables is compiled like a module.
I work on the developement of a new module for ebtables. My module
works, it's just a new target -j TEST

My problem is when I'm in the ' static int ebt_target function', I
need to read some igmp information, to know the type of igmp packet
and the group multicast.

I try something like that (in normal case I don't use the skb
directly, i use first the function skb_copy_bits()).


static int ebt_target (struct sk_buff **pskb,
unsigned int hooknr,
const struct net_device *in,
const struct net_device *out,
const void *data,
unsigned int datalen)

{
struct sk_buff *skb = *pskb;
printk ("igmp type :%u\n", skb->h.igmph->type);

}

I send a igmp packet to join a group
and I recieve this

igmp type : 70

Or the different type of igmp are : 11, 12, 16, 17, 22
Normaly the good value in my case is 22 (I worked with igmp v3).

I don't undestand the response?

Then I try to see the ip of the multicast group (I send for the group
239.255.1.4) , I recieve 0.0.24.0 .

It's really strange because if I try to see the ip address of the
packet, it's works (skb->h.ipiph->daddr) : 224.0.0.22


If someone have an idea of the problem ?


 
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
skbuff size Ggds Linux Networking 0 04-07-2008 11:58 AM
skbuff size Ggds Linux Networking 0 04-07-2008 11:56 AM
struct through sockets =?ISO-8859-1?Q?=D6rn_Vidarsson?= Linux Networking 2 10-27-2005 07:18 AM
some skbuff questions cranium Linux Networking 1 06-19-2004 04:01 AM
skbuff question Parag Linux Networking 0 05-29-2004 03:27 PM



1 2 3 4 5 6 7 8 9 10 11