From nobody Thu Nov 28 17:35:18 2024 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xzk3g4v9fz5f1kR for ; Thu, 28 Nov 2024 17:35:27 +0000 (UTC) (envelope-from lysfjord.daniel@smokepit.net) Received: from smtp-out.smokepit.net (smtp-out.smokepit.net [18.200.56.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp-out.smokepit.net", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xzk3f30rgz4Z8Z for ; Thu, 28 Nov 2024 17:35:26 +0000 (UTC) (envelope-from lysfjord.daniel@smokepit.net) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=smokepit.net header.s=loke header.b=H8Wlf4ey; spf=pass (mx1.freebsd.org: domain of lysfjord.daniel@smokepit.net designates 18.200.56.156 as permitted sender) smtp.mailfrom=lysfjord.daniel@smokepit.net; dmarc=pass (policy=reject) header.from=smokepit.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smokepit.net; s=loke; h=Content-Transfer-Encoding:Content-Type:Message-ID: References:In-Reply-To:Subject:To:From:Date:MIME-Version:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=HjLBz1R9T+KwnPkmC9aWT4OY3FTMtfzF7P4DEsnRRuY=; b=H8Wlf4eyifvwAWwUmFd/XyrbVM Qf8REtrWYNp3ZiBsyiG4IAs5I9+TbUU2zWBKyui52+LrVlJW1p+hz/S5rKIBX5R6MKSl3Zt4ew285 N6YOuUbVbLTyEWbZaN4i1cDMrvaIWGZHnMhBbafVGNBN6ZARoPUGL4jlLlqOIBve6xgo=; Received: from ti0005a400-3505.bb.online.no ([85.164.58.193] helo=smokepit.net) by smtp-out.smokepit.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1tGiQB-000aVc-FQ for questions@freebsd.org; Thu, 28 Nov 2024 17:35:19 +0000 Received: from httpd.lan.smokepit.net ([10.0.3.114] helo=webmail.smokepit.net) by smokepit.net with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98 (FreeBSD)) (envelope-from ) id 1tGiQA-00000000CF9-0NdD for questions@freebsd.org; Thu, 28 Nov 2024 18:35:18 +0100 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-questions@freebsd.org Sender: owner-freebsd-questions@FreeBSD.org MIME-Version: 1.0 Date: Thu, 28 Nov 2024 18:35:18 +0100 From: Daniel Lysfjord To: questions@freebsd.org Subject: Re: sockstat local address *:* In-Reply-To: <86jzcn5lac.fsf@beasty.markusgraf.net> References: <86jzcn5lac.fsf@beasty.markusgraf.net> Message-ID: <36b40f792419179d62b8043356ee5b28@smokepit.net> X-Sender: lysfjord.daniel@smokepit.net Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Report: Action: no action Symbol: FROM_HAS_DN(0.00) Symbol: FROM_EQ_ENVFROM(0.00) Symbol: TO_DN_NONE(0.00) Symbol: MIME_GOOD(-0.10) Symbol: MID_RHS_MATCH_FROM(0.00) Symbol: RCVD_VIA_SMTP_AUTH(0.00) Symbol: MISSING_XM_UA(0.00) Symbol: RCVD_COUNT_ONE(0.00) Symbol: RCVD_TLS_ALL(0.00) Symbol: BAYES_HAM(-2.99) Symbol: TO_MATCH_ENVRCPT_ALL(0.00) Symbol: ARC_NA(0.00) Symbol: RCPT_COUNT_ONE(0.00) Symbol: MIME_TRACE(0.00) Message-ID: 36b40f792419179d62b8043356ee5b28@smokepit.net X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[smokepit.net,reject]; R_DKIM_ALLOW(-0.20)[smokepit.net:s=loke]; R_SPF_ALLOW(-0.20)[+ip4:18.200.56.156]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MISSING_XM_UA(0.00)[]; ASN(0.00)[asn:16509, ipnet:18.200.0.0/16, country:US]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[questions@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[smokepit.net:+] X-Rspamd-Queue-Id: 4Xzk3f30rgz4Z8Z X-Spamd-Bar: --- On 2024-11-28 18:07, Markus Graf wrote: > Hi, > > what does the *:* in the LOCAL ADDRESS column stand for? > > sockstat -4l > > USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN > ADDRESS > markus soffice.bi 84571 9 tcp4 *:* *:* > root wpa_suppli 49000 3 udp4 *:* *:* > other lines deleted > > This can't mean listening on all ports on all interfaces, can it? > > The system runs just fine. > > The question is a bit hard to goole with the two asterisks :( > > Best regards > > Markus Hi, according to "man tcp": DESCRIPTION The TCP protocol provides reliable, flow-controlled, two-way transmis- sion of data. It is a byte-stream protocol used to support the SOCK_STREAM abstraction. TCP uses the standard Internet address format and, in addition, provides a per-host collection of "port addresses". Thus, each address is composed of an Internet address specifying the host and network, with a specific TCP port on the host identifying the peer entity. Sockets utilizing the TCP protocol are either "active" or "passive". Active sockets initiate connections to passive sockets. By default, TCP sockets are created active; to create a passive socket, the listen(2) system call must be used after binding the socket with the bind(2) system call. Only passive sockets may use the accept(2) call to accept incoming connections. Only active sockets may use the connect(2) call to initiate connections. Passive sockets may "underspecify" their location to match incoming connection requests from multiple networks. This technique, termed "wildcard addressing", allows a single server to provide service to clients on multiple networks. To create a socket which listens on all networks, the Internet address INADDR_ANY must be bound. The TCP port may still be specified at this time; if the port is not specified, the system will assign one. Once a connection has been established, the socket's address is fixed by the peer entity's location. The address assigned to the socket is the address associated with the network in- terface through which packets are being transmitted and received. Nor- mally, this address corresponds to the peer entity's network. seems like the last paragraph tells a story about non-specified ports (or port 0, as is mentioned elsewhere at times).