mkDPIAreYouThere()--Make a DPI AreYouThere Packet


  Syntax
 #include <qtossapi.h>

 unsigned char     *mkDPIAreYouThere( void );  


  Service Program Name: QTOSSAPI

  Default Public Authority: *USE

  Threadsafe: No

The mkDPIAreYouThere() function makes a DPI® AreYouThere packet and returns a pointer to the packet.


Authorities and Locks

None.


Parameters

None.


Return Value

value The value returned is a pointer to the DPI packet.

If successful, then a pointer to a static DPI packet buffer is returned. The first two bytes of the buffer (in network byte order) contain the length of the remaining packet. The DPI_PACKET_LEN() function can be used to calculate the total length of the DPI packet.

NULL If unsuccessful, then a NULL pointer is returned.

Be aware that the static buffer for the DPI packet is shared by other mkDPIxxxx() functions that create a serialized DPI packet.

For more information, see the Simple Network Management Protocol (SNMP) SupportLink to PDF manual.


Usage Notes

The mkDPIAreYouThere() function creates a serialized DPI ARE_YOU_THERE packet that can then be sent to the DPI peer (normally the agent).

If your connection to the agent is still intact, the agent will send a DPI RESPONSE with SNMP_ERROR_DPI_noError in the error code field and zero in the error index field. The RESPONSE will have no varbind data. If your connection is not intact, the agent may send a response with an error indication, or may not send a response at all.


Related Information

Example

Note: By using the code examples, you agree to the terms of the Code license and disclaimer information.

 #include <qtossapi.h>
  unsigned char *pack_p;

  pack_p = mkDPIAreYouThere();
  if (pack_p) {
     /* Send the packet to the agent. */
  }

  /* Wait for response with waitDPIpacket().                 */
  /* Normally the response should come back fairly quickly,  */
  /* but it depends on the load of the agent.                */



API introduced: V3R6

[ Back to top | UNIX-Type APIs | APIs by category ]