Re: Typos in net/bpf.h
On Fri, Mar 22, 2013 at 10:38:25AM -0600, Theo de Raadt wrote: > > On 03/22/13 17:25, Philip Guenther wrote: > > > On Fri, Mar 22, 2013 at 7:53 AM, Gabriel Linder > > > wrote: > > >> - * bpf understands a program iff kernel_major == filter_major && > > >> + * bpf understands a program if kernel_major == filter_major && > > > Not a typo: "iff" is a shorthand for "if and only if" that was > > > inherited from the mathematics community. > > > > I did not know that, thanks. Maybe it should be spelled in full letters > > then ? > > iff is a useful technical word which avoids us typing it out in full > every time. iff you know what it means :-) -- Creamy
Re: Typos in net/bpf.h
On 03/22/13 17:38, Theo de Raadt wrote: >> On 03/22/13 17:25, Philip Guenther wrote: >>> On Fri, Mar 22, 2013 at 7:53 AM, Gabriel Linder >>> wrote: - * bpf understands a program iff kernel_major == filter_major && + * bpf understands a program if kernel_major == filter_major && >>> Not a typo: "iff" is a shorthand for "if and only if" that was >>> inherited from the mathematics community. >> I did not know that, thanks. Maybe it should be spelled in full letters then >> ? > iff is a useful technical word which avoids us typing it out in full > every time. > > If we replaced such simple words everytime someone didn't understand them, > eventually our in-line code would be full of babytalk. > Makes sense. What about the rest of the diff ? Index: bpf.h === RCS file: /cvs/src/sys/net/bpf.h,v retrieving revision 1.43 diff -u -r1.43 bpf.h --- bpf.h 26 Mar 2012 19:37:42 - 1.43 +++ bpf.h 22 Mar 2013 16:44:35 - @@ -73,12 +73,12 @@ }; /* - * Struct return by BIOCVERSION. This represents the version number of + * Struct returned by BIOCVERSION. This represents the version number of * the filter language described by the instruction encodings below. * bpf understands a program iff kernel_major == filter_major && * kernel_minor >= filter_minor, that is, if the value returned by the * running kernel has the same major number and a minor number equal - * equal to or less than the filter being downloaded. Otherwise, the + * to or greater than the filter being downloaded. Otherwise, the * results are undefined, meaning an error may be returned or packets * may be accepted haphazardly. * It has nothing to do with the source code version.
Re: Typos in net/bpf.h
> On 03/22/13 17:25, Philip Guenther wrote: > > On Fri, Mar 22, 2013 at 7:53 AM, Gabriel Linder > > wrote: > >> - * bpf understands a program iff kernel_major == filter_major && > >> + * bpf understands a program if kernel_major == filter_major && > > Not a typo: "iff" is a shorthand for "if and only if" that was > > inherited from the mathematics community. > > I did not know that, thanks. Maybe it should be spelled in full letters then ? iff is a useful technical word which avoids us typing it out in full every time. If we replaced such simple words everytime someone didn't understand them, eventually our in-line code would be full of babytalk.
Re: Typos in net/bpf.h
On 03/22/13 17:25, Philip Guenther wrote: > On Fri, Mar 22, 2013 at 7:53 AM, Gabriel Linder wrote: >> - * bpf understands a program iff kernel_major == filter_major && >> + * bpf understands a program if kernel_major == filter_major && > Not a typo: "iff" is a shorthand for "if and only if" that was > inherited from the mathematics community. I did not know that, thanks. Maybe it should be spelled in full letters then ?
Re: Typos in net/bpf.h
On Fri, Mar 22, 2013 at 03:53:07PM +0100, Gabriel Linder wrote: > While learning how to use BPF I fumbled on this, clarification is needed imho. > > ok ? > > Index: sys/net/bpf.h > === > RCS file: /cvs/src/sys/net/bpf.h,v > retrieving revision 1.43 > diff -u -r1.43 bpf.h > --- sys/net/bpf.h26 Mar 2012 19:37:42 -1.43 > +++ sys/net/bpf.h22 Mar 2013 14:48:21 - > @@ -73,12 +73,12 @@ > }; > > /* > - * Struct return by BIOCVERSION. This represents the version number of > + * Struct returned by BIOCVERSION. This represents the version number of > * the filter language described by the instruction encodings below. > - * bpf understands a program iff kernel_major == filter_major && > + * bpf understands a program if kernel_major == filter_major && This is not exactly a typo, I believe it means, 'if and only if'. However, iff is a bad term to use precisely for this reason, so please spell it out in full :-). -- Creamy
Re: Typos in net/bpf.h
On Fri, Mar 22, 2013 at 7:53 AM, Gabriel Linder wrote: > - * bpf understands a program iff kernel_major == filter_major && > + * bpf understands a program if kernel_major == filter_major && Not a typo: "iff" is a shorthand for "if and only if" that was inherited from the mathematics community.
Typos in net/bpf.h
While learning how to use BPF I fumbled on this, clarification is needed imho. ok ? Index: sys/net/bpf.h === RCS file: /cvs/src/sys/net/bpf.h,v retrieving revision 1.43 diff -u -r1.43 bpf.h --- sys/net/bpf.h26 Mar 2012 19:37:42 -1.43 +++ sys/net/bpf.h22 Mar 2013 14:48:21 - @@ -73,12 +73,12 @@ }; /* - * Struct return by BIOCVERSION. This represents the version number of + * Struct returned by BIOCVERSION. This represents the version number of * the filter language described by the instruction encodings below. - * bpf understands a program iff kernel_major == filter_major && + * bpf understands a program if kernel_major == filter_major && * kernel_minor >= filter_minor, that is, if the value returned by the * running kernel has the same major number and a minor number equal - * equal to or less than the filter being downloaded. Otherwise, the + * to or greater than the filter being downloaded. Otherwise, the * results are undefined, meaning an error may be returned or packets * may be accepted haphazardly. * It has nothing to do with the source code version.