linux-sctp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* how to use sctp_sendmsg to send ABORT chunk
@ 2012-11-24  4:55 小贺
  2012-11-26 15:35 ` Vlad Yasevich
  0 siblings, 1 reply; 2+ messages in thread
From: 小贺 @ 2012-11-24  4:55 UTC (permalink / raw)
  To: linux-sctp

dear  lksctp Project,     
  i met a problem about sending abort chunk. if you have time, please help me.       i'm using the lksctp to develop my function, which is for sending Abort chunk.        platform of my development : Redhat centos 5.5 and verion  of linux kernel is 2.18.        according to "man sctp_sendmsg", just set flags to SCTP_ABORT.        my partial code.--------------------------------------------------------------------------------------------------------------------------struct msghdr msg;struct cmsghdr cmsg; struct iovec iov;        static char error_code= 12;	iov.iov_base = &error_code;	iov.iov_len = 1;cmsg.cmsg_level = IPPROTO_SCTP;cmsg.cmsg_type = SCTP_SNDRV;cmsg.cmsg_len = sizeof(struct cmsghdr);msg.msg_name = (SOCKADDR*)&serAddr;	msg.msg_namelen = sizeof(serAddr);	msg.msg_iov = &iov;	msg.msg_iovlen = 1;	msg.msg_control = &cmsg;	msg.msg_controllen = sizeof(cmsg);        ret = sctp_sendmsg(sock_fd, (void*)&msg, sizeof(msg), (SOCKADDR*)&serAddr,                                   sizeof(serAddr),sri.sinfo_ppid, (SCTP_ABORT),                           sri.sinfo_stream, sri.sinfo_timetolive,sri.sinfo_context);--------------------------------------------------------------------------------------------------------------------but the ret < 0 and the errno is 22 that is invalid agument.please tell which argument is error and how to set cause of abort chunk into "struct msghdr" best regardsthank you fangmin.cao

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-26 15:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-24  4:55 how to use sctp_sendmsg to send ABORT chunk 小贺
2012-11-26 15:35 ` Vlad Yasevich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).