2021-03-09 22:24:35 +00:00
|
|
|
#pragma once
|
2019-10-22 15:58:34 +00:00
|
|
|
#ifndef _WIN32
|
2019-10-22 15:08:52 +00:00
|
|
|
// this file is a shim include for #include <net/if.h>
|
2019-12-15 12:09:19 +00:00
|
|
|
#if defined(__linux__)
|
2019-10-22 15:08:52 +00:00
|
|
|
#include <linux/if.h>
|
|
|
|
extern "C" unsigned int
|
2020-02-17 23:54:19 +00:00
|
|
|
#ifndef __GLIBC__
|
|
|
|
if_nametoindex(const char* __ifname);
|
|
|
|
#else
|
2019-10-22 15:08:52 +00:00
|
|
|
if_nametoindex(const char* __ifname) __THROW;
|
2020-02-17 23:54:19 +00:00
|
|
|
#endif
|
2019-10-22 15:08:52 +00:00
|
|
|
#else
|
|
|
|
#include <net/if.h>
|
|
|
|
#endif
|
|
|
|
#endif
|
2020-06-11 11:44:02 +00:00
|
|
|
|
2023-10-19 21:59:57 +00:00
|
|
|
#include <string>
|
|
|
|
|
2020-06-11 11:44:02 +00:00
|
|
|
namespace llarp::net
|
|
|
|
{
|
|
|
|
/// get the name of the loopback interface
|
|
|
|
std::string
|
|
|
|
LoopbackInterfaceName();
|
|
|
|
} // namespace llarp::net
|