Ethereal-users: Re: [ethereal-users] building ethereal-0.8.12

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

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Mon, 18 Sep 2000 21:09:31 -0700
On Tue, Sep 19, 2000 at 01:03:19AM +0200, Cristian Ionescu-Idbohrn wrote:
> > 	egrep snmp_set_suffix_only /usr/include/ucd-snmp/*.h
> 
> /usr/include/ucd-snmp/snmp_api.h:void snmp_set_suffix_only (int);

So the UCD SNMP header files think it's a function, not a macro, which
means that, if "/usr/lib/libsnmp.so.4.1" on your system doesn't define
it as a function, the UCD SNMP you have installed on your machine is
broken.

Try compiling the following program with

	gcc -o bar bar.c -lsnmp

If it fails, the UCD SNMP you have installed on your machine is broken.

If it succeeds, make sure that the Makefile for Ethereal is linking
Ethereal with "-lsnmp".
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/time.h>
#include <netdb.h>
#include <stdarg.h>
#include <ucd-snmp/ucd-snmp-config.h>
#include <ucd-snmp/asn1.h>
#include <ucd-snmp/snmp.h>
#include <ucd-snmp/snmp_api.h>

int
main(int argc, char **argv)
{
	snmp_set_suffix_only(1);
	return 0;
}