summaryrefslogtreecommitdiff
path: root/networking/traceroute.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-07-22 08:56:55 +0000
committerEric Andersen <andersen@codepoet.org>2003-07-22 08:56:55 +0000
commit85e5e72bc1acd9d58c11bde6e14c8270cd9f169f (patch)
tree9971c6951256dd0bba5ff2a7db08ed6f65ef218d /networking/traceroute.c
parent0a14c9f924eaf6a64e78959a190d187d646b3c0c (diff)
downloadbusybox-w32-85e5e72bc1acd9d58c11bde6e14c8270cd9f169f.tar.gz
busybox-w32-85e5e72bc1acd9d58c11bde6e14c8270cd9f169f.tar.bz2
busybox-w32-85e5e72bc1acd9d58c11bde6e14c8270cd9f169f.zip
Remove remaining libc5 support code
Diffstat (limited to 'networking/traceroute.c')
-rw-r--r--networking/traceroute.c91
1 files changed, 0 insertions, 91 deletions
diff --git a/networking/traceroute.c b/networking/traceroute.c
index be9ea1d95..5f8989fd1 100644
--- a/networking/traceroute.c
+++ b/networking/traceroute.c
@@ -76,97 +76,6 @@
76#include <netinet/ip_icmp.h> 76#include <netinet/ip_icmp.h>
77 77
78 78
79 /* It turns out that libc5 doesn't have proper icmp support
80 * built into it header files, so we have to supplement it */
81#if __GNU_LIBRARY__ < 5
82static const int ICMP_MINLEN = 8; /* abs minimum */
83
84struct icmp_ra_addr
85{
86 u_int32_t ira_addr;
87 u_int32_t ira_preference;
88};
89
90
91struct icmp
92{
93 u_int8_t icmp_type; /* type of message, see below */
94 u_int8_t icmp_code; /* type sub code */
95 u_int16_t icmp_cksum; /* ones complement checksum of struct */
96 union
97 {
98 u_char ih_pptr; /* ICMP_PARAMPROB */
99 struct in_addr ih_gwaddr; /* gateway address */
100 struct ih_idseq /* echo datagram */
101 {
102 u_int16_t icd_id;
103 u_int16_t icd_seq;
104 } ih_idseq;
105 u_int32_t ih_void;
106
107 /* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */
108 struct ih_pmtu
109 {
110 u_int16_t ipm_void;
111 u_int16_t ipm_nextmtu;
112 } ih_pmtu;
113
114 struct ih_rtradv
115 {
116 u_int8_t irt_num_addrs;
117 u_int8_t irt_wpa;
118 u_int16_t irt_lifetime;
119 } ih_rtradv;
120 } icmp_hun;
121#define icmp_pptr icmp_hun.ih_pptr
122#define icmp_gwaddr icmp_hun.ih_gwaddr
123#define icmp_id icmp_hun.ih_idseq.icd_id
124#define icmp_seq icmp_hun.ih_idseq.icd_seq
125#define icmp_void icmp_hun.ih_void
126#define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void
127#define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu
128#define icmp_num_addrs icmp_hun.ih_rtradv.irt_num_addrs
129#define icmp_wpa icmp_hun.ih_rtradv.irt_wpa
130#define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime
131 union
132 {
133 struct
134 {
135 u_int32_t its_otime;
136 u_int32_t its_rtime;
137 u_int32_t its_ttime;
138 } id_ts;
139 struct
140 {
141 struct ip idi_ip;
142 /* options and then 64 bits of data */
143 } id_ip;
144 struct icmp_ra_addr id_radv;
145 u_int32_t id_mask;
146 u_int8_t id_data[1];
147 } icmp_dun;
148#define icmp_otime icmp_dun.id_ts.its_otime
149#define icmp_rtime icmp_dun.id_ts.its_rtime
150#define icmp_ttime icmp_dun.id_ts.its_ttime
151#define icmp_ip icmp_dun.id_ip.idi_ip
152#define icmp_radv icmp_dun.id_radv
153#define icmp_mask icmp_dun.id_mask
154#define icmp_data icmp_dun.id_data
155};
156
157#define ICMP_MINLEN 8 /* abs minimum */
158#define ICMP_UNREACH 3 /* dest unreachable, codes: */
159#define ICMP_TIMXCEED 11 /* time exceeded, code: */
160#define ICMP_TIMXCEED_INTRANS 0 /* ttl==0 in transit */
161#define ICMP_UNREACH_NET 0 /* bad net */
162#define ICMP_UNREACH_HOST 1 /* bad host */
163#define ICMP_UNREACH_PROTOCOL 2 /* bad protocol */
164#define ICMP_UNREACH_PORT 3 /* bad port */
165#define ICMP_UNREACH_NEEDFRAG 4 /* IP_DF caused drop */
166#define ICMP_UNREACH_SRCFAIL 5 /* src route failed */
167#endif
168
169
170#define MAXPACKET 65535 /* max ip packet size */ 79#define MAXPACKET 65535 /* max ip packet size */
171#ifndef MAXHOSTNAMELEN 80#ifndef MAXHOSTNAMELEN
172#define MAXHOSTNAMELEN 64 81#define MAXHOSTNAMELEN 64