Question about "struct encaptab" and IPv6-in-IPv6 tunnels
Juan Rodriguez Hervella
jrh at it.uc3m.es
Fri Feb 6 03:34:50 PST 2004
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
More information about the freebsd-net
mailing list