Commit Graph

14 Commits

Author SHA1 Message Date
Brian Feldman dec17687ad Add missing include for <ctype.h>
Make sockaddr printing code unbad.

Always copy in sizeof(sockaddr_un) bytes for an AF_UNIX sockaddr,
despite what the length may be.
2001-11-06 19:26:51 +00:00
Dag-Erling Smørgrav 9ddd141263 Teach truss(1) to display sockaddrs. It currently knows about AF_INET,
AF_INET6 and AF_UNIX sockaddrs, and will recognize accept(), bind(),
connect(), getpeername() and getsockname() as syscalls taking sockaddr
arguments.  Some enterprising soul might want to add (and test) support
for the send() / recv() family of syscalls as well.

MFC after:	1 week
2001-10-21 21:57:10 +00:00
Joerg Wunsch 8a2ecea916 In get_string(), 0-terminate the contents of buf ``just in case'';
otherwise, if the very first fgetc() already yielded EOF, the returned
string won't get terminated at all.

MFC after:	1 day
2001-08-28 21:27:36 +00:00
Sean Eric Fagan 6cb533fe1c Change the output of truss to more closely resemble SysV's. (Yes, it
really is much nicer looking.)

Submitted by:	"Matthew N. Dodd" <winter@jurai.net>
2000-03-18 08:49:41 +00:00
Sean Eric Fagan 05d5ca3587 Fix a leak. (Thanks Bruce, this was a bonehead mistake on my part :).)
Submitted by:	Bruce Evans
2000-02-15 20:25:47 +00:00
Peter Wemm c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Dag-Erling Smørgrav f0ebbc2985 Teach truss to print symbolic signal names (e.g. SIGHUP instead of 0x01). 1999-08-10 16:57:37 +00:00
Dag-Erling Smørgrav 1071410263 Add access(2) to the list of recognized syscalls. 1999-08-05 12:03:50 +00:00
Sean Eric Fagan a8f3721897 Add lstat() as a known system call. 1998-10-15 04:31:44 +00:00
Bruce Evans 22694ebad5 Fixed printf format errors. 1998-07-06 21:01:54 +00:00
Philippe Charnier 3cf51049e0 Sort Xrefs. Use err(3). Remove uneeded #include.
Correct usage: one of {-p pid, command} is required.
Open output file when command line is fully analyzed: incorrect `truss -o f'
command does not create an empty file anymore.
1998-01-05 07:30:26 +00:00
Sean Eric Fagan 09d64da3a4 Add some copyright and license terms, at Jordan's request. Note that
syscall.h just refers to another file for the copyright notice.
1997-12-20 18:40:43 +00:00
Sean Eric Fagan 970649f9c9 First cut at printing out ioctl names intelligently. Note that this doesn't
handle linux ioctls (yet?).  This uses the mkioctl script from kdump,
bless its little heart.

Reviewed by:	Mike Smith
1997-12-06 06:51:14 +00:00
Sean Eric Fagan bbeaf6c0c9 Truss program. Requires procfs. 1997-12-06 05:23:12 +00:00