Apache Mesos
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
src
linux
routing
link
veth.hpp
Go to the documentation of this file.
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements. See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership. The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License. You may obtain a copy of the License at
8
//
9
// http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing, software
12
// distributed under the License is distributed on an "AS IS" BASIS,
13
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
// See the License for the specific language governing permissions and
15
// limitations under the License.
16
17
#ifndef __LINUX_ROUTING_LINK_VETH_HPP__
18
#define __LINUX_ROUTING_LINK_VETH_HPP__
19
20
#include <sys/types.h>
21
22
#include <string>
23
24
#include <
stout/option.hpp
>
25
#include <
stout/try.hpp
>
26
27
namespace
routing
{
28
namespace
link {
29
namespace
veth {
30
31
// Creates a pair of virtual network links. The peer link is put in
32
// the network namespace represented by 'pid' upon creation if
33
// specified. If 'pid' is None, the peer link will be put into
34
// caller's network namespace. Returns false if the virtual network
35
// links (with the same name) already exist.
36
Try<bool>
create
(
37
const
std::string& veth,
38
const
std::string&
peer
,
39
const
Option<pid_t>
& pid);
40
41
}
// namespace veth {
42
}
// namespace link {
43
}
// namespace routing {
44
45
#endif // __LINUX_ROUTING_LINK_VETH_HPP__
Option< pid_t >
Try
Definition:
check.hpp:33
option.hpp
try.hpp
routing
Definition:
diagnosis.hpp:30
process::network::peer
Try< Address > peer(int_fd s)
Returns the peer's Address for the accepted or connected socket.
Definition:
network.hpp:98
routing::link::veth::create
Try< bool > create(const std::string &veth, const std::string &peer, const Option< pid_t > &pid)
Generated by
1.8.11