Ace_Packet_Num_Protocols_Get()
Abstract
Returns the number of protocol layers decoded thus far for a packet.
Syntax
Ace_Packet_Num_Protocols_Get (pk_ptr)
| Argument | Type | Description |
|---|---|---|
pk_ptr |
AceT_Packet * |
Packet of interest. |
Return Type
int
Number of protocols.
Header
ace_client_api.h
Example
int num_layers = Ace_Packet_Num_Protocols_Get (pk_ptr);
int tcp_protocol_id = Ace_Decoder_Protocol_ID_Get (import_ptr, "TCP");
// Need at least three layers for TCP application
if (tcp_protocol_id >= 0 && num_layers > 2)
...