summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2016-09-10 07:31:44 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2016-09-10 07:31:44 +0000
commite5211e5fb8e8fea7d250831187dff7338c83cd0d (patch)
treee744bc0fb6974cc992499ae246e3f5ad6048ecc5 /sbin
parentfe66aed712cd594112d790c4f06c942b57e777e2 (diff)
reorder function declaration to reduce diff between ping and ping6; no
object change
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ping/ping.c31
-rw-r--r--sbin/ping6/ping6.c41
2 files changed, 37 insertions, 35 deletions
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c
index 48e089195b4..ef60005948a 100644
--- a/sbin/ping/ping.c
+++ b/sbin/ping/ping.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ping.c,v 1.154 2016/09/08 13:59:33 florian Exp $ */
+/* $OpenBSD: ping.c,v 1.155 2016/09/10 07:31:43 florian Exp $ */
/* $NetBSD: ping.c,v 1.20 1995/08/11 22:37:58 cgd Exp $ */
/*
@@ -169,22 +169,23 @@ volatile sig_atomic_t seenalrm;
volatile sig_atomic_t seenint;
volatile sig_atomic_t seeninfo;
-void fill(char *, char *);
-void summary(void);
-int in_cksum(u_short *, int);
-void onsignal(int);
-void retransmit(void);
-int pinger(void);
-const char *pr_addr(struct sockaddr *, socklen_t);
-int check_icmph(struct ip *);
-void pr_icmph(struct icmp *);
-void pr_pack(char *, int, struct msghdr *);
-void pr_retip(struct ip *);
-void pr_iph(struct ip *);
+void fill(char *, char *);
+void summary(void);
+void onsignal(int);
+void retransmit(void);
+int pinger(void);
+const char *pr_addr(struct sockaddr *, socklen_t);
+void pr_pack(char *, int, struct msghdr *);
+__dead void usage(void);
+
+int in_cksum(u_short *, int);
+int check_icmph(struct ip *);
+void pr_icmph(struct icmp *);
+void pr_retip(struct ip *);
+void pr_iph(struct ip *);
#ifndef SMALL
-int map_tos(char *, int *);
+int map_tos(char *, int *);
#endif /* SMALL */
-__dead void usage(void);
int
main(int argc, char *argv[])
diff --git a/sbin/ping6/ping6.c b/sbin/ping6/ping6.c
index f5111cdfc47..eb54d87f6dc 100644
--- a/sbin/ping6/ping6.c
+++ b/sbin/ping6/ping6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ping6.c,v 1.158 2016/09/08 13:59:33 florian Exp $ */
+/* $OpenBSD: ping6.c,v 1.159 2016/09/10 07:31:43 florian Exp $ */
/* $KAME: ping6.c,v 1.163 2002/10/25 02:19:06 itojun Exp $ */
/*
@@ -192,7 +192,8 @@ double tmin = 999999999.0; /* minimum round trip time */
double tmax = 0.0; /* maximum round trip time */
double tsum = 0.0; /* sum of all times, for doing average */
double tsumsq = 0.0; /* sum of all times squared, for std. dev. */
-struct tv64 tv64_offset; /* random offset for time values */
+
+struct tv64 tv64_offset;
SIPHASH_KEY mac_key;
/* for ancillary data(advanced API) */
@@ -203,24 +204,24 @@ volatile sig_atomic_t seenalrm;
volatile sig_atomic_t seenint;
volatile sig_atomic_t seeninfo;
-int main(int, char *[]);
-void fill(char *, char *);
-int get_hoplim(struct msghdr *);
-int get_pathmtu(struct msghdr *);
-struct in6_pktinfo *get_rcvpktinfo(struct msghdr *);
-void onsignal(int);
-void retransmit(void);
-int pinger(void);
-const char *pr_addr(struct sockaddr *, socklen_t);
-void pr_icmph(struct icmp6_hdr *, u_char *);
-void pr_iph(struct ip6_hdr *);
-void pr_pack(u_char *, int, struct msghdr *);
-void pr_exthdrs(struct msghdr *);
-void pr_ip6opt(void *);
-void pr_rthdr(void *);
-void pr_retip(struct ip6_hdr *, u_char *);
-void summary(void);
-__dead void usage(void);
+void fill(char *, char *);
+void summary(void);
+void onsignal(int);
+void retransmit(void);
+int pinger(void);
+const char *pr_addr(struct sockaddr *, socklen_t);
+void pr_pack(u_char *, int, struct msghdr *);
+__dead void usage(void);
+
+int get_hoplim(struct msghdr *);
+int get_pathmtu(struct msghdr *);
+struct in6_pktinfo *get_rcvpktinfo(struct msghdr *);
+void pr_icmph(struct icmp6_hdr *, u_char *);
+void pr_iph(struct ip6_hdr *);
+void pr_exthdrs(struct msghdr *);
+void pr_ip6opt(void *);
+void pr_rthdr(void *);
+void pr_retip(struct ip6_hdr *, u_char *);
int
main(int argc, char *argv[])