From owner-freebsd-net@FreeBSD.ORG Fri Feb 6 03:34:49 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE56016A4CE for ; Fri, 6 Feb 2004 03:34:49 -0800 (PST) Received: from smtp01.uc3m.es (smtp01.uc3m.es [163.117.136.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id 571F443D5D for ; Fri, 6 Feb 2004 03:34:42 -0800 (PST) (envelope-from jrh@it.uc3m.es) Received: from smtp01.uc3m.es (localhost [127.0.0.1]) by localhost.uc3m.es (Postfix) with ESMTP id DF3779331 for ; Fri, 6 Feb 2004 12:34:40 +0100 (CET) Received: from cimborrio (cimborrio.it.uc3m.es [163.117.139.95]) by smtp01.uc3m.es (Postfix) with ESMTP id C23A6930E for ; Fri, 6 Feb 2004 12:34:40 +0100 (CET) From: Juan Rodriguez Hervella Organization: UC3M To: freebsd-net@freebsd.org Date: Fri, 6 Feb 2004 12:34:37 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200402061234.38070.jrh@it.uc3m.es> Subject: Question about "struct encaptab" and IPv6-in-IPv6 tunnels X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2004 11:34:50 -0000 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