/*
- * Copyright (c) 2008, 2009, 2010 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <stdbool.h>
#include <sys/types.h>
-enum {
- OPT_DETACH = UCHAR_MAX + 2048,
- OPT_NO_CHDIR,
- OPT_OVERWRITE_PIDFILE,
- OPT_PIDFILE,
+#define DAEMON_OPTION_ENUMS \
+ OPT_DETACH, \
+ OPT_NO_CHDIR, \
+ OPT_OVERWRITE_PIDFILE, \
+ OPT_PIDFILE, \
OPT_MONITOR
-};
#define DAEMON_LONG_OPTIONS \
{"detach", no_argument, 0, OPT_DETACH}, \
parse_options(int argc, char *argv[])
{
enum {
- OPT_BOOTSTRAP_CA_CERT = UCHAR_MAX + 1
+ OPT_BOOTSTRAP_CA_CERT = UCHAR_MAX + 1,
+ DAEMON_OPTION_ENUMS,
};
static struct option long_options[] = {
{"format", required_argument, 0, 'f'},
-/* Copyright (c) 2009, 2010 Nicira Networks
+/* Copyright (c) 2009, 2010, 2011 Nicira Networks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
OPT_RUN,
OPT_BOOTSTRAP_CA_CERT,
VLOG_OPTION_ENUMS,
- LEAK_CHECKER_OPTION_ENUMS
+ LEAK_CHECKER_OPTION_ENUMS,
+ DAEMON_OPTION_ENUMS
};
static struct option long_options[] = {
{"remote", required_argument, 0, OPT_REMOTE},
/*
- * Copyright (c) 2009, 2010 Nicira Networks.
+ * Copyright (c) 2009, 2010, 2011 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
parse_options(int argc, char *argv[])
{
enum {
- OPT_BOOTSTRAP_CA_CERT = UCHAR_MAX + 1
+ OPT_BOOTSTRAP_CA_CERT = UCHAR_MAX + 1,
+ DAEMON_OPTION_ENUMS
};
static struct option long_options[] = {
{"verbose", optional_argument, 0, 'v'},
/*
- * Copyright (c) 2008, 2009, 2010 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
OPT_MUTE,
OPT_WITH_FLOWS,
OPT_UNIXCTL,
- VLOG_OPTION_ENUMS
+ VLOG_OPTION_ENUMS,
+ DAEMON_OPTION_ENUMS
};
static struct option long_options[] = {
{"hub", no_argument, 0, 'H'},
/*
- * Copyright (c) 2008, 2009, 2010 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
OPT_EXIT_WITHOUT_BIND,
OPT_EXIT_AFTER_BIND,
OPT_NO_DETACH,
- VLOG_OPTION_ENUMS
+ VLOG_OPTION_ENUMS,
+ DAEMON_OPTION_ENUMS
};
static struct option long_options[] = {
{"accept-vconn", required_argument, 0, OPT_ACCEPT_VCONN},
/*
- * Copyright (c) 2008, 2009, 2010 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
OPT_UNIXCTL,
OPT_ENABLE_DUMMY,
VLOG_OPTION_ENUMS,
- LEAK_CHECKER_OPTION_ENUMS
+ LEAK_CHECKER_OPTION_ENUMS,
+ DAEMON_OPTION_ENUMS
};
static struct option long_options[] = {
{"datapath-id", required_argument, 0, OPT_DATAPATH_ID},
OPT_PRUNE_TIMEOUT,
OPT_APPCTL_COMMAND,
VLOG_OPTION_ENUMS,
- LEAK_CHECKER_OPTION_ENUMS
+ LEAK_CHECKER_OPTION_ENUMS,
+ DAEMON_OPTION_ENUMS
};
static struct option long_options[] = {
{"help", no_argument, 0, 'h'},
VLOG_OPTION_ENUMS,
LEAK_CHECKER_OPTION_ENUMS,
OPT_BOOTSTRAP_CA_CERT,
- OPT_ENABLE_DUMMY
+ OPT_ENABLE_DUMMY,
+ DAEMON_OPTION_ENUMS
};
static struct option long_options[] = {
{"help", no_argument, 0, 'h'},