From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 356DBC433DB for ; Wed, 3 Mar 2021 18:08:35 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A41F664EE4 for ; Wed, 3 Mar 2021 18:08:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A41F664EE4 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:58780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHVvF-0003zN-LD for qemu-devel@archiver.kernel.org; Wed, 03 Mar 2021 13:08:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHVuH-0002z8-AT for qemu-devel@nongnu.org; Wed, 03 Mar 2021 13:07:33 -0500 Received: from mail-vs1-xe2d.google.com ([2607:f8b0:4864:20::e2d]:35272) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHVuF-0004G6-RF for qemu-devel@nongnu.org; Wed, 03 Mar 2021 13:07:32 -0500 Received: by mail-vs1-xe2d.google.com with SMTP id t23so13081247vsk.2 for ; Wed, 03 Mar 2021 10:07:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Vz9VI0kJsppT8wvzSuCajbe5EcFIfMTOk4cC613GJ4Q=; b=RDBdGp5GL4L2jUp5LMh1ansS974qclS9Yjde1POK0hWloQofIbPnyq0NqUQIlpLCIs EN3ltxhARVEEbt7k3mwV5Ezm8OMo6mOOq+QxH5ho+RvRkSGQS0oU8acwJZp2bCD74naQ 1YssCBPPX1hWwGA0YB5x26a9Pf6vdly6CFNaS/USP2cnGQ+aF0TIHlvaQxZafyJCGvi1 L1h0iMu2pi543gh8McPc6YQxpyHoPTMiiXav7FNS0qSY2JK+07B3keVQXGPGoDV4KIo/ wyC92ebWbYzhYfoMD3xPVLdhTczxtTTlDmsaHnyHoCz8cFtNOxuNxeywNXLRQOc6HJN1 /hQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Vz9VI0kJsppT8wvzSuCajbe5EcFIfMTOk4cC613GJ4Q=; b=aNdWFFDRrL/cfJlyIXZho3MD/3GKaKrPIs8yjbPW2BTvwPAQPr6NgrJrGA/k00U8P9 UxQufJgb9lL3xmdTlFAZz5h4Hakyreq55DohLJcPAcI1HB18zgeCBo3n2qxKZH8I52Df hm34H5K+zco1EGkrRaprfZx1Pebx1mPVBwR9KyU/eGo6DJdUXijonZHNWtGRWFxh9MSs fEnFUmRQdIe5+qlkX5S4347wtc4UHGMYo8jk0YyeOlGwVZx0NSVieS4E+ClDJ3w8WmKw yKTS1v+sHlYkB/MSrDmh+Fyfm2nhn+hkHTa1soHka2u56LTTEDUiQq3v9LneFMQM3dyx GYTw== X-Gm-Message-State: AOAM532DNWfTyYRI0uqyTdqEEvYu951uBN63gLqSfo/3DMvO9NGz71OS uUzAq3fUBPl9JRn49k5UxfmftFRsFRNoZaH9ezGKXg== X-Google-Smtp-Source: ABdhPJy/SOwgGvVEpFVwkXC2Z9VJX+7Gyq+8PqSfc6Oz011JAUxz0kZzHUI9Dr7WzgQvvUbfJWSBgSn+qX973XTnvOU= X-Received: by 2002:a67:1481:: with SMTP id 123mr60455vsu.52.1614794847653; Wed, 03 Mar 2021 10:07:27 -0800 (PST) MIME-Version: 1.0 References: <20210228213957.xkc4cceh5o6rgd5n@begin> In-Reply-To: <20210228213957.xkc4cceh5o6rgd5n@begin> From: Doug Evans Date: Wed, 3 Mar 2021 10:06:50 -0800 Message-ID: Subject: Re: [PATCH v4 2/4] util/qemu-sockets.c: Split host:port parsing out of inet_parse To: Samuel Thibault Cc: =?UTF-8?Q?Daniel_P=2E_Berrang=C3=A9?= , Markus Armbruster , QEMU Developers , =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Content-Type: multipart/alternative; boundary="0000000000004803c905bca5b99e" Received-SPF: pass client-ip=2607:f8b0:4864:20::e2d; envelope-from=dje@google.com; helo=mail-vs1-xe2d.google.com X-Spam_score_int: -175 X-Spam_score: -17.6 X-Spam_bar: ----------------- X-Spam_report: (-17.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --0000000000004803c905bca5b99e Content-Type: text/plain; charset="UTF-8" On Sun, Feb 28, 2021 at 1:40 PM Samuel Thibault wrote: > [...] > > > + Examples: > > + hostfwd_add net0 tcp:127.0.0.1:10022-:22 > > + hostfwd_add net0 tcp:[::1]:10022-[fe80::1:2:3:4]:22 > > Yep, that looks good to me. > > Daniel, you wanted me to use inet_parse(). Is the above syntax ok with you? You must have had some expectation that at least some of the various flags that inet_parse() recognizes would be needed here. Can you elaborate? --0000000000004803c905bca5b99e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sun, Feb 28, 2021 at 1:40 PM Samuel Thibault <samuel.thibault@gnu.org> wrote:<= br>
[.= ..]

> +=C2=A0 Examples:
> +=C2=A0 hostfwd_add net0 tcp:127.0.0.1:10022-:22
> +=C2=A0 hostfwd_add net0 tcp:[::1]:10022-[fe80::1:2:3:4]:22

Yep, that looks good to me.



Daniel, you wante= d me to use inet_parse().
Is the above syntax ok with you?
You must have had some expectation that at lea= st some of
the = various flags that inet_parse() recognizes would be needed here.
Can you elaborate?
<= div class=3D"gmail_default" style=3D"font-size:small">
--0000000000004803c905bca5b99e--