source code from Unix networking programming Networking APIs:Sockets and XTI

source code from Unix networking programming Networking APIs:Sockets and XTI

Post by Davi » Sun, 13 Jan 2002 11:05:17



Please help!
I try to study source code from W. Richard Stevens book:
Unix networking programming Networking APIs:Sockets
and XTI in Linux Red Hat 7.0 platform.

I download the file
unpv12e.tar.gz, my operation is as following:

gunzip -c unpv12e.tar.gz |tar -xvf-

cd unpv12e

./configure

cd lib

make

then appear in_pktinfo redifination error

I am a biginner about Linux ,Unix, Networking, I have no ieda about this
error. please give me
some guide,what should I do next. thank in advance!

David
Email:

 
 
 

source code from Unix networking programming Networking APIs:Sockets and XTI

Post by David Mean » Mon, 14 Jan 2002 01:20:51


Undefine the struct.  I'm assuming you're getting the error in unp.h,
line 114.  If so, then do this:

/* The structure returned by recvfrom_flags() */
// struct in_pktinfo {
//  struct in_addr  ipi_addr;   /* dst IPv4 address */
//  int             ipi_ifindex;/* received interface index */
//};

If for some strange reason your compiler doesn't like the '//' sequence
for comments, then do this:

/* The structure returned by recvfrom_flags() */
/* struct in_pktinfo {
   struct in_addr  ipi_addr;  
  int             ipi_ifindex;

Quote:};

*/

BTW, you'll get answers quicker in a programming NG.  Your post is off
topic here, just as a fyi.

David Means


> Please help!
> I try to study source code from W. Richard Stevens book:
> Unix networking programming Networking APIs:Sockets
> and XTI in Linux Red Hat 7.0 platform.

> I download the file
> unpv12e.tar.gz, my operation is as following:

> gunzip -c unpv12e.tar.gz |tar -xvf-

> cd unpv12e

> ./configure

> cd lib

> make

> then appear in_pktinfo redifination error

> I am a biginner about Linux ,Unix, Networking, I have no ieda about this
> error. please give me
> some guide,what should I do next. thank in advance!

> David
> Email:


--

No trees were killed in the sending of this message. However,
a large number of electrons were terribly inconvenienced.

 
 
 

1. Unix network programming; compiling source code problem

Hi! I am new to unix network programming. I am currently learning
from the book "Unix Network Programming; networking APIs: Sockets and XTI"
I followed the instruction on README. After I've compiled by command
"./configure", then try to compile the subdirectories, it gives an error
like follows:

for example,


gcc -g -02 -D_REENTRANT -Wall -c -o daytimetcpcli.o daytimetcpcli.c
In file included from daytimetcpcli.c:1:
unp.h:144:redefinition of 'struct in_pktinfo'
make: *** [daytimetcpcli.0] Error 1

I don't know why there's error and couldn't find any clue. I compiled it on
linux redhat 6.2 and the source code was downloaded from
http://www.kahola.com/start
source file: unpv12e.tar.gz

Anyone can help, thank you!

2. KDE/GNOME comparisons?

3. W: Source Code for "UNIX System V Network Programming, Stephen A. Rago

4. MediaOne Says No Way to Linux

5. Unix network programming; compiling source code problem

6. TOMORROW is National Sunrise Day

7. problems with config source code of unix network programming volume2..

8. Bugs in Pentium chipset can cause machine to crash?

9. Where to find docs of Network/Socket Programming API of Linux Kernel 2.4.7?

10. FTP sites with 'UNIX Network Programming' book program code?

11. Socket API source code

12. is Unix Network Prog. Source code available?