Re: [PATCH] ipv6 rework in udp_establish_listener
Pascal Terjan <[email protected]> Wed, 17 Aug 2005 23:18:20 +0200
| Newsgroups | gmane.comp.multimedia.xmms.devel |
|---|---|
| Organization | Mandriva |
| Message-ID | <1124313500.4834.0.camel@plop> |
Le mercredi 17 août 2005 à 19:11 +0200, Samuel Thibault a écrit :
> 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.
>
Thanks !