docs/88507: [PATCH] Update sockets chapter in developers handbook
Ulf Lilleengen
lulf at kerneled.org
Fri Nov 4 23:00:30 UTC 2005
>Number: 88507
>Category: docs
>Synopsis: [PATCH] Update sockets chapter in developers handbook
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-doc
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: doc-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Nov 04 23:00:28 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Ulf Lilleengen
>Release: FreeBSD 6.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD vimes.studby.ntnu.no 6.0-STABLE FreeBSD 6.0-STABLE #2: Fri Nov 4 17:40:15 CET 2005 lulf at vimes.studby.ntnu.no:/usr/obj/usr/src/sys/VIMES i386
>Description:
The chapter explaining about sockets in the developers handbook needs to be updated. The code describing the sockaddr structures as well as the address family list needs to be updated to reflect the include files.
>How-To-Repeat:
>Fix:
--- developers_handbook_socket.diff begins here ---
Index: en_US.ISO8859-1/books/developers-handbook/sockets/chapter.sgml
===================================================================
RCS file: /home/ncvs/doc/en_US.ISO8859-1/books/developers-handbook/sockets/chapter.sgml,v
retrieving revision 1.12
diff -u -r1.12 chapter.sgml
--- en_US.ISO8859-1/books/developers-handbook/sockets/chapter.sgml 22 Jul 2005 08:18:31 -0000 1.12
+++ en_US.ISO8859-1/books/developers-handbook/sockets/chapter.sgml 4 Nov 2005 22:42:43 -0000
@@ -449,7 +449,7 @@
* addresses.
*/
struct sockaddr {
- u_char sa_len; /* total length */
+ unsigned char sa_len; /* total length */
sa_family_t sa_family; /* address family */
char sa_data[14]; /* actually longer; address value */
};
@@ -519,8 +519,12 @@
* in interface output routine
*/
#define AF_NETGRAPH 32 /* Netgraph sockets */
+#define AF_SLOW 33 /* 802.3ad slow protocol */
+#define AF_SCLUSTER 34 /* Sitara cluster protocol */
+#define AF_ARP 35
+#define AF_BLUETOOTH 36 /* Bluetooth sockets */
+#define AF_MAX 37
-#define AF_MAX 33
</programlisting>
<para>The one used for <acronym>IP</acronym> is
@@ -544,9 +548,9 @@
* Socket address, internet style.
*/
struct sockaddr_in {
- u_char sin_len;
- u_char sin_family;
- u_short sin_port;
+ uint8_t sin_len;
+ sa_family_t sin_family;
+ in_port_t sin_port;
struct in_addr sin_addr;
char sin_zero[8];
};
--- developers_handbook_socket.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-doc
mailing list