libosmocore 1.13.1.12-8e6ea
Osmocom core library
netns.h
Go to the documentation of this file.
1
4#pragma once
5
6#include <signal.h>
7
9 sigset_t prev_sigmask;
11};
12
13int osmo_netns_open_fd(const char *name);
14int osmo_netns_switch_enter(int nsfd, struct osmo_netns_switch_state *state);
16
const char * name
int osmo_netns_switch_enter(int nsfd, struct osmo_netns_switch_state *state)
switch to a (non-default) namespace, store existing signal mask in oldmask.
Definition: netns.c:80
int osmo_netns_switch_exit(struct osmo_netns_switch_state *state)
switch back to the previous namespace, restoring signal mask.
Definition: netns.c:110
int osmo_netns_open_fd(const char *name)
Open a file descriptor for the network namespace with provided name.
Definition: netns.c:206
Definition: netns.h:8
int prev_nsfd
Definition: netns.h:10
sigset_t prev_sigmask
Definition: netns.h:9