Ace_Packet_Protocol_Info_Append()
Abstract
Appends information about a protocol layer to a packet.
Syntax
Ace_Packet_Protocol_Info_Append (pk_ptr, protocol, offset)
| Argument | Type | Description |
|---|---|---|
pk_ptr |
AceT_Packet * |
Packet of interest. |
protocol |
const char * |
Name of the protocol to be added to the stack. |
offset |
int |
Offset to the start of the protocol, in bytes. |
Return Type
AceT_Pk_Protocol_Info *
Protocol information, or PRGC_NIL if the protocol is unknown to the Transaction Analyzer decoder.
Header
ace_client_api.h
Example
/* Create the protocol info */
proto_info_ptr = Ace_Packet_Protocol_Info_Append (pk_ptr, "TCP", offset);
op_tcp_summary_make (summary_str, &tcp_info);
Ace_Protocol_Info_Summary_Set (proto_info_ptr, summary_str);
Ace_Packet_Payload_Length_Set (pk_ptr, tcp_info.tcp_payload_len);
Details
This function determines the ID corresponding to protocol, creates a new instance of an AceT_Pk_Protocol_Info data structure, and appends it to the specified packet. It is typically called in the decode_proc (see AceT_Decoder_Decode_Proc for details) when a decoder is adding an additional layer to a protocol stack decode.