Date: Thu, 3 Sep 1998 01:15:39 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: archie@whistle.com (Archie Cobbs) Cc: luigi@labinfo.iet.unipi.it, hackers@FreeBSD.ORG Subject: Re: bcmp abuse in networking code ? Message-ID: <199809030115.SAA03007@usr07.primenet.com> In-Reply-To: <199809030053.RAA20948@bubba.whistle.com> from "Archie Cobbs" at Sep 2, 98 05:53:33 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> > In my revised bridge code i have the following macros > > > > #define ETH_MATCH(a,b) ( \ > > ((unsigned short *)(a))[2] == ((unsigned short *)(b))[2] && \ > > *((unsigned int *)(a)) == *((unsigned int *)(b)) ) > > #define IS_ETHER_BROADCAST(a) ( \ > > *((unsigned int *)(a)) == 0xffffffff && \ > > ((unsigned short *)(a))[2] == 0xffff ) > > Cool...! > > A minor nit, though: use u_int16_t and u_int32_t instead. No, not cool. See http://www.daemonnews.org/underhood.html The New Link-Level Independent ARP Subsystem of NetBSD Ignatios Souvatis The NetBSD Project Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809030115.SAA03007>