Re: [PATCH] ipv6 rework in udp_establish_listener
Samuel Thibault <[email protected]> Wed, 17 Aug 2005 19:11:10 +0200
| Newsgroups | gmane.comp.multimedia.xmms.devel |
|---|---|
| Message-ID | <[email protected]> |
Pascal Terjan, le Wed 17 Aug 2005 18:56:15 +0200, a écrit :
> Le mercredi 17 août 2005 à 15:31 +0200, Samuel Thibault a écrit :
> > Pascal Terjan, le Wed 17 Aug 2005 14:36:37 +0200, a écrit :
> > > (talking only for my patch, not the other ipv6 patches that I did not
> > > yet really read but I think it uses getaddrinfo so will be more tricky
> > > to have working...)
> >
> > No, it's _much_ easier to make working than using AF_INET6 & co by
> > hand. getaddrinfo gives you every information you need: address family,
> > protocol, address, ... You just need a HAVE_GETADDRINFO, and then you
> > can use a loop like:
> [...]
> > if (getaddrinfo(NULL, listen_port, &hints, &res) != 0) {
>
> And how do you write it when you want to create an udp socket on any
> port, like this is done in http.c ?
Use "0" as listen_port.
Regards,
Samuel