[ds6-devel] is_double_binding_sane
Mauro Tortonesi
mauro@deepspace6.net
Sun Dec 29 18:17:07 2002
- Previous message: [ds6-devel] nc6/src netsupport.c,NONE,1.1 netsupport.h,NONE,1.1
rt_config.c,NONE,1.1 rt_config.h,NONE,1.1 Makefile.am,1.6,1.7
network.c,1.20,1.21
- Next message: [ds6-devel] Re: is_double_binding_sane
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
On Sun, 29 Dec 2002, Chris Leishman wrote:
> On Sunday, December 29, 2002, at 04:12 PM, mauro@deepspace6.net wrote:
>
> > Update of /cvs/nc6/src
> >
> > Modified Files:
> > Makefile.am network.c
> > Added Files:
> > netsupport.c netsupport.h rt_config.c rt_config.h
>
>
> Umm.... I'm not sure why you've added "is_ipv6_enabled" and
> "is_double_binding_sane"?
>
> The "is_ipv6_enabled" is ok - but not very useful since this is handled
> in the code anyway (it detects when creating an ipv6 was attempted and
> failed due to lack of support). At the moment your using it to
> determine whether to reorder ipv6 first in the getaddrinfo results -
> which isn't really necessary since reordering doesn't really hurt in
> any situation.
yes, is_ipv6_enabled is not very useful. but IMVHO it's better to reorder
the addrinfo list returned by getaddrinfo only when it is really needed,
as we don't know if this breaks the inner working of freeaddrinfo in some
platform (it shouldn't, however). what do you think about it?
> And "is_double_bind_sane" is a little dangerous IMHO, since it attempts
> a bind to 1025 - assuming it will be free, which isn't necessarily true.
>
> Perhaps you need to explain all the logic behind it a bit more?
ooops, i forgot to increment port. it should be fixed now. however, the
implementation is still buggy because in some cases it fails to detect
if there is a program bound to the specified port.
perhaps i should borrow some code from netstat to find the first unbounded
port on the system. what do you think?
in all cases, IMHO we need a function to detect at runtime if the system
supports double binding.
--
Aequam memento rebus in arduis servare mentem...
Mauro Tortonesi mauro@deepspace6.net
mauro@ferrara.linux.it
Deep Space 6 - IPv6 on Linux http://www.deepspace6.net
Ferrara Linux Users Group http://www.ferrara.linux.it
- Previous message: [ds6-devel] nc6/src netsupport.c,NONE,1.1 netsupport.h,NONE,1.1
rt_config.c,NONE,1.1 rt_config.h,NONE,1.1 Makefile.am,1.6,1.7
network.c,1.20,1.21
- Next message: [ds6-devel] Re: is_double_binding_sane
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the ds6-devel
mailing list