#include <qtossapi.h> unsigned char *mkDPIunregister( char reason_code, char *group_p);
The mkDPIunregister() function makes a DPI unregister packet and returns a pointer to the packet.
None.
pointer value | The mkDPIunregister() function
was successful. 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 2 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 | The mkDPIunregister() function
was not successful.
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 "SNMP Subagent Problem Determination" in the Simple Network Management Protocol book.
The mkDPIunregister() function creates a serialized DPI UNREGISTER packet that can then be sent to the SNMP agent. Normally, the SNMP peer then sends a DPI RESPONSE packet back, which details if the unregister was successful or not.
See Code disclaimer information for information pertaining to code examples.
#include <qtossapi.h> unsigned char *pack_p; pack_p = mkDPIunregister( SNMP_UNREGISTER_goingDown, "1.3.6.1.2.3.4.5."); if (pack_p) { /* Send packet to agent or subagent and await response. */ }
Top | UNIX-Type APIs | APIs by category |