Skip to content

Commit 9dfe136

Browse files
mchehabdavem330
authored andcommitted
docs: networking: convert dns_resolver.txt to ReST
- add SPDX header; - adjust titles and chapters, adding proper markups; - comment out text-only TOC from html/pdf output; - mark code blocks and literals as such; - adjust identation, whitespaces and blank lines; - add to networking/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 5f32c92 commit 9dfe136

6 files changed

Lines changed: 30 additions & 31 deletions

File tree

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
===================
2-
DNS Resolver Module
3-
===================
1+
.. SPDX-License-Identifier: GPL-2.0
42
5-
Contents:
3+
===================
4+
DNS Resolver Module
5+
===================
6+
7+
.. Contents:
68
79
- Overview.
810
- Compilation.
@@ -12,8 +14,7 @@ Contents:
1214
- Debugging.
1315
1416
15-
========
16-
OVERVIEW
17+
Overview
1718
========
1819

1920
The DNS resolver module provides a way for kernel services to make DNS queries
@@ -33,50 +34,50 @@ It does not yet support the following AFS features:
3334
This code is extracted from the CIFS filesystem.
3435

3536

36-
===========
37-
COMPILATION
37+
Compilation
3838
===========
3939

40-
The module should be enabled by turning on the kernel configuration options:
40+
The module should be enabled by turning on the kernel configuration options::
4141

4242
CONFIG_DNS_RESOLVER - tristate "DNS Resolver support"
4343

4444

45-
==========
46-
SETTING UP
45+
Setting up
4746
==========
4847

4948
To set up this facility, the /etc/request-key.conf file must be altered so that
5049
/sbin/request-key can appropriately direct the upcalls. For example, to handle
5150
basic dname to IPv4/IPv6 address resolution, the following line should be
52-
added:
51+
added::
52+
5353

5454
#OP TYPE DESC CO-INFO PROGRAM ARG1 ARG2 ARG3 ...
5555
#====== ============ ======= ======= ==========================
5656
create dns_resolver * * /usr/sbin/cifs.upcall %k
5757

5858
To direct a query for query type 'foo', a line of the following should be added
59-
before the more general line given above as the first match is the one taken.
59+
before the more general line given above as the first match is the one taken::
6060

6161
create dns_resolver foo:* * /usr/sbin/dns.foo %k
6262

6363

64-
=====
65-
USAGE
64+
Usage
6665
=====
6766

6867
To make use of this facility, one of the following functions that are
69-
implemented in the module can be called after doing:
68+
implemented in the module can be called after doing::
7069

7170
#include <linux/dns_resolver.h>
7271

73-
(1) int dns_query(const char *type, const char *name, size_t namelen,
74-
const char *options, char **_result, time_t *_expiry);
72+
::
73+
74+
int dns_query(const char *type, const char *name, size_t namelen,
75+
const char *options, char **_result, time_t *_expiry);
7576

7677
This is the basic access function. It looks for a cached DNS query and if
7778
it doesn't find it, it upcalls to userspace to make a new DNS query, which
7879
may then be cached. The key description is constructed as a string of the
79-
form:
80+
form::
8081

8182
[<type>:]<name>
8283

@@ -107,16 +108,14 @@ This can be cleared by any process that has the CAP_SYS_ADMIN capability by
107108
the use of KEYCTL_KEYRING_CLEAR on the keyring ID.
108109

109110

110-
===============================
111-
READING DNS KEYS FROM USERSPACE
111+
Reading DNS Keys from Userspace
112112
===============================
113113

114114
Keys of dns_resolver type can be read from userspace using keyctl_read() or
115115
"keyctl read/print/pipe".
116116

117117

118-
=========
119-
MECHANISM
118+
Mechanism
120119
=========
121120

122121
The dnsresolver module registers a key type called "dns_resolver". Keys of
@@ -147,11 +146,10 @@ See <file:Documentation/security/keys/request-key.rst> for further
147146
information about request-key function.
148147

149148

150-
=========
151-
DEBUGGING
149+
Debugging
152150
=========
153151

154152
Debugging messages can be turned on dynamically by writing a 1 into the
155-
following file:
153+
following file::
156154

157-
/sys/module/dnsresolver/parameters/debug
155+
/sys/module/dnsresolver/parameters/debug

‎Documentation/networking/index.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Contents:
5252
dctcp
5353
decnet
5454
defza
55+
dns_resolver
5556

5657
.. only:: subproject and html
5758

‎net/ceph/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ config CEPH_LIB_USE_DNS_RESOLVER
3939
be resolved using the CONFIG_DNS_RESOLVER facility.
4040

4141
For information on how to use CONFIG_DNS_RESOLVER consult
42-
Documentation/networking/dns_resolver.txt
42+
Documentation/networking/dns_resolver.rst
4343

4444
If unsure, say N.

‎net/dns_resolver/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ config DNS_RESOLVER
1919
SMB2 later. DNS Resolver is supported by the userspace upcall
2020
helper "/sbin/dns.resolver" via /etc/request-key.conf.
2121

22-
See <file:Documentation/networking/dns_resolver.txt> for further
22+
See <file:Documentation/networking/dns_resolver.rst> for further
2323
information.
2424

2525
To compile this as a module, choose M here: the module will be called

‎net/dns_resolver/dns_key.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* Key type used to cache DNS lookups made by the kernel
22
*
3-
* See Documentation/networking/dns_resolver.txt
3+
* See Documentation/networking/dns_resolver.rst
44
*
55
* Copyright (c) 2007 Igor Mammedov
66
* Author(s): Igor Mammedov (niallain@gmail.com)

‎net/dns_resolver/dns_query.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Upcall routine, designed to work as a key type and working through
22
* /sbin/request-key to contact userspace when handling DNS queries.
33
*
4-
* See Documentation/networking/dns_resolver.txt
4+
* See Documentation/networking/dns_resolver.rst
55
*
66
* Copyright (c) 2007 Igor Mammedov
77
* Author(s): Igor Mammedov (niallain@gmail.com)

0 commit comments

Comments
 (0)