]> granicus.if.org Git - strace/blobdiff - defs.h
CREDITS.in: use UTF-8 consistently
[strace] / defs.h
diff --git a/defs.h b/defs.h
index f82eef15eeacf1f5e95a6bf1240e2ab94e6770f1..b1a6b95519ab2f70c887a227bafd6d8df4b4180a 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -75,15 +75,6 @@ const char *strerror(int);
 extern char *stpcpy(char *dst, const char *src);
 #endif
 
-/* macros */
-#ifndef MAX
-# define MAX(a, b)             (((a) > (b)) ? (a) : (b))
-#endif
-#ifndef MIN
-# define MIN(a, b)             (((a) < (b)) ? (a) : (b))
-#endif
-#define CLAMP(val, min, max) MIN(MAX(min, val), max)
-
 /* Glibc has an efficient macro for sigemptyset
  * (it just does one or two assignments of 0 to internal vector of longs).
  */
@@ -180,15 +171,22 @@ typedef struct ioctlent {
        unsigned int code;
 } struct_ioctlent;
 
+#define INJECT_F_SIGNAL 1
+#define INJECT_F_RETVAL 2
+
+struct inject_data {
+       uint16_t flags;
+       uint16_t signo;
+       int rval;
+};
+
 struct inject_opts {
        uint16_t first;
        uint16_t step;
-       uint16_t signo;
-       int rval;
+       struct inject_data data;
 };
 
 #define MAX_ERRNO_VALUE                        4095
-#define INJECT_OPTS_RVAL_DEFAULT       (-(MAX_ERRNO_VALUE + 1))
 
 /* Trace Control Block */
 struct tcb {
@@ -287,6 +285,8 @@ extern const struct xlat open_mode_flags[];
 extern const struct xlat resource_flags[];
 extern const struct xlat routing_scopes[];
 extern const struct xlat routing_table_ids[];
+extern const struct xlat routing_types[];
+extern const struct xlat seccomp_ret_action[];
 extern const struct xlat setns_types[];
 extern const struct xlat sg_io_info[];
 extern const struct xlat socketlayers[];
@@ -307,6 +307,8 @@ extern const struct xlat whence_codes[];
 #define RVAL_NONE      040     /* Print nothing */
 
 #define RVAL_DECODED   0100    /* syscall decoding finished */
+#define RVAL_IOCTL_DECODED 0200        /* ioctl sub-parser successfully decoded
+                                  the argument */
 
 #define IOCTL_NUMBER_UNKNOWN 0
 #define IOCTL_NUMBER_HANDLED 1
@@ -635,6 +637,7 @@ struct strace_stat;
 extern void print_struct_stat(struct tcb *, const struct strace_stat *const st);
 
 struct strace_statfs;
+struct strace_keyctl_kdf_params;
 
 extern void
 print_struct_statfs(struct tcb *, kernel_ulong_t addr);