X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Ficmpdnd.c;h=29d62f9270403d6734153b70dfd21ab37bb8e21d;hb=1eb230f9a739866bcf329573bf728f701d84008b;hp=5ab19f69709e00cc51d776777b44b61ade78b5c1;hpb=ac46a58ca901277a7f1e72e4114308db3c04c19f;p=icmp-dn.git diff --git a/src/icmpdnd.c b/src/icmpdnd.c index 5ab19f6..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] = ""; @@ -185,7 +161,7 @@ int main(int argc, char **argv) case '?': case ':': default: - fprintf(stderr, "usage: icmpdnd [-n]"); + fprintf(stderr, "usage: icmpdnd [-nh] [-t ttl] [-d domainname]\n"); exit((c == 'h')?0:1); } }