<dec f='src/src/sys/netinet/tcp_var.h' l='995' type='struct socket * syn_cache_get(struct sockaddr * , struct sockaddr * , struct tcphdr * , unsigned int , unsigned int , struct socket * so, struct mbuf * )'/>
<use f='src/src/sys/netinet/tcp_input.c' l='1695' u='c' c='tcp_input'/>
<def f='src/src/sys/netinet/tcp_input.c' l='3938' ll='4231' type='struct socket * syn_cache_get(struct sockaddr * src, struct sockaddr * dst, struct tcphdr * th, unsigned int hlen, unsigned int tlen, struct socket * so, struct mbuf * m)'/>
<doc f='src/src/sys/netinet/tcp_input.c' l='3915'>/*
 * This function gets called when we receive an ACK for a
 * socket in the LISTEN state.  We look up the connection
 * in the syn cache, and if its there, we pull it out of
 * the cache and turn it into a full-blown connection in
 * the SYN-RECEIVED state.
 *
 * The return values may not be immediately obvious, and their effects
 * can be subtle, so here they are:
 *
 *	NULL	SYN was not found in cache; caller should drop the
 *		packet and send an RST.
 *
 *	-1	We were unable to create the new connection, and are
 *		aborting it.  An ACK,RST is being sent to the peer
 *		(unless we got screwey sequence numbners; see below),
 *		because the 3-way handshake has been completed.  Caller
 *		should not free the mbuf, since we may be using it.  If
 *		we are not, we will free it.
 *
 *	Otherwise, the return value is a pointer to the new socket
 *	associated with the connection.
 */</doc>
