Dissector plugin main source.
More...
#include "config.h"
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <epan/tvbuff.h>
#include <epan/packet_info.h>
#include <epan/column-utils.h>
#include <epan/packet.h>
#include <epan/dissectors/packet-tcp.h>
#include <epan/prefs.h>
#include <epan/strutil.h>
#include <epan/expert.h>
#include <epan/plugin_if.h>
#include <wsutil/report_message.h>
#include "trdp_env.h"
#include "trdpDict.h"
|
| static guint32 | dissect_trdp_generic_body (tvbuff_t *tvb, packet_info *pinfo, proto_tree *trdp_spy_tree, proto_tree *trdpRootNode, guint32 trdp_spy_comid, guint32 offset, guint clength, guint8 dataset_level, const gchar *title, const gint32 arr_idx) |
| | Extract all information from the userdata (uses the parsebody module for unmarshalling) More...
|
| |
Dissector plugin main source.
- Note
- Project: TRDP SPY
- Author
- Florian Weispfenning, Bombardier Transportation
-
Thorsten Schulz, Universität Rostock
- Copyright
- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
Copyright Bombardier Transportation Inc. or its subsidiaries and others, 2013. All rights reserved.
-
Copyright Universität Rostock, 2019 (substantial changes leading to GLib-only version and update to v2.0, Wirshark 3.)
Version 2.0 extended to work with complex dataset and makeover for Wireshark 2.6 – 3
Based on work:
Ethereal - Network traffic analyzer
By Gerald Combs <gerald@ethereal.com>
Copyright 1998 Gerald Combs
SPDX-License-Identifier: GPL-2.0-or-later
The new display-filter approach contains aspects and code snippets
from the wimaxasncp dissector by Stephen Croll.
- Id
◆ dissect_trdp_generic_body()
| guint32 dissect_trdp_generic_body |
( |
tvbuff_t * |
tvb, |
|
|
packet_info * |
pinfo, |
|
|
proto_tree * |
trdp_spy_tree, |
|
|
proto_tree * |
trdpRootNode, |
|
|
guint32 |
trdp_spy_comid, |
|
|
guint32 |
offset, |
|
|
guint |
clength, |
|
|
guint8 |
dataset_level, |
|
|
const gchar * |
title, |
|
|
const gint32 |
arr_idx |
|
) |
| |
|
static |
Extract all information from the userdata (uses the parsebody module for unmarshalling)
- Parameters
-
| tvb | buffer |
| pinfo | info for the packet |
| trdp_spy_tree | to which the information are added |
| trdpRootNode | Root node of the view of an TRDP packet (Necessary, as this function will be called recursively) |
| trdp_spy_comid | the already extracted comId |
| offset | where the userdata starts in the TRDP packet |
| clength | Amount of bytes, that are transported for the users |
| dataset_level | is set to 0 for the beginning |
| title | presents the instance-name of the dataset for the sub-tree |
| arr_idx | index for presentation when a dataset occurs in an array element |
- Returns
- the actual offset in the packet
Interface between Wireshark and the TRDP anaylsis module.
Description of one dataset.
Definition: trdpDict.h:104
char typeName[32]
Definition: trdpDict.h:84
struct Element * lastOfElements
Definition: trdpDict.h:114
gchar * xml_file
Definition: trdpDict.h:169
gint32 size
Definition: trdpDict.h:106
struct Dataset * linkedDS
Definition: trdpDict.h:90
description of one element
Definition: trdpDict.h:75
#define TRDP_MD_HEADERLENGTH
Definition: trdp_env.h:93
struct Element * listOfElements
Definition: trdpDict.h:113
#define TRDP_UINT64
Definition: trdp_env.h:48
gint ett_id
Definition: trdpDict.h:111
#define TRDP_INT16
Definition: trdp_env.h:42
static gint32 Dataset_preCalculate(Dataset *self, const TrdpDict *dict)
calculateSize
Definition: trdpDict.c:488
Dataset * TrdpDict_get_Dataset(const TrdpDict *self, guint32 datasetId)
Lookup a given datasetId in the dictionary self.
Definition: trdpDict.c:356
#define TRDP_INT32
Definition: trdp_env.h:43
Definition of the TRDP constants and specific calculations.
#define TRDP_FCS_LENGTH
Definition: trdp_env.h:95
struct Dataset * mTableDataset
Definition: trdpDict.h:164
struct Dataset * next
Definition: trdpDict.h:115
struct ComId * next
Definition: trdpDict.h:148
#define TRDP_INT8
Definition: trdp_env.h:41
guint32 type
Definition: trdpDict.h:82
#define TRDP_REAL64
Definition: trdp_env.h:50
const ComId * TrdpDict_lookup_ComId(const TrdpDict *self, guint32 comId)
Lookup a given comId in the dictionary self.
Definition: trdpDict.c:350
gint32 size
Definition: trdpDict.h:144
gchar * name
Definition: trdpDict.h:107
#define TRDP_TIMEDATE64
Definition: trdp_env.h:53
gint32 array_size
Definition: trdpDict.h:85
#define TRDP_TIMEDATE32
Definition: trdp_env.h:51
guint32 datasetId
Definition: trdpDict.h:110
gdouble scale
Definition: trdpDict.h:86
char * name
Definition: trdpDict.h:77
gint32 offset
Definition: trdpDict.h:87
char * unit
Definition: trdpDict.h:78
static gint32 ComId_preCalculate(ComId *self, const TrdpDict *dict)
Definition: trdpDict.c:566
struct Dataset * linkedDS
Definition: trdpDict.h:147
#define TRDP_UINT16
Definition: trdp_env.h:46
#define TRDP_CHAR8
Definition: trdp_env.h:39
gint32 width
Definition: trdpDict.h:89
char * name
Definition: trdpDict.h:139
#define TRDP_INT64
Definition: trdp_env.h:44
#define TRDP_UINT32
Definition: trdp_env.h:47
static guint32 dissect_trdp_generic_body(tvbuff_t *tvb, packet_info *pinfo, proto_tree *trdp_spy_tree, proto_tree *trdpRootNode, guint32 trdp_spy_comid, guint32 offset, guint clength, guint8 dataset_level, const gchar *title, const gint32 arr_idx)
Extract all information from the userdata (uses the parsebody module for unmarshalling)
Definition: packet-trdp_spy.c:277
#define TRDP_BOOL8
Definition: trdp_env.h:36
gchar * TrdpDict_summary(const TrdpDict *self)
Get some human-readable info.
Definition: trdpDict.c:327
This struct is the root container for the XML type dictionary.
Definition: trdpDict.h:161
gint ett_id
Definition: trdpDict.h:145
guint32 dataset
Definition: trdpDict.h:143
struct ComId * mTableComId
Definition: trdpDict.h:168
#define TRDP_UTF16
Definition: trdp_env.h:40
Dataset * TrdpDict_get_Dataset(const TrdpDict *self, guint32 datasetId)
Lookup a given datasetId in the dictionary self.
Definition: trdpDict.c:356
This struct makes a mapping between one comId and one dataset.
Definition: trdpDict.h:138
Parser of the XML description.
#define TRDP_REAL32
Definition: trdp_env.h:49
#define TRDP_STANDARDTYPE_MAX
Definition: trdp_env.h:55
const ComId * TrdpDict_lookup_ComId(const TrdpDict *self, guint32 comId)
Lookup a given comId in the dictionary self.
Definition: trdpDict.c:350
#define TRDP_UINT8
Definition: trdp_env.h:45
gchar * TrdpDict_summary(const TrdpDict *self)
Get some human-readable info.
Definition: trdpDict.c:327
#define TRDP_TIMEDATE48
Definition: trdp_env.h:52
guint knowledge
Definition: trdpDict.h:167
guint32 comId
Definition: trdpDict.h:142