Deleted Added
full compact
39c39
< __FBSDID("$FreeBSD: head/sys/netinet/tcp_usrreq.c 287830 2015-09-15 20:04:30Z hiren $");
---
> __FBSDID("$FreeBSD: head/sys/netinet/tcp_usrreq.c 289276 2015-10-14 00:35:37Z hiren $");
88a89,91
> #ifdef TCPPCAP
> #include <netinet/tcp_pcap.h>
> #endif
1579a1583,1601
> #ifdef TCPPCAP
> case TCP_PCAP_OUT:
> case TCP_PCAP_IN:
> INP_WUNLOCK(inp);
> error = sooptcopyin(sopt, &optval, sizeof optval,
> sizeof optval);
> if (error)
> return (error);
>
> INP_WLOCK_RECHECK(inp);
> if (optval >= 0)
> tcp_pcap_set_sock_max(TCP_PCAP_OUT ?
> &(tp->t_outpkts) : &(tp->t_inpkts),
> optval);
> else
> error = EINVAL;
> goto unlock_and_done;
> #endif
>
1649a1672,1680
> #ifdef TCPPCAP
> case TCP_PCAP_OUT:
> case TCP_PCAP_IN:
> optval = tcp_pcap_get_sock_max(TCP_PCAP_OUT ?
> &(tp->t_outpkts) : &(tp->t_inpkts));
> INP_WUNLOCK(inp);
> error = sooptcopyout(sopt, &optval, sizeof optval);
> break;
> #endif