-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathargs.hh
90 lines (73 loc) · 2.39 KB
/
args.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*
* ClickOS Control
*
* file: args.hh
*
* NEC Europe Ltd. PROPRIETARY INFORMATION
*
* This software is supplied under the terms of a license agreement
* or nondisclosure agreement with NEC Europe Ltd. and may not be
* copied or disclosed except in accordance with the terms of that
* agreement. The software and its source code contain valuable trade
* secrets and confidential information which have to be maintained in
* confidence.
* Any unauthorized publication, transfer to third parties or duplication
* of the object or source code - either totally or in part – is
* prohibited.
*
* Copyright (c) 2016 NEC Europe Ltd. All Rights Reserved.
*
* Authors: Filipe Manco <[email protected]>
*
* NEC Europe Ltd. DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE AND THE WARRANTY AGAINST LATENT
* DEFECTS, WITH RESPECT TO THE PROGRAM AND THE ACCOMPANYING
* DOCUMENTATION.
*
* No Liability For Consequential Damages IN NO EVENT SHALL NEC Europe
* Ltd., NEC Corporation OR ANY OF ITS SUBSIDIARIES BE LIABLE FOR ANY
* DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
* OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF INFORMATION, OR
* OTHER PECUNIARY LOSS AND INDIRECT, CONSEQUENTIAL, INCIDENTAL,
* ECONOMIC OR PUNITIVE DAMAGES) ARISING OUT OF THE USE OF OR INABILITY
* TO USE THIS PROGRAM, EVEN IF NEC Europe Ltd. HAS BEEN ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY.
*/
#ifndef __ARGS__HH__
#define __ARGS__HH__
#include "clickos.hh"
#include <list>
#include <string>
#include <cerrno>
#include <cstdint>
extern "C" {
#include <xenctrl.h>
}
namespace clickos {
class conf {
public:
conf(void);
public:
bool parse(int argc, char** argv);
void print_usage(const std::string cmd);
private:
bool parse_install(int argc, char** argv);
bool parse_remove(int argc, char** argv);
bool parse_start(int argc, char** argv);
bool parse_stop(int argc, char** argv);
public:
mechanism mech;
operation op;
std::string domain;
clickos::router::id_t router_id;
std::string click_config_path;
bool install_start;
bool remove_stop;
bool remove_force;
bool help;
};
} /* namespace clickos */
#endif /* __ARGS__HH__ */