From 4d45036a35bbac36a6dc110c7f032e6446e93aca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=87=E5=89=91?= Date: Sun, 10 May 2015 13:12:01 +0200 Subject: [PATCH] packet.7: Fix description of binding a packet socket to an interface Reported-by: Cortland Setlow Signed-off-by: Jian Wen Signed-off-by: Michael Kerrisk --- man7/packet.7 | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/man7/packet.7 b/man7/packet.7 index e70c09e3b..ffd4d4d7e 100644 --- a/man7/packet.7 +++ b/man7/packet.7 @@ -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)