xref: /freebsd-src/sys/netinet/tcp_offload.h (revision d62c4607e8a3613253d613c0d3417cccd02b2c57)
18b5709dfSKip Macy /*-
24d846d26SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
3fe267a55SPedro F. Giffuni  *
409fe6320SNavdeep Parhar  * Copyright (c) 2012 Chelsio Communications, Inc.
58b5709dfSKip Macy  * All rights reserved.
68b5709dfSKip Macy  *
78b5709dfSKip Macy  * Redistribution and use in source and binary forms, with or without
809fe6320SNavdeep Parhar  * modification, are permitted provided that the following conditions
909fe6320SNavdeep Parhar  * are met:
1009fe6320SNavdeep Parhar  * 1. Redistributions of source code must retain the above copyright
1109fe6320SNavdeep Parhar  *    notice, this list of conditions and the following disclaimer.
1209fe6320SNavdeep Parhar  * 2. Redistributions in binary form must reproduce the above copyright
1309fe6320SNavdeep Parhar  *    notice, this list of conditions and the following disclaimer in the
1409fe6320SNavdeep Parhar  *    documentation and/or other materials provided with the distribution.
158b5709dfSKip Macy  *
1609fe6320SNavdeep Parhar  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1709fe6320SNavdeep Parhar  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
188b5709dfSKip Macy  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1909fe6320SNavdeep Parhar  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2009fe6320SNavdeep Parhar  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2109fe6320SNavdeep Parhar  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2209fe6320SNavdeep Parhar  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2309fe6320SNavdeep Parhar  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2409fe6320SNavdeep Parhar  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2509fe6320SNavdeep Parhar  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2609fe6320SNavdeep Parhar  * SUCH DAMAGE.
278b5709dfSKip Macy  *
288b5709dfSKip Macy  */
298b5709dfSKip Macy 
308b5709dfSKip Macy #ifndef _NETINET_TCP_OFFLOAD_H_
318b5709dfSKip Macy #define	_NETINET_TCP_OFFLOAD_H_
328b5709dfSKip Macy 
338b5709dfSKip Macy #ifndef _KERNEL
348b5709dfSKip Macy #error "no user-serviceable parts inside"
358b5709dfSKip Macy #endif
368b5709dfSKip Macy 
3701d74fe1SNavdeep Parhar #include <netinet/tcp.h>
3801d74fe1SNavdeep Parhar 
3909fe6320SNavdeep Parhar extern int registered_toedevs;
408b5709dfSKip Macy 
41*d62c4607SGleb Smirnoff struct tcpcb;
42*d62c4607SGleb Smirnoff 
4309fe6320SNavdeep Parhar int  tcp_offload_connect(struct socket *, struct sockaddr *);
4409fe6320SNavdeep Parhar void tcp_offload_listen_start(struct tcpcb *);
4509fe6320SNavdeep Parhar void tcp_offload_listen_stop(struct tcpcb *);
4609fe6320SNavdeep Parhar void tcp_offload_input(struct tcpcb *, struct mbuf *);
4709fe6320SNavdeep Parhar int  tcp_offload_output(struct tcpcb *);
4809fe6320SNavdeep Parhar void tcp_offload_rcvd(struct tcpcb *);
4909fe6320SNavdeep Parhar void tcp_offload_ctloutput(struct tcpcb *, int, int);
508c6104c4SMarius Strobl void tcp_offload_tcp_info(const struct tcpcb *, struct tcp_info *);
51f1f93475SJohn Baldwin int  tcp_offload_alloc_tls_session(struct tcpcb *, struct ktls_session *, int);
5209fe6320SNavdeep Parhar void tcp_offload_detach(struct tcpcb *);
5301d74fe1SNavdeep Parhar void tcp_offload_pmtu_update(struct tcpcb *, tcp_seq, int);
54237fbe0aSLawrence Stewart 
558b5709dfSKip Macy #endif
56