]> granicus.if.org Git - strace/blobdiff - nlattr.h
CREDITS.in: use UTF-8 consistently
[strace] / nlattr.h
index ade2271b26a826713fe5165f4c9abbe6252c5467..323f1d6b73672f0f3493318d51ae1202e427b460 100644 (file)
--- a/nlattr.h
+++ b/nlattr.h
 #ifndef STRACE_NLATTR_H
 #define STRACE_NLATTR_H
 
+typedef bool (*nla_decoder_t)(struct tcb *, kernel_ulong_t addr,
+                             unsigned int len, const void *opaque_data);
 extern void
-decode_nlattr(struct tcb *, kernel_ulong_t addr, kernel_ulong_t len,
-             const struct xlat *, const char *);
+decode_nlattr(struct tcb *,
+             kernel_ulong_t addr,
+             unsigned int len,
+             const struct xlat *,
+             const char *dflt,
+             const nla_decoder_t *,
+             unsigned int size,
+             const void *opaque_data);
+
+#define DECL_NLA(name)                                 \
+extern bool                                            \
+decode_nla_ ## name(struct tcb *, kernel_ulong_t addr, \
+                   unsigned int len, const void *)     \
+/* End of DECL_NLA definition. */
+
+DECL_NLA(u8);
+DECL_NLA(u16);
+DECL_NLA(u32);
+DECL_NLA(u64);
+DECL_NLA(s8);
+DECL_NLA(s16);
+DECL_NLA(s32);
+DECL_NLA(s64);
+DECL_NLA(be16);
+DECL_NLA(be64);
+DECL_NLA(str);
+DECL_NLA(strn);
+DECL_NLA(ifindex);
+DECL_NLA(meminfo);
+DECL_NLA(rt_class);
+DECL_NLA(tc_stats);
 
 #endif /* !STRACE_NLATTR_H */