blob: 3b91ba3830b3df599d12c51d5091605c3b561a5a [file] [log] [blame]
Harald Weltef7365592020-04-15 21:48:45 +02001/*
2 * Copyright (C) 2014-2017, Travelping GmbH <info@travelping.com>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Affero General Public License as
6 * published by the Free Software Foundation, either version 3 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Affero General Public License for more details.
13 *
14 * You should have received a copy of the GNU Affero General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 */
18
19#ifndef __NETNS_H
20#define __NETNS_H
21
22#if defined(__linux__)
23
24int init_netns(void);
25
26int switch_ns(int nsfd, sigset_t *oldmask);
27int restore_ns(sigset_t *oldmask);
28
29int open_ns(int nsfd, const char *pathname, int flags);
30int socket_ns(int nsfd, int domain, int type, int protocol);
31int get_nsfd(const char *name);
32
33#endif
34
35#endif