Ace_Packet_Attr_Bytes_20_Get()

摘要

从数据包中获取一个 20 字节的属性。

语法

Ace_Packet_Attr_Bytes_20_Get (pk_ptr, attr_name, buffer)
参数 类型 说明
pk_ptr AceT_Packet * 目标数据包。
attr_name const char * 属性名。
buffer char * 用于存放所获取字节的区域。

返回类型

int

状态(1 表示成功,0 表示失败)。

头文件

ace_client_api.h

示例

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