diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-01-23 20:49:59 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-01-23 20:49:59 +0000 |
commit | 1fc1cafb96de24c4d27854efc3ccfb8e6dd1e292 (patch) | |
tree | 860621add3b68e2b3f4330f66e62a5b7ef0f42ae /sys | |
parent | 9eb69bc2c9ae726ebe051d725ca497551d982cc5 (diff) |
Bring back the PRU_ATTACH constant and description. Then trpt(8)
prints the ATTACH action for TCP debugging socketes correctly.
OK bluhm@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/tcp_usrreq.c | 6 | ||||
-rw-r--r-- | sys/sys/protosw.h | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index c534f0eb2b7..4c33de84279 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_usrreq.c,v 1.164 2018/01/22 20:27:28 bluhm Exp $ */ +/* $OpenBSD: tcp_usrreq.c,v 1.165 2018/01/23 20:49:58 bluhm Exp $ */ /* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */ /* @@ -602,8 +602,8 @@ tcp_attach(struct socket *so, int proto) if ((so->so_options & SO_LINGER) && so->so_linger == 0) so->so_linger = TCP_LINGERTIME; - if (tp && (so->so_options & SO_DEBUG)) - tcp_trace(TA_USER, 0, tp, (caddr_t)0, 0 /* XXX */, 0); + if (so->so_options & SO_DEBUG) + tcp_trace(TA_USER, TCPS_CLOSED, tp, (caddr_t)0, PRU_ATTACH, 0); return (0); } diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h index 4bd22c85573..995a038a47d 100644 --- a/sys/sys/protosw.h +++ b/sys/sys/protosw.h @@ -1,4 +1,4 @@ -/* $OpenBSD: protosw.h,v 1.30 2018/01/23 20:41:42 bluhm Exp $ */ +/* $OpenBSD: protosw.h,v 1.31 2018/01/23 20:49:58 bluhm Exp $ */ /* $NetBSD: protosw.h,v 1.10 1996/04/09 20:55:32 cgd Exp $ */ /*- @@ -121,6 +121,7 @@ struct protosw { * A non-zero return from usrreq gives an * UNIX error number which should be passed to higher level software. */ +#define PRU_ATTACH 0 /* attach protocol to up */ #define PRU_DETACH 1 /* detach protocol from up */ #define PRU_BIND 2 /* bind socket to address */ #define PRU_LISTEN 3 /* listen for connection */ @@ -148,7 +149,7 @@ struct protosw { #ifdef PRUREQUESTS const char *prurequests[] = { - "", "DETACH", "BIND", "LISTEN", + "ATTACH", "DETACH", "BIND", "LISTEN", "CONNECT", "ACCEPT", "DISCONNECT", "SHUTDOWN", "RCVD", "SEND", "ABORT", "CONTROL", "SENSE", "RCVOOB", "SENDOOB", "SOCKADDR", |