|
1 | 1 | /*
|
2 |
| - * wks.c -- Well known services RDATA parser |
| 2 | + * wks.c -- Well-Known Services (WKS) RDATA parser |
3 | 3 | *
|
4 | 4 | * Copyright (c) 2023, NLnet Labs. All rights reserved.
|
5 | 5 | *
|
|
20 | 20 | // getprotobyname_r exist on most BSDs and Linux, but not Windows.
|
21 | 21 | // The list of known protocols and services also differs between operating
|
22 | 22 | // systems and no list covers all IANA (links below) registered protocols
|
23 |
| -// and services, which may cause compatibility issues. |
| 23 | +// and services, which may cause compatibility issues. Furthermore, even |
| 24 | +// getprotobyname_r and getservbyname_r are marked locale, meaning the locale |
| 25 | +// object is read without any form of synchronization, which may be an issue |
| 26 | +// for a library. |
24 | 27 | //
|
25 | 28 | // https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml
|
26 | 29 | // https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml
|
27 | 30 | //
|
| 31 | +// https://www.gnu.org/software/libc/manual/html_node/Protocols-Database.html |
| 32 | +// https://www.gnu.org/software/libc/manual/html_node/Services-Database.html |
| 33 | +// https://www.gnu.org/software/libc/manual/html_node/POSIX-Safety-Concepts.html |
| 34 | +// https://www.gnu.org/software/libc/manual/html_node/Other-Safety-Remarks.html |
28 | 35 | //
|
29 | 36 | // WKS RRs are rarely used and a document to deprecate the RRTYPE (among
|
30 | 37 | // others) has been drafted (WKS removed from the second draft).
|
|
36 | 43 | // WKS RRs have been said to be deprecated in an informational document (NOT
|
37 | 44 | // a standard), although it wrongly claims WKS RRs are in fact deprecated.
|
38 | 45 | //
|
39 |
| -// RFC1912 section 2.6.1: |
| 46 | +// RFC1912 section 2.6.1 (informational): |
40 | 47 | // WKS records are deprecated in [RFC 1123]. They serve no known useful
|
41 | 48 | // function, except internally among LISP machines. Don't use them.
|
42 | 49 | //
|
43 | 50 | // https://datatracker.ietf.org/doc/html/rfc1912
|
44 | 51 | //
|
| 52 | +// RFC1123 section 2.2 (standard): |
| 53 | +// An application SHOULD NOT rely on the ability to locate a WKS record |
| 54 | +// containing an accurate listing of all services at a particular host |
| 55 | +// address, since the WKS RR type is not often used by Internet sites. |
| 56 | +// To confirm that a service is present, simply attempt to use it. |
| 57 | +// |
| 58 | +// https://datatracker.ietf.org/doc/html/rfc1123 |
| 59 | +// |
| 60 | +// RFC1127 section 2 (informational): |
| 61 | +// WKS Records Detracted [AS 2.2, 5.2.12, 6.1.3.6] |
| 62 | +// Recommend against using WKS records from DNS. |
| 63 | +// |
| 64 | +// https://datatracker.ietf.org/doc/html/rfc1127 |
| 65 | +// |
45 | 66 | //
|
46 | 67 | // Rather than supporting any protocol registered by IANA, support a small
|
47 | 68 | // subset of mnemonics (TCP and UDP) as well as numeric values and add
|
|
0 commit comments