Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jun 2001 19:58:55 +0200
From:      Juan Fco Rodriguez Hervella <jrh@it.uc3m.es>
To:        Lista <freebsd-net@freebsd.org>
Subject:   Please help me
Message-ID:  <3B27A9DF.7DC4F797@it.uc3m.es>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B27A9DF.7DC4F797>