Author: ume
Date: Sun Dec 27 00:37:04 2015
New Revision: 292760
URL: https://svnweb.freebsd.org/changeset/base/292760

Log:
  MFC r292514:
    addrinfo.ai_family is an address family, not a protocol family.
  
  PR:           162434

Modified:
  stable/10/include/netdb.h
  stable/10/lib/libc/net/getaddrinfo.3
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/include/netdb.h
==============================================================================
--- stable/10/include/netdb.h   Sat Dec 26 23:01:34 2015        (r292759)
+++ stable/10/include/netdb.h   Sun Dec 27 00:37:04 2015        (r292760)
@@ -122,7 +122,7 @@ struct protoent {
 
 struct addrinfo {
        int     ai_flags;       /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */
-       int     ai_family;      /* PF_xxx */
+       int     ai_family;      /* AF_xxx */
        int     ai_socktype;    /* SOCK_xxx */
        int     ai_protocol;    /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
        socklen_t ai_addrlen;   /* length of ai_addr */

Modified: stable/10/lib/libc/net/getaddrinfo.3
==============================================================================
--- stable/10/lib/libc/net/getaddrinfo.3        Sat Dec 26 23:01:34 2015        
(r292759)
+++ stable/10/lib/libc/net/getaddrinfo.3        Sun Dec 27 00:37:04 2015        
(r292760)
@@ -18,7 +18,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 19, 2015
+.Dd December 21, 2015
 .Dt GETADDRINFO 3
 .Os
 .Sh NAME
@@ -78,7 +78,7 @@ as defined by
 .Bd -literal
 struct addrinfo {
        int ai_flags;           /* input flags */
-       int ai_family;          /* protocol family for socket */
+       int ai_family;          /* address family for socket */
        int ai_socktype;        /* socket type */
        int ai_protocol;        /* protocol for socket */
        socklen_t ai_addrlen;   /* length of socket-address */
@@ -94,12 +94,12 @@ The caller can supply the following stru
 .Fa hints :
 .Bl -tag -width "ai_socktypeXX"
 .It Fa ai_family
-The protocol family that should be used.
+The address family that should be used.
 When
 .Fa ai_family
 is set to
-.Dv PF_UNSPEC ,
-it means the caller will accept any protocol family supported by the
+.Dv AF_UNSPEC ,
+it means the caller will accept any address family supported by the
 operating system.
 .It Fa ai_socktype
 Denotes the type of socket that is wanted:
@@ -261,7 +261,7 @@ behaves as if the caller provided a
 with
 .Fa ai_family
 set to
-.Dv PF_UNSPEC
+.Dv AF_UNSPEC
 and all other elements set to zero or
 .Dv NULL .
 .Pp
@@ -373,7 +373,7 @@ int s;
 const char *cause = NULL;
 
 memset(&hints, 0, sizeof(hints));
-hints.ai_family = PF_UNSPEC;
+hints.ai_family = AF_UNSPEC;
 hints.ai_socktype = SOCK_STREAM;
 error = getaddrinfo("www.kame.net", "http", &hints, &res0);
 if (error) {
@@ -416,7 +416,7 @@ int nsock;
 const char *cause = NULL;
 
 memset(&hints, 0, sizeof(hints));
-hints.ai_family = PF_UNSPEC;
+hints.ai_family = AF_UNSPEC;
 hints.ai_socktype = SOCK_STREAM;
 hints.ai_flags = AI_PASSIVE;
 error = getaddrinfo(NULL, "http", &hints, &res0);
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to