mirror of https://github.com/mkerrisk/man-pages
packet.7: Fix description of binding a packet socket to an interface
Reported-by: Cortland Setlow <cortland.setlow@gmail.com> Signed-off-by: Jian Wen <wenjianhn@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
2174e8e353
commit
4d45036a35
|
@ -89,11 +89,13 @@ To get packets only 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)
|
||||
|
@ -181,11 +183,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 socket options are configured by calling
|
||||
.BR setsockopt (2)
|
||||
|
|
Loading…
Reference in New Issue