?
Solved

Undeclared: NI_NUMERICHOST,NI_NOFQDN,+

Posted on 1998-11-09
4
Medium Priority
?
817 Views
Last Modified: 2012-05-04
I bought a book entitled Unix Network Programming (W. Richard Stevens, ISBN: 0-13-490012-x) and it referenced an FTP site to download all the source code from the book: ftp://ftp.kohala.com/pub/rstevens/unpv12e.tar.gz.

Now when I commenced running the MAKE file for the drawer /libgai, it gave the following error messages during compiling:
gn_ipv46.c: NI_NUMERICHOST undeclared
gn_ipv46.c: NI_NOFQDN undeclared
gn_ipv46.c: NI_NAMEREQD undelcared
gn_ipv46.c: NI_NUMERICSERV undeclared
gn_ipv46.c: NI_DGRAM undelcared
make: *** [gn_ipv46.o] error 1 ***

I left numerous email messages to the author W. Richard Stevens, but he continues to ignore my pleas for help.  These authors...

Would you by chance know of the missing file which the MAKE file requires in order to get these variables declared?  These items appear to be #define but I could be wrong.

Thanks so much for ANY help you can provide me.

Jim.
0
Comment
Question by:ratboy2
[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
4 Comments
 
LVL 5

Expert Comment

by:JBURGHARDT
ID: 1638462
You get more help if you post this question in programing section
this program is in c.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1638463
what is the result of following command in the directory:

  find . \*.h -exec grep NI_N {} \; | grep define

please also post the   cc   comandline reported by make
0
 

Author Comment

by:ratboy2
ID: 1638464
Thanks very much ahoffmann.
I used wpe's find to recurse through my dirs (before i saw your message) and sure enough i found these definitions inside a hidden .H file. I modified Stevens book code and it work smoothly from that point on..

If you would like the points for this question please reply back with the same answer.

Thanks

BTW you wouldnt by chance know how to get my local IP address while connected to the net in Linux would you? I am using "C" and from the book it says to call gethostname() followed by gethostbyname() putting the results from gethostname into it. When i do this it ALWAYS returns back "localip.localdomain". I remember seeing this value set in my HOSTIP area under X windows but i was hoping this ip address would change to match whatever my REAL IP address was while connected to the net.  
How do i go about doing this?
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 100 total points
ID: 1638465
find . \*.h -exec grep NI_N {} \; | grep define
then add found files to your include path (-I)

About your gethostbyname(), I'll check this question in C Language topic.
0

Featured Post

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

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

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month15 days, 8 hours left to enroll

743 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