[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
encif global
- To: tech@openbsd.org
- Subject: encif global
- From: Sam Jansen <sam@wand.net.nz>
- Date: Thu, 24 Jun 2004 08:32:01 +1200
- Organization: WAND Group, Waikato University
During delving into the OpenBSD network stack recently I noticed an
inconsistency with the global variable 'encif'. It is defined at the top
if sys/net/if_enc.c as 'struct enc_softc encif[NENC];' and is externed
in one other file, sys/net/route.c as 'extern struct ifnet encif;'.
I realise that the enc_softc structure is just a structure holding one
ifnet structure and hence referring to encif in the function
encap_findgwifa in route.c is just referring to the first element of the
array encif[] defined in if_enc. The inconsistency between types is
however confusing.
I checked CVS logs and it looks like if_enc.c was updated to use the
array rather than a single ifnet structure some time ago (revision 1.12
in 1999!) and route.c was never changed.
Cheers,
Sam Jansen