summaryrefslogtreecommitdiff
path: root/usr.sbin/tcpdrop/tcpdrop.c
Commit message (Collapse)AuthorAgeFilesLines
* Allow TCP connections to be filtered by stack and state.Michael Tuexen2017-09-121-8/+41
| | | | | | | | | | Choose the command line options to be consistent with the ones of sockstat. Sponsored by: Netflix, Inc. Notes: svn path=/head/; revision=323493
* o Clean the whole array of IPv4 addresses not just a local part.Maxim Konovalov2017-04-281-1/+1
| | | | | | | | PR: 218923 Submitted by: Daniel McRobb Notes: svn path=/head/; revision=317546
* Hide struct inpcb, struct tcpcb from the userland.Gleb Smirnoff2017-03-211-9/+7
| | | | | | | | | | | | | | | | | | | | | | | This is a painful change, but it is needed. On the one hand, we avoid modifying them, and this slows down some ideas, on the other hand we still eventually modify them and tools like netstat(1) never work on next version of FreeBSD. We maintain a ton of spares in them, and we already got some ifdef hell at the end of tcpcb. Details: - Hide struct inpcb, struct tcpcb under _KERNEL || _WANT_FOO. - Make struct xinpcb, struct xtcpcb pure API structures, not including kernel structures inpcb and tcpcb inside. Export into these structures the fields from inpcb and tcpcb that are known to be used, and put there a ton of spare space. - Make kernel and userland utilities compilable after these changes. - Bump __FreeBSD_version. Reviewed by: rrs, gnn Differential Revision: D10018 Notes: svn path=/head/; revision=315662
* Allow the address and ports to be separated by a colon or period ratherJohn Baldwin2013-01-301-3/+35
| | | | | | | | | | | than a space to permit directly pasting the output of commands such as netstat and sockstat on the command line. Reviewed by: net MFC after: 1 week Notes: svn path=/head/; revision=246129
* Include param.h for CACHE_LINE_SIZE to unbreak the build.Bjoern A. Zeeb2011-06-061-1/+2
| | | | Notes: svn path=/head/; revision=222765
* o) Restructure tcpdrop(8) to provide a facility to try to drop all establishedJuli Mallett2009-06-011-43/+274
| | | | | | | | | | | | | connections. Including a flag to instead output a sequence of tcpdrop(8) invocations that would accomplish the same thing, which is convenient for scripting. o) Make tcpdrop complain if the addresses given to it are entirely in different address families, rather than failing silently. o) When cross-referencing httpd(8), do not explicitly specify the apache2 port, since the example in question is generic. Notes: svn path=/head/; revision=193203
* Normalize usage output.Ruslan Ermilov2007-10-311-2/+4
| | | | Notes: svn path=/head/; revision=173223
* o Add handling of an IPv4-mapped IPv6 address.Maxim Konovalov2005-02-141-4/+5
| | | | | | | | | | | | | | | | o Use SYSCTL_IN() macro instead of direct call of copyin(9). Submitted by: ume o Move sysctl_drop() implementation to sys/netinet/tcp_subr.c where most of tcp sysctls live. o There are net.inet[6].tcp[6].getcred sysctls already, no needs in a separate struct tcp_ident_mapping. Suggested by: ume Notes: svn path=/head/; revision=141886
* o Implement net.inet.tcp.drop sysctl and userland part, tcpdrop(8)Maxim Konovalov2005-02-061-0/+88
utility: The tcpdrop command drops the TCP connection specified by the local address laddr, port lport and the foreign address faddr, port fport. Obtained from: OpenBSD Reviewed by: rwatson (locking), ru (man page), -current MFC after: 1 month Notes: svn path=/head/; revision=141381