freebsd-skq/sys
andre 696f13b7fd Add tcp_log_addrs() function to generate and standardized TCP log line
for use thoughout the tcp subsystem.

It is IPv4 and IPv6 aware creates a line in the following format:

 "TCP: [1.2.3.4]:50332 to [1.2.3.4]:80 tcpflags <RST>"

A "\n" is not included at the end.  The caller is supposed to add
further information after the standard tcp log header.

The function returns a NUL terminated string which the caller has
to free(s, M_TCPLOG) after use.  All memory allocation is done
with M_NOWAIT and the return value may be NULL in memory shortage
situations.

Either struct in_conninfo || (struct tcphdr && (struct ip || struct
ip6_hdr) have to be supplied.

Due to ip[6].h header inclusion limitations and ordering issues the
struct ip and struct ip6_hdr parameters have to be casted and passed
as void * pointers.

tcp_log_addrs(struct in_conninfo *inc, struct tcphdr *th, void *ip4hdr,
    void *ip6hdr)

Usage example:

 struct ip *ip;
 char *tcplog;

 if (tcplog = tcp_log_addrs(NULL, th, (void *)ip, NULL)) {
	log(LOG_DEBUG, "%s; %s: Connection attempt to closed port\n",
	    tcplog, __func__);
	free(s, M_TCPLOG);
 }
2007-05-18 19:58:37 +00:00
..
amd64 - define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulating 2007-05-18 07:10:50 +00:00
arm - define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulating 2007-05-18 07:10:50 +00:00
boot Add documentation for the vm.kmem_size_min and vm.kmem_size_max tunables. 2007-05-09 02:37:58 +00:00
bsm Change $P4$ ID strings to P4 ID strings so that they are not auto-expanded 2007-04-17 12:27:08 +00:00
cam Release the bus reference that is acquired when doing a CAMIOCOMMAND 2007-05-16 16:57:21 +00:00
cddl Increase debug level - this message is not that important. 2007-05-09 22:32:49 +00:00
coda Since renaming of vop_lock to _vop_lock, pre- and post-condition 2007-05-18 13:02:13 +00:00
compat - define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulating 2007-05-18 07:10:50 +00:00
conf Make the serdev I/F non-optional. At least 3 drivers depend on it 2007-05-17 01:29:55 +00:00
contrib Increase debug level - this message is not that important. 2007-05-09 22:32:49 +00:00
crypto Integrate the Camellia Block Cipher. For more information see RFC 4132 2007-05-09 19:37:02 +00:00
ddb Use FOREACH_PROC_IN_SYSTEM instead of using its unrolled form. 2007-01-17 15:05:52 +00:00
dev The HP Diva RMP3 uses BAR 0x14. 2007-05-17 04:07:19 +00:00
fs Since renaming of vop_lock to _vop_lock, pre- and post-condition 2007-05-18 13:02:13 +00:00
gdb
geom Fix a dereference in KASSERT. 2007-05-15 23:29:57 +00:00
gnu Change #include <machine/pcpu.h> to #include <sys/pcpu.h> 2007-04-01 12:48:10 +00:00
i4b Tell the user when the setup of the interrupt handler failed and return 2007-04-01 16:52:54 +00:00
i386 - define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulating 2007-05-18 07:10:50 +00:00
ia64 - define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulating 2007-05-18 07:10:50 +00:00
isa When trying to allocate a PnP BIOS memory resource, the code loops trying 2007-04-17 15:14:23 +00:00
kern Fix a comment. 2007-05-18 15:05:41 +00:00
libkern strchr() and strrchr() are already present in the kernel, but with less 2007-04-10 21:42:12 +00:00
modules Add the 'mfip' sub-driver for gaining SCSI-passthrough access to devices 2007-05-16 17:19:47 +00:00
net Update the comments on if_alloc(), if_free(), if_free_type(), and 2007-05-16 19:59:01 +00:00
net80211 - Nuke unnecessary header. 2007-05-05 11:07:52 +00:00
netatalk Reduce network stack oddness: implement .pru_sockaddr and .pru_peeraddr 2007-05-11 10:20:51 +00:00
netatm Fix use after free bug: use temporary variable to hold next entry in linked 2007-04-03 12:45:10 +00:00
netgraph Fix build with NETGRAPH_MPPC_COMPRESSION but without NETGRAPH_MPPC_ENCRYPTION. 2007-05-18 15:28:01 +00:00
netinet Add tcp_log_addrs() function to generate and standardized TCP log line 2007-05-18 19:58:37 +00:00
netinet6 - Disabled responding to NI queries from a global address by default as 2007-05-17 21:20:24 +00:00
netipsec Integrate the Camellia Block Cipher. For more information see RFC 4132 2007-05-09 19:37:02 +00:00
netipx Use ANSI C function declarations throughout netipx. 2007-05-11 10:38:34 +00:00
netkey
netnatm s/destory/destroy/ (except for the code in contrib/). 2007-04-16 12:31:35 +00:00
netncp Use pause() rather than tsleep() on stack variables and function pointers. 2007-02-27 17:23:29 +00:00
netsmb Replace custom file descriptor array sleep lock constructed using a mutex 2007-04-04 09:11:34 +00:00
nfs NFSv4 client: 2006-11-28 19:33:28 +00:00
nfs4client Rename some functions and variables from nfs_* to nfs4_* to avoid 2007-01-25 14:33:13 +00:00
nfsclient In nfs_down(), if rep can be NULL, which we test for, then we should 2007-05-18 19:34:54 +00:00
nfsserver Remove MAC Framework access control check entry points made redundant with 2007-04-22 15:31:22 +00:00
opencrypto Integrate the Camellia Block Cipher. For more information see RFC 4132 2007-05-09 19:37:02 +00:00
pc98 - define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulating 2007-05-18 07:10:50 +00:00
pccard
pci tl(4) appears to support long frames. 2007-05-09 09:02:11 +00:00
powerpc - define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulating 2007-05-18 07:10:50 +00:00
rpc Move rpc/types.h under sys/, as this is used by ZFS kernel module. 2007-04-10 22:10:16 +00:00
security Don't expose #ifdef NOTYET parts to userspace via audit_ioctl.h, just 2007-04-29 16:20:32 +00:00
sparc64 - define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulating 2007-05-18 07:10:50 +00:00
sun4v - define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulating 2007-05-18 07:10:50 +00:00
sys Since renaming of vop_lock to _vop_lock, pre- and post-condition 2007-05-18 13:02:13 +00:00
tools Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
ufs Since renaming of vop_lock to _vop_lock, pre- and post-condition 2007-05-18 13:02:13 +00:00
vm - define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulating 2007-05-18 07:10:50 +00:00
Makefile o Add bsm and security to a list of cscope dirs. 2007-04-14 16:29:15 +00:00