LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-26-2002, 03:03 AM   #1
atiato
LQ Newbie
 
Registered: Mar 2002
Posts: 5

Rep: Reputation: 0
W.Richard Steven BOOK source code


I'm working ON UNP BOOK for W.Richard steven
Hi all ;

I want to work on the Examples found In Unix Networking programming :API XTI for Richard Steven .....

what I did...

1- I have downloaded the Source Code for his site ....
2-after I read README I follow the Instructions then .....after config my sys ./configure

output of configure

/* config.h. Generated automatically by configure. */
/* Define the following if you have the corresponding header */
#define CPU_VENDOR_OS "i686-pc-linux-gnu"
/* #undef HAVE_NETCONFIG_H */ /* <netconfig.h> */
/* #undef HAVE_NETDIR_H */ /* <netdir.h> */
#define HAVE_POLL_H 1 /* <poll.h> */
#define HAVE_PTHREAD_H 1 /* <pthread.h> */
#define HAVE_STRINGS_H 1 /* <strings.h> */
/* #undef HAVE_XTI_INET_H */ /* <xti_inet.h> */
/* #undef HAVE_SYS_FILIO_H */ /* <sys/filio.h> */
#define HAVE_SYS_IOCTL_H 1 /* <sys/ioctl.h> */
#define HAVE_SYS_SELECT_H 1 /* <sys/select.h> */
/* #undef HAVE_SYS_SOCKIO_H */ /* <sys/sockio.h> */
#define HAVE_SYS_SYSCTL_H 1 /* <sys/sysctl.h> */
#define HAVE_SYS_TIME_H 1 /* <sys/time.h> */

/* Define if we can include <time.h> with <sys/time.h> */
#define TIME_WITH_SYS_TIME 1

/* Define the following if the function is provided */
#define HAVE_BZERO 1
#define HAVE_GETHOSTBYNAME2 1
#define HAVE_POLL 1
#define HAVE_PSELECT 1
#define HAVE_VSNPRINTF 1

/* Define the following if the function prototype is in a header */
#define HAVE_GETADDRINFO_PROTO 1 /* <netdb.h> */
#define HAVE_GETNAMEINFO_PROTO 1 /* <netdb.h> */
#define HAVE_GETHOSTNAME_PROTO 1 /* <unistd.h> */
#define HAVE_GETRUSAGE_PROTO 1 /* <sys/resource.h> */
#define HAVE_HSTRERROR_PROTO 1 /* <netdb.h> */
#define HAVE_IF_NAMETOINDEX_PROTO 1 /* <net/if.h> */
#define HAVE_INET_ATON_PROTO 1 /* <arpa/inet.h> */
#define HAVE_INET_PTON_PROTO 1 /* <arpa/inet.h> */
/* #undef HAVE_ISFDTYPE_PROTO */ /* <sys/stat.h> */
/* #undef HAVE_PSELECT_PROTO */ /* <sys/select.h> */
#define HAVE_SNPRINTF_PROTO 1 /* <stdio.h> */
/* #undef HAVE_SOCKATMARK_PROTO */ /* <sys/socket.h> */

/* Define the following if the structure is defined. */
#define HAVE_ADDRINFO_STRUCT 1 /* <netdb.h> */
#define HAVE_IF_NAMEINDEX_STRUCT 1 /* <net/if.h> */
/* #undef HAVE_SOCKADDR_DL_STRUCT */ /* <net/if_dl.h> */
#define HAVE_TIMESPEC_STRUCT 1 /* <time.h> */

/* Define the following if feature is provided. */
/* #undef HAVE_SOCKADDR_SA_LEN */ /* sockaddr{} has sa_len member */
#define HAVE_MSGHDR_MSG_CONTROL 1 /* msghdr{} has msg_control member */

/* Names of XTI devices for TCP and UDP */
/* #undef HAVE_DEV_TCP */ /* most XTI have devices here */
/* #undef HAVE_DEV_XTI_TCP */ /* AIX has them here */
/* #undef HAVE_DEV_STREAMS_XTISO_TCP */ /* OSF 3.2 has them here */

/* Define the following to the appropriate datatype, if necessary */
/* #undef int8_t */ /* <sys/types.h> */
/* #undef int16_t */ /* <sys/types.h> */
/* #undef int32_t */ /* <sys/types.h> */
/* #undef uint8_t */ /* <sys/types.h> */
/* #undef uint16_t */ /* <sys/types.h> */
/* #undef uint32_t */ /* <sys/types.h> */
/* #undef size_t */ /* <sys/types.h> */
/* #undef ssize_t */ /* <sys/types.h> */
/* socklen_t should be typedef'd as uint32_t, but configure defines it
to be an unsigned int, as it is needed early in the compile process,
sometimes before some implementations define uint32_t. */
/* #undef socklen_t */ /* <sys/socket.h> */
/* #undef sa_family_t */ /* <sys/socket.h> */
/* #undef SA_FAMILY_T */

#define t_scalar_t int32_t /* <xti.h> */
/* #undef t_uscalar_t */ /* <xti.h> */

/* Define the following, if system suports the feature */
#define IPV4 1 /* IPv4, uppercase V name */
#define IPv4 1 /* IPv4, lowercase v name, just in case */
/* #undef IPV6 */ /* IPv6, uppercase V name */
/* #undef IPv6 */ /* IPv6, lowercase v name, just in case */
#define UNIXDOMAIN 1 /* Unix domain sockets */
#define UNIXdomain 1 /* Unix domain sockets */
#define MCAST 1 /* multicasting support */




2nd step I have to make the lib :::

cd ../lib
make

[root@localhost unpv12e]# cd lib
[root@localhost lib]# l make
gcc -g -O2 -D_REENTRANT -Wall -c -o connect_nonb.o connect_nonb.c
In file included from connect_nonb.c:1:
unp.h:114: redefinition of `struct in_pktinfo'
make: *** [connect_nonb.o] Error 1



As seen from config.h I have i686-linux-gnu...........

I want to work On Steven's Example what I should do Help me?????????????/
 
Old 06-26-2002, 08:52 AM   #2
jglen490
Member
 
Registered: Apr 2002
Location: The next brick house on the right.
Distribution: Kubuntu 8.04
Posts: 668

Rep: Reputation: 31
Try this in the non-*nix Programming forum here at LQ. I think you'll have better luck.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using sample C++ code from a book...won't compile Baix Programming 4 03-05-2005 02:04 PM
Problem in Building socket code from Stevens book Prakhardeep Linux - Networking 1 12-22-2004 04:46 PM
Trying to compile souce code that came with AUP book.... Scrag Programming 4 11-16-2004 09:24 PM
Book about writing secure code Covel Linux - Security 1 06-12-2004 01:53 AM
Richard Stevens book zalmox Programming 2 02-27-2004 10:02 AM


All times are GMT -5. The time now is 06:02 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration