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:
文剑 2015-05-10 13:12:01 +02:00 committed by Michael Kerrisk
parent 2174e8e353
commit 4d45036a35
1 changed files with 7 additions and 10 deletions

View File

@ -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)