[FFmpeg-devel] [PATCH] Make RTP work with IPv6 enabled

Nicolas George nicolas.george
Mon Oct 29 15:46:44 CET 2007


L'octidi 8 brumaire, an CCXVI, Luca Abeni a ?crit?:
> However... I decided to have a look at this getaddrinfo() stuff, and the
> first thing that linux manpages say is "creates one or more socket address
> structures that can be used by the bind(2) and connect(2)". sendto() is
> not mentioned. So, I am wondering if an address prepared by getaddrinfo()
> can be used by sendto() or not (it works on Linux, but maybe it is not
> required to work?).

Single Unix just says "socket address". I believe that the mention of bind
and connect in the Linux manpage is just an example.

> Even after reading Nicolas message, I still do not understand why the good
> old way of filling sockaddr structures should be replaced with this...

There are two problems with the good old way:

- The size of the address structure is not a compile-time constant, nor are
  the layout of its fields.

- It is necessary to try several addresses in order to find one that work
  (unless you want to let the user do it).

> Ok, I am going to read some more documentation...

The standard reference for these issues is Unix Network Programming, by
Richard Stevens. The Chapter 11 probably what you are looking for.




More information about the ffmpeg-devel mailing list