From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server-vie001.gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_DBL_BLOCKED_OPENDNS, URIBL_ZEN_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=new2025; t=1755147335; bh=Je7LJhdat/fQ8KXjChwYjnaDgZ9VxneHggonSpR/lA0=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type:Content-Transfer-Encoding:Message-ID:Date:From: Reply-To:Subject:To:Cc:In-Reply-To:References:Resent-Date: Resent-From:Resent-To:Resent-Cc:User-Agent:Content-Type: Content-Transfer-Encoding; b=OULXfJC4Cz/Z2uE8yL/ROoHEi01C8PZ2YlJ35hknop7VFtiDUWjW9B6im2XDYQklc 47hAS+gtRQeGinommtwXIC7tHNNoxyMjCK7YfkNCuXFqSiz45xZdYwcPCSfQAOOdjX wAA/g40sb+hUgcPVY6dx0ARaiHl0QPDOL1MgdYCArkR7dJsDtO3wZaLNmD5M2flD9c apcxeXOUWSRHw5edXayVWs+bEiH4ABXV9AyTXije3VHjut5HhUwUP4HqKqqjHSscKp Pkaytm4L5A4s3BP51hi9Evii3Tx2UbSbkVYdURjnPo9xYa0YT2mMGtpsiMS/LtEyRN LieY9eGz8+B6g== Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) by server-vie001.gnuweeb.org (Postfix) with ESMTPSA id 656E73127F9A for ; Thu, 14 Aug 2025 04:55:35 +0000 (UTC) Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-333f8d39e94so3723341fa.0 for ; Wed, 13 Aug 2025 21:55:35 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUc/RnpgqJfphm7Gk6x4pYykNYvXtOZ8YR59UhPlc+l2C0djxmhEEKATdKKDoIYrNgzS45B@vger.gnuweeb.org X-Gm-Message-State: AOJu0Ywsk8LTt1P86BtKT2NymQB97BnRkn5h1RnoJL1Fwxdi7boBBeOn EE8ZxQwCSGxWXHtumz/R9QuMdTk1VkqyyOsqpogCq23FNKeC022p4jJ7T4WBs055H99vHnhdjhd G0cfx/WAOyL+jQg69y8KdRtVqLL/JTPU= X-Google-Smtp-Source: AGHT+IGl8BPgxR/JflVrJZQCNx4KwqlG3GK9GKODHLkG4sHEhxuhxIXAswMvI069ftXG4R69B/9Wwjf927ur4LLTo2Q= X-Received: by 2002:a05:651c:10cc:b0:332:2ca3:da8f with SMTP id 38308e7fff4ca-333fa8469a0mr2483841fa.22.1755147334735; Wed, 13 Aug 2025 21:55:34 -0700 (PDT) MIME-Version: 1.0 References: <20250806035727.216702-1-reyuki@gnuweeb.org> <20250806035727.216702-5-reyuki@gnuweeb.org> In-Reply-To: From: Ahmad Gani Date: Thu, 14 Aug 2025 11:54:58 +0700 X-Gmail-Original-Message-ID: X-Gm-Features: Ac12FXw7LO5ZOOKAzSjxfXi-R8MY14xTt3OlRQ3agrDUWCHRxCK6jpMhq1F3GlY Message-ID: Subject: Re: [PATCH gwproxy v4 4/6] dnslookup: Initial work for implementation of C-ares-like getaddrinfo function To: Ammar Faizi Cc: Alviro Iskandar Setiawan , "GNU/Weeb Mailing List" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: Sorry for the late reply! I've been caught up reading manga [1] and kind of slacking on the development of this feature. But I'm feeling motivated again=E2=80=94Anyway, let's pick up where we left off. So, the goal is to have an abstraction for name resolution without relying on glibc's getaddrinfo, allowing asynchronous operation without separate, dedicated DNS thread(s), right? On Thu, 7 Aug 2025 04:33:46 +0700 Ammar Faizi wrote: > Let's make a simple rule. No syscalls in the DNS library. An exception > maybe reading /etc/hosts, but you can skip that part for now. > > The DNS lib should at least accept: > - Domain name. > - Service name (port). > - Address families to be resolved (AF_INET or AF_INET6). > - Received bytes from the network. > - Pointer to recv and send buffer (including their lengths). > > The DNS lib should at least generate: > - Resolved addresses in 'struct gwp_sockaddr' form. > - Bytes to be sent to the network. I've created `gwdns_build_query` and `gwdns_parse_query`, which should meet those criteria, please take a look at new email threads [2]. [1]: - https://nostarch.com/microprocessors [2]: - https://lore.gnuweeb.org/gwml/20250814044658.252579-1-reyuki@gnuweeb.org/ -- Ahmad Gani