netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* IP_MULTICAST_IF getsockopt man part
@ 2012-05-04  9:00 Jiri Pirko
  2012-05-05 11:57 ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 4+ messages in thread
From: Jiri Pirko @ 2012-05-04  9:00 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA

Hi.

<quote>
IP_MULTICAST_IF (since Linux 1.2)
	              Set the local device for a multicast socket.
		      Argument is an ip_mreqn or ip_mreq structure
		      similar to IP_ADD_MEMBERSHIP.
</quote>

That is not true. Setsockopt recognizes only ip_mreqn and in_addr. I
made patch which makes it recognize ip_mreq as well. So that would be
probably ok.
http://patchwork.ozlabs.org/patch/156815/

On the other hand, getsockopt works only with in_addr. That I think is
good behaviour but manpages here needs to be corrected in this way (read
part needs to be added here)

Thanks!

Jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: IP_MULTICAST_IF getsockopt man part
  2012-05-04  9:00 IP_MULTICAST_IF getsockopt man part Jiri Pirko
@ 2012-05-05 11:57 ` Michael Kerrisk (man-pages)
       [not found]   ` <CAKgNAkgBz_dRV97JVV1Np0YuEd0EVqoLPZkajiE_KJ2Lk20YRA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Kerrisk (man-pages) @ 2012-05-05 11:57 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: linux-man, netdev

On Fri, May 4, 2012 at 9:00 PM, Jiri Pirko <jpirko@redhat.com> wrote:
> Hi.
>
> <quote>
> IP_MULTICAST_IF (since Linux 1.2)
>                      Set the local device for a multicast socket.
>                      Argument is an ip_mreqn or ip_mreq structure
>                      similar to IP_ADD_MEMBERSHIP.
> </quote>
>
> That is not true. Setsockopt recognizes only ip_mreqn and in_addr. I
> made patch which makes it recognize ip_mreq as well. So that would be
> probably ok.
> http://patchwork.ozlabs.org/patch/156815/
>
> On the other hand, getsockopt works only with in_addr. That I think is
> good behaviour but manpages here needs to be corrected in this way (read
> part needs to be added here)

Jirka,

I'm having trouble to understand what you mean. Perhaps it would be
simplest if you showed your proposed replacement text for the text
quoted above.

Thanks,

Michael



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: IP_MULTICAST_IF getsockopt man part
       [not found]   ` <CAKgNAkgBz_dRV97JVV1Np0YuEd0EVqoLPZkajiE_KJ2Lk20YRA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-05-09  9:34     ` Jiri Pirko
       [not found]       ` <20120509093428.GB1696-RDzucLLXGGI+74MbWcDs8hcY2uh10dtjAL8bYrjMMd8@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Jiri Pirko @ 2012-05-09  9:34 UTC (permalink / raw)
  To: Michael Kerrisk (man-pages)
  Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA

Sat, May 05, 2012 at 01:57:35PM CEST, mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
>On Fri, May 4, 2012 at 9:00 PM, Jiri Pirko <jpirko-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
>> Hi.
>>
>> <quote>
>> IP_MULTICAST_IF (since Linux 1.2)
>>                      Set the local device for a multicast socket.
>>                      Argument is an ip_mreqn or ip_mreq structure
>>                      similar to IP_ADD_MEMBERSHIP.
>> </quote>
>>
>> That is not true. Setsockopt recognizes only ip_mreqn and in_addr. I
>> made patch which makes it recognize ip_mreq as well. So that would be
>> probably ok.
>> http://patchwork.ozlabs.org/patch/156815/
>>
>> On the other hand, getsockopt works only with in_addr. That I think is
>> good behaviour but manpages here needs to be corrected in this way (read
>> part needs to be added here)
>
>Jirka,
>
>I'm having trouble to understand what you mean. Perhaps it would be
>simplest if you showed your proposed replacement text for the text
>quoted above.

<orig>
IP_MULTICAST_IF (since Linux 1.2)
Set the local device for a multicast socket. Argument is an ip_mreqn
or ip_mreq structure similar to IP_ADD_MEMBERSHIP.
</orig>
<new>
IP_MULTICAST_IF (since Linux 1.2)
Set or read the local device for a multicast socket.
Argument for set is an ip_mreqn or ip_mreq or addr_in structure.
Argument for read is an addr_in structure.
</new>


Jirka



>
>Thanks,
>
>Michael
>
>
>
>-- 
>Michael Kerrisk
>Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
>Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: IP_MULTICAST_IF getsockopt man part
       [not found]       ` <20120509093428.GB1696-RDzucLLXGGI+74MbWcDs8hcY2uh10dtjAL8bYrjMMd8@public.gmane.org>
@ 2015-05-06 10:35         ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Kerrisk (man-pages) @ 2015-05-06 10:35 UTC (permalink / raw)
  To: Jiri Pirko
  Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
	linux-man-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
	Magnus REFTEL

[CC += Magnus, who made a related reported soon after yours.]

Jiri,

On 05/09/2012 11:34 AM, Jiri Pirko wrote:
> Sat, May 05, 2012 at 01:57:35PM CEST, mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
>> On Fri, May 4, 2012 at 9:00 PM, Jiri Pirko <jpirko-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
>>> Hi.
>>>
>>> <quote>
>>> IP_MULTICAST_IF (since Linux 1.2)
>>>                      Set the local device for a multicast socket.
>>>                      Argument is an ip_mreqn or ip_mreq structure
>>>                      similar to IP_ADD_MEMBERSHIP.
>>> </quote>
>>>
>>> That is not true. Setsockopt recognizes only ip_mreqn and in_addr. I
>>> made patch which makes it recognize ip_mreq as well. So that would be
>>> probably ok.
>>> http://patchwork.ozlabs.org/patch/156815/
>>>
>>> On the other hand, getsockopt works only with in_addr. That I think is
>>> good behaviour but manpages here needs to be corrected in this way (read
>>> part needs to be added here)
>>
>> Jirka,
>>
>> I'm having trouble to understand what you mean. Perhaps it would be
>> simplest if you showed your proposed replacement text for the text
>> quoted above.
> 
> <orig>
> IP_MULTICAST_IF (since Linux 1.2)
> Set the local device for a multicast socket. Argument is an ip_mreqn
> or ip_mreq structure similar to IP_ADD_MEMBERSHIP.
> </orig>
> <new>
> IP_MULTICAST_IF (since Linux 1.2)
> Set or read the local device for a multicast socket.
> Argument for set is an ip_mreqn or ip_mreq or addr_in structure.
> Argument for read is an addr_in structure.
> </new>

Long after the fact: I've amended the man page text to read:

       IP_MULTICAST_IF (since Linux 1.2)
              Set  the local device for a multicast socket.  The argu‐
              ment for setsockopt(2) is an ip_mreqn  or  (since  Linux
              3.5)  ip_mreq structure similar to IP_ADD_MEMBERSHIP, or
              an in_addr  structure.   (The  kernel  determines  which
              structure  is  being  passed based on the size passed in
              optlen.)  For getsockopt(2), the argument is an  in_addr
              structure.

Cheers,

Michael


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-06 10:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-04  9:00 IP_MULTICAST_IF getsockopt man part Jiri Pirko
2012-05-05 11:57 ` Michael Kerrisk (man-pages)
     [not found]   ` <CAKgNAkgBz_dRV97JVV1Np0YuEd0EVqoLPZkajiE_KJ2Lk20YRA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-05-09  9:34     ` Jiri Pirko
     [not found]       ` <20120509093428.GB1696-RDzucLLXGGI+74MbWcDs8hcY2uh10dtjAL8bYrjMMd8@public.gmane.org>
2015-05-06 10:35         ` Michael Kerrisk (man-pages)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).