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.
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.
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
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();