On 7/9/22 02:47, Saulius Krasuckas wrote:
On 2022-07-09 01:25, Zebediah Figura wrote:
On 7/5/22 14:53, Paul Gofman wrote:
...
+static void test_icmp(const char *dest_addr)
Any reason to pass this as a parameter? I'm guessing it's convenient to test ping over a real adapter, but presumably it can also just be edited inside the function...
Now it's doing:
- test_icmp("127.0.0.1");
What if someone adds a real adapter identifying logic and invokes test for it too? Eg. to see the differences between it and the loopback. Will it require to duplicate all of the function's body? This would seem like a wasted efforts to me. It does at least without having actual differences at hand (proving to be too many inconsistencies between both runs and it being worth to rewrite the body for a real adapter).
No, why would it? It'd be simple to turn that back into a parameter.