epan: Normalize conversation code indentation.
Change the indentation of conversation.[ch] to 4 spaces to match conversation_table.[ch] and conversation_filter.[ch].
This commit is contained in:
parent
6739d0397b
commit
b09263f1a3
|
@ -25,10 +25,6 @@ indent_size = 2
|
|||
[column.[ch]]
|
||||
indent_size = 2
|
||||
|
||||
[conversation.[ch]]
|
||||
indent_style = tab
|
||||
indent_size = tab
|
||||
|
||||
[crc32-tvb.[ch]]
|
||||
indent_style = tab
|
||||
indent_size = tab
|
||||
|
|
|
@ -475,7 +475,8 @@ conversation_init(void)
|
|||
/**
|
||||
* Initialize some variables every time a file is loaded or re-loaded.
|
||||
*/
|
||||
void conversation_epan_reset(void)
|
||||
void
|
||||
conversation_epan_reset(void)
|
||||
{
|
||||
/*
|
||||
* Start the conversation indices over at 0.
|
||||
|
@ -613,10 +614,10 @@ conversation_t *
|
|||
conversation_new(const guint32 setup_frame, const address *addr1, const address *addr2,
|
||||
const endpoint_type etype, const guint32 port1, const guint32 port2, const guint options)
|
||||
{
|
||||
/*
|
||||
/*
|
||||
DISSECTOR_ASSERT(!(options | CONVERSATION_TEMPLATE) || ((options | (NO_ADDR2 | NO_PORT2 | NO_PORT2_FORCE))) &&
|
||||
"A conversation template may not be constructed without wildcard options");
|
||||
*/
|
||||
*/
|
||||
wmem_map_t* hashtable;
|
||||
conversation_t *conversation=NULL;
|
||||
conversation_key_t new_key;
|
||||
|
@ -760,7 +761,8 @@ conversation_new(const guint32 setup_frame, const address *addr1, const address
|
|||
return conversation;
|
||||
}
|
||||
|
||||
conversation_t *conversation_new_by_id(const guint32 setup_frame, const endpoint_type etype, const guint32 id, const guint options)
|
||||
conversation_t *
|
||||
conversation_new_by_id(const guint32 setup_frame, const endpoint_type etype, const guint32 id, const guint options)
|
||||
{
|
||||
/* Force the lack of an address or port 2 */
|
||||
return conversation_new(setup_frame, NULL, NULL, etype, id, 0, options | NO_ADDR2 | NO_PORT2);
|
||||
|
@ -1288,7 +1290,8 @@ end:
|
|||
return conversation;
|
||||
}
|
||||
|
||||
conversation_t *find_conversation_by_id(const guint32 frame, const endpoint_type etype, const guint32 id, const guint options)
|
||||
conversation_t *
|
||||
find_conversation_by_id(const guint32 frame, const endpoint_type etype, const guint32 id, const guint options)
|
||||
{
|
||||
/* Force the lack of a address or port B */
|
||||
return find_conversation(frame, &null_address_, &null_address_, etype, id, 0, options|NO_ADDR_B|NO_PORT_B);
|
||||
|
@ -1350,7 +1353,8 @@ conversation_get_dissector(conversation_t *conversation, const guint32 frame_num
|
|||
return (dissector_handle_t)wmem_tree_lookup32_le(conversation->dissector_tree, frame_num);
|
||||
}
|
||||
|
||||
static gboolean try_conversation_call_dissector_helper(conversation_t *conversation, gboolean* dissector_success,
|
||||
static gboolean
|
||||
try_conversation_call_dissector_helper(conversation_t *conversation, gboolean* dissector_success,
|
||||
tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
|
||||
{
|
||||
int ret;
|
||||
|
@ -1537,7 +1541,8 @@ find_or_create_conversation_by_id(packet_info *pinfo, const endpoint_type etype,
|
|||
return conv;
|
||||
}
|
||||
|
||||
void conversation_create_endpoint(struct _packet_info *pinfo, address* addr1, address* addr2,
|
||||
void
|
||||
conversation_create_endpoint(struct _packet_info *pinfo, address* addr1, address* addr2,
|
||||
endpoint_type etype, guint32 port1, guint32 port2, const guint options)
|
||||
{
|
||||
pinfo->conv_endpoint = wmem_new0(pinfo->pool, struct endpoint);
|
||||
|
@ -1555,14 +1560,16 @@ void conversation_create_endpoint(struct _packet_info *pinfo, address* addr1, ad
|
|||
pinfo->conv_endpoint->options = options;
|
||||
}
|
||||
|
||||
void conversation_create_endpoint_by_id(struct _packet_info *pinfo,
|
||||
void
|
||||
conversation_create_endpoint_by_id(struct _packet_info *pinfo,
|
||||
endpoint_type etype, guint32 id, const guint options)
|
||||
{
|
||||
/* Force the lack of a address or port B */
|
||||
conversation_create_endpoint(pinfo, &null_address_, &null_address_, etype, id, 0, options|NO_ADDR_B|NO_PORT_B);
|
||||
}
|
||||
|
||||
guint32 conversation_get_endpoint_by_id(struct _packet_info *pinfo, endpoint_type etype, const guint options)
|
||||
guint32
|
||||
conversation_get_endpoint_by_id(struct _packet_info *pinfo, endpoint_type etype, const guint options)
|
||||
{
|
||||
if (pinfo->conv_endpoint == NULL)
|
||||
return 0;
|
||||
|
@ -1678,11 +1685,11 @@ conversation_get_html_hash(const conversation_key_t key)
|
|||
* Editor modelines - https://www.wireshark.org/tools/modelines.html
|
||||
*
|
||||
* Local variables:
|
||||
* c-basic-offset: 8
|
||||
* c-basic-offset: 4
|
||||
* tab-width: 8
|
||||
* indent-tabs-mode: t
|
||||
* indent-tabs-mode: nil
|
||||
* End:
|
||||
*
|
||||
* vi: set shiftwidth=8 tabstop=8 noexpandtab:
|
||||
* :indentSize=8:tabSize=8:noTabs=false:
|
||||
* vi: set shiftwidth=4 tabstop=8 expandtab:
|
||||
* :indentSize=4:tabSize=8:noTabs=true:
|
||||
*/
|
||||
|
|
|
@ -202,8 +202,7 @@ WS_DLL_PUBLIC conversation_t *find_or_create_conversation_by_id(packet_info *pin
|
|||
* @param proto Protocol ID.
|
||||
* @param proto_data Pointer to the data to associate.
|
||||
*/
|
||||
WS_DLL_PUBLIC void conversation_add_proto_data(conversation_t *conv, const int proto,
|
||||
void *proto_data);
|
||||
WS_DLL_PUBLIC void conversation_add_proto_data(conversation_t *conv, const int proto, void *proto_data);
|
||||
|
||||
/** Fetch data associated with a conversation.
|
||||
* @param conv Conversation. Must not be NULL.
|
||||
|
@ -218,14 +217,12 @@ WS_DLL_PUBLIC void *conversation_get_proto_data(const conversation_t *conv, cons
|
|||
*/
|
||||
WS_DLL_PUBLIC void conversation_delete_proto_data(conversation_t *conv, const int proto);
|
||||
|
||||
WS_DLL_PUBLIC void conversation_set_dissector(conversation_t *conversation,
|
||||
const dissector_handle_t handle);
|
||||
WS_DLL_PUBLIC void conversation_set_dissector(conversation_t *conversation, const dissector_handle_t handle);
|
||||
|
||||
WS_DLL_PUBLIC void conversation_set_dissector_from_frame_number(conversation_t *conversation,
|
||||
const guint32 starting_frame_num, const dissector_handle_t handle);
|
||||
|
||||
WS_DLL_PUBLIC dissector_handle_t conversation_get_dissector(conversation_t *conversation,
|
||||
const guint32 frame_num);
|
||||
WS_DLL_PUBLIC dissector_handle_t conversation_get_dissector(conversation_t *conversation, const guint32 frame_num);
|
||||
|
||||
WS_DLL_PUBLIC void conversation_create_endpoint(struct _packet_info *pinfo, address* addr1, address* addr2,
|
||||
endpoint_type etype, guint32 port1, guint32 port2, const guint options);
|
||||
|
@ -246,47 +243,37 @@ WS_DLL_PUBLIC guint32 conversation_get_endpoint_by_id(struct _packet_info *pinfo
|
|||
* Our caller is responsible to call the data dissector explicitly in case
|
||||
* this function returns FALSE.
|
||||
*/
|
||||
WS_DLL_PUBLIC gboolean
|
||||
try_conversation_dissector(const address *addr_a, const address *addr_b, const endpoint_type etype,
|
||||
WS_DLL_PUBLIC gboolean try_conversation_dissector(const address *addr_a, const address *addr_b, const endpoint_type etype,
|
||||
const guint32 port_a, const guint32 port_b, tvbuff_t *tvb, packet_info *pinfo,
|
||||
proto_tree *tree, void* data, const guint options);
|
||||
|
||||
WS_DLL_PUBLIC gboolean
|
||||
try_conversation_dissector_by_id(const endpoint_type etype, const guint32 id, tvbuff_t *tvb,
|
||||
WS_DLL_PUBLIC gboolean try_conversation_dissector_by_id(const endpoint_type etype, const guint32 id, tvbuff_t *tvb,
|
||||
packet_info *pinfo, proto_tree *tree, void* data);
|
||||
|
||||
/* These routines are used to set undefined values for a conversation */
|
||||
|
||||
WS_DLL_PUBLIC
|
||||
void conversation_set_port2(conversation_t *conv, const guint32 port);
|
||||
WS_DLL_PUBLIC
|
||||
void conversation_set_addr2(conversation_t *conv, const address *addr);
|
||||
WS_DLL_PUBLIC void conversation_set_port2(conversation_t *conv, const guint32 port);
|
||||
|
||||
WS_DLL_PUBLIC
|
||||
wmem_map_t *get_conversation_hashtable_exact(void);
|
||||
WS_DLL_PUBLIC void conversation_set_addr2(conversation_t *conv, const address *addr);
|
||||
|
||||
WS_DLL_PUBLIC
|
||||
wmem_map_t *get_conversation_hashtable_no_addr2(void);
|
||||
WS_DLL_PUBLIC wmem_map_t *get_conversation_hashtable_exact(void);
|
||||
|
||||
WS_DLL_PUBLIC
|
||||
wmem_map_t * get_conversation_hashtable_no_port2(void);
|
||||
WS_DLL_PUBLIC wmem_map_t *get_conversation_hashtable_no_addr2(void);
|
||||
|
||||
WS_DLL_PUBLIC
|
||||
wmem_map_t *get_conversation_hashtable_no_addr2_or_port2(void);
|
||||
WS_DLL_PUBLIC wmem_map_t * get_conversation_hashtable_no_port2(void);
|
||||
|
||||
WS_DLL_PUBLIC wmem_map_t *get_conversation_hashtable_no_addr2_or_port2(void);
|
||||
|
||||
/* Temporary function to handle port_type to endpoint_type conversion
|
||||
For now it's a 1-1 mapping, but the intention is to remove
|
||||
many of the port_type instances in favor of endpoint_type
|
||||
*/
|
||||
WS_DLL_PUBLIC
|
||||
endpoint_type conversation_pt_to_endpoint_type(port_type pt);
|
||||
*/
|
||||
WS_DLL_PUBLIC endpoint_type conversation_pt_to_endpoint_type(port_type pt);
|
||||
|
||||
WS_DLL_PUBLIC guint
|
||||
conversation_hash_exact(gconstpointer v);
|
||||
WS_DLL_PUBLIC guint conversation_hash_exact(gconstpointer v);
|
||||
|
||||
/* Provide a wmem_alloced (NULL scope) hash string using HTML tags */
|
||||
WS_DLL_PUBLIC gchar*
|
||||
conversation_get_html_hash(const conversation_key_t key);
|
||||
WS_DLL_PUBLIC gchar *conversation_get_html_hash(const conversation_key_t key);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -29,8 +29,8 @@ extern int _debug_conversation_indent; /* the instance is in conversation.c */
|
|||
g_printerr("%*.*s%s: ", \
|
||||
_debug_conversation_indent,_debug_conversation_indent," ", \
|
||||
G_STRLOC); \
|
||||
g_printerr arg; \
|
||||
g_printerr("\n")
|
||||
g_printerr arg; \
|
||||
g_printerr("\n")
|
||||
|
||||
#define DPRINT2(arg) \
|
||||
g_printerr("%*.*s", \
|
||||
|
|
Loading…
Reference in New Issue