2 * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
7 * a) Redistributions of source code must retain the above copyright notice,
8 * this list of conditions and the following disclaimer.
10 * b) Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in
12 * the documentation and/or other materials provided with the distribution.
14 * c) Neither the name of Cisco Systems, Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived
16 * from this software without specific prior written permission.
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
20 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 * THE POSSIBILITY OF SUCH DAMAGE.
30 #include <sys/cdefs.h>
31 __FBSDID("$FreeBSD$");
33 #ifndef __sctp_cc_functions_h__
34 #define __sctp_cc_functions_h__
36 #if defined(_KERNEL) || defined(__Userspace__)
39 sctp_set_initial_cc_param(struct sctp_tcb *stcb,
40 struct sctp_nets *net);
43 sctp_cwnd_update_after_fr(struct sctp_tcb *stcb,
44 struct sctp_association *asoc);
47 sctp_cwnd_update_after_sack(struct sctp_tcb *stcb,
48 struct sctp_association *asoc,
49 int accum_moved, int reneged_all, int will_exit);
52 sctp_cwnd_update_after_timeout(struct sctp_tcb *stcb,
53 struct sctp_nets *net);
56 sctp_hs_cwnd_update_after_fr(struct sctp_tcb *stcb,
57 struct sctp_association *asoc);
60 sctp_hs_cwnd_update_after_sack(struct sctp_tcb *stcb,
61 struct sctp_association *asoc,
62 int accum_moved, int reneged_all, int will_exit);
65 sctp_cwnd_update_after_ecn_echo(struct sctp_tcb *stcb,
66 struct sctp_nets *net);
69 sctp_cwnd_update_after_packet_dropped(struct sctp_tcb *stcb,
70 struct sctp_nets *net, struct sctp_pktdrop_chunk *cp,
71 uint32_t * bottle_bw, uint32_t * on_queue);
74 sctp_cwnd_update_after_output(struct sctp_tcb *stcb,
75 struct sctp_nets *net, int burst_limit);
78 sctp_cwnd_update_after_fr_timer(struct sctp_inpcb *inp,
79 struct sctp_tcb *stcb, struct sctp_nets *net);
82 * HTCP algorithms are directly taken from
83 * R.N.Shorten, D.J.Leith and are work/outcome from
84 * a Cisco-URP grant to enhance HTCP for satellite
85 * communications. We use the BSD Liscense
86 * granted from his source and have modified his
87 * algorithms to fit within the SCTP BSD framework.
91 sctp_htcp_set_initial_cc_param(struct sctp_tcb *stcb,
92 struct sctp_nets *net);
95 sctp_htcp_cwnd_update_after_fr(struct sctp_tcb *stcb,
96 struct sctp_association *asoc);
99 sctp_htcp_cwnd_update_after_sack(struct sctp_tcb *stcb,
100 struct sctp_association *asoc,
101 int accum_moved, int reneged_all, int will_exit);
104 sctp_htcp_cwnd_update_after_timeout(struct sctp_tcb *stcb,
105 struct sctp_nets *net);
108 sctp_htcp_cwnd_update_after_ecn_echo(struct sctp_tcb *stcb,
109 struct sctp_nets *net);
112 sctp_htcp_cwnd_update_after_fr_timer(struct sctp_inpcb *inp,
113 struct sctp_tcb *stcb, struct sctp_nets *net);