Syntax
#include <snmp_dpi.h> int DPI_PACKET_LEN(unsigned char *packet_p)
Parameters
packet_p
Return Values
An integer representing the total DPI packet length.
Description
The DPI_PACKET_LEN macro generates C-code that returns an integer representing the length of a DPI packet. It uses the first two octets in network byte order of the packet to calculate the length.
Examples
#include <snmp_dpi.h> unsigned char *pack_p;
int length;
pack_p = mkDPIclose(SNMP_CLOSE_goingDown);
if (pack_p) {
length = DPI_PACKET_LEN(pack_p);
/* send packet to agent or subagent */
} /* endif */