linux-man.vger.kernel.org archive mirror
 help / color / mirror / 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 related	[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, other threads:[~2019-12-12  8:56 UTC | newest]

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)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).