nv-l
[Top] [All Lists]

RE: [nv-l] Source and destination trap addresses

To: "Allison, Jason (JALLISON)" <JALLISON@arinc.com>
Subject: RE: [nv-l] Source and destination trap addresses
From: James Shanks <jshanks@us.ibm.com>
Date: Thu, 21 Nov 2002 15:28:31 -0500
Cc: nv-l@lists.tivoli.com
Rats.  You can spell check all you want but your brain reads what it wants 
to see.

The first sentence of my response below should read, "I am not certain that I 
can help you.", of course.
My apologies.

James Shanks
Level 3 Support  for Tivoli NetView for UNIX and NT
Tivoli Software / IBM Software Group
----- Forwarded by James Shanks/Raleigh/IBM on 11/21/2002 03:26 PM -----


James Shanks/Raleigh/IBM@IBMUS
11/21/2002 03:25 PM

 
        To:     "Allison, Jason (JALLISON)" <JALLISON@arinc.com>
        cc:     nv-l@lists.tivoli.com
        Subject:        RE: [nv-l] Source and destination trap addresses



Hello Jason --

I am certain that I can help you.  I don't work on the OVsnmp API stuff. 
And I am still rather unclear about where you are reading this information 

which leads you to believe that  these are different, though we could have 

a doc problem here, I suppose.  But when I examine the OVsnmpPdu structure 

in 
 /usr/OV/include/OV/OVsnmpApi.h,  it identifies the agent_addr field as 
the source field, not the destination, for the trap. 

   typedef struct SNMPPdu {
        ipaddr  address;            /* Address of peer (destination) */
         int     command;            /* Type of this PDU */
        int     request_id;         /* Request id */
        int     error_status;       /* SNMP PDU specific error status */
        int     error_index;        /* Index for variable with error */

        /*
             * Trap information
        */
        ObjectID    *enterprise;    /* System OID */
        u_int       enterprise_length;
        OVipAddr_t  agent_addr;             /* IP address of object 
generating trap */
        int         generic_type;   /* trap type */
        int         specific_type;  /* specific type */
        u_long      time;           /* 1/100 seconds since application 
startup */

        /*
         * Pdu specific community name:
        *   o  On outbound, if non-NULL, this community string overrides
        *      the default session->community for this Pdu transaction 
only.
        *      If used, the string pointed to by pdu->community must be
        *      dynamically allocated.
         *
         *   o  On inbound, this community string is always set to the
        *      community string in the received message.  This is needed
        *      so an application can perform community specific processing
        *      on inbound messages; especially traps.
         *
        */

            u_char    *community;             /* community for incoming 
traps. */

            u_int     community_length;          /* Length of community 
name. */

            OVsnmpVarBind *variables;
        } OVsnmpPdu;


I can also see that the address field is said to be the address of the 
peer  (destination),  but it would only be the destination on an outgoing 
request, because the same structure is used going both ways.  But as traps 

are always one way, incoming, then if the address field is truly the 
address of the peer, then it would be a match for agent_addr, or so I 
would think. 

But as I said, I don't normally deal with this, so you may have to open a 
problem to Support to get more/ better clarification than that.


James Shanks
Level 3 Support  for Tivoli NetView for UNIX and NT
Tivoli Software / IBM Software Group




"Allison, Jason (JALLISON)" <JALLISON@arinc.com>
11/20/2002 12:27 PM

 
        To:     "'nv-l'" <nv-l@lists.tivoli.com>
        cc: 
        Subject:        RE: [nv-l] Source and destination trap addresses



...

readPdu = OVsnmpRecv(trapSession);

      if (readPdu != NULL) {

...

        // Source Address
        printf("%u\n", readPdu->address.sin_addr.s_addr);

        // Destination Address
        printf("%u\n", readPdu->agent_addr);

...

        /* Free Memory Allocated to Pdu */
        OVsnmpFreePdu(readPdu);


Coming up equal on all traps.  Everything else works fine.

Thanks,

Jason Allison
Principal Engineer
ARINC Incorporated
Office:  (410) 266-2006
FAX:  (410) 573-3026


-----Original Message-----
From: James Shanks [mailto:jshanks@us.ibm.com]
Sent: Wednesday, November 20, 2002 11:10 AM
To: nv-l@lists.tivoli.com
Subject: Re: [nv-l] Source and destination trap addresses


Maybe nothing, if the trap you are working with is a NetView internal one.

What API call are you using? 

James Shanks
Level 3 Support  for Tivoli NetView for UNIX and NT
Tivoli Software / IBM Software Group




"Allison, Jason (JALLISON)" <JALLISON@arinc.com>
11/20/2002 08:32 AM

 
        To:     "'nv-l'" <nv-l@lists.tivoli.com>
        cc: 
        Subject:        [nv-l] Source and destination trap addresses



Having some trouble determining both.  From the API:

Source Address:  readPdu->address.sin_addr.s_addr
Destination Address:  readPdu->agent_addr

Both of these addresses are coming out the same.  What am I missing?

Thanks,

Jason Allison
Principal Engineer
ARINC Incorporated
Office:  (410) 266-2006
FAX:  (410) 573-3026


---------------------------------------------------------------------
To unsubscribe, e-mail: nv-l-unsubscribe@lists.tivoli.com
For additional commands, e-mail: nv-l-help@lists.tivoli.com

*NOTE*
This is not an Offical Tivoli Support forum. If you need immediate
assistance from Tivoli please call the IBM Tivoli Software Group
help line at 1-800-TIVOLI8(848-6548)










---------------------------------------------------------------------
To unsubscribe, e-mail: nv-l-unsubscribe@lists.tivoli.com
For additional commands, e-mail: nv-l-help@lists.tivoli.com

*NOTE*
This is not an Offical Tivoli Support forum. If you need immediate
assistance from Tivoli please call the IBM Tivoli Software Group
help line at 1-800-TIVOLI8(848-6548)




<Prev in Thread] Current Thread [Next in Thread>

Archive operated by Skills 1st Ltd

See also: The NetView Web