please dont rip this site Prev Next

SnmpExtensionTrap info  Overview  Group

The extensible agent calls the SnmpExtensionTrap function in the extension agent DLL to retrieve traps generated by the extension agent.

BOOL SnmpExtensionTrap(

    AsnObjectIdentifier *enterprise,

// Generating enterprise

    AsnInteger *genericTrap,

// Generating trap type

    AsnInteger *specificTrap,

// Enterprise specific type

    AsnTimeticks *timeStamp,

// Time stamp

    RFC1157VarBindList *variableBindings

// Variable bindings

   );

Parameters

enterprise
[out] Points to an object identifier that indicates the originating object generating the trap. The extensible agent does not free the memory for this variable.
genericTrap
[out] Points to an indication of the generic trap. This parameter can be one of the following values:

Value

Meaning

SNMP_GENERICTRAP_COLDSTART

The agent is initializing protocol entities on the managed mode. It may alter objects in its view.

SNMP_GENERICTRAP_WARMSTART

The agent is re-initializing itself but will not alter objects within its view.

SNMP_GENERICTRAP_LINKDOWN

An attached interface has changed from the up state to the down state. The first variable identifies the interface.

SNMP_GENERICTRAP_LINKUP

An attached interface has changed from the down state to the up state. The first variable identifies the interface.

SNMP_GENERICTRAP_AUTHFAILURE

An SNMP entity has sent an SNMP message, but has falsely claimed to belong to a known community.

SNMP_GENERICTRAP_EGPNEIGHLOSS

An EGP peer has changed to the down state. The first variable identifies the IP address of the EGP peer.

SNMP_GENERICTRAP_ENTERSPECIFIC

Signals an extraordinary event that is identified in the specific-trap parameter.

specificTrap
[out] Points to an indication of the specific trap generated.
timeStamp
[out] Points to a variable to receive the time stamp.
variableBindings
[out] Points to the variable bindings list. The memory for the list will be allocated by the extension agent. The extensible agent will free the memory with a call to the SnmpUtilVarBindListFree function.

Return Values

If the SnmpExtensionTrap function returns a trap in its parameters, the return value is TRUE. Otherwise, the extensible agent repeatedly calls the function until it returns a value of FALSE.

Remarks

The extensible agent repeatedly calls the SnmpExtensionTrap function once the hPollForTrapEvent event handle of the SnmpExtensionInit function has been set to the signaled state. Each successful call returns data from a single trap. It returns FALSE to indicate that its parameters do not represent valid trap data and to stop the extensible agent’s repeated calls.

The extension agent must not free the memory for the variableBindings parameter. The extensible agent automatically performs this action. Use the SnmpUtilMemAlloc function to allocate memory for each RFC1157VarBind structure.

It is important to note that earlier documentation stated that the extension agent should dynamically allocate memory for the enterprise object identifier because the extensible agent would attempt to release the memory after sending a trap. The extensible agent will not release the memory associated with the enterprise object identifier. The recommendation is that you return a pointer to a static AsnObjectIdentifier structure instead.

See Also

SetEvent, SnmpUtilMemAlloc, SnmpUtilVarBindListFree, RFC1157VarBindList, SnmpExtensionInit


file: /Techref/os/win/api/win32/func/src/f86.htm, 6KB, , updated: 2000/4/7 11:19, local time: 2024/11/26 15:59,
TOP NEW HELP FIND: 
18.216.53.7:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://sxlist.com/techref/os/win/api/win32/func/src/f86.htm"> SnmpExtensionTrap</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to sxlist.com!


Site supported by
sales, advertizing,
& kind contributors
just like you!

Please don't rip/copy
(here's why

Copies of the site on CD
are available at minimal cost.
 

Welcome to sxlist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .