From: Marat Khalili <qm2k21@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Thomas Monjalon <thomas@monjalon.net>,
Reshma Pattan <reshma.pattan@intel.com>,
dev@dpdk.org
Subject: Re: [PATCH v4 2/4] app/rpcapd: remote pcap daemon
Date: Thu, 1 Oct 2026 19:50:22 +0100 [thread overview]
Message-ID: <8b97c8a0-7135-4613-a012-6bde4529e089@gmail.com> (raw)
In-Reply-To: <20261001025853.319860-3-stephen@networkplumber.org>
Two non-critical nits inline.
On 01/10/2026 03:35, Stephen Hemminger wrote:
> +static void
> +parse_bind_addr(void)
> +{
> + struct addrinfo hints = {
> + .ai_family = bind_family,
> + .ai_socktype = SOCK_STREAM,
> + .ai_flags = AI_NUMERICHOST | AI_PASSIVE,
> + };
> + struct addrinfo *res;
> + int rc;
> +
> + /* Loopback by default; the wildcard address is not a safe default. */
> + if (bind_addr == NULL)
> + bind_addr = (bind_family == AF_INET6) ? "::1" : "127.0.0.1";
When neither `bind_addr` nor `bind_family` are specified, can we bind to
all local addresses (127.0.0.1, ::1) that exist in the system? Or at
least to the first of them that exists, to improve the user experience
on IPv6-only systems a little?
> +
> + rc = getaddrinfo(bind_addr, NULL, &hints, &res);
> + if (rc != 0)
> + rte_exit(EXIT_FAILURE, "Invalid bind address '%s': %s\n",
> + bind_addr, gai_strerror(rc));
> + memcpy(&listen_addr, res->ai_addr, res->ai_addrlen);
> + listen_addrlen = res->ai_addrlen;
> + freeaddrinfo(res);
> +}
// ...
> +/* Largest snaplen a client can be given. */
> +#define DEFAULT_SNAPLEN RTE_MBUF_DEFAULT_DATAROOM
The naming is not optimal, it's upper limit not default.
next prev parent reply other threads:[~2026-10-01 18:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 21:07 [PATCH] examples/rpcapd: demo version of packet capture daemon Stephen Hemminger
2026-09-20 18:59 ` [PATCH v2] " Stephen Hemminger
2026-09-21 9:51 ` Marat Khalili
2026-09-21 15:57 ` Stephen Hemminger
2026-09-21 15:58 ` Stephen Hemminger
2026-09-21 16:43 ` Marat Khalili
2026-09-21 17:31 ` Stephen Hemminger
2026-09-21 17:53 ` Marat Khalili
2026-09-21 16:17 ` Stephen Hemminger
2026-09-22 18:45 ` Stephen Hemminger
2026-09-22 21:31 ` [PATCH v3] " Stephen Hemminger
2026-09-28 16:18 ` Marat Khalili
2026-09-28 17:24 ` Stephen Hemminger
2026-10-01 2:35 ` [PATCH v4 0/4] add rpcap remote " Stephen Hemminger
2026-10-01 2:35 ` [PATCH v4 1/4] pcapng: add API to read back capture mbuf header Stephen Hemminger
2026-10-01 2:35 ` [PATCH v4 2/4] app/rpcapd: remote pcap daemon Stephen Hemminger
2026-10-01 18:50 ` Marat Khalili [this message]
2026-10-01 2:35 ` [PATCH v4 3/4] app/rpcapd: add TLS support Stephen Hemminger
2026-10-01 2:35 ` [PATCH v4 4/4] app/rpcapd: add host list option Stephen Hemminger
2026-10-01 18:50 ` [PATCH v4 0/4] add rpcap remote capture daemon Marat Khalili
2026-10-01 23:00 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8b97c8a0-7135-4613-a012-6bde4529e089@gmail.com \
--to=qm2k21@gmail.com \
--cc=dev@dpdk.org \
--cc=reshma.pattan@intel.com \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.