Browse Source

Correcciones al ingles y espanol, cambie detalles del sort.cpp de acuerdo al libro.

SaraB 7 years ago
parent
commit
dea53786d6
3 changed files with 14 additions and 14 deletions
  1. 3
    3
      README-en.md
  2. 9
    9
      Sort.cpp
  3. 2
    2
      packet.cpp

+ 3
- 3
README-en.md View File

5
 ![main2.png](images/main2.png)
5
 ![main2.png](images/main2.png)
6
 ![main3.png](images/main3.png)
6
 ![main3.png](images/main3.png)
7
 
7
 
8
-[Verano 2016 - Ive - Tatiana - Rafa]
8
+
9
 
9
 
10
 When working with arrays, two common tasks are searching for data and sorting the data using a certain order, ascending or descending, alphabetically or numerically. To efficiently carry out these tasks, searching and sorting algorithms are used. One simple searching algorithm is linear search. Two well known sorting algorithms are Selection Sort and Bubble Sort. In this laboratory experience, you will complete an application to monitor network flow to practice the implementation of algorithms for searching and sorting.
10
 When working with arrays, two common tasks are searching for data and sorting the data using a certain order, ascending or descending, alphabetically or numerically. To efficiently carry out these tasks, searching and sorting algorithms are used. One simple searching algorithm is linear search. Two well known sorting algorithms are Selection Sort and Bubble Sort. In this laboratory experience, you will complete an application to monitor network flow to practice the implementation of algorithms for searching and sorting.
11
 
11
 
53
 
53
 
54
 Port numbers are stored on 2 bytes (16 bits). Therefore, port numbers range from 0 to 65535. Some port numbers assigned to known service applications are: 22 for `ssh`, 23 for `telnet`, 25 `smtp`, 80 for `http`. 
54
 Port numbers are stored on 2 bytes (16 bits). Therefore, port numbers range from 0 to 65535. Some port numbers assigned to known service applications are: 22 for `ssh`, 23 for `telnet`, 25 `smtp`, 80 for `http`. 
55
 
55
 
56
-The application that you will see today can be used to monitor what is known as NetFlows. One NetFlow is composed of the aggregation of the packets of an unidirectional communication between the the applications of two computers. For instance, a NetFlow can be composed of the packets used to send the information from your browser to the `http` application of the web server running Moodle. 
56
+The application that you will see today can be used to monitor what is known as NetFlows. One NetFlow is composed of the aggregation of the packets of an unidirectional communication between the applications of two computers. For instance, a NetFlow can be composed of the packets used to send the information from your browser to the `http` application of the web server running Moodle. 
57
 
57
 
58
 
58
 
59
 Figure 1 shows the interface for the *Network Analyzer* application.
59
 Figure 1 shows the interface for the *Network Analyzer* application.
66
 
66
 
67
 ---
67
 ---
68
 
68
 
69
-Each row in the table in Figure 1 is a NetFlow composed of the source and destination address, the source and destination port, the number of packets and the number of octets (8 bits) in one unidirectional communication between the source and destination computer, from the source port to the destination port.
69
+Each row in the table in Figure 1 is a NetFlow composed of the source and destination address, the source and destination port, the number of packets, and the number of octets (8 bits) in one unidirectional communication between the source and destination computer, from the source port to the destination port.
70
 
70
 
71
 The application that you will complete gives the user the ability to analyze the status of the network.  Among others it allows to:
71
 The application that you will complete gives the user the ability to analyze the status of the network.  Among others it allows to:
72
 
72
 

+ 9
- 9
Sort.cpp View File

11
 /// the packets in the netflow file using the Bubble sort algorithm.
11
 /// the packets in the netflow file using the Bubble sort algorithm.
12
 /// \param netdata  Packet vector that will be sorted.
12
 /// \param netdata  Packet vector that will be sorted.
13
 /// \~Spanish
13
 /// \~Spanish
14
-/// \brief Function que ordena por direccion fuente
14
+/// \brief Funcion que ordena por direccion fuente
15
 /// los paquetes en el archivo de netflows usando el algoritmo de Bubble sort (Burbuja).
15
 /// los paquetes en el archivo de netflows usando el algoritmo de Bubble sort (Burbuja).
16
 /// \param netdata Vector de paquetes a ser ordenado.
16
 /// \param netdata Vector de paquetes a ser ordenado.
17
 void SortBySrcAddr(vector<Packet> &netdata){
17
 void SortBySrcAddr(vector<Packet> &netdata){
31
 /// the packets in the netflow file using the Selection sort algorithm.
31
 /// the packets in the netflow file using the Selection sort algorithm.
32
 /// \param netdata  Packet vector that will be sorted.
32
 /// \param netdata  Packet vector that will be sorted.
33
 /// \~Spanish
33
 /// \~Spanish
34
-/// \brief Function que ordena por direccion destino
34
+/// \brief Funcion que ordena por direccion destino
35
 /// los paquetes en el archivo de netflows usando el algoritmo de Selection sort (Seleccion).
35
 /// los paquetes en el archivo de netflows usando el algoritmo de Selection sort (Seleccion).
36
 /// \param netdata Vector de paquetes a ser ordenado.
36
 /// \param netdata Vector de paquetes a ser ordenado.
37
 void SortByDstAddr(vector<Packet> &netdata){
37
 void SortByDstAddr(vector<Packet> &netdata){
49
 /// the packets in the netflow file using the Bubble sort algorithm.
49
 /// the packets in the netflow file using the Bubble sort algorithm.
50
 /// \param netdata  Packet vector that will be sorted.
50
 /// \param netdata  Packet vector that will be sorted.
51
 /// \~Spanish
51
 /// \~Spanish
52
-/// \brief Function que ordena por puerto fuente
53
-/// los paquetes en el archivo de netflows usando el algoritmo de Selection sort (Burbuja).
52
+/// \brief Funcion que ordena por puerto fuente
53
+/// los paquetes en el archivo de netflows usando el algoritmo de Bubble sort (Burbuja).
54
 /// \param netdata Vector de paquetes a ser ordenado.
54
 /// \param netdata Vector de paquetes a ser ordenado.
55
 void SortBySrcPort(vector<Packet> &netdata){
55
 void SortBySrcPort(vector<Packet> &netdata){
56
 
56
 
57
-    // Space to implement the Selection Sort algorithm
57
+    // Space to implement the Bubble Sort algorithm
58
     
58
     
59
     
59
     
60
     // YOUR CODE HERE
60
     // YOUR CODE HERE
64
 /// \fn void SortByDstPort(vector<Packet> &netdata)
64
 /// \fn void SortByDstPort(vector<Packet> &netdata)
65
 /// \~English
65
 /// \~English
66
 /// \brief Function that sorts by destination port
66
 /// \brief Function that sorts by destination port
67
-/// the packets in the netflow file using the Bubble sort algorithm.
67
+/// the packets in the netflow file using the Selection sort algorithm.
68
 /// \param netdata  Packet vector that will be sorted.
68
 /// \param netdata  Packet vector that will be sorted.
69
 /// \~Spanish
69
 /// \~Spanish
70
-/// \brief Function que ordena por puerto destino
71
-/// los paquetes en el archivo de netflows usando el algoritmo de Bubble sort (Burbuja).
70
+/// \brief Funcion que ordena por puerto destino
71
+/// los paquetes en el archivo de netflows usando el algoritmo de Selection sort (Seleccion).
72
 /// \param netdata Vector de paquetes a ser ordenado.
72
 /// \param netdata Vector de paquetes a ser ordenado.
73
 void SortByDstPort(vector<Packet> &netdata){
73
 void SortByDstPort(vector<Packet> &netdata){
74
 
74
 
75
-    // Space to implement the bubble sort algorithm
75
+    // Space to implement the Selection sort algorithm
76
     
76
     
77
     
77
     
78
      // YOUR CODE HERE
78
      // YOUR CODE HERE

+ 2
- 2
packet.cpp View File

12
 /// * packets: set to 0.
12
 /// * packets: set to 0.
13
 /// * enabled: set to false.
13
 /// * enabled: set to false.
14
 /// \~Spanish
14
 /// \~Spanish
15
-/// \brief Constructor por defecto.  Las propiedades de el paquete se ajustan como sigue:
15
+/// \brief Constructor por defecto.  Las propiedades del paquete se ajustan como sigue:
16
 /// * src_addr: a una cadena vacia.
16
 /// * src_addr: a una cadena vacia.
17
 /// * dst_addr: a una cadena vacia.
17
 /// * dst_addr: a una cadena vacia.
18
 /// * src_port: a 0.
18
 /// * src_port: a 0.
99
 /// \brief Getter for the destination port
99
 /// \brief Getter for the destination port
100
 /// \return dst port
100
 /// \return dst port
101
 /// \~Spanish
101
 /// \~Spanish
102
-/// \brief Devuelve la puerto destino
102
+/// \brief Devuelve el puerto destino
103
 /// \return puerto destino
103
 /// \return puerto destino
104
 int Packet::getDstPort(){
104
 int Packet::getDstPort(){
105
     return dst_port ;
105
     return dst_port ;