summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/route.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/netstat/route.c')
-rw-r--r--usr.bin/netstat/route.c71
1 files changed, 23 insertions, 48 deletions
diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c
index 046dad1..da5b1f4 100644
--- a/usr.bin/netstat/route.c
+++ b/usr.bin/netstat/route.c
@@ -144,8 +144,7 @@ char *netname6 __P((struct sockaddr_in6 *, struct in6_addr *));
* Print routing tables.
*/
void
-routepr(rtree)
- u_long rtree;
+routepr(u_long rtree)
{
struct radix_node_head *rnh, head;
int i;
@@ -184,8 +183,7 @@ routepr(rtree)
* Print address family header before a section of the routing table.
*/
void
-pr_family(af)
- int af;
+pr_family(int af)
{
char *afname;
@@ -245,8 +243,7 @@ pr_family(af)
* Print header for routing table columns.
*/
void
-pr_rthdr(af)
- int af;
+pr_rthdr(int af)
{
if (Aflag)
@@ -271,8 +268,7 @@ pr_rthdr(af)
}
static struct sockaddr *
-kgetsa(dst)
- register struct sockaddr *dst;
+kgetsa(struct sockaddr *dst)
{
kget(dst, pt_u.u_sa);
@@ -282,8 +278,7 @@ kgetsa(dst)
}
static void
-p_tree(rn)
- struct radix_node *rn;
+p_tree(struct radix_node *rn)
{
again:
@@ -321,7 +316,7 @@ again:
char nbuf[20];
static void
-p_rtnode()
+p_rtnode(void)
{
struct radix_mask *rm = rnode.rn_mklist;
@@ -358,7 +353,7 @@ p_rtnode()
}
static void
-ntreestuff()
+ntreestuff(void)
{
size_t needed;
int mib[6];
@@ -389,8 +384,7 @@ ntreestuff()
}
static void
-np_rtentry(rtm)
- register struct rt_msghdr *rtm;
+np_rtentry(struct rt_msghdr *rtm)
{
register struct sockaddr *sa = (struct sockaddr *)(rtm + 1);
#ifdef notdef
@@ -429,9 +423,7 @@ np_rtentry(rtm)
}
static void
-p_sockaddr(sa, mask, flags, width)
- struct sockaddr *sa, *mask;
- int flags, width;
+p_sockaddr(struct sockaddr *sa, struct sockaddr *mask, int flags, int width)
{
char workbuf[128], *cplim;
register char *cp = workbuf;
@@ -572,9 +564,7 @@ p_sockaddr(sa, mask, flags, width)
}
static void
-p_flags(f, format)
- register int f;
- char *format;
+p_flags(int f, char *format)
{
char name[33], *flags;
register struct bits *p = bits;
@@ -587,8 +577,7 @@ p_flags(f, format)
}
static void
-p_rtentry(rt)
- register struct rtentry *rt;
+p_rtentry(struct rtentry *rt)
{
static struct ifnet ifnet, *lastif;
struct rtentry parent;
@@ -654,8 +643,7 @@ ifandkey:;
}
char *
-routename(in)
- u_long in;
+routename(u_long in)
{
register char *cp;
static char line[MAXHOSTNAMELEN];
@@ -683,8 +671,7 @@ routename(in)
}
static u_long
-forgemask(a)
- u_long a;
+forgemask(u_long a)
{
u_long m;
@@ -698,9 +685,7 @@ forgemask(a)
}
static void
-domask(dst, addr, mask)
- char *dst;
- u_long addr, mask;
+domask(char *dst, u_long addr, u_long mask)
{
register int b, i;
@@ -732,8 +717,7 @@ domask(dst, addr, mask)
* The address is assumed to be that of a net or subnet, not a host.
*/
char *
-netname(in, mask)
- u_long in, mask;
+netname(u_long in, u_long mask)
{
char *cp = 0;
static char line[MAXHOSTNAMELEN];
@@ -789,9 +773,7 @@ netname(in, mask)
#ifdef INET6
char *
-netname6(sa6, mask)
- struct sockaddr_in6 *sa6;
- struct in6_addr *mask;
+netname6(struct sockaddr_in6 *sa6, struct in6_addr *mask)
{
static char line[MAXHOSTNAMELEN];
u_char *p = (u_char *)mask;
@@ -853,8 +835,7 @@ netname6(sa6, mask)
}
char *
-routename6(sa6)
- struct sockaddr_in6 *sa6;
+routename6(struct sockaddr_in6 *sa6)
{
static char line[MAXHOSTNAMELEN];
int flag = NI_WITHSCOPEID;
@@ -878,8 +859,7 @@ routename6(sa6)
* Print routing statistics
*/
void
-rt_stats(off)
- u_long off;
+rt_stats(u_long off)
{
struct rtstat rtstat;
@@ -902,8 +882,7 @@ rt_stats(off)
}
char *
-ipx_print(sa)
- register struct sockaddr *sa;
+ipx_print(struct sockaddr *sa)
{
u_short port;
struct servent *sp = 0;
@@ -972,8 +951,7 @@ ipx_print(sa)
}
char *
-ipx_phost(sa)
- struct sockaddr *sa;
+ipx_phost(struct sockaddr *sa)
{
register struct sockaddr_ipx *sipx = (struct sockaddr_ipx *)sa;
struct sockaddr_ipx work;
@@ -997,8 +975,7 @@ short ns_nullh[] = {0,0,0};
short ns_bh[] = {-1,-1,-1};
char *
-ns_print(sa)
- register struct sockaddr *sa;
+ns_print(struct sockaddr *sa)
{
register struct sockaddr_ns *sns = (struct sockaddr_ns*)sa;
struct ns_addr work;
@@ -1044,8 +1021,7 @@ ns_print(sa)
}
char *
-ns_phost(sa)
- struct sockaddr *sa;
+ns_phost(struct sockaddr *sa)
{
register struct sockaddr_ns *sns = (struct sockaddr_ns *)sa;
struct sockaddr_ns work;
@@ -1064,8 +1040,7 @@ ns_phost(sa)
#endif
void
-upHex(p0)
- char *p0;
+upHex(char *p0)
{
register char *p = p0;
OpenPOWER on IntegriCloud