From owner-freebsd-net Wed Jun 13 10:58: 0 2001 Delivered-To: freebsd-net@freebsd.org Received: from alacran.it.uc3m.es (alacran.it.uc3m.es [163.117.139.44]) by hub.freebsd.org (Postfix) with ESMTP id A1EA537B408 for ; Wed, 13 Jun 2001 10:57:40 -0700 (PDT) (envelope-from jrh@it.uc3m.es) Received: from it.uc3m.es (localhost [127.0.0.1]) by alacran.it.uc3m.es (8.10.2/8.10.2/SuSE Linux 8.10.0-0.3) with ESMTP id f5DHwtp07553 for ; Wed, 13 Jun 2001 19:58:55 +0200 X-Authentication-Warning: alacran.it.uc3m.es: Host localhost [127.0.0.1] claimed to be it.uc3m.es Message-ID: <3B27A9DF.7DC4F797@it.uc3m.es> Date: Wed, 13 Jun 2001 19:58:55 +0200 From: Juan Fco Rodriguez Hervella X-Mailer: Mozilla 4.74 [es] (X11; U; Linux 2.4.3 i686) X-Accept-Language: en MIME-Version: 1.0 To: Lista Subject: Please help me Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi all: I am trying to make a kernel modification to add automatically a Routing Header before send the packet. I am using KAME kernel. I have found the following structure in netinet6/ipv6_var.h: /* Routing header related info */ struct ip6po_rhinfo { struct ip6_rthdr *ip6po_rhi_rthdr; /* Routing header */ #if defined(NEW_STRUCT_ROUTE) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) struct route ip6po_rhi_route; /* Route to the 1st hop */ #else struct route_in6 ip6po_rhi_route; /* Route to the 1st hop */ #endif }; #define ip6po_rthdr ip6po_rhinfo.ip6po_rhi_rthdr #define ip6po_route ip6po_rhinfo.ip6po_rhi_route But I do not find the "struct ip6_rthdr" in the sources. I would like do something like this (in some point before call to ip6_output): MALLOC_DEFINE(M_RTHDR, "ip6_rthdr", "Routing Header"); ... if(insert_rh && (opts->ip6po_rthdr == NULL) ) { opts->ip6po_rthdr= (struct ip6_rthdr *)malloc( sizeof(struct ip6_rhtdr), M_RTHDR, M_WAITOK ); opts->ip6po_rthdr= **** here, I should fill the routing header *** .... } Is this correct? How can I construct the Routing Header in 'opts'? Thanks for read me! -- ********************************* Juan F. Rodriguez Hervella Universidad Carlos III de Madrid ******************************** To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message