mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-02 07:17:57 +02:00
Imported n-dhcp4 code with command: git subtree add --prefix shared/n-dhcp4/ git@github.com:nettools/n-dhcp4.git master --squash To update the library use: git subtree pull --prefix shared/n-dhcp4/ git@github.com:nettools/n-dhcp4.git master --squash
27 lines
588 B
C
27 lines
588 B
C
#pragma once
|
|
|
|
/*
|
|
* Network Namespaces
|
|
*
|
|
* The netns utility provides an object-based API to network namespaces. It is
|
|
* meant for testing purposes only.
|
|
*/
|
|
|
|
#include <c-stdaux.h>
|
|
#include <stdlib.h>
|
|
|
|
void netns_new(int *netnsp);
|
|
void netns_new_dup(int *newnsp, int netns);
|
|
int netns_close(int netns);
|
|
|
|
void netns_get(int *netnsp);
|
|
void netns_set(int netns);
|
|
void netns_set_anonymous(void);
|
|
|
|
void netns_pin(int netns, const char *name);
|
|
void netns_unpin(const char *name);
|
|
|
|
static inline void netns_closep(int *netns) {
|
|
if (*netns >= 0)
|
|
netns_close(*netns);
|
|
}
|