From patchwork Wed Feb 22 15:40:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 1746306 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Fvphfxyw; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Fvphfxyw; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PML3b0sDgz23yZ for ; Thu, 23 Feb 2023 02:41:15 +1100 (AEDT) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4PML3Z6dncz3c73 for ; Thu, 23 Feb 2023 02:41:14 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Fvphfxyw; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Fvphfxyw; dkim-atps=neutral X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=redhat.com (client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=thuth@redhat.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Fvphfxyw; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Fvphfxyw; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4PML3T0XhNz3bfp for ; Thu, 23 Feb 2023 02:41:07 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677080464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dfAk+5ugqIisNFMsmHRyySygPiGjg7MBiFR8wN3OlsM=; b=FvphfxywEm3uRkypz/AcToGjrpyJl2zUylfHFKPdnDY3ETiSoUY1I/2gqp6FdJFKqleuiG Z+qCAv6qHrcvYYa+sQc3YP2gLfeb32RSwB/J7ht+Qrkr1PasHjTxXw9HujqaC1JcIo2Wxl aFZ1BMckGOJbEv7ogHSgzYISPkxxxLA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677080464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dfAk+5ugqIisNFMsmHRyySygPiGjg7MBiFR8wN3OlsM=; b=FvphfxywEm3uRkypz/AcToGjrpyJl2zUylfHFKPdnDY3ETiSoUY1I/2gqp6FdJFKqleuiG Z+qCAv6qHrcvYYa+sQc3YP2gLfeb32RSwB/J7ht+Qrkr1PasHjTxXw9HujqaC1JcIo2Wxl aFZ1BMckGOJbEv7ogHSgzYISPkxxxLA= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-173-gqZZwTBnMCCywhZ6p5k3wg-1; Wed, 22 Feb 2023 10:41:02 -0500 X-MC-Unique: gqZZwTBnMCCywhZ6p5k3wg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 117D83C1023B; Wed, 22 Feb 2023 15:41:02 +0000 (UTC) Received: from thuth.com (unknown [10.39.194.126]) by smtp.corp.redhat.com (Postfix) with ESMTP id 72A9340168BC; Wed, 22 Feb 2023 15:41:01 +0000 (UTC) From: Thomas Huth To: slof@lists.ozlabs.org Date: Wed, 22 Feb 2023 16:40:55 +0100 Message-Id: <20230222154057.904578-3-thuth@redhat.com> In-Reply-To: <20230222154057.904578-1-thuth@redhat.com> References: <20230222154057.904578-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [SLOF] [PATCH 2/4] Fix typos in the lib/libnet folder X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" Found with the "codespell" utility. Signed-off-by: Thomas Huth --- lib/libnet/dhcp.c | 6 +++--- lib/libnet/dns.c | 4 ++-- lib/libnet/icmpv6.c | 6 +++--- lib/libnet/ipv4.c | 6 +++--- lib/libnet/ipv6.c | 8 ++++---- lib/libnet/ipv6.h | 8 ++++---- lib/libnet/ndp.c | 2 +- lib/libnet/netload.c | 4 ++-- lib/libnet/tftp.c | 4 ++-- 9 files changed, 24 insertions(+), 24 deletions(-) diff --git a/lib/libnet/dhcp.c b/lib/libnet/dhcp.c index 85cd7c0..84d44ba 100644 --- a/lib/libnet/dhcp.c +++ b/lib/libnet/dhcp.c @@ -111,7 +111,7 @@ static uint8_t dhcp_magic[] = {0x63, 0x82, 0x53, 0x63}; * or to retrieve options from DHCP-msg during receiving. *

* If flag[i] == TRUE then field for i-th option retains valid value and - * information from this field may retrived (in case of receiving) or will + * information from this field may retrieved (in case of receiving) or will * be transmitted (in case of transmitting). * */ @@ -233,7 +233,7 @@ int32_t dhcpv4(char *ret_buffer, filename_ip_t *fn_ip) } } - // Store configuration info into filename_ip strucutre + // Store configuration info into filename_ip structure fn_ip -> own_ip = dhcp_own_ip; fn_ip -> server_ip = dhcp_tftp_ip; strcpy(fn_ip->filename, dhcp_filename); @@ -507,7 +507,7 @@ static int32_t dhcp_decode_options(uint8_t opt_field[], uint32_t opt_len, * DHCP: Appends information from source "options" into dest "options". * This function is used to support "file/sname" overloading. * - * @param dst_options destanation "options" field + * @param dst_options destination "options" field * @param dst_len size of dst_options (modified by this function) * @param src_options source "options" field * @param src_len size of src_options diff --git a/lib/libnet/dns.c b/lib/libnet/dns.c index a7313a9..c759c32 100644 --- a/lib/libnet/dns.c +++ b/lib/libnet/dns.c @@ -95,7 +95,7 @@ static int8_t dns_domain_cname[0x100]; /**< Canonical domain name */ /** * DNS: Initialize the environment for DNS client. - * To perfrom DNS-queries use the function dns_get_ip. + * To perform DNS-queries use the function dns_get_ip. * * @param device_socket a socket number used to send and receive packets * @param server_ip DNS-server IPv4 address (e.g. 127.0.0.1) @@ -129,7 +129,7 @@ dns_init(uint32_t _dns_server_ip, uint8_t _dns_server_ipv6[16], uint8_t ip_versi * @param url the URL to be resolved * @param domain_ip In case of SUCCESS stores extracted IP. * In case of FAULT stores zeros (0.0.0.0). - * @return TRUE - IP successfuly retrieved; + * @return TRUE - IP successfully retrieved; * FALSE - error condition occurs. */ int8_t diff --git a/lib/libnet/icmpv6.c b/lib/libnet/icmpv6.c index 34d7c65..bb36cc1 100644 --- a/lib/libnet/icmpv6.c +++ b/lib/libnet/icmpv6.c @@ -85,7 +85,7 @@ handle_prefixoption (uint8_t *option) prefix_option = (struct option_prefix *) option; memcpy( &(prefix.addr), &(prefix_option->prefix.addr), IPV6_ADDR_LENGTH); - /* Link-local adresses in RAs are nonsense */ + /* Link-local addresses in RAs are nonsense */ if (ip6_is_linklocal(&prefix)) return; @@ -97,7 +97,7 @@ handle_prefixoption (uint8_t *option) if (!new_address) return; - /* Process only prefixes we don't already have an adress from */ + /* Process only prefixes we don't already have an address from */ if (!unknown_prefix (&new_address->addr)) { return; } @@ -256,7 +256,7 @@ send_neighbour_solicitation (int fd, ip6_addr_t *dest_ip6) * @param fd socket fd * @param ip6_packet pointer to an IPv6 packet * @param icmp6hdr pointer to the icmp6 header in ip6_packet - * @param na_flags Neighbour advertisment flags + * @param na_flags Neighbour advertisement flags */ static void send_neighbour_advertisement (int fd, struct neighbor *target) diff --git a/lib/libnet/ipv4.c b/lib/libnet/ipv4.c index 3a1a789..0f633e0 100644 --- a/lib/libnet/ipv4.c +++ b/lib/libnet/ipv4.c @@ -25,7 +25,7 @@ #define ARP_REQUEST 1 #define ARP_REPLY 2 -/* ARP talbe size (+1) */ +/* ARP table size (+1) */ #define ARP_ENTRIES 10 /* ICMP Message types */ @@ -373,7 +373,7 @@ int8_t handle_ipv4(int fd, uint8_t * ip_packet, uint32_t packetsize) return 0; } - // packet is completly reassambled now! + // packet is completely reassambled now! // recalculate ip_len and set iph and ip_packet to the iph_first->ip_len = iph->ip_len + ((iph->ip_off) & 0x1FFF) * 8; @@ -504,7 +504,7 @@ int send_ipv4(int fd, void* buffer, int len) arp_entry = &arp_table[arp_producer]; arp_producer = (arp_producer+1)%ARP_ENTRIES; - // if ARP table is full then we must drop the oldes entry. + // if ARP table is full then we must drop the oldest entry. if(arp_consumer == arp_producer) arp_consumer = (arp_consumer+1)%ARP_ENTRIES; diff --git a/lib/libnet/ipv6.c b/lib/libnet/ipv6.c index 6420004..dd8c4ca 100644 --- a/lib/libnet/ipv6.c +++ b/lib/libnet/ipv6.c @@ -289,7 +289,7 @@ void *ip6_prefix2addr(ip6_addr_t prefix) } /** - * NET: add new IPv6 adress to list + * NET: add new IPv6 address to list * * @param ip6_addr *new_address * @return 0 - passed pointer = NULL; @@ -309,7 +309,7 @@ int8_t ip6addr_add(struct ip6addr_list_entry *new_address) /* If address is a unicast address, we also have to process packets * for its solicited-node multicast address. - * See RFC 2373 - IP Version 6 Adressing Architecture */ + * See RFC 2373 - IP Version 6 Addressing Architecture */ if (! ip6_is_multicast(&(new_address->addr))) { solicited_node = malloc(sizeof(struct ip6addr_list_entry)); if (! solicited_node) @@ -371,7 +371,7 @@ static void ipv6_init(int fd) } /** - * NET: compare IPv6 adresses + * NET: compare IPv6 addresses * * @param ip6_addr ip_1 * @param ip6_addr ip_2 @@ -470,7 +470,7 @@ static unsigned short ip6_checksum(struct ip6hdr *ip6h, unsigned char *packet, * @param fd socket fd * @param ip6_packet Pointer to IPv6 header in packet * @param packetsize Size of IPv6 packet - * @return -1 : Some error occured + * @return -1 : Some error occurred * 0 : packet stored (NDP request sent - packet will be sent if * NDP response is received) * >0 : packet sent (number of transmitted bytes is returned) diff --git a/lib/libnet/ipv6.h b/lib/libnet/ipv6.h index c6b681d..3a00ee5 100644 --- a/lib/libnet/ipv6.h +++ b/lib/libnet/ipv6.h @@ -24,7 +24,7 @@ #define IPV6_DEBUG_PRINT(format, ...) #endif -#define IPV6_ADDR_LENGTH 16 /* Size of IPv6 adress in bytes */ +#define IPV6_ADDR_LENGTH 16 /* Size of IPv6 address in bytes */ #define IPV6_LL_PREFIX 0xFE80000000000000ULL #define IPV6_LL_PREFIX_MASK 0xFFC0000000000000ULL #define IPV6_SOLIC_NODE_PREFIX 0xFF02000000000000ULL @@ -52,7 +52,7 @@ typedef struct { /** \struct prefix_info * - * List of Prefixes we have adresses from + * List of Prefixes we have addresses from * Used for internal purposes, information derived from prefix option * in Router Advertisements * See RFC 4861 section 4.6.2 @@ -121,7 +121,7 @@ struct parseip6_state { }; /** \struct ip6_config - * Stores flags wheter we use Stateless- or Stateful Autoconfiguration or DHCPv6 + * Stores flags whether we use Stateless- or Stateful Autoconfiguration or DHCPv6 */ struct ip6_config { uint8_t managed_mode:1, @@ -160,7 +160,7 @@ struct prefix_info * ip6_create_prefix_info(void); * and add it to our IPv6 address list */ void * ip6_prefix2addr (ip6_addr_t prefix); -/* Compare IPv6 adresses */ +/* Compare IPv6 addresses */ int8_t ip6_cmp(ip6_addr_t ip_1, ip6_addr_t ip_2); /* Check if it is a link-local address */ diff --git a/lib/libnet/ndp.c b/lib/libnet/ndp.c index 1c420d6..47b34b5 100644 --- a/lib/libnet/ndp.c +++ b/lib/libnet/ndp.c @@ -86,7 +86,7 @@ find_router(ip6_addr_t ip) /** * Find a router for a given host address - * @param ip - IPv6 address with the prefered prefix + * @param ip - IPv6 address with the preferred prefix * @return pointer to router, or NULL if none is available */ struct router *ipv6_get_default_router(ip6_addr_t ip) diff --git a/lib/libnet/netload.c b/lib/libnet/netload.c index ae169f3..7276b82 100644 --- a/lib/libnet/netload.c +++ b/lib/libnet/netload.c @@ -54,7 +54,7 @@ typedef struct { } obp_tftp_args_t; /** - * Print error with preceeding error code + * Print error with preceding error code */ static void netload_error(int errcode, const char *format, ...) { @@ -556,7 +556,7 @@ int netload(char *buffer, int len, char *args_fs, unsigned alen) /*********************************************************** * - * Initialize network stuff and retrieve boot informations + * Initialize network stuff and retrieve boot information * ***********************************************************/ diff --git a/lib/libnet/tftp.c b/lib/libnet/tftp.c index 9a5817a..c6f71df 100644 --- a/lib/libnet/tftp.c +++ b/lib/libnet/tftp.c @@ -155,7 +155,7 @@ static void send_rrq(int fd) } /** - * send_ack - Sends a acknowlege package. + * send_ack - Sends a acknowledge package. * * @blckno: block number * @dport: UDP destination port @@ -657,7 +657,7 @@ int parse_tftp_args(char buffer[], char *server_ip, char filename[], int fd, /* look for dns server name */ tmp1 = strchr(raw, '.'); if (tmp1 == NULL) { - printf("\n missing . seperator in %s\n", raw); + printf("\n missing . separator in %s\n", raw); free(raw); return -1; }