X-Git-Url: http://dolda2000.com/gitweb/?p=icmp-dn.git;a=blobdiff_plain;f=src%2Ficmpdnd.c;fp=src%2Ficmpdnd.c;h=29d62f9270403d6734153b70dfd21ab37bb8e21d;hp=49d1b5c3d1d05a90ff4464486bcbcecb4342657d;hb=1eb230f9a739866bcf329573bf728f701d84008b;hpb=10c3622109182a34b14e12d48c3639b49fe54092 diff --git a/src/icmpdnd.c b/src/icmpdnd.c index 49d1b5c..29d62f9 100644 --- a/src/icmpdnd.c +++ b/src/icmpdnd.c @@ -33,36 +33,12 @@ #include "config.h" #endif +#include "icmpdefs.h" + #ifndef MAXHNAME #define MAXHNAME 1024 #endif -struct icmphdr { - u_int8_t type; - u_int8_t code; - u_int16_t checksum; -}; - -struct reqhdr { - u_int8_t type; - u_int8_t code; - u_int16_t checksum; - u_int16_t id; - u_int16_t seq; -}; - -struct rephdr { - u_int8_t type; - u_int8_t code; - u_int16_t checksum; - u_int16_t id; - u_int16_t seq; - int32_t ttl; -}; - -#define ICMP_NAMEREQ 37 -#define ICMP_NAMEREP 38 - volatile int alive; char myname[MAXHNAME] = "";