[mythtv-users] Re: Why only numeric IP addresses work?

Grant Edwards grante at visi.com
Tue Oct 12 21:15:52 UTC 2004

On Tue, Oct 12, 2004 at 02:45:38PM -0600, Scott Mazur wrote:

> It's not a network configuration problem.  It's reasonable expectation that
> Myth understand domain names as well as IP addresses.
>        The gethostbyname() function returns a structure  of  type
>        hostent  for  the  given host name.  Here name is either a
>        host name, or an IPv4 address in standard dot notation,

Myth doesn't call gethostbyname()?!?!?

>        or
>        an IPv6 address in colon (and possibly dot) notation. (See
>        RFC 1884 for the description of IPv6 addresses.)  If  name
>        is  an  IPv4  or  IPv6 address, no lookup is performed and
>        gethostbyname() simply copies name into the  h_name  field
>        and  its struct in_addr equivalent into the h_addr_list[0]
>        field of the returned hostent structure.
> It's not rocket science.

Not only isn't calling gethostbyname() rocket science, it's by
far the easiest way to parse dotted-quad notation even if you
_aren't_ using a nameserver.

Grant Edwards
grante at visi.com

More information about the mythtv-users mailing list