mirror of
https://github.com/adrcs/ip400.git
synced 2025-07-02 02:01:18 +03:00
Added wireshark dissector files
This commit is contained in:
parent
c09daade2a
commit
e8d8277b68
17
Wireshark/Read.Me
Normal file
17
Wireshark/Read.Me
Normal file
|
@ -0,0 +1,17 @@
|
|||
This folder contains files for wireshark and Notepad++ to facilitate
|
||||
ethernet development and debugging.
|
||||
|
||||
The two files, IP400.wsgd and IP400.fdesc, are scripts for the wireshark generic dissector that
|
||||
recognizes IP400 packet formats. It will be added to as time goes on.
|
||||
|
||||
To install them, you will first need to install the generic dissector. See the instructions from
|
||||
the author at http://wsgd.free.fr/installation.html. Place these two files in the same directory
|
||||
as the dissector to start viewing packets.
|
||||
|
||||
If they are being interpreted as something different, then disable the protocol that is being
|
||||
used instead. You can always enable it again later.
|
||||
|
||||
The xml file is a custom language interpreter for notepad++, which does syntax highlighting
|
||||
for dissector scripts. Open the user defined language folder under the 'Language' menu, and place
|
||||
this file in there.
|
||||
|
79
Wireshark/WSGD.xml
Normal file
79
Wireshark/WSGD.xml
Normal file
|
@ -0,0 +1,79 @@
|
|||
<!--
|
||||
|
||||
notepad++ user HighLighter definition file for WireShark Generic Dissector (WSGD)
|
||||
2019/01/17 Sylvain Mesnage
|
||||
-->
|
||||
<NotepadPlus>
|
||||
<UserLang name="WSGD" ext="wsgd fdesc" udlVersion="2.1">
|
||||
<Settings>
|
||||
<Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="0" decimalSeparator="0"/>
|
||||
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no"/>
|
||||
</Settings>
|
||||
<KeywordLists>
|
||||
<Keywords name="Comments">00# 01 02 03# 04((EOL))</Keywords>
|
||||
<Keywords name="Numbers, prefix1"/>
|
||||
<Keywords name="Numbers, prefix2">0x</Keywords>
|
||||
<Keywords name="Numbers, extras1">A B C D E F a b c d e f</Keywords>
|
||||
<Keywords name="Numbers, extras2"/>
|
||||
<Keywords name="Numbers, suffix1"/>
|
||||
<Keywords name="Numbers, suffix2"/>
|
||||
<Keywords name="Numbers, range"/>
|
||||
<Keywords name="Operators1">+ - / * % : ; !</Keywords>
|
||||
<Keywords name="Operators2"/>
|
||||
<Keywords name="Folders in code1, open">{</Keywords>
|
||||
<Keywords name="Folders in code1, middle"/>
|
||||
<Keywords name="Folders in code1, close">}</Keywords>
|
||||
<Keywords name="Folders in code2, open"/>
|
||||
<Keywords name="Folders in code2, middle"/>
|
||||
<Keywords name="Folders in code2, close"/>
|
||||
<Keywords name="Folders in comment, open"/>
|
||||
<Keywords name="Folders in comment, middle"/>
|
||||
<Keywords name="Folders in comment, close"/>
|
||||
<Keywords name="Keywords1">
|
||||
PROTONAME PROTOSHORTNAME PROTOABBREV PARENT_SUBFIELD PARENT_SUBFIELD_VALUES PARENT_SUBFIELD_RANGE PARENT_HEURISTIC HEURISTIC_FUNCTION MSG_HEADER_TYPE MSG_ID_FIELD_NAME MSG_TITLE MSG_SUMMARY_SUBSIDIARY_FIELD_NAMES MSG_TOTAL_LENGTH MSG_MAIN_TYPE MSG_FROM_MAIN_TYPE MSG_TO_MAIN_TYPE GLOBAL_DATA_TYPE PROTO_TYPE_DEFINITIONS SUBFIELD PACKET_CONTAINS_ONLY_COMPLETE_MSG PACKET_CONTAINS_ONLY_1_MSG MANAGE_WIRESHARK_PINFO
|
||||
</Keywords>
|
||||
<Keywords name="Keywords2">
|
||||
alias any as_host const big_endian break byte_order case chat continue default do else error fatal frame forget function goto_position if in in_out insproto little_endian loop_size_bits loop_size_bytes move_position_bits move_position_bytes msg nil no note out output override padding_bits raw return save_position set show spare struct subproto switch var void warning while yes
|
||||
</Keywords>
|
||||
<Keywords name="Keywords3">
|
||||
hide include print debug_print to_integer to_string to_numeric to_float getenv
|
||||
</Keywords>
|
||||
<Keywords name="Keywords4">
|
||||
bitfield8 bitfield16 bitfield24 bitfield32 bool1 bool8 bool16 bool32 enum1 enum2 enum3 enum4 enum5 enum6 enum7 enum8 enum9 enum10 enum11 enum12 enum13 enum14 enum15 enum16 enum17 enum18 enum19 enum20 enum21 enum22 enum23 enum24 enum25 enum26 enum27 enum28 enum29 enum30 enum31 enum32 float32 float64 int2 int3 int4 int5 int6 int7 int8 int9 int10 int11 int12 int13 int14 int15 int16 int17 int18 int19 int20 int21 int22 int23 int24 int25 int26 int27 int28 int29 int30 int31 int32 int40 int48 int64 schar string string_nl uchar uint1 uint2 uint3 uint4 uint5 uint6 uint7 uint8 uint9 uint10 uint11 uint12 uint13 uint14 uint15 uint16 uint17 uint18 uint19 uint20 uint21 uint22 uint23 uint24 uint25 uint26 uint27 uint28 uint29 uint30 uint31 uint32 uint40 uint48
|
||||
</Keywords>
|
||||
<Keywords name="Keywords5"/>
|
||||
<Keywords name="Keywords6"/>
|
||||
<Keywords name="Keywords7"/>
|
||||
<Keywords name="Keywords8"/>
|
||||
<Keywords name="Delimiters">
|
||||
00" 01\ 02" 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
||||
</Keywords>
|
||||
</KeywordLists>
|
||||
<Styles>
|
||||
<WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0"/>
|
||||
<WordsStyle name="COMMENTS" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0"/>
|
||||
<WordsStyle name="LINE COMMENTS" fgColor="0000FF" bgColor="FFFFFF" fontStyle="2" nesting="0"/>
|
||||
<WordsStyle name="NUMBERS" fgColor="FF00FF" bgColor="FFFFFF" fontStyle="0" nesting="0"/>
|
||||
<WordsStyle name="KEYWORDS1" fgColor="800080" bgColor="FFFFFF" fontStyle="1" nesting="0"/>
|
||||
<WordsStyle name="KEYWORDS2" fgColor="804040" bgColor="FFFFFF" fontStyle="1" nesting="0"/>
|
||||
<WordsStyle name="KEYWORDS3" fgColor="008080" bgColor="FFFFFF" fontStyle="0" nesting="0"/>
|
||||
<WordsStyle name="KEYWORDS4" fgColor="008080" bgColor="FFFFFF" fontStyle="1" nesting="0"/>
|
||||
<WordsStyle name="KEYWORDS5" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0"/>
|
||||
<WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0"/>
|
||||
<WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0"/>
|
||||
<WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0"/>
|
||||
<WordsStyle name="OPERATORS" fgColor="008080" bgColor="FFFFFF" fontStyle="0" nesting="0"/>
|
||||
<WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0"/>
|
||||
<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0"/>
|
||||
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0"/>
|
||||
<WordsStyle name="DELIMITERS1" fgColor="FF00FF" bgColor="FFFFFF" fontStyle="0" nesting="0"/>
|
||||
<WordsStyle name="DELIMITERS2" fgColor="FF0000" bgColor="FFFFFF" fontStyle="0" nesting="0"/>
|
||||
<WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0"/>
|
||||
<WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0"/>
|
||||
<WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0"/>
|
||||
<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0"/>
|
||||
<WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0"/>
|
||||
<WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0"/>
|
||||
</Styles>
|
||||
</UserLang>
|
||||
</NotepadPlus>
|
208
Wireshark/ip400.fdesc
Normal file
208
Wireshark/ip400.fdesc
Normal file
|
@ -0,0 +1,208 @@
|
|||
#
|
||||
# IP400 Dissection field descriptions
|
||||
# file usrp.fdesc
|
||||
# M. Alcock, VE6VH (c)
|
||||
# this template dissects IP400 packets
|
||||
|
||||
###########################################
|
||||
# ip400 packet encoding
|
||||
###########################################
|
||||
enum8 T_ip400_msg_type
|
||||
{
|
||||
text_packet 0 # text packet
|
||||
audio_packet 1 # compressed audio packet
|
||||
video_packet 2 # compressed video packet
|
||||
data_packet 3 # data packet
|
||||
beacon_packet 4 # ping packet
|
||||
ip_packet 5 # endcapsulted ip
|
||||
ax25_packet 6 # ax.25 frame
|
||||
dtmf_frame 7 # dtmf frame
|
||||
dmr_frame 8 # dmr frame
|
||||
dstar_frame 9 # dstar frame
|
||||
tia_project25 10 # p25
|
||||
nxdn_frame 11 # nxdn
|
||||
m17_frame 12 # m17
|
||||
unused_frame_1 13
|
||||
unused_frame_2 14
|
||||
command_frame 15 # local command frame
|
||||
}
|
||||
# Frame status
|
||||
enum8 T_Frame_Status
|
||||
{
|
||||
Status_NO_DATA 0 # No data
|
||||
Status_Complete 1 # Complete Frame
|
||||
Status_Fragment 2 # Fragment
|
||||
Status_Reassem 3 # Reassembled Frame
|
||||
}
|
||||
|
||||
#data rate interpretation
|
||||
switch T_Status_Switch
|
||||
{
|
||||
case T_Frame_Status::Status_NO_DATA : print ("?Invalid") ;
|
||||
case T_Frame_Status::Status_Complete : print ("Complete Frame") ;
|
||||
case T_Frame_Status::Status_Fragment : print ("Fragment") ;
|
||||
case T_Frame_Status::Status_Reassem : print ("Reassembled Frame") ;
|
||||
}
|
||||
|
||||
###########################################
|
||||
# ip400 message header
|
||||
###########################################
|
||||
struct T_ip400_header
|
||||
{
|
||||
byte_order big_endian;
|
||||
string(4) eye; # eye: ip+400
|
||||
hide uint8 status; # status field
|
||||
T_Status_Switch(status) Frame_Status;
|
||||
uint16 offset; # offset
|
||||
uint16 length; # length
|
||||
byte_order little_endian;
|
||||
uint32{d=hex} fromCall; # from callsign
|
||||
byte_order big_endian;
|
||||
uint16 fromport; # from port
|
||||
uint32{d=hex} toCall; # to call sign
|
||||
uint16 toport; # to port
|
||||
T_ip400_msg_type msg_id; # message type
|
||||
}
|
||||
|
||||
###########################################
|
||||
# ip400 message flags
|
||||
###########################################
|
||||
struct T_ip400_flags
|
||||
{
|
||||
uint8 hopcount; # hop count
|
||||
bool1 canrepeat; # can repeat
|
||||
bool1 connectionless; # is connectionless
|
||||
bool1 iscommand; # is a command
|
||||
bool1 destext; # dest callsign extended
|
||||
bool1 srcext; # src callsign extended
|
||||
bool1 hasHopTable; # has a hop table
|
||||
uint2 compression; # compression types
|
||||
uint32{d=hex}[hopcount] hopTable; # hop table
|
||||
}
|
||||
|
||||
###########################################
|
||||
# decodes for the main message types
|
||||
###########################################
|
||||
# default packet type
|
||||
struct T_ip400_packet
|
||||
{
|
||||
T_ip400_header header;
|
||||
T_ip400_flags flags;
|
||||
raw(*) data;
|
||||
}
|
||||
|
||||
# data rate definitions
|
||||
enum8 T_Data_Rates
|
||||
{
|
||||
Rate_2FSK_1200 0 # FSK 1200 bps
|
||||
Rate_C4FM_9600 1 # C4FM 9600
|
||||
Rate_4FSK_56Kb 2 # 4 FSK 56Kb
|
||||
Rate_4FSK_100Kb 3 # 4 FSK 100Kb
|
||||
Rate_4FSK_200Kb 4 # 4 FSK 200Kb
|
||||
Rate_4FSK_300Kb 5 # 4 FSK 300Kb
|
||||
Rate_4FSK_400Kb 6 # 4 FSK 400Kb
|
||||
Rate_4FSK_600Kb 7 # 4 FSK 600Kb
|
||||
Rate_OFDM_400Kb 8 # OFDM 400Kb
|
||||
Rate_OFDM_800Kb 9 # OFDM 800Kb
|
||||
Rate_OFDM_1200Kb 10 # OFDM 1200Kb
|
||||
Rate_OFDM_1600Kb 11 # OFDM 1600Kb
|
||||
Rate_OFDM_2400Kb 12 # OFDM 2400Kb
|
||||
}
|
||||
|
||||
#data rate interpretation
|
||||
switch T_Rate_Switch
|
||||
{
|
||||
case T_Data_Rates::Rate_2FSK_1200 : print ("FSK 1200bps") ;
|
||||
case T_Data_Rates::Rate_C4FM_9600 : print ("C4FM 9600bps") ;
|
||||
case T_Data_Rates::Rate_4FSK_56Kb : print ("4FSK 56Kbps") ;
|
||||
case T_Data_Rates::Rate_4FSK_100Kb : print ("4FSK 100Kbps") ;
|
||||
case T_Data_Rates::Rate_4FSK_200Kb : print ("4FSK 200Kbps") ;
|
||||
case T_Data_Rates::Rate_4FSK_300Kb : print ("4FSK 300Kbps") ;
|
||||
case T_Data_Rates::Rate_4FSK_400Kb : print ("4FSK 400Kbps") ;
|
||||
case T_Data_Rates::Rate_4FSK_600Kb : print ("4FSK 600Kbps") ;
|
||||
case T_Data_Rates::Rate_OFDM_400Kb : print ("OFDM 400Kbps") ;
|
||||
case T_Data_Rates::Rate_OFDM_800Kb : print ("OFDM 800Kbps") ;
|
||||
case T_Data_Rates::Rate_OFDM_1200Kb : print ("OFDM 1200Kbps") ;
|
||||
case T_Data_Rates::Rate_OFDM_1600Kb : print ("OFDM 1600Kbps") ;
|
||||
case T_Data_Rates::Rate_OFDM_2400Kb : print ("OFDM 2400Kbps") ;
|
||||
}
|
||||
|
||||
#fix type interpretation
|
||||
switch T_fixType_switch
|
||||
{
|
||||
case "FXD" : print ("Supplied Data");
|
||||
case "GPS" : print ("GPS Receiver");
|
||||
default : print ("Unknown");
|
||||
}
|
||||
|
||||
# beacon header
|
||||
struct T_ip400_beacon_header
|
||||
{
|
||||
hide uint3 rate_spec;
|
||||
T_Rate_Switch(rate_spec) Rate;
|
||||
bool1 extCall;
|
||||
bool1 canRepeat;
|
||||
bool1 isAREDN;
|
||||
bool1 hssOFDM;
|
||||
bool1 hasFSK;
|
||||
hide uint8 TxOut;
|
||||
print ("Tx Power +%d dBm", TxOut);
|
||||
hide uint8 firm_major;
|
||||
hide uint8 firm_minor;
|
||||
print ("Firmware V%c.%c", firm_major, firm_minor);
|
||||
}
|
||||
|
||||
# beacon position info
|
||||
struct T_ip400_beacon_pos
|
||||
{
|
||||
hide string(3) fixType;
|
||||
T_fixType_switch(fixType) Fix_Source;
|
||||
hide string(1) delimeter;
|
||||
string Position;
|
||||
}
|
||||
|
||||
# beacon packet
|
||||
struct T_ip400_beacon
|
||||
{
|
||||
T_ip400_header Header;
|
||||
T_ip400_flags Flags;
|
||||
T_ip400_beacon_header Beacon_Header;
|
||||
T_ip400_beacon_pos Position;
|
||||
}
|
||||
|
||||
# T_ip400_msg_type is the main message (as defined in the protocol description)
|
||||
# according to the parameter msg_id (of type t_usrp_msg_type), we define
|
||||
# the main message to be defined by one of the message types
|
||||
switch T_ip400_switch T_ip400_msg_type
|
||||
{
|
||||
case T_ip400_msg_type::text_packet : T_ip400_packet "";
|
||||
case T_ip400_msg_type::audio_packet : T_ip400_packet "";
|
||||
case T_ip400_msg_type::video_packet : T_ip400_packet "";
|
||||
case T_ip400_msg_type::beacon_packet : T_ip400_beacon "";
|
||||
case T_ip400_msg_type::ip_packet : T_ip400_packet "";
|
||||
case T_ip400_msg_type::ax25_packet : T_ip400_packet "";
|
||||
case T_ip400_msg_type::dtmf_frame : T_ip400_packet "";
|
||||
case T_ip400_msg_type::dmr_frame : T_ip400_packet "";
|
||||
case T_ip400_msg_type::dstar_frame : T_ip400_packet "";
|
||||
case T_ip400_msg_type::tia_project25 : T_ip400_packet "";
|
||||
case T_ip400_msg_type::nxdn_frame : T_ip400_packet "";
|
||||
case T_ip400_msg_type::m17_frame : T_ip400_packet "";
|
||||
case T_ip400_msg_type::unused_frame_1 : T_ip400_packet "";
|
||||
case T_ip400_msg_type::unused_frame_2 : T_ip400_packet "";
|
||||
case T_ip400_msg_type::command_frame : T_ip400_packet "";
|
||||
default : T_ip400_packet "";
|
||||
}
|
||||
|
||||
#function to find usrp packets
|
||||
function bool8 heuristic_func ()
|
||||
{
|
||||
byte_order big_endian;
|
||||
string(4) header;
|
||||
|
||||
if (header != "IP4C")
|
||||
{
|
||||
return bool8::false;
|
||||
}
|
||||
return bool8::true;
|
||||
}
|
||||
|
27
Wireshark/ip400.wsgd
Normal file
27
Wireshark/ip400.wsgd
Normal file
|
@ -0,0 +1,27 @@
|
|||
# file ip400.wsgd
|
||||
|
||||
# protocol metadata for IP400 protocol
|
||||
# Martin Alcock, VE6VH
|
||||
#
|
||||
PROTONAME IP400 packet protocol
|
||||
PROTOSHORTNAME IP400
|
||||
PROTOABBREV ip400
|
||||
|
||||
# conditions on which the dissector is applied:
|
||||
# the protocol will be applied on all UDP messages that start with "IP400"
|
||||
PARENT_HEURISTIC udp
|
||||
HEURISTIC_FUNCTION heuristic_func
|
||||
|
||||
# the name of the header structure
|
||||
MSG_HEADER_TYPE T_ip400_header
|
||||
# field which permits to identify the message type.
|
||||
MSG_ID_FIELD_NAME msg_id
|
||||
# the main message type - usually it is a fake message, built of one
|
||||
# of the possible messages
|
||||
MSG_MAIN_TYPE T_ip400_switch(msg_id)
|
||||
|
||||
# this token marks the end of the protocol description
|
||||
PROTO_TYPE_DEFINITIONS
|
||||
|
||||
# refer to the description of the data format
|
||||
include ip400.fdesc;
|
Loading…
Reference in a new issue