From owner-freebsd-net@FreeBSD.ORG Sun Sep 28 23:50:52 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95A541065689 for ; Sun, 28 Sep 2008 23:50:52 +0000 (UTC) (envelope-from rjf12@students.waikato.ac.nz) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.171]) by mx1.freebsd.org (Postfix) with ESMTP id 78BB18FC15 for ; Sun, 28 Sep 2008 23:50:52 +0000 (UTC) (envelope-from rjf12@students.waikato.ac.nz) Received: by wf-out-1314.google.com with SMTP id 24so1783238wfg.7 for ; Sun, 28 Sep 2008 16:50:52 -0700 (PDT) Received: by 10.142.222.21 with SMTP id u21mr1888599wfg.67.1222644115998; Sun, 28 Sep 2008 16:21:55 -0700 (PDT) Received: by 10.142.200.18 with HTTP; Sun, 28 Sep 2008 16:21:55 -0700 (PDT) Message-ID: Date: Mon, 29 Sep 2008 12:21:55 +1300 From: "Ryan French" To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Initialisation of a networking protocol X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2008 23:50:52 -0000 Hi everyone, I'm having a bit of trouble with my MPLS protocol code at the moment. I have the code written and compiling (mostly based on some OpenBSD code I was shown) but when an MPLS packet is received it doesnt appear as thou my mpls_input routine is being called. I believe this is because I have not initialised the protocol properly. I have created protosw structure for MPLS as well as created an mpls_init(void) function which registers the protocol with netisr via netisr_register. Other than that I am not really sure where I tell the kernel to call the mpls_init function so that the protocol is initialised, and a couple of hours of googling/looking through ip6 code hasnt really helped at all. If anyone can help and needs to see the code it can be viewed on Perforce at http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/projects/soc2008/rfrench_mpls&HIDEDEL=NO Thanks for any help. - Ryan French