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."
#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
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <netdb.h> /* for MAXHOSTNAMELEN on some platforms */
#include "interface.h"
#include "addrtoname.h"
#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
#include <stdio.h>
#include <string.h>
+#include <netdb.h> /* for MAXHOSTNAMELEN on some platforms */
#include "interface.h"
#include "addrtoname.h"
struct timeval tspu_time;
char tspu_hopcnt;
} tsp_u;
- char tsp_name[MAXHOSTNAMELEN];
+ char tsp_name[256];
};
#define tsp_time tsp_u.tspu_time