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,7 +5,7 @@
5 5
 ![main2.png](images/main2.png)
6 6
 ![main3.png](images/main3.png)
7 7
 
8
-[Verano 2016 - Ive - Tatiana - Rafa]
8
+
9 9
 
10 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,7 +53,7 @@ Internet addresses are stored on 4 bytes (32 bits), normally presented to users
53 53
 
54 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 59
 Figure 1 shows the interface for the *Network Analyzer* application.
@@ -66,7 +66,7 @@ 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 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,7 +11,7 @@
11 11
 /// the packets in the netflow file using the Bubble sort algorithm.
12 12
 /// \param netdata  Packet vector that will be sorted.
13 13
 /// \~Spanish
14
-/// \brief Function que ordena por direccion fuente
14
+/// \brief Funcion que ordena por direccion fuente
15 15
 /// los paquetes en el archivo de netflows usando el algoritmo de Bubble sort (Burbuja).
16 16
 /// \param netdata Vector de paquetes a ser ordenado.
17 17
 void SortBySrcAddr(vector<Packet> &netdata){
@@ -31,7 +31,7 @@ void SortBySrcAddr(vector<Packet> &netdata){
31 31
 /// the packets in the netflow file using the Selection sort algorithm.
32 32
 /// \param netdata  Packet vector that will be sorted.
33 33
 /// \~Spanish
34
-/// \brief Function que ordena por direccion destino
34
+/// \brief Funcion que ordena por direccion destino
35 35
 /// los paquetes en el archivo de netflows usando el algoritmo de Selection sort (Seleccion).
36 36
 /// \param netdata Vector de paquetes a ser ordenado.
37 37
 void SortByDstAddr(vector<Packet> &netdata){
@@ -49,12 +49,12 @@ void SortByDstAddr(vector<Packet> &netdata){
49 49
 /// the packets in the netflow file using the Bubble sort algorithm.
50 50
 /// \param netdata  Packet vector that will be sorted.
51 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 54
 /// \param netdata Vector de paquetes a ser ordenado.
55 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 60
     // YOUR CODE HERE
@@ -64,15 +64,15 @@ void SortBySrcPort(vector<Packet> &netdata){
64 64
 /// \fn void SortByDstPort(vector<Packet> &netdata)
65 65
 /// \~English
66 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 68
 /// \param netdata  Packet vector that will be sorted.
69 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 72
 /// \param netdata Vector de paquetes a ser ordenado.
73 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 78
      // YOUR CODE HERE

+ 2
- 2
packet.cpp View File

@@ -12,7 +12,7 @@
12 12
 /// * packets: set to 0.
13 13
 /// * enabled: set to false.
14 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 16
 /// * src_addr: a una cadena vacia.
17 17
 /// * dst_addr: a una cadena vacia.
18 18
 /// * src_port: a 0.
@@ -99,7 +99,7 @@ int Packet::getSrcPort(){
99 99
 /// \brief Getter for the destination port
100 100
 /// \return dst port
101 101
 /// \~Spanish
102
-/// \brief Devuelve la puerto destino
102
+/// \brief Devuelve el puerto destino
103 103
 /// \return puerto destino
104 104
 int Packet::getDstPort(){
105 105
     return dst_port ;