Re: [CFR] correct type of addrinfo.ai_addrlen and netent.n_net

From: Dag-Erling Smørgrav (des_at_des.no)
Date: 05/31/05

  • Next message: Warner Losh: "Re: [CFR] correct type of addrinfo.ai_addrlen and netent.n_net"
    Date: Tue, 31 May 2005 21:09:01 +0200
    To: Warner Losh <imp@bsdimp.com>
    
    

    Warner Losh <imp@bsdimp.com> writes:
    > Dag-Erling Smørgrav <des@des.no> writes:
    > > What do we gain from removing the padding? Is there even a single
    > > practical benefit to doing so?
    > It is for posix compatibility.

    Nonsense. POSIX does not forbid padding or additional structure
    members. The exact wording is:

    > The <netdb.h> header shall define the addrinfo structure that includes
    > at least the following members:
      --------
    >
    > int ai_flags Input flags.
    > int ai_family Address family of socket.
    > int ai_socktype Socket type.
    > int ai_protocol Protocol of socket.
    > socklen_t ai_addrlen Length of socket address.
    > struct sockaddr *ai_addr Socket address of socket.
    > char *ai_canonname Canonical name of service location.
    > struct addrinfo *ai_next Pointer to next in list.

    DES

    -- 
    Dag-Erling Smørgrav - des@des.no
    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
    

  • Next message: Warner Losh: "Re: [CFR] correct type of addrinfo.ai_addrlen and netent.n_net"

    Relevant Pages