Home | History | Annotate | Line # | Download | only in netinet
dccp_cc_sw.c revision 1.2
      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.2 2015/08/24 22:21:26 pooka 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.2 2015/08/24 22:21:26 pooka Exp $");
     36 
     37 #ifdef _KERNEL_OPT
     38 #include "opt_dccp.h"
     39 #endif
     40 
     41 #include <sys/param.h>
     42 #include <sys/systm.h>
     43 #include <sys/domain.h>
     44 #include <sys/kernel.h>
     45 #include <sys/lock.h>
     46 #include <sys/malloc.h>
     47 #include <sys/mbuf.h>
     48 #include <sys/proc.h>
     49 #include <sys/protosw.h>
     50 #include <sys/signalvar.h>
     51 #include <sys/socket.h>
     52 #include <sys/socketvar.h>
     53 #include <sys/mutex.h>
     54 #include <sys/sysctl.h>
     55 #include <sys/syslog.h>
     56 #include <sys/queue.h>
     57 
     58 #include <net/if.h>
     59 #include <net/route.h>
     60 
     61 #include <netinet/in.h>
     62 #include <netinet/in_systm.h>
     63 #include <netinet/ip.h>
     64 #include <netinet/in_pcb.h>
     65 #include <netinet/in_var.h>
     66 
     67 #include <netinet/ip_icmp.h>
     68 #include <netinet/icmp_var.h>
     69 #include <netinet/ip_var.h>
     70 
     71 #include <netinet/dccp.h>
     72 #include <netinet/dccp_var.h>
     73 #include <netinet/dccp_tcplike.h>
     74 #include <netinet/dccp_tfrc.h>
     75 #include <netinet/dccp_cc_sw.h>
     76 
     77 struct dccp_cc_sw cc_sw[] = {
     78 { 0,			0,			0,
     79   0,						0,
     80   0,			0,			0
     81 },
     82 { dccp_nocc_init,	dccp_nocc_free,		dccp_nocc_send_packet,
     83   dccp_nocc_send_packet_sent,			dccp_nocc_packet_recv,
     84   dccp_nocc_init,	dccp_nocc_free,		dccp_nocc_packet_recv
     85 },
     86 { 0,			0,			0,
     87   0,						0,
     88   0,			0,			0
     89 },
     90 { tcplike_send_init,	tcplike_send_free,	tcplike_send_packet,
     91   tcplike_send_packet_sent,			 tcplike_send_packet_recv,
     92    tcplike_recv_init,	tcplike_recv_free,	tcplike_recv_packet_recv
     93 },
     94 { tfrc_send_init,	tfrc_send_free,		tfrc_send_packet,
     95   tfrc_send_packet_sent,			 tfrc_send_packet_recv,
     96    tfrc_recv_init,	tfrc_recv_free,		tfrc_recv_packet_recv
     97 },
     98 };
     99