SCTP Discussions

Text archives Help


Re: [SCTP-Discussion] programming


Chronological Thread 
  • From: "Naveen.R.Ranga" <naveenreddy32 AT yahoo.com>
  • To: Michael Tuexen <Michael.Tuexen AT lurchi.franken.de>
  • Cc: Andreas Jungmaier <ajung AT exp-math.uni-essen.de>, discussion AT sctp.de
  • Subject: Re: [SCTP-Discussion] programming
  • Date: Thu May 29 21:52:04 2003
  • List-id: SCTP Discussions <discussion.sctp.de>

Hi,
Thanks for the message. I have done exactly as u told me. But my testt program still fails. The program is:
//-----
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/wait.h>
#include <sctp.h>
#include <ext_socket.h>
//#include <netinet/sctp_uio.h>

main()
{
  int fd,ret,newfd;
  struct sockaddr_in s, who;
  fd=ext_socket(PF_INET,SOCK_STREAM,IPPROTO_SCTP);
 if(fd<0)
 {
 printf("Socket Failed\n");
 exit(1);
 }
 printf("I am fine here\n");
}//end main
//------
and it gives me this error(recognizing the files but not the "ext_socket"call) when compiled with
gcc -o tes testprogram.c -lsctp -lglib
//--error--*********************
tmp/cc8jlr35.o(.text+0x1d): In function `main':
: undefined reference to `ext_socket'
collect2: ld returned 1 exit status
//--------***********************
please let me know where I am goin wrong. If it is recognizing the ".h"file then why is it not taking the ext_socket call then. very much confused about this. help me out.Thanks.
Nav

Michael Tuexen <Michael.Tuexen AT lurchi.franken.de> wrote:
Hi,

first of all you DO need root previledges for all programs.

The sctplib provides an SCTP implementation using a call-back
API. See the examples directory within the tarball for examples.

To use the socketAPI you must also download and install the
socketapilib.

Then you can use the socketapi, but you must use
ext_socket instead of socket,
ext_bind instead of bind
and so on. Please see the examples in the socket_examples directory.

Best regards
Michael


Do you Yahoo!?
Free online calendar with sync to Outlook(TM).


Archive powered by MHonArc 2.6.19+.

Top of page