Вот фрагмент кода, в котором я устанавливаю этот параметр:
Код: Выделить всё
if (setsockopt(sock, IPPROTO_IP, IP_HDRINCL, reinterpret_cast(&optval), sizeof(optval)) < 0) {
std::cerr
Подробнее здесь: [url]https://stackoverflow.com/questions/79169570/issue-with-ip-hdrincl-causing-client-to-miss-packets-in-raw-socket-communication[/url]