Ace_Packet_Attr_Bytes_20_Get()

Abstract

Retrieves a 20-byte attribute from a packet.

Syntax

Ace_Packet_Attr_Bytes_20_Get (pk_ptr, attr_name, buffer)
Argument Type Description
pk_ptr AceT_Packet * Packet of interest.
attr_name const char * Attribute name.
buffer char * Area to be filled with the retrieved bytes.

Return Type

int

Status (1 for success, 0 for failure).

ace_client_api.h

Example

packet_ptr = Ace_Netpk_Packet_Get (netpk_ptr);
if (Ace_Packet_Attr_Bytes_20_Get (packet_ptr, OPC_TCP_BYTES_20, tcp_bytes))
	{
	/* We have the newest attributes. */
	is_syn = OPC_TCP_BYTES_IS_SYN (tcp_bytes);
	is_fin = OPC_TCP_BYTES_IS_FIN (tcp_bytes);
	}
else
	{
	/* Check if it is a connection open or a connection close and */
	/* make the transaction. */
	Ace_Packet_Attr_Int_Get (packet_ptr, OPC_TCP_SYN, &is_syn);
	Ace_Packet_Attr_Int_Get (packet_ptr, OPC_TCP_FIN, &is_fin);
	}

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · 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