lokinet/llarp/net/net_if.hpp

18 lines
359 B
C++
Raw Normal View History

#ifndef LLARP_NET_NET_IF_HPP
#define LLARP_NET_NET_IF_HPP
2019-10-22 15:58:34 +00:00
#ifndef _WIN32
// this file is a shim include for #include <net/if.h>
2019-12-15 12:09:19 +00:00
#if defined(__linux__)
#include <linux/if.h>
extern "C" unsigned int
2020-02-17 23:54:19 +00:00
#ifndef __GLIBC__
if_nametoindex(const char* __ifname);
#else
if_nametoindex(const char* __ifname) __THROW;
2020-02-17 23:54:19 +00:00
#endif
#else
#include <net/if.h>
#endif
#endif
2019-10-22 15:58:34 +00:00
#endif