OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.110 / (download) - annotate - [select for diffs], Tue Nov 14 10:31:22 2023 UTC (6 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.109: +2 -1 lines
Diff to previous 1.109 (colored)

This code depends on internals from net/art.h so include it explicitly.
OK bluhm@

Revision 1.109 / (download) - annotate - [select for diffs], Tue Jun 28 15:17:23 2022 UTC (22 months, 3 weeks ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.108: +2 -2 lines
Diff to previous 1.108 (colored)

Adapt netstat kvm code to ref count change in struct rtentry.
found by otto@ the hard way

Revision 1.108 / (download) - annotate - [select for diffs], Sun Dec 5 22:36:19 2021 UTC (2 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.107: +1 -2 lines
Diff to previous 1.107 (colored)

sys/select.h is not needed, if howmany/NBBY are needed they will arrive
via netinet/in.h and sys/time.h, which I must say surprises me a bit

Revision 1.107 / (download) - annotate - [select for diffs], Wed Mar 17 09:03:51 2021 UTC (3 years, 2 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.106: +3 -1 lines
Diff to previous 1.106 (colored)

Netstat wants to access kernel internal structures for the kvm walker of
the routing table.  Define _KERNEL around the net/route.h include.
OK florian@

Revision 1.106 / (download) - annotate - [select for diffs], Tue Dec 29 19:51:52 2020 UTC (3 years, 4 months ago) by benno
Branch: MAIN
Changes since 1.105: +3 -2 lines
Diff to previous 1.105 (colored)

getifaddrs() can return entries where ifa_addr is NULL. Check for this
before accessing anything in ifa_addr.
ok claudio@

Revision 1.105 / (download) - annotate - [select for diffs], Fri Jun 12 06:22:32 2020 UTC (3 years, 11 months ago) by remi
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.104: +73 -1 lines
Diff to previous 1.104 (colored)

Add -R to show a summary of rdomains with associated interfaces and tables.

My first version also displayed the number of routes per table. But
duming all routing tables to count the entries in userland is expensive.
Once the kernel can export these counters the numbers can be added to the
output of -R.

OK benno@ previous version
OK sthen@

Revision 1.104 / (download) - annotate - [select for diffs], Fri Jun 28 13:35:02 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.103: +2 -2 lines
Diff to previous 1.103 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.103 / (download) - annotate - [select for diffs], Fri May 10 01:29:31 2019 UTC (5 years ago) by guenther
Branch: MAIN
Changes since 1.102: +1 -2 lines
Diff to previous 1.102 (colored)

Delete superfluous #includes of <ifaddrs.h>, <net/if_dl.h>, and <net/if_enc.h>

ok krw@, jsg@

Revision 1.102 / (download) - annotate - [select for diffs], Sun Apr 28 17:59:51 2019 UTC (5 years ago) by mpi
Branch: MAIN
Changes since 1.101: +168 -158 lines
Diff to previous 1.101 (colored)

Fix reading route entries via kvm(3).

From Naoki Fukaumi, ok yasuoka@, sthen@

Revision 1.101 / (download) - annotate - [select for diffs], Thu Sep 15 01:01:07 2016 UTC (7 years, 8 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.100: +1 -3 lines
Diff to previous 1.100 (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.100 / (download) - annotate - [select for diffs], Sat Aug 27 04:13:43 2016 UTC (7 years, 8 months ago) by guenther
Branch: MAIN
Changes since 1.99: +2 -1 lines
Diff to previous 1.99 (colored)

Pull in <sys/select.h> for howmany() and NBBY, used by various net*/*.h

ok deraadt@

Revision 1.99 / (download) - annotate - [select for diffs], Thu Dec 3 15:42:07 2015 UTC (8 years, 5 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.98: +3 -9 lines
Diff to previous 1.98 (colored)

Print the interface index, we no longer have a pointer to the interface.

Found the hardway by deraadt@

Revision 1.98 / (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_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.97: +9 -14 lines
Diff to previous 1.97 (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.97 / (download) - annotate - [select for diffs], Fri Feb 6 03:22:00 2015 UTC (9 years, 3 months ago) by reyk
Branch: MAIN
Changes since 1.96: +2 -135 lines
Diff to previous 1.96 (colored)

Remove route/netstat -f encap in favor of ipsecctl -s flow.

OK deraadt@

Revision 1.96 / (download) - annotate - [select for diffs], Mon Jan 19 16:49:04 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.95: +2 -2 lines
Diff to previous 1.95 (colored)

First step of hiding many kernel-only parts of <netinet/ip_ipsp.h>
under _KERNEL, and adjust the one consumer (netstat) so that it requests
the exposure.  Will take a few more rounds to get this right.
ok mikeb

Revision 1.95 / (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.94: +2 -2 lines
Diff to previous 1.94 (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.94 / (download) - annotate - [select for diffs], Fri Dec 26 05:47:23 2014 UTC (9 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.93: +1 -5 lines
Diff to previous 1.93 (colored)

not necessary to define INET anymore

Revision 1.93 / (download) - annotate - [select for diffs], Mon Nov 25 12:48:39 2013 UTC (10 years, 5 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.92: +6 -5 lines
Diff to previous 1.92 (colored)

netstat -Ar leaked some kernel pointers to unprivileged users.  Use
hideroot to show them only to root.
OK deraadt@

Revision 1.92 / (download) - annotate - [select for diffs], Thu Nov 21 17:32:13 2013 UTC (10 years, 5 months ago) by mikeb
Branch: MAIN
Changes since 1.91: +2 -1 lines
Diff to previous 1.91 (colored)

split kernel parts of the if.h into a separate header file if_var.h
which allows us to modify ifnet structure in a relatively safe way;
discussed with deraadt, ok mpi

Revision 1.91 / (download) - annotate - [select for diffs], Sun Sep 29 10:45:40 2013 UTC (10 years, 7 months ago) by bluhm
Branch: MAIN
Changes since 1.90: +3 -3 lines
Diff to previous 1.90 (colored)

Prepare netstat for printing 64 bit route expire time.
OK claudio@

Revision 1.90 / (download) - annotate - [select for diffs], Wed Mar 20 15:23:37 2013 UTC (11 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.89: +9 -6 lines
Diff to previous 1.89 (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.89 / (download) - annotate - [select for diffs], Wed Jan 16 10:53:14 2013 UTC (11 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.88: +1 -2 lines
Diff to previous 1.88 (colored)

sys/mbuf.h not needed

Revision 1.88 / (download) - annotate - [select for diffs], Wed Apr 6 11:36:26 2011 UTC (13 years, 1 month ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.87: +3 -3 lines
Diff to previous 1.87 (colored)

Avoid using NULL in non-pointer contexts: use 0 for integer values and '\0'
for chars.

Revision 1.87 / (download) - annotate - [select for diffs], Tue Aug 4 03:45:47 2009 UTC (14 years, 9 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.86: +2 -2 lines
Diff to previous 1.86 (colored)

fix some warnings.  there are others, but nobody wants to look at them.
ok deraadt

Revision 1.86 / (download) - annotate - [select for diffs], Sun May 31 18:03:42 2009 UTC (14 years, 11 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.85: +2 -2 lines
Diff to previous 1.85 (colored)

There is no need to mask priority with RTP_MASK because it is already done
by the kernel.

Revision 1.85 / (download) - annotate - [select for diffs], Thu May 7 15:51:53 2009 UTC (15 years ago) by claudio
Branch: MAIN
Changes since 1.84: +8 -3 lines
Diff to previous 1.84 (colored)

Make the kvm routing table code grok multiple routing tables and do not
default to table 0 by default. Makes debugging alternate tables possible.
OK jsg@

Revision 1.84 / (download) - annotate - [select for diffs], Wed Jan 28 17:19:47 2009 UTC (15 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.83: +2 -2 lines
Diff to previous 1.83 (colored)

Make the -A a bit more readable by adding a newline between the route and
mk list.

Revision 1.83 / (download) - annotate - [select for diffs], Sun Nov 9 23:00:56 2008 UTC (15 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.82: +18 -20 lines
Diff to previous 1.82 (colored)

the extra kget() macro just befuddles the things we need to replace with a sysctl mechanism later

Revision 1.82 / (download) - annotate - [select for diffs], Mon Sep 15 20:13:10 2008 UTC (15 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.81: +2 -2 lines
Diff to previous 1.81 (colored)

Similar to route(8) change mask rtm->rtm_priority with RTP_MASK to show
correct values. OK henning@

Revision 1.81 / (download) - annotate - [select for diffs], Fri Jun 13 21:44:32 2008 UTC (15 years, 11 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.80: +9 -4 lines
Diff to previous 1.80 (colored)

Include some additional pointers, etc that I really need for debugging
nasty routing table issues. Mainly the pointer to the previous node.
OK henning@

Revision 1.80 / (download) - annotate - [select for diffs], Fri Jun 13 05:59:05 2008 UTC (15 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.79: +2 -2 lines
Diff to previous 1.79 (colored)

remove a rather silly comment.

Revision 1.79 / (download) - annotate - [select for diffs], Fri Jun 13 05:57:50 2008 UTC (15 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.78: +5 -4 lines
Diff to previous 1.78 (colored)

Let the kvm output of netstat grok rt priorities like the "normal" show code.

Revision 1.78 / (download) - annotate - [select for diffs], Wed Dec 19 08:49:23 2007 UTC (16 years, 5 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.77: +14 -20 lines
Diff to previous 1.77 (colored)

Remove the kvm code in rt_stats() and use the sysctl code all the time.
While there remove the ugly rflag checks and make it more consistent with
the rest of the code. Another step in making netstat setgid free.
OK deraadt@

Revision 1.77 / (download) - annotate - [select for diffs], Wed Dec 19 01:47:00 2007 UTC (16 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.76: +1 -9 lines
Diff to previous 1.76 (colored)

delete rcsid crud

Revision 1.76 / (download) - annotate - [select for diffs], Fri Dec 14 18:35:46 2007 UTC (16 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.75: +3 -8 lines
Diff to previous 1.75 (colored)

remove 21 nlist variables, and instead use sysctl to query the kernel
turn on INET6 the default (remove the #ifdef's)
ok claudio reyk

Revision 1.75 / (download) - annotate - [select for diffs], Wed Sep 5 20:29:05 2007 UTC (16 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.74: +4 -4 lines
Diff to previous 1.74 (colored)

Correct the format strings after the recent rt_metrics changes.
rmx_pksent is not u_int64_t all others are just u_int.

Revision 1.74 / (download) - annotate - [select for diffs], Fri Nov 17 01:11:23 2006 UTC (17 years, 6 months ago) by itojun
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.73: +10 -6 lines
Diff to previous 1.73 (colored)

change semantics of ff01::/16 to interface local multicast
(to sync up with more recent IPv6 spec)

ok from: deraadt mcbride

Revision 1.73 / (download) - annotate - [select for diffs], Tue Aug 29 21:51:13 2006 UTC (17 years, 8 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.72: +39 -12 lines
Diff to previous 1.72 (colored)

Fix KVM snooping code of netstat that got broken by the multiple table
"support". This makes netstat -A work again. OK markus@ henning@

Revision 1.72 / (download) - annotate - [select for diffs], Sat May 27 19:16:37 2006 UTC (17 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.71: +50 -647 lines
Diff to previous 1.71 (colored)

Moving netstat from kvm snooping to retrieving the routing tables via
sysctl. Most code is stolen from route -- which was stolen from netstat.
kvm snooping code is still in and useable. Put it in deraadt@ henning@

Revision 1.71 / (download) - annotate - [select for diffs], Wed Apr 12 09:24:44 2006 UTC (18 years, 1 month ago) by hshoexer
Branch: MAIN
Changes since 1.70: +3 -3 lines
Diff to previous 1.70 (colored)

use "/bypass" instead of "/permit" when showing bypass flows

ok henning claudio

Revision 1.70 / (download) - annotate - [select for diffs], Wed Jun 8 04:47:04 2005 UTC (18 years, 11 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.69: +2 -80 lines
Diff to previous 1.69 (colored)

bye bye, Xerox NS protocols

Revision 1.69 / (download) - annotate - [select for diffs], Tue Jun 7 00:53:25 2005 UTC (18 years, 11 months ago) by henning
Branch: MAIN
Changes since 1.68: +2 -5 lines
Diff to previous 1.68 (colored)

remove tiny AF_CCITT trace

Revision 1.68 / (download) - annotate - [select for diffs], Wed Mar 30 08:23:47 2005 UTC (19 years, 1 month ago) by jaredy
Branch: MAIN
Changes since 1.67: +4 -30 lines
Diff to previous 1.67 (colored)

kill -S; ok henning

Revision 1.67 / (download) - annotate - [select for diffs], Fri Mar 25 17:01:04 2005 UTC (19 years, 1 month ago) by jaredy
Branch: MAIN
Changes since 1.66: +5 -5 lines
Diff to previous 1.66 (colored)

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

Revision 1.66 / (download) - annotate - [select for diffs], Wed Nov 17 01:47:20 2004 UTC (19 years, 6 months ago) by itojun
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.65: +3 -10 lines
Diff to previous 1.65 (colored)

remove NI_WITHSCOPEID (which is not standard)

Revision 1.65 / (download) - annotate - [select for diffs], Fri Oct 15 20:16:12 2004 UTC (19 years, 7 months ago) by henning
Branch: MAIN
Changes since 1.64: +4 -6 lines
Diff to previous 1.64 (colored)

the default route is exactly 0.0.0.0/0, and nothing else. stop ignoring
the netmask, do not print a 0.0.0.0/32 route as "default"; it is not. neither
is 0.0.0.0/24.

Revision 1.64 / (download) - annotate - [select for diffs], Sun Jun 6 16:55:31 2004 UTC (19 years, 11 months ago) by cedric
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.63: +31 -5 lines
Diff to previous 1.63 (colored)

Add new '-S' flag to display the source selector part of the routing table
entry. "netstat -nrSf inet". ok deraadt@ mcbride@

Revision 1.63 / (download) - annotate - [select for diffs], Tue May 4 22:50:18 2004 UTC (20 years ago) by claudio
Branch: MAIN
Changes since 1.62: +5 -19 lines
Diff to previous 1.62 (colored)

The tcp specific routing metrics are almost never used so reduce the routing
table from these metrics. struct rt_msghdr used by the routing socket is not
affected and so most userland apps don't need to be changed.
some man page polishing by jmc@
OK henning@ markus@ theo@

Revision 1.62 / (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_5_BASE, OPENBSD_3_5
Changes since 1.61: +6 -6 lines
Diff to previous 1.61 (colored)

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

Revision 1.61 / (download) - annotate - [select for diffs], Tue Jan 13 20:03:28 2004 UTC (20 years, 4 months ago) by otto
Branch: MAIN
Changes since 1.60: +3 -2 lines
Diff to previous 1.60 (colored)

Fix printf formats and add missing include.

ok mcbride@ deraadt@

Revision 1.60 / (download) - annotate - [select for diffs], Tue Oct 7 19:48:07 2003 UTC (20 years, 7 months ago) by tedu
Branch: MAIN
Changes since 1.59: +3 -2 lines
Diff to previous 1.59 (colored)

missing free().  Andrey Matveev via deraadt@. ok deraadt@

Revision 1.59 / (download) - annotate - [select for diffs], Sat Oct 4 23:15:06 2003 UTC (20 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.58: +3 -3 lines
Diff to previous 1.58 (colored)

oops

Revision 1.58 / (download) - annotate - [select for diffs], Sat Oct 4 21:18:57 2003 UTC (20 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.57: +4 -7 lines
Diff to previous 1.57 (colored)

tweaks from andrushock@korovino.net

Revision 1.57 / (download) - annotate - [select for diffs], Fri Oct 3 21:22:32 2003 UTC (20 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.56: +38 -2 lines
Diff to previous 1.56 (colored)

deal with KAME embedded scope-id for PF_KEY (Encap) route dump.  deraadt ok

Revision 1.56 / (download) - annotate - [select for diffs], Wed Aug 27 00:33:33 2003 UTC (20 years, 8 months ago) by henric
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.55: +3 -5 lines
Diff to previous 1.55 (colored)

RNF_IGNORE can corrupt the radix tree when an interface is down, it
makes routing lookups slightly more expensive, and serves no useful
purpose.

ok itojun@ tedu@

Revision 1.55 / (download) - annotate - [select for diffs], Tue Aug 26 08:33:12 2003 UTC (20 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.54: +4 -3 lines
Diff to previous 1.54 (colored)

mark cloned route with RTF_CLONED.  remove RTF_CLONED route when clone parent
disappers.  deraadt ok

Revision 1.54 / (download) - annotate - [select for diffs], Thu Jun 26 21:59:11 2003 UTC (20 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.53: +4 -4 lines
Diff to previous 1.53 (colored)

more proto fixes

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

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

Revision 1.52 / (download) - annotate - [select for diffs], Wed May 14 23:37:05 2003 UTC (21 years ago) by itojun
Branch: MAIN
Changes since 1.51: +4 -4 lines
Diff to previous 1.51 (colored)

use __KAME__ to determine kame-based kernel.

Revision 1.51 / (download) - annotate - [select for diffs], Wed Feb 12 14:41:08 2003 UTC (21 years, 3 months ago) by jason
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.50: +4 -2 lines
Diff to previous 1.50 (colored)

Remove commons; inspired by netbsd.

Revision 1.50 / (download) - annotate - [select for diffs], Sat Feb 1 01:51:31 2003 UTC (21 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.49: +26 -50 lines
Diff to previous 1.49 (colored)

ansi

Revision 1.49 / (download) - annotate - [select for diffs], Mon Sep 23 17:48:46 2002 UTC (21 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.48: +36 -3 lines
Diff to previous 1.48 (colored)

correctly dump radix_node; henric@attbi.com

Revision 1.48 / (download) - annotate - [select for diffs], Thu Sep 19 16:22:33 2002 UTC (21 years, 8 months ago) by ho
Branch: MAIN
Changes since 1.47: +6 -4 lines
Diff to previous 1.47 (colored)

Don't print garbage when getnameinfo fails. henning@ ok.

Revision 1.47 / (download) - annotate - [select for diffs], Thu Jul 25 03:58:56 2002 UTC (21 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.46: +10 -11 lines
Diff to previous 1.46 (colored)

handle < 0 and such better

Revision 1.46 / (download) - annotate - [select for diffs], Mon May 27 01:50:36 2002 UTC (21 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.45: +121 -127 lines
Diff to previous 1.45 (colored)

a night of cleanup, so i can read this easier

Revision 1.45 / (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_1_BASE, OPENBSD_3_1
Changes since 1.44: +11 -11 lines
Diff to previous 1.44 (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.44 / (download) - annotate - [select for diffs], Thu Jan 17 21:34:58 2002 UTC (22 years, 4 months ago) by mickey
Branch: MAIN
Changes since 1.43: +79 -79 lines
Diff to previous 1.43 (colored)

evil, annoying spaces and tabs

Revision 1.43 / (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.42: +28 -27 lines
Diff to previous 1.42 (colored)

kill more registers

millert@ ok

Revision 1.42 / (download) - annotate - [select for diffs], Tue Oct 9 09:21:10 2001 UTC (22 years, 7 months ago) by brian
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.41: +3 -3 lines
Diff to previous 1.41 (colored)

Don't assume that the RTF_HOST flag implies that a netmask is available.

Revision 1.41 / (download) - annotate - [select for diffs], Sat Aug 18 22:14:03 2001 UTC (22 years, 9 months ago) by brian
Branch: MAIN
Changes since 1.40: +11 -6 lines
Diff to previous 1.40 (colored)

Handle snprintf returning -1

Revision 1.40 / (download) - annotate - [select for diffs], Mon Jun 25 00:41:39 2001 UTC (22 years, 11 months ago) by niklas
Branch: MAIN
Changes since 1.39: +3 -2 lines
Diff to previous 1.39 (colored)

Show a "3" in -r output if RTF_PROTO3 is set; ok itojun@ and millert@

Revision 1.39 / (download) - annotate - [select for diffs], Mon Dec 11 17:33:07 2000 UTC (23 years, 5 months ago) by provos
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.38: +21 -2 lines
Diff to previous 1.38 (colored)

show when pmtu is disabled on routes, more information when verbose,
from NetBSD

Revision 1.38 / (download) - annotate - [select for diffs], Tue Sep 19 03:18:46 2000 UTC (23 years, 8 months ago) by angelos
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.37: +59 -14 lines
Diff to previous 1.37 (colored)

Display SPD entries.

Revision 1.37 / (download) - annotate - [select for diffs], Thu May 18 01:32:12 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.36: +8 -4 lines
Diff to previous 1.36 (colored)

check getnameinfo error proprely.  this can be visited on printing
radix_mask on netstat -rnAv (actually, I think it's a bad idea to
use p_sockaddr for printing mask portion in radix_mask, since address
family is not properly filled)

Revision 1.36 / (download) - annotate - [select for diffs], Thu May 18 01:20:48 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.35: +57 -54 lines
Diff to previous 1.35 (colored)

allow mask == NULL in netname6.

Revision 1.35 / (download) - annotate - [select for diffs], Sat Feb 5 18:46:50 2000 UTC (24 years, 3 months ago) by itojun
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.34: +14 -9 lines
Diff to previous 1.34 (colored)

fix -in printing on IPv6 (network portion was not masked properly).
enable scopeid for -in.
don't truncate output on -inv.

Revision 1.34 / (download) - annotate - [select for diffs], Fri Jan 14 19:59:18 2000 UTC (24 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.33: +3 -2 lines
Diff to previous 1.33 (colored)

show blackhole flag; ura@hiru.aoba.yokohama.jp

Revision 1.33 / (download) - annotate - [select for diffs], Sun Jan 9 22:57:37 2000 UTC (24 years, 4 months ago) by angelos
Branch: MAIN
Changes since 1.32: +6 -6 lines
Diff to previous 1.32 (colored)

Transport protocol ports are in network order.

Revision 1.32 / (download) - annotate - [select for diffs], Mon Dec 20 06:24:49 1999 UTC (24 years, 5 months ago) by angelos
Branch: MAIN
Changes since 1.31: +4 -4 lines
Diff to previous 1.31 (colored)

Oops, forgot ports/protocol numbers.

Revision 1.31 / (download) - annotate - [select for diffs], Mon Dec 20 06:17:20 1999 UTC (24 years, 5 months ago) by angelos
Branch: MAIN
Changes since 1.30: +55 -12 lines
Diff to previous 1.30 (colored)

Correctly print IPv6 addresses in IPsec flows.

Revision 1.30 / (download) - annotate - [select for diffs], Wed Dec 8 12:30:17 1999 UTC (24 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.29: +176 -17 lines
Diff to previous 1.29 (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.29 / (download) - annotate - [select for diffs], Wed Sep 22 05:10:04 1999 UTC (24 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.28: +9 -5 lines
Diff to previous 1.28 (colored)

routing interface sends aligned to long word boundaries; itojun

Revision 1.28 / (download) - annotate - [select for diffs], Sat Jun 26 21:21:46 1999 UTC (24 years, 10 months ago) by ho
Branch: MAIN
Changes since 1.27: +12 -23 lines
Diff to previous 1.27 (colored)

Use a.b.c.d/nn syntax for encap route output.

Revision 1.27 / (download) - annotate - [select for diffs], Mon Mar 15 15:59:08 1999 UTC (25 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5
Changes since 1.26: +5 -5 lines
Diff to previous 1.26 (colored)

print subnets containing 0 octets correctly; peter

Revision 1.26 / (download) - annotate - [select for diffs], Wed Feb 24 22:57:35 1999 UTC (25 years, 2 months ago) by angelos
Branch: MAIN
Changes since 1.25: +8 -7 lines
Diff to previous 1.25 (colored)

Grok protocol/address family PF_KEY.

Revision 1.25 / (download) - annotate - [select for diffs], Tue Jun 23 22:40:40 1998 UTC (25 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.24: +21 -7 lines
Diff to previous 1.24 (colored)

Fix snprintf return value usage.

Revision 1.24 / (download) - annotate - [select for diffs], Mon May 18 19:03:29 1998 UTC (26 years ago) by deraadt
Branch: MAIN
Changes since 1.23: +6 -6 lines
Diff to previous 1.23 (colored)

you want MAXHOSTNAMELEN, not MAXHOSTNAMELEN+1

Revision 1.23 / (download) - annotate - [select for diffs], Fri Feb 27 12:07:40 1998 UTC (26 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.22: +28 -23 lines
Diff to previous 1.22 (colored)

oflow paranoia

Revision 1.22 / (download) - annotate - [select for diffs], Thu Feb 26 10:13:08 1998 UTC (26 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.21: +8 -6 lines
Diff to previous 1.21 (colored)

strncpy sanitization

Revision 1.21 / (download) - annotate - [select for diffs], Thu Feb 26 10:06:13 1998 UTC (26 years, 2 months ago) by peter
Branch: MAIN
Changes since 1.20: +33 -50 lines
Diff to previous 1.20 (colored)

* netstat -r [-n] now prints netmasks for network routes (in XXX/24 format).

* beginnings of a -v (verbose) option.

Revision 1.20 / (download) - annotate - [select for diffs], Mon Jul 28 18:56:03 1997 UTC (26 years, 9 months ago) by kstailey
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

line up headers when showing route table

Revision 1.19 / (download) - annotate - [select for diffs], Fri Jul 25 04:29:00 1997 UTC (26 years, 10 months ago) by mickey
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored)

make CIA fit
make interface names fit

Revision 1.18 / (download) - annotate - [select for diffs], Wed Jul 23 04:38:34 1997 UTC (26 years, 10 months ago) by denny
Branch: MAIN
Changes since 1.17: +13 -2 lines
Diff to previous 1.17 (colored)

Add AppleTalk support. TODO: route.c does not handle netranges.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Jul 14 00:34:27 1997 UTC (26 years, 10 months ago) by angelos
Branch: MAIN
Changes since 1.16: +8 -8 lines
Diff to previous 1.16 (colored)

Adjusted the spaces a bit.

Revision 1.16 / (download) - annotate - [select for diffs], Sun Jul 13 23:02:42 1997 UTC (26 years, 10 months ago) by angelos
Branch: MAIN
Changes since 1.15: +26 -13 lines
Diff to previous 1.15 (colored)

Show the new field in the encap sockaddrs.

Revision 1.15 / (download) - annotate - [select for diffs], Sun Jun 29 21:46:06 1997 UTC (26 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.14: +5 -4 lines
Diff to previous 1.14 (colored)

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

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

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

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

Mostly clean -Wall + 64bit issues.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Jun 29 08:45:23 1997 UTC (26 years, 10 months ago) by provos
Branch: MAIN
Changes since 1.11: +7 -8 lines
Diff to previous 1.11 (colored)

leave out some fields for ipsp not any longer used in new encap

Revision 1.11 / (download) - annotate - [select for diffs], Tue Jun 24 03:53:01 1997 UTC (26 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.10: +5 -6 lines
Diff to previous 1.10 (colored)

64bit fixes similar to some in sbin/route/route.c

Revision 1.10 / (download) - annotate - [select for diffs], Wed Jun 18 01:58:32 1997 UTC (26 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.9: +42 -37 lines
Diff to previous 1.9 (colored)

indent

Revision 1.9 / (download) - annotate - [select for diffs], Wed Jun 18 01:52:27 1997 UTC (26 years, 11 months ago) by angelos
Branch: MAIN
Changes since 1.8: +64 -8 lines
Diff to previous 1.8 (colored)

Be a bit more verbose for AF_ENCAP "routing" entries.

Revision 1.8 / (download) - annotate - [select for diffs], Sat Jan 25 23:26:42 1997 UTC (27 years, 3 months ago) by tholo
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.7: +27 -24 lines
Diff to previous 1.7 (colored)

Attempt to give the entire passed address to getnetbyaddr() before starting
to try various network masks

Revision 1.7 / (download) - annotate - [select for diffs], Fri Jan 17 07:13:00 1997 UTC (27 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.6: +4 -4 lines
Diff to previous 1.6 (colored)

r?index -> strr?chr

Revision 1.6 / (download) - annotate - [select for diffs], Fri Oct 25 10:50:52 1996 UTC (27 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

fix a freak of misalignment

Revision 1.5 / (download) - annotate - [select for diffs], Fri Aug 16 09:29:34 1996 UTC (27 years, 9 months ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.4: +78 -2 lines
Diff to previous 1.4 (colored)

ipx.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Aug 6 18:35:09 1996 UTC (27 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.3: +10 -5 lines
Diff to previous 1.3 (colored)

no oflow in case of really bizzare routing tables

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

rcsid

Revision 1.2 / (download) - annotate - [select for diffs], Fri May 10 13:02:36 1996 UTC (28 years ago) by deraadt
Branch: MAIN
Changes since 1.1: +3 -5 lines
Diff to previous 1.1 (colored)

if_name/if_unit -> if_xname/if_softc
network list is a TAILQ

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.