• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: gethostname returns loginname on "Pather Server" version
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gethostname returns loginname on "Pather Server" version


  • Subject: Re: gethostname returns loginname on "Pather Server" version
  • From: Justin Walker <email@hidden>
  • Date: Thu, 5 Feb 2004 23:16:17 -0800

On Thursday, February 5, 2004, at 09:54 PM, Sanjay Arora wrote:

Well that means I would need to change my code for "Panther Server" version.
But we would still be interested to know why a standard API like
gethostname would behave differently on "Panther Server" and all other MacOS
versions.

That is a very good question. I have some as well:

Have you tried the 'hostname' command to verify that it returns something sensible?

Does this happen on all Mac OS X Server boxes (of those you have access to) running 10.3?

Does this odd behavior occur on code compiled on the server, or do you compile it elsewhere and try it on the server?

To add to Quinn's comments, I don't see how getting the host name from 'gethostname()' is going to lead you to an IP address. All this does is to return what was set by 'sethostname()', and that can be almost any sequence of bits, totally unrelated to the DNS or other name resolution scheme in use where your customers are.

Regards,

Justin

--
/~\ The ASCII Justin C. Walker, Curmudgeon-at-Large
\ / Ribbon Campaign
X Help cure HTML Email
/ \
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

References: 
 >RE: gethostname returns loginname on "Pather Server" version (From: Sanjay Arora <email@hidden>)

  • Prev by Date: RE: gethostname returns loginname on "Pather Server" version
  • Next by Date: Activating/deactivating a network interface
  • Previous by thread: RE: gethostname returns loginname on "Pather Server" version
  • Next by thread: RE: gethostname returns loginname on "Pather Server" version
  • Index(es):
    • Date
    • Thread