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.

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);
	}

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com