vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |