diff options
Diffstat (limited to 'documentation/content/en/books/developers-handbook')
15 files changed, 75 insertions, 71 deletions
diff --git a/documentation/content/en/books/developers-handbook/_index.adoc b/documentation/content/en/books/developers-handbook/_index.adoc index b25ae41a62..b4979f3a2f 100644 --- a/documentation/content/en/books/developers-handbook/_index.adoc +++ b/documentation/content/en/books/developers-handbook/_index.adoc @@ -55,6 +55,6 @@ Many sections do not yet exist and some of those that do exist need to be update If you are interested in helping with this project, send email to the {freebsd-doc}. The latest version of this document is always available from the link:https://www.FreeBSD.org[FreeBSD World Wide Web server]. -It may also be downloaded in a variety of formats and compression options from the link:https://download.freebsd.org/doc/[FreeBSD download server] or one of the numerous extref:{handbook}[mirror sites, mirrors]. +It may also be downloaded in a variety of formats and compression options from the link:https://download.freebsd.org/doc/[FreeBSD download server] or one of the numerous extref:{handbook}mirrors[mirror sites, mirrors]. ''' diff --git a/documentation/content/en/books/developers-handbook/_index.po b/documentation/content/en/books/developers-handbook/_index.po index c674bd3292..6d183e3438 100644 --- a/documentation/content/en/books/developers-handbook/_index.po +++ b/documentation/content/en/books/developers-handbook/_index.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" -"POT-Creation-Date: 2025-05-01 19:56-0300\n" +"POT-Creation-Date: 2025-11-08 16:17+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -50,7 +50,7 @@ msgid "" "link:https://www.FreeBSD.org[FreeBSD World Wide Web server]. It may also be " "downloaded in a variety of formats and compression options from the " "link:https://download.freebsd.org/doc/[FreeBSD download server] or one of " -"the numerous extref:{handbook}[mirror sites, mirrors]." +"the numerous extref:{handbook}mirrors[mirror sites, mirrors]." msgstr "" #. type: Plain text diff --git a/documentation/content/en/books/developers-handbook/book.adoc b/documentation/content/en/books/developers-handbook/book.adoc index 63a89edddc..510467b290 100644 --- a/documentation/content/en/books/developers-handbook/book.adoc +++ b/documentation/content/en/books/developers-handbook/book.adoc @@ -53,7 +53,7 @@ Many sections do not yet exist and some of those that do exist need to be update If you are interested in helping with this project, send email to the {freebsd-doc}. The latest version of this document is always available from the link:https://www.FreeBSD.org[FreeBSD World Wide Web server]. -It may also be downloaded in a variety of formats and compression options from the link:https://download.freebsd.org/doc/[FreeBSD download server] or one of the numerous extref:{handbook}[mirror sites, mirrors]. +It may also be downloaded in a variety of formats and compression options from the link:https://download.freebsd.org/doc/[FreeBSD download server] or one of the numerous extref:{handbook}mirrors[mirror sites, mirrors]. ''' diff --git a/documentation/content/en/books/developers-handbook/book.po b/documentation/content/en/books/developers-handbook/book.po index 3cf61902ab..1f7b4a2df5 100644 --- a/documentation/content/en/books/developers-handbook/book.po +++ b/documentation/content/en/books/developers-handbook/book.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" -"POT-Creation-Date: 2022-07-07 23:23-0300\n" +"POT-Creation-Date: 2025-11-08 16:17+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -46,11 +46,11 @@ msgstr "" #. type: Plain text #: documentation/content/en/books/developers-handbook/book.adoc:57 msgid "" -"The latest version of this document is always available from the link:" -"https://www.FreeBSD.org[FreeBSD World Wide Web server]. It may also be " -"downloaded in a variety of formats and compression options from the link:" -"https://download.freebsd.org/doc/[FreeBSD download server] or one of the " -"numerous extref:{handbook}[mirror sites, mirrors]." +"The latest version of this document is always available from the " +"link:https://www.FreeBSD.org[FreeBSD World Wide Web server]. It may also be " +"downloaded in a variety of formats and compression options from the " +"link:https://download.freebsd.org/doc/[FreeBSD download server] or one of " +"the numerous extref:{handbook}mirrors[mirror sites, mirrors]." msgstr "" #. type: Plain text diff --git a/documentation/content/en/books/developers-handbook/ipv6/_index.adoc b/documentation/content/en/books/developers-handbook/ipv6/_index.adoc index a97feddf59..e80cf22dbd 100644 --- a/documentation/content/en/books/developers-handbook/ipv6/_index.adoc +++ b/documentation/content/en/books/developers-handbook/ipv6/_index.adoc @@ -80,7 +80,7 @@ We also attended University of New Hampshire IOL tests (http://www.iol.unh.edu/[ ** IPv4 compatible address is not supported. ** automatic tunneling (described in 4.3 of this RFC) is not supported. ** man:gif[4] interface implements IPv[46]-over-IPv[46] tunnel in a generic way, - and it covers "configured tunnel" described in the spec. See crossref:ipv6[gif,23.5.1.5] in this document for details. + and it covers "configured tunnel" described in the spec. See crossref:ipv6[gif,Generic Tunnel Interface] in this document for details. * RFC1981: Path MTU Discovery for IPv6 * RFC2080: RIPng for IPv6 @@ -114,15 +114,15 @@ We also attended University of New Hampshire IOL tests (http://www.iol.unh.edu/[ * RFC2460: IPv6 specification * RFC2461: Neighbor discovery for IPv6 -** See crossref:ipv6[neighbor-discovery,23.5.1.2] in this document for details. +** See crossref:ipv6[neighbor-discovery,Neighbor Discovery] in this document for details. * RFC2462: IPv6 Stateless Address Autoconfiguration -** See crossref:ipv6[ipv6-pnp,23.5.1.4] in this document for details. +** See crossref:ipv6[ipv6-pnp,Plug and Play] in this document for details. * RFC2463: ICMPv6 for IPv6 specification -** See crossref:ipv6[icmpv6,23.5.1.9] in this document for details. +** See crossref:ipv6[icmpv6,ICMPv6] in this document for details. * RFC2464: Transmission of IPv6 Packets over Ethernet Networks * RFC2465: MIB for IPv6: Textual Conventions and General Group @@ -138,11 +138,11 @@ We also attended University of New Hampshire IOL tests (http://www.iol.unh.edu/[ * RFC2553: Basic Socket Interface Extensions for IPv6 ** IPv4 mapped address (3.7) and special behavior of IPv6 wildcard bind socket - (3.8) are supported. See crossref:ipv6[ipv6-wildcard-socket,23.5.1.12] in this document for details. + (3.8) are supported. See crossref:ipv6[ipv6-wildcard-socket,IPv4 Mapped Address and IPv6 Wildcard Socket] in this document for details. * RFC2675: IPv6 Jumbograms -** See crossref:ipv6[ipv6-jumbo,23.5.1.7] in this document for details. +** See crossref:ipv6[ipv6-jumbo,Jumbo Payload] in this document for details. * RFC2710: Multicast Listener Discovery for IPv6 * RFC2711: IPv6 router alert option @@ -156,7 +156,7 @@ We also attended University of New Hampshire IOL tests (http://www.iol.unh.edu/[ * [.filename]#draft-itojun-ipv6-tcp-to-anycast-00#: Disconnecting TCP connection toward IPv6 anycast address * [.filename]#draft-yamamoto-wideipv6-comm-model-00# -** See crossref:ipv6[ipv6-sas,23.5.1.6] in this document for details. +** See crossref:ipv6[ipv6-sas,Source Address Selection] in this document for details. * [.filename]#draft-ietf-ipngwg-scopedaddr-format-00.txt#: An Extension of Format for IPv6 Scoped Addresses @@ -315,7 +315,7 @@ RFC2462 has validation rule against incoming RA prefix information option, in 5. This is to protect hosts from malicious (or misconfigured) routers that advertise very short prefix lifetime. There was an update from Jim Bound to ipngwg mailing list (look for "(ipng 6712)" in the archive) and it is implemented Jim's update. -See crossref:ipv6[neighbor-discovery,23.5.1.2] in the document for relationship between DAD and autoconfiguration. +See crossref:ipv6[neighbor-discovery,Neighbor Discovery] in the document for relationship between DAD and autoconfiguration. [[gif]] ==== Generic Tunnel Interface @@ -334,7 +334,7 @@ It is very easy to configure interfaces and routing tables to perform infinite l _Please be warned_. gif can be configured to be ECN-friendly. -See crossref:ipv6[ipsec-ecn,23.5.4.5] for ECN-friendliness of tunnels, and man:gif[4] for how to configure. +See crossref:ipv6[ipsec-ecn,ECN Consideration on IPsec Tunnels] for ECN-friendliness of tunnels, and man:gif[4] for how to configure. If you would like to configure an IPv4-in-IPv6 tunnel with gif interface, read man:gif[4] carefully. You will need to remove IPv6 link-local address automatically assigned to the gif interface. @@ -354,7 +354,7 @@ This is the most typical case. . If there is no address that satisfies the above condition, choose the address associated with the routing table entry for the destination. This is the last resort, which may cause scope violation. For instance, ::1 is selected for ff01::1, fe80:1::200:f8ff:fe01:6317 for -fe80:1::2a0:24ff:feab:839b (note that embedded interface index - described in crossref:ipv6[ipv6-scope-index,23.5.1.3] - helps us choose the right source address. +fe80:1::2a0:24ff:feab:839b (note that embedded interface index - described in crossref:ipv6[ipv6-scope-index,Scope Index] - helps us choose the right source address. Those embedded indices will not be on the wire). If the outgoing interface has multiple address for the scope, a source is selected longest match basis (rule 3). Suppose 2001:0DB8:808:1:200:f8ff:fe01:6317 and 2001:0DB8:9:124:200:f8ff:fe01:6317 are given to the outgoing interface. 2001:0DB8:808:1:200:f8ff:fe01:6317 is chosen as the source for the destination 2001:0DB8:800::1. diff --git a/documentation/content/en/books/developers-handbook/ipv6/_index.po b/documentation/content/en/books/developers-handbook/ipv6/_index.po index aa7d2bd4aa..61c4f93aa1 100644 --- a/documentation/content/en/books/developers-handbook/ipv6/_index.po +++ b/documentation/content/en/books/developers-handbook/ipv6/_index.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" -"POT-Creation-Date: 2025-05-01 19:56-0300\n" +"POT-Creation-Date: 2025-11-08 16:17+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -119,7 +119,7 @@ msgstr "" msgid "" "man:gif[4] interface implements IPv[46]-over-IPv[46] tunnel in a generic " "way, and it covers \"configured tunnel\" described in the spec. See " -"crossref:ipv6[gif,23.5.1.5] in this document for details." +"crossref:ipv6[gif,Generic Tunnel Interface] in this document for details." msgstr "" #. type: Plain text @@ -210,7 +210,8 @@ msgstr "" #. type: Plain text #: documentation/content/en/books/developers-handbook/ipv6/_index.adoc:118 msgid "" -"See crossref:ipv6[neighbor-discovery,23.5.1.2] in this document for details." +"See crossref:ipv6[neighbor-discovery,Neighbor Discovery] in this document " +"for details." msgstr "" #. type: Plain text @@ -220,7 +221,7 @@ msgstr "" #. type: Plain text #: documentation/content/en/books/developers-handbook/ipv6/_index.adoc:122 -msgid "See crossref:ipv6[ipv6-pnp,23.5.1.4] in this document for details." +msgid "See crossref:ipv6[ipv6-pnp,Plug and Play] in this document for details." msgstr "" #. type: Plain text @@ -230,7 +231,7 @@ msgstr "" #. type: Plain text #: documentation/content/en/books/developers-handbook/ipv6/_index.adoc:126 -msgid "See crossref:ipv6[icmpv6,23.5.1.9] in this document for details." +msgid "See crossref:ipv6[icmpv6,ICMPv6] in this document for details." msgstr "" #. type: Plain text @@ -281,8 +282,8 @@ msgstr "" #: documentation/content/en/books/developers-handbook/ipv6/_index.adoc:142 msgid "" "IPv4 mapped address (3.7) and special behavior of IPv6 wildcard bind socket " -"(3.8) are supported. See crossref:ipv6[ipv6-wildcard-socket,23.5.1.12] in " -"this document for details." +"(3.8) are supported. See crossref:ipv6[ipv6-wildcard-socket,IPv4 Mapped " +"Address and IPv6 Wildcard Socket] in this document for details." msgstr "" #. type: Plain text @@ -292,7 +293,8 @@ msgstr "" #. type: Plain text #: documentation/content/en/books/developers-handbook/ipv6/_index.adoc:146 -msgid "See crossref:ipv6[ipv6-jumbo,23.5.1.7] in this document for details." +msgid "" +"See crossref:ipv6[ipv6-jumbo,Jumbo Payload] in this document for details." msgstr "" #. type: Plain text @@ -350,7 +352,9 @@ msgstr "" #. type: Plain text #: documentation/content/en/books/developers-handbook/ipv6/_index.adoc:160 -msgid "See crossref:ipv6[ipv6-sas,23.5.1.6] in this document for details." +msgid "" +"See crossref:ipv6[ipv6-sas,Source Address Selection] in this document for " +"details." msgstr "" #. type: Plain text @@ -716,7 +720,7 @@ msgstr "" #. type: Plain text #: documentation/content/en/books/developers-handbook/ipv6/_index.adoc:319 msgid "" -"See crossref:ipv6[neighbor-discovery,23.5.1.2] in the document for " +"See crossref:ipv6[neighbor-discovery,Neighbor Discovery] in the document for " "relationship between DAD and autoconfiguration." msgstr "" @@ -766,9 +770,9 @@ msgstr "" #. type: Plain text #: documentation/content/en/books/developers-handbook/ipv6/_index.adoc:338 msgid "" -"gif can be configured to be ECN-friendly. See crossref:ipv6[ipsec-" -"ecn,23.5.4.5] for ECN-friendliness of tunnels, and man:gif[4] for how to " -"configure." +"gif can be configured to be ECN-friendly. See crossref:ipv6[ipsec-ecn,ECN " +"Consideration on IPsec Tunnels] for ECN-friendliness of tunnels, and " +"man:gif[4] for how to configure." msgstr "" #. type: Plain text @@ -841,7 +845,7 @@ msgstr "" msgid "" "For instance, ::1 is selected for ff01::1, fe80:1::200:f8ff:fe01:6317 for " "fe80:1::2a0:24ff:feab:839b (note that embedded interface index - described " -"in crossref:ipv6[ipv6-scope-index,23.5.1.3] - helps us choose the right " +"in crossref:ipv6[ipv6-scope-index,Scope Index] - helps us choose the right " "source address. Those embedded indices will not be on the wire). If the " "outgoing interface has multiple address for the scope, a source is selected " "longest match basis (rule 3). Suppose 2001:0DB8:808:1:200:f8ff:fe01:6317 " diff --git a/documentation/content/en/books/developers-handbook/l10n/_index.adoc b/documentation/content/en/books/developers-handbook/l10n/_index.adoc index 5760eaef62..34153230f6 100644 --- a/documentation/content/en/books/developers-handbook/l10n/_index.adoc +++ b/documentation/content/en/books/developers-handbook/l10n/_index.adoc @@ -152,7 +152,7 @@ The below lines need to be put into a common header file of the program, which i #ifdef WITHOUT_NLS #define getstr(n) nlsstr[n] #else -#include nl_types.h +#include <nl_types.h> extern nl_catd catalog; #define getstr(n) catgets(catalog, 1, n, nlsstr[n]) @@ -166,7 +166,7 @@ Next, put these lines into the global declaration part of the main source file: [.programlisting] .... #ifndef WITHOUT_NLS -#include nl_types.h +#include <nl_types.h> nl_catd catalog; #endif @@ -209,7 +209,7 @@ First, here is an example that does not use libc error messages: [.programlisting] .... -#include err.h +#include <err.h> ... if (!S_ISDIR(st.st_mode)) errx(1, "argument is not a directory"); @@ -219,8 +219,8 @@ This can be transformed to print an error message by reading `errno` and printin [.programlisting] .... -#include err.h -#include errno.h +#include <err.h> +#include <errno.h> ... if (!S_ISDIR(st.st_mode)) { errno = ENOTDIR; @@ -236,7 +236,7 @@ It is worth to note that there are cases when `errno` is set automatically by a [.programlisting] .... -#include err.h +#include <err.h> ... if ((p = malloc(size)) == NULL) err(1, NULL); diff --git a/documentation/content/en/books/developers-handbook/l10n/_index.po b/documentation/content/en/books/developers-handbook/l10n/_index.po index 3147697d9a..f101d23366 100644 --- a/documentation/content/en/books/developers-handbook/l10n/_index.po +++ b/documentation/content/en/books/developers-handbook/l10n/_index.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" -"POT-Creation-Date: 2025-05-01 19:56-0300\n" +"POT-Creation-Date: 2025-11-08 16:17+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -266,7 +266,7 @@ msgid "" "#ifdef WITHOUT_NLS\n" "#define getstr(n)\t nlsstr[n]\n" "#else\n" -"#include nl_types.h\n" +"#include <nl_types.h>\n" msgstr "" #. type: delimited block . 4 @@ -296,7 +296,7 @@ msgstr "" #, no-wrap msgid "" "#ifndef WITHOUT_NLS\n" -"#include nl_types.h\n" +"#include <nl_types.h>\n" "nl_catd\t catalog;\n" "#endif\n" msgstr "" @@ -377,7 +377,7 @@ msgstr "" #: documentation/content/en/books/developers-handbook/l10n/_index.adoc:216 #, no-wrap msgid "" -"#include err.h\n" +"#include <err.h>\n" "...\n" "if (!S_ISDIR(st.st_mode))\n" "\terrx(1, \"argument is not a directory\");\n" @@ -394,8 +394,8 @@ msgstr "" #: documentation/content/en/books/developers-handbook/l10n/_index.adoc:229 #, no-wrap msgid "" -"#include err.h\n" -"#include errno.h\n" +"#include <err.h>\n" +"#include <errno.h>\n" "...\n" "if (!S_ISDIR(st.st_mode)) {\n" "\terrno = ENOTDIR;\n" @@ -424,7 +424,7 @@ msgstr "" #: documentation/content/en/books/developers-handbook/l10n/_index.adoc:243 #, no-wrap msgid "" -"#include err.h\n" +"#include <err.h>\n" "...\n" "if ((p = malloc(size)) == NULL)\n" "\terr(1, NULL);\n" diff --git a/documentation/content/en/books/developers-handbook/secure/_index.adoc b/documentation/content/en/books/developers-handbook/secure/_index.adoc index 738a18988c..a871193a5b 100644 --- a/documentation/content/en/books/developers-handbook/secure/_index.adoc +++ b/documentation/content/en/books/developers-handbook/secure/_index.adoc @@ -69,7 +69,7 @@ UNIX(R) processes do not execute synchronously so logical operations are rarely [[secure-bufferov]] == Buffer Overflows -Buffer Overflows have been around since the very beginnings of the von Neumann crossref:bibliography[cod,1] architecture. +Buffer Overflows have been around since the very beginnings of the von Neumann crossref:bibliography[COD,1] architecture. They first gained widespread notoriety in 1988 with the Morris Internet worm. Unfortunately, the same basic attack remains effective today. By far the most common type of buffer overflow attack is based on corrupting the stack. @@ -81,7 +81,7 @@ This stack frame consists of the arguments passed to the function as well as a d The "stack pointer" is a register that holds the current location of the top of the stack. Since this value is constantly changing as new values are pushed onto the top of the stack, many implementations also provide a "frame pointer" that is located near the beginning of a stack frame so that local variables can more easily be addressed relative to this value. -crossref:bibliography[cod,1] The return address for function calls is also stored on the stack, and this is the cause of stack-overflow exploits since overflowing a local variable in a function can overwrite the return address of that function, potentially allowing a malicious user to execute any code he or she wants. +crossref:bibliography[COD,1] The return address for function calls is also stored on the stack, and this is the cause of stack-overflow exploits since overflowing a local variable in a function can overwrite the return address of that function, potentially allowing a malicious user to execute any code he or she wants. Although stack-based attacks are by far the most common, it would also be possible to overrun the stack with a heap-based (malloc/free) attack. diff --git a/documentation/content/en/books/developers-handbook/secure/_index.po b/documentation/content/en/books/developers-handbook/secure/_index.po index 9eeb9dfbeb..ba7fc5020e 100644 --- a/documentation/content/en/books/developers-handbook/secure/_index.po +++ b/documentation/content/en/books/developers-handbook/secure/_index.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" -"POT-Creation-Date: 2025-05-01 19:56-0300\n" +"POT-Creation-Date: 2025-11-08 16:17+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -85,7 +85,7 @@ msgstr "" #: documentation/content/en/books/developers-handbook/secure/_index.adoc:76 msgid "" "Buffer Overflows have been around since the very beginnings of the von " -"Neumann crossref:bibliography[cod,1] architecture. They first gained " +"Neumann crossref:bibliography[COD,1] architecture. They first gained " "widespread notoriety in 1988 with the Morris Internet worm. Unfortunately, " "the same basic attack remains effective today. By far the most common type " "of buffer overflow attack is based on corrupting the stack." @@ -104,7 +104,7 @@ msgid "" "as new values are pushed onto the top of the stack, many implementations " "also provide a \"frame pointer\" that is located near the beginning of a " "stack frame so that local variables can more easily be addressed relative to " -"this value. crossref:bibliography[cod,1] The return address for function " +"this value. crossref:bibliography[COD,1] The return address for function " "calls is also stored on the stack, and this is the cause of stack-overflow " "exploits since overflowing a local variable in a function can overwrite the " "return address of that function, potentially allowing a malicious user to " diff --git a/documentation/content/en/books/developers-handbook/sockets/_index.adoc b/documentation/content/en/books/developers-handbook/sockets/_index.adoc index a85deb7394..49249aa3c7 100644 --- a/documentation/content/en/books/developers-handbook/sockets/_index.adoc +++ b/documentation/content/en/books/developers-handbook/sockets/_index.adoc @@ -383,7 +383,7 @@ Now, let us try to fill it out. Let us assume we are trying to write a client for the _daytime_ protocol, which simply states that its server will write a text string representing the current date and time to port 13. We want to use TCP/IP, so we need to specify `AF_INET` in the address family field. `AF_INET` is defined as `2`. -Let us use the IP address of `192.43.244.18`, which is the time server of US federal government (`time.nist.gov`). +Let us use the IP address of `132.163.96.1`, which is the time server of US federal government (`time.nist.gov`). .Specific example of sockaddr_in image::sainfill.png[] @@ -402,7 +402,7 @@ struct in_addr { In addition, `in_addr_t` is a 32-bit integer. -The `192.43.244.18` is just a convenient notation of expressing a 32-bit integer by listing all of its 8-bit bytes, starting with the _most significant_ one. +The `132.163.96.1` is just a convenient notation of expressing a 32-bit integer by listing all of its 8-bit bytes, starting with the _most significant_ one. So far, we have viewed `sockaddr` as an abstraction. Our computer does not store `short` integers as a single 16-bit entity, but as a sequence of 2 bytes. @@ -414,7 +414,7 @@ Suppose we coded something like this: .... sa.sin_family = AF_INET; sa.sin_port = 13; -sa.sin_addr.s_addr = (((((192 << 8) | 43) << 8) | 244) << 8) | 18; +sa.sin_addr.s_addr = (((((132 << 8) | 163) << 8) | 96) << 8) | 1; .... What would the result look like? @@ -485,7 +485,7 @@ One would be to _reverse_ the values in our code: .... sa.sin_family = AF_INET; sa.sin_port = 13 << 8; -sa.sin_addr.s_addr = (((((18 << 8) | 244) << 8) | 43) << 8) | 192; +sa.sin_addr.s_addr = (((((1 << 8) | 96) << 8) | 163) << 8) | 132; .... This will _trick_ our compiler into storing the data in the _network byte order_. @@ -546,7 +546,7 @@ Or it may outright _refuse_ any request for specific code. [[sockets-first-client]] ===== Our First Client -We now know enough to write a very simple client, one that will get current time from `192.43.244.18` and print it to [.filename]#stdout#. +We now know enough to write a very simple client, one that will get current time from `132.163.96.1` and print it to [.filename]#stdout#. [.programlisting] .... @@ -576,7 +576,7 @@ int main() { sa.sin_family = AF_INET; sa.sin_port = htons(13); - sa.sin_addr.s_addr = htonl((((((192 << 8) | 43) << 8) | 244) << 8) | 18); + sa.sin_addr.s_addr = htonl((((((132 << 8) | 163) << 8) | 96) << 8) | 1); if (connect(s, (struct sockaddr *)&sa, sizeof sa) < 0) { perror("connect"); close(s); @@ -799,7 +799,7 @@ if (INADDR_ANY) .... Its value is `0`. -Since we have just used `bzero` on the entire structure, it would be redundant to set it to `0` again. +Since we have just used `memset` to set zeroes on the entire structure, it would be redundant to set it to `0` again. But if we port our code to some other system where INADDR_ANY is perhaps not a zero, we need to assign it to `sa.sin_addr.s_addr`. Most modern C compilers are clever enough to notice that INADDR_ANY is a constant. As long as it is a zero, they will optimize the entire conditional statement out of the code. @@ -1020,7 +1020,7 @@ int main(int argc, char *argv[]) { We now can type a domain name (or an IP address, it works both ways) on the command line, and the program will try to connect to its _daytime_ server. Otherwise, it will still default to `time.nist.gov`. -However, even in this case we will use `gethostbyname` rather than hard coding `192.43.244.18`. +However, even in this case we will use `gethostbyname` rather than hard coding `132.163.96.1`. That way, even if its IP address changes in the future, we will still find it. Since it takes virtually no time to get the time from your local server, you could run daytime twice in a row: diff --git a/documentation/content/en/books/developers-handbook/tools/_index.adoc b/documentation/content/en/books/developers-handbook/tools/_index.adoc index bcae63ad03..14a6250329 100644 --- a/documentation/content/en/books/developers-handbook/tools/_index.adoc +++ b/documentation/content/en/books/developers-handbook/tools/_index.adoc @@ -105,7 +105,7 @@ Indeed, part of the original UNIX(R) philosophy was to provide lots of small uti Here is a list of interpreters that are available from the FreeBSD Ports Collection, with a brief discussion of some of the more popular interpreted languages. -Instructions on how to get and install applications from the Ports Collection can be found in the extref:{handbook}[Ports section, ports-using] of the handbook. +Instructions on how to get and install applications from the Ports Collection can be found in the extref:{handbook}ports[Ports section, ports-using] of the handbook. BASIC:: Short for Beginner's All-purpose Symbolic Instruction Code. @@ -939,7 +939,7 @@ Now all that is needed is to attach to the child, set PauseMode to `0` with `exp [NOTE] ==== The described functionality is available starting with LLDB version 12.0.0. -Users of FreeBSD releases containing an earlier LLDB version may wish to use the snapshot available in extref:{handbook}[ports or packages, ports-using], as package:devel/llvm-devel[]. +Users of FreeBSD releases containing an earlier LLDB version may wish to use the snapshot available in extref:{handbook}ports[ports or packages, ports-using], as package:devel/llvm-devel[]. ==== Starting with LLDB 12.0.0, remote debugging is supported on FreeBSD. diff --git a/documentation/content/en/books/developers-handbook/tools/_index.po b/documentation/content/en/books/developers-handbook/tools/_index.po index c9e26e1899..03b9390128 100644 --- a/documentation/content/en/books/developers-handbook/tools/_index.po +++ b/documentation/content/en/books/developers-handbook/tools/_index.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" -"POT-Creation-Date: 2025-06-29 21:20+0100\n" +"POT-Creation-Date: 2025-11-08 16:17+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -164,8 +164,8 @@ msgstr "" #: documentation/content/en/books/developers-handbook/tools/_index.adoc:109 msgid "" "Instructions on how to get and install applications from the Ports " -"Collection can be found in the extref:{handbook}[Ports section, ports-using] " -"of the handbook." +"Collection can be found in the extref:{handbook}ports[Ports section, ports-" +"using] of the handbook." msgstr "" #. type: Labeled list @@ -2053,8 +2053,8 @@ msgstr "" msgid "" "The described functionality is available starting with LLDB version 12.0.0. " "Users of FreeBSD releases containing an earlier LLDB version may wish to use " -"the snapshot available in extref:{handbook}[ports or packages, ports-using], " -"as package:devel/llvm-devel[]." +"the snapshot available in extref:{handbook}ports[ports or packages, ports-" +"using], as package:devel/llvm-devel[]." msgstr "" #. type: Plain text diff --git a/documentation/content/en/books/developers-handbook/x86/_index.adoc b/documentation/content/en/books/developers-handbook/x86/_index.adoc index de7cd9e992..b0ca446359 100644 --- a/documentation/content/en/books/developers-handbook/x86/_index.adoc +++ b/documentation/content/en/books/developers-handbook/x86/_index.adoc @@ -171,7 +171,7 @@ open: int 80h .... -This convention has a great disadvantage over the UNIX(R) way, at least as far as assembly language programming is concerned: +This convention has a great disadvantage over the UNIX(R) way, at least as far as assembly language programming is concerned: Every time you make a kernel call you must `push` the registers, then `pop` them later. This makes your code bulkier and slower. Nevertheless, FreeBSD gives you a choice. @@ -2789,7 +2789,7 @@ Plus, this value is for the daylight only: Other types of light will require a d ==== The F-Number The f-number is a very useful measure of how much light reaches the film. -A light meter can determine that, for example, to expose a film of specific sensitivity with f5.6 mkay require the exposure to last 1/1000 sec. +A light meter can determine that, for example, to expose a film of specific sensitivity with f/5.6 may require the exposure to last 1/1000 sec. It does not matter whether it is a 35-mm camera, or a 6x9cm camera, etc. As long as we know the f-number, we can determine the proper exposure. diff --git a/documentation/content/en/books/developers-handbook/x86/_index.po b/documentation/content/en/books/developers-handbook/x86/_index.po index 20aa0b82a1..6adffa071b 100644 --- a/documentation/content/en/books/developers-handbook/x86/_index.po +++ b/documentation/content/en/books/developers-handbook/x86/_index.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" -"POT-Creation-Date: 2025-05-01 19:56-0300\n" +"POT-Creation-Date: 2025-11-08 16:17+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -5177,7 +5177,7 @@ msgstr "" msgid "" "The f-number is a very useful measure of how much light reaches the film. A " "light meter can determine that, for example, to expose a film of specific " -"sensitivity with f5.6 mkay require the exposure to last 1/1000 sec." +"sensitivity with f/5.6 may require the exposure to last 1/1000 sec." msgstr "" #. type: Plain text |
