From owner-freebsd-current Tue May 19 06:33:58 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA13524 for freebsd-current-outgoing; Tue, 19 May 1998 06:33:58 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id GAA13513 for ; Tue, 19 May 1998 06:33:54 -0700 (PDT) (envelope-from luigi@labinfo.iet.unipi.it) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id NAA09232; Tue, 19 May 1998 13:49:16 +0200 From: Luigi Rizzo Message-Id: <199805191149.NAA09232@labinfo.iet.unipi.it> Subject: Re: struct ifnet handling... To: kjc@csl.sony.co.jp (Kenjiro Cho) Date: Tue, 19 May 1998 13:49:16 +0200 (MET DST) Cc: current@FreeBSD.ORG In-Reply-To: <199805191038.TAA25933@hotaka.csl.sony.co.jp> from "Kenjiro Cho" at May 19, 98 07:38:06 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > >> When this is done, matching interface names requires only a pointer > >> comparison (and furthermore, a NULL pointer can be used as an > >> indication that no interface match is required). > > Use if_index instead of a pointer to the interface name. if_index is > a unique interface number start from 1. Many routing related programs I also thought of the pointer to struct ifnet as a unique identifier, except that the current ipfw syntax allows wildcards to selects all interfaces of the same kind (e.g. all "tun", all "ed", etc.) I don't think this makes much sense, but maybe someone depends on it. In any case it is clear that if we want a fast firewall code, rules must be simplified. We now have CISC rules, should go for RISC ones :) cheers luigi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message