Update of /cvsroot/pure-data/externals/iem/snmp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25815
Modified Files: Make.config.in Makefile configure.ac get.c snmp.c snmpget-help.pd Log Message: more fixes
Index: get.c =================================================================== RCS file: /cvsroot/pure-data/externals/iem/snmp/get.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** get.c 15 Mar 2007 16:49:24 -0000 1.1 --- get.c 15 Mar 2007 21:23:56 -0000 1.2 *************** *** 39,42 **** --- 39,43 ---- static void snmpget_get(t_snmpget *x, t_symbol *s) { + post("system::get: %s", s->s_name); if(NULL!=x->x_session){ oid name[MAX_OID_LEN]; *************** *** 46,49 **** --- 47,51 ---- int err=0; char*symname=s->s_name; + post("getting %s", symname);
if(!snmp_parse_oid(symname, name, &name_length)){ *************** *** 229,233 **** --- 231,239 ---- snmpget_class = class_new(gensym("snmpget"), (t_newmethod)snmpget_new, 0, sizeof(t_snmpget), 0, A_GIMME, 0); + class_addcreator((t_newmethod)snmpget_new, gensym("snmp/get"), 0); + //class_addcreator((t_newmethod)snmpget_new, gensym("get"), 0); + class_addmethod(snmpget_class, (t_method)snmpget_get, gensym("get"), A_SYMBOL, 0); + class_addmethod(snmpget_class, (t_method)snmpget_connect, gensym("connect"), A_SYMBOL, A_DEFSYM, 0); class_addmethod(snmpget_class, (t_method)snmpget_disconnect, gensym("disconnect"), 0);
Index: snmp.c =================================================================== RCS file: /cvsroot/pure-data/externals/iem/snmp/snmp.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** snmp.c 15 Mar 2007 16:53:22 -0000 1.1 --- snmp.c 15 Mar 2007 21:23:56 -0000 1.2 *************** *** 1,4 **** --- 1,27 ---- + /****************************************************** + * + * snmp - implementation file + * + * copyleft (c) IOhannes m zmölnig + * + * 1603:forum::für::umläute:2007 + * + * institute of electronic music and acoustics (iem) + * + ****************************************************** + * + * license: GNU General Public License v.2 + * + ******************************************************/ + + #include "m_pd.h" + + + void snmpget_setup(); + void snmp_setup(void) { + post("snmp4pd: SimpleNetworkManagementProtocol objects for PureData"); + post("snmp4pd: copyleft (c) IOhannes m zmoelnig 2006-2007"); snmpget_setup(); }
Index: Makefile =================================================================== RCS file: /cvsroot/pure-data/externals/iem/snmp/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 15 Mar 2007 16:49:24 -0000 1.1 --- Makefile 15 Mar 2007 21:23:56 -0000 1.2 *************** *** 6,10 **** tests
! HELPERSOURCES= OBJECTSOURCES=$(sort $(filter-out $(HELPERSOURCES), $(filter %.c, $(wildcard *.c)))) SOURCES=$(OBJECTSOURCES) $(HELPERSOURCES) --- 6,10 ---- tests
! HELPERSOURCES=snmp.c OBJECTSOURCES=$(sort $(filter-out $(HELPERSOURCES), $(filter %.c, $(wildcard *.c)))) SOURCES=$(OBJECTSOURCES) $(HELPERSOURCES) *************** *** 29,33 **** %.d: %.c @set -e; rm -f $@; \ ! $(CPP) $(MAKEDEP_FLAGS) $(Z_CFLAGS) $< > $@.$$$$; \ sed 's,($*).o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ rm -f $@.$$$$ --- 29,33 ---- %.d: %.c @set -e; rm -f $@; \ ! $(CPP) $(MAKEDEP_FLAGS) $(CFLAGS) $< > $@.$$$$; \ sed 's,($*).o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ rm -f $@.$$$$ *************** *** 60,64 ****
$(TARGETS): %.o : %.c ! $(CC) $(Z_CFLAGS) -c -o $@ $*.c
clean: --- 60,64 ----
$(TARGETS): %.o : %.c ! $(CC) $(CFLAGS) -c -o $@ $*.c
clean:
Index: configure.ac =================================================================== RCS file: /cvsroot/pure-data/externals/iem/snmp/configure.ac,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** configure.ac 15 Mar 2007 16:53:22 -0000 1.2 --- configure.ac 15 Mar 2007 21:23:56 -0000 1.3 *************** *** 21,24 **** --- 21,25 ---- AC_SUBST(LIBNAME) AC_SUBST(CONFIGUREFLAGS) + AC_SUBST(BUILDLIBRARY)
## store the flags passed to us *************** *** 33,36 **** --- 34,43 ---- AC_ARG_WITH(pdpath, [ --with-pd=</path/to/pd> where to look for pd-headers and and -libs]) AC_ARG_ENABLE(PIC, [ --disable-PIC disable compilation with PIC-flag]) + AC_ARG_ENABLE(library,[ --disable-library split the library into single externals]) + + if test "xno" != "x${enable_library}" ; then + dnl LATER: find a more generic way to generate the .._LIBRARY define + BUILDLIBRARY="-DBUILD_LIBRARY" + fi
dnl Checks for libraries.
Index: snmpget-help.pd =================================================================== RCS file: /cvsroot/pure-data/externals/iem/snmp/snmpget-help.pd,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** snmpget-help.pd 15 Mar 2007 16:49:24 -0000 1.1 --- snmpget-help.pd 15 Mar 2007 21:23:56 -0000 1.2 *************** *** 1,5 **** #N canvas 0 0 849 365 10; #X msg 121 92 connect; - #X obj 100 125 snmpget; #X msg 152 159 disconnect; #X msg 208 99 get system; --- 1,4 ---- *************** *** 12,25 **** #X msg 248 173 get SNMPv2-MIB::system.sysDescr.0; #X msg 251 200 get system.sysDescr.0; ! #X connect 0 0 1 0; ! #X connect 1 0 8 0; ! #X connect 2 0 1 0; ! #X connect 3 0 1 0; ! #X connect 4 0 1 0; ! #X connect 5 0 1 0; #X connect 6 0 5 0; ! #X connect 6 1 0 0; ! #X connect 7 0 6 0; ! #X connect 9 0 1 0; ! #X connect 10 0 1 0; ! #X connect 11 0 1 0; --- 11,25 ---- #X msg 248 173 get SNMPv2-MIB::system.sysDescr.0; #X msg 251 200 get system.sysDescr.0; ! #X obj 121 289 snmp/get; ! #X connect 0 0 11 0; ! #X connect 1 0 11 0; ! #X connect 2 0 11 0; ! #X connect 3 0 11 0; ! #X connect 4 0 11 0; ! #X connect 5 0 4 0; ! #X connect 5 1 0 0; #X connect 6 0 5 0; ! #X connect 8 0 11 0; ! #X connect 9 0 11 0; ! #X connect 10 0 11 0; ! #X connect 11 0 7 0;
Index: Make.config.in =================================================================== RCS file: /cvsroot/pure-data/externals/iem/snmp/Make.config.in,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Make.config.in 15 Mar 2007 16:49:24 -0000 1.1 --- Make.config.in 15 Mar 2007 21:23:56 -0000 1.2 *************** *** 28,31 ****
CONFIGUREFLAGS = @CONFIGUREFLAGS@ ! CFLAGS = $(DEFS) $(IFLAGS) $(BUILDLIBRARY) -DPD $(WFLAGS) @CFLAGS@ $(CFLAGS) LIBS = @LIBS@ --- 28,31 ----
CONFIGUREFLAGS = @CONFIGUREFLAGS@ ! CFLAGS = $(DEFS) $(IFLAGS) $(BUILDLIBRARY) -DPD $(WFLAGS) @CFLAGS@ LIBS = @LIBS@