All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] packet.7: Fix description of binding a packet socket to an interface
       [not found] ` <CAMXzGWJodsZjNnYj-MaeEDuaPE=t4ig=3vk=WiArJ3aMtATNsw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-05-10 11:10   ` Michael Kerrisk (man-pages)
       [not found]     ` <554F3CBC.90503-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2015-05-10 11:10 UTC (permalink / raw)
  To: 文剑
  Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
	linux-man-u79uwXL29TY76Z2rM5mHXA, Cortland Setlow

Hello 文剑,

On 08/11/2011 06:04 PM, 文剑 wrote:
> As mentioned in packet(7), "Only  the  sll_protocol  and  the  sll_ifindex
> address fields are used for purposes of binding."
> But in my test, sll_family is also used for binding a packet socket to an
> interface.

I'm catching up with some very old mail.

I've applied your patch (for a problem that Cortland also reported).
Thank you for sending it, and sorry that it sat on the floor for so
long.

Cheers,

Michael


> My enviroment:  2.6.38-10-generic Ubuntu-11.04 i686
> 
> Against man-pages 3.33.
> 
> Signed-off-by: Jian Wen
> 
> ---
>  man7/packet.7 |   18 ++++++++----------
>  1 files changed, 8 insertions(+), 10 deletions(-)
> 
> diff --git a/man7/packet.7 b/man7/packet.7
> index 5e35ae2..3de2550 100644
> --- a/man7/packet.7
> +++ b/man7/packet.7
> @@ -84,11 +84,14 @@ To only get packets from a specific interface use
>  specifying an address in a
>  .I struct sockaddr_ll
>  to bind the packet socket to an interface.
> -Only the
> -.I sll_protocol
> -and the
> -.I sll_ifindex
> -address fields are used for purposes of binding.
> +Fields used for binding are
> +.IR sll_family (should
> +be
> +.BR AF_PACKET ),
> +.IR sll_protocol ,
> +and
> +.IR sll_ifindex .
> +
> 
>  The
>  .BR connect (2)
> @@ -166,11 +169,6 @@ The other fields should be 0.
>  and
>  .I sll_pkttype
>  are set on received packets for your information.
> -For bind only
> -.I sll_protocol
> -and
> -.I sll_ifindex
> -are used.
>  .SS Socket Options
>  Packet sockets can be used to configure physical layer multicasting
>  and promiscuous mode.
> 


-- 
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] 2+ messages in thread

* Re: [PATCH] packet.7: Fix description of binding a packet socket to an interface
       [not found]     ` <554F3CBC.90503-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2015-05-11  2:05       ` Jian Wen
  0 siblings, 0 replies; 2+ messages in thread
From: Jian Wen @ 2015-05-11  2:05 UTC (permalink / raw)
  To: Michael Kerrisk (man-pages)
  Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, Cortland Setlow

Cool!

Thanks.

On Sun, May 10, 2015 at 7:10 PM, Michael Kerrisk (man-pages)
<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hello 文剑,
>
> On 08/11/2011 06:04 PM, 文剑 wrote:
>> As mentioned in packet(7), "Only  the  sll_protocol  and  the  sll_ifindex
>> address fields are used for purposes of binding."
>> But in my test, sll_family is also used for binding a packet socket to an
>> interface.
>
> I'm catching up with some very old mail.
>
> I've applied your patch (for a problem that Cortland also reported).
> Thank you for sending it, and sorry that it sat on the floor for so
> long.
>
> Cheers,
>
> Michael
>
>
>> My enviroment:  2.6.38-10-generic Ubuntu-11.04 i686
>>
>> Against man-pages 3.33.
>>
>> Signed-off-by: Jian Wen
>>
>> ---
>>  man7/packet.7 |   18 ++++++++----------
>>  1 files changed, 8 insertions(+), 10 deletions(-)
>>
>> diff --git a/man7/packet.7 b/man7/packet.7
>> index 5e35ae2..3de2550 100644
>> --- a/man7/packet.7
>> +++ b/man7/packet.7
>> @@ -84,11 +84,14 @@ To only get packets from a specific interface use
>>  specifying an address in a
>>  .I struct sockaddr_ll
>>  to bind the packet socket to an interface.
>> -Only the
>> -.I sll_protocol
>> -and the
>> -.I sll_ifindex
>> -address fields are used for purposes of binding.
>> +Fields used for binding are
>> +.IR sll_family (should
>> +be
>> +.BR AF_PACKET ),
>> +.IR sll_protocol ,
>> +and
>> +.IR sll_ifindex .
>> +
>>
>>  The
>>  .BR connect (2)
>> @@ -166,11 +169,6 @@ The other fields should be 0.
>>  and
>>  .I sll_pkttype
>>  are set on received packets for your information.
>> -For bind only
>> -.I sll_protocol
>> -and
>> -.I sll_ifindex
>> -are used.
>>  .SS Socket Options
>>  Packet sockets can be used to configure physical layer multicasting
>>  and promiscuous mode.
>>
>
>
> --
> Michael Kerrisk
> Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
> Linux/UNIX System Programming Training: http://man7.org/training/



-- 
Best,

Jian
--
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] 2+ messages in thread

end of thread, other threads:[~2015-05-11  2:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CAMXzGWJodsZjNnYj-MaeEDuaPE=t4ig=3vk=WiArJ3aMtATNsw@mail.gmail.com>
     [not found] ` <CAMXzGWJodsZjNnYj-MaeEDuaPE=t4ig=3vk=WiArJ3aMtATNsw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-10 11:10   ` [PATCH] packet.7: Fix description of binding a packet socket to an interface Michael Kerrisk (man-pages)
     [not found]     ` <554F3CBC.90503-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-11  2:05       ` Jian Wen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.