Re: [PATCH] packet.7: add description of zero protocol for socket

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Alex,

On 2/12/22 00:28 Alejandro Colomar (man-pages) wrote:
>
>
>
> On 2/11/22 23:08, Grzegorz Szpetkowski wrote:
> > Hello Alex,
> >
> > On 2/9/22 21:32, Alejandro Colomar (man-pages) wrote:
> >> Huh, I don't know where that trailing 'man' comes from.  I think I typed
> >> it accidentally.  However, I still think the wording could be improved
> >> for that line.
> >
> > I tend to agree that wording could be better, but nothing straight
> > comes to my mind.
> > Would something like this work better?
>
> Yes, that reads a bit better, but I have a question.
>
>
> >
> >> +If protocol is set to zero, then no protocols are received until
> >> .BR bind (2)
> >> is subsequently called with with non-zero
>
> What do you mean by subsequently?  Since you already wrote 'until' it
> implies that there will be a future call to bind(2); I'm not sure if
> subsequently adds a slightly different meaning to the sentence, or it
> should be removed for clarity?

Yes, this wording is unfortunate due to the fact the call to bind is optional.
As an example, If user intends to treat the socket as Tx-only, then
bind(2) may be skipped.

> Also a minor typo: repeated 'with'.
>
> Still, I'd remove the negation in the sentence so that it reads
> positively.  We need to break the sentence into two.  What about
> something like the following (please tweak it as necessary to be as
> precise as possible)?:
>
>
>
> If protocol is set to zero, no packets are received.  bind(2)
> can optionally be called with a nonzero sll_protocol to start
> receiving packets for the protocols specified.

Yes, this sounds right to me as well.
Attaching in git diff -u form:

diff --git a/man7/packet.7 b/man7/packet.7
index 706efbb54..d377fe583 100644
--- a/man7/packet.7
+++ b/man7/packet.7
@@ -47,6 +47,11 @@ is set to
 then all protocols are received.
 All incoming packets of that protocol type will be passed to the packet
 socket before they are passed to the protocols implemented in the kernel.
+If protocol is set to zero, no packets are received.
+.BR bind (2)
+can optionally be called with a nonzero
+.IR sll_protocol
+to start receiving packets for the protocols specified.
 .PP
 In order to create a packet socket, a process must have the
 .B CAP_NET_RAW

Please approve.

Thanks,
Grzegorz



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux