Solved

domain name

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Join & Write a Comment

I was recently sitting at a desk at work with one of my colleagues and needed some information on my home computer. He watched as I turned on my home computer, established a remote session into it, got the information I needed and then shut it down …
Some time ago I was asked to set up a web portal PC to put at our entrance. When customers arrive, they could see a webpage 'promoting' our company. So I tried to set up a windows 7 PC as a kiosk PC.......... I will spare you all the annoyances I…
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…
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now