On Fri, Feb 6, 2009 at 6:55 AM, Dave Shield <d.t.shi...@liverpool.ac.uk>wrote:

> 2009/2/5 Rodolfo Leffa <rodolfole...@gmail.com>:
> > is there a way to define multiples OID's in a single module extending the
> > agent??
>
> Yes.
> Most of the code under 'mibgroup' works this way.
> There are very few MIB modules that comprise just
> one single OID.
>   Have a look through this code, and see how it's
> currently done.

Ok.


>
>
>
> > I'd like to deal with all requests to a subtree of my mib in a single
> > handler, but i don't know how to do it.
>
> Registering the root using 'netsnmp_register_handler()' does exactly
> this.   But it does mean that you have to deal with *everything* under
> the specified root yourself.  That can get quite complex.
>

I think I will take my chances! I'm already dealing with the request to get
the information I want from the devices managed, so i'll put some extra code
to recognize when a request is not part of my MIB.


> In most cases you are better off using one of the more specialised
> helpers (e.g. scalar, scalar_group or assorted table helpers).
>
>
> > Can I somehow defines a generic OID, like  1,3,6,1,4,1,32624,1,X,X,X,X,X,
> ??
> > Where 'X' could represent any number.
>
> That looks suspiciously like a MIB table.
> In which case, you should probably use one of the table helpers.
>
> What is the structure of the MIB you are trying to implement?
>
The MIB is all consisted of Integers and Strings and enums. Like This:

k3lDeviceCount OBJECT-TYPE
            SYNTAX      Integer32
            MAX-ACCESS        read-only
            STATUS        current
            DESCRIPTION    "Numero de placas ativas no sistema."
        ::= { KhompDataDeviceCount}

    k3lDeviceType OBJECT-TYPE
            SYNTAX      INTEGER
                    {
                    kdtE1(0),
                    kdtFXO(1),
                    kdtConf(2),
                    kdtPR(3),
                    kdtE1GW(4),
                    kdtFXOVoIP(5),
                    kdtE1IP(6),
                    kdtE1Spx(7),
                        kdtGWIP(8),
                       kdtFXS(9),
                      kdtFXSSpx(10),
                       kdtGSM(11),
                       kdtGSMSpx(12)
                    }
            MAX-ACCESS      read-only
            STATUS          current
            DESCRIPTION    " Tipo de uma placa."
        ::= { KhompDataDeviceType }


    linkCount OBJECT-TYPE
            SYNTAX          Integer32
            MAX-ACCESS      read-only
            STATUS          current
            DESCRIPTION      "Numero de links."
        ::= { KhompDataDeviceConfig 1 }

    channelCount OBJECT-TYPE
            SYNTAX          Integer32
            MAX-ACCESS      read-only
               STATUS          current
            DESCRIPTION      "Numero de canais."
        ::= { KhompDataDeviceConfig 2 }

Sorry if i'm not responding your question right. I'm new to SNMP and
Net-SNMP and there's also the language problem(i'm brazilian). By the way,
this table helpers you mentioned, are the conf files for mib2c?? :P



>
> Dave
>

Thanks again, []s

-- 
Rodolfo Leffa de Oliveira
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to