Alan Su wrote:
when i call gethostname() on my hamm, it returns only the name of the
machine, rather than a fqdn. i distinctly remember that when i was
running bo, i got a fqdn. does anyone know how i can make it return
the fqdn? or is there another function i should be using? thanks.
Martin Schulze wrote (Wed, 26 Aug 1998 01:04:36 +0200 ):
|If you want to write portable programs then you use gethostname() to
|determine the hostname, check for a '.' and if it's not included you
|use gethostbyname() to get the fqdn. For an example, take a look at
|the syslogd source.
This
Martin Schulze wrote (Wed, 26 Aug 1998 02:12:58 +0200 ):
| Martin Schulze wrote (Wed, 26 Aug 1998 01:04:36 +0200 ):
| |If you want to write portable programs then you use gethostname() to
| |determine the hostname, check for a '.' and if it's not included you
| |use gethostbyname() to get the
Alan Su wrote:
now my question is this: how does one tell how many aliases are in
the h_aliases vector? do i just keep examining the elements of the
vector until one of them is null?
I believe the same rule like simple strings apply here, too. The
last element is NULL. You have to test for
On Tue, Aug 25, 1998 at 03:06:09PM -0700, Alan Su wrote:
when i call gethostname() on my hamm, it returns only the name of the
machine, rather than a fqdn. i distinctly remember that when i was
running bo, i got a fqdn. does anyone know how i can make it return
the fqdn? or is there another
when i call gethostname() on my hamm, it returns only the name of the
machine, rather than a fqdn. i distinctly remember that when i was
running bo, i got a fqdn. does anyone know how i can make it return
the fqdn? or is there another function i should be using? thanks.
(btw, getdomainname()
6 matches
Mail list logo