long long int used; /* Last used time, in monotonic msecs. */
long long int packet_count; /* Number of packets matched. */
long long int byte_count; /* Number of bytes matched. */
- ovs_be16 tcp_ctl; /* Bitwise-OR of seen tcp_ctl values. */
+ ovs_be16 tcp_flags; /* Bitwise-OR of seen tcp_flags values. */
/* Actions. */
struct nlattr *actions;
stats->n_packets = flow->packet_count;
stats->n_bytes = flow->byte_count;
stats->used = flow->used;
- stats->tcp_flags = TCP_FLAGS(flow->tcp_ctl);
+ stats->tcp_flags = flow->tcp_flags;
}
static int
flow->used = 0;
flow->packet_count = 0;
flow->byte_count = 0;
- flow->tcp_ctl = 0;
+ flow->tcp_flags = 0;
}
static int
flow->used = time_msec();
flow->packet_count++;
flow->byte_count += packet->size;
- if (key->dl_type == htons(ETH_TYPE_IP) && key->nw_proto == IPPROTO_TCP) {
- struct tcp_header *th = packet->l4;
- flow->tcp_ctl |= th->tcp_ctl;
- }
+ flow->tcp_flags |= packet_get_tcp_flags(packet, key);
}
static void