gnrc_tcp: cleanup: Restrict lines to 100 char boundries

pr/rotary
Simon Brummer 7 years ago
parent a8b8b64036
commit 4857f16ee8

@ -99,7 +99,7 @@ int gnrc_tcp_open_active(gnrc_tcp_tcb_t *tcb, const uint8_t address_family,
* @param[in,out] tcb This connections Transmission control block.
* @param[in] address_family Address Family of @p local_addr.
* If local_addr == NULL, address_family is ignored.
* @param[in] local_addr If not NULL the connection is bound to the address in @p local_addr.
* @param[in] local_addr If not NULL the connection is bound to the address @p local_addr.
* If NULL a connection request to every local ip address is valid.
* @param[in] local_port Portnumber that should used for incomming connection requests.
*

@ -47,40 +47,40 @@ extern "C" {
* @brief transmission control block of gnrc_tcp
*/
typedef struct _transmission_control_block {
uint8_t address_family; /**< Address Family of local_addr and peer_addr */
uint8_t address_family; /**< Address Family of local_addr and peer_addr */
#ifdef MODULE_GNRC_IPV6
uint8_t local_addr[sizeof(ipv6_addr_t)]; /**< local IP address */
uint8_t peer_addr[sizeof(ipv6_addr_t)]; /**< peer IP address */
uint8_t local_addr[sizeof(ipv6_addr_t)]; /**< local IP address */
uint8_t peer_addr[sizeof(ipv6_addr_t)]; /**< peer IP address */
#endif
uint16_t local_port; /**< local connections port number */
uint16_t peer_port; /**< port connections port number */
uint8_t state; /**< Connections state */
uint8_t status; /**< A connections status flags */
uint32_t snd_una; /**< Send Unacknowledged */
uint32_t snd_nxt; /**< Send Next */
uint16_t snd_wnd; /**< Send Window */
uint32_t snd_wl1; /**< SeqNo. Last Windowupdate */
uint32_t snd_wl2; /**< AckNo. Last Windowupdate */
uint32_t rcv_nxt; /**< Receive Next */
uint16_t rcv_wnd; /**< Receive Window */
uint32_t iss; /**< Initial Sequence Number */
uint32_t irs; /**< Initial Received Sequence Number */
uint16_t mss; /**< The peers MSS */
uint32_t rtt_start; /**< Timer value for rtt estimation */
int32_t rtt_var; /**< Round Trip Time variance */
int32_t srtt; /**< Smoothed Round Trip Time */
int32_t rto; /**< Retransmission Timeout Duration */
uint8_t retries; /**< Number of Retransmissions */
xtimer_t tim_tout; /**< Timer struct for timeouts */
msg_t msg_tout; /**< Message, sent on timeouts */
gnrc_pktsnip_t *pkt_retransmit; /**< Pointer to Packet in "retransmit queue" */
kernel_pid_t owner; /**< PID of this connection handling thread */
msg_t msg_queue[GNRC_TCP_TCB_MSG_QUEUE_SIZE]; /**< Message queue used for asynchronious operation */
uint8_t *rcv_buf_raw; /**< Pointer to the receive buffer */
ringbuffer_t rcv_buf; /**< Receive Buffer data structure */
mutex_t fsm_lock; /**< Mutex for FSM access synchronization */
mutex_t function_lock; /**< Mutex for Function call synchronization */
struct _transmission_control_block *next; /**< Pointer next TCP connection */
uint16_t local_port; /**< local connections port number */
uint16_t peer_port; /**< port connections port number */
uint8_t state; /**< Connections state */
uint8_t status; /**< A connections status flags */
uint32_t snd_una; /**< Send Unacknowledged */
uint32_t snd_nxt; /**< Send Next */
uint16_t snd_wnd; /**< Send Window */
uint32_t snd_wl1; /**< SeqNo. Last Windowupdate */
uint32_t snd_wl2; /**< AckNo. Last Windowupdate */
uint32_t rcv_nxt; /**< Receive Next */
uint16_t rcv_wnd; /**< Receive Window */
uint32_t iss; /**< Initial Sequence Number */
uint32_t irs; /**< Initial Received Sequence Number */
uint16_t mss; /**< The peers MSS */
uint32_t rtt_start; /**< Timer value for rtt estimation */
int32_t rtt_var; /**< Round Trip Time variance */
int32_t srtt; /**< Smoothed Round Trip Time */
int32_t rto; /**< Retransmission Timeout Duration */
uint8_t retries; /**< Number of Retransmissions */
xtimer_t tim_tout; /**< Timer struct for timeouts */
msg_t msg_tout; /**< Message, sent on timeouts */
gnrc_pktsnip_t *pkt_retransmit; /**< Pointer to Packet in "retransmit queue" */
kernel_pid_t owner; /**< PID of this connection handling thread */
msg_t msg_queue[GNRC_TCP_TCB_MSG_QUEUE_SIZE]; /**< Tcb's message queue */
uint8_t *rcv_buf_raw; /**< Pointer to the receive buffer */
ringbuffer_t rcv_buf; /**< Receive Buffer data structure */
mutex_t fsm_lock; /**< Mutex for FSM access synchronization */
mutex_t function_lock; /**< Mutex for Function call synchronization */
struct _transmission_control_block *next; /**< Pointer next TCP connection */
} gnrc_tcp_tcb_t;
#ifdef __cplusplus

@ -119,7 +119,7 @@ static int _gnrc_tcp_open(gnrc_tcp_tcb_t *tcb, const uint8_t *target_addr, uint1
if (local_addr == NULL) {
tcb->status |= STATUS_ALLOW_ANY_ADDR;
}
/* If local address is specified: Copy it into tcb: only connections to this addr are ok */
/* If local address is specified: Copy it into tcb */
else {
switch (tcb->address_family) {
#ifdef MODULE_GNRC_IPV6

@ -25,7 +25,7 @@
uint32_t _option_build_mss(uint16_t mss)
{
return (((uint32_t )TCP_OPTION_KIND_MSS) << 24) | (((uint32_t) TCP_OPTION_LENGTH_MSS) << 16) | mss;
return (uint32_t) ((TCP_OPTION_KIND_MSS << 24) | (TCP_OPTION_LENGTH_MSS << 16) | mss);
}
uint16_t _option_build_offset_control(uint16_t nopts, uint16_t ctl)

@ -89,7 +89,8 @@ int _pkt_build_reset_from_pkt(gnrc_pktsnip_t **out_pkt, gnrc_pktsnip_t *in_pkt)
/* Allocate new tcp header */
tcp_snp = gnrc_pktbuf_add(NULL, &tcp_hdr_out, TCP_HDR_OFFSET_MIN * 4, GNRC_NETTYPE_TCP);
if (tcp_snp == NULL) {
DEBUG("gnrc_tcp_pkt.c : _pkt_build_reset_from_pkt() : Can't alloc buffer for TCP Header\n.");
DEBUG("gnrc_tcp_pkt.c : _pkt_build_reset_from_pkt() :\
Can't alloc buffer for TCP Header\n.");
*(out_pkt) = NULL;
return -ENOMEM;
}
@ -99,7 +100,8 @@ int _pkt_build_reset_from_pkt(gnrc_pktsnip_t **out_pkt, gnrc_pktsnip_t *in_pkt)
#ifdef MODULE_GNRC_IPV6
ip6_snp = gnrc_ipv6_hdr_build(tcp_snp, &(ip6_hdr->dst), &(ip6_hdr->src));
if (ip6_snp == NULL) {
DEBUG("gnrc_tcp_pkt.c : _pkt_build_reset_from_pkt() : Can't alloc buffer for IPv6 Header.\n");
DEBUG("gnrc_tcp_pkt.c : _pkt_build_reset_from_pkt() :\
Can't alloc buffer for IPv6 Header.\n");
gnrc_pktbuf_release(tcp_snp);
*(out_pkt) = NULL;
return -ENOMEM;

Loading…
Cancel
Save