ns-3 Direct Code Execution
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dce-application-helper.h
Go to the documentation of this file.
1 #ifndef DCE_HELPER_H
2 #define DCE_HELPER_H
3 
4 #include <string>
5 #include <stdint.h>
6 #include <vector>
7 #include "ns3/node-container.h"
8 #include "ns3/application-container.h"
9 
10 namespace ns3 {
11 
17 {
18 public:
23 
27  void SetBinary (std::string filename);
28 
32  void SetStackSize (uint32_t stackSize);
33 
37  void SetStdinFile (std::string filename);
38 
42  void AddArgument (std::string arg);
43  void AddArguments (std::string a0, std::string a1);
44  void AddArguments (std::string a0, std::string a1, std::string a2);
45  void AddArguments (std::string a0, std::string a1, std::string a2, std::string a3);
46  void AddArguments (std::string a0, std::string a1, std::string a2, std::string a3,
47  std::string a4);
48  void AddArguments (std::string a0, std::string a1, std::string a2, std::string a3,
49  std::string a4, std::string a5);
50  void AddArguments (std::string a0, std::string a1, std::string a2, std::string a3,
51  std::string a4, std::string a5, std::string a6);
52  void AddArguments (std::string a0, std::string a1, std::string a2, std::string a3,
53  std::string a4, std::string a5, std::string a6, std::string a7);
57  void ParseArguments (std::string args);
58 
62  void ResetArguments (void);
63 
69  void AddEnvironment (std::string name, std::string value);
70 
74  void ResetEnvironment (void);
75 
81  virtual ApplicationContainer Install (NodeContainer c);
82 
88  void SetFinishedCallback (Callback<void,uint16_t,int> cb);
89 
94  void SetUid (uid_t i);
95 
100  void SetEuid (uid_t i);
101 
106  void SetGid (uid_t i);
107 
112  void SetEgid (uid_t i);
113 
114 private:
116  std::string m_filename;
117  uint32_t m_stackSize;
118  std::vector<std::string> m_args;
119  std::vector<std::pair<std::string,std::string> > m_envs;
120  std::string m_stdinFilename;
121  Callback<void,uint16_t,int> m_finishedCallback;
122  uid_t m_uid;
123  uid_t m_euid;
124  uid_t m_gid;
125  uid_t m_egid;
126 };
127 
128 } // namespace ns3
129 
130 #endif /* DCE_HELPER_H */