- From: rohit agrawal <agrawal_rohit1 AT yahoo.co.in>
- To: discussion AT sctp.de
- Subject: [SCTP-Discussion] How to Compile and run a simple SCTP socket program
- Date: Sat Apr 1 11:52:01 2006
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=iTW8uUdgi6sMgGpbFIGDC9OP0m58fp0e+eViDYG6nYispLcFtBg+D8g7+gVt1SEs88MkFIr+eh9H13oAQiCQHyhMEZHgnp0H5UQI31bA5twcEMgbQwoRY/hPuwOMTMjowveNVal8mAJ/Xqo8vwhZAnISCWJ9HysYwh40RoFxcyQ= ;
- List-id: SCTP Discussions <discussion.sctp.de>
Hi,
I made a simple program, but i am not able to compile and run it. I have successfully installed sctplib (sctplib 1.0.4) and socketsapi(socketapi-1.7.0).
Can any one please tell me what all is required to make simple SCTP socket program ?
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/uio.h>
#include <ext_socket.h>
int main()
{
int lfd, cfd;
struct sctp_event_subscribe event;
struct sockaddr_in sin[1];
if ((lfd = ext_socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP)) == -1) {
perror("socket");
exit(1);
}
printf("Socket gets initialized successfully");
}
Regards
Rohit Agrawal
Jiyo cricket on
Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.
- [SCTP-Discussion] How to Compile and run a simple SCTP socket program, rohit agrawal, 04/01/2006
Archive powered by MHonArc 2.6.19+.