JP Abgrall | baf0db4 | 2011-06-20 12:41:46 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Pretty printing Support for iptables xt_qtaguid module. |
| 3 | * |
| 4 | * (C) 2011 Google, Inc |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. |
| 9 | */ |
| 10 | #ifndef __XT_QTAGUID_PRINT_H__ |
| 11 | #define __XT_QTAGUID_PRINT_H__ |
| 12 | |
| 13 | #include "xt_qtaguid_internal.h" |
| 14 | |
| 15 | #ifdef DDEBUG |
| 16 | |
| 17 | char *pp_tag_t(tag_t *tag); |
| 18 | char *pp_data_counters(struct data_counters *dc, bool showValues); |
| 19 | char *pp_tag_node(struct tag_node *tn); |
| 20 | char *pp_tag_ref(struct tag_ref *tr); |
| 21 | char *pp_tag_stat(struct tag_stat *ts); |
| 22 | char *pp_iface_stat(struct iface_stat *is); |
| 23 | char *pp_sock_tag(struct sock_tag *st); |
| 24 | char *pp_uid_tag_data(struct uid_tag_data *qtd); |
| 25 | char *pp_proc_qtu_data(struct proc_qtu_data *pqd); |
| 26 | |
| 27 | /*------------------------------------------*/ |
| 28 | void prdebug_sock_tag_list(int indent_level, |
| 29 | struct list_head *sock_tag_list); |
| 30 | void prdebug_sock_tag_tree(int indent_level, |
| 31 | struct rb_root *sock_tag_tree); |
| 32 | void prdebug_proc_qtu_data_tree(int indent_level, |
| 33 | struct rb_root *proc_qtu_data_tree); |
| 34 | void prdebug_tag_ref_tree(int indent_level, struct rb_root *tag_ref_tree); |
| 35 | void prdebug_uid_tag_data_tree(int indent_level, |
| 36 | struct rb_root *uid_tag_data_tree); |
| 37 | void prdebug_tag_stat_tree(int indent_level, |
| 38 | struct rb_root *tag_stat_tree); |
| 39 | void prdebug_iface_stat_list(int indent_level, |
| 40 | struct list_head *iface_stat_list); |
| 41 | |
| 42 | #else |
| 43 | |
| 44 | /*------------------------------------------*/ |
| 45 | static inline char *pp_tag_t(tag_t *tag) |
| 46 | { |
| 47 | return NULL; |
| 48 | } |
| 49 | static inline char *pp_data_counters(struct data_counters *dc, bool showValues) |
| 50 | { |
| 51 | return NULL; |
| 52 | } |
| 53 | static inline char *pp_tag_node(struct tag_node *tn) |
| 54 | { |
| 55 | return NULL; |
| 56 | } |
| 57 | static inline char *pp_tag_ref(struct tag_ref *tr) |
| 58 | { |
| 59 | return NULL; |
| 60 | } |
| 61 | static inline char *pp_tag_stat(struct tag_stat *ts) |
| 62 | { |
| 63 | return NULL; |
| 64 | } |
| 65 | static inline char *pp_iface_stat(struct iface_stat *is) |
| 66 | { |
| 67 | return NULL; |
| 68 | } |
| 69 | static inline char *pp_sock_tag(struct sock_tag *st) |
| 70 | { |
| 71 | return NULL; |
| 72 | } |
| 73 | static inline char *pp_uid_tag_data(struct uid_tag_data *qtd) |
| 74 | { |
| 75 | return NULL; |
| 76 | } |
| 77 | static inline char *pp_proc_qtu_data(struct proc_qtu_data *pqd) |
| 78 | { |
| 79 | return NULL; |
| 80 | } |
| 81 | |
| 82 | /*------------------------------------------*/ |
| 83 | static inline |
| 84 | void prdebug_sock_tag_list(int indent_level, |
| 85 | struct list_head *sock_tag_list) |
| 86 | { |
| 87 | } |
| 88 | static inline |
| 89 | void prdebug_sock_tag_tree(int indent_level, |
| 90 | struct rb_root *sock_tag_tree) |
| 91 | { |
| 92 | } |
| 93 | static inline |
| 94 | void prdebug_proc_qtu_data_tree(int indent_level, |
| 95 | struct rb_root *proc_qtu_data_tree) |
| 96 | { |
| 97 | } |
| 98 | static inline |
| 99 | void prdebug_tag_ref_tree(int indent_level, struct rb_root *tag_ref_tree) |
| 100 | { |
| 101 | } |
| 102 | static inline |
| 103 | void prdebug_uid_tag_data_tree(int indent_level, |
| 104 | struct rb_root *uid_tag_data_tree) |
| 105 | { |
| 106 | } |
| 107 | static inline |
| 108 | void prdebug_tag_stat_tree(int indent_level, |
| 109 | struct rb_root *tag_stat_tree) |
| 110 | { |
| 111 | } |
| 112 | static inline |
| 113 | void prdebug_iface_stat_list(int indent_level, |
| 114 | struct list_head *iface_stat_list) |
| 115 | { |
| 116 | } |
| 117 | #endif |
| 118 | /*------------------------------------------*/ |
| 119 | const char *netdev_evt_str(int netdev_event); |
| 120 | #endif /* ifndef __XT_QTAGUID_PRINT_H__ */ |