123

Revision:
14:7648334eb41b
Parent:
11:647d53d146f1
--- a/utility/uip.h	Sat Aug 31 20:34:52 2019 +0000
+++ b/utility/uip.h	Tue Sep 03 09:16:55 2019 +0000
@@ -1203,29 +1203,19 @@
 struct uip_conn
 {
     uip_ipaddr_t        ripaddr;        /**< The IP address of the remote host. */
-
     u16_t               lport;          /**< The local TCP port, in network byte order. */
-    u16_t               rport;          /**< The local remote TCP port, in network byte
-			 order. */
-
-    u8_t                rcv_nxt[4];     /**< The sequence number that we expect to
-			 receive next. */
-    u8_t                snd_nxt[4];     /**< The sequence number that was last sent by
-                         us. */
+    u16_t               rport;          /**< The local remote TCP port, in network byte order. */
+    u8_t                rcv_nxt[4];     /**< The sequence number that we expect to receive next. */
+    u8_t                snd_nxt[4];     /**< The sequence number that was last sent by us. */
     u16_t               len;            /**< Length of the data that was previously sent. */
-    u16_t               mss;            /**< Current maximum segment size for the
-			 connection. */
-    u16_t               initialmss;     /**< Initial maximum segment size for the
-			 connection. */
-    u8_t                sa;             /**< Retransmission time-out calculation state
-			 variable. */
-    u8_t                sv;             /**< Retransmission time-out calculation state
-			 variable. */
+    u16_t               mss;            /**< Current maximum segment size for the connection. */
+    u16_t               initialmss;     /**< Initial maximum segment size for the connection. */
+    u8_t                sa;             /**< Retransmission time-out calculation state variable. */
+    u8_t                sv;             /**< Retransmission time-out calculation state variable. */
     u8_t                rto;            /**< Retransmission time-out. */
     u8_t                tcpstateflags;  /**< TCP state and flags. */
     u8_t                timer;          /**< The retransmission timer. */
-    u8_t                nrtx;           /**< The number of retransmissions for the last
-			 segment sent. */
+    u8_t                nrtx;           /**< The number of retransmissions for the last segment sent. */
 
     /** The application state. */
     uip_tcp_appstate_t  appstate;
@@ -1286,48 +1276,34 @@
 {
     struct
     {
-        uip_stats_t drop;       /**< Number of dropped packets at the IP
-			     layer. */
-        uip_stats_t recv;       /**< Number of received packets at the IP
-			     layer. */
-        uip_stats_t sent;       /**< Number of sent packets at the IP
-			     layer. */
-        uip_stats_t vhlerr;     /**< Number of packets dropped due to wrong
-			     IP version or header length. */
-        uip_stats_t hblenerr;   /**< Number of packets dropped due to wrong
-			     IP length, high byte. */
-        uip_stats_t lblenerr;   /**< Number of packets dropped due to wrong
-			     IP length, low byte. */
-        uip_stats_t fragerr;    /**< Number of packets dropped since they
-			     were IP fragments. */
-        uip_stats_t chkerr;     /**< Number of packets dropped due to IP
-			     checksum errors. */
-        uip_stats_t protoerr;   /**< Number of packets dropped since they
-			     were neither ICMP, UDP nor TCP. */
+        uip_stats_t drop;       /**< Number of dropped packets at the IP layer. */
+        uip_stats_t recv;       /**< Number of received packets at the IP layer. */
+        uip_stats_t sent;       /**< Number of sent packets at the IP layer. */
+        uip_stats_t vhlerr;     /**< Number of packets dropped due to wrong IP version or header length. */
+        uip_stats_t hblenerr;   /**< Number of packets dropped due to wrong IP length, high byte. */
+        uip_stats_t lblenerr;   /**< Number of packets dropped due to wrong IP length, low byte. */
+        uip_stats_t fragerr;    /**< Number of packets dropped since they were IP fragments. */
+        uip_stats_t chkerr;     /**< Number of packets dropped due to IP checksum errors. */
+        uip_stats_t protoerr;   /**< Number of packets dropped since they were neither ICMP, UDP nor TCP. */
     } ip;   /**< IP statistics. */
     struct
     {
         uip_stats_t drop;       /**< Number of dropped ICMP packets. */
         uip_stats_t recv;       /**< Number of received ICMP packets. */
         uip_stats_t sent;       /**< Number of sent ICMP packets. */
-        uip_stats_t typeerr;    /**< Number of ICMP packets with a wrong
-			     type. */
+        uip_stats_t typeerr;    /**< Number of ICMP packets with a wrong type. */
     } icmp; /**< ICMP statistics. */
     struct
     {
         uip_stats_t drop;       /**< Number of dropped TCP segments. */
         uip_stats_t recv;       /**< Number of recived TCP segments. */
         uip_stats_t sent;       /**< Number of sent TCP segments. */
-        uip_stats_t chkerr;     /**< Number of TCP segments with a bad
-			     checksum. */
-        uip_stats_t ackerr;     /**< Number of TCP segments with a bad ACK
-			     number. */
+        uip_stats_t chkerr;     /**< Number of TCP segments with a bad checksum. */
+        uip_stats_t ackerr;     /**< Number of TCP segments with a bad ACK number. */
         uip_stats_t rst;        /**< Number of recevied TCP RST (reset) segments. */
         uip_stats_t rexmit;     /**< Number of retransmitted TCP segments. */
-        uip_stats_t syndrop;    /**< Number of dropped SYNs due to too few
-			     connections was avaliable. */
-        uip_stats_t synrst;     /**< Number of SYNs for closed ports,
-			     triggering a RST. */
+        uip_stats_t syndrop;    /**< Number of dropped SYNs due to too few connections was avaliable. */
+        uip_stats_t synrst;     /**< Number of SYNs for closed ports, triggering a RST. */
     } tcp;  /**< TCP statistics. */
 #if UIP_UDP
     struct
@@ -1335,8 +1311,7 @@
         uip_stats_t drop;   /**< Number of dropped UDP segments. */
         uip_stats_t recv;   /**< Number of recived UDP segments. */
         uip_stats_t sent;   /**< Number of sent UDP segments. */
-        uip_stats_t chkerr; /**< Number of UDP segments with a bad
-			     checksum. */
+        uip_stats_t chkerr; /**< Number of UDP segments with a bad checksum. */
     } udp;  /**< UDP statistics. */
 #endif /* UIP_UDP */
 };
@@ -1368,40 +1343,40 @@
    should *NOT* be accessed directly, but only through the UIP
    functions/macros. */
 
-#define UIP_ACKDATA     1       /* Signifies that the outstanding data was
-			       acked and the application should send
-			       out new data instead of retransmitting
-			       the last data. */
+#define UIP_ACKDATA     1        /* Signifies that the outstanding data was
+                                    acked and the application should send
+                                    out new data instead of retransmitting
+                                    the last data. */
 
-#define UIP_NEWDATA     2       /* Flags the fact that the peer has sent
-			       us new data. */
+#define UIP_NEWDATA     2        /* Flags the fact that the peer has sent
+                                    us new data. */
 
-#define UIP_REXMIT      4       /* Tells the application to retransmit the
-			       data that was last sent. */
+#define UIP_REXMIT      4        /* Tells the application to retransmit the
+                                    ata that was last sent. */
 
-#define UIP_POLL        8       /* Used for polling the application, to
-			       check if the application has data that
-			       it wants to send. */
+#define UIP_POLL        8        /* Used for polling the application, to
+                                    check if the application has data that
+                                    it wants to send. */
 
-#define UIP_CLOSE       16      /* The remote host has closed the
-			       connection, thus the connection has
-			       gone away. Or the application signals
-			       that it wants to close the
-			       connection. */
+#define UIP_CLOSE       16       /* The remote host has closed the
+                                    connection, thus the connection has
+                                    gone away. Or the application signals
+                                    that it wants to close the
+                                    connection. */
 
-#define UIP_ABORT       32      /* The remote host has aborted the
-			       connection, thus the connection has
-			       gone away. Or the application signals
-			       that it wants to abort the
-			       connection. */
+#define UIP_ABORT       32       /* The remote host has aborted the
+                                    connection, thus the connection has
+                                    gone away. Or the application signals
+                                    that it wants to abort the
+                                    connection. */
 
-#define UIP_CONNECTED   64      /* We have got a connection from a remote
-                               host and have set up a new connection
-                               for it, or an active connection has
-                               been successfully established. */
+#define UIP_CONNECTED   64       /* We have got a connection from a remote
+                                    host and have set up a new connection
+                                    for it, or an active connection has
+                                    been successfully established. */
 
-#define UIP_TIMEDOUT    128     /* The connection has been aborted due to
-			       too many retransmissions. */
+#define UIP_TIMEDOUT    128      /* The connection has been aborted due to
+                                    too many retransmissions. */
 
 /* uip_process(flag):
  *
@@ -1416,14 +1391,15 @@
    timer has fired. These values are never used directly, but only in
    the macrose defined in this file. */
 
-#define UIP_DATA            1   /*  Tells UIP that there is incoming
+#define UIP_DATA            1    /* Tells UIP that there is incoming
                                     data in the uip_buf buffer. The
                                     length of the data is stored in the
                                     global variable uip_len.
-                                */
-#define UIP_TIMER           2   /* Tells UIP that the periodic timer has fired. */
-#define UIP_POLL_REQUEST    3   /* Tells UIP that a connection should be polled. */
-#define UIP_UDP_SEND_CONN   4   /* Tells UIP that a UDP datagram should be constructed in the uip_buf buffer. */
+                                 */
+#define UIP_TIMER           2    /* Tells UIP that the periodic timer has fired. */
+#define UIP_POLL_REQUEST    3    /* Tells UIP that a connection should be polled. */
+#define UIP_UDP_SEND_CONN   4    /* Tells UIP that a UDP datagram should be constructed
+                                    in the uip_buf buffer. */
 
 #if UIP_UDP
 #define UIP_UDP_TIMER   5