mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-09 13:10:25 +00:00
18 lines
394 B
C++
18 lines
394 B
C++
|
#ifndef LLARP_LINUX_NETNS_HPP
|
||
|
#define LLARP_LINUX_NETNS_HPP
|
||
|
#ifdef __linux__
|
||
|
namespace llarp
|
||
|
{
|
||
|
namespace linux
|
||
|
{
|
||
|
/// switch current process to use network namepsace by name
|
||
|
/// returns true if successfully switched otherwise returns false
|
||
|
bool
|
||
|
NetNSSwitch(const char* name);
|
||
|
} // namespace linux
|
||
|
} // namespace llarp
|
||
|
#else
|
||
|
#error "Don't include this file"
|
||
|
#endif
|
||
|
#endif
|