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=1754479223; bh=yxx+VhGfydjdm/oRY7iK6ArNryRraj/YUxJDguvJYoQ=; 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=WnehuRoiKpE/HF3u9n/cUfqlfht1LV4UfeGjw6BMAqm6ziTAENAhiKr5KfuacQfOV 22AdLGLOAlbHamS0GG2i8xy1ng/4FpjQW86RI+w8g4VknOXLW/inYr7hENzAejrSmV OVqUGvPEX8fHg1aGincQrDDg+zXtWEWVI8J/ufCCpCt8x9REdt6plhrO8mZuclSp+x hiKsR+RF2ygL4mVNEvFjIcT+XNb/RxS93E93mbzTq8a3kf5Xot3al0CLz50ftkSGMY KJe/Db9374y1AysmgDUcxULZjZ1s6X1lJocKgN06B6FSZpT6RMsM31gPmh6mYIFVQb 5e7XtOsxYX++Q== Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by server-vie001.gnuweeb.org (Postfix) with ESMTPSA id 705C43127B86 for ; Wed, 6 Aug 2025 11:20:23 +0000 (UTC) Received: by mail-pj1-f43.google.com with SMTP id 98e67ed59e1d1-31f53b3b284so787664a91.1 for ; Wed, 06 Aug 2025 04:20:23 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCX0rL1tqadbO+vizFTPxl01bLUbT+bJ4/D0biirjq72VCJDSFbfeHrZlmlpFF6biEroX1kG@vger.gnuweeb.org X-Gm-Message-State: AOJu0YwJn9W5Fu6wjLu1FwER0VwqK/uJ6ta2vjt/jxLcUHt9ElFrlsPM q/YF6j6Ub+5YVCBPNw3T+0G45dF117sRlrnHj/K9K1Ybg12KkM5IHLjm+hcLS+bBxdy/vp4Jks8 xmy9Y868He159Pi7XX0tIPdaQ9jsvKQ4= X-Google-Smtp-Source: AGHT+IGYPQuOoRzPefWSs7qEX0gC1Jqd4T9Y/DQdEoLJkkt+i96Qw85z4PGtvCbuVs/YAbFyrjUVex5uGEK5JmAnSgg= X-Received: by 2002:a17:90b:5346:b0:31e:a48c:25ef with SMTP id 98e67ed59e1d1-32166a20359mr3202451a91.10.1754479221791; Wed, 06 Aug 2025 04:20:21 -0700 (PDT) MIME-Version: 1.0 References: <20250806035727.216702-1-reyuki@gnuweeb.org> <20250806035727.216702-5-reyuki@gnuweeb.org> In-Reply-To: From: Alviro Iskandar Setiawan Date: Wed, 6 Aug 2025 18:20:10 +0700 X-Gmail-Original-Message-ID: X-Gm-Features: Ac12FXzUw4uFhcA19MkPVB24dudDt6UqIjyqRPcpUlO3cM-blWg3NEKKobr8Fo0 Message-ID: Subject: Re: [PATCH gwproxy v4 4/6] dnslookup: Initial work for implementation of C-ares-like getaddrinfo function To: Ahmad Gani 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: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. -- Viro