M2-PT-DRP/source/utils/network/network.hpp
study-faraphel a7c1bba666 reorganised some parts of the code
Utils moved to subdirectories
Task activation have been moved to static member of the Task class, instead of being manually activated.
2024-11-26 21:57:37 +01:00

19 lines
394 B
C++

#pragma once
#include <cstddef>
#include <sys/socket.h>
namespace drp::util::network {
/**
* Indicate if an address refer to the local machine.
* @param address the address to check.
* @param addressLength the length of the address.
* @return True if the address refer to ourselves, False otherwise.
*/
bool is_localhost(const sockaddr_storage& address, socklen_t addressLength);
}