Solved

domain name

Posted on 2001-08-16
5
288 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
  • 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

856 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