From nobody Thu Oct 2 06:16:47 2025 Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C8A3E2F549E for ; Mon, 22 Sep 2025 09:57:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758535042; cv=none; b=fsOPhi9pHlJB5eIlBVMQv+AEDEcBP6ovYNxOt8mKESB7DTanXzvBRNwSKW05ZicwhzqUr/Qcmxk30mwQ1fIXFCW9u9hKJA3GJkrex4W8dDeawegIvJe4w52ZVsPTn4wsmIzsPW4Vun+jj/kFbpoJa333Grrd/QYc6NcGi5BfZnQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758535042; c=relaxed/simple; bh=LiTxzdPpqZoT1CgAaAWwmxvEAp0qgFo9wy0RJopd9BQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EHMPzRW6AEzTPbOMAsPvAvlasljOPHrloLNRJXLsnzUE3FsbnnD5bRjvriH2TqkbKUNx07UtTL+e5SECxAzAWCi7SIhX7FqjnWUx927lyHpTZgBBKl/Dv0y/iYzKDL2a1IWE0JY0v9TwZQK7hzTUBJRo7GcsDPVOlscFprrMf9M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jxpDlVGR; arc=none smtp.client-ip=209.85.216.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jxpDlVGR" Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-3307de086d8so3543251a91.2 for ; Mon, 22 Sep 2025 02:57:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758535040; x=1759139840; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CEExF954CuEX/+UMtveFHvE+OWb/nmnI/2KEaZqWbc4=; b=jxpDlVGRzsvohBo8siwdzf2S0BPE7x5YOyJz4tci9Nz1KiYvESqnu/y0d2YNsMfPjD 02KwplyQEwwgGiFMeRdQbYz5RcCgYkziW/AEHX2dUC/0ySCJMTAYOjElhr+C4dyO82zQ 8ysYjA/HsQetAW9vk6HvpltMCEXPCQPgkcyqw1+bIU67o9r5+tdkUJsZ5Szm9hheufzX ZQWElNfQyGhbHFxaPvZ7Kq/npxezyEcW7cyHN3Nvu5IGaRKSDbwBM5yL5p76N93hdb58 7AiUqvjCYaAhjFA3q47jUTi1tlAkZOCtQpRH0C7yVCGtMYNgyMZA2fgQATjbL0Iqgcak wjzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758535040; x=1759139840; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CEExF954CuEX/+UMtveFHvE+OWb/nmnI/2KEaZqWbc4=; b=ZkqZmXxgj1gB4jR0XxDSRb2lsoFXWzysz7YJ9ODgh6MKYPa6ud8Fmh0pAsvPYUILT6 /X9xDGwtdmzq8K681DUWI8dHYqXfb2wbDHXmOsyUn5A0ZWQWR0C6UImuIXctS3xCtd0U wQm+cHFn76JApq8hnXNX59ntYHnghu2x4/ZfGyZWQGnB/Lm0RnKC6tQYB5rBmPBYYuXf blaG7uhGt6s+5i3xY8R+6esb3Szq5xt1fxoNvvYafoCN+Ql38/Pwg+7qoY3zQKn8Y+W4 k4H/IhM2hB05jp7oOKaQy5Fpi/W54RpJrQzSGspgVTJnYQZxxpZCUQ6yQaLdSpcBQ8tx 3Khw== X-Gm-Message-State: AOJu0Yzfr8e11F1v0Y7oxAeYuQJeBetJXp3yjRUoOAbyzRJ9iAXoiNb3 Ez+BBn8yPGwpV8pZMecI8lEOKAwstC4vM2pgxjQCgEx3ImFgfssRr1ZQ X-Gm-Gg: ASbGncsg4wE1DW3X00mZZkvMxNSTSdHblBAKUIqAYEcEFIEZi9SCpeYWO2RrOECyxs4 YfBlavy+/anLaCG8PFn4+lc0X/T+lItcYs/eaR2Mk6PBinh9/I2u/xLY1wUZNKO/zrq9seRi0N5 Yy/f7Lm1PWE/s0jZHGJcO89Ftupt7l+gYCFjULwAFeC786RFt3FyB7YxkZ9ZbhIbBsP+FFodnL/ 9BnAGm+w9RMxNlSzaEzuT/1v4hedl+ty4gRKGH6KaoAyfF7Wr+OBahrwnrF8+j7haM6y8TJDHpG mDNy+8TB3M9OC1Vo0hMbVuJiPZPLhmoUx46V65W27Fr4rW3N7Y35q984jbOyn/+0VmE6n27CgRf HcIVHtBuItgTw1z58uKwM64DaRDag1pq7 X-Google-Smtp-Source: AGHT+IHqEO6iiNGQK3OyW4Uff/hCa9rPgdg72YBN6JanxJzyvHSupgZP7w1TLkIwL8CTeFn76R4ZaQ== X-Received: by 2002:a17:90b:3f48:b0:32e:2059:ee88 with SMTP id 98e67ed59e1d1-33097fd0ec5mr15794232a91.6.1758535039977; Mon, 22 Sep 2025 02:57:19 -0700 (PDT) Received: from archie.me ([103.124.138.155]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b54ff35aa47sm11631315a12.5.2025.09.22.02.57.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Sep 2025 02:57:18 -0700 (PDT) Received: by archie.me (Postfix, from userid 1000) id D10BA41A2EDF; Mon, 22 Sep 2025 16:57:15 +0700 (WIB) From: Bagas Sanjaya To: Linux Kernel Mailing List , Linux Documentation , Linux Networking Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Jonathan Corbet , Mauro Carvalho Chehab , Kees Cook , Bagas Sanjaya Subject: [PATCH net-next 2/3] net: dns_resolver: Move dns_query() explanation out of code block Date: Mon, 22 Sep 2025 16:56:47 +0700 Message-ID: <20250922095647.38390-4-bagasdotme@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250922095647.38390-2-bagasdotme@gmail.com> References: <20250922095647.38390-2-bagasdotme@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3870; i=bagasdotme@gmail.com; h=from:subject; bh=LiTxzdPpqZoT1CgAaAWwmxvEAp0qgFo9wy0RJopd9BQ=; b=owGbwMvMwCX2bWenZ2ig32LG02pJDBkXZbZOM/dcu3wP1zQOvlf7vD0+ipm+cl98c99v+cnrf ywR2Bih0FHKwiDGxSArpsgyKZGv6fQuI5EL7WsdYeawMoEMYeDiFICJ1KYx/K+KOV1f1yY9QaH0 Rte/+tfuMQ5LiwIeTZfVkMlLmmb40ICRYW7sWxGjdwy8a+YH2zae/lDjVvj3LfvNq83Lvibpb58 ezQwA X-Developer-Key: i=bagasdotme@gmail.com; a=openpgp; fpr=701B806FDCA5D3A58FFB8F7D7C276C64A5E44A1D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Documentation for dns_query() is placed in the function's literal code block snippet instead. Move it out of there. Fixes: 9dfe1361261b ("docs: networking: convert dns_resolver.txt to ReST") Signed-off-by: Bagas Sanjaya --- Documentation/networking/dns_resolver.rst | 45 +++++++++++------------ 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/Documentation/networking/dns_resolver.rst b/Documentation/netw= orking/dns_resolver.rst index 5cec37bedf9950..329fb21d005ccd 100644 --- a/Documentation/networking/dns_resolver.rst +++ b/Documentation/networking/dns_resolver.rst @@ -64,44 +64,43 @@ before the more general line given above as the first m= atch is the one taken:: Usage =3D=3D=3D=3D=3D =20 -To make use of this facility, one of the following functions that are -implemented in the module can be called after doing:: +To make use of this facility, the appropriate header must be included firs= t:: =20 #include =20 - :: +Then you can make queries by calling:: =20 int dns_query(const char *type, const char *name, size_t namelen, const char *options, char **_result, time_t *_expiry); =20 - This is the basic access function. It looks for a cached DNS query a= nd if - it doesn't find it, it upcalls to userspace to make a new DNS query, = which - may then be cached. The key description is constructed as a string o= f the - form:: +This is the basic access function. It looks for a cached DNS query and if +it doesn't find it, it upcalls to userspace to make a new DNS query, which +may then be cached. The key description is constructed as a string of the +form:: =20 [:] =20 - where optionally specifies the particular upcall program to in= voke, - and thus the type of query to do, and specifies the string to = be - looked up. The default query type is a straight hostname to IP addre= ss - set lookup. +where optionally specifies the particular upcall program to invoke, +and thus the type of query to do, and specifies the string to be +looked up. The default query type is a straight hostname to IP address +set lookup. =20 - The name parameter is not required to be a NUL-terminated string, and= its - length should be given by the namelen argument. +The name parameter is not required to be a NUL-terminated string, and its +length should be given by the namelen argument. =20 - The options parameter may be NULL or it may be a set of options - appropriate to the query type. +The options parameter may be NULL or it may be a set of options +appropriate to the query type. =20 - The return value is a string appropriate to the query type. For inst= ance, - for the default query type it is just a list of comma-separated IPv4 = and - IPv6 addresses. The caller must free the result. +The return value is a string appropriate to the query type. For instance, +for the default query type it is just a list of comma-separated IPv4 and +IPv6 addresses. The caller must free the result. =20 - The length of the result string is returned on success, and a negative - error code is returned otherwise. -EKEYREJECTED will be returned if = the - DNS lookup failed. +The length of the result string is returned on success, and a negative +error code is returned otherwise. -EKEYREJECTED will be returned if the +DNS lookup failed. =20 - If _expiry is non-NULL, the expiry time (TTL) of the result will be - returned also. +If _expiry is non-NULL, the expiry time (TTL) of the result will be +returned also. =20 The kernel maintains an internal keyring in which it caches looked up keys. This can be cleared by any process that has the CAP_SYS_ADMIN capability by --=20 An old man doll... just what I always wanted! - Clara