diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-07-22 08:56:55 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-07-22 08:56:55 +0000 |
commit | 85e5e72bc1acd9d58c11bde6e14c8270cd9f169f (patch) | |
tree | 9971c6951256dd0bba5ff2a7db08ed6f65ef218d /networking/ping.c | |
parent | 0a14c9f924eaf6a64e78959a190d187d646b3c0c (diff) | |
download | busybox-w32-85e5e72bc1acd9d58c11bde6e14c8270cd9f169f.tar.gz busybox-w32-85e5e72bc1acd9d58c11bde6e14c8270cd9f169f.tar.bz2 busybox-w32-85e5e72bc1acd9d58c11bde6e14c8270cd9f169f.zip |
Remove remaining libc5 support code
Diffstat (limited to 'networking/ping.c')
-rw-r--r-- | networking/ping.c | 81 |
1 files changed, 1 insertions, 80 deletions
diff --git a/networking/ping.c b/networking/ping.c index 28b38db14..a38f356d6 100644 --- a/networking/ping.c +++ b/networking/ping.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | /* | 2 | /* |
3 | * $Id: ping.c,v 1.54 2003/03/19 09:12:38 mjn3 Exp $ | 3 | * $Id: ping.c,v 1.55 2003/07/22 08:56:51 andersen Exp $ |
4 | * Mini ping implementation for busybox | 4 | * Mini ping implementation for busybox |
5 | * | 5 | * |
6 | * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> | 6 | * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> |
@@ -52,85 +52,6 @@ | |||
52 | #include "busybox.h" | 52 | #include "busybox.h" |
53 | 53 | ||
54 | 54 | ||
55 | /* It turns out that libc5 doesn't have proper icmp support | ||
56 | * built into it header files, so we have to supplement it */ | ||
57 | #if __GNU_LIBRARY__ < 5 | ||
58 | static const int ICMP_MINLEN = 8; /* abs minimum */ | ||
59 | |||
60 | struct icmp_ra_addr | ||
61 | { | ||
62 | u_int32_t ira_addr; | ||
63 | u_int32_t ira_preference; | ||
64 | }; | ||
65 | |||
66 | |||
67 | struct icmp | ||
68 | { | ||
69 | u_int8_t icmp_type; /* type of message, see below */ | ||
70 | u_int8_t icmp_code; /* type sub code */ | ||
71 | u_int16_t icmp_cksum; /* ones complement checksum of struct */ | ||
72 | union | ||
73 | { | ||
74 | u_char ih_pptr; /* ICMP_PARAMPROB */ | ||
75 | struct in_addr ih_gwaddr; /* gateway address */ | ||
76 | struct ih_idseq /* echo datagram */ | ||
77 | { | ||
78 | u_int16_t icd_id; | ||
79 | u_int16_t icd_seq; | ||
80 | } ih_idseq; | ||
81 | u_int32_t ih_void; | ||
82 | |||
83 | /* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */ | ||
84 | struct ih_pmtu | ||
85 | { | ||
86 | u_int16_t ipm_void; | ||
87 | u_int16_t ipm_nextmtu; | ||
88 | } ih_pmtu; | ||
89 | |||
90 | struct ih_rtradv | ||
91 | { | ||
92 | u_int8_t irt_num_addrs; | ||
93 | u_int8_t irt_wpa; | ||
94 | u_int16_t irt_lifetime; | ||
95 | } ih_rtradv; | ||
96 | } icmp_hun; | ||
97 | #define icmp_pptr icmp_hun.ih_pptr | ||
98 | #define icmp_gwaddr icmp_hun.ih_gwaddr | ||
99 | #define icmp_id icmp_hun.ih_idseq.icd_id | ||
100 | #define icmp_seq icmp_hun.ih_idseq.icd_seq | ||
101 | #define icmp_void icmp_hun.ih_void | ||
102 | #define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void | ||
103 | #define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu | ||
104 | #define icmp_num_addrs icmp_hun.ih_rtradv.irt_num_addrs | ||
105 | #define icmp_wpa icmp_hun.ih_rtradv.irt_wpa | ||
106 | #define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime | ||
107 | union | ||
108 | { | ||
109 | struct | ||
110 | { | ||
111 | u_int32_t its_otime; | ||
112 | u_int32_t its_rtime; | ||
113 | u_int32_t its_ttime; | ||
114 | } id_ts; | ||
115 | struct | ||
116 | { | ||
117 | struct ip idi_ip; | ||
118 | /* options and then 64 bits of data */ | ||
119 | } id_ip; | ||
120 | struct icmp_ra_addr id_radv; | ||
121 | u_int32_t id_mask; | ||
122 | u_int8_t id_data[1]; | ||
123 | } icmp_dun; | ||
124 | #define icmp_otime icmp_dun.id_ts.its_otime | ||
125 | #define icmp_rtime icmp_dun.id_ts.its_rtime | ||
126 | #define icmp_ttime icmp_dun.id_ts.its_ttime | ||
127 | #define icmp_ip icmp_dun.id_ip.idi_ip | ||
128 | #define icmp_radv icmp_dun.id_radv | ||
129 | #define icmp_mask icmp_dun.id_mask | ||
130 | #define icmp_data icmp_dun.id_data | ||
131 | }; | ||
132 | #endif | ||
133 | |||
134 | static const int DEFDATALEN = 56; | 55 | static const int DEFDATALEN = 56; |
135 | static const int MAXIPLEN = 60; | 56 | static const int MAXIPLEN = 60; |
136 | static const int MAXICMPLEN = 76; | 57 | static const int MAXICMPLEN = 76; |