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