dfuzzer
Loading...
Searching...
No Matches
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
56int df_list_bus_names(const GDBusConnection *dcon);
57
66int df_is_object_on_bus(const GDBusConnection *dcon, const char *root_node);
67
78int df_traverse_node(const GDBusConnection *dcon, const char *root_node);
79
90int df_fuzz(const GDBusConnection *dcon, const char *name,
91 const char *obj, const char *intf);
92
101int df_is_valid_dbus(const char *name, const char *obj, const char *intf);
102
108int df_open_proc_status_file(const int pid);
109
116int df_get_pid(const GDBusConnection *dcon);
117
124void df_print_process_info(int pid);
125
152void df_parse_parameters(int argc, char **argv);
153
170int df_load_suppressions(void);
171
176void df_print_help(const char *name);
177
183void df_error(const char *message, GError *error);
184
189void df_debug(const char *format, ...);
190
195void df_verbose(const char *format, ...);
196
201void df_fail(const char *format, ...);
202
203#endif
void df_parse_parameters(int argc, char **argv)
Definition: dfuzzer.c:1041
int df_load_suppressions(void)
Definition: dfuzzer.c:1183
void df_verbose(const char *format,...)
Definition: dfuzzer.c:1432
void df_fail(const char *format,...)
Definition: dfuzzer.c:1447
int df_list_bus_names(const GDBusConnection *dcon)
Definition: dfuzzer.c:259
int df_get_pid(const GDBusConnection *dcon)
Definition: dfuzzer.c:849
int df_is_valid_dbus(const char *name, const char *obj, const char *intf)
Definition: dfuzzer.c:808
void df_print_process_info(int pid)
Definition: dfuzzer.c:896
int df_is_object_on_bus(const GDBusConnection *dcon, const char *root_node)
Definition: dfuzzer.c:313
int df_fuzz(const GDBusConnection *dcon, const char *name, const char *obj, const char *intf)
Definition: dfuzzer.c:574
void df_error(const char *message, GError *error)
Definition: dfuzzer.c:1398
int df_traverse_node(const GDBusConnection *dcon, const char *root_node)
Definition: dfuzzer.c:419
int df_open_proc_status_file(const int pid)
Definition: dfuzzer.c:830
void df_debug(const char *format,...)
Definition: dfuzzer.c:1417
#define MAXLEN
Definition: dfuzzer.h:36
void df_print_help(const char *name)
Definition: dfuzzer.c:1319
Definition: dfuzzer.h:39
char name[MAXLEN]
Definition: dfuzzer.h:42
char obj_path[MAXLEN]
Definition: dfuzzer.h:44
char interface[MAXLEN]
Definition: dfuzzer.h:46