OpenBSD CVS

CVS log for src/usr.bin/netstat/unix.c


[BACK] Up to [local] / src / usr.bin / netstat

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.32 / (download) - annotate - [select for diffs], Thu Apr 26 12:42:51 2018 UTC (6 years ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, HEAD
Changes since 1.31: +1 -2 lines
Diff to previous 1.31 (colored)

Use <fcntl.h> instead of <sys/file.h> for open() and friends.
Delete a bunch of unnecessary #includes and sort to match style(9)
while doing the above cleanup.

ok deraadt@ krw@

Revision 1.31 / (download) - annotate - [select for diffs], Fri Jan 5 10:41:24 2018 UTC (6 years, 4 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.30: +1 -2 lines
Diff to previous 1.30 (colored)

No need for <sys/socketvar.h>

Revision 1.30 / (download) - annotate - [select for diffs], Thu Sep 15 01:01:08 2016 UTC (7 years, 8 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.29: +1 -3 lines
Diff to previous 1.29 (colored)

dont #define _KERNEL around some #includes

the data structures are now readable without _KERNEL needing to be defined.

ok deraadt@

there's probably a lot more of these that can be cleaned up if
anyone is interested in looking into it.

Revision 1.29 / (download) - annotate - [select for diffs], Sat Aug 27 04:07:42 2016 UTC (7 years, 8 months ago) by guenther
Branch: MAIN
Changes since 1.28: +2 -1 lines
Diff to previous 1.28 (colored)

Pull in <sys/time.h> for struct timespec and timeval

ok deraadt@

Revision 1.28 / (download) - annotate - [select for diffs], Mon Aug 24 15:55:53 2015 UTC (8 years, 8 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.27: +1 -3 lines
Diff to previous 1.27 (colored)

Remove obsolete fields in struct unpcb.  In the past they were used
for flow control with unix domain sockets, this is now done by
filling the send buffer with fake data counters.
OK naddy@;  no fallout in a bulk build

Revision 1.27 / (download) - annotate - [select for diffs], Wed Apr 22 18:07:32 2015 UTC (9 years ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.26: +3 -3 lines
Diff to previous 1.26 (colored)

Expand SLIST macro of unix pcb members before printing the pointer.
Fixes a gcc warning.  No binary change.
Found by and OK deraadt@

Revision 1.26 / (download) - annotate - [select for diffs], Thu Feb 12 01:49:02 2015 UTC (9 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.25: +12 -33 lines
Diff to previous 1.25 (colored)

Switch the printing of open sockets from ugly KVM internals to use
kvm_getfiles. This allows to run netstat without any extra privileges
and removes another setgid program from base..
There is still kvm reader code in there which is used for debugging
purposes (crashdump). netstat should still behave mostly the same.
deraadt@ and sthen@ agree that it is time to get this puppy in.

Revision 1.25 / (download) - annotate - [select for diffs], Tue Jan 20 18:26:57 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.24: +2 -3 lines
Diff to previous 1.24 (colored)

Adjust <sys/param.h> comments regarding use of use of MSIZE, or
delete <sys/param.h> if now possible
ok guenther

Revision 1.24 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:10 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)

Revision 1.23 / (download) - annotate - [select for diffs], Thu Jul 10 14:08:13 2014 UTC (9 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.22: +2 -1 lines
Diff to previous 1.22 (colored)

#define _KERNEL hack requires ucred.h now as well

Revision 1.22 / (download) - annotate - [select for diffs], Sat Nov 9 20:04:13 2013 UTC (10 years, 6 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.21: +2 -3 lines
Diff to previous 1.21 (colored)

kinfo_file returns the socket buffer counts in uint64_ts, so we need to
update the printf format for them.  While here, delete a now unused variable.

problem pointed out by Scott McEachern (scott (at) blackstaff.ca)

Revision 1.21 / (download) - annotate - [select for diffs], Tue Oct 22 16:40:28 2013 UTC (10 years, 6 months ago) by guenther
Branch: MAIN
Changes since 1.20: +27 -51 lines
Diff to previous 1.20 (colored)

- add UNIX-domain socket info to struct kinfo_file2
- convert netstat from kvm_getfiles() to kvm_getfile2() using that
- delete kvm_getfiles() and KERN_FILE as no longer used (bump libkvm's major)
- rename kvm_getfile2() to kvm_getfiles(), kinfo_file2 to kinfo_file
  and KERN_FILE2 to KERN_FILE.

ok deraadt@, millert@
ports scan sthen@

Revision 1.20 / (download) - annotate - [select for diffs], Sun Aug 18 16:32:24 2013 UTC (10 years, 9 months ago) by guenther
Branch: MAIN
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

Fix calls to printf-like functions which passed a non-fixed string
as the format and no variable args.
Replace "%#0.*X" with "%#.*X": the zero-fill flag is ignored/implied
on numeric conversions when a precision is specified.

ok jung@ millert@ krw@

Revision 1.19 / (download) - annotate - [select for diffs], Tue Apr 23 23:32:46 2013 UTC (11 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.18: +3 -2 lines
Diff to previous 1.18 (colored)

create a method to print the unp_ino (ino_t) properly once it becomes
bigger

Revision 1.18 / (download) - annotate - [select for diffs], Thu Apr 18 15:43:22 2013 UTC (11 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.17: +12 -11 lines
Diff to previous 1.17 (colored)

improve time_t printing; ok claudio

Revision 1.17 / (download) - annotate - [select for diffs], Tue Apr 16 22:19:14 2013 UTC (11 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.16: +11 -11 lines
Diff to previous 1.16 (colored)

handle long long tv_sec; ok millert

Revision 1.16 / (download) - annotate - [select for diffs], Wed Mar 20 15:23:37 2013 UTC (11 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.15: +16 -11 lines
Diff to previous 1.15 (colored)

As non-root, whenever netstat is about to print out a kernel pointer...
print 0x0 instead.  Hides a lot stuff people don't need to see.

Revision 1.15 / (download) - annotate - [select for diffs], Sat Oct 30 23:06:05 2010 UTC (13 years, 6 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.14: +43 -5 lines
Diff to previous 1.14 (colored)

Print socket structure internals when netstat -P pcbaddr is called
with -v.  Also netstat -P supports more than TCP now.
ok markus@ jmc@

Revision 1.14 / (download) - annotate - [select for diffs], Wed Apr 28 18:22:11 2010 UTC (14 years ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.13: +4 -4 lines
Diff to previous 1.13 (colored)

Rename nfiles so as not to collide with sys/file.h,
makes gcc4 happy.

ok deraadt@ miod@

Revision 1.13 / (download) - annotate - [select for diffs], Wed Dec 19 01:47:00 2007 UTC (16 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.12: +1 -9 lines
Diff to previous 1.12 (colored)

delete rcsid crud

Revision 1.12 / (download) - annotate - [select for diffs], Fri Mar 25 17:01:04 2005 UTC (19 years, 1 month ago) by jaredy
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.11: +6 -6 lines
Diff to previous 1.11 (colored)

kill unneeded (char *) casts.  ok millert, otto

Revision 1.11 / (download) - annotate - [select for diffs], Sat Mar 13 22:02:13 2004 UTC (20 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.10: +6 -7 lines
Diff to previous 1.10 (colored)

some NULL vs 0 and knf; parts from nimadeus@pandora.be

Revision 1.10 / (download) - annotate - [select for diffs], Tue Jun 3 02:56:13 2003 UTC (20 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.9: +3 -7 lines
Diff to previous 1.9 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.9 / (download) - annotate - [select for diffs], Sat Feb 1 01:51:31 2003 UTC (21 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.8: +4 -7 lines
Diff to previous 1.8 (colored)

ansi

Revision 1.8 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:50 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

Part one of userland __P removal.  Done with a simple regexp with some minor hand editing to make comments line up correctly.  Another pass is forthcoming that handles the cases that could not be done automatically.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Nov 19 19:02:15 2001 UTC (22 years, 6 months ago) by mpech
Branch: MAIN
Changes since 1.6: +4 -4 lines
Diff to previous 1.6 (colored)

kill more registers

millert@ ok

Revision 1.6 / (download) - annotate - [select for diffs], Wed Dec 8 12:30:17 1999 UTC (24 years, 5 months ago) by itojun
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0, OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.5: +4 -4 lines
Diff to previous 1.5 (colored)

add IPv6 support from KAME.  cleanup type matches with printf() format.
KAME_SCOPEID should be enabled after KAME get{addr,name}info(3) merge.

Revision 1.5 / (download) - annotate - [select for diffs], Sun Jun 29 21:46:06 1997 UTC (26 years, 10 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.4: +11 -9 lines
Diff to previous 1.4 (colored)

Use correct spacing on both 32bit and 64bit machines.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Jun 29 20:52:42 1997 UTC (26 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.3: +4 -4 lines
Diff to previous 1.3 (colored)

Make fields line up nicely for 64-bit addresses.  Should probably #if
some things based on sizeof(long).

Revision 1.3 / (download) - annotate - [select for diffs], Sun Jun 29 20:18:04 1997 UTC (26 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored)

Mostly clean -Wall + 64bit issues.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 26 05:37:26 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1, OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored)

rcsid

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:45:51 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:45:51 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.