On Wed, 30 Jan 2002 11:47:34 +0100 Joerg Eggink <joerg.eggink@ccrle.nec.de> wrote: > The goal of my program is to set a new Address for my own interface. For > this i will call the ndisc_rcv function with an own created sk_buff. > I think I don't need an ethernet header for this. Why don't you want to use ndisc_send_na() or neigh_update()? > My problem is the ICMPv6 header. > After calling the function ndisc_rcv I get the message "the code is not > zero" or somethink else. I think the ICMPv6 header is not on the right > place in the sk_buff. Hmm, it is very strange error... > The ndisc_rcv function read the icmp header with > struct ra_msg *ra_msg = (struct ra_msg *) skb->h.raw > > and i write the icmp header in my module with > struct ra_msg *msg; > msg = skb_put (skb , msg_len); I think the thing is here: skb_alloc(); ================================ ^ tail,data; len = 0; skb_reserve() ================================ ^ data,tail; len = somthing; skb_push(ethernet_length); ================================ ^ ^ data tail; len -= tail-data; skb_put(ip6hdr_length); ================================ ^ ^ data tail; len += sizeof(struct ipv6_hdr); But in you case here will be some other picture: skb_alloc(); ================================ ^ tail,data; len = 0; skb_put(ip6hdr_length); ================================ ^ ^ data tail, len = sizeof(struct ipv6_hdr); from ndisc_rcv(); __skb_push(skb, skb->data-skb->h.raw); In your case second parameter is something nonunderstandable.. So i still hope, that skb_reserve(16) and skb_push(14) should help you. > Or do you have another idea to set a new interface address in the same > way as the router advertisement. Maybe ndisc_send_na() or neigh_update() could help you? Or even some ioctl, which can be got from ifconfig.c. Good luck. > Regards Jörg 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