FreeBSD/sys/netinet/toecore.c
/*
 * Inform one or more TOE devices about a listening socket.
 */
Inform one or more TOE devices about a listening socket.
Inform one or more TOE devices about a listening socket .
static void
toe_listen_start(struct inpcb *inp, void *arg)
{
	struct toedev *t, *tod;
	struct tcpcb *tp;
	INP_WLOCK_ASSERT(inp);
	KASSERT(inp->inp_pcbinfo == &V_tcbinfo,
	    ("%s: inp is not a TCP inp", __func__));
	if (inp->inp_flags & (INP_DROPPED | INP_TIMEWAIT))
		return;
	tp = intotcpcb(inp);
	if (tp->t_state != TCPS_LISTEN)
		return;
	t = arg;
	mtx_lock(&toedev_lock);
	TAILQ_FOREACH(tod, &toedev_list, link) {
		if (t == NULL || t == tod)
			tod->tod_listen_start(tod, tp);
	}
	mtx_unlock(&toedev_lock);
}
static void toe_listen_start ( struct inpcb * inp , void * arg ) { struct toedev * t , * tod ; struct tcpcb * tp ; INP_WLOCK_ASSERT ( inp ) ; KASSERT ( inp -> inp_pcbinfo == & V_tcbinfo , ( " " , __func__ ) ) ; if ( inp -> inp_flags & ( INP_DROPPED | INP_TIMEWAIT ) ) return ; tp = intotcpcb ( inp ) ; if ( tp -> t_state != TCPS_LISTEN ) return ; t = arg ; mtx_lock ( & toedev_lock ) ; TAILQ_FOREACH ( tod , & toedev_list , link ) { if ( t == NULL || t == tod ) tod -> tod_listen_start ( tod , tp ) ; } mtx_unlock ( & toedev_lock ) ; }
Inform one or more TOE devices about a listening socket.
Inform one or more TOE devices about a listening socket .