From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 30 02:50:44 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 23C3E37B401 for ; Wed, 30 Apr 2003 02:50:44 -0700 (PDT) Received: from foem.leiden.webweaving.org (fia224-72.dsl.hccnet.nl [62.251.72.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E81D43F75 for ; Wed, 30 Apr 2003 02:50:38 -0700 (PDT) (envelope-from dirkx@webweaving.org) Received: from foem (IDENT:chuckwebweaving.org@foem [10.11.0.2]) h3U9oaOh058094 for ; Wed, 30 Apr 2003 11:50:36 +0200 (CEST) (envelope-from dirkx@webweaving.org) Date: Wed, 30 Apr 2003 11:50:36 +0200 (CEST) From: Dirk-Willem van Gulik X-X-Sender: dirkx@foem To: freebsd-hackers@freebsd.org Message-ID: <20030430114317.V2090-100000@foem> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: ipfw2 interface / examples X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2003 09:50:44 -0000 I am recoding some firewall management code which acts on data on the application layer (to open ports etc) from ipfw to the new ipfw2. And am struggling a bit understanding what exactly to pass. - Needless to say - a bug in your rule gives one a 'Adding rule: Invalid argument' errno; is there any way/tool to decode how the IP_FW_ADD struct is passed and get some more insight ? - Is there a simpler example than ipfw2.c, or an raw docs for the getsockopt() api which helps me understand this better. In particular the from/to 'O_IN/(!O_IN)' versus the ability of ipfw.c to set both IP_FW_F_IN and IP_FW_F_OUT to make the rule symetrical around from/to. Thanks. Dw