From owner-freebsd-current Fri Aug 23 10:46:11 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id KAA16955 for current-outgoing; Fri, 23 Aug 1996 10:46:11 -0700 (PDT) Received: from red.jnx.com (ppp-206-170-2-37.sntc01.pacbell.net [206.170.2.37]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id KAA16948; Fri, 23 Aug 1996 10:46:07 -0700 (PDT) Received: from base.jnx.com (base.jnx.com [208.197.169.238]) by red.jnx.com (8.7.5/8.7.3) with ESMTP id KAA18116; Fri, 23 Aug 1996 10:46:05 -0700 (PDT) Received: from base.jnx.com (localhost.jnx.com [127.0.0.1]) by base.jnx.com (8.7.5/8.7.3) with ESMTP id KAA16117; Fri, 23 Aug 1996 10:45:54 -0700 (PDT) Message-Id: <199608231745.KAA16117@base.jnx.com> To: Terry Lambert cc: sos@FreeBSD.org, rgrimes@GndRsh.aac.dev.com, archie@whistle.com, julian@whistle.com, current@FreeBSD.org Subject: Re: cvs commit: src/sys/netinet in.h ip_fw.h ip_input.c ip_output.c In-reply-to: Your message of "Fri, 23 Aug 1996 10:14:46 PDT." <199608231714.KAA16063@phaeton.artisoft.com> Date: Fri, 23 Aug 1996 10:45:53 -0700 From: Paul Traina Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk Good point. It saves re-doing a lot of work (e.g. protocol classification) if you do it in the IP stack, but there's nothing *forcing* it to be IP specific. From: Terry Lambert Subject: Re: cvs commit: src/sys/netinet in.h ip_fw.h ip_input.c ip_output.c > By not agressive enough, I mean I think you have the right idea, but the > syntax > for the hook should be something like: > > for (hook = iphooks.ipinput.lh_first; hook; hook = hook->next) { > if (!(*hook)(IP_INPUT, &m, &ip)) > break; > } > > Basicly, we make a linked list of hooks and call them in order until one of > them swallows the packet or they're all complete. > > We do this for ip input processing, ip output processing, and perhaps as > suggested, in the IP raw input (packet received) processing section of the >>code. > > Then, if you want IP filtering, just add the hook to the generic "registry" Question: is there any particular reason this should be IP specific? Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.