71 |
71 |
72 /** |
72 /** |
73 * \param filename filename prefix to use for pcap files. |
73 * \param filename filename prefix to use for pcap files. |
74 * \param nodeid the id of the node to generate pcap output for. |
74 * \param nodeid the id of the node to generate pcap output for. |
75 * \param deviceid the id of the device to generate pcap output for. |
75 * \param deviceid the id of the device to generate pcap output for. |
|
76 * \param promiscuous If true capture all possible packets available at the device. |
76 * |
77 * |
77 * Generate a pcap file which contains the link-level data observed |
78 * Generate a pcap file which contains the link-level data observed |
78 * by the specified deviceid within the specified nodeid. The pcap |
79 * by the specified deviceid within the specified nodeid. The pcap |
79 * data is stored in the file prefix-nodeid-deviceid.pcap. |
80 * data is stored in the file prefix-nodeid-deviceid.pcap. |
80 * |
81 * |
81 * This method should be invoked after the network topology has |
82 * This method should be invoked after the network topology has |
82 * been fully constructed. |
83 * been fully constructed. |
83 */ |
84 */ |
84 static void EnablePcap (std::string filename, uint32_t nodeid, |
85 static void EnablePcap (std::string filename, uint32_t nodeid, uint32_t deviceid, bool promiscuous); |
85 uint32_t deviceid); |
86 |
86 |
87 /** |
87 /** |
88 * \param filename filename prefix to use for pcap files. |
88 * \param filename filename prefix to use for pcap files. |
89 * \param nd Indicates net device on which you want to enable tracing. |
89 * \param d container of devices of type ns3::EmuNetDevice |
90 * \param promiscuous If true capture all possible packets available at the device. |
90 * |
91 * |
91 * Enable pcap output on each input device which is of the |
92 * Enable pcap output on each input device which is of the |
92 * ns3::EmuNetDevice type. |
93 * ns3::EmuNetDevice type. |
93 */ |
94 */ |
94 static void EnablePcap (std::string filename, NetDeviceContainer d); |
95 static void EnablePcap (std::string filename, Ptr<NetDevice> nd, bool promiscuous); |
|
96 |
|
97 /** |
|
98 * \param filename filename prefix to use for pcap files. |
|
99 * \param ndName Name of net device on which you want to enable tracing. |
|
100 * \param promiscuous If true capture all possible packets available at the device. |
|
101 * |
|
102 * Enable pcap output on each input device which is of the |
|
103 * ns3::EmuNetDevice type. |
|
104 */ |
|
105 static void EnablePcap (std::string filename, std::string ndName, bool promiscuous); |
|
106 |
|
107 /** |
|
108 * \param filename filename prefix to use for pcap files. |
|
109 * \param d container of devices of type ns3::EmuNetDevice |
|
110 * \param promiscuous If true capture all possible packets available at the device. |
|
111 * |
|
112 * Enable pcap output on each input device which is of the |
|
113 * ns3::EmuNetDevice type. |
|
114 */ |
|
115 static void EnablePcap (std::string filename, NetDeviceContainer d, bool promiscuous); |
95 |
116 |
96 /** |
117 /** |
97 * \param filename filename prefix to use for pcap files. |
118 * \param filename filename prefix to use for pcap files. |
98 * \param n container of nodes. |
119 * \param n container of nodes. |
|
120 * \param promiscuous If true capture all possible packets available at the device. |
99 * |
121 * |
100 * Enable pcap output on each device which is of the |
122 * Enable pcap output on each device which is of the |
101 * ns3::EmuNetDevice type and which is located in one of the |
123 * ns3::EmuNetDevice type and which is located in one of the |
102 * input nodes. |
124 * input nodes. |
103 */ |
125 */ |
104 static void EnablePcap (std::string filename, NodeContainer n); |
126 static void EnablePcap (std::string filename, NodeContainer n, bool promiscuous); |
105 |
127 |
106 /** |
128 /** |
107 * \param filename filename prefix to use for pcap files. |
129 * \param filename filename prefix to use for pcap files. |
|
130 * \param promiscuous If true capture all possible packets available at the device. |
108 * |
131 * |
109 * Enable pcap output on each device which is of the |
132 * Enable pcap output on each device which is of the |
110 * ns3::EmuNetDevice type |
133 * ns3::EmuNetDevice type |
111 */ |
134 */ |
112 static void EnablePcapAll (std::string filename); |
135 static void EnablePcapAll (std::string filename, bool promiscuous); |
113 |
136 |
114 /** |
137 /** |
115 * \param os output stream |
138 * \param os output stream |
116 * \param nodeid the id of the node to generate ascii output for. |
139 * \param nodeid the id of the node to generate ascii output for. |
117 * \param deviceid the id of the device to generate ascii output for. |
140 * \param deviceid the id of the device to generate ascii output for. |
118 * |
141 * |
119 * Enable ascii output on the specified deviceid within the |
142 * Enable ascii output on the specified deviceid within the |
120 * specified nodeid if it is of type ns3::EmuNetDevice and dump |
143 * specified nodeid if it is of type ns3::EmuNetDevice and dump |
121 * that to the specified stdc++ output stream. |
144 * that to the specified stdc++ output stream. |
122 */ |
145 */ |
123 static void EnableAscii (std::ostream &os, uint32_t nodeid, |
146 static void EnableAscii (std::ostream &os, uint32_t nodeid, uint32_t deviceid); |
124 uint32_t deviceid); |
|
125 |
147 |
126 /** |
148 /** |
127 * \param os output stream |
149 * \param os output stream |
128 * \param d device container |
150 * \param d device container |
129 * |
151 * |