Browse Source

gnrc_tcp: cleanup: fixed outdated comments

pr/rotary
Simon Brummer 6 years ago
parent
commit
fd007d5307
  1. 6
      sys/include/net/gnrc/tcp.h
  2. 2
      sys/net/gnrc/transport_layer/tcp/gnrc_tcp.c
  3. 4
      sys/net/gnrc/transport_layer/tcp/gnrc_tcp_eventloop.c
  4. 10
      sys/net/gnrc/transport_layer/tcp/gnrc_tcp_fsm.c
  5. 2
      sys/net/gnrc/transport_layer/tcp/internal/common.h
  6. 14
      sys/net/gnrc/transport_layer/tcp/internal/pkt.h
  7. 6
      sys/net/gnrc/transport_layer/tcp/internal/rcvbuf.h
  8. 2
      tests/gnrc_tcp_client/main.c
  9. 2
      tests/gnrc_tcp_server/main.c

6
sys/include/net/gnrc/tcp.h

@ -68,7 +68,7 @@ void gnrc_tcp_tcb_init(gnrc_tcp_tcb_t *tcb);
* @param[in] target_addr Pointer to target address.
* @param[in] target_port Targets port number.
* @param[in] local_port If zero or GNRC_TCP_PORT_UNSPEC, the connections
* source port is randomly choosen. If local_port is non-zero
* source port is randomly chosen. If local_port is non-zero
* the local_port is used as source port.
*
* @return Zero on success.
@ -183,8 +183,8 @@ int gnrc_tcp_close(gnrc_tcp_tcb_t *tcb);
/**
* @brief Set checksum calculated from tcp and network-layer header in tcp-header.
*
* @param[in] hdr ng_pktsnip that contains tcp header.
* @param[in] pseudo_hdr ng_pktsnip that contains networklayer header.
* @param[in] hdr gnrc_pktsnip that contains tcp header.
* @param[in] pseudo_hdr gnrc_pktsnip that contains networklayer header.
*
* @return zero on succeed.
* @return -EFAULT if hdr or pseudo_hdr were NULL

2
sys/net/gnrc/transport_layer/tcp/gnrc_tcp.c

@ -83,7 +83,7 @@ mutex_t _list_tcb_lock;
* @param[in] local_port Local Port to bind on, if this is a passive connection.
* @param[in] passive Flag to indicate if this is a active or passive open.
*
* @return 0 on success.
* @return 0 on success.
* @return -EISCONN if transmission control block is already in use.
* @return -ENOMEM if the receive buffer for the tcb could not be allocated.
* Increase "GNRC_TCP_RCV_BUFFERS".

4
sys/net/gnrc/transport_layer/tcp/gnrc_tcp_eventloop.c

@ -37,7 +37,7 @@
#include "debug.h"
/**
* @brief send function, used to pass paket down the network stack
* @brief send function, pass paket down the network stack
*
* @param[in] pkt paket to pass down the network stack
*
@ -67,7 +67,7 @@ static int _send(gnrc_pktsnip_t *pkt)
}
/**
* @brief recv function, used to call fsm on packet reception
* @brief recv function, receive packet from network layer.
*
* @param[in] pkt incomming paket to process
*

10
sys/net/gnrc/transport_layer/tcp/gnrc_tcp_fsm.c

@ -57,7 +57,7 @@ static int _is_local_port_in_use(const uint16_t portnumber)
}
/**
* @brief Generate random, currently unused local port above the well-known ports (> 1024)
* @brief Generate random unused local port above the well-known ports (> 1024)
*
* @return The generated port number
*/
@ -76,7 +76,7 @@ static uint16_t _get_random_local_port(void)
/**
* @brief clears retransmit queue
*
* @param[in/out] conn TCP Connection, where the retransmit should be cleared
* @param[in/out] tcb tcb containing the retransmit queue.
*
* @return zero on success
*/
@ -93,7 +93,7 @@ static int _clear_retransmit(gnrc_tcp_tcb_t *tcb)
/**
* @brief restarts time wait timer
*
* @param[in/out] conn TCP Connection, where the timewait_timer should be restarted
* @param[in/out] tcb tcb containing the timer structure to use.
*
* @return Zero on success
*/
@ -802,7 +802,7 @@ static int _fsm_timeout_connection(gnrc_tcp_tcb_t *tcb, bool *notify_owner)
/**
* @brief FSM Handling Function for probe sending
*
* @param[in/out] tcb Specifies tcb to use fsm on.
* @param[in/out] tcb tcb of this connection
*
* @return zero on success.
*/
@ -822,7 +822,7 @@ static int _fsm_send_probe(gnrc_tcp_tcb_t *tcb)
/**
* @brief FSM Handling Function for clearing the retransmit queue.
*
* @param[in/out] tcb Specifies tcb to use fsm on.
* @param[in/out] tcb tcb of this connection.
*
* @return zero on success.
*/

2
sys/net/gnrc/transport_layer/tcp/internal/common.h

@ -120,7 +120,7 @@ extern "C" {
extern kernel_pid_t gnrc_tcp_pid;
/**
* @brief Head of conn linked list.
* @brief Head of linked tcb list.
*/
extern gnrc_tcp_tcb_t *_list_tcb_head;

14
sys/net/gnrc/transport_layer/tcp/internal/pkt.h

@ -43,14 +43,14 @@ extern "C" {
int _pkt_build_reset_from_pkt(gnrc_pktsnip_t **out_pkt, gnrc_pktsnip_t *in_pkt);
/**
* @brief Build and allocate a tcp paket in paketbuffer, conn stores pointer to new paket.
* @brief Build and allocate a tcp paket, tcb stores pointer to new paket.
*
* @param[in,out] tcb This connections Transmission control block.
* @param[in,out] tcb This connections transmission control block.
* @param[out] out_pkt Pointer to paket to build
* @param[out] seq_con Number of Bytes, the packet will consume in sequence number spce
* @param[in] ctl control bits to set in pkt
* @param[in] seq_num sequence number to use in new paket
* @param[in] ack_num acknowledgment number to use in new paket
* @param[out] seq_con Number of Bytes, the packet will consume in sequence number space
* @param[in] ctl control bits to set in out_pkt
* @param[in] seq_num sequence number of the new paket
* @param[in] ack_num acknowledgment number of the new paket
* @param[in] payload pointer to payload buffer
* @param[in] payload_len payload size
*
@ -110,7 +110,7 @@ uint32_t _pkt_get_pay_len(gnrc_pktsnip_t *pkt);
*
* @param[in,out] tcb This connections Transmission control block.
* @param[in] pkt paket to add to the retransmission mechanism
* @param[in] retransmit is this a retransmission ?
* @param[in] retransmit Flag used to indicate that pkt is a retransmit.
*
* @return Zero on success
* @return -ENOMEM if the retransmission queue is full

6
sys/net/gnrc/transport_layer/tcp/internal/rcvbuf.h

@ -17,10 +17,10 @@
* @brief Functions for allocating and freeing the receive buffer
*
* @author Simon Brummer <simon.brummer@posteo.de>
* @}
*/
#ifndef GNRC_TCP_INTERNAL_RCVBUF_H
#define GNRC_TCP_INTERNAL_RCVBUF_H
#ifndef GNRC_TCP_INTERNAL_RCVBUF_H
#define GNRC_TCP_INTERNAL_RCVBUF_H
#include <stdint.h>
#include "mutex.h"

2
tests/gnrc_tcp_client/main.c

@ -5,7 +5,7 @@
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
#include <stdio.h>
#include <errno.h>
#include "net/af.h"

2
tests/gnrc_tcp_server/main.c

@ -5,7 +5,7 @@
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
#include <stdio.h>
#include <errno.h>
#include "thread.h"

Loading…
Cancel
Save