diff options
author | Jaap Keuter <jaap.keuter@xs4all.nl> | 2007-09-10 07:21:27 +0000 |
---|---|---|
committer | Jaap Keuter <jaap.keuter@xs4all.nl> | 2007-09-10 07:21:27 +0000 |
commit | e1541263e4d7a337fbcadfbfc480cc7fbcdbc9d9 (patch) | |
tree | 2df2f760d637ae9a2b5b1c99c6f69828974641be /plugins/unistim/packet-unistim.h | |
parent | 070cf8b006eb507c26d71e1a31e64165ec6f498e (diff) | |
download | wireshark-e1541263e4d7a337fbcadfbfc480cc7fbcdbc9d9.tar.gz wireshark-e1541263e4d7a337fbcadfbfc480cc7fbcdbc9d9.tar.bz2 wireshark-e1541263e4d7a337fbcadfbfc480cc7fbcdbc9d9.zip |
From Chad Singer:
UNISTIM Tap interface plus call grapher.
svn path=/trunk/; revision=22834
Diffstat (limited to 'plugins/unistim/packet-unistim.h')
-rw-r--r-- | plugins/unistim/packet-unistim.h | 131 |
1 files changed, 19 insertions, 112 deletions
diff --git a/plugins/unistim/packet-unistim.h b/plugins/unistim/packet-unistim.h index 7922b82d52..8dedf0d050 100644 --- a/plugins/unistim/packet-unistim.h +++ b/plugins/unistim/packet-unistim.h @@ -27,118 +27,25 @@ #ifndef PACKET_UNISTIM_H #define PACKET_UNISTIM_H -#include "defines.h" -#include "audio.h" -#include "basic.h" -#include "display.h" -#include "network.h" -#include "key.h" -#include "broadcast.h" - - -static void dissect_payload(proto_tree *unistim_tree,tvbuff_t *tvb,gint offset); -static void dissect_unistim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -static dissector_handle_t unistim_handle; - -static void dissect_broadcast_switch(proto_tree *msg_tree,proto_tree *unistim_tree, - tvbuff_t *tvb,gint offset,guint msg_len); -static void dissect_audio_switch(proto_tree *msg_tree,proto_tree *unistim_tree, - tvbuff_t *tvb,gint offset,guint msg_len); -static void dissect_display_switch(proto_tree *msg_tree,proto_tree *unistim_tree, - tvbuff_t *tvb,gint offset,guint msg_len); -static void dissect_key_indicator_switch(proto_tree *msg_tree,proto_tree *unistim_tree, - tvbuff_t *tvb,gint offset,guint msg_len); -static void dissect_basic_switch(proto_tree *msg_tree,proto_tree *unistim_tree, - tvbuff_t *tvb,gint offset,guint msg_len); -static void dissect_network_switch(proto_tree *msg_tree,proto_tree *unistim_tree, - tvbuff_t *tvb,gint offset,guint msg_len); -static void dissect_broadcast_phone(proto_tree *msg_tree,proto_tree *unistim_tree, - tvbuff_t *tvb,gint offset,guint msg_len); -static void dissect_audio_phone(proto_tree *msg_tree,proto_tree *unistim_tree, - tvbuff_t *tvb,gint offset,guint msg_len); -static void dissect_display_phone(proto_tree *msg_tree,proto_tree *unistim_tree, - tvbuff_t *tvb,gint offset,guint msg_len); -static void dissect_key_indicator_phone(proto_tree *msg_tree,proto_tree *unistim_tree, - tvbuff_t *tvb,gint offset,guint msg_len); -static void dissect_basic_phone(proto_tree *msg_tree,proto_tree *unistim_tree, - tvbuff_t *tvb,gint offset,guint msg_len); -static void dissect_network_phone(proto_tree *msg_tree,proto_tree *unistim_tree, - tvbuff_t *tvb,gint offset,guint msg_len); -static void dissect_message(proto_tree *unistim_tree, tvbuff_t *tvb,gint offset); -static void set_ascii_item(proto_tree *unistim_tree, tvbuff_t *tvb, - gint offset,guint msg_len); -static void set_ascii_null_term_item(proto_tree *msg_tree,tvbuff_t *tvb, - gint offset,guint msg_len, char *label); - - -static int proto_unistim = -1; -static int hf_unistim_seq_nu = -1; -static int hf_unistim_packet_type = -1; -static int hf_unistim_payload = -1; -static int hf_unistim_cmd_add = -1; -static int hf_unistim_len =-1; -static int hf_terminal_id=-1; -static int hf_basic_bit_field=-1; -static const true_false_string basic_bit_yn={ - "For Following Byte", - "For Following Byte" -}; - -static int hf_basic_switch_cmd=-1; -static int hf_basic_phone_cmd=-1; -static int hf_broadcast_switch_cmd=-1; -static int hf_broadcast_phone_cmd=-1; -static int hf_audio_switch_cmd=-1; -static int hf_audio_phone_cmd=-1; -static int hf_display_switch_cmd=-1; -static int hf_display_phone_cmd=-1; -static int hf_key_switch_cmd=-1; -static int hf_key_phone_cmd=-1; -static int hf_network_switch_cmd=-1; -static int hf_network_phone_cmd=-1; - - -static int hf_generic_data=-1; -static int hf_generic_string=-1; - -static gint ett_unistim = -1; - -static const value_string packet_names[]={ - {0,"NAK"}, - {1,"ACK"}, - {2,"Payload"}, - {0,NULL} -}; - -static const value_string payload_names[]={ - {0x00,"NULL Protocol"}, - {0x01,"Aggregate Unistim"}, - {0x02,"Aggregate Unistim with Terminal ID"}, - {0xff,"Free Form Protocol"}, - {0,NULL} -}; - -static const range_string sequence_numbers[]={ - {0x00,0xFFFFFFFE,"Normal Sequence Number"}, - {0xFFFFFFFF,0xFFFFFFFF, "RESET Sequence Number"}, - {0,0,NULL} -}; - -static const value_string command_address[]={ - {0x11,"Broadcast Manager Switch"}, - {0x16,"Audio Manager Switch"}, - {0x17,"Display Manager Switch"}, - {0x19,"Key/Indicator Manager Switch"}, - {0x1a,"Basic Manager Switch"}, - {0x1e,"Network Manager Switch"}, - {0x91,"Broadcast Manager Phone"}, - {0x96,"Audio Manager Phone"}, - {0x97,"Display Manager Phone"}, - {0x99,"Key/Indicator Manager Phone"}, - {0x9a,"Basic Manager Phone"}, - {0x9e,"Network Manager Phone"}, - {0,NULL} -}; +typedef struct _unistim_info_t +{ + guint8 rudp_type; /* NAK, ACK, Payload */ + guint8 payload_type; /* unistim payload type (aggregate, non-aggregate, encapsulated) */ + guint32 sequence; /* rudp sequence number */ + guint32 termid; /* termid if available */ + address it_ip; /* IP addr of it, determined by who is sending termids */ + guint32 it_port; /* port of it (phone) */ + address ni_ip; /* IP addr of ni (server) as determined by who's sending termids */ + gint key_val; /* actual key pressed (-1 if not used) */ + gint key_state; /* Key state 1=down 0=up */ + gint hook_state; /* Hook state 1=offhook 0=onhook */ + gint stream_connect; /* Audio stream connect 1=connect 0=disconnect */ + gint trans_connect; /* Transducer connect? 1=connect 0=disconnect */ + gint set_termid; /* Set the termid 1=set termid */ + guint8 *string_data; /* Any time a string is written to the display, this has the string */ + gint call_state; /* Not used? */ + guchar *key_buffer; /* Used in voip-calls.c tap, holds call keys pressed */ +} unistim_info_t; #endif |