system_group - services

Martin Janzen janzen____pixelmetrix.com
Thu Mar 7 09:15:44 CET 2002


Kjersti Grønnevik wrote:

> all agent example code have services = 10
> 
> mib.add(new sysGroup("some text", "oid", 10));
> 
> It is used by sysGroup::sysGroup(const char* descr, const Oidx& o, const int services):MibGroup....
> 
> What does the variable services do?
> Why is services = 10 ? Can it have other values?

>From SNMPv2-MIB (aka. MIB-II, aka. RFC 1450):

sysServices OBJECT-TYPE
    SYNTAX      INTEGER (0..127)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
            "A value which indicates the set of services that this
            entity may potentially offers.  The value is a sum.  This
            sum initially takes the value zero, Then, for each layer, L,
            in the range 1 through 7, that this node performs
            transactions for, 2 raised to (L - 1) is added to the sum.
            For example, a node which performs only routing functions
            would have a value of 4 (2^(3-1)).  In contrast, a node
            which is a host offering application services would have a
            value of 72 (2^(4-1) + 2^(7-1)).  Note that in the context
            of the Internet suite of protocols, values should be
            calculated accordingly:

                 layer      functionality
                   1        physical (e.g., repeaters)
                   2        datalink/subnetwork (e.g., bridges)
                   3        internet (e.g., supports the IP)
                   4        end-to-end  (e.g., supports the TCP)
                   7        applications (e.g., supports the SMTP)

            For systems including OSI protocols, layers 5 and 6 may also
            be counted."
    ::= { system 7 }



> Another Q:
> the oid: shall it just refere to the (enterprise, company) ? and not to the mib?

No, more likely it'll be a value which uniquely identifies your agent. 
For example, if your company builds two types of routers, your MIBs
would define a distinct OID for each:


sysObjectID OBJECT-TYPE
    SYNTAX      OBJECT IDENTIFIER
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
            "The vendor's authoritative identification of the network
            management subsystem contained in the entity.  This value is
            allocated within the SMI enterprises subtree (1.3.6.1.4.1)
            and provides an easy and unambiguous means for determining
            `what kind of box' is being managed.  For example, if vendor
            `Flintstones, Inc.' was assigned the subtree
            1.3.6.1.4.1.4242, it could assign the identifier
            1.3.6.1.4.1.4242.1.1 to its `Fred Router'."
    ::= { system 2 }


Hope that helps...

--
Martin Janzen
janzen at pixelmetrix.com



More information about the AGENTPP mailing list