summaryrefslogtreecommitdiffstats
path: root/sys/net/rtsock.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-10-09 04:06:28 +0000
committerbde <bde@FreeBSD.org>1995-10-09 04:06:28 +0000
commitf6872ed68c5f59797d857340755b0ab9ef61135e (patch)
tree5167cfcee49ff50f07ccc49def9b8255b90330b9 /sys/net/rtsock.c
parent7ccaf92915eccadae0025ce9ac0a5719c13b0e21 (diff)
downloadFreeBSD-src-f6872ed68c5f59797d857340755b0ab9ef61135e.zip
FreeBSD-src-f6872ed68c5f59797d857340755b0ab9ef61135e.tar.gz
Fix types of sysctl functions. Add prototypes. Cosmetic.
Diffstat (limited to 'sys/net/rtsock.c')
-rw-r--r--sys/net/rtsock.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index 7e65578..fe28cf9 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)rtsock.c 8.5 (Berkeley) 11/2/94
- * $Id: rtsock.c,v 1.12 1995/05/15 22:57:53 davidg Exp $
+ * $Id: rtsock.c,v 1.13 1995/05/30 08:08:31 rgrimes Exp $
*/
#include <sys/param.h>
@@ -62,6 +62,10 @@ static struct mbuf *
static int rt_msg2 __P((int,
struct rt_addrinfo *, caddr_t, struct walkarg *));
static void rt_xaddrs __P((caddr_t, caddr_t, struct rt_addrinfo *));
+extern int sysctl_dumpentry __P((struct radix_node *rn, void *vw));
+extern int sysctl_iflist __P((int af, struct walkarg *w));
+extern int sysctl_rtable __P((int *name, u_int namelen, void* where,
+ size_t *given, void *new, size_t newlen));
/* Sleazy use of local variables throughout file, warning!!!! */
#define dst info.rti_info[RTAX_DST]
@@ -629,10 +633,11 @@ rt_newaddrmsg(cmd, ifa, error, rt)
* This is used in dumping the kernel table via sysctl().
*/
int
-sysctl_dumpentry(rn, w)
+sysctl_dumpentry(rn, vw)
struct radix_node *rn;
- register struct walkarg *w;
+ void *vw;
{
+ register struct walkarg *w = vw;
register struct rtentry *rt = (struct rtentry *)rn;
int error = 0, size;
struct rt_addrinfo info;
@@ -723,10 +728,10 @@ sysctl_iflist(af, w)
int
sysctl_rtable(name, namelen, where, given, new, newlen)
int *name;
- int namelen;
- caddr_t where;
+ u_int namelen;
+ void *where;
size_t *given;
- caddr_t *new;
+ void *new;
size_t newlen;
{
register struct radix_node_head *rnh;
@@ -766,7 +771,7 @@ sysctl_rtable(name, namelen, where, given, new, newlen)
free(w.w_tmem, M_RTABLE);
w.w_needed += w.w_given;
if (where) {
- *given = w.w_where - where;
+ *given = w.w_where - (caddr_t)where;
if (*given < w.w_needed)
return (ENOMEM);
} else {
OpenPOWER on IntegriCloud