diff options
author | João Valverde <j@v6e.pt> | 2021-10-16 10:33:34 +0100 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-10-22 06:41:44 +0000 |
commit | 59c082c046c5039d745901b1cf5ac51e50a26a71 (patch) | |
tree | d01ee2414ccdab9737ac1064dc78ee9382bbd91e /wireshark.h | |
parent | 79b0e4999aa051f3dce4aa025dd519e9cef31d26 (diff) |
Add new global header wireshark.h with guideline
Remove ws_diag_control.h from config.h because that was a workaround
for the lack of a public global header. Fix the resultant build errors.
Diffstat (limited to 'wireshark.h')
-rw-r--r-- | wireshark.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/wireshark.h b/wireshark.h new file mode 100644 index 0000000000..154e90de5d --- /dev/null +++ b/wireshark.h @@ -0,0 +1,62 @@ +/* wireshark.h + * Global public header with minimally available wireshark API + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef __WIRESHARK_H__ +#define __WIRESHARK_H__ + +/* + * This header can be included in any file, header or source, public or private. + * It is strongly recommended to be always included to provide macros that are + * required for the project and a consistent minimum set of interfaces that are + * always guaranteed to be available. There is no need to include <glib.h> + * directly, this header should replace it. + * + * Other public headers provided here should be minimal, with stable interfaces + * and have only global declarations. + * + * Everytime this header changes everything must be rebuilt so consider carefully + * if the other project headers included here should really have global scope. + * + * See README.developer for a more in-depth guide. + */ + +/* System headers.*/ +#include <stdint.h> +#include <stdbool.h> +#include <glib.h> + +/* + * Project headers and definitions. + * + * Only public headers and symbols can be included here. Nothing related + * with configuration. + */ +#include <ws_attributes.h> +#include <ws_compiler_tests.h> +#include <ws_diag_control.h> +#include <ws_symbol_export.h> +#include <ws_version.h> + +#include <wsutil/ws_assert.h> + +#endif /* __WIRESHARK_H__ */ + +/* + * Editor modelines - https://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ |