[clug] MythTV on TransACT

Alex Osborne alex at mugofgrog.com
Thu Sep 14 12:09:09 GMT 2006

Paul TBBle Hampson wrote:
> I wouldn't suggest a router, just put multiple IPs on the interface
> you're receiving from. Port binding is by IP address (or _ALL) as well
> as port, so a udp listener bound to won't interfere
> with a udp listener bound to
Ah, I see what you mean. I had thought that the code was actually
binding to the 239.193.0.x IP when in fact mythtv's libavformat is just
doing this:
my_addr.sin_addr.s_addr = htonl (INADDR_ANY);

No wonder it's picking up everything and getting totally confused! That
also explains why we're getting the port already in use message in the
first place.

It guess the reason they're doing this might be either because multicast
support was added as an after thought or for portability. Looking at
VLC's networking code finds this:

#if defined( WIN32 ) || defined( UNDER_CE )
    /* Under Win32 and for multicasting, we bind to INADDR_ANY,
     * so let's call BuildAddr with "" instead of psz_bind_addr */
    if( BuildAddr( &sock, IN_MULTICAST( ntohl( inet_addr(psz_bind_addr)
) ) ?
                   "" : psz_bind_addr, i_bind_port ) == -1 )
    if( BuildAddr( &sock, psz_bind_addr, i_bind_port ) == -1 )

Why am I not surprised by which two systems the exception has to be made
for? ;-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: OpenPGP digital signature
Url : http://lists.samba.org/archive/linux/attachments/20060914/e268be08/signature.bin

More information about the linux mailing list