FreeNOS
|
Network interface control application. More...
#include <NetCtl.h>
Public Member Functions | |
NetCtl (int argc, char **argv) | |
Class constructor. More... | |
virtual | ~NetCtl () |
Class destructor. More... | |
virtual Result | initialize () |
Initialize the application. More... | |
virtual Result | exec () |
Execute the application event loop. More... | |
Public Member Functions inherited from POSIXApplication | |
POSIXApplication (int argc, char **argv) | |
Class constructor. More... | |
virtual | ~POSIXApplication () |
Class destructor. More... | |
Public Member Functions inherited from Application | |
Application (int argc, char **argv) | |
Class constructor. More... | |
virtual | ~Application () |
Class destructor. More... | |
virtual int | run () |
Run the application. More... | |
Private Member Functions | |
Result | showDevice (const char *deviceName) |
Output device information. More... | |
Additional Inherited Members | |
Public Types inherited from Application | |
enum | Result { Success, NotFound, IOError, InvalidArgument, ShowUsage, TimedOut, OutOfMemory } |
Result codes. More... | |
Protected Member Functions inherited from POSIXApplication | |
virtual Result | output (const char *string) const |
Print text to output. More... | |
int | runProgram (const char *path, const char **argv) |
Runs an external program. More... | |
Protected Member Functions inherited from Application | |
virtual Result | output (String &string) const |
Print string to output. More... | |
ArgumentParser & | parser () |
Get program arguments parser. More... | |
const ArgumentParser & | parser () const |
Get constant program arguments parser. More... | |
const ArgumentContainer & | arguments () const |
Get program arguments. More... | |
void | setVersion (const String &version) |
Set program version. More... | |
Protected Attributes inherited from Application | |
int | m_argc |
Input argument count. More... | |
char ** | m_argv |
Input argument values. More... | |
NetCtl::NetCtl | ( | int | argc, |
char ** | argv | ||
) |
Class constructor.
Definition at line 33 of file NetCtl.cpp.
References Application::parser(), ArgumentParser::registerPositional(), and ArgumentParser::setDescription().
|
virtual |
Class destructor.
Definition at line 40 of file NetCtl.cpp.
|
virtual |
Execute the application event loop.
Implements Application.
Definition at line 50 of file NetCtl.cpp.
References DEBUG, FileSystemClient::getFileSystems(), showDevice(), strncmp(), and Application::Success.
|
virtual |
Initialize the application.
Reimplemented from Application.
Definition at line 44 of file NetCtl.cpp.
References DEBUG, and Application::Success.
|
private |
Output device information.
deviceName | Name of the network device |
Definition at line 72 of file NetCtl.cpp.
References close(), DEBUG, O_RDONLY, open(), printf(), read(), Application::Success, Ethernet::toString(), and IPV4::toString().
Referenced by exec().