From owner-freebsd-hackers Wed Dec 10 15:13:06 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id PAA00663 for hackers-outgoing; Wed, 10 Dec 1997 15:13:06 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from marvin.cs.dis.qut.edu.au (dave@marvin.cs.dis.qut.edu.au [131.181.124.98]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id PAA00629 for ; Wed, 10 Dec 1997 15:12:53 -0800 (PST) (envelope-from dave@marvin.cs.dis.qut.edu.au) Received: from localhost (dave@localhost) by marvin.cs.dis.qut.edu.au (8.8.5/8.8.5) with SMTP id JAA21334 for ; Thu, 11 Dec 1997 09:12:14 +1000 Date: Thu, 11 Dec 1997 09:12:13 +1000 (EST) From: David Richards To: BSD Hackers Subject: IP Firewall Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Sorry, I did actually look at man 4 ipfirewall. But, I do not see how this is appropriate to an application that will set filters in place. Let me explain, The parameters are (in order): raw_socket, IPPROTO_IP, ipfw option, struct ipfw, size I am fine with them all, except raw_socket. Where did this socket come from?? Let's take an example from the ipfw.c when a flush is being done: setsockopt(s,IPPROTO_IP,IP_FW_FLUSH,NULL,0) Now, where does "s" come from?? I notice that it is a global variable, but i can't find where any initialisation occurs ... can someone please explain this concept to me? Thanks, Dave. -#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#- David Richards Ph: +61 7 3864 4347 Network Programmer Fax: +61 7 3864 5272 Computing Services E-mail: dj.richards@qut.edu.au Queensland University of Technology Brisbane, Australia -#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-