Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
0144cea2
Unverified
Commit
0144cea2
authored
Jul 20, 2020
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
network: hide unnecessary symbols
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
6d95db4c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
106 additions
and
62 deletions
+106
-62
Makefile.am
src/lxc/Makefile.am
+49
-1
network.h
src/lxc/network.h
+57
-61
No files found.
src/lxc/Makefile.am
View file @
0144cea2
...
@@ -127,8 +127,8 @@ liblxc_la_SOURCES = af_unix.c af_unix.h \
...
@@ -127,8 +127,8 @@ liblxc_la_SOURCES = af_unix.c af_unix.h \
memory_utils.h
\
memory_utils.h
\
mainloop.c mainloop.h
\
mainloop.c mainloop.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
nl.c nl.h
\
network.c network.h
\
network.c network.h
\
nl.c nl.h
\
monitor.c monitor.h
\
monitor.c monitor.h
\
parse.c parse.h
\
parse.c parse.h
\
process_utils.c process_utils.h
\
process_utils.c process_utils.h
\
...
@@ -340,6 +340,8 @@ lxc_attach_SOURCES = tools/lxc_attach.c \
...
@@ -340,6 +340,8 @@ lxc_attach_SOURCES = tools/lxc_attach.c \
initutils.c initutils.h
\
initutils.c initutils.h
\
log.c log.h
\
log.c log.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
rexec.c rexec.h
\
rexec.c rexec.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
if
ENABLE_SECCOMP
if
ENABLE_SECCOMP
...
@@ -357,6 +359,8 @@ lxc_autostart_SOURCES = tools/lxc_autostart.c \
...
@@ -357,6 +359,8 @@ lxc_autostart_SOURCES = tools/lxc_autostart.c \
initutils.c initutils.h
\
initutils.c initutils.h
\
log.c log.h
\
log.c log.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
if
ENABLE_SECCOMP
if
ENABLE_SECCOMP
lxc_autostart_SOURCES
+=
seccomp.c lxcseccomp.h
lxc_autostart_SOURCES
+=
seccomp.c lxcseccomp.h
...
@@ -373,6 +377,8 @@ lxc_cgroup_SOURCES = tools/lxc_cgroup.c \
...
@@ -373,6 +377,8 @@ lxc_cgroup_SOURCES = tools/lxc_cgroup.c \
initutils.c initutils.h
\
initutils.c initutils.h
\
log.c log.h
\
log.c log.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
if
ENABLE_SECCOMP
if
ENABLE_SECCOMP
lxc_cgroup_SOURCES
+=
seccomp.c lxcseccomp.h
lxc_cgroup_SOURCES
+=
seccomp.c lxcseccomp.h
...
@@ -389,6 +395,8 @@ lxc_config_SOURCES = tools/lxc_config.c \
...
@@ -389,6 +395,8 @@ lxc_config_SOURCES = tools/lxc_config.c \
initutils.c initutils.h
\
initutils.c initutils.h
\
log.c log.h
\
log.c log.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
if
ENABLE_SECCOMP
if
ENABLE_SECCOMP
lxc_config_SOURCES
+=
seccomp.c lxcseccomp.h
lxc_config_SOURCES
+=
seccomp.c lxcseccomp.h
...
@@ -405,6 +413,8 @@ lxc_console_SOURCES = tools/lxc_console.c \
...
@@ -405,6 +413,8 @@ lxc_console_SOURCES = tools/lxc_console.c \
initutils.c initutils.h
\
initutils.c initutils.h
\
log.c log.h
\
log.c log.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
if
ENABLE_SECCOMP
if
ENABLE_SECCOMP
lxc_console_SOURCES
+=
seccomp.c lxcseccomp.h
lxc_console_SOURCES
+=
seccomp.c lxcseccomp.h
...
@@ -421,6 +431,8 @@ lxc_destroy_SOURCES = tools/lxc_destroy.c \
...
@@ -421,6 +431,8 @@ lxc_destroy_SOURCES = tools/lxc_destroy.c \
initutils.c initutils.h
\
initutils.c initutils.h
\
log.c log.h
\
log.c log.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
if
ENABLE_SECCOMP
if
ENABLE_SECCOMP
lxc_destroy_SOURCES
+=
seccomp.c lxcseccomp.h
lxc_destroy_SOURCES
+=
seccomp.c lxcseccomp.h
...
@@ -437,6 +449,8 @@ lxc_device_SOURCES = tools/lxc_device.c \
...
@@ -437,6 +449,8 @@ lxc_device_SOURCES = tools/lxc_device.c \
initutils.c initutils.h
\
initutils.c initutils.h
\
log.c log.h
\
log.c log.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
if
ENABLE_SECCOMP
if
ENABLE_SECCOMP
lxc_device_SOURCES
+=
seccomp.c lxcseccomp.h
lxc_device_SOURCES
+=
seccomp.c lxcseccomp.h
...
@@ -453,6 +467,8 @@ lxc_execute_SOURCES = tools/lxc_execute.c \
...
@@ -453,6 +467,8 @@ lxc_execute_SOURCES = tools/lxc_execute.c \
initutils.c initutils.h
\
initutils.c initutils.h
\
log.c log.h
\
log.c log.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
if
ENABLE_SECCOMP
if
ENABLE_SECCOMP
lxc_execute_SOURCES
+=
seccomp.c lxcseccomp.h
lxc_execute_SOURCES
+=
seccomp.c lxcseccomp.h
...
@@ -469,6 +485,8 @@ lxc_freeze_SOURCES = tools/lxc_freeze.c \
...
@@ -469,6 +485,8 @@ lxc_freeze_SOURCES = tools/lxc_freeze.c \
initutils.c initutils.h
\
initutils.c initutils.h
\
log.c log.h
\
log.c log.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
if
ENABLE_SECCOMP
if
ENABLE_SECCOMP
lxc_freeze_SOURCES
+=
seccomp.c lxcseccomp.h
lxc_freeze_SOURCES
+=
seccomp.c lxcseccomp.h
...
@@ -485,6 +503,8 @@ lxc_info_SOURCES = tools/lxc_info.c \
...
@@ -485,6 +503,8 @@ lxc_info_SOURCES = tools/lxc_info.c \
initutils.c initutils.h
\
initutils.c initutils.h
\
log.c log.h
\
log.c log.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
if
ENABLE_SECCOMP
if
ENABLE_SECCOMP
lxc_info_SOURCES
+=
seccomp.c lxcseccomp.h
lxc_info_SOURCES
+=
seccomp.c lxcseccomp.h
...
@@ -503,6 +523,8 @@ lxc_monitor_SOURCES = tools/lxc_monitor.c \
...
@@ -503,6 +523,8 @@ lxc_monitor_SOURCES = tools/lxc_monitor.c \
macro.h
\
macro.h
\
monitor.c monitor.h
\
monitor.c monitor.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
if
ENABLE_SECCOMP
if
ENABLE_SECCOMP
lxc_monitor_SOURCES
+=
seccomp.c lxcseccomp.h
lxc_monitor_SOURCES
+=
seccomp.c lxcseccomp.h
...
@@ -520,6 +542,8 @@ lxc_ls_SOURCES = tools/lxc_ls.c \
...
@@ -520,6 +542,8 @@ lxc_ls_SOURCES = tools/lxc_ls.c \
log.c log.h
\
log.c log.h
\
memory_utils.h
\
memory_utils.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
if
ENABLE_SECCOMP
if
ENABLE_SECCOMP
lxc_ls_SOURCES
+=
seccomp.c lxcseccomp.h
lxc_ls_SOURCES
+=
seccomp.c lxcseccomp.h
...
@@ -536,6 +560,8 @@ lxc_copy_SOURCES = tools/lxc_copy.c \
...
@@ -536,6 +560,8 @@ lxc_copy_SOURCES = tools/lxc_copy.c \
initutils.c initutils.h
\
initutils.c initutils.h
\
log.c log.h
\
log.c log.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
storage/storage_utils.c storage/storage_utils.h
\
storage/storage_utils.c storage/storage_utils.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
if
ENABLE_SECCOMP
if
ENABLE_SECCOMP
...
@@ -553,6 +579,8 @@ lxc_start_SOURCES = tools/lxc_start.c \
...
@@ -553,6 +579,8 @@ lxc_start_SOURCES = tools/lxc_start.c \
initutils.c initutils.h
\
initutils.c initutils.h
\
log.c log.h
\
log.c log.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
if
ENABLE_SECCOMP
if
ENABLE_SECCOMP
lxc_start_SOURCES
+=
seccomp.c lxcseccomp.h
lxc_start_SOURCES
+=
seccomp.c lxcseccomp.h
...
@@ -570,6 +598,8 @@ lxc_stop_SOURCES = tools/lxc_stop.c \
...
@@ -570,6 +598,8 @@ lxc_stop_SOURCES = tools/lxc_stop.c \
log.c log.h
\
log.c log.h
\
mainloop.c mainloop.h
\
mainloop.c mainloop.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
if
ENABLE_SECCOMP
if
ENABLE_SECCOMP
lxc_stop_SOURCES
+=
seccomp.c lxcseccomp.h
lxc_stop_SOURCES
+=
seccomp.c lxcseccomp.h
...
@@ -587,6 +617,8 @@ lxc_top_SOURCES = tools/lxc_top.c \
...
@@ -587,6 +617,8 @@ lxc_top_SOURCES = tools/lxc_top.c \
log.c log.h
\
log.c log.h
\
mainloop.c mainloop.h
\
mainloop.c mainloop.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
if
ENABLE_SECCOMP
if
ENABLE_SECCOMP
lxc_top_SOURCES
+=
seccomp.c lxcseccomp.h
lxc_top_SOURCES
+=
seccomp.c lxcseccomp.h
...
@@ -603,6 +635,8 @@ lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c \
...
@@ -603,6 +635,8 @@ lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c \
initutils.c initutils.h
\
initutils.c initutils.h
\
log.c log.h
\
log.c log.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
if
ENABLE_SECCOMP
if
ENABLE_SECCOMP
lxc_unfreeze_SOURCES
+=
seccomp.c lxcseccomp.h
lxc_unfreeze_SOURCES
+=
seccomp.c lxcseccomp.h
...
@@ -619,6 +653,8 @@ lxc_unshare_SOURCES = tools/lxc_unshare.c \
...
@@ -619,6 +653,8 @@ lxc_unshare_SOURCES = tools/lxc_unshare.c \
initutils.c initutils.h
\
initutils.c initutils.h
\
log.c log.h
\
log.c log.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
string_utils.c string_utils.h
\
string_utils.c string_utils.h
\
syscall_numbers.h
\
syscall_numbers.h
\
syscall_wrappers.h
syscall_wrappers.h
...
@@ -637,6 +673,8 @@ lxc_wait_SOURCES = tools/lxc_wait.c \
...
@@ -637,6 +673,8 @@ lxc_wait_SOURCES = tools/lxc_wait.c \
initutils.c initutils.h
\
initutils.c initutils.h
\
log.c log.h
\
log.c log.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
if
ENABLE_SECCOMP
if
ENABLE_SECCOMP
lxc_wait_SOURCES
+=
seccomp.c lxcseccomp.h
lxc_wait_SOURCES
+=
seccomp.c lxcseccomp.h
...
@@ -653,6 +691,8 @@ lxc_create_SOURCES = tools/lxc_create.c \
...
@@ -653,6 +691,8 @@ lxc_create_SOURCES = tools/lxc_create.c \
initutils.c initutils.h
\
initutils.c initutils.h
\
log.c log.h
\
log.c log.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
storage/storage_utils.c storage/storage_utils.h
\
storage/storage_utils.c storage/storage_utils.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
if
ENABLE_SECCOMP
if
ENABLE_SECCOMP
...
@@ -670,6 +710,8 @@ lxc_snapshot_SOURCES = tools/lxc_snapshot.c \
...
@@ -670,6 +710,8 @@ lxc_snapshot_SOURCES = tools/lxc_snapshot.c \
initutils.c initutils.h
\
initutils.c initutils.h
\
log.c log.h
\
log.c log.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
if
ENABLE_SECCOMP
if
ENABLE_SECCOMP
lxc_snapshot_SOURCES
+=
seccomp.c lxcseccomp.h
lxc_snapshot_SOURCES
+=
seccomp.c lxcseccomp.h
...
@@ -686,6 +728,8 @@ lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c \
...
@@ -686,6 +728,8 @@ lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c \
initutils.c initutils.h
\
initutils.c initutils.h
\
log.c log.h
\
log.c log.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
string_utils.c string_utils.h
string_utils.c string_utils.h
if
ENABLE_SECCOMP
if
ENABLE_SECCOMP
lxc_checkpoint_SOURCES
+=
seccomp.c lxcseccomp.h
lxc_checkpoint_SOURCES
+=
seccomp.c lxcseccomp.h
...
@@ -725,6 +769,8 @@ lxc_monitord_SOURCES = cmd/lxc_monitord.c \
...
@@ -725,6 +769,8 @@ lxc_monitord_SOURCES = cmd/lxc_monitord.c \
mainloop.c mainloop.h
\
mainloop.c mainloop.h
\
monitor.c monitor.h
\
monitor.c monitor.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
process_utils.c process_utils.h
\
process_utils.c process_utils.h
\
string_utils.c string_utils.h
\
string_utils.c string_utils.h
\
syscall_numbers.h
\
syscall_numbers.h
\
...
@@ -769,6 +815,8 @@ lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c \
...
@@ -769,6 +815,8 @@ lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c \
macro.h
\
macro.h
\
memory_utils.h
\
memory_utils.h
\
namespace.c namespace.h
\
namespace.c namespace.h
\
network.c network.h
\
nl.c nl.h
\
string_utils.c string_utils.h
\
string_utils.c string_utils.h
\
syscall_wrappers.h
\
syscall_wrappers.h
\
utils.c utils.h
utils.c utils.h
...
...
src/lxc/network.h
View file @
0144cea2
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
#include <sys/socket.h>
#include <sys/socket.h>
#include <unistd.h>
#include <unistd.h>
#include "compiler.h"
#include "list.h"
#include "list.h"
struct
lxc_conf
;
struct
lxc_conf
;
...
@@ -177,107 +178,102 @@ struct lxc_netdev {
...
@@ -177,107 +178,102 @@ struct lxc_netdev {
};
};
/* Convert a string mac address to a socket structure. */
/* Convert a string mac address to a socket structure. */
extern
int
lxc_convert_mac
(
char
*
macaddr
,
struct
sockaddr
*
sockaddr
);
__hidden
extern
int
lxc_convert_mac
(
char
*
macaddr
,
struct
sockaddr
*
sockaddr
);
/* Move a device between namespaces. */
/* Move a device between namespaces. */
extern
int
lxc_netdev_move_by_index
(
int
ifindex
,
pid_t
pid
,
const
char
*
ifname
);
__hidden
extern
int
lxc_netdev_move_by_index
(
int
ifindex
,
pid_t
pid
,
const
char
*
ifname
);
extern
int
lxc_netdev_move_by_name
(
const
char
*
ifname
,
pid_t
pid
,
__hidden
extern
int
lxc_netdev_move_by_name
(
const
char
*
ifname
,
pid_t
pid
,
const
char
*
newname
);
const
char
*
newname
);
/* Delete a network device. */
/* Delete a network device. */
extern
int
lxc_netdev_delete_by_name
(
const
char
*
name
);
__hidden
extern
int
lxc_netdev_delete_by_name
(
const
char
*
name
);
extern
int
lxc_netdev_delete_by_index
(
int
ifindex
);
__hidden
extern
int
lxc_netdev_delete_by_index
(
int
ifindex
);
/* Change the device name. */
/* Change the device name. */
extern
int
lxc_netdev_rename_by_name
(
const
char
*
oldname
,
const
char
*
newname
);
__hidden
extern
int
lxc_netdev_rename_by_name
(
const
char
*
oldname
,
const
char
*
newname
);
extern
int
lxc_netdev_rename_by_index
(
int
ifindex
,
const
char
*
newname
);
__hidden
extern
int
lxc_netdev_rename_by_index
(
int
ifindex
,
const
char
*
newname
);
extern
int
netdev_set_flag
(
const
char
*
name
,
int
flag
);
__hidden
extern
int
netdev_set_flag
(
const
char
*
name
,
int
flag
);
/* Set the device network up or down. */
/* Set the device network up or down. */
extern
int
lxc_netdev_isup
(
const
char
*
name
);
__hidden
extern
int
lxc_netdev_isup
(
const
char
*
name
);
extern
int
lxc_netdev_up
(
const
char
*
name
);
__hidden
extern
int
lxc_netdev_up
(
const
char
*
name
);
extern
int
lxc_netdev_down
(
const
char
*
name
);
__hidden
extern
int
lxc_netdev_down
(
const
char
*
name
);
/* Change the mtu size for the specified device. */
/* Change the mtu size for the specified device. */
extern
int
lxc_netdev_set_mtu
(
const
char
*
name
,
int
mtu
);
__hidden
extern
int
lxc_netdev_set_mtu
(
const
char
*
name
,
int
mtu
);
/* Create a virtual network devices. */
/* Create a virtual network devices. */
extern
int
lxc_veth_create
(
const
char
*
name1
,
const
char
*
name2
,
pid_t
pid
,
__hidden
extern
int
lxc_veth_create
(
const
char
*
name1
,
const
char
*
name2
,
pid_t
pid
,
unsigned
int
mtu
);
unsigned
int
mtu
);
extern
int
lxc_macvlan_create
(
const
char
*
parent
,
const
char
*
name
,
int
mode
);
__hidden
extern
int
lxc_macvlan_create
(
const
char
*
parent
,
const
char
*
name
,
int
mode
);
extern
int
lxc_vlan_create
(
const
char
*
parent
,
const
char
*
name
,
__hidden
extern
int
lxc_vlan_create
(
const
char
*
parent
,
const
char
*
name
,
unsigned
short
vid
);
unsigned
short
vid
);
/* Set ip address. */
/* Set ip address. */
extern
int
lxc_ipv6_addr_add
(
int
ifindex
,
struct
in6_addr
*
addr
,
__hidden
extern
int
lxc_ipv6_addr_add
(
int
ifindex
,
struct
in6_addr
*
addr
,
struct
in6_addr
*
mcast
,
struct
in6_addr
*
mcast
,
struct
in6_addr
*
acast
,
int
prefix
);
struct
in6_addr
*
acast
,
int
prefix
);
extern
int
lxc_ipv4_addr_add
(
int
ifindex
,
struct
in_addr
*
addr
,
__hidden
extern
int
lxc_ipv4_addr_add
(
int
ifindex
,
struct
in_addr
*
addr
,
struct
in_addr
*
bcast
,
struct
in_addr
*
bcast
,
int
prefix
);
int
prefix
);
/* Get ip address. */
/* Get ip address. */
extern
int
lxc_ipv4_addr_get
(
int
ifindex
,
struct
in_addr
**
res
);
__hidden
extern
int
lxc_ipv4_addr_get
(
int
ifindex
,
struct
in_addr
**
res
);
extern
int
lxc_ipv6_addr_get
(
int
ifindex
,
struct
in6_addr
**
res
);
__hidden
extern
int
lxc_ipv6_addr_get
(
int
ifindex
,
struct
in6_addr
**
res
);
/* Set default route. */
/* Set default route. */
extern
int
lxc_ipv4_gateway_add
(
int
ifindex
,
struct
in_addr
*
gw
);
__hidden
extern
int
lxc_ipv4_gateway_add
(
int
ifindex
,
struct
in_addr
*
gw
);
extern
int
lxc_ipv6_gateway_add
(
int
ifindex
,
struct
in6_addr
*
gw
);
__hidden
extern
int
lxc_ipv6_gateway_add
(
int
ifindex
,
struct
in6_addr
*
gw
);
/* Attach an interface to the bridge. */
/* Attach an interface to the bridge. */
extern
int
lxc_bridge_attach
(
const
char
*
bridge
,
const
char
*
ifname
);
__hidden
extern
int
lxc_bridge_attach
(
const
char
*
bridge
,
const
char
*
ifname
);
extern
int
lxc_ovs_delete_port
(
const
char
*
bridge
,
const
char
*
nic
);
__hidden
extern
int
lxc_ovs_delete_port
(
const
char
*
bridge
,
const
char
*
nic
);
extern
bool
is_ovs_bridge
(
const
char
*
bridge
);
__hidden
extern
bool
is_ovs_bridge
(
const
char
*
bridge
);
/* Create default gateway. */
/* Create default gateway. */
extern
int
lxc_route_create_default
(
const
char
*
addr
,
const
char
*
ifname
,
__hidden
extern
int
lxc_route_create_default
(
const
char
*
addr
,
const
char
*
ifname
,
int
gateway
);
int
gateway
);
/* Delete default gateway. */
/* Delete default gateway. */
extern
int
lxc_route_delete_default
(
const
char
*
addr
,
const
char
*
ifname
,
__hidden
extern
int
lxc_route_delete_default
(
const
char
*
addr
,
const
char
*
ifname
,
int
gateway
);
int
gateway
);
/* Activate neighbor proxying. */
/* Activate neighbor proxying. */
extern
int
lxc_neigh_proxy_on
(
const
char
*
name
,
int
family
);
__hidden
extern
int
lxc_neigh_proxy_on
(
const
char
*
name
,
int
family
);
/* Disable neighbor proxying. */
/* Disable neighbor proxying. */
extern
int
lxc_neigh_proxy_off
(
const
char
*
name
,
int
family
);
__hidden
extern
int
lxc_neigh_proxy_off
(
const
char
*
name
,
int
family
);
/* Activate IP forwarding. */
/* Activate IP forwarding. */
extern
int
lxc_ip_forwarding_on
(
const
char
*
name
,
int
family
);
__hidden
extern
int
lxc_ip_forwarding_on
(
const
char
*
name
,
int
family
);
/* Disable IP forwarding. */
/* Disable IP forwarding. */
extern
int
lxc_ip_forwarding_off
(
const
char
*
name
,
int
family
);
__hidden
extern
int
lxc_ip_forwarding_off
(
const
char
*
name
,
int
family
);
/*
/*
* Generate a new unique network interface name.
* Generate a new unique network interface name.
*
*
* Allows for 62^n unique combinations.
* Allows for 62^n unique combinations.
*/
*/
extern
char
*
lxc_ifname_alnum_case_sensitive
(
char
*
template
);
__hidden
extern
char
*
lxc_ifname_alnum_case_sensitive
(
char
*
template
);
extern
const
char
*
lxc_net_type_to_str
(
int
type
);
__hidden
extern
const
char
*
lxc_net_type_to_str
(
int
type
);
extern
int
setup_private_host_hw_addr
(
char
*
veth1
);
__hidden
extern
int
setup_private_host_hw_addr
(
char
*
veth1
);
extern
int
netdev_get_mtu
(
int
ifindex
);
__hidden
extern
int
netdev_get_mtu
(
int
ifindex
);
extern
int
lxc_network_move_created_netdev_priv
(
struct
lxc_handler
*
handler
);
__hidden
extern
int
lxc_network_move_created_netdev_priv
(
struct
lxc_handler
*
handler
);
extern
void
lxc_delete_network
(
struct
lxc_handler
*
handler
);
__hidden
extern
void
lxc_delete_network
(
struct
lxc_handler
*
handler
);
extern
int
lxc_find_gateway_addresses
(
struct
lxc_handler
*
handler
);
__hidden
extern
int
lxc_find_gateway_addresses
(
struct
lxc_handler
*
handler
);
extern
int
lxc_requests_empty_network
(
struct
lxc_handler
*
handler
);
__hidden
extern
int
lxc_requests_empty_network
(
struct
lxc_handler
*
handler
);
extern
int
lxc_restore_phys_nics_to_netns
(
struct
lxc_handler
*
handler
);
__hidden
extern
int
lxc_restore_phys_nics_to_netns
(
struct
lxc_handler
*
handler
);
extern
int
lxc_setup_network_in_child_namespaces
(
const
struct
lxc_conf
*
conf
,
__hidden
extern
int
lxc_setup_network_in_child_namespaces
(
const
struct
lxc_conf
*
conf
,
struct
lxc_list
*
network
);
struct
lxc_list
*
network
);
extern
int
lxc_network_send_to_child
(
struct
lxc_handler
*
handler
);
__hidden
extern
int
lxc_network_send_to_child
(
struct
lxc_handler
*
handler
);
extern
int
lxc_network_recv_from_parent
(
struct
lxc_handler
*
handler
);
__hidden
extern
int
lxc_network_recv_from_parent
(
struct
lxc_handler
*
handler
);
extern
int
lxc_network_send_name_and_ifindex_to_parent
(
struct
lxc_handler
*
handler
);
__hidden
extern
int
lxc_network_send_name_and_ifindex_to_parent
(
struct
lxc_handler
*
handler
);
extern
int
lxc_network_recv_name_and_ifindex_from_child
(
struct
lxc_handler
*
handler
);
__hidden
extern
int
lxc_network_recv_name_and_ifindex_from_child
(
struct
lxc_handler
*
handler
);
extern
int
lxc_netns_set_nsid
(
int
netns_fd
);
__hidden
extern
int
lxc_netns_set_nsid
(
int
netns_fd
);
extern
int
lxc_netns_get_nsid
(
__s32
fd
);
__hidden
extern
int
lxc_netns_get_nsid
(
__s32
fd
);
extern
int
lxc_create_network
(
struct
lxc_handler
*
handler
);
__hidden
extern
int
lxc_create_network
(
struct
lxc_handler
*
handler
);
extern
char
*
is_wlan
(
const
char
*
ifname
);
__hidden
extern
char
*
is_wlan
(
const
char
*
ifname
);
extern
int
lxc_netdev_move_wlan
(
char
*
physname
,
const
char
*
ifname
,
pid_t
pid
,
__hidden
extern
int
lxc_netdev_move_wlan
(
char
*
physname
,
const
char
*
ifname
,
pid_t
pid
,
const
char
*
newname
);
const
char
*
newname
);
#endif
/* __LXC_NETWORK_H */
#endif
/* __LXC_NETWORK_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment