summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--built_in.h8
-rw-r--r--dissector.h14
2 files changed, 16 insertions, 6 deletions
diff --git a/built_in.h b/built_in.h
index 20d7317..d7d4b6b 100644
--- a/built_in.h
+++ b/built_in.h
@@ -398,4 +398,12 @@ static inline u64 cpu_to_le64(u64 val)
# define ARPHRD_NETLINK 824
#endif
+#ifndef PACKET_USER
+# define PACKET_USER 6
+#endif
+
+#ifndef PACKET_KERNEL
+# define PACKET_KERNEL 7
+#endif
+
#endif /* BUILT_IN_H */
diff --git a/dissector.h b/dissector.h
index e26c235..c86a51d 100644
--- a/dissector.h
+++ b/dissector.h
@@ -28,12 +28,14 @@
extern char *if_indextoname(unsigned ifindex, char *ifname);
static const char * const packet_types[256] = {
- [PACKET_HOST] = "<", /* Incoming */
- [PACKET_BROADCAST] = "B", /* Broadcast */
- [PACKET_MULTICAST] = "M", /* Multicast */
- [PACKET_OTHERHOST] = "P", /* Promisc */
- [PACKET_OUTGOING] = ">", /* Outgoing */
- "?", /* Unknown */
+ [0 ... 255] = "?", /* Unknown */
+ [PACKET_HOST] = "<", /* Incoming */
+ [PACKET_BROADCAST] = "B", /* Broadcast */
+ [PACKET_MULTICAST] = "M", /* Multicast */
+ [PACKET_OTHERHOST] = "P", /* Promisc */
+ [PACKET_OUTGOING] = ">", /* Outgoing */
+ [PACKET_USER] = ">U", /* To Userspace */
+ [PACKET_KERNEL] = ">K", /* To Kernelspace */
};
static inline const char *__show_ts_source(uint32_t status)