On Fri Nov 22 17:22:17 2024 +0000, Thi Garlet wrote:
Thx, I was not understanding that the win fail was with native iphlpapi.dll; what was the result of SendARP(0, 0, NULL, NULL) ?
"(PULONG) &MacAddr"
I had to put the cast because of warnings, and the '&' because MacAddr on test is not malloc'ed anymore I also got 127.0.0.1 returning mac == 0 (wich is what correct looking at `ip a`) 255.255.255.255 crossed my mind, but just forgot. thx Should I close this request, redo the commit and make a new merge request ?
It's an array, so you can use it as a pointer as is. Taking the address of an array is almost never correct. (I think it will do the right thing, but it'll confuse readers.)
Testing the returned length of the mac address sounds like a good idea. Feel free to test both 127.0.0.1 and 255.255.255.255, more tests never hurt.
Redo the commit and force push, and it'll show up in this MR. Closing and recreating just sounds like a waste of time for everyone.