Ethereal-dev: Re: [Ethereal-dev] missing ucd-snmp-config.h

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

Date Next Thread Next
From: Ayamura KIKUCHI <ayamura@xxxxxxxxxxx>
Date: Mon, 1 Apr 2002 22:23:56 +0900 (JST)
> > "packet-snmp.c" should include a file "ucd-snmp-config.h".

> What is the problem that adding the include fixes?

Some include files derived from ucd-snmp, such as snmp_api.h and so on,
need macro definitions in ucd-snmp-config.h.  For example, the macro
STRUCT_SOCKADDR_HAS_SA_UNION_SA_GENERIC_SA_FAMILY2 should be defined
for IRIX 6.5.

Compilation errors may occur if ucd-snmp-config.h is not included in
packet-snmp.c.

a part of snmp_api.h:

typedef struct {
#ifdef STRUCT_SOCKADDR_HAS_SA_UNION_SA_GENERIC_SA_FAMILY2
	/*
	 * Certain systems (notably Irix 6.x) have a non-traditional
	 *   socket structure, and #define the traditional field names.
	 * This local definition should reproduce this structure, and still
	 *    be large enough to handle any necessary Unix domain addresses.
	 */
  union {
   struct {
#ifdef _HAVE_SA_LEN
...

a part of ucd-snmp-config.h on IRIX 6.5:

/* Does struct sockaddr have a sa_family2 field? */
#define STRUCT_SOCKADDR_HAS_SA_UNION_SA_GENERIC_SA_FAMILY2 1

-- ayamura
Ayamura KIKUCHI, M.D., Ph.D.