Linux-man Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] packet.7: fix tpacket_auxdata fields.
@ 2019-11-26 23:22 kevin sztern
  2019-12-12  8:56 ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 2+ messages in thread
From: kevin sztern @ 2019-11-26 23:22 UTC (permalink / raw)
  To: mtk.manpages; +Cc: linux-man, kevin sztern

The definition of the tpacket_auxdata struct in the manpage is not the
same as the definition found in /include/uapi/linux/if_packet.h.

In particular, instead of a tp_padding field, there is a tp_vlan_tpid
field. An example of a project using this field is libpcap[1].

[1]: https://github.com/the-tcpdump-group/libpcap/blob/master/pcap-linux.c#L349
---
 man7/packet.7 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man7/packet.7 b/man7/packet.7
index b624d47d1..ecbd63409 100644
--- a/man7/packet.7
+++ b/man7/packet.7
@@ -257,7 +257,7 @@ struct tpacket_auxdata {
     __u16 tp_mac;
     __u16 tp_net;
     __u16 tp_vlan_tci;
-    __u16 tp_padding;
+    __u16 tp_vlan_tpid;
 };
 .EE
 .in
-- 
2.20.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] packet.7: fix tpacket_auxdata fields.
  2019-11-26 23:22 [PATCH] packet.7: fix tpacket_auxdata fields kevin sztern
@ 2019-12-12  8:56 ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2019-12-12  8:56 UTC (permalink / raw)
  To: kevin sztern; +Cc: mtk.manpages, linux-man

Hello Kevin,

On 11/27/19 12:22 AM, kevin sztern wrote:
> The definition of the tpacket_auxdata struct in the manpage is not the
> same as the definition found in /include/uapi/linux/if_packet.h.
> 
> In particular, instead of a tp_padding field, there is a tp_vlan_tpid
> field. An example of a project using this field is libpcap[1].
> 
> [1]: https://github.com/the-tcpdump-group/libpcap/blob/master/pcap-linux.c#L349

Thanks. Patch applied.

Cheers,

Michael

> ---
>  man7/packet.7 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/man7/packet.7 b/man7/packet.7
> index b624d47d1..ecbd63409 100644
> --- a/man7/packet.7
> +++ b/man7/packet.7
> @@ -257,7 +257,7 @@ struct tpacket_auxdata {
>      __u16 tp_mac;
>      __u16 tp_net;
>      __u16 tp_vlan_tci;
> -    __u16 tp_padding;
> +    __u16 tp_vlan_tpid;
>  };
>  .EE
>  .in
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-26 23:22 [PATCH] packet.7: fix tpacket_auxdata fields kevin sztern
2019-12-12  8:56 ` Michael Kerrisk (man-pages)

Linux-man Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-man/0 linux-man/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-man linux-man/ https://lore.kernel.org/linux-man \
		linux-man@vger.kernel.org
	public-inbox-index linux-man

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-man


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git