snmptrapd.c
th exterit <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
Trying to strip snmptrapd.c down to the essentials. I just want to be able
to receive traps and print them to the terminal for now.
Here is what I have so far: http://pastebin.com/7W6Gc7ne
I am trying to compile this to test. I don't expect it to work yet. Here
is my Makefile:
-----------
CC=gcc
OBJS1=trapd.o
TARGETS=trapd
CFLAGS=-I. `net-snmp-config --cflags`
BUILDLIBS=`net-snmp-config --libs`
BUILDAGENTLIBS=`net-snmp-config --agent-libs`
# shared library flags (assumes gcc)
DLFLAGS=-fPIC -shared
all: $(TARGETS)
trapd: $(OBJS1)
$(CC) -o trapd $(OBJS1) $(BUILDLIBS)
clean:
rm $(OBJS2) $(OBJS2) $(TARGETS)
-----------
But I'm getting:
--------------------
$ make trapd
gcc -I. `net-snmp-config --cflags` -c -o trapd.o trapd.c
trapd.c:93: warning: data definition has no type or storage class
trapd.c:93: warning: parameter names (without types) in function declaration
trapd.c:93: error: conflicting types for ‘snmptrapd_close_mysessions’
trapd.c:15: note: previous definition of ‘snmptrapd_close_mysessions’ was
here
trapd.c:94: error: expected declaration specifiers or ‘...’ before string
constant
trapd.c:94: warning: data definition has no type or storage class
trapd.c:94: error: conflicting types for ‘snmp_shutdown’
/usr/local/include/net-snmp/library/snmp_api.h:387: note: previous
declaration of ‘snmp_shutdown’ was here
trapd.c:96: error: expected identifier or ‘(’ before ‘return’
trapd.c:97: error: expected identifier or ‘(’ before ‘}’ token
make: *** [trapd.o] Error 1
-------------------
How can I isolate this and test it?
Thanks.
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users