Date: Fri, 6 Feb 2004 12:34:37 +0100 From: Juan Rodriguez Hervella <jrh@it.uc3m.es> To: freebsd-net@freebsd.org Subject: Question about "struct encaptab" and IPv6-in-IPv6 tunnels Message-ID: <200402061234.38070.jrh@it.uc3m.es>
next in thread | raw e-mail | index | archive | help
Hello,
I'm looking at the source code, trying to follow the steps that
happen when an IPv6-in-IPv6 packet is received, but Im quite
lost, I wonder if anybody could help me to understand it.
When the host receives an IPv6-in-IPv6 packet,
"encap6_input()" is call from "ip6_input()".
I don't understand what "encap6_input()" does.
It seems that it uses this structure:
struct encaptab {
LIST_ENTRY(encaptab) chain;
int af;
int proto; /* -1: don't care, I'll check myself
*/
struct sockaddr_storage src; /* my addr */
struct sockaddr_storage srcmask;
struct sockaddr_storage dst; /* remote addr */
struct sockaddr_storage dstmask;
int (*func)(const struct mbuf *, int, int, void *);
const struct protosw *psw; /* only pr_input will be used */
void *arg; /* passed via m->m_pkthdr.aux */
};
Which is initialized with "encap_init()", though "encapt_init()" makes
nothing interesting....
I'd like to know where all these fields are filled up....
Any explanation will be very useful, Im looking forward to hearing you!
thanx!
--
******
JFRH
******
One advantage of talking to yourself is that you know at least
somebody's listening.
-- Franklin P. Jones
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200402061234.38070.jrh>
