1.\" $OpenBSD: trpt.8,v 1.14 2003/06/12 12:59:53 jmc Exp $ 2.\" 3.\" Copyright (c) 1983, 1991, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. Neither the name of the University nor the names of its contributors 15.\" may be used to endorse or promote products derived from this software 16.\" without specific prior written permission. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" SUCH DAMAGE. 29.\" 30.\" @(#)trpt.8 8.2 (Berkeley) 12/11/93 31.\" 32.Dd December 11, 1993 33.Dt TRPT 8 34.Os 35.Sh NAME 36.Nm trpt 37.Nd transliterate protocol trace 38.Sh SYNOPSIS 39.Nm trpt 40.Op Fl a 41.Op Fl f 42.Op Fl j 43.Op Fl p Ar hex-address 44.Op Fl s 45.Op Fl t 46.Op Fl N Ar system 47.Op Fl M Ar core 48.Sh DESCRIPTION 49.Nm 50interrogates the buffer of 51.Tn TCP 52trace records created 53when a socket is marked for 54.Dq debugging 55(see 56.Xr setsockopt 2 ) , 57and prints a readable description of these records. 58When no options are supplied, 59.Nm 60prints all the trace records found in the system 61grouped according to 62.Tn TCP 63connection protocol control 64block 65.Pq Tn PCB . 66.Pp 67The options are as follows: 68.Bl -tag -width Ds 69.It Fl a 70In addition to the normal output, 71print the values of the source and destination 72addresses for each packet recorded. 73.It Fl f 74Follow the trace as it occurs, waiting a short time for additional records 75each time the end of the log is reached. 76.It Fl j 77Just give a list of the protocol control block 78addresses for which there are trace records. 79.It Fl p 80Show only trace records associated with the protocol 81control block at the given address 82.Ar hex-address . 83.It Fl s 84In addition to the normal output, 85print a detailed description of the packet 86sequencing information. 87.It Fl t 88In addition to the normal output, 89print the values for all timers at each 90point in the trace. 91.It Fl M Ar core 92Extract values associated with the name list from 93.Pa core 94instead of the running kernel. 95.It Fl N Ar system 96Extract the name list from 97.Pa system 98instead of the running kernel. 99.El 100.Pp 101The recommended use of 102.Nm 103is as follows. 104Isolate the problem and enable debugging on the 105socket(s) involved in the connection. 106Find the address of the protocol control blocks 107associated with the sockets using the 108.Fl A 109option to 110.Xr netstat 1 . 111Then run 112.Nm 113with the 114.Fl p 115option, supplying the associated 116protocol control block addresses. 117The 118.Fl f 119option can be used to follow the trace log once the trace is located. 120If there are 121many sockets using the debugging option, the 122.Fl j 123option may be useful in checking to see if 124any trace records are present for the socket in 125question. 126.Sh DIAGNOSTICS 127.Bl -tag -width Ds 128.It Sy no namelist 129When the system image doesn't 130contain the proper symbols to find the trace buffer; 131others which should be self explanatory. 132.El 133.Sh SEE ALSO 134.Xr netstat 1 , 135.Xr setsockopt 2 136.Sh HISTORY 137The 138.Nm 139command appeared in 140.Bx 4.2 . 141.Sh BUGS 142Should also print the data for each input or output, 143but this is not saved in the trace record. 144.Pp 145The output format is inscrutable and should be described 146here. 147