|
@@ -162,23 +162,22 @@ Source_Address Destination_Address Source_Port Destination_Port Octects Packets
|
162
|
162
|
|
163
|
163
|
1. Open the `Sort.cpp` file. In this exercise you will complete the following functions that can be found in the file:
|
164
|
164
|
|
165
|
|
-* `SortBySrcAddr`
|
166
|
|
-* `SortByDstAddr`
|
167
|
|
-* `SortBySrcPort`
|
168
|
|
-* `SortByDstPort`
|
|
165
|
+ * `SortBySrcAddr`
|
|
166
|
+ * `SortByDstAddr`
|
|
167
|
+ * `SortBySrcPort`
|
|
168
|
+ * `SortByDstPort`
|
169
|
169
|
|
170
|
|
-Each one of these functions receives a vector of `Packet` objects. Each function (notice their names) is related to an attribute of the `Packet` class and should order the packets in the vector according to the attribute of interest.
|
|
170
|
+ Each one of these functions receives a vector of `Packet` objects. Each function (notice their names) is related to an attribute of the `Packet` class and should order the packets in the vector according to the attribute of interest.
|
171
|
171
|
|
172
|
|
-The following figure is a screenshot of the application interface after sorting the data by `Source Address`.
|
|
172
|
+ The following figure is a screenshot of the application interface after sorting the data by `Source Address`.
|
173
|
173
|
|
174
|
|
----
|
|
174
|
+ ---
|
175
|
175
|
|
176
|
|
-![figure4.png](images/figure4.png)
|
|
176
|
+ ![figure4.png](images/figure4.png)
|
177
|
177
|
|
178
|
|
-**Figure 4.** Interface of the *Network Analyzer* application with the network flow packets ordered by `Source Address`.
|
179
|
|
-
|
180
|
|
----
|
|
178
|
+ **Figure 4.** Interface of the *Network Analyzer* application with the network flow packets ordered by `Source Address`.
|
181
|
179
|
|
|
180
|
+ ---
|
182
|
181
|
|
183
|
182
|
2. Complete the `SortBySrcAddr` function implementing the *Bubble Sort* algorithm, sorting the packets by `source address`.
|
184
|
183
|
|