diff options
Diffstat (limited to 'lib/command-line.h')
-rw-r--r-- | lib/command-line.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/command-line.h b/lib/command-line.h index 426ce62e..bc2071ef 100644 --- a/lib/command-line.h +++ b/lib/command-line.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008 Nicira Networks. + * Copyright (c) 2008, 2009 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,18 @@ /* Utilities for command-line parsing. */ +#include "compiler.h" + struct option; + +struct command { + const char *name; + int min_args; + int max_args; + void (*handler)(int argc, char *argv[]); +}; + char *long_options_to_short_options(const struct option *options); +void run_command(int argc, char *argv[], const struct command[]); #endif /* command-line.h */ |