packet: fix typo in packet_mmap.txt
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Thu, 22 Dec 2011 17:47:54 +0000 (17:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Dec 2011 21:50:58 +0000 (16:50 -0500)
Just fixed typo of sample code in packet_mmap.txt

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/packet_mmap.txt

index 4acea660372011ab7ae95d42cc84decc55d4cc22..1c08a4b0981fb7f648cee60ffea8b3c45bb319c4 100644 (file)
@@ -155,7 +155,7 @@ As capture, each frame contains two parts:
 
  /* fill sockaddr_ll struct to prepare binding */
  my_addr.sll_family = AF_PACKET;
- my_addr.sll_protocol = ETH_P_ALL;
+ my_addr.sll_protocol = htons(ETH_P_ALL);
  my_addr.sll_ifindex =  s_ifr.ifr_ifindex;
 
  /* bind socket to eth0 */