Question on SNMP TRAP MIB definition

dhaval sanghvi <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
I have setup a localagent and masteragent where localagent sends trap to my master agent. Everything works great. Please have a look below:

MIB for trap(this is just an example)

// Trap variables definition

hbaNumber OBJECT-TYPE
    SYNTAX INTEGER (0..255)
    ACCESS read-only
    STATUS mandatory
    DESCRIPTION
        "The number of SCSI Host Bus Adaptor connected
        to tape drive, for example 0 is first HBA on the system."
        ::= { devInfo 4 }

hbaChannel OBJECT-TYPE
    SYNTAX INTEGER (0..255)
    ACCESS read-only
    STATUS mandatory
    DESCRIPTION
        "SCSI Channel number of SCSI Host Bus Adaptor connected
        to tape drive, for example 0 is first SCSI channel of HBA."
        ::= { devInfo 5 }

// TRAP Definition

tapeAlertTrap280                TRAP-TYPE       
       ENTERPRISE      tapeAlert
       VARIABLES       {
                                   hbaNumber,
                                   hbaChannel
                                 }
       DESCRIPTION
       "A library operation has been attempted that is invalid at this time."



Now here, A trap is send with 2 varbinds. If i don't define the above varbind as hbaNumer or hbaChannel , does it make any difference? I know we have to give oid and value to add a varbind. But if i give some random OID(something like an OID of this trap .X.X.280) and a value of hbanumber as 3. The trap would still be genrated with some oid value and hbanumber we gave.

It is a high chance my blabber didn't make any sense. 
I just want to know if we don't define the varbionds we use in traps, what could happen? Does masteragent look into varbinds and its respective oid value and does a get on localagent ? 
How does masteragent react to snmptrap with defined/undefined varbinds send from localagent?

Eagerly waiting response.

Thank you..

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p

_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.