Dolda2000 GitWeb
/
icmp-dn.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Check for error return from getaddrinfo...
[icmp-dn.git]
/
src
/
icmpdnd.c
diff --git
a/src/icmpdnd.c
b/src/icmpdnd.c
index
5ab19f6
..
29d62f9
100644
(file)
--- a/
src/icmpdnd.c
+++ b/
src/icmpdnd.c
@@
-33,36
+33,12
@@
#include "config.h"
#endif
#include "config.h"
#endif
+#include "icmpdefs.h"
+
#ifndef MAXHNAME
#define MAXHNAME 1024
#endif
#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] = "";
volatile int alive;
char myname[MAXHNAME] = "";
@@
-185,7
+161,7
@@
int main(int argc, char **argv)
case '?':
case ':':
default:
case '?':
case ':':
default:
- fprintf(stderr, "usage: icmpdnd [-n
]
");
+ fprintf(stderr, "usage: icmpdnd [-n
h] [-t ttl] [-d domainname]\n
");
exit((c == 'h')?0:1);
}
}
exit((c == 'h')?0:1);
}
}