mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-15 12:13:24 +00:00
25 lines
463 B
C++
25 lines
463 B
C++
#pragma once
|
|
#ifndef _WIN32
|
|
// this file is a shim include for #include <net/if.h>
|
|
#if defined(__linux__)
|
|
#include <linux/if.h>
|
|
extern "C" unsigned int
|
|
#ifndef __GLIBC__
|
|
if_nametoindex(const char* __ifname);
|
|
#else
|
|
if_nametoindex(const char* __ifname) __THROW;
|
|
#endif
|
|
#else
|
|
#include <net/if.h>
|
|
#endif
|
|
#endif
|
|
|
|
#include <string>
|
|
|
|
namespace llarp::net
|
|
{
|
|
/// get the name of the loopback interface
|
|
std::string
|
|
LoopbackInterfaceName();
|
|
} // namespace llarp::net
|