enhance: imitate_tcp_packet() support setting tcp options
This commit is contained in:
@@ -388,7 +388,7 @@ static void imitate_and_send_tcp_packet(struct stellar *st, struct session *sess
|
||||
return;
|
||||
}
|
||||
|
||||
struct packet *imitate_pkt = imitate_tcp_packet(origin_pkt, tcp_seq, tcp_ack, tcp_flags, tcp_payload, tcp_payload_len);
|
||||
struct packet *imitate_pkt = imitate_tcp_packet(origin_pkt, tcp_seq, tcp_ack, tcp_flags, NULL, 0, tcp_payload, tcp_payload_len);
|
||||
if (imitate_pkt == NULL)
|
||||
{
|
||||
LOG_ERR("imitate TCP packet failed\n");
|
||||
|
||||
@@ -288,7 +288,7 @@ static void craft_compare(const struct runtime *rte, const struct packet *raw_pk
|
||||
error_out:
|
||||
char file[256] = {0};
|
||||
snprintf(file, sizeof(file), "craft%lu.pcap", rte->pcap_count);
|
||||
packet_dump(file, new_pkt_data, new_pkt_len);
|
||||
packet_dump_pcap(new_pkt, file);
|
||||
packet_free(new_pkt);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user