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=1754483447; bh=75I3dAKXWqoVyQQ24GKzQerVA6mHFlxOQw+n6y9Oapk=; 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=WtjQmNnDEsRGai06r3p2SFDqWHqkv+1cCoHELBLxEsXu5VUiyrh88BH3Uc/FwEfrb uMokgfIDlvi4kX59DOE/vfaYyiILDL5hRRTc/2Y7r0RSsA9oi7bX/AX++xzMkvgQFW Re6tQmtROuxfEiHDDQOlmvMCpEUdrbfMiEMdW4wtQuhLC1yO+To50WhVCj4WdX51cQ DFG8zcGJPyMVAJviOkEjwW7Fb7gLOovCRhOsOXajKAEvYoGIlr3uA9Ew1gclzTEVHP 4mNadgRLI1Dw9S7iee/7oyzgNfOdXssZ0mQGhYgVMzINovmRvdO0LikUF8g15Xbtcu 8I5nAgCycndaQ== Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by server-vie001.gnuweeb.org (Postfix) with ESMTPSA id 840603127B8D for ; Wed, 6 Aug 2025 12:30:47 +0000 (UTC) Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-55b82db8fd4so7607702e87.2 for ; Wed, 06 Aug 2025 05:30:47 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUk44+Sddda3O+oPl45AVqBo7hSmPgiKbeojCJaRdhd+OQA8HCtvLHyZV14NZztpGrzec4D@vger.gnuweeb.org X-Gm-Message-State: AOJu0Ywyh3ltyIPuWN8R833tGSHCjQj4dAvwnU4PjjHId/fhOlmNpCJo fO21TrSW1S4umJPprMvJe3BySPoW7qG7rSglv3CFq7oexpNyyHLDW5G9aBAtXqoyq5Ma47MNOSc MrIOJfWgXiupOeRbAxSeKXZ2Zz3m6+6w= X-Google-Smtp-Source: AGHT+IEIbYOp7EIq+RnE2FO8BW1N2BKqdjb6bPKBMeSS18vtZu5OxSs/4F5uSvxnnhU/e0aXzO3xqprCFWEqFkOx2lU= X-Received: by 2002:a05:651c:3046:b0:332:612b:6f46 with SMTP id 38308e7fff4ca-33381438488mr6052001fa.35.1754483446941; Wed, 06 Aug 2025 05:30:46 -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: Wed, 6 Aug 2025 19:30:08 +0700 X-Gmail-Original-Message-ID: X-Gm-Features: Ac12FXzAYt-8waLrlWMyL-vdHa4rCW1CE8_ecqt7-GLnzDdtoVEqmVp1cm_p2o0 Message-ID: Subject: Re: [PATCH gwproxy v4 4/6] dnslookup: Initial work for implementation of C-ares-like getaddrinfo function To: Alviro Iskandar Setiawan Cc: Ammar Faizi , "GNU/Weeb Mailing List" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: On Wed, Aug 6, 2025 at 6:20=E2=80=AFPM Alviro Iskandar Setiawan wrote: > On Wed, Aug 6, 2025 at 6:09=E2=80=AFPM Alviro Iskandar Setiawan wrote: > > On Wed, Aug 6, 2025 at 10:57=E2=80=AFAM Ahmad Gani wrote: > > > Introducing glibc's getaddrinfo replacement, the DNS protocol > > > implementation is limited to standard query (OPCODE_QUERY) as for now= , > > > but may extended later as necessary. > > > > Thinking about this further, I think this design is wrong. The DNS > > library is expected to only handle bytes processing, leaving the > > networking stack to the caller. > > > > Think, how is it going to be integrated with io_uring? > > > > We should let the caller perform the recv and send. This library > > doesn't need to care about the networking stack at all. Make it the > > caller's responsibility to feed the library with bytes from the > > network. > > Please take a look at src/gwproxy/socks5.c > > That's a perfect example of socks5 bytes processing without > networking. Purely bytes parsing. > > That way you can use io_uring, epoll, or whatever shiny features, even > statically allocated fake bytes work. Well, dnsparser.c contains pure byte parsing code, so you might want to take a look there. -- Ahmad Gani