Re: [PATCH] Don't imply TCP and UDP socket options are bitmasks

2013-01-24 Thread Lawrence Stewart
On 01/23/13 07:28, John Baldwin wrote: > On Tuesday, January 22, 2013 3:57:23 am Lawrence Stewart wrote: >> On 01/16/13 06:16, John Baldwin wrote: >>> On Tuesday, January 15, 2013 3:49:33 am Lawrence Stewart wrote: On 01/15/13 07:50, John Baldwin wrote: > The constants used for TCP and UDP

Re: [PATCH] Don't imply TCP and UDP socket options are bitmasks

2013-01-22 Thread John Baldwin
On Tuesday, January 22, 2013 3:57:23 am Lawrence Stewart wrote: > On 01/16/13 06:16, John Baldwin wrote: > > On Tuesday, January 15, 2013 3:49:33 am Lawrence Stewart wrote: > >> On 01/15/13 07:50, John Baldwin wrote: > >>> The constants used for TCP and UDP socket options (TCP_NODELAY, etc.) are >

Re: [PATCH] Don't imply TCP and UDP socket options are bitmasks

2013-01-22 Thread Lawrence Stewart
On 01/16/13 06:16, John Baldwin wrote: > On Tuesday, January 15, 2013 3:49:33 am Lawrence Stewart wrote: >> On 01/15/13 07:50, John Baldwin wrote: >>> The constants used for TCP and UDP socket options (TCP_NODELAY, etc.) are >>> currently defined as hex values that are individual bits. However, s

Re: [PATCH] Don't imply TCP and UDP socket options are bitmasks

2013-01-15 Thread Eitan Adler
On 14 January 2013 15:50, John Baldwin wrote: > Using a bitmask forces us to run out of bits and makes it > harder for vendors to try to use a high range of values for local custom > options (hoping that they never conflict with a new option value added in > stock FreeBSD). We should explicitly d

Re: [PATCH] Don't imply TCP and UDP socket options are bitmasks

2013-01-15 Thread John Baldwin
On Monday, January 14, 2013 5:17:12 pm Alfred Perlstein wrote: > On 1/14/13 4:56 PM, John Baldwin wrote: > > On Monday, January 14, 2013 4:42:16 pm Alfred Perlstein wrote: > >> Wouldn't a comment over the code suffice? > >> > >> Something like your email as a header would actually work very nicely!

Re: [PATCH] Don't imply TCP and UDP socket options are bitmasks

2013-01-15 Thread John Baldwin
On Tuesday, January 15, 2013 3:49:33 am Lawrence Stewart wrote: > On 01/15/13 07:50, John Baldwin wrote: > > The constants used for TCP and UDP socket options (TCP_NODELAY, etc.) are > > currently defined as hex values that are individual bits. However, socket > > options are never masked togeth

Re: [PATCH] Don't imply TCP and UDP socket options are bitmasks

2013-01-15 Thread Lawrence Stewart
On 01/15/13 07:50, John Baldwin wrote: > The constants used for TCP and UDP socket options (TCP_NODELAY, etc.) are > currently defined as hex values that are individual bits. However, socket > options are never masked together, they are used as a simple enumeration of > discrete values. Using

Re: [PATCH] Don't imply TCP and UDP socket options are bitmasks

2013-01-14 Thread Michael Sierchio
Change "Don't imply TCP and UDP socket options are bitmasks" to "Don't infer TCP and UDP socket options are bitmasks" - M On Mon, Jan 14, 2013 at 2:17 PM, Alfred Perlstein wrote: > On 1/14/13 4:56 PM, John Baldwin wrote: >> >> On Monday, January 14, 2013 4:42:16 pm Alfred Perlstein wrote: >>> >>

Re: [PATCH] Don't imply TCP and UDP socket options are bitmasks

2013-01-14 Thread Alfred Perlstein
On 1/14/13 4:56 PM, John Baldwin wrote: On Monday, January 14, 2013 4:42:16 pm Alfred Perlstein wrote: Wouldn't a comment over the code suffice? Something like your email as a header would actually work very nicely! I think just using decimal would be more confusing than explicitly calling it

Re: [PATCH] Don't imply TCP and UDP socket options are bitmasks

2013-01-14 Thread John Baldwin
On Monday, January 14, 2013 4:42:16 pm Alfred Perlstein wrote: > Wouldn't a comment over the code suffice? > > Something like your email as a header would actually work very nicely! > > I think just using decimal would be more confusing than explicitly > calling it out like: > > /* begin enumer

Re: [PATCH] Don't imply TCP and UDP socket options are bitmasks

2013-01-14 Thread Alfred Perlstein
Wouldn't a comment over the code suffice? Something like your email as a header would actually work very nicely! I think just using decimal would be more confusing than explicitly calling it out like: /* begin enumerated (not bitmask) socket option specifiers */ #define TCP_MAXSEG 0x02

[PATCH] Don't imply TCP and UDP socket options are bitmasks

2013-01-14 Thread John Baldwin
The constants used for TCP and UDP socket options (TCP_NODELAY, etc.) are currently defined as hex values that are individual bits. However, socket options are never masked together, they are used as a simple enumeration of discrete values. Using a bitmask forces us to run out of bits and make