Re: sk_buff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 28 Jan 2002 16:09:01 +0100
Joerg Eggink <joerg.eggink@ccrle.nec.de> wrote:

> Hello all

Good time of day.

> For this I use the following code. 
> ***********************************************************************
> *********************************+	
>	struct nd_msg *msg;		/*Neighbour discovery message*/
> 
> 	skb = allock_skb( len , GFP_ATOMIC);
 
It looks like you forgot 
	skb_reserve(skb, 16); //14 = size of an ethernet header + 2 to align
and	eth = (__u8 *) skb_push(skb, 14);

> 	/*pack the ip6 header*/
> 	ip6_nd_hdr( sk, skb, dev, saddr, &maddr, IPPROTO_ICMPV6, msg_len);
> 	
> 	msg = (struct nd_msg *)skb_put(skb, len);
> 
> 	/*pack the icmpv6 header */
> 	msg->icmph.icmp6_type = NDISC_ROUTER_ADVERTISEMENT;	/*Type = 134*/
> 	msg->icmph.icmp6_code = 0;
> 	msg->icmph.icmp6_cksum = 0;

> I hope there is anybody who can help me. 

I hope this will help you.

> Ok thank you in advance for all help.

> Jörg
> --------------------------------------------------------
> Joerg Eggink
> Network Laboratories Heidelberg NEC Europe Ltd.

	Evgeniy Polyakov ( s0mbre ).
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux