Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/rtsold fix prototypes decls (already back-ported in...
details: https://anonhg.NetBSD.org/src/rev/1de4e039506d
branches: trunk
changeset: 476011:1de4e039506d
user: itojun <itojun%NetBSD.org@localhost>
date: Fri Sep 03 05:14:37 1999 +0000
description:
fix prototypes decls (already back-ported into KAME).
RCSID police.
diffstat:
usr.sbin/rtsold/Makefile | 13 +++++++++++++
usr.sbin/rtsold/if.c | 8 +++++---
usr.sbin/rtsold/probe.c | 7 ++++++-
usr.sbin/rtsold/rtsol.c | 2 ++
usr.sbin/rtsold/rtsold.8 | 3 ++-
usr.sbin/rtsold/rtsold.c | 33 +++++++++++++--------------------
usr.sbin/rtsold/rtsold.h | 33 ++++++++++++++++++++++++++-------
7 files changed, 67 insertions(+), 32 deletions(-)
diffs (197 lines):
diff -r 84facb74075e -r 1de4e039506d usr.sbin/rtsold/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.sbin/rtsold/Makefile Fri Sep 03 05:14:37 1999 +0000
@@ -0,0 +1,13 @@
+# $NetBSD: Makefile,v 1.1 1999/09/03 05:14:37 itojun Exp $
+
+PROG= rtsold
+SRCS= rtsold.c rtsol.c if.c probe.c
+
+CPPFLAGS+=-DINET6
+
+LDADD+= -lkvm
+DPADD+= ${LIBKVM}
+
+MAN= rtsold.8
+
+.include <bsd.prog.mk>
diff -r 84facb74075e -r 1de4e039506d usr.sbin/rtsold/if.c
--- a/usr.sbin/rtsold/if.c Fri Sep 03 04:56:06 1999 +0000
+++ b/usr.sbin/rtsold/if.c Fri Sep 03 05:14:37 1999 +0000
@@ -1,3 +1,5 @@
+/* $NetBSD: if.c,v 1.2 1999/09/03 05:14:37 itojun Exp $ */
+
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
@@ -71,9 +73,9 @@
static int ifsock;
-static int getifa(char *name, struct in6_ifaddr *ifap);
-static void get_rtaddrs(int addrs, struct sockaddr *sa,
- struct sockaddr **rti_info);
+static int getifa __P((char *name, struct in6_ifaddr *ifap));
+static void get_rtaddrs __P((int addrs, struct sockaddr *sa,
+ struct sockaddr **rti_info));
int
ifinit()
diff -r 84facb74075e -r 1de4e039506d usr.sbin/rtsold/probe.c
--- a/usr.sbin/rtsold/probe.c Fri Sep 03 04:56:06 1999 +0000
+++ b/usr.sbin/rtsold/probe.c Fri Sep 03 05:14:37 1999 +0000
@@ -1,3 +1,5 @@
+/* $NetBSD: probe.c,v 1.2 1999/09/03 05:14:37 itojun Exp $ */
+
/*
* Copyright (C) 1998 WIDE Project.
* All rights reserved.
@@ -40,6 +42,7 @@
#include <netinet/in.h>
#include <netinet6/in6_var.h>
+#include <netinet/icmp6.h>
#include <netinet6/nd6.h>
#include <arpa/inet.h>
@@ -49,10 +52,12 @@
#include <string.h>
#include <syslog.h>
+#include "rtsold.h"
+
static struct msghdr sndmhdr;
static struct iovec sndiov[2];
static int probesock;
-static void sendprobe(struct in6_addr *addr, int ifindex);
+static void sendprobe __P((struct in6_addr *addr, int ifindex));
int
probe_init()
diff -r 84facb74075e -r 1de4e039506d usr.sbin/rtsold/rtsol.c
--- a/usr.sbin/rtsold/rtsol.c Fri Sep 03 04:56:06 1999 +0000
+++ b/usr.sbin/rtsold/rtsol.c Fri Sep 03 05:14:37 1999 +0000
@@ -1,3 +1,5 @@
+/* $NetBSD: rtsol.c,v 1.2 1999/09/03 05:14:37 itojun Exp $ */
+
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
diff -r 84facb74075e -r 1de4e039506d usr.sbin/rtsold/rtsold.8
--- a/usr.sbin/rtsold/rtsold.8 Fri Sep 03 04:56:06 1999 +0000
+++ b/usr.sbin/rtsold/rtsold.8 Fri Sep 03 05:14:37 1999 +0000
@@ -25,11 +25,12 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
+.\" $NetBSD: rtsold.8,v 1.2 1999/09/03 05:14:37 itojun Exp $
.\" KAME Id: rtsold.8,v 1.3 1999/08/24 07:42:27 itojun Exp
.\"
.Dd May 17, 1998
.Dt RTSOLD 8
-.Os KAME
+.Os
.\"
.Sh NAME
.Nm rtsold
diff -r 84facb74075e -r 1de4e039506d usr.sbin/rtsold/rtsold.c
--- a/usr.sbin/rtsold/rtsold.c Fri Sep 03 04:56:06 1999 +0000
+++ b/usr.sbin/rtsold/rtsold.c Fri Sep 03 05:14:37 1999 +0000
@@ -1,3 +1,5 @@
+/* $NetBSD: rtsold.c,v 1.2 1999/09/03 05:14:37 itojun Exp $ */
+
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
@@ -74,26 +76,15 @@
/* static variables and functions */
static int mobile_node = 0;
-static int ifconfig(char *ifname);
-static int make_packet(struct ifinfo *ifinfo);
-static struct timeval *rtsol_check_timer();
-static void TIMEVAL_ADD(struct timeval *a, struct timeval *b,
- struct timeval *result);
-static void TIMEVAL_SUB(struct timeval *a, struct timeval *b,
- struct timeval *result);
-static void usage(char *progname);
-
-/* external functions */
-extern int ifinit();
-extern int interface_up(char *name);
-extern int lladdropt_length(struct sockaddr_dl *sdl);
-extern void lladdropt_fill(struct sockaddr_dl *sdl, struct nd_opt_hdr *ndopt);
-extern struct sockaddr_dl *if_nametosdl(char *name);
-extern int sockopen();
-extern void rtsol_input(int s);
-extern void sendpacket(struct ifinfo *ifinfo);
-extern int probe_init();
-extern void defrouter_probe(int ifindex);
+int main __P((int argc, char *argv[]));
+static int ifconfig __P((char *ifname));
+static int make_packet __P((struct ifinfo *ifinfo));
+static struct timeval *rtsol_check_timer __P((void));
+static void TIMEVAL_ADD __P((struct timeval *a, struct timeval *b,
+ struct timeval *result));
+static void TIMEVAL_SUB __P((struct timeval *a, struct timeval *b,
+ struct timeval *result));
+static void usage __P((char *progname));
int
main(argc, argv)
@@ -220,6 +211,8 @@
rtsol_input(s);
}
/* NOTREACHED */
+
+ return 0;
}
static int
diff -r 84facb74075e -r 1de4e039506d usr.sbin/rtsold/rtsold.h
--- a/usr.sbin/rtsold/rtsold.h Fri Sep 03 04:56:06 1999 +0000
+++ b/usr.sbin/rtsold/rtsold.h Fri Sep 03 05:14:37 1999 +0000
@@ -1,3 +1,5 @@
+/* $NetBSD: rtsold.h,v 1.2 1999/09/03 05:14:38 itojun Exp $ */
+
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
@@ -55,13 +57,30 @@
#define IFS_DOWN 3
#define IFS_TENTATIVE 4
-struct ifinfo *find_ifinfo(int ifindex);
-void rtsol_timer_update(struct ifinfo *ifinfo);
-
-extern int interface_status(struct ifinfo*);
+/* rtsold.c */
+struct ifinfo *find_ifinfo __P((int ifindex));
+void rtsol_timer_update __P((struct ifinfo *ifinfo));
#ifdef __STDC__
-extern void warnmsg(int, const char *, const char *, ...);
+extern void warnmsg __P((int, const char *, const char *, ...));
#else
-extern void warnmsg(int, const char *, const char *, va_list);
+extern void warnmsg __P((int, const char *, const char *, va_list));
#endif
-extern int getinet6sysctl(int code);
+
+/* if.c */
+extern int ifinit __P((void));
+extern int interface_up __P((char *name));
+extern int interface_status __P((struct ifinfo*));
+extern int lladdropt_length __P((struct sockaddr_dl *sdl));
+extern void lladdropt_fill __P((struct sockaddr_dl *sdl,
+ struct nd_opt_hdr *ndopt));
+extern struct sockaddr_dl *if_nametosdl __P((char *name));
+extern int getinet6sysctl __P((int code));
+
+/* rtsol.c */
+extern int sockopen __P((void));
+extern void sendpacket __P((struct ifinfo *ifinfo));
+extern void rtsol_input __P((int s));
+
+/* probe.c */
+extern int probe_init __P((void));
+extern void defrouter_probe __P((int ifindex));
Home |
Main Index |
Thread Index |
Old Index