hello, may be someone know, how I can send packets from collected(via tcpdump) those before in pcap-dump to my target ip? I need this for testing my program with specify protocol without real interaction.
This is a discussion on protocol testing... within the Linux Programming forums, part of the Platform Specific Boards category; hello, may be someone know, how I can send packets from collected(via tcpdump) those before in pcap-dump to my target ...
hello, may be someone know, how I can send packets from collected(via tcpdump) those before in pcap-dump to my target ip? I need this for testing my program with specify protocol without real interaction.
If I have eight hours for cutting wood, I spend six sharpening my axe.
thanks for your reply, but how I can change addres while reading from the dump?
I'm collecting the data to pcap_t and then injecting it and there I'm unsure with 2 and 3 arguments, where I can get it?
pcap_t *p;
// int pcap_inject(pcap_t *p, const void *buf, size_t size)
sentbytes=pcap_inject(p, (void*)&data , sizeof(data) ));
and more over, I can't change second argument, because it's a const.
actually, I can filtering the dump by this...
pcap_compile();
pcap_setfilter();