SNMP stuff

Martin Bjorklund mbj@REDACTED
Mon Aug 16 13:58:37 CEST 2004


Hi,




Dietmar Schäfer <dietmar@REDACTED> wrote:
> Hi !
> 
> 
> Some (much) more questions concerning SNMP and Erlang.
> 
> 
> I have a MIB (V1) containing a variable mibversion  type DisplayString
> 
> 
> I made a mnesia table
> 
> -record(all_mib_variables,{mibversion}).
> 
> I wrote a .funcs file
> {all_mib_variables,{instrumentation,mibversion,[]}}.
> 
> 
> And I wrote an instrumentation function instrumentation.erl
> 
> 
>    mibversion(get) ->
> 	Version = "Version-0-1",
>    {value,Version}.
> 
> just to see what happens.
> 
> 
> 
> So, if I got it right  any snmp-get-request causes a call to 
> instrumenation:mibversion(get)  ????
> 
> 
> Yes ! (?)
> 
> 
> 
> The valid return value for such an instrumentation function would be
> 
> {value,"Version-1.0") for example ??
> 
> So, instead of asking the database I should be able to it as i did ??
> 
> 
> But why do I get :
> 
> User error: Got
> {'EXIT',{undef,[{instrumentation,mibversion,[get]},{snmp_agent,try_get_instance,2},{snmp_agent,next_loop_varbinds,5},{snmp_agent,process_pdu,4},{snmp_agent,handle_pdu,7},{snmp_agent,handle_info,2},{gen_server,handle_msg,6},{proc_lib,init_p,5}]}} from {instrumentation,mibversion,[]}. ({asn1_type,'INTEGER',undefined,undefined,[{enums,[{inactive,2},{active,1}]}],true,'INTEGER',false}) Using genErr

This message means that the mibversion/1 function is not exported from
the intrumentation module (or if it is, that the module is not found
at all).


/martin



More information about the erlang-questions mailing list