Configuration helper for the application executed with DCE. More...
#include <dce-application-helper.h>
Public Member Functions | |
DceApplicationHelper () | |
void | AddArgument (std::string arg) |
void | AddArguments (std::string a0, std::string a1) |
void | AddArguments (std::string a0, std::string a1, std::string a2) |
void | AddArguments (std::string a0, std::string a1, std::string a2, std::string a3) |
void | AddArguments (std::string a0, std::string a1, std::string a2, std::string a3, std::string a4) |
void | AddArguments (std::string a0, std::string a1, std::string a2, std::string a3, std::string a4, std::string a5) |
void | AddArguments (std::string a0, std::string a1, std::string a2, std::string a3, std::string a4, std::string a5, std::string a6) |
void | AddArguments (std::string a0, std::string a1, std::string a2, std::string a3, std::string a4, std::string a5, std::string a6, std::string a7) |
void | AddEnvironment (std::string name, std::string value) |
virtual ApplicationContainer | Install (NodeContainer c) |
void | ParseArguments (std::string args) |
void | ResetArguments (void) |
void | ResetEnvironment (void) |
void | SetBinary (std::string filename) |
void | SetEgid (uid_t i) |
void | SetEuid (uid_t i) |
void | SetFinishedCallback (Callback< void, uint16_t, int > cb) |
void | SetGid (uid_t i) |
void | SetStackSize (uint32_t stackSize) |
void | SetStdinFile (std::string filename) |
void | SetUid (uid_t i) |
Private Attributes | |
std::vector< std::string > | m_args |
uid_t | m_egid |
std::vector< std::pair < std::string, std::string > > | m_envs |
uid_t | m_euid |
std::string | m_filename |
Callback< void, uint16_t, int > | m_finishedCallback |
uid_t | m_gid |
bool | m_isBinary |
uint32_t | m_stackSize |
std::string | m_stdinFilename |
uid_t | m_uid |
Configuration helper for the application executed with DCE.
Definition at line 16 of file dce-application-helper.h.
ns3::DceApplicationHelper::DceApplicationHelper | ( | ) |
Construct a DceApplicationHelper
Definition at line 10 of file dce-application-helper.cc.
void ns3::DceApplicationHelper::AddArgument | ( | std::string | arg | ) |
arg | add an argument for the main executable |
Definition at line 34 of file dce-application-helper.cc.
References m_args.
Referenced by AddArguments(), and ParseArguments().
void ns3::DceApplicationHelper::AddArguments | ( | std::string | a0, |
std::string | a1 | ||
) |
Definition at line 39 of file dce-application-helper.cc.
References AddArgument().
Referenced by ns3::QuaggaHelper::InstallPriv().
void ns3::DceApplicationHelper::AddArguments | ( | std::string | a0, |
std::string | a1, | ||
std::string | a2 | ||
) |
Definition at line 45 of file dce-application-helper.cc.
References AddArgument().
void ns3::DceApplicationHelper::AddArguments | ( | std::string | a0, |
std::string | a1, | ||
std::string | a2, | ||
std::string | a3 | ||
) |
Definition at line 52 of file dce-application-helper.cc.
References AddArgument().
void ns3::DceApplicationHelper::AddArguments | ( | std::string | a0, |
std::string | a1, | ||
std::string | a2, | ||
std::string | a3, | ||
std::string | a4 | ||
) |
Definition at line 60 of file dce-application-helper.cc.
References AddArgument().
void ns3::DceApplicationHelper::AddArguments | ( | std::string | a0, |
std::string | a1, | ||
std::string | a2, | ||
std::string | a3, | ||
std::string | a4, | ||
std::string | a5 | ||
) |
Definition at line 70 of file dce-application-helper.cc.
References AddArgument().
void ns3::DceApplicationHelper::AddArguments | ( | std::string | a0, |
std::string | a1, | ||
std::string | a2, | ||
std::string | a3, | ||
std::string | a4, | ||
std::string | a5, | ||
std::string | a6 | ||
) |
Definition at line 81 of file dce-application-helper.cc.
References AddArgument().
void ns3::DceApplicationHelper::AddArguments | ( | std::string | a0, |
std::string | a1, | ||
std::string | a2, | ||
std::string | a3, | ||
std::string | a4, | ||
std::string | a5, | ||
std::string | a6, | ||
std::string | a7 | ||
) |
Definition at line 93 of file dce-application-helper.cc.
References AddArgument().
void ns3::DceApplicationHelper::AddEnvironment | ( | std::string | name, |
std::string | value | ||
) |
Add environmental variable for this appilcation.
name | the variable name to the environment. e.g., "HOME" |
value | the variable value to the environment. e.g., "/home/furbani" |
Definition at line 124 of file dce-application-helper.cc.
References m_envs.
|
virtual |
Install the configured application into node.
c | NodeContainer that run this application. |
Reimplemented in ns3::CcnClientHelper.
Definition at line 135 of file dce-application-helper.cc.
References m_args, m_envs, m_euid, m_filename, m_finishedCallback, m_stackSize, m_stdinFilename, and m_uid.
Referenced by ns3::Mip6dHelper::InstallPriv(), ns3::QuaggaHelper::InstallPriv(), ns3::RunIp(), and ns3::LinuxStackHelper::RunIp().
void ns3::DceApplicationHelper::ParseArguments | ( | std::string | args | ) |
args | add a string of arguments for the main executable. can specify with space-separated arguments, e.g., "-d -f test.conf". |
Definition at line 105 of file dce-application-helper.cc.
References AddArgument().
Referenced by ns3::Mip6dHelper::InstallPriv(), ns3::RunIp(), and ns3::LinuxStackHelper::RunIp().
void ns3::DceApplicationHelper::ResetArguments | ( | void | ) |
Reset arguments for the main binary for this application.
Definition at line 119 of file dce-application-helper.cc.
References m_args.
Referenced by ns3::Mip6dHelper::InstallPriv(), ns3::QuaggaHelper::InstallPriv(), ns3::RunIp(), and ns3::LinuxStackHelper::RunIp().
void ns3::DceApplicationHelper::ResetEnvironment | ( | void | ) |
Reset environmental variables for the main binary for this application.
Definition at line 129 of file dce-application-helper.cc.
References m_envs.
void ns3::DceApplicationHelper::SetBinary | ( | std::string | filename | ) |
filename | the name of executable file to run |
Definition at line 19 of file dce-application-helper.cc.
References m_filename.
Referenced by ns3::Mip6dHelper::InstallPriv(), ns3::QuaggaHelper::InstallPriv(), ns3::RunIp(), and ns3::LinuxStackHelper::RunIp().
void ns3::DceApplicationHelper::SetEgid | ( | uid_t | i | ) |
Configure effective group ID of this process.
i | the value of egid. |
Definition at line 180 of file dce-application-helper.cc.
References m_egid.
void ns3::DceApplicationHelper::SetEuid | ( | uid_t | i | ) |
Configure effective user ID of this process.
i | the value of euid. |
Definition at line 170 of file dce-application-helper.cc.
References m_euid.
void ns3::DceApplicationHelper::SetFinishedCallback | ( | Callback< void, uint16_t, int > | cb | ) |
Register callback function invoked at the end of application.
cb | callback function to be called. |
Definition at line 160 of file dce-application-helper.cc.
References m_finishedCallback.
void ns3::DceApplicationHelper::SetGid | ( | uid_t | i | ) |
Configure group ID of this process.
i | the value of gid. |
Definition at line 175 of file dce-application-helper.cc.
References m_gid.
void ns3::DceApplicationHelper::SetStackSize | ( | uint32_t | stackSize | ) |
stackSize | stack size for this application. |
Definition at line 24 of file dce-application-helper.cc.
References m_stackSize.
Referenced by ns3::Mip6dHelper::InstallPriv(), ns3::QuaggaHelper::InstallPriv(), ns3::RunIp(), and ns3::LinuxStackHelper::RunIp().
void ns3::DceApplicationHelper::SetStdinFile | ( | std::string | filename | ) |
filename | specify the filename to use as a stdin |
Definition at line 29 of file dce-application-helper.cc.
References m_stdinFilename.
void ns3::DceApplicationHelper::SetUid | ( | uid_t | i | ) |
Configure 'uid' of the process.
i | the value of uid. |
Definition at line 165 of file dce-application-helper.cc.
References m_uid.
|
private |
Definition at line 118 of file dce-application-helper.h.
Referenced by AddArgument(), Install(), and ResetArguments().
|
private |
Definition at line 125 of file dce-application-helper.h.
Referenced by SetEgid().
|
private |
Definition at line 119 of file dce-application-helper.h.
Referenced by AddEnvironment(), Install(), and ResetEnvironment().
|
private |
Definition at line 123 of file dce-application-helper.h.
|
private |
Definition at line 116 of file dce-application-helper.h.
Referenced by Install(), and SetBinary().
|
private |
Definition at line 121 of file dce-application-helper.h.
Referenced by Install(), and SetFinishedCallback().
|
private |
Definition at line 124 of file dce-application-helper.h.
Referenced by SetGid().
|
private |
Definition at line 115 of file dce-application-helper.h.
|
private |
Definition at line 117 of file dce-application-helper.h.
Referenced by Install(), and SetStackSize().
|
private |
Definition at line 120 of file dce-application-helper.h.
Referenced by Install(), and SetStdinFile().
|
private |
Definition at line 122 of file dce-application-helper.h.