Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wireshark
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
Gregor Jasny
wireshark
Commits
6b178bd4
Commit
6b178bd4
authored
Dec 29, 2011
by
Gerald Combs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 'extern "C"' wrappers and #include guards to various header files.
svn path=/trunk/; revision=40321
parent
cb9725ce
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
221 additions
and
18 deletions
+221
-18
airpcap_loader.h
airpcap_loader.h
+8
-0
capture-pcap-util.h
capture-pcap-util.h
+2
-2
capture-wpcap.h
capture-wpcap.h
+9
-1
capture.h
capture.h
+8
-0
capture_ifinfo.h
capture_ifinfo.h
+8
-0
capture_info.h
capture_info.h
+8
-1
capture_opts.h
capture_opts.h
+8
-0
capture_ui_utils.h
capture_ui_utils.h
+9
-1
capture_wpcap_packet.h
capture_wpcap_packet.h
+6
-0
cfile.h
cfile.h
+8
-0
color.h
color.h
+9
-1
color_filters.h
color_filters.h
+7
-1
disabled_protos.h
disabled_protos.h
+13
-0
epan/base64.h
epan/base64.h
+2
-1
epan/epan.h
epan/epan.h
+8
-0
epan/epan_dissect.h
epan/epan_dissect.h
+7
-0
epan/ex-opt.h
epan/ex-opt.h
+10
-2
epan/prefs.h
epan/prefs.h
+8
-0
epan/strutil.h
epan/strutil.h
+8
-0
epan/timestamp.h
epan/timestamp.h
+8
-0
epan/tvbuff.h
epan/tvbuff.h
+8
-0
file.h
file.h
+7
-0
filters.h
filters.h
+12
-0
globals.h
globals.h
+3
-3
gtk/recent.h
gtk/recent.h
+12
-4
main_statusbar.h
main_statusbar.h
+7
-0
progress_dlg.h
progress_dlg.h
+9
-1
register.h
register.h
+9
-0
No files found.
airpcap_loader.h
View file @
6b178bd4
...
...
@@ -30,6 +30,10 @@
#include <epan/crypt/airpdcap_user.h>
#ifdef __cplusplus
extern
"C"
{
#endif
/* Error values from "get_airpcap_interface_list()". */
#define CANT_GET_AIRPCAP_INTERFACE_LIST 0
/* error getting list */
#define NO_AIRPCAP_INTERFACES_FOUND 1
/* list is empty */
...
...
@@ -551,4 +555,8 @@ get_compiled_airpcap_version(GString *str);
void
get_runtime_airpcap_version
(
GString
*
str
);
#ifdef __cplusplus
}
#endif
#endif
/* __AIRPCAP_LOADER_H__ */
capture-pcap-util.h
View file @
6b178bd4
...
...
@@ -27,12 +27,12 @@
#ifdef HAVE_LIBPCAP
#include <pcap.h>
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
#include <pcap.h>
/*
* A snapshot length of 0 is useless - and libpcap/WinPcap don't guarantee
* that a snapshot length of 0 will work, and, on some platforms, it won't
...
...
capture-wpcap.h
View file @
6b178bd4
...
...
@@ -25,10 +25,18 @@
#ifndef CAPTURE_WPCAP_H
#define CAPTURE_WPCAP_H
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
extern
gboolean
has_wpcap
;
void
load_wpcap
(
void
);
#endif
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* CAPTURE_WPCAP_H */
capture.h
View file @
6b178bd4
...
...
@@ -33,6 +33,10 @@
#include "capture_opts.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
typedef
enum
{
capture_cb_capture_prepared
,
capture_cb_capture_update_started
,
...
...
@@ -123,4 +127,8 @@ extern gboolean capture_stats(if_stat_cache_t *sc, char *ifname, struct pcap_sta
*/
void
capture_stat_stop
(
if_stat_cache_t
*
sc
);
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* capture.h */
capture_ifinfo.h
View file @
6b178bd4
...
...
@@ -25,6 +25,10 @@
#ifndef __CAPTURE_IFINFO_H__
#define __CAPTURE_IFINFO_H__
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
/*
* The list of interfaces returned by "get_interface_list()" is
* a list of these structures.
...
...
@@ -93,4 +97,8 @@ void free_if_capabilities(if_capabilities_t *caps);
void
add_interface_to_remote_list
(
if_info_t
*
if_info
);
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* __CAPTURE_IFINFO_H__ */
capture_info.h
View file @
6b178bd4
...
...
@@ -24,7 +24,7 @@
/** @file
*
*
* capture info functions
*
*/
...
...
@@ -34,6 +34,10 @@
#include "capture_opts.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
/* open the info - init values (wtap, counts), create dialog */
extern
void
capture_info_open
(
capture_options
*
capture_opts
);
...
...
@@ -73,5 +77,8 @@ capture_info *cinfo);
extern
void
capture_info_ui_destroy
(
capture_info
*
cinfo
);
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* capture_info.h */
capture_opts.h
View file @
6b178bd4
...
...
@@ -38,6 +38,10 @@
#include "capture_ifinfo.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
/* Current state of capture engine. XXX - differentiate states */
typedef
enum
{
CAPTURE_STOPPED
,
/**< stopped */
...
...
@@ -190,4 +194,8 @@ capture_opts_trim_ring_num_files(capture_options *capture_opts);
extern
gboolean
capture_opts_trim_iface
(
capture_options
*
capture_opts
,
const
char
*
capture_device
);
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* capture_opts.h */
capture_ui_utils.h
View file @
6b178bd4
...
...
@@ -27,6 +27,10 @@
#include "capture_opts.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
/** @file
* GList of available capture interfaces.
*/
...
...
@@ -99,4 +103,8 @@ char *build_capture_combo_name(GList *if_list, gchar *if_name);
*/
const
char
*
get_iface_description_for_interface
(
capture_options
*
capture_opts
,
guint
i
);
#endif
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* __CAPTURE_UI_UTILS_H__ */
capture_wpcap_packet.h
View file @
6b178bd4
...
...
@@ -25,6 +25,9 @@
#ifndef CAPTURE_WPCAP_PACKET_H
#define CAPTURE_WPCAP_PACKET_H
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
extern
void
wpcap_packet_load
(
void
);
...
...
@@ -43,5 +46,8 @@ extern int wpcap_packet_request_uint(void *a, ULONG Oid, UINT *value);
extern
int
wpcap_packet_request_ulong
(
void
*
a
,
ULONG
Oid
,
ULONG
*
value
);
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* CAPTURE_WPCAP_PACKET_H */
cfile.h
View file @
6b178bd4
...
...
@@ -27,6 +27,10 @@
#include "frame_data_sequence.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
/* Current state of file. */
typedef
enum
{
FILE_CLOSED
,
/* No file open */
...
...
@@ -115,4 +119,8 @@ typedef struct _capture_file {
extern
void
cap_file_init
(
capture_file
*
cf
);
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* cfile.h */
color.h
View file @
6b178bd4
...
...
@@ -25,6 +25,10 @@
#ifndef __COLOR_H__
#define __COLOR_H__
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
/*
* Data structure holding RGB value for a color.
*
...
...
@@ -52,4 +56,8 @@ typedef struct {
*/
gboolean
initialize_color
(
color_t
*
color
,
guint16
red
,
guint16
green
,
guint16
blue
);
#endif
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* __COLOR_H__ */
color_filters.h
View file @
6b178bd4
...
...
@@ -24,6 +24,10 @@
#ifndef __COLOR_FILTERS_H__
#define __COLOR_FILTERS_H__
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
#define CONVERSATION_COLOR_PREFIX "___conversation_color_filter___"
/** @file
* Color filters.
...
...
@@ -190,6 +194,8 @@ void color_filter_delete(color_filter_t *colorf);
*/
void
color_filter_list_delete
(
GSList
**
cfl
);
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
disabled_protos.h
View file @
6b178bd4
...
...
@@ -23,6 +23,13 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef DISABLED_PROTOS_H
#define DISABLED_PROTOS_H
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
/*
* Item in a list of disabled protocols.
*/
...
...
@@ -59,3 +66,9 @@ void set_disabled_protos_list(void);
* and "*errno_return" is set to the error.
*/
void
save_disabled_protos_list
(
char
**
pref_path_return
,
int
*
errno_return
);
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* DISABLED_PROTOS_H */
epan/base64.h
View file @
6b178bd4
...
...
@@ -24,11 +24,12 @@
#ifndef __BASE64_H__
#define __BASE64_H__
#include <epan/tvbuff.h>
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
#include <epan/tvbuff.h>
/* In-place decoding of a base64 string. */
size_t
epan_base64_decode
(
char
*
s
);
...
...
epan/epan.h
View file @
6b178bd4
...
...
@@ -24,6 +24,10 @@
#ifndef EPAN_H
#define EPAN_H
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
#include <glib.h>
#include "frame_data.h"
#include "column_info.h"
...
...
@@ -183,4 +187,8 @@ epan_get_compiled_version_info(GString *str);
void
epan_get_runtime_version_info
(
GString
*
str
);
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* EPAN_H */
epan/epan_dissect.h
View file @
6b178bd4
...
...
@@ -24,6 +24,10 @@
#ifndef EPAN_DISSECT_H
#define EPAN_DISSECT_H
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
#include "tvbuff.h"
#include "proto.h"
#include "packet_info.h"
...
...
@@ -40,5 +44,8 @@ struct _epan_dissect_t {
packet_info
pi
;
};
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* EPAN_DISSECT_H */
epan/ex-opt.h
View file @
6b178bd4
...
...
@@ -23,12 +23,16 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _EX_OPT_H
#define _EX_OPT_H
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
/* will be called by main each time a -X option is found */
extern
gboolean
ex_opt_add
(
const
gchar
*
optarg
);
...
...
@@ -41,4 +45,8 @@ extern const gchar* ex_opt_get_nth(const gchar* key, guint index);
/* extracts the next value of a given key */
extern
const
gchar
*
ex_opt_get_next
(
const
gchar
*
key
);
#endif
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* _EX_OPT_H */
epan/prefs.h
View file @
6b178bd4
...
...
@@ -25,6 +25,10 @@
#ifndef __PREFS_H__
#define __PREFS_H__
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
#include <glib.h>
#include "color.h"
...
...
@@ -462,4 +466,8 @@ extern gboolean prefs_is_capture_device_hidden(const char *name);
*/
extern
gboolean
prefs_capture_device_monitor_mode
(
const
char
*
name
);
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* prefs.h */
epan/strutil.h
View file @
6b178bd4
...
...
@@ -25,6 +25,10 @@
#ifndef __STRUTIL_H__
#define __STRUTIL_H__
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
/* ... thus, config.h needs to be #included */
/** @file
...
...
@@ -268,4 +272,8 @@ gchar* ws_strdup_unescape_char (const gchar *str, const gchar chr);
*/
gchar
*
string_replace
(
const
gchar
*
str
,
const
gchar
*
old_val
,
const
gchar
*
new_val
);
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* __STRUTIL_H__ */
epan/timestamp.h
View file @
6b178bd4
...
...
@@ -25,6 +25,10 @@
#ifndef __TIMESTAMP_H__
#define __TIMESTAMP_H__
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
/*
* Type of time-stamp shown in the summary display.
*/
...
...
@@ -81,4 +85,8 @@ extern void timestamp_set_precision(int tsp);
extern
ts_seconds_type
timestamp_get_seconds_type
(
void
);
extern
void
timestamp_set_seconds_type
(
ts_seconds_type
);
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* timestamp.h */
epan/tvbuff.h
View file @
6b178bd4
...
...
@@ -40,6 +40,10 @@
#include <epan/guid-utils.h>
#include "exceptions.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
/** @file
* "testy, virtual(-izable) buffer". They are testy in that they get mad when
* an attempt is made to access data beyond the bounds of their array. In that
...
...
@@ -674,4 +678,8 @@ extern tvbuff_t* tvb_child_uncompress(tvbuff_t *parent, tvbuff_t *tvb, const int
/************** END OF ACCESSORS ****************/
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* __TVBUFF_H__ */
file.h
View file @
6b178bd4
...
...
@@ -34,6 +34,9 @@
#include "cfile.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
/** Return values from functions that only can succeed or fail. */
typedef
enum
{
...
...
@@ -581,4 +584,8 @@ cf_merge_files(char **out_filename, int in_file_count,
void
read_keytab_file
(
const
char
*
);
#endif
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* file.h */
filters.h
View file @
6b178bd4
...
...
@@ -23,6 +23,13 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef FILTERS_H
#define FILTERS_H
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
/*
* Filter lists.
*/
...
...
@@ -85,3 +92,8 @@ void save_filter_list(filter_list_type_t list_type, char **pref_path_return,
*/
void
copy_filter_list
(
filter_list_type_t
dest_type
,
filter_list_type_t
src_type
);
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* FILTERS_H */
globals.h
View file @
6b178bd4
...
...
@@ -25,13 +25,13 @@
#ifndef __GLOBALS_H__
#define __GLOBALS_H__
#include "file.h"
#include <epan/timestamp.h>
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
#include "file.h"
#include <epan/timestamp.h>
extern
capture_file
cfile
;
#ifdef __cplusplus
...
...
gtk/recent.h
View file @
6b178bd4
...
...
@@ -26,6 +26,10 @@
#ifndef __RECENT_H__
#define __RECENT_H__
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
#include <glib.h>
/** @file
...
...
@@ -87,7 +91,7 @@ typedef struct recent_settings_tag {
gboolean
privs_warn_if_elevated
;
gboolean
privs_warn_if_no_npf
;
GList
*
col_width_list
;
/* column widths */
gchar
*
gui_fileopen_remembered_dir
;
/* folder of last capture loaded in File Open dialog */
gchar
*
gui_fileopen_remembered_dir
;
/* folder of last capture loaded in File Open dialog */
}
recent_settings_t
;
/** Global recent settings. */
...
...
@@ -146,20 +150,20 @@ extern void write_recent_geom(gpointer key, gpointer value, gpointer rf);
extern
int
recent_set_arg
(
char
*
prefarg
);
/** Get the column width for the given column
*
*
* @param col column number
*/
extern
gint
recent_get_column_width
(
gint
col
);
/** Set the column width for the given column
*
*
* @param col column number
* @param width column width
*/
extern
void
recent_set_column_width
(
gint
col
,
gint
width
);
/** Get the column xalign for the given column
*
*
* @param col column number
*/
extern
gchar
recent_get_column_xalign
(
gint
col
);
...
...
@@ -171,4 +175,8 @@ extern gchar recent_get_column_xalign(gint col);
*/
extern
void
recent_set_column_xalign
(
gint
col
,
gchar
xalign
);
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* recent.h */
main_statusbar.h
View file @
6b178bd4
...
...
@@ -24,6 +24,9 @@
#ifndef __MAIN_STATUSBAR_H__
#define __MAIN_STATUSBAR_H__
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
void
profile_bar_update
(
void
);
void
packets_bar_update
(
void
);
...
...
@@ -61,4 +64,8 @@ void statusbar_pop_filter_msg(void);
void
statusbar_push_temporary_msg
(
const
gchar
*
msg_format
,
...)
G_GNUC_PRINTF
(
1
,
2
);
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* __MAIN_STATUSBAR_H__ */
progress_dlg.h
View file @
6b178bd4
...
...
@@ -25,6 +25,10 @@
#ifndef __PROGRESS_DLG_H__
#define __PROGRESS_DLG_H__
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
/** @file
* Progress (modal) dialog box routines.
* @ingroup dialog_group
...
...
@@ -56,7 +60,7 @@ progdlg_t *create_progress_dlg(const gchar *task_title, const gchar *item_title,
/**
* Create a progress dialog, but only if it's not likely to disappear
* immediately. This can be disconcerting for the user.
* immediately. This can be disconcerting for the user.
*
* @param task_title the task to do, e.g. "Loading"
* @param item_title the item to do, e.g. "capture.cap"
...
...
@@ -91,4 +95,8 @@ void update_progress_dlg(progdlg_t *dlg, gfloat percentage, const gchar *status)
*/
void
destroy_progress_dlg
(
progdlg_t
*
dlg
);
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* __PROGRESS_DLG_H__ */
register.h
View file @
6b178bd4
...
...
@@ -25,6 +25,10 @@
#ifndef __REGISTER_H__
#define __REGISTER_H__
#ifdef __cplusplus
extern
"C"
{
#endif
/* __cplusplus */
#include <glib.h>
typedef
enum
{
...
...
@@ -48,4 +52,9 @@ extern void register_all_protocols(register_cb cb, gpointer client_data);
extern
void
register_all_protocol_handoffs
(
register_cb
cb
,
gpointer
client_data
);
extern
void
register_all_tap_listeners
(
void
);
extern
gulong
register_count
(
void
);
#ifdef __cplusplus
}
#endif
/* __cplusplus */
#endif
/* __REGISTER_H__ */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment