1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sys/net: fix typos

This commit is contained in:
Kaspar Schleiser 2019-10-23 21:16:23 +02:00
parent 769f2b8363
commit d4f3747705
24 changed files with 46 additions and 46 deletions

View File

@ -311,7 +311,7 @@ static size_t _handle_req(coap_pkt_t *pdu, uint8_t *buf, size_t len,
}
/* initialize new registration request */
if ((memo == NULL) && coap_has_observe(pdu)) {
/* verify resource not already registerered (for another endpoint) */
/* verify resource not already registered (for another endpoint) */
if ((empty_slot >= 0) && (resource_memo == NULL)) {
int obs_slot = _find_observer(&observer, remote);
/* cache new observer */

View File

@ -667,7 +667,7 @@ static unsigned _size2szx(size_t size)
{
assert(size <= 1024);
/* We must wait to subract the szx offset of 4 until after the assert below.
/* We must wait to subtract the szx offset of 4 until after the assert below.
* Input should be a power of two, but if not it may have a stray low order
* '1' bit that would invalidate the subtraction. */
unsigned szx = bitarithm_lsb(size);

View File

@ -490,7 +490,7 @@ int _tftp_server(tftp_context_t *ctxt)
break;
}
else {
/* continue normal server opration */
/* continue normal server operation */
DEBUG("tftp: message incoming\n");
ret = _tftp_state_processes(ctxt, &msg);

View File

@ -305,7 +305,7 @@ static void gomach_wait_bcast_tx_finish(gnrc_netif_t *netif)
}
/* This is to handle no-TX-complete issue. In case there is no no-TX-complete event,
* we will quit broadcasting, i.e., not getting stucked here. */
* we will quit broadcasting, i.e., not getting stuck here. */
if (gnrc_gomach_timeout_is_expired(netif, GNRC_GOMACH_TIMEOUT_BCAST_FINISH)) {
gnrc_gomach_clear_timeout(netif, GNRC_GOMACH_TIMEOUT_BCAST_INTERVAL);
netif->mac.tx.bcast_state = GNRC_GOMACH_BCAST_END;
@ -1104,7 +1104,7 @@ static void gomach_t2u_wait_preamble_tx(gnrc_netif_t *netif)
/* This is mainly to handle no-TX-complete error. Once the max preamble interval
* timeout expired here (i.e., no-TX-complete error), we will quit waiting here
* and go to send the next preamble, thus the MAC will not get stucked here. */
* and go to send the next preamble, thus the MAC will not get stuck here. */
if (gnrc_gomach_timeout_is_expired(netif, GNRC_GOMACH_TIMEOUT_MAX_PREAM_INTERVAL)) {
gnrc_priority_pktqueue_flush(&netif->mac.rx.queue);
netif->mac.tx.t2u_state = GNRC_GOMACH_T2U_PREAMBLE_PREPARE;

View File

@ -747,7 +747,7 @@ void gnrc_gomach_cp_packet_process(gnrc_netif_t *netif)
gnrc_gomach_packet_info_t receive_packet_info;
while ((pkt = gnrc_priority_pktqueue_pop(&netif->mac.rx.queue)) != NULL) {
/* Parse the received packet, fetch key MAC informations. */
/* Parse the received packet, fetch key MAC information. */
int res = _parse_packet(netif, pkt, &receive_packet_info);
if (res != 0) {
LOG_DEBUG("[GOMACH] CP: Packet could not be parsed: %i\n", res);

View File

@ -118,7 +118,7 @@ static uint8_t _send_bcast(gnrc_netif_t *netif)
gnrc_pktbuf_release(netif->mac.tx.packet);
LOG_WARNING("WARNING: [LWMAC-tx] TX queue full, drop packet\n");
}
/* drop pointer so it wont be free'd */
/* drop pointer so it won't be free'd */
netif->mac.tx.packet = NULL;
tx_info |= GNRC_LWMAC_TX_FAIL;
return tx_info;
@ -158,7 +158,7 @@ static uint8_t _send_wr(gnrc_netif_t *netif)
gnrc_pktbuf_release(netif->mac.tx.packet);
LOG_WARNING("WARNING: [LWMAC-tx] TX queue full, drop packet\n");
}
/* drop pointer so it wont be free'd */
/* drop pointer so it won't be free'd */
netif->mac.tx.packet = NULL;
tx_info |= GNRC_LWMAC_TX_FAIL;
return tx_info;
@ -271,7 +271,7 @@ static uint8_t _packet_process_in_wait_for_wa(gnrc_netif_t *netif)
gnrc_pktbuf_release(netif->mac.tx.packet);
LOG_WARNING("WARNING: [LWMAC-tx] TX queue full, drop packet\n");
}
/* drop pointer so it wont be free'd */
/* drop pointer so it won't be free'd */
netif->mac.tx.packet = NULL;
postponed = true;
gnrc_pktbuf_release(pkt);
@ -285,7 +285,7 @@ static uint8_t _packet_process_in_wait_for_wa(gnrc_netif_t *netif)
gnrc_pktbuf_release(netif->mac.tx.packet);
LOG_WARNING("WARNING: [LWMAC-tx] TX queue full, drop packet\n");
}
/* drop pointer so it wont be free'd */
/* drop pointer so it won't be free'd */
netif->mac.tx.packet = NULL;
postponed = true;
gnrc_pktbuf_release(pkt);
@ -441,7 +441,7 @@ static bool _send_data(gnrc_netif_t *netif)
gnrc_pktbuf_release(netif->mac.tx.packet);
LOG_WARNING("WARNING: [LWMAC-tx] TX queue full, drop packet\n");
}
/* drop pointer so it wont be free'd */
/* drop pointer so it won't be free'd */
netif->mac.tx.packet = NULL;
return false;
}
@ -545,7 +545,7 @@ static bool _lwmac_tx_update(gnrc_netif_t *netif)
gnrc_pktbuf_release(netif->mac.tx.packet);
LOG_WARNING("WARNING: [LWMAC-tx] TX queue full, drop packet\n");
}
/* drop pointer so it wont be free'd */
/* drop pointer so it won't be free'd */
netif->mac.tx.packet = NULL;
netif->mac.tx.state = GNRC_LWMAC_TX_STATE_FAILED;
reschedule = true;
@ -699,7 +699,7 @@ static bool _lwmac_tx_update(gnrc_netif_t *netif)
gnrc_pktbuf_release(netif->mac.tx.packet);
LOG_WARNING("WARNING: [LWMAC-tx] TX queue full, drop packet\n");
}
/* drop pointer so it wont be free'd */
/* drop pointer so it won't be free'd */
netif->mac.tx.packet = NULL;
netif->mac.tx.state = GNRC_LWMAC_TX_STATE_FAILED;

View File

@ -32,7 +32,7 @@
/**
* @brief Get packet fit.
*
* Get's the minimum size for an ICMPv6 error message packet, based on the
* Gets the minimum size for an ICMPv6 error message packet, based on the
* invoking packet's size and the interface the invoking packet came over.
*
* @param[in] orig_pkt The invoking packet

View File

@ -96,7 +96,7 @@ static void _snd_buf_free(gnrc_ipv6_ext_frag_send_t *snd_buf);
static void _snd_buf_del(gnrc_ipv6_ext_frag_send_t *snd_buf);
/**
* @brief Dermines the last Per-Fragment extension header of a datagram.
* @brief Determines the last Per-Fragment extension header of a datagram.
*
* @see [RFC 8200, section 4.5](https://tools.ietf.org/html/rfc8200#section-4.5)
* for definition of _Per-Fragment extension header_

View File

@ -830,7 +830,7 @@ static void _receive(gnrc_pktsnip_t *pkt)
first_nh, byteorder_ntohs(hdr->len));
if ((pkt = gnrc_ipv6_ext_process_hopopt(pkt, &first_nh)) == NULL) {
DEBUG("ipv6: packet's extension header was errorneous or packet was "
DEBUG("ipv6: packet's extension header was erroneous or packet was "
"consumed due to it\n");
return;
}

View File

@ -1284,7 +1284,7 @@ static void _handle_rtr_timeout(_nib_dr_entry_t *router)
route->mode = _EMPTY;
route->next_hop->mode &= ~_DST;
_nib_offl_clear(route);
/* XXX routing protocol get's informed in case NUD
/* XXX routing protocol gets informed in case NUD
* determines ipv6->src (still in neighbor cache) to be
* unreachable */
}

View File

@ -375,7 +375,7 @@ void gnrc_ndp_nbr_adv_send(const ipv6_addr_t *tgt, gnrc_netif_t *netif,
pkt = hdr;
}
}
/* TODO: also check if the node provides proxy servies for tgt */
/* TODO: also check if the node provides proxy services for tgt */
if ((pkt != NULL) &&
(netif->ipv6.addrs_flags[tgt_idx] &
GNRC_NETIF_IPV6_ADDRS_FLAGS_ANYCAST)) {

View File

@ -221,7 +221,7 @@ static void _receive(gnrc_pktsnip_t *pkt)
#endif
#ifdef MODULE_GNRC_SIXLOWPAN_IPHC
else if (sixlowpan_iphc_is(dispatch)) {
DEBUG("6lo: received 6LoWPAN IPHC comressed datagram\n");
DEBUG("6lo: received 6LoWPAN IPHC compressed datagram\n");
gnrc_sixlowpan_iphc_recv(pkt, NULL, 0);
return;
}

View File

@ -113,7 +113,7 @@ static void _setup_timeout(xtimer_t *timer, const uint32_t duration, const xtime
* -ENOMEM if the receive buffer for the TCB could not be allocated.
* -EADDRINUSE if @p local_port is already in use.
* -ETIMEDOUT if the connection opening timed out.
* -ECONNREFUSED if the connection was resetted by the peer.
* -ECONNREFUSED if the connection was reset by the peer.
*/
static int _gnrc_tcp_open(gnrc_tcp_tcb_t *tcb, char *target_addr, uint16_t target_port,
const char *local_addr, uint16_t local_port, uint8_t passive)

View File

@ -37,9 +37,9 @@
static msg_t _eventloop_msg_queue[TCP_EVENTLOOP_MSG_QUEUE_SIZE];
/**
* @brief Send function, pass paket down the network stack.
* @brief Send function, pass packet down the network stack.
*
* @param[in] pkt Paket to send.
* @param[in] pkt Packet to send.
*
* @returns Zero on success.
* Negative value on error.
@ -86,13 +86,13 @@ static int _send(gnrc_pktsnip_t *pkt)
/**
* @brief Receive function, receive packet from network layer.
*
* @param[in] pkt Incoming paket.
* @param[in] pkt Incoming packet.
*
* @returns Zero on success.
* Negative value on error.
* -EACCES if write access to packet was not acquired.
* -ERANGE if segment offset value is less than 5.
* -ENOMSG if paket couldn't be marked.
* -ENOMSG if packet couldn't be marked.
* -EINVAL if checksum was invalid.
* -ENOTCONN if no TCB is interested in @p pkt.
*/
@ -225,7 +225,7 @@ static int _receive(gnrc_pktsnip_t *pkt)
if ((ctl & MSK_RST) != MSK_RST) {
_pkt_build_reset_from_pkt(&reset, pkt);
if (gnrc_netapi_send(gnrc_tcp_pid, reset) < 1) {
DEBUG("gnrc_tcp_eventloop.c : _receive() : unable to send reset paket\n");
DEBUG("gnrc_tcp_eventloop.c : _receive() : unable to send reset packet\n");
gnrc_pktbuf_release(reset);
}
}

View File

@ -131,7 +131,7 @@ static int _transition_to(gnrc_tcp_tcb_t *tcb, fsm_state_t state)
LL_DELETE(_list_tcb_head, tcb);
mutex_unlock(&_list_tcb_lock);
/* Free potencially allocated receive buffer */
/* Free potentially allocated receive buffer */
_rcvbuf_release_buffer(tcb);
tcb->status |= STATUS_NOTIFY_USER;
break;
@ -451,7 +451,7 @@ static int _fsm_rcvd_pkt(gnrc_tcp_tcb_t *tcb, gnrc_pktsnip_t *in_pkt)
/* Check if SYN request is handled by another connection */
lst = _list_tcb_head;
while (lst) {
/* Compare port numbers and network layer adresses */
/* Compare port numbers and network layer addresses */
if (lst->local_port == dst && lst->peer_port == src) {
#ifdef MODULE_GNRC_IPV6
if (snp->type == GNRC_NETTYPE_IPV6 && lst->address_family == AF_INET6) {

View File

@ -445,7 +445,7 @@ int _pkt_acknowledge(gnrc_tcp_tcb_t *tcb, const uint32_t ack)
/* Measure round trip time */
int32_t rtt = xtimer_now().ticks32 - tcb->rtt_start;
/* Use time only if ther was no timer overflow and no retransmission (Karns Alogrithm) */
/* Use time only if there was no timer overflow and no retransmission (Karns Algorithm) */
if (tcb->retries == 0 && rtt > 0) {
/* If this is the first sample taken */
if (tcb->srtt == RTO_UNINITIALIZED && tcb->rtt_var == RTO_UNINITIALIZED) {

View File

@ -12,7 +12,7 @@
* @{
*
* @file
* @brief TCP event loop delarations.
* @brief TCP event loop declarations.
*
* @author Simon Brummer <simon.brummer@posteo.de>
*/

View File

@ -54,7 +54,7 @@ typedef enum {
FSM_EVENT_CALL_RECV, /* User function call: recv */
FSM_EVENT_CALL_CLOSE, /* User function call: close */
FSM_EVENT_CALL_ABORT, /* User function call: abort */
FSM_EVENT_RCVD_PKT, /* Paket received from peer */
FSM_EVENT_RCVD_PKT, /* Packet received from peer */
FSM_EVENT_TIMEOUT_TIMEWAIT, /* Timeout: timewait */
FSM_EVENT_TIMEOUT_RETRANSMIT, /* Timeout: retransmit */
FSM_EVENT_TIMEOUT_CONNECTION, /* Timeout: connection */

View File

@ -12,7 +12,7 @@
* @{
*
* @file
* @brief TCP paket handling declarations.
* @brief TCP packet handling declarations.
*
* @author Simon Brummer <simon.brummer@posteo.de>
*/
@ -43,10 +43,10 @@ extern "C" {
int _pkt_build_reset_from_pkt(gnrc_pktsnip_t **out_pkt, gnrc_pktsnip_t *in_pkt);
/**
* @brief Build and allocate a TCB paket, TCB stores pointer to new paket.
* @brief Build and allocate a TCB packet, TCB stores pointer to new packet.
*
* @param[in,out] tcb TCB holding the connection information.
* @param[out] out_pkt Pointer to paket to build.
* @param[out] out_pkt Pointer to packet to build.
* @param[out] seq_con Sequence number consumption of built packet.
* @param[in] ctl Control bits to set in @p out_pkt.
* @param[in] seq_num Sequence number of the new packet.
@ -65,7 +65,7 @@ int _pkt_build(gnrc_tcp_tcb_t *tcb, gnrc_pktsnip_t **out_pkt, uint16_t *seq_con,
* @brief Sends packet to peer.
*
* @param[in,out] tcb TCB holding the connection information.
* @param[in] out_pkt Pointer to paket to send.
* @param[in] out_pkt Pointer to packet to send.
* @param[in] seq_con Sequence number consumption of the packet to send.
* @param[in] retransmit Flag so mark that packet this is a retransmission.
*

View File

@ -38,7 +38,7 @@ typedef struct rcvbuf_entry {
} rcvbuf_entry_t;
/**
* @brief Stuct holding receive buffers.
* @brief Struct holding receive buffers.
*/
typedef struct rcvbuf {
mutex_t lock; /**< Lock for allocation synchronization */
@ -53,7 +53,7 @@ void _rcvbuf_init(void);
/**
* @brief Allocate receive buffer and assign it to TCB.
*
* @param[in,out] tcb TCB that aquires receive buffer.
* @param[in,out] tcb TCB that acquires receive buffer.
*
* @returns Zero on success.
* -ENOMEM if all receive buffers are currently used.

View File

@ -56,7 +56,7 @@ static char addr_str[IPV6_ADDR_MAX_STR_LEN];
#define FIB_ADDR_PRINT_LENS FIB_ADDR_PRINT_LENS2(FIB_ADDR_PRINT_LEN)
/**
* @brief convert an offset given in ms to abolute time in time in us
* @brief convert an offset given in ms to absolute time in time in us
* @param[in] ms the milliseconds to be converted
* @param[out] target the converted point in time
*/
@ -439,7 +439,7 @@ int fib_update_entry(fib_table_t *table, uint8_t *dst, size_t dst_size,
/* we have ambiguous entries, i.e. count > 1
* this should never happen
*/
DEBUG("[fib_update_entry] ambigious entries detected!!!\n");
DEBUG("[fib_update_entry] ambiguous entries detected!!!\n");
}
mutex_unlock(&(table->mtx_access));
@ -463,7 +463,7 @@ void fib_remove_entry(fib_table_t *table, uint8_t *dst, size_t dst_size)
/* we have ambiguous entries, i.e. count > 1
* this should never happen
*/
DEBUG("[fib_update_entry] ambigious entries detected!!!\n");
DEBUG("[fib_update_entry] ambiguous entries detected!!!\n");
}
mutex_unlock(&(table->mtx_access));
@ -1197,7 +1197,7 @@ fib_sr_t* hit = NULL;
/* we create a new sr */
if (check_free_entry == -1) {
/* we have no room to create a new sr
* so we just retrun and NOT tell the RPs to find a route
* so we just return and NOT tell the RPs to find a route
* since we cannot save it
*/
*error = -ENOBUFS;
@ -1359,7 +1359,7 @@ int fib_sr_get_route(fib_table_t *table, uint8_t *dst, size_t dst_size, kernel_p
* @note we could handle -EHOSTUNREACH differently here,
* since it says that we have a partial source route but no RP
* to manage it.
* Thats why I let it pass for now.
* That's why I let it pass for now.
*/
if (hit != NULL) {
hit->sr_lifetime = 0;

View File

@ -123,11 +123,11 @@ void ipv6_addr_init_iid(ipv6_addr_t *out, const uint8_t *iid, uint8_t bits)
memcpy(&(out->u8[pos]), iid, bytes);
}
char *ipv6_addr_split_str(char *addr_str, char seperator)
char *ipv6_addr_split_str(char *addr_str, char separator)
{
char *sep = addr_str;
while (*(++sep)) {
if (*sep == seperator) {
if (*sep == separator) {
*sep++ = '\0';
break;
}

View File

@ -122,7 +122,7 @@ nhdp_addr_entry_t *nhdp_generate_addr_list_from_tmp(uint8_t tmp_type);
* @note
* Must not be called from outside the NHDP writer's or reader's message creation process.
*
* @param[in] decr_usg Flag whether the usage counter of a resetted addr has to be decremented
* @param[in] decr_usg Flag whether the usage counter of a reset addr has to be decremented
*/
void nhdp_reset_addresses_tmp_usg(uint8_t decr_usg);

View File

@ -145,7 +145,7 @@ void nhdp_writer_add_addr(struct rfc5444_writer *wr, nhdp_addr_t *addr,
switch (type) {
case RFC5444_ADDRTLV_LOCAL_IF:
/* Address is mandatory for every sub-msg (if message is splitted) */
/* Address is mandatory for every sub-msg (if message is split) */
wr_addr = rfc5444_writer_add_address(wr, _nhdp_message_content_provider.creator,
&n_addr, true);
break;
@ -154,7 +154,7 @@ void nhdp_writer_add_addr(struct rfc5444_writer *wr, nhdp_addr_t *addr,
/* Fall through */
case RFC5444_ADDRTLV_OTHER_NEIGHB:
/* Address only has to be included in one sub-msg (if message is splitted) */
/* Address only has to be included in one sub-msg (if message is split) */
wr_addr = rfc5444_writer_add_address(wr, _nhdp_message_content_provider.creator,
&n_addr, false);
break;