dfuzzer
dfuzzer.h
Go to the documentation of this file.
1 
2 /*
3  * dfuzzer - tool for fuzz testing processes communicating through D-Bus.
4  *
5  * Copyright(C) 2013,2014,2015, Red Hat, Inc.
6  * Matus Marhefka <mmarhefk@redhat.com>
7  * Miroslav Vadkerti <mvadkert@redhat.com>
8  *
9  * This program is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <http://www.gnu.org/licenses/>.
21  */
22 #ifndef DFUZZER_H
23 #define DFUZZER_H
24 
26 #define DF_VERSION "dfuzzer 1.4\n" \
27  "Copyright(C) 2013,2014,2015, Red Hat, Inc.\n" \
28  "Author: Matus Marhefka <mmarhefk@redhat.com>\n" \
29  "Additional changes: Miroslav Vadkerti <mvadkert@redhat.com>\n" \
30  "License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\n"
31 
33 #define MINLEN 512
34 
36 #define MAXLEN 256
37 
40  /* names on D-Bus have the most MAXLEN characters */
42  char name[MAXLEN];
47 };
48 
49 
56 int df_list_bus_names(const GDBusConnection *dcon);
57 
66 int df_is_object_on_bus(const GDBusConnection *dcon, const char *root_node);
67 
78 int df_traverse_node(const GDBusConnection *dcon, const char *root_node);
79 
90 int df_fuzz(const GDBusConnection *dcon, const char *name,
91  const char *obj, const char *intf);
92 
101 int df_is_valid_dbus(const char *name, const char *obj, const char *intf);
102 
108 int df_open_proc_status_file(const int pid);
109 
116 int df_get_pid(const GDBusConnection *dcon);
117 
124 void df_print_process_info(int pid);
125 
152 void df_parse_parameters(int argc, char **argv);
153 
170 int df_load_suppressions(void);
171 
176 void df_print_help(const char *name);
177 
183 void df_error(const char *message, GError *error);
184 
189 void df_debug(const char *format, ...);
190 
195 void df_verbose(const char *format, ...);
196 
201 void df_fail(const char *format, ...);
202 
203 #endif
MAXLEN
#define MAXLEN
Definition: dfuzzer.h:36
df_parse_parameters
void df_parse_parameters(int argc, char **argv)
Definition: dfuzzer.c:1041
df_get_pid
int df_get_pid(const GDBusConnection *dcon)
Definition: dfuzzer.c:849
df_print_help
void df_print_help(const char *name)
Definition: dfuzzer.c:1319
df_fuzz
int df_fuzz(const GDBusConnection *dcon, const char *name, const char *obj, const char *intf)
Definition: dfuzzer.c:574
fuzzing_target::obj_path
char obj_path[MAXLEN]
Definition: dfuzzer.h:44
fuzzing_target
Definition: dfuzzer.h:39
df_error
void df_error(const char *message, GError *error)
Definition: dfuzzer.c:1398
df_list_bus_names
int df_list_bus_names(const GDBusConnection *dcon)
Definition: dfuzzer.c:259
fuzzing_target::interface
char interface[MAXLEN]
Definition: dfuzzer.h:46
df_is_object_on_bus
int df_is_object_on_bus(const GDBusConnection *dcon, const char *root_node)
Definition: dfuzzer.c:313
df_is_valid_dbus
int df_is_valid_dbus(const char *name, const char *obj, const char *intf)
Definition: dfuzzer.c:808
df_fail
void df_fail(const char *format,...)
Definition: dfuzzer.c:1447
df_debug
void df_debug(const char *format,...)
Definition: dfuzzer.c:1417
df_print_process_info
void df_print_process_info(int pid)
Definition: dfuzzer.c:896
df_verbose
void df_verbose(const char *format,...)
Definition: dfuzzer.c:1432
df_traverse_node
int df_traverse_node(const GDBusConnection *dcon, const char *root_node)
Definition: dfuzzer.c:419
df_open_proc_status_file
int df_open_proc_status_file(const int pid)
Definition: dfuzzer.c:830
fuzzing_target::name
char name[MAXLEN]
Definition: dfuzzer.h:42
df_load_suppressions
int df_load_suppressions(void)
Definition: dfuzzer.c:1183