Export tuple.h / packet.h / session.h to the include directory
This commit is contained in:
@@ -210,7 +210,6 @@ int packet_io_dumpfile_ingress(struct packet_io_dumpfile *handle, uint16_t threa
|
||||
return nr_parsed;
|
||||
}
|
||||
|
||||
// pkts from packet_io_dumpfile_ingress
|
||||
void packet_io_dumpfile_egress(struct packet_io_dumpfile *handle, uint16_t thread_id, struct packet *pkts, int nr_pkts)
|
||||
{
|
||||
struct packet *pkt = NULL;
|
||||
@@ -222,12 +221,14 @@ void packet_io_dumpfile_egress(struct packet_io_dumpfile *handle, uint16_t threa
|
||||
ATOMIC_ADD(&handle->stat.tx_bytes, packet_get_len(pkt));
|
||||
|
||||
struct pcap_pkt *pcap_pkt = (struct pcap_pkt *)packet_get_user_data(pkt);
|
||||
assert(pcap_pkt != NULL);
|
||||
free(pcap_pkt);
|
||||
if (pcap_pkt)
|
||||
{
|
||||
free(pcap_pkt);
|
||||
}
|
||||
packet_free(pkt);
|
||||
}
|
||||
}
|
||||
|
||||
// pkts from packet_io_dumpfile_ingress
|
||||
void packet_io_dumpfile_drop(struct packet_io_dumpfile *handle, uint16_t thread_id, struct packet *pkts, int nr_pkts)
|
||||
{
|
||||
struct packet *pkt = NULL;
|
||||
@@ -239,12 +240,14 @@ void packet_io_dumpfile_drop(struct packet_io_dumpfile *handle, uint16_t thread_
|
||||
ATOMIC_ADD(&handle->stat.drop_bytes, packet_get_len(pkt));
|
||||
|
||||
struct pcap_pkt *pcap_pkt = (struct pcap_pkt *)packet_get_user_data(pkt);
|
||||
assert(pcap_pkt != NULL);
|
||||
free(pcap_pkt);
|
||||
if (pcap_pkt)
|
||||
{
|
||||
free(pcap_pkt);
|
||||
}
|
||||
packet_free(pkt);
|
||||
}
|
||||
}
|
||||
|
||||
// pkts build by packet_new
|
||||
void packet_io_dumpfile_inject(struct packet_io_dumpfile *handle, uint16_t thread_id, struct packet *pkts, int nr_pkts)
|
||||
{
|
||||
struct packet *pkt = NULL;
|
||||
@@ -255,8 +258,11 @@ void packet_io_dumpfile_inject(struct packet_io_dumpfile *handle, uint16_t threa
|
||||
ATOMIC_ADD(&handle->stat.inject_pkts, 1);
|
||||
ATOMIC_ADD(&handle->stat.inject_bytes, packet_get_len(pkt));
|
||||
|
||||
assert(packet_get_user_data(pkt) == NULL);
|
||||
|
||||
struct pcap_pkt *pcap_pkt = (struct pcap_pkt *)packet_get_user_data(pkt);
|
||||
if (pcap_pkt)
|
||||
{
|
||||
free(pcap_pkt);
|
||||
}
|
||||
packet_free(pkt);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user