diff options
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/sctp/sctp.h | 15 | ||||
| -rw-r--r-- | include/net/sctp/structs.h | 9 |
2 files changed, 18 insertions, 6 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 27a69518c2f9..7ad60bcd5581 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h @@ -123,7 +123,7 @@ */ extern struct sctp_protocol sctp_proto; extern struct sock *sctp_get_ctl_sock(void); -extern int sctp_copy_local_addr_list(struct sctp_protocol *, +extern int sctp_copy_local_addr_list(struct sctp_protocol *, struct sctp_bind_addr *, sctp_scope_t, int priority, int flags); extern struct sctp_pf *sctp_get_pf_specific(sa_family_t family); @@ -414,13 +414,22 @@ static inline __s32 sctp_jitter(__u32 rto) sctp_rand ^= (sctp_rand << 12); sctp_rand ^= (sctp_rand >> 20); - /* Choose random number from 0 to rto, then move to -50% ~ +50% - * of rto. + /* Choose random number from 0 to rto, then move to -50% ~ +50% + * of rto. */ ret = sctp_rand % rto - (rto >> 1); return ret; } +/* Break down data chunks at this point. */ +static inline int sctp_frag_point(int pmtu) +{ + pmtu -= SCTP_IP_OVERHEAD + sizeof(struct sctp_data_chunk); + pmtu -= sizeof(struct sctp_sack_chunk); + + return pmtu; +} + /* Walk through a list of TLV parameters. Don't trust the * individual parameter lengths and instead depend on * the chunk length to indicate when to stop. Make sure diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 913c4769b343..e22b333a94b2 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -590,13 +590,16 @@ struct sctp_packet { /* This packet should advertise ECN capability to the network * via the ECT bit. */ - int ecn_capable; + char ecn_capable; /* This packet contains a COOKIE-ECHO chunk. */ - int has_cookie_echo; + char has_cookie_echo; + + /* This packet containsa SACK chunk. */ + char has_sack; /* SCTP cannot fragment this packet. So let ip fragment it. */ - int ipfragok; + char ipfragok; int malloced; }; |
