Ace_Protocol_Info_Offset_Get()
Abstract
Returns the offset of the protocol in the packet binary.
Syntax
Ace_Protocol_Info_Offset_Get (info_ptr)
| Argument | Type | Description |
|---|---|---|
info_ptr |
AceT_Pk_Protocol_Info * |
Protocol information of interest. |
Return Type
int
Offset of the protocol, in bytes.
Header
ace_client_api.h
Example
AceT_Decode_Status
op_tcp_decoder_details (void * state_ptr, AceT_Packet * pk_ptr, int layer,
PrgT_List * details_lptr)
{
AceT_Decode_Status retval = AceC_Decode_OK;
OpT_Tcp_Info tcp_info;
AceT_Pk_Protocol_Info * tcp_protocol_info_ptr;
int offset;
unsigned char * tcp_data;
FIN (op_tcp_decoder_details);
/* Make sure all of tcpinfo's members are initialized to 0. */
memset (&tcp_info, 0, sizeof (OpT_Tcp_Info));
tcp_protocol_info_ptr = Ace_Packet_Protocol_Info_Get (pk_ptr, layer);
offset = Ace_Protocol_Info_Offset_Get (tcp_protocol_info_ptr);
retval = op_tcp_info_obtain (pk_ptr, layer, offset, &tcp_info, &tcp_data);
if (retval == AceC_Decode_OK)
{
op_tcp_details_make (pk_ptr, &tcp_info, details_lptr);
}
FRET (retval);
}