Re: ip6(4) manpage update
On Sun, Jun 17, 2012 at 01:09:49PM +0200, Peter J. Philipp wrote: attempt two.. process was the wrong word, I substituted it with socket. -peter Index: ip6.4 === RCS file: /cvs/src/share/man/man4/ip6.4,v retrieving revision 1.25 diff -u -r1.25 ip6.4 --- ip6.4 8 Sep 2011 16:43:56 - 1.25 +++ ip6.4 17 Jun 2012 10:45:19 - @@ -237,7 +237,7 @@ .It Dv IPV6_PORTRANGE_LOW Use a low, reserved range (600\-1023). .El -.It Dv IPV6_PKTINFO Fa int * +.It Dv IPV6_RECVPKTINFO Fa int * Get or set whether additional information about subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 @@ -250,14 +250,19 @@ unsigned intipi6_ifindex; /* send/recv if index */ }; .Ed -.It Dv IPV6_HOPLIMIT Fa int * + the blank line above should be a .Pp. also this diff adds trailing whitespace at eol in a few places. please remove it. except for that, i'm fine with this diff, if some developer wants to take it. jmc +Turning this option on will result in this socket getting cmsg data of +type IPV6_PKTINFO. +.It Dv IPV6_RECVHOPLIMIT Fa int * Get or set whether the hop limit header field from subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 -calls. +calls. The value is stored as an .Vt int in the ancillary data returned. +Turning this option on will result in this socket getting cmsg data of +type IPV6_HOPLIMIT. .\ .It Dv IPV6_NEXTHOP Fa int * .\ Get or set whether the address of the next hop for subsequent .\ packets will be provided as ancillary data along with the payload in @@ -269,7 +274,7 @@ .\ structure in the ancillary data returned. .\ .Pp .\ This option requires superuser privileges. -.It Dv IPV6_HOPOPTS Fa int * +.It Dv IPV6_RECVHOPOPTS Fa int * Get or set whether the hop-by-hop options from subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 @@ -288,8 +293,10 @@ .Fn inet6_option_space routine and family of routines may be used to manipulate this data. .Pp -This option requires superuser privileges. -.It Dv IPV6_DSTOPTS Fa int * +This option requires superuser privileges. +Turning this option on will result in this socket getting cmsg data of +type IPV6_HOPOPTS. +.It Dv IPV6_RECVDSTOPTS Fa int * Get or set whether the destination options from subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 @@ -309,6 +316,8 @@ routine and family of routines may be used to manipulate this data. .Pp This option requires superuser privileges. +Turning this option on will result in this socket getting cmsg data of +type IPV6_DSTOPTS. .It Dv IPV6_TCLASS Fa int * Get or set the value of the traffic class field used for outgoing datagrams on this socket. @@ -321,7 +330,7 @@ calls. The header field is stored as a single value of type .Vt int . -.It Dv IPV6_RTHDR Fa int * +.It Dv IPV6_RECVRTHDR Fa int * Get or set whether the routing header from subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 @@ -343,6 +352,8 @@ routine and family of routines may be used to manipulate this data. .Pp This option requires superuser privileges. +Turning this option on will result in this socket getting cmsg data of +type IPV6_RTHDR. .It Dv IPV6_PKTOPTIONS Fa struct cmsghdr * Get or set all header options and extension headers at one time on the last packet sent or received on the socket. @@ -413,11 +424,11 @@ .El .Pp The -.Dv IPV6_PKTINFO , -.\ .Dv IPV6_NEXTHOP , -.Dv IPV6_HOPLIMIT , -.Dv IPV6_HOPOPTS , -.Dv IPV6_DSTOPTS , +.Dv IPV6_RECVPKTINFO , +.\ .Dv IPV6_RECVNEXTHOP , +.Dv IPV6_RECVHOPLIMIT , +.Dv IPV6_RECVHOPOPTS , +.Dv IPV6_RECVDSTOPTS , and .Dv IPV6_RTHDR options will return ancillary data along with payload contents in subsequent @@ -429,7 +440,7 @@ and .Va cmsg_type set to respective option name value (e.g., -.Dv IPV6_HOPTLIMIT ) . +.Dv IPV6_HOPLIMIT ) . These options may also be used directly as ancillary .Va cmsg_type values in @@ -455,7 +466,7 @@ can be set by the .Dv IPV6_MULTICAST_IF socket option, through the -.Dv IPV6_PKTINFO +.Dv IPV6_RECVPKTINFO option, and through the .Va sin6_scope_id field of the socket address passed to the @@ -590,7 +601,7 @@ * returned along with the payload. */ optval = 1; -if (setsockopt(s, IPPROTO_IPV6, IPV6_HOPLIMIT, optval, +if (setsockopt(s, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, optval, sizeof(optval)) == -1) err(1, setsockopt); @@ -685,6 +696,15 @@ .%A B. Fenner .%A A. Rudoff .%T UNIX Network Programming, third edition +.Re +.Rs +.%A W. Stevens +.%A M. Thomas +.%A E. Nordmark +.%A T. Jinmei +.%T Advanced Sockets Application Program
Re: ip6(4) manpage update
On Mon, Jun 18, 2012 at 08:06:06AM +0100, Jason McIntyre wrote: the blank line above should be a .Pp. also this diff adds trailing whitespace at eol in a few places. please remove it. except for that, i'm fine with this diff, if some developer wants to take it. jmc Awesome! Well here is my attempt three then. Index: ip6.4 === RCS file: /cvs/src/share/man/man4/ip6.4,v retrieving revision 1.25 diff -u -r1.25 ip6.4 --- ip6.4 8 Sep 2011 16:43:56 - 1.25 +++ ip6.4 18 Jun 2012 08:06:35 - @@ -237,7 +237,7 @@ .It Dv IPV6_PORTRANGE_LOW Use a low, reserved range (600\-1023). .El -.It Dv IPV6_PKTINFO Fa int * +.It Dv IPV6_RECVPKTINFO Fa int * Get or set whether additional information about subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 @@ -250,7 +250,10 @@ unsigned intipi6_ifindex; /* send/recv if index */ }; .Ed -.It Dv IPV6_HOPLIMIT Fa int * +.Pp +Turning this option on will result in this socket getting cmsg data of +type IPV6_PKTINFO. +.It Dv IPV6_RECVHOPLIMIT Fa int * Get or set whether the hop limit header field from subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 @@ -258,6 +261,8 @@ The value is stored as an .Vt int in the ancillary data returned. +Turning this option on will result in this socket getting cmsg data of +type IPV6_HOPLIMIT. .\ .It Dv IPV6_NEXTHOP Fa int * .\ Get or set whether the address of the next hop for subsequent .\ packets will be provided as ancillary data along with the payload in @@ -269,7 +274,7 @@ .\ structure in the ancillary data returned. .\ .Pp .\ This option requires superuser privileges. -.It Dv IPV6_HOPOPTS Fa int * +.It Dv IPV6_RECVHOPOPTS Fa int * Get or set whether the hop-by-hop options from subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 @@ -289,7 +294,9 @@ routine and family of routines may be used to manipulate this data. .Pp This option requires superuser privileges. -.It Dv IPV6_DSTOPTS Fa int * +Turning this option on will result in this socket getting cmsg data of +type IPV6_HOPOPTS. +.It Dv IPV6_RECVDSTOPTS Fa int * Get or set whether the destination options from subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 @@ -309,6 +316,8 @@ routine and family of routines may be used to manipulate this data. .Pp This option requires superuser privileges. +Turning this option on will result in this socket getting cmsg data of +type IPV6_DSTOPTS. .It Dv IPV6_TCLASS Fa int * Get or set the value of the traffic class field used for outgoing datagrams on this socket. @@ -321,7 +330,7 @@ calls. The header field is stored as a single value of type .Vt int . -.It Dv IPV6_RTHDR Fa int * +.It Dv IPV6_RECVRTHDR Fa int * Get or set whether the routing header from subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 @@ -343,6 +352,8 @@ routine and family of routines may be used to manipulate this data. .Pp This option requires superuser privileges. +Turning this option on will result in this socket getting cmsg data of +type IPV6_RTHDR. .It Dv IPV6_PKTOPTIONS Fa struct cmsghdr * Get or set all header options and extension headers at one time on the last packet sent or received on the socket. @@ -413,11 +424,11 @@ .El .Pp The -.Dv IPV6_PKTINFO , -.\ .Dv IPV6_NEXTHOP , -.Dv IPV6_HOPLIMIT , -.Dv IPV6_HOPOPTS , -.Dv IPV6_DSTOPTS , +.Dv IPV6_RECVPKTINFO , +.\ .Dv IPV6_RECVNEXTHOP , +.Dv IPV6_RECVHOPLIMIT , +.Dv IPV6_RECVHOPOPTS , +.Dv IPV6_RECVDSTOPTS , and .Dv IPV6_RTHDR options will return ancillary data along with payload contents in subsequent @@ -429,7 +440,7 @@ and .Va cmsg_type set to respective option name value (e.g., -.Dv IPV6_HOPTLIMIT ) . +.Dv IPV6_HOPLIMIT ) . These options may also be used directly as ancillary .Va cmsg_type values in @@ -455,7 +466,7 @@ can be set by the .Dv IPV6_MULTICAST_IF socket option, through the -.Dv IPV6_PKTINFO +.Dv IPV6_RECVPKTINFO option, and through the .Va sin6_scope_id field of the socket address passed to the @@ -590,7 +601,7 @@ * returned along with the payload. */ optval = 1; -if (setsockopt(s, IPPROTO_IPV6, IPV6_HOPLIMIT, optval, +if (setsockopt(s, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, optval, sizeof(optval)) == -1) err(1, setsockopt); @@ -685,6 +696,15 @@ .%A B. Fenner .%A A. Rudoff .%T UNIX Network Programming, third edition +.Re +.Rs +.%A W. Stevens +.%A M. Thomas +.%A E. Nordmark +.%A T. Jinmei +.%T Advanced Sockets Application Program Interface (API) for IPv6 +.%R RFC 3542 +.%D May 2003 .Re .Sh STANDARDS Most of the socket options are defined in RFC 2292 or RFC 2553.
Re: ip6(4) manpage update
On Mon, Jun 18, 2012 at 10:09:40AM +0200, Peter J. Philipp wrote: On Mon, Jun 18, 2012 at 08:06:06AM +0100, Jason McIntyre wrote: the blank line above should be a .Pp. also this diff adds trailing whitespace at eol in a few places. please remove it. except for that, i'm fine with this diff, if some developer wants to take it. jmc Awesome! Well here is my attempt three then. looks fine to me now. jmc Index: ip6.4 === RCS file: /cvs/src/share/man/man4/ip6.4,v retrieving revision 1.25 diff -u -r1.25 ip6.4 --- ip6.4 8 Sep 2011 16:43:56 - 1.25 +++ ip6.4 18 Jun 2012 08:06:35 - @@ -237,7 +237,7 @@ .It Dv IPV6_PORTRANGE_LOW Use a low, reserved range (600\-1023). .El -.It Dv IPV6_PKTINFO Fa int * +.It Dv IPV6_RECVPKTINFO Fa int * Get or set whether additional information about subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 @@ -250,7 +250,10 @@ unsigned intipi6_ifindex; /* send/recv if index */ }; .Ed -.It Dv IPV6_HOPLIMIT Fa int * +.Pp +Turning this option on will result in this socket getting cmsg data of +type IPV6_PKTINFO. +.It Dv IPV6_RECVHOPLIMIT Fa int * Get or set whether the hop limit header field from subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 @@ -258,6 +261,8 @@ The value is stored as an .Vt int in the ancillary data returned. +Turning this option on will result in this socket getting cmsg data of +type IPV6_HOPLIMIT. .\ .It Dv IPV6_NEXTHOP Fa int * .\ Get or set whether the address of the next hop for subsequent .\ packets will be provided as ancillary data along with the payload in @@ -269,7 +274,7 @@ .\ structure in the ancillary data returned. .\ .Pp .\ This option requires superuser privileges. -.It Dv IPV6_HOPOPTS Fa int * +.It Dv IPV6_RECVHOPOPTS Fa int * Get or set whether the hop-by-hop options from subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 @@ -289,7 +294,9 @@ routine and family of routines may be used to manipulate this data. .Pp This option requires superuser privileges. -.It Dv IPV6_DSTOPTS Fa int * +Turning this option on will result in this socket getting cmsg data of +type IPV6_HOPOPTS. +.It Dv IPV6_RECVDSTOPTS Fa int * Get or set whether the destination options from subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 @@ -309,6 +316,8 @@ routine and family of routines may be used to manipulate this data. .Pp This option requires superuser privileges. +Turning this option on will result in this socket getting cmsg data of +type IPV6_DSTOPTS. .It Dv IPV6_TCLASS Fa int * Get or set the value of the traffic class field used for outgoing datagrams on this socket. @@ -321,7 +330,7 @@ calls. The header field is stored as a single value of type .Vt int . -.It Dv IPV6_RTHDR Fa int * +.It Dv IPV6_RECVRTHDR Fa int * Get or set whether the routing header from subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 @@ -343,6 +352,8 @@ routine and family of routines may be used to manipulate this data. .Pp This option requires superuser privileges. +Turning this option on will result in this socket getting cmsg data of +type IPV6_RTHDR. .It Dv IPV6_PKTOPTIONS Fa struct cmsghdr * Get or set all header options and extension headers at one time on the last packet sent or received on the socket. @@ -413,11 +424,11 @@ .El .Pp The -.Dv IPV6_PKTINFO , -.\ .Dv IPV6_NEXTHOP , -.Dv IPV6_HOPLIMIT , -.Dv IPV6_HOPOPTS , -.Dv IPV6_DSTOPTS , +.Dv IPV6_RECVPKTINFO , +.\ .Dv IPV6_RECVNEXTHOP , +.Dv IPV6_RECVHOPLIMIT , +.Dv IPV6_RECVHOPOPTS , +.Dv IPV6_RECVDSTOPTS , and .Dv IPV6_RTHDR options will return ancillary data along with payload contents in subsequent @@ -429,7 +440,7 @@ and .Va cmsg_type set to respective option name value (e.g., -.Dv IPV6_HOPTLIMIT ) . +.Dv IPV6_HOPLIMIT ) . These options may also be used directly as ancillary .Va cmsg_type values in @@ -455,7 +466,7 @@ can be set by the .Dv IPV6_MULTICAST_IF socket option, through the -.Dv IPV6_PKTINFO +.Dv IPV6_RECVPKTINFO option, and through the .Va sin6_scope_id field of the socket address passed to the @@ -590,7 +601,7 @@ * returned along with the payload. */ optval = 1; -if (setsockopt(s, IPPROTO_IPV6, IPV6_HOPLIMIT, optval, +if (setsockopt(s, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, optval, sizeof(optval)) == -1) err(1, setsockopt); @@ -685,6 +696,15 @@ .%A B. Fenner .%A A. Rudoff .%T UNIX Network Programming, third edition +.Re +.Rs +.%A W. Stevens +.%A M. Thomas +.%A E. Nordmark +.%A T. Jinmei +.%T Advanced Sockets Application
Re: ip6(4) manpage update
On Sat, Jun 16, 2012 at 07:17:16PM -0700, Philip Guenther wrote: You can expect the same issue with IPV6_PKTINFO, IPV6_HOPOPTS, IPV6_DSTOPTS, and IPV6_RTHDR. The RECV part was added to them in RFC3542. Yep. In addition, the text should be clarified to indicate that turning on IPV6_RECV* will result in the process getting cmsg data of type IPV6_*. E.g., IPV6_RECVHOPLIMIT turns on receiving of IPV6_HOPLIMIT cmsg data. Peter, do you want to take a stab at that part too? (There's also a typo in the current page: s/HOPTLIMIT/HOPLIMIT/) Philip Guenther Sure I'll take a stab at it but its very difficult I found (I was also distracted by freeing a bird from the attic). Here goes: -peter Index: ip6.4 === RCS file: /cvs/src/share/man/man4/ip6.4,v retrieving revision 1.25 diff -u -r1.25 ip6.4 --- ip6.4 8 Sep 2011 16:43:56 - 1.25 +++ ip6.4 17 Jun 2012 10:45:19 - @@ -237,7 +237,7 @@ .It Dv IPV6_PORTRANGE_LOW Use a low, reserved range (600\-1023). .El -.It Dv IPV6_PKTINFO Fa int * +.It Dv IPV6_RECVPKTINFO Fa int * Get or set whether additional information about subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 @@ -250,14 +250,19 @@ unsigned intipi6_ifindex; /* send/recv if index */ }; .Ed -.It Dv IPV6_HOPLIMIT Fa int * + +Turning this option on will result in this process getting cmsg data of +type IPV6_PKTINFO. +.It Dv IPV6_RECVHOPLIMIT Fa int * Get or set whether the hop limit header field from subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 -calls. +calls. The value is stored as an .Vt int in the ancillary data returned. +Turning this option on will result in this process getting cmsg data of +type IPV6_HOPLIMIT. .\ .It Dv IPV6_NEXTHOP Fa int * .\ Get or set whether the address of the next hop for subsequent .\ packets will be provided as ancillary data along with the payload in @@ -269,7 +274,7 @@ .\ structure in the ancillary data returned. .\ .Pp .\ This option requires superuser privileges. -.It Dv IPV6_HOPOPTS Fa int * +.It Dv IPV6_RECVHOPOPTS Fa int * Get or set whether the hop-by-hop options from subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 @@ -288,8 +293,10 @@ .Fn inet6_option_space routine and family of routines may be used to manipulate this data. .Pp -This option requires superuser privileges. -.It Dv IPV6_DSTOPTS Fa int * +This option requires superuser privileges. +Turning this option on will result in this process getting cmsg data of +type IPV6_HOPOPTS. +.It Dv IPV6_RECVDSTOPTS Fa int * Get or set whether the destination options from subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 @@ -309,6 +316,8 @@ routine and family of routines may be used to manipulate this data. .Pp This option requires superuser privileges. +Turning this option on will result in this process getting cmsg data of +type IPV6_DSTOPTS. .It Dv IPV6_TCLASS Fa int * Get or set the value of the traffic class field used for outgoing datagrams on this socket. @@ -321,7 +330,7 @@ calls. The header field is stored as a single value of type .Vt int . -.It Dv IPV6_RTHDR Fa int * +.It Dv IPV6_RECVRTHDR Fa int * Get or set whether the routing header from subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 @@ -343,6 +352,8 @@ routine and family of routines may be used to manipulate this data. .Pp This option requires superuser privileges. +Turning this option on will result in this process getting cmsg data of +type IPV6_RTHDR. .It Dv IPV6_PKTOPTIONS Fa struct cmsghdr * Get or set all header options and extension headers at one time on the last packet sent or received on the socket. @@ -413,11 +424,11 @@ .El .Pp The -.Dv IPV6_PKTINFO , -.\ .Dv IPV6_NEXTHOP , -.Dv IPV6_HOPLIMIT , -.Dv IPV6_HOPOPTS , -.Dv IPV6_DSTOPTS , +.Dv IPV6_RECVPKTINFO , +.\ .Dv IPV6_RECVNEXTHOP , +.Dv IPV6_RECVHOPLIMIT , +.Dv IPV6_RECVHOPOPTS , +.Dv IPV6_RECVDSTOPTS , and .Dv IPV6_RTHDR options will return ancillary data along with payload contents in subsequent @@ -429,7 +440,7 @@ and .Va cmsg_type set to respective option name value (e.g., -.Dv IPV6_HOPTLIMIT ) . +.Dv IPV6_HOPLIMIT ) . These options may also be used directly as ancillary .Va cmsg_type values in @@ -455,7 +466,7 @@ can be set by the .Dv IPV6_MULTICAST_IF socket option, through the -.Dv IPV6_PKTINFO +.Dv IPV6_RECVPKTINFO option, and through the .Va sin6_scope_id field of the socket address passed to the @@ -590,7 +601,7 @@ * returned along with the payload. */ optval = 1; -if (setsockopt(s, IPPROTO_IPV6, IPV6_HOPLIMIT, optval, +if (setsockopt(s, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, optval, sizeof(optval)) == -1) err(1,
Re: ip6(4) manpage update
On Sun, Jun 17, 2012 at 12:49:08PM +0200, Peter J. Philipp wrote: On Sat, Jun 16, 2012 at 07:17:16PM -0700, Philip Guenther wrote: You can expect the same issue with IPV6_PKTINFO, IPV6_HOPOPTS, IPV6_DSTOPTS, and IPV6_RTHDR. The RECV part was added to them in RFC3542. Yep. In addition, the text should be clarified to indicate that turning on IPV6_RECV* will result in the process getting cmsg data of type IPV6_*. E.g., IPV6_RECVHOPLIMIT turns on receiving of IPV6_HOPLIMIT cmsg data. Peter, do you want to take a stab at that part too? (There's also a typo in the current page: s/HOPTLIMIT/HOPLIMIT/) Philip Guenther Sure I'll take a stab at it but its very difficult I found (I was also distracted by freeing a bird from the attic). Here goes: attempt two.. process was the wrong word, I substituted it with socket. -peter Index: ip6.4 === RCS file: /cvs/src/share/man/man4/ip6.4,v retrieving revision 1.25 diff -u -r1.25 ip6.4 --- ip6.4 8 Sep 2011 16:43:56 - 1.25 +++ ip6.4 17 Jun 2012 10:45:19 - @@ -237,7 +237,7 @@ .It Dv IPV6_PORTRANGE_LOW Use a low, reserved range (600\-1023). .El -.It Dv IPV6_PKTINFO Fa int * +.It Dv IPV6_RECVPKTINFO Fa int * Get or set whether additional information about subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 @@ -250,14 +250,19 @@ unsigned intipi6_ifindex; /* send/recv if index */ }; .Ed -.It Dv IPV6_HOPLIMIT Fa int * + +Turning this option on will result in this socket getting cmsg data of +type IPV6_PKTINFO. +.It Dv IPV6_RECVHOPLIMIT Fa int * Get or set whether the hop limit header field from subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 -calls. +calls. The value is stored as an .Vt int in the ancillary data returned. +Turning this option on will result in this socket getting cmsg data of +type IPV6_HOPLIMIT. .\ .It Dv IPV6_NEXTHOP Fa int * .\ Get or set whether the address of the next hop for subsequent .\ packets will be provided as ancillary data along with the payload in @@ -269,7 +274,7 @@ .\ structure in the ancillary data returned. .\ .Pp .\ This option requires superuser privileges. -.It Dv IPV6_HOPOPTS Fa int * +.It Dv IPV6_RECVHOPOPTS Fa int * Get or set whether the hop-by-hop options from subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 @@ -288,8 +293,10 @@ .Fn inet6_option_space routine and family of routines may be used to manipulate this data. .Pp -This option requires superuser privileges. -.It Dv IPV6_DSTOPTS Fa int * +This option requires superuser privileges. +Turning this option on will result in this socket getting cmsg data of +type IPV6_HOPOPTS. +.It Dv IPV6_RECVDSTOPTS Fa int * Get or set whether the destination options from subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 @@ -309,6 +316,8 @@ routine and family of routines may be used to manipulate this data. .Pp This option requires superuser privileges. +Turning this option on will result in this socket getting cmsg data of +type IPV6_DSTOPTS. .It Dv IPV6_TCLASS Fa int * Get or set the value of the traffic class field used for outgoing datagrams on this socket. @@ -321,7 +330,7 @@ calls. The header field is stored as a single value of type .Vt int . -.It Dv IPV6_RTHDR Fa int * +.It Dv IPV6_RECVRTHDR Fa int * Get or set whether the routing header from subsequent packets will be provided as ancillary data along with the payload in subsequent .Xr recvmsg 2 @@ -343,6 +352,8 @@ routine and family of routines may be used to manipulate this data. .Pp This option requires superuser privileges. +Turning this option on will result in this socket getting cmsg data of +type IPV6_RTHDR. .It Dv IPV6_PKTOPTIONS Fa struct cmsghdr * Get or set all header options and extension headers at one time on the last packet sent or received on the socket. @@ -413,11 +424,11 @@ .El .Pp The -.Dv IPV6_PKTINFO , -.\ .Dv IPV6_NEXTHOP , -.Dv IPV6_HOPLIMIT , -.Dv IPV6_HOPOPTS , -.Dv IPV6_DSTOPTS , +.Dv IPV6_RECVPKTINFO , +.\ .Dv IPV6_RECVNEXTHOP , +.Dv IPV6_RECVHOPLIMIT , +.Dv IPV6_RECVHOPOPTS , +.Dv IPV6_RECVDSTOPTS , and .Dv IPV6_RTHDR options will return ancillary data along with payload contents in subsequent @@ -429,7 +440,7 @@ and .Va cmsg_type set to respective option name value (e.g., -.Dv IPV6_HOPTLIMIT ) . +.Dv IPV6_HOPLIMIT ) . These options may also be used directly as ancillary .Va cmsg_type values in @@ -455,7 +466,7 @@ can be set by the .Dv IPV6_MULTICAST_IF socket option, through the -.Dv IPV6_PKTINFO +.Dv IPV6_RECVPKTINFO option, and through the .Va sin6_scope_id field of the socket address passed to the @@ -590,7 +601,7 @@ * returned along with the payload. */ optval = 1; -if
Re: ip6(4) manpage update
On Mon, Jun 11, 2012 at 12:53 PM, Simon Perreault simon.perrea...@viagenie.ca wrote: On 2012-06-11 15:31, Peter J. Philipp wrote: I just got through a thread in misc@, http://marc.info/?l=openbsd-miscm=133934252713974w=2 and it seems like the sample code in ip6(4) is wrong. I've made adjustments but it doesn't look as nice anymore, perhaps someone can look over it? These changes will really help someone first time trying the sample code, I think. Credit should be given to Simon Perreault, I just did what he suggested. You can expect the same issue with IPV6_PKTINFO, IPV6_HOPOPTS, IPV6_DSTOPTS, and IPV6_RTHDR. The RECV part was added to them in RFC3542. Yep. In addition, the text should be clarified to indicate that turning on IPV6_RECV* will result in the process getting cmsg data of type IPV6_*. E.g., IPV6_RECVHOPLIMIT turns on receiving of IPV6_HOPLIMIT cmsg data. Peter, do you want to take a stab at that part too? (There's also a typo in the current page: s/HOPTLIMIT/HOPLIMIT/) Philip Guenther
Re: ip6(4) manpage update
On 2012-06-11 15:31, Peter J. Philipp wrote: I just got through a thread in misc@, http://marc.info/?l=openbsd-miscm=133934252713974w=2 and it seems like the sample code in ip6(4) is wrong. I've made adjustments but it doesn't look as nice anymore, perhaps someone can look over it? These changes will really help someone first time trying the sample code, I think. Credit should be given to Simon Perreault, I just did what he suggested. You can expect the same issue with IPV6_PKTINFO, IPV6_HOPOPTS, IPV6_DSTOPTS, and IPV6_RTHDR. The RECV part was added to them in RFC3542. Simon -- DTN made easy, lean, and smart -- http://postellation.viagenie.ca NAT64/DNS64 open-source-- http://ecdysis.viagenie.ca STUN/TURN server -- http://numb.viagenie.ca