- From: Michael Tuexen <Michael.Tuexen AT micmac.franken.de>
- To: Tetu Ou <hu-outetu AT hiroshima-u.ac.jp>
- Cc: sctp-discussion AT sctp.de
- Subject: Re: [SCTP-Discussion] question about SCTP programming
- Date: Mon, 2 Sep 2013 20:58:13 +0200
- List-archive: <http://lists.franken.de/pipermail/sctp-discussion>
- List-id: SCTP Discussions <sctp-discussion.sctp.de>
On Sep 2, 2013, at 4:42 PM, Tetu Ou
<hu-outetu AT hiroshima-u.ac.jp>
wrote:
>
Hello,
>
>
I am a new member of this mailing list,and i have a question about SCTP
>
programming on FreeBSD.
>
When I compiling my SCTP server/client(send/receive) program,I found an
>
error like this:
>
error:
>
client.c: SOL_SCTP undeclared(first use in this function)...
>
>
But on Linux,it was OK.
>
>
The part of my source code( CreateSocket() ):
>
/* Enable receipt of SCTP Snd/Rcv Data via sctp_recvmsg */
>
memset( (void *)&events, 0, sizeof(events) );
>
events.sctp_data_io_event = 1;
>
ret = setsockopt( connSock, SOL_SCTP, SCTP_EVENTS,
>
(const void *)&events, sizeof(events) );
>
>
/* Read and emit the status of the Socket (optional step) */
>
in = sizeof(status);
>
ret = getsockopt( connSock, SOL_SCTP, SCTP_STATUS,
>
(void *)&status, (socklen_t *)&in );
On FreeBSD you need to use IPPROTO_SCTP instead of SOL_SCTP.
Best regards
Michael
>
>
I am sorry for my poor english,and I was wondering if it be possible to
>
ask somebody who can help me.
>
>
Thank you.
>
Best Regards.
>
>
--
>
Zhe Wang
>
Hiroshima University
>
>
_______________________________________________
>
sctp-discussion mailing list
>
sctp-discussion AT sctp.de
>
http://www.sctp.de/mailman/listinfo/sctp-discussion
Archive powered by MHonArc 2.6.19+.