---
title: llarp/net/net_if.hpp

---

# llarp/net/net_if.hpp



## Namespaces

| Name           |
| -------------- |
| **[llarp](Namespaces/namespacellarp.md)** <br>[crypto.hpp] |
| **[llarp::net](Namespaces/namespacellarp_1_1net.md)**  |




## Source code

```cpp
#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

namespace llarp::net
{
  std::string
  LoopbackInterfaceName();
}  // namespace llarp::net
```


-------------------------------

Updated on 2025-01-26 at 05:10:09 +0000
