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
085bb443
Unverified
Commit
085bb443
authored
Aug 31, 2017
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
network: document all fields in struct lxc_netdev
This is menial work but I'll thank myself later... a lot. Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
4239e9c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
11 deletions
+33
-11
network.h
src/lxc/network.h
+33
-11
No files found.
src/lxc/network.h
View file @
085bb443
...
@@ -115,20 +115,42 @@ union netdev_p {
...
@@ -115,20 +115,42 @@ union netdev_p {
/*
/*
* Defines a structure to configure a network device
* Defines a structure to configure a network device
* @link : lxc.net.[i].link, name of bridge or host iface to attach if any
* @idx : network counter
* @name : lxc.net.[i].name, name of iface on the container side
* @ifindex : ifindex of the network device
* @flags : flag of the network device (IFF_UP, ... )
* Note that this is the ifindex of the network device in
* @ipv4 : a list of ipv4 addresses to be set on the network device
* the container's network namespace. If the network device
* @ipv6 : a list of ipv6 addresses to be set on the network device
* consists of a pair of network devices (e.g. veth pairs
* @upscript : a script filename to be executed during interface configuration
* attached to a network bridge) then this index cannot be
* @downscript : a script filename to be executed during interface destruction
* used to identify or modify the host veth device. See
* @idx : network counter
* struct ifla_veth for the host side information.
* @type : network type (veth, macvlan, vlan, ...)
* @flags : flag of the network device (IFF_UP, ... )
* @link : lxc.net.[i].link, name of bridge or host iface to attach
* if any
* @name : lxc.net.[i].name, name of iface on the container side
* @hwaddr : mac address
* @mtu : maximum transmission unit
* @priv : information specific to the specificed network type
* Note that this is a union so whether accessing a struct
* is possible is dependent on the network type.
* @ipv4 : a list of ipv4 addresses to be set on the network device
* @ipv6 : a list of ipv6 addresses to be set on the network device
* @ipv4_gateway_auto : whether the ipv4 gateway is to be automatically gathered
* from the associated @link
* @ipv4_gateway : ipv4 gateway
* @ipv6_gateway_auto : whether the ipv6 gateway is to be automatically gathered
* from the associated @link
* @ipv6_gateway : ipv6 gateway
* @upscript : a script filename to be executed during interface
* configuration
* @downscript : a script filename to be executed during interface
* destruction
*/
*/
struct
lxc_netdev
{
struct
lxc_netdev
{
ssize_t
idx
;
ssize_t
idx
;
int
ifindex
;
int
type
;
int
type
;
int
flags
;
int
flags
;
int
ifindex
;
char
*
link
;
char
*
link
;
char
*
name
;
char
*
name
;
char
*
hwaddr
;
char
*
hwaddr
;
...
@@ -136,10 +158,10 @@ struct lxc_netdev {
...
@@ -136,10 +158,10 @@ struct lxc_netdev {
union
netdev_p
priv
;
union
netdev_p
priv
;
struct
lxc_list
ipv4
;
struct
lxc_list
ipv4
;
struct
lxc_list
ipv6
;
struct
lxc_list
ipv6
;
struct
in_addr
*
ipv4_gateway
;
bool
ipv4_gateway_auto
;
bool
ipv4_gateway_auto
;
struct
in
6_addr
*
ipv6
_gateway
;
struct
in
_addr
*
ipv4
_gateway
;
bool
ipv6_gateway_auto
;
bool
ipv6_gateway_auto
;
struct
in6_addr
*
ipv6_gateway
;
char
*
upscript
;
char
*
upscript
;
char
*
downscript
;
char
*
downscript
;
};
};
...
...
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