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