X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2FpcapDecoder%2FtsharkDecoder.sh;h=0f6c640a3095ab92eb38d6cc6869894c3c161973;hb=1061cb8cf19ca6d594505c3e487606c0dd0634ff;hp=36283182519b965c623e8d524ac6f74be1644f55;hpb=5e6cbe34594884c65483235a5d782fe5717cdce6;p=anna.git diff --git a/example/diameter/pcapDecoder/tsharkDecoder.sh b/example/diameter/pcapDecoder/tsharkDecoder.sh index 3628318..0f6c640 100755 --- a/example/diameter/pcapDecoder/tsharkDecoder.sh +++ b/example/diameter/pcapDecoder/tsharkDecoder.sh @@ -166,7 +166,9 @@ do DISECT_SELECTORS="$DISECT_SELECTORS -d tcp.port=$port,diameter" done -$TSHARK -E separator="|" -r $PCAP_FILE -N mntC -Tfields $FIELDS $DISECT_SELECTORS 2>/dev/null > $tmpdir/all_frames +# Changes in project wireshark (see commits e005bc819c2 and 8dfaa8fa7c9): https://github.com/wireshark/wireshark.git +# Change name resolution resolving flags: 'C' is deprecated. Change '-N mntC' by '-N mntdv': +$TSHARK -E separator="|" -r $PCAP_FILE -N mntdv -Tfields $FIELDS $DISECT_SELECTORS 2>/dev/null > $tmpdir/all_frames grep -i diameter $tmpdir/all_frames > $tmpdir/diameter_frames #cat $tmpdir/all_frames @@ -321,6 +323,10 @@ segments=( $(echo $to_delete) ) echo "Deleting superfluous buffers & metadata (${segments[*]}) ..." for s in ${segments[@]}; do rm -f $RESULTS_DIR/${s}.* ; done +# Basic checking: +ls $RESULTS_DIR/*.metadata >/dev/null 2>/dev/null +[ $? -ne 0 ] && { echo "No metadata generated !" ; exit 1 ; } + # Detecting Session-Id values: grep ^sessionid= $RESULTS_DIR/*.metadata 2>/dev/null | cut -d= -f2- | sort -u > $RESULTS_DIR/session-ids if [ -s $RESULTS_DIR/session-ids ]