dccp_cc_sw.c revision 1.1 1 /* $KAME: dccp_cc_sw.c,v 1.9 2005/10/21 05:33:51 nishida Exp $ */
2 /* $NetBSD: dccp_cc_sw.c,v 1.1 2015/02/10 19:11:52 rjs Exp $ */
3
4 /*
5 * Copyright (c) 2003 Nils-Erik Mattsson
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. The name of the author may not be used to endorse or promote products
18 * derived from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 *
31 * Id: dccp_cc_sw.c,v 1.10 2003/05/14 08:14:46 nilmat-8 Exp
32 */
33
34 #include <sys/cdefs.h>
35 __KERNEL_RCSID(0, "$NetBSD: dccp_cc_sw.c,v 1.1 2015/02/10 19:11:52 rjs Exp $");
36
37 #include "opt_dccp.h"
38
39 #include <sys/param.h>
40 #include <sys/systm.h>
41 #include <sys/domain.h>
42 #include <sys/kernel.h>
43 #include <sys/lock.h>
44 #include <sys/malloc.h>
45 #include <sys/mbuf.h>
46 #include <sys/proc.h>
47 #include <sys/protosw.h>
48 #include <sys/signalvar.h>
49 #include <sys/socket.h>
50 #include <sys/socketvar.h>
51 #include <sys/mutex.h>
52 #include <sys/sysctl.h>
53 #include <sys/syslog.h>
54 #include <sys/queue.h>
55
56 #include <net/if.h>
57 #include <net/route.h>
58
59 #include <netinet/in.h>
60 #include <netinet/in_systm.h>
61 #include <netinet/ip.h>
62 #include <netinet/in_pcb.h>
63 #include <netinet/in_var.h>
64
65 #include <netinet/ip_icmp.h>
66 #include <netinet/icmp_var.h>
67 #include <netinet/ip_var.h>
68
69 #include <netinet/dccp.h>
70 #include <netinet/dccp_var.h>
71 #include <netinet/dccp_tcplike.h>
72 #include <netinet/dccp_tfrc.h>
73 #include <netinet/dccp_cc_sw.h>
74
75 struct dccp_cc_sw cc_sw[] = {
76 { 0, 0, 0,
77 0, 0,
78 0, 0, 0
79 },
80 { dccp_nocc_init, dccp_nocc_free, dccp_nocc_send_packet,
81 dccp_nocc_send_packet_sent, dccp_nocc_packet_recv,
82 dccp_nocc_init, dccp_nocc_free, dccp_nocc_packet_recv
83 },
84 { 0, 0, 0,
85 0, 0,
86 0, 0, 0
87 },
88 { tcplike_send_init, tcplike_send_free, tcplike_send_packet,
89 tcplike_send_packet_sent, tcplike_send_packet_recv,
90 tcplike_recv_init, tcplike_recv_free, tcplike_recv_packet_recv
91 },
92 { tfrc_send_init, tfrc_send_free, tfrc_send_packet,
93 tfrc_send_packet_sent, tfrc_send_packet_recv,
94 tfrc_recv_init, tfrc_recv_free, tfrc_recv_packet_recv
95 },
96 };
97