~serge-hallyn/ubuntu/quantal/lxc/lxc-aa-custom-profile

« back to all changes in this revision

Viewing changes to src/lxc/network.h

  • Committer: Bazaar Package Importer
  • Author(s): Guido Trotter
  • Date: 2009-04-29 17:49:13 UTC
  • Revision ID: james.westby@ubuntu.com-20090429174913-jvahs1ykizqtodje
Tags: upstream-0.6.2
ImportĀ upstreamĀ versionĀ 0.6.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * lxc: linux Container library
 
3
 *
 
4
 * (C) Copyright IBM Corp. 2007, 2008
 
5
 *
 
6
 * Authors:
 
7
 * Daniel Lezcano <dlezcano at fr.ibm.com>
 
8
 *
 
9
 * This library is free software; you can redistribute it and/or
 
10
 * modify it under the terms of the GNU Lesser General Public
 
11
 * License as published by the Free Software Foundation; either
 
12
 * version 2.1 of the License, or (at your option) any later version.
 
13
 *
 
14
 * This library is distributed in the hope that it will be useful,
 
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
17
 * Lesser General Public License for more details.
 
18
 *
 
19
 * You should have received a copy of the GNU Lesser General Public
 
20
 * License along with this library; if not, write to the Free Software
 
21
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
22
 */
 
23
#ifndef _network_h
 
24
#define _network_h
 
25
 
 
26
/*
 
27
 * Convert a string mac address to a socket structure
 
28
 */
 
29
extern int lxc_convert_mac(char *macaddr, struct sockaddr *sockaddr);
 
30
 
 
31
/*
 
32
 * Move a device between namespaces
 
33
 */
 
34
extern int lxc_device_move(const char *name, pid_t pid);
 
35
 
 
36
/*
 
37
 * Delete a network device
 
38
 */
 
39
extern int lxc_device_delete(const char *name);
 
40
 
 
41
/*
 
42
 * Set the device network up
 
43
 */
 
44
extern int lxc_device_up(const char *name);
 
45
 
 
46
/*
 
47
 * Set the device network down
 
48
 */
 
49
extern int lxc_device_down(const char *name);
 
50
 
 
51
/*
 
52
 * Change the device name
 
53
 */
 
54
extern int lxc_device_rename(const char *oldname, const char *newname);
 
55
 
 
56
/*
 
57
 * Change the mtu size for the specified device
 
58
 */
 
59
extern int lxc_device_set_mtu(const char *name, int mtu);
 
60
 
 
61
/*
 
62
 * Create a veth network device
 
63
 */
 
64
extern int lxc_veth_create(const char *name1, const char *name2);
 
65
 
 
66
/* 
 
67
 * Create a macvlan network device
 
68
 */
 
69
extern int lxc_macvlan_create(const char *master, const char *name);
 
70
 
 
71
/*
 
72
 * Activate forwarding
 
73
 */
 
74
extern int lxc_ip_forward_on(const char *name, int family);
 
75
 
 
76
/*
 
77
 * Disable forwarding
 
78
 */
 
79
extern int lxc_ip_forward_off(const char *name, int family);
 
80
 
 
81
/*
 
82
 * Set ip address
 
83
 */
 
84
extern int lxc_ip_addr_add(const char *ifname, const char *addr,
 
85
                           int prefix, const char *bcast);
 
86
 
 
87
extern int lxc_ip6_addr_add(const char *ifname, const char *addr,
 
88
                            int prefix, const char *bcast);
 
89
 
 
90
/*
 
91
 * Attach an interface to the bridge
 
92
 */
 
93
extern int lxc_bridge_attach(const char *bridge, const char *ifname);
 
94
 
 
95
/*
 
96
 * Detach an interface from the bridge
 
97
 */
 
98
extern int lxc_bridge_detach(const char *bridge, const char *ifname);
 
99
 
 
100
/* 
 
101
 * Create default gateway
 
102
 */
 
103
extern int lxc_route_create_default(const char *addr, const char *ifname,
 
104
                                    int gateway);
 
105
 
 
106
/*
 
107
 * Delete default gateway
 
108
 */
 
109
extern int lxc_route_delete_default(const char *addr, const char *ifname,
 
110
                                    int gateway);
 
111
 
 
112
/*
 
113
 * Activate neighbor proxying
 
114
 */
 
115
extern int lxc_neigh_proxy_on(const char *name, int family);
 
116
 
 
117
/*
 
118
 * Disable neighbor proxying
 
119
 */
 
120
extern int lxc_neigh_proxy_off(const char *name, int family);
 
121
 
 
122
#endif