]> The Tcpdump Group git mirrors - tcpdump/commitdiff
The infinite diversity of UNIX platforms is an eternal source of joy.
authorguy <guy>
Tue, 10 Oct 2000 05:03:32 +0000 (05:03 +0000)
committerguy <guy>
Tue, 10 Oct 2000 05:03:32 +0000 (05:03 +0000)
On some platforms (e.g., Solaris 2.5.1 and 2.6, at least), you have to
include <netdb.h> to get MAXHOSTNAMELEN defined, including <sys/param.h>
doesn't do it (on others, <netdb.h> doesn't help, and you have to
include <sys/param.h>.

Include <netdb.h> in some files, but, for "timed.h", just use 256 rather
than MAXHOSTNAMELEN - the Berkeley time daemon protocol spec (in the
timed source directory in various BSDs) says the packet includes "A
zero-terminated string of up to 256 ASCII characters with the name of
the machine sending the message."

print-atalk.c
print-icmp.c
timed.h

index b5d162c720a18818be39550cf323a7a289f8eda8..2541237c1511267077adf4fa0350f9a2e2ece9e9 100644 (file)
@@ -23,7 +23,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-atalk.c,v 1.61 2000-10-06 04:23:10 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-atalk.c,v 1.62 2000-10-10 05:03:32 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -39,6 +39,7 @@ static const char rcsid[] =
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <netdb.h>             /* for MAXHOSTNAMELEN on some platforms */
 
 #include "interface.h"
 #include "addrtoname.h"
index 400ff7d1eb0af0538fed1a7819f99bc73995bcbe..fc83513371ea2ed3c9c54f23708e88f64fe7b082 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.56 2000-10-05 04:10:02 itojun Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.57 2000-10-10 05:03:32 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -39,6 +39,7 @@ struct rtentry;
 
 #include <stdio.h>
 #include <string.h>
+#include <netdb.h>             /* for MAXHOSTNAMELEN on some platforms */
 
 #include "interface.h"
 #include "addrtoname.h"
diff --git a/timed.h b/timed.h
index 7ff8293c65c552b8b28f7fa56e9e00645582a08a..42f779c54c976c251995f7d74bfb470fdc1a3c2e 100644 (file)
--- a/timed.h
+++ b/timed.h
@@ -51,7 +51,7 @@ struct tsp {
                struct timeval tspu_time;
                char tspu_hopcnt;
        } tsp_u;
-       char tsp_name[MAXHOSTNAMELEN];
+       char tsp_name[256];
 };
 
 #define        tsp_time        tsp_u.tspu_time