Link to home
Start Free TrialLog in
Avatar of nsuresh
nsuresh

asked on

domain name

I have a program which generates the fqdn of a host using sysinfo() call. I need to get the same name from a remote host . I am using gethostbyname(). Sometimes these names dont match. I find extra domain names in sysinfo() output. Is this because of a wrong set up ?. Is it okay for a user to have the nis domainname seprated from the dns domain  ?
Avatar of ahoffmann
ahoffmann
Flag of Germany image

which sysinfo does return a FQDN? AFAIK if it returns a hostname at all (like SunOS) it's just the hostname, but not FQDN.
gethostbyname() is what you need (but requires a proper setup of the resolver).
NIS-domain and internet-domain are completely different, usually, it just may be the same.
Avatar of nsuresh
nsuresh

ASKER

using sysinfo you can set a parameter SI_SRPC_DOMAIN, and get the full domain name. now add this to your host name you can get the FQDN.

ok now you mean to say it is legal for a set up to have NIS domain and internet domain different ?
ASKER CERTIFIED SOLUTION
Avatar of ahoffmann
ahoffmann
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
nsuresh:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
Avatar of nsuresh

ASKER

ahoffmans answer really didnt fully answer my question. Anyway it did help me.
so giving points..sorry about the time..didnt notice this