]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - sys/netinet/sctp_cc_functions.h
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / sys / netinet / sctp_cc_functions.h
1 /*-
2  * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are met:
6  *
7  * a) Redistributions of source code must retain the above copyright notice,
8  *   this list of conditions and the following disclaimer.
9  *
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.
13  *
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.
17  *
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.
29  */
30 #include <sys/cdefs.h>
31 __FBSDID("$FreeBSD$");
32
33 #ifndef __sctp_cc_functions_h__
34 #define __sctp_cc_functions_h__
35
36 #if defined(_KERNEL) || defined(__Userspace__)
37
38 void
39 sctp_set_initial_cc_param(struct sctp_tcb *stcb,
40     struct sctp_nets *net);
41
42 void
43 sctp_cwnd_update_after_fr(struct sctp_tcb *stcb,
44     struct sctp_association *asoc);
45
46 void
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);
50
51 void
52 sctp_cwnd_update_after_timeout(struct sctp_tcb *stcb,
53     struct sctp_nets *net);
54
55 void
56 sctp_hs_cwnd_update_after_fr(struct sctp_tcb *stcb,
57     struct sctp_association *asoc);
58
59 void
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);
63
64 void
65 sctp_cwnd_update_after_ecn_echo(struct sctp_tcb *stcb,
66     struct sctp_nets *net);
67
68 void
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);
72
73 void
74 sctp_cwnd_update_after_output(struct sctp_tcb *stcb,
75     struct sctp_nets *net, int burst_limit);
76
77 void
78 sctp_cwnd_update_after_fr_timer(struct sctp_inpcb *inp,
79     struct sctp_tcb *stcb, struct sctp_nets *net);
80
81 /*
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.
88  */
89
90 void
91 sctp_htcp_set_initial_cc_param(struct sctp_tcb *stcb,
92     struct sctp_nets *net);
93
94 void
95 sctp_htcp_cwnd_update_after_fr(struct sctp_tcb *stcb,
96     struct sctp_association *asoc);
97
98 void
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);
102
103 void
104 sctp_htcp_cwnd_update_after_timeout(struct sctp_tcb *stcb,
105     struct sctp_nets *net);
106
107 void
108 sctp_htcp_cwnd_update_after_ecn_echo(struct sctp_tcb *stcb,
109     struct sctp_nets *net);
110
111 void
112 sctp_htcp_cwnd_update_after_fr_timer(struct sctp_inpcb *inp,
113     struct sctp_tcb *stcb, struct sctp_nets *net);
114
115 #endif
116 #endif