forked from osmocom/wireshark
Put
#ifdef __cplusplus extern "C" { #endif /* __cplusplus */ ... #ifdef __cplusplus } #endif /* __cplusplus */ wrappers into some header files, for the benefit of C++ plugins. Also, add multiple-include protections. svn path=/trunk/; revision=20485
This commit is contained in:
parent
cba9c4efa8
commit
0fb0fa8794
|
@ -26,6 +26,10 @@
|
|||
#ifndef __ADDR_AND_MASK_H__
|
||||
#define __ADDR_AND_MASK_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*
|
||||
* These routines return PREFIX_LEN_OK on success, PREFIX_LEN_TOO_LONG if
|
||||
* the prefix length is too long, and PREFIX_LEN_ZERO if the prefix length
|
||||
|
@ -42,4 +46,8 @@ extern int ipv4_addr_and_mask(tvbuff_t *tvb, int offset, guint8 *addr,
|
|||
extern int ipv6_addr_and_mask(tvbuff_t *tvb, int offset,
|
||||
struct e_in6_addr *addr, guint32 prefix_len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __ADDR_AND_MASK_H__ */
|
||||
|
|
|
@ -36,6 +36,10 @@
|
|||
|
||||
#include <epan/address.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#ifndef MAXNAMELEN
|
||||
#define MAXNAMELEN 64 /* max name length (hostname and port name) */
|
||||
#endif
|
||||
|
@ -187,4 +191,8 @@ gboolean get_host_ipaddr6(const char *host, struct e_in6_addr *addrp);
|
|||
*/
|
||||
const char* host_ip_af(const char *host);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __RESOLV_H__ */
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
#ifndef __ADDRESS_H__
|
||||
#define __ADDRESS_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* Types of addresses Wireshark knows about. */
|
||||
/* If a new address type is added here, a string representation procedure should */
|
||||
/* also be included in address_to_str_buf defined in to_str.c, for presentation purposes */
|
||||
|
@ -137,5 +141,8 @@ typedef enum {
|
|||
/* Could also have ATM VPI/VCI pairs */
|
||||
} circuit_type;
|
||||
|
||||
#endif /* __ADDRESS_H__ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __ADDRESS_H__ */
|
||||
|
|
|
@ -25,6 +25,10 @@
|
|||
#ifndef __AFN_H__
|
||||
#define __AFN_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*
|
||||
* Address family numbers, from
|
||||
*
|
||||
|
@ -60,4 +64,8 @@
|
|||
#define AFNUM_L2VPN_OLD 196
|
||||
extern const value_string afn_vals[];
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __AFN_H__ */
|
||||
|
|
|
@ -24,6 +24,13 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __AFTYPES_H__
|
||||
#define __AFTYPES_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* BSD AF_ values. */
|
||||
#define BSD_AF_INET 2
|
||||
#define BSD_AF_ISO 7
|
||||
|
@ -32,3 +39,9 @@
|
|||
#define BSD_AF_INET6_BSD 24 /* OpenBSD (and probably NetBSD), BSD/OS */
|
||||
#define BSD_AF_INET6_FREEBSD 28
|
||||
#define BSD_AF_INET6_DARWIN 30
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* aftypes.h */
|
||||
|
|
|
@ -23,6 +23,13 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __ARCNET_PIDS_H__
|
||||
#define __ARCNET_PIDS_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* RFC 1051 */
|
||||
#define ARCNET_PROTO_IP_1051 240
|
||||
#define ARCNET_PROTO_ARP_1051 241
|
||||
|
@ -55,3 +62,9 @@
|
|||
#define ARCNET_PROTO_DIAGNOSE 128 /* as per ANSI/ATA 878.1 */
|
||||
|
||||
#define ARCNET_PROTO_BACNET 205
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* arcnet_pids.h */
|
||||
|
|
|
@ -25,6 +25,10 @@
|
|||
#ifndef __ARPTYPES_H__
|
||||
#define __ARPTYPES_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* Definitions taken from Linux "linux/if_arp.h" header file, and from
|
||||
|
||||
http://www.iana.org/assignments/arp-parameters
|
||||
|
@ -61,4 +65,8 @@
|
|||
#define ARPHRD_TWINAX 26 /* Twinaxial */
|
||||
#define ARPHRD_EUI_64 27 /* EUI-64 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* arptypes.h */
|
||||
|
|
|
@ -23,6 +23,11 @@
|
|||
|
||||
#include <glib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*
|
||||
* Structure used to represent a DDP address; gives the layout of the
|
||||
* data pointed to by an AT_ATALK "address" structure.
|
||||
|
@ -51,4 +56,8 @@ extern gchar *atalk_addr_to_str(const struct atalk_ddp_addr *addrp);
|
|||
extern void atalk_addr_to_str_buf(const struct atalk_ddp_addr *addrp,
|
||||
gchar *buf, int buf_len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif
|
||||
|
|
|
@ -4,10 +4,9 @@
|
|||
* $Id$
|
||||
*
|
||||
* Wireshark - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
* By Gerald Combs <gerald@wireshark.org>
|
||||
* Copyright 1998 Gerald Combs
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
|
@ -23,6 +22,19 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __BITSWAP_H__
|
||||
#define __BITSWAP_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
extern guint8 swaptab[256];
|
||||
|
||||
#define BIT_SWAP(b) (swaptab[b])
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* bitswap.h */
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
#ifndef __BRIDGED_PID_H__
|
||||
#define __BRIDGED_PID_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define BPID_ETH_WITH_FCS 0x0001 /* 802.3/Ethernet with preserved FCS */
|
||||
#define BPID_ETH_WITHOUT_FCS 0x0007 /* 802.3/Ethernet without preserved FCS */
|
||||
|
||||
|
@ -47,4 +51,8 @@
|
|||
|
||||
#define BPID_SR_BPDU 0x000F /* Source Routing BPDUs */
|
||||
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* bridged_pid.h */
|
||||
|
|
|
@ -23,13 +23,17 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __camelsrt_HASH__
|
||||
#define __camelsrt_HASH__
|
||||
#ifndef __CAMEL_PERSISTENTDATA_H__
|
||||
#define __CAMEL_PERSISTENTDATA_H__
|
||||
|
||||
#include "epan/packet.h"
|
||||
#include "epan/conversation.h"
|
||||
#include "epan/dissectors/packet-camel.h"
|
||||
#include "epan/tcap-persistentdata.h"
|
||||
#include <epan/packet.h>
|
||||
#include <epan/conversation.h>
|
||||
#include <epan/dissectors/packet-camel.h>
|
||||
#include <epan/tcap-persistentdata.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define NB_CAMELSRT_CATEGORY 9+1 /* Number of type of message */
|
||||
/* for example TC_BEGIN with InitalDP, and TC_CONT with RequestReportBCSMEvent
|
||||
|
@ -114,4 +118,8 @@ void camelsrt_call_matching(tvbuff_t *tvb,
|
|||
|
||||
WS_VAR_IMPORT gboolean gcamel_StatSRT;
|
||||
|
||||
#endif /* __camelsrt_HASH__*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* camel-persistentdata.h */
|
||||
|
|
|
@ -25,8 +25,16 @@
|
|||
#ifndef __CHDLCTYPES_H__
|
||||
#define __CHDLCTYPES_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define CHDLCTYPE_FRARP 0x0808 /* Frame Relay ARP */
|
||||
#define CHDLCTYPE_BPDU 0x4242 /* IEEE spanning tree protocol */
|
||||
#define CHDLCTYPE_OSI 0xfefe /* ISO network-layer protocols */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* chdlctypes.h */
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
|
||||
#include "packet.h" /* for circuit dissector type */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*
|
||||
* Data structure representing a circuit.
|
||||
*/
|
||||
|
@ -69,5 +73,8 @@ extern gboolean
|
|||
try_circuit_dissector(circuit_type ctype, guint32 circuit_id, guint32 frame,
|
||||
tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
|
||||
|
||||
#endif /* circuit.h */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* circuit.h */
|
||||
|
|
|
@ -31,6 +31,10 @@
|
|||
#include "column_info.h"
|
||||
#include "packet_info.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/** Maximum length of columns (except COL_INFO).
|
||||
* Internal, don't use this in dissectors!
|
||||
*/
|
||||
|
@ -205,5 +209,8 @@ extern void col_append_sep_fstr(column_info *cinfo, gint col, const gchar *sep,
|
|||
const gchar *format, ...)
|
||||
GNUC_FORMAT_CHECK(printf, 4, 5);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __COLUMN_UTILS_H__ */
|
||||
|
|
|
@ -25,6 +25,10 @@
|
|||
#ifndef __COLUMN_H__
|
||||
#define __COLUMN_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
typedef struct _fmt_data {
|
||||
gchar *title;
|
||||
gchar *fmt;
|
||||
|
@ -40,4 +44,8 @@ const gchar *get_column_width_string(gint, gint);
|
|||
const char *get_column_longest_string(gint);
|
||||
gint get_column_char_width(gint format);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* column.h */
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
|
||||
#include <glib.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define COL_MAX_LEN 256
|
||||
#define COL_MAX_INFO_LEN 4096
|
||||
|
||||
|
@ -102,13 +106,14 @@ enum {
|
|||
COL_8021Q_VLAN_ID, /* 802.1Q vlan ID */
|
||||
COL_DSCP_VALUE, /* IP DSCP Value */
|
||||
COL_COS_VALUE, /* L2 COS Value */
|
||||
COL_TEI, /* q.921 TEI */
|
||||
COL_FR_DLCI, /* Frame Relay DLCI */
|
||||
COL_BSSGP_TLLI, /* GPRS BSSGP IE TLLI */
|
||||
COL_TEI, /* Q.921 TEI */
|
||||
COL_FR_DLCI, /* Frame Relay DLCI */
|
||||
COL_BSSGP_TLLI, /* GPRS BSSGP IE TLLI */
|
||||
NUM_COL_FMTS /* Should always be last */
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __COLUMN_INFO_H__ */
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -25,6 +25,10 @@
|
|||
#ifndef __CONVERSATION_H__
|
||||
#define __CONVERSATION_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*
|
||||
* Flags to pass to "conversation_new()" to indicate that the address 2
|
||||
* and/or port 2 values for the conversation should be wildcards.
|
||||
|
@ -99,4 +103,8 @@ try_conversation_dissector(address *addr_a, address *addr_b, port_type ptype,
|
|||
extern void conversation_set_port2(conversation_t *conv, guint32 port);
|
||||
extern void conversation_set_addr2(conversation_t *conv, address *addr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* conversation.h */
|
||||
|
|
11
epan/crc16.h
11
epan/crc16.h
|
@ -26,6 +26,13 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __CRC16_H_
|
||||
#define __CRC16_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* Calculate the CCITT/ITU/CRC-16 16-bit CRC
|
||||
|
||||
(parameters for this CRC are:
|
||||
|
@ -95,4 +102,8 @@ extern guint16 crc16_ccitt_tvb_seed(tvbuff_t *tvb, guint len, guint16 seed);
|
|||
extern guint16 crc16_ccitt_tvb_offset_seed(tvbuff_t *tvb, guint offset,
|
||||
guint len, guint16 seed);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* crc16.h */
|
||||
|
|
12
epan/crc32.h
12
epan/crc32.h
|
@ -24,6 +24,13 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __CRC32_H_
|
||||
#define __CRC32_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
extern const guint32 crc32_ccitt_table[256];
|
||||
|
||||
/** Compute CRC32 CCITT checksum of a buffer of data.
|
||||
|
@ -80,3 +87,8 @@ extern guint32 crc32_ccitt_tvb_offset_seed(tvbuff_t *tvb, guint offset,
|
|||
@return The IEEE 802.x CRC32 checksum. */
|
||||
extern guint32 crc32_802_tvb(tvbuff_t *tvb, guint len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* crc32.h */
|
||||
|
|
|
@ -46,6 +46,10 @@
|
|||
#include "epan.h"
|
||||
#include "tfs.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define hi_nibble(b) (((b) & 0xf0) >> 4)
|
||||
#define lo_nibble(b) ((b) & 0x0f)
|
||||
|
||||
|
@ -402,4 +406,8 @@ extern void dissector_dump_decodes(void);
|
|||
extern void register_postdissector(dissector_handle_t);
|
||||
extern void call_all_postdissectors(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* packet.h */
|
||||
|
|
|
@ -51,6 +51,10 @@
|
|||
#include "tvbuff.h"
|
||||
#include "ftypes/ftypes.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/** The header-field index for the special text pseudo-field. Exported by libwireshark.dll */
|
||||
WS_VAR_IMPORT int hf_text_only;
|
||||
|
||||
|
@ -1556,4 +1560,8 @@ proto_find_field_from_offset(proto_tree *tree, guint offset, tvbuff_t *tvb);
|
|||
extern proto_item *
|
||||
proto_tree_add_bitmask(proto_tree *tree, tvbuff_t *tvb, int offset, int hf_hdr, gint ett, const int **fields, gboolean little_endian);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* proto.h */
|
||||
|
|
|
@ -35,6 +35,10 @@
|
|||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* Encapsulation types. Choose names that truly reflect
|
||||
* what is contained in the packet trace file.
|
||||
*
|
||||
|
@ -681,5 +685,8 @@ void wtap_set_bytes_dumped(wtap_dumper *wdh, gint64 bytes_dumped);
|
|||
#define WTAP_ERR_ZLIB_MAX -100
|
||||
#define WTAP_ERR_ZLIB_MIN -300
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __WTAP_H__ */
|
||||
|
|
Loading…
Reference in New Issue