Debian Codegraph @

runtime/netns_socket.h

raw
1 /* Definitions for netns_socket API
2 *
3 * This file is part of rsyslog.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 * -or-
11 * see COPYING.ASL20 in the source distribution
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19 #ifndef INCLUDED_NETNS_SOCKET_H
20 #define INCLUDED_NETNS_SOCKET_H
21
22 #include "rsyslog.h"
23
24 /*
25 * Open a socket in the named network namespace
26 */
27 rsRetVal netns_socket(int *fdp, int domain, int type, int protocol, const char *ns);
28
29 /*
30 * Switch to the named networknamespace
31 */
32 rsRetVal netns_switch(const char *ns);
33
34 /*
35 * Save and restore our current network namespace
36 */
37 rsRetVal ATTR_NONNULL() netns_save(int *fd);
38 rsRetVal ATTR_NONNULL() netns_restore(int *fd);
39
40 #endif /* #ifndef INCLUDED_NETNS_SOCKET_H */