Solved

domain name

Posted on 2001-08-16
5
296 Views
Last Modified: 2013-12-23
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  ?
0
Comment
Question by:nsuresh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6392940
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.
0
 

Author Comment

by:nsuresh
ID: 6396484
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 ?
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 200 total points
ID: 6396663
yes that's legal (and sometimes not confusing humans ;-)
0
 

Expert Comment

by:CleanupPing
ID: 9157238
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.
0
 

Author Comment

by:nsuresh
ID: 9167665
ahoffmans answer really didnt fully answer my question. Anyway it did help me.
so giving points..sorry about the time..didnt notice this
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your business is like most, chances are you still need to maintain a fax infrastructure for your staff. It’s hard to believe that a communication technology that was thriving in the mid-80s could still be an essential part of your team’s modern I…
Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question