All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: 文剑 <wenjianhn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Cortland Setlow
	<cortland.setlow-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH] packet.7: Fix description of binding a packet socket to an interface
Date: Sun, 10 May 2015 13:10:52 +0200	[thread overview]
Message-ID: <554F3CBC.90503@gmail.com> (raw)
In-Reply-To: <CAMXzGWJodsZjNnYj-MaeEDuaPE=t4ig=3vk=WiArJ3aMtATNsw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

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

       reply	other threads:[~2015-05-10 11:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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   ` Michael Kerrisk (man-pages) [this message]
     [not found]     ` <554F3CBC.90503-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-11  2:05       ` [PATCH] packet.7: Fix description of binding a packet socket to an interface Jian Wen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=554F3CBC.90503@gmail.com \
    --to=mtk.manpages-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=cortland.setlow-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=wenjianhn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.