From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id A8AFE5A0269 for ; Fri, 4 Nov 2022 04:10:50 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4N3QcG6z6Fz4xwv; Fri, 4 Nov 2022 14:10:38 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1667531438; bh=2U+ww/K/NwcvANutQdXsNo0q6jK8f6BQ6pYb9W53h5k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BWmrWBHltkqqfivq8/U6hQ/A19NEw/wF//Pw3oHjb0QK1C1z7SWbKCyPp06Eopar3 6wZRoT8pi8WoHWe/aP1bV12saSBU1TX6kjCbmq3/iUmKir5xfjPe9tqIGt838qXKp6 f4I8qQu+/GrfBFH5A+V5zX4h3qwPzGcsu+3mdFpc= From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH v2 6/6] tcp: Correct function comments for address types Date: Fri, 4 Nov 2022 14:10:37 +1100 Message-Id: <20221104031037.3866034-7-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221104031037.3866034-1-david@gibson.dropbear.id.au> References: <20221104031037.3866034-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: 3VQA442QTMGFB7EOCLBIBXDQ4UIR6DRX X-Message-ID-Hash: 3VQA442QTMGFB7EOCLBIBXDQ4UIR6DRX X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.3 Precedence: list List-Id: Development discussion and patches for passt Archived-At: <> Archived-At: List-Archive: <> List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: A number of functions describe themselves as taking a pointer to 'sin_addr or sin6_addr'. Those are field names, not type names. Replace them with the correct type names, in_addr or in6_addr. Signed-off-by: David Gibson --- tcp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tcp.c b/tcp.c index 7405ba9..713248f 100644 --- a/tcp.c +++ b/tcp.c @@ -1277,7 +1277,7 @@ static int tcp_opt_get(const char *opts, size_t len, uint8_t type_find, * tcp_hash_match() - Check if a connection entry matches address and ports * @conn: Connection entry to match against * @af: Address family, AF_INET or AF_INET6 - * @addr: Remote address, pointer to sin_addr or sin6_addr + * @addr: Remote address, pointer to in_addr or in6_addr * @tap_port: tap-facing port * @sock_port: Socket-facing port * @@ -1303,7 +1303,7 @@ static int tcp_hash_match(const struct tcp_conn *conn, int af, const void *addr, * tcp_hash() - Calculate hash value for connection given address and ports * @c: Execution context * @af: Address family, AF_INET or AF_INET6 - * @addr: Remote address, pointer to sin_addr or sin6_addr + * @addr: Remote address, pointer to in_addr or in6_addr * @tap_port: tap-facing port * @sock_port: Socket-facing port * @@ -1347,7 +1347,7 @@ static unsigned int tcp_hash(const struct ctx *c, int af, const void *addr, * @c: Execution context * @conn: Connection pointer * @af: Address family, AF_INET or AF_INET6 - * @addr: Remote address, pointer to sin_addr or sin6_addr + * @addr: Remote address, pointer to in_addr or in6_addr */ static void tcp_hash_insert(const struct ctx *c, struct tcp_conn *conn, int af, const void *addr) @@ -1418,7 +1418,7 @@ static void tcp_hash_update(struct tcp_conn *old, struct tcp_conn *new) * tcp_hash_lookup() - Look up connection given remote address and ports * @c: Execution context * @af: Address family, AF_INET or AF_INET6 - * @addr: Remote address, pointer to sin_addr or sin6_addr + * @addr: Remote address, pointer to in_addr or in6_addr * @tap_port: tap-facing port * @sock_port: Socket-facing port * @@ -2026,7 +2026,7 @@ static void tcp_clamp_window(const struct ctx *c, struct tcp_conn *conn, * tcp_seq_init() - Calculate initial sequence number according to RFC 6528 * @c: Execution context * @af: Address family, AF_INET or AF_INET6 - * @addr: Remote address, pointer to sin_addr or sin6_addr + * @addr: Remote address, pointer to in_addr or in6_addr * @dstport: Destination port, connection-wise, network order * @srcport: Source port, connection-wise, network order * @now: Current timestamp @@ -2144,7 +2144,7 @@ static uint16_t tcp_conn_tap_mss(const struct ctx *c, * tcp_conn_from_tap() - Handle connection request (SYN segment) from tap * @c: Execution context * @af: Address family, AF_INET or AF_INET6 - * @addr: Remote address, pointer to sin_addr or sin6_addr + * @addr: Remote address, pointer to in_addr or in6_addr * @th: TCP header from tap: caller MUST ensure it's there * @opts: Pointer to start of options * @optlen: Bytes in options: caller MUST ensure available length -- 2.38.1