From: Horacio S. <hs...@gm...> - 2008-11-29 13:18:39
|
On Fri, Nov 28, 2008 at 3:00 PM, Wei Yongjun <yj...@cn...> wrote: > Horacio Sanson wrote: >> >> SCTP is a reliable protocol so retransmissions are always present. I would >> like to make SCTP behave a little more like UDP by disabling retransmission >> altogether but there seems to be no way to set the number of retransmissions >> allowed per message. >> > > Used following command: > > # echo 2 > /proc/sys/net/sctp/association_max_retrans > > This can change the number of retransmission, but the SCTP assoc will be > ABORT after timeout. > >> I think I saw somewhere an example of PR-SCTP profile that allowed to set >> the number of retransmissions in the sinfo_pr_value field of sctp_sndrcvinfo >> but I am unable to find it anywhere. Or maybe was just a proposal for a new >> PR-SCTP profile that is not implemented yet?? >> > > Do you mean the lifetime of message? sinfo_pr_value is defined as following: > > sinfo_pr_value: The meaning of this field depends of the PR-SCTP > policy specified by the sinfo_pr_policy field. It is ignored when > SCTP_PR_SCTP_NONE is specified. In case of SCTP_PR_SCTP_TTL the > lifetime is specified. > > If this is set, the SCTP will do timed reliability transmission, not > reliable transmission. > PR-SCTP is implemented long ago. > >> PR-SCTP is implemented in lksctp? I am unable to get it working in my program. The compiler complains that there is no sinfo_pr_policy field and that SCTP_PR_SCTP_TTL is undefined. I have kernel 2.6.27-9-generic and sctp-tools 1.0.8.dfsg-2 that come default in Ubuntu 8.10 (Ibex). Do I need to install from git repository to get these features?? ====== my test code ====== ri.sinfo_stream = 0; // Use always stream 0 sri.sinfo_ppid = 0; // sri.sinfo_flags = SCTP_UNORDERED; // Unordered transmission sri.sinfo_pr_policy = SCTP_PR_SCTP_TTL; // Use timed partial reliability sri.sinfo_pr_value = 0; // TODO: no retransmissions? sri.sinfo_assoc_id = conn->assoc_id; // bytes_sent= sctp_send( conn->socket, // socket descriptor msg, // message length, // message length &sri, SCTP_UNORDERED ); ====== gcc output ======== rc/net/libsctp.c: In function 'connection_send_unreliable': src/net/libsctp.c:184: error: 'struct sctp_sndrcvinfo' has no member named 'sinfo_pr_policy' src/net/libsctp.c:184: error: 'SCTP_PR_SCTP_TTL' undeclared (first use in this function) src/net/libsctp.c:184: error: (Each undeclared identifier is reported only once src/net/libsctp.c:184: error: for each function it appears in.) src/net/libsctp.c:185: error: 'struct sctp_sndrcvinfo' has no member named 'sinfo_pr_value' regards Horacio >> > > |