aboutsummaryrefslogtreecommitdiff
path: root/networking/ping.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/ping.c')
-rw-r--r--networking/ping.c43
1 files changed, 21 insertions, 22 deletions
diff --git a/networking/ping.c b/networking/ping.c
index 7460e4414..774f8f3e0 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -24,28 +24,6 @@
24 * This version is an adaptation of ping.c from busybox. 24 * This version is an adaptation of ping.c from busybox.
25 * The code was modified by Bart Visscher <magick@linux-fan.com> 25 * The code was modified by Bart Visscher <magick@linux-fan.com>
26 */ 26 */
27
28#include <net/if.h>
29#include <netinet/ip_icmp.h>
30#include "libbb.h"
31#include "common_bufsiz.h"
32
33#ifdef __BIONIC__
34/* should be in netinet/ip_icmp.h */
35# define ICMP_DEST_UNREACH 3 /* Destination Unreachable */
36# define ICMP_SOURCE_QUENCH 4 /* Source Quench */
37# define ICMP_REDIRECT 5 /* Redirect (change route) */
38# define ICMP_ECHO 8 /* Echo Request */
39# define ICMP_TIME_EXCEEDED 11 /* Time Exceeded */
40# define ICMP_PARAMETERPROB 12 /* Parameter Problem */
41# define ICMP_TIMESTAMP 13 /* Timestamp Request */
42# define ICMP_TIMESTAMPREPLY 14 /* Timestamp Reply */
43# define ICMP_INFO_REQUEST 15 /* Information Request */
44# define ICMP_INFO_REPLY 16 /* Information Reply */
45# define ICMP_ADDRESS 17 /* Address Mask Request */
46# define ICMP_ADDRESSREPLY 18 /* Address Mask Reply */
47#endif
48
49//config:config PING 27//config:config PING
50//config: bool "ping (9.5 kb)" 28//config: bool "ping (9.5 kb)"
51//config: default y 29//config: default y
@@ -136,6 +114,27 @@
136//usage: "1 packets transmitted, 1 packets received, 0% packet loss\n" 114//usage: "1 packets transmitted, 1 packets received, 0% packet loss\n"
137//usage: "round-trip min/avg/max = 20.1/20.1/20.1 ms\n" 115//usage: "round-trip min/avg/max = 20.1/20.1/20.1 ms\n"
138 116
117#include <net/if.h>
118#include <netinet/ip_icmp.h>
119#include "libbb.h"
120#include "common_bufsiz.h"
121
122#ifdef __BIONIC__
123/* should be in netinet/ip_icmp.h */
124# define ICMP_DEST_UNREACH 3 /* Destination Unreachable */
125# define ICMP_SOURCE_QUENCH 4 /* Source Quench */
126# define ICMP_REDIRECT 5 /* Redirect (change route) */
127# define ICMP_ECHO 8 /* Echo Request */
128# define ICMP_TIME_EXCEEDED 11 /* Time Exceeded */
129# define ICMP_PARAMETERPROB 12 /* Parameter Problem */
130# define ICMP_TIMESTAMP 13 /* Timestamp Request */
131# define ICMP_TIMESTAMPREPLY 14 /* Timestamp Reply */
132# define ICMP_INFO_REQUEST 15 /* Information Request */
133# define ICMP_INFO_REPLY 16 /* Information Reply */
134# define ICMP_ADDRESS 17 /* Address Mask Request */
135# define ICMP_ADDRESSREPLY 18 /* Address Mask Reply */
136#endif
137
139#if ENABLE_PING6 138#if ENABLE_PING6
140# include <netinet/icmp6.h> 139# include <netinet/icmp6.h>
141/* I see RENUMBERED constants in bits/in.h - !!? 140/* I see RENUMBERED constants in bits/in.h - !!?