Commit Graph

43 Commits

Author SHA1 Message Date
pooka 0f2034ae5e Make it possible to register delayed radix tree head inits which
will be processed when the radix "subsystem" is initialized -- all
users must be attached before any inits to know the max keylength.
Use of link sets is no longer required, and only attached domains
need to be considered.
2009-05-27 17:46:49 +00:00
cegger d3189d3544 ansify function definitions 2009-03-15 20:30:05 +00:00
dsl 454af1c0e8 Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
2009-03-14 15:35:58 +00:00
pooka c6e7028d1c Make dom_maxrtkey of inet/inet6domain the size of the ip_encap pack
structures.  This is far from optimal, but gets rid of iffy
#ifdef INET in radix.c.  The radix bonsai still needs lots of love
before loading domains dynamically is possible...
2008-11-25 18:28:05 +00:00
dyoung b9b961f930 Use memset, memmove, and memcmp instead of Bzero, Bcopy, and Bcmp,
respectively.
2008-05-11 20:14:41 +00:00
dyoung 690f9353c0 Cosmetic: KNF. Shorten a staircase. 2007-07-12 04:28:59 +00:00
dyoung 911c7b0317 Cosmetic: KNF. 2007-07-11 00:53:14 +00:00
dyoung cb3da2abc3 Remove unnecessary __UNCONST(). 2007-06-13 05:08:02 +00:00
dyoung 95edb940c2 Get rid of radix_node_head.rnh_walktree, because it is only ever
set to rn_walktree.

Introduce rt_walktree(), which applies a subroutine to every route
in a particular address family.  Use it instead of rn_walktree()
virtually everywhere.  This helps to hide the routing table
implementation.
2007-06-09 03:07:21 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
dyoung 7cfeb3c2ed Clean this code up some.
Extract subroutine rn_delete1() to ease RADIX_MPATH integration,
should we ever do that.

Remove RN_DEBUG code that does not compile.

Join some lines of the type

        type var1;
        type var2;
        type var3;

making

        type var1, var2, var3.

Break lines of the type if (expr) stmt1; else stmt2; so that normal
people can read them.
2007-02-17 07:46:38 +00:00
dyoung e45f67b8b4 Extract subroutines rn_walkfirst() and rn_walknext() from rn_walktree().
No functional change intended.

Add some new diagnostic code, bracketed by #ifdef RN_DEBUG, that
uses the two new subroutines to walk and print a tree.

XXX The format of the diagnostic print-outs needs improvement.
2006-12-04 01:45:50 +00:00
wiz 1ad8067cb3 Fix typos, reported by Alexey Dobriyan ("Gathered from Linux"),
forwarded by jmc@openbsd.
2006-02-25 00:58:34 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
christos 333e176687 - sprinkle const
- remove unneeded casts
- use more mem*() instead of b*() funcs.
2005-05-29 21:22:52 +00:00
perry f07677dd81 nuke trailing whitespace 2005-02-26 22:45:09 +00:00
enami f1b6d58e81 To fix bad pointer dereference on start up when gif is used,
- Allow rn_init() to be called multiple times, but do nothing except the
  first call.
- Include opt_inet.h so that #ifdef INET works.
- Call rn_init() from encap_init() explicitly rather than depending on the
  order of initialization.
2005-01-24 04:46:49 +00:00
matt d341be30f4 Change initialzie of domains to use link sets. Switch to using STAILQ.
Add a convenience macro DOMAIN_FOREACH to interate through the domain.
2005-01-23 18:41:56 +00:00
christos 64573a67d7 Sprinkle #ifdef INET to make a GENERIC kernel compile with INET undefined. 2004-12-06 02:59:23 +00:00
itojun 682ddb0274 initialize max_keylen for ip_encap.c earlier 2004-08-17 07:05:34 +00:00
matt 7cf8938ddd ANSI-fy and some additional de-__P and constification. 2004-04-21 21:03:43 +00:00
christos fced18d9f6 fix constification botch. (hi gimpy) 2004-04-21 15:51:22 +00:00
matt e3b919c754 Constify if.c radix.c and route.c (and fix related fallout). 2004-04-21 04:17:28 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
thorpej d6f8cc841d Avoid strict-alias warnings. 2002-11-25 01:55:21 +00:00
lukem 34d65a3414 add RCSIDs 2001-11-12 23:49:33 +00:00
itojun ea2d93c355 fix indentation 2001-01-10 01:16:59 +00:00
enami 0e081e1b48 Missing newline in log messsage. 2001-01-04 00:17:52 +00:00
itojun 60fa2b29af fix typo in function name (rn_satsifies_leaf -> satisfies). indent.
split rn_inithead() into two function - i'm putting some hook around here.
2000-12-17 10:23:19 +00:00
augustss c1ebd1929a Kill some more register declarations. 2000-03-30 09:45:33 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
christos 964633009c Sync with Lite2. 1997-04-02 21:17:28 +00:00
christos 0706109fa5 - fix misparenthesized ((a&(B|C) == 0))
- fix printf format arguments
1996-03-16 23:55:36 +00:00
christos 206e75c6f1 Net prototypes 1996-02-13 21:59:53 +00:00
mycroft 0181b81de4 Newer version from CSRG. 1995-05-17 15:50:06 +00:00
jtc db0046c14d KERNEL -> _KERNEL 1995-03-28 19:59:56 +00:00
cgd cf92afd66e New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:29:24 +00:00
mycroft 07b4f2ab54 Update to 4.4-Lite networking code, with a few local changes. 1994-05-13 06:02:48 +00:00
glass f5cea46e83 put declarations in argument order 1994-03-14 07:46:05 +00:00
mycroft 95b048b53a Canonicalize all #includes. 1993-12-18 00:40:47 +00:00
jtc f7b7d95850 include systm.h to get prototypes (and possibly inlines) of *max functions. 1993-09-04 00:00:19 +00:00
cgd a82018489a add rcs ids to everything, and clean up headers 1993-05-20 03:05:46 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00