37#include <sys/eventhandler.h>
39#include <sys/socket.h>
40#include <sys/socketvar.h>
41#include <sys/sockopt.h>
43#include <net/if_var.h>
45#include <net/route/nhop.h>
49#include <netinet6/in6_fib.h>
67 struct nhop_object *nh;
68 struct epoch_tracker et;
69 int error = EOPNOTSUPP;
72 KASSERT(nam->sa_family == AF_INET || nam->sa_family == AF_INET6,
73 (
"%s: called with sa_family %d", __func__, nam->sa_family));
81 if (nam->sa_family == AF_INET)
85#if defined(INET) && defined(INET6)
89 if (nam->sa_family == AF_INET6)
90 nh = fib6_lookup(0, &((
struct sockaddr_in6 *)nam)->sin6_addr,
95 return (EHOSTUNREACH);
100 if (nam->sa_family == AF_INET && !(ifp->if_capenable & IFCAP_TOE4))
102 if (nam->sa_family == AF_INET6 && !(ifp->if_capenable & IFCAP_TOE6))
136 KASSERT(tod != NULL, (
"%s: tp->tod is NULL, tp %p", __func__, tp));
148 KASSERT(tod != NULL, (
"%s: tp->tod is NULL, tp %p", __func__, tp));
151 flags = tcp_outflags[tp->
t_state];
153 if (flags & TH_RST) {
172 KASSERT(tod != NULL, (
"%s: tp->tod is NULL, tp %p", __func__, tp));
183 KASSERT(tod != NULL, (
"%s: tp->tod is NULL, tp %p", __func__, tp));
194 KASSERT(tod != NULL, (
"%s: tp->tod is NULL, tp %p", __func__, tp));
206 KASSERT(tod != NULL, (
"%s: tp->tod is NULL, tp %p", __func__, tp));
217 KASSERT(tod != NULL, (
"%s: tp->tod is NULL, tp %p", __func__, tp));
228 KASSERT(tod != NULL, (
"%s: tp->tod is NULL, tp %p", __func__, tp));
struct nhop_object * fib4_lookup(uint32_t fibnum, struct in_addr dst, uint32_t scopeid, uint32_t flags, uint32_t flowid)
#define INP_WLOCK_ASSERT(inp)
int(* tod_send_fin)(struct toedev *, struct tcpcb *)
void(* tod_pmtu_update)(struct toedev *, struct tcpcb *, tcp_seq, int)
int(* tod_connect)(struct toedev *, struct socket *, struct nhop_object *, struct sockaddr *)
void(* tod_pcb_detach)(struct toedev *, struct tcpcb *)
void(* tod_tcp_info)(struct toedev *, struct tcpcb *, struct tcp_info *)
int(* tod_send_rst)(struct toedev *, struct tcpcb *)
void(* tod_input)(struct toedev *, struct tcpcb *, struct mbuf *)
int(* tod_output)(struct toedev *, struct tcpcb *)
int(* tod_alloc_tls_session)(struct toedev *, struct tcpcb *, struct ktls_session *, int)
void(* tod_rcvd)(struct toedev *, struct tcpcb *)
void(* tod_ctloutput)(struct toedev *, struct tcpcb *, int, int)
void tcp_offload_ctloutput(struct tcpcb *tp, int sopt_dir, int sopt_name)
void tcp_offload_listen_stop(struct tcpcb *tp)
int tcp_offload_output(struct tcpcb *tp)
int tcp_offload_connect(struct socket *so, struct sockaddr *nam)
void tcp_offload_pmtu_update(struct tcpcb *tp, tcp_seq seq, int mtu)
void tcp_offload_listen_start(struct tcpcb *tp)
void tcp_offload_detach(struct tcpcb *tp)
int tcp_offload_alloc_tls_session(struct tcpcb *tp, struct ktls_session *tls, int direction)
void tcp_offload_rcvd(struct tcpcb *tp)
void tcp_offload_input(struct tcpcb *tp, struct mbuf *m)
void tcp_offload_tcp_info(struct tcpcb *tp, struct tcp_info *ti)