[mythtv] [PATCH]: show IP address in system status screen
tommy at home.tig-grr.com
Sat Mar 6 10:56:40 EST 2004
On Fri, Mar 05, 2004 at 03:53:20PM +0100, eric moors wrote:
> A small patch to mythfrontend to show the IP address of the machine in the
> system status screen.
> I use my mythtv-box in a home network, and would like to connect to it from
> my other PC, as I don't
> have a keyboard or mouse connected to my mythtv box. My home network
> consists of a DHCP server, but no DNS server, so I needed the IP address of
> the mythtv box. I couldn't find it easily, so I patched mythfrontend to
> display it on the TV screen.
You should not hardcode eth0. Many devices use alternate names (such as
wlan0). It would be best to iterate the interfaces and find the first one
in the UP state (excluding loopback).
Of course, this assumes that (1) there is only one active interface, (2) it
only has one IP address, and (3) IPv6 is not in use.
Using hostnames is so much better for exactly these reasons. It lets the
resolver and the kernel routing code do their jobs. It would be much nicer
to do hostname lookups (which does not prevent the use of IP addresses, of
course). If Isaac would accept a patch that does hostname lookups, I could
probably spend some time to create one.
"Microsoft's biggest and most dangerous contribution to the software
industry may be the degree to which it has lowered user expectations."
-- Esther Schindler, OS/2 Magazine
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 240 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20040306/94a34638/attachment.pgp
More information about the mythtv-dev