work around bluetooth linger bug
[trinity.git] / include / tables.h
blobba1d67b233695f12c28f0460e7d5ea009c8a542f
1 #ifndef _TRINITY_TABLES_H
2 #define _TRINITY_TABLES_H 1
4 #include "types.h"
5 #include "syscall.h"
7 extern const struct syscalltable *syscalls;
8 extern const struct syscalltable *syscalls_32bit;
9 extern const struct syscalltable *syscalls_64bit;
11 extern unsigned long syscalls_todo;
12 extern unsigned int max_nr_syscalls;
13 extern unsigned int max_nr_32bit_syscalls;
14 extern unsigned int max_nr_64bit_syscalls;
16 extern bool use_32bit;
17 extern bool use_64bit;
19 void validate_specific_syscall(const struct syscalltable *table, int call);
20 void activate_syscall_in_table(unsigned int calln, unsigned int *nr_active, const struct syscalltable *table, int *active_syscall);
21 void deactivate_syscall_in_table(unsigned int calln, unsigned int *nr_active, const struct syscalltable *table, int *active_syscall);
23 void check_user_specified_arch(const char *arg, char **arg_name, bool *only_64bit, bool *only_32bit);
24 void clear_check_user_specified_arch(const char *arg, char **arg_name);
26 void select_syscall_tables(void);
27 int search_syscall_table(const struct syscalltable *table, unsigned int nr_syscalls, const char *arg);
29 void mark_all_syscalls_active(void);
30 void mark_all_syscalls_active_uniarch(void);
31 void mark_all_syscalls_active_biarch(void);
33 void toggle_syscall(const char *arg, bool state);
34 void toggle_syscall_biarch_n(int calln, const struct syscalltable *table, bool onlyflag, bool doflag, bool state, void (*activate)(unsigned int), int arch_bits, const char *arg_name);
35 void toggle_syscall_biarch(const char *arg, bool state);
36 void toggle_syscall_n(int calln, bool state, const char *arg, const char *arg_name);
38 void activate_syscall(unsigned int calln);
39 void activate_syscall32(unsigned int calln);
40 void activate_syscall64(unsigned int calln);
41 void deactivate_syscall(unsigned int calln);
42 void deactivate_syscall32(unsigned int calln);
43 void deactivate_syscall64(unsigned int calln);
45 void show_state(unsigned int state);
46 void dump_syscall_tables(void);
47 void dump_syscall_tables_uniarch(void);
48 void dump_syscall_tables_biarch(void);
50 int setup_syscall_group(unsigned int desired_group);
51 int setup_syscall_group_uniarch(unsigned int desired_group);
52 int setup_syscall_group_biarch(unsigned int desired_group);
54 int validate_syscall_tables(void);
55 bool no_syscalls_enabled(void);
56 int validate_syscall_table_64(void);
57 int validate_syscall_table_32(void);
58 void sanity_check_tables(void);
59 const char * print_syscall_name(unsigned int callno, bool is32bit);
61 void enable_random_syscalls(void);
62 void enable_random_syscalls_biarch(void);
63 void enable_random_syscalls_uniarch(void);
65 int validate_specific_syscall_silent(const struct syscalltable *table, int call);
66 void deactivate_disabled_syscalls(void);
67 void deactivate_disabled_syscalls_biarch(void);
68 void deactivate_disabled_syscalls_uniarch(void);
69 void count_syscalls_enabled(void);
71 void display_enabled_syscalls(void);
72 void display_enabled_syscalls_uniarch(void);
73 void display_enabled_syscalls_biarch(void);
75 void disable_non_net_syscalls(void);
76 void disable_non_net_syscalls_uniarch(void);
77 void disable_non_net_syscalls_biarch(void);
79 bool is_syscall_net_related(const struct syscalltable *table, unsigned int num);
81 void init_syscalls(void);
82 void init_syscalls_biarch(void);
83 void init_syscalls_uniarch(void);
85 #define for_each_32bit_syscall(i) \
86 for (i = 0; i < max_nr_32bit_syscalls; i++)
87 #define for_each_64bit_syscall(i) \
88 for (i = 0; i < max_nr_64bit_syscalls; i++)
89 #define for_each_syscall(i) \
90 for (i = 0; i < max_nr_syscalls; i++)
92 #endif /* _TRINITY_TABLES_H */