[asterisk-dev] [asterisk-commits] russell: branch bbryant/sip-tcptls r73108 - /team/bbryant/sip-tcptls/channels/
Jason Parker
jparker at digium.com
Tue Jul 3 13:16:19 CDT 2007
----- "Tilghman Lesher" <tilghman at mail.jeffandtilghman.com> wrote:
> On Tuesday 03 July 2007 11:17, Jeffrey C. Ollie wrote:
> > Also, is there a point to defining it like a bitfield? Unless you
> > are going to be 'or'ing and 'and'ing them together I think it makes
> > more sense to leave them as integers.
>
> Bitfield makes sense along the lines of "Host A only supports UDP",
> "Host B only supports TCP", "Host C supports both UDP and TCP",
> etc.
>
> --
> Tilghman
>
Just to play Devil's Advocate here...
bitfield:
tcp = 1
udp = 2
tcp AND udp = 3
neither tcp or udp = 0
or
int:
tcponly = 1
udponly = 2
both = 3
none = 0
It really doesn't matter, with only 2 bits. :) I would, however, agree with using a bitfield - just because if we add anything later (SIP over ICMP, anybody?), it's simple.
--
Jason Parker
Digium
More information about the asterisk-dev
mailing list