GeoNetworking, BTP dissectors (ITS-V2X)

Implements V2X protocol dissectors:

 * Geonetworking (network layer):
Dissector is registered on top of Ethernet (ethertype=0x8947).  Secured
Packets are dissected up to the basic header, the rest is shown as data.
GN_ADDR address type is registerd and provides resolution of station
type and country code in the address. MID is shown as an ethernet address.
All the fields are dissected for non Secured Packets.
A subdissector table named "geonw.ch.nh" is provided on the next header
field. IPv6 is automatically registered. Heuristic dissectors is not
supported. If no dissector is foundd, payload is shown as data.
A preference boolean allows to enable/disable sequence number checking.
Tap "geonw" gets headers of all packets (with most fields).
Expert info tests if and provide feedback on:
 - version is zero (no other version possible),
 - reserved fields are zeros,
 - payload_len matching with reported length of buffer,
 - Remaining Hop Limit is 1 for Beacon and SHB,
 - low RHL or RHL > Max Hop Limit,
 - country code is less than 999 (3 digits ITU-T E.164),
 - latitude, longitude, heading and angle limits,
 - (suspected) duplicate packets,
 - LS_REQUEST/LS_REPLY matching.

 * Basic Transport Portocol:
BTP-X (X=A or B)  dissectors are registered on top of Geonetworking.
Subdissector tables "btpx.port" allow to register for a given port,
while heuristic dissector can register to "btpx.payload". Decode as
capability is supported.
"btpx" taps get headers of all packets with ports/@ infos.
"btpx_follow" taps get the payload.

Bug: 15148
Change-Id: Iab5f4486d4c38068d9ad4361e77296b747f9b1bb
Reviewed-on: https://code.wireshark.org/review/30992
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Christophe GUERBER 2018-12-13 16:43:33 +01:00 committed by Anders Broman
parent b6e13a3d84
commit a87e56aa79
4 changed files with 2144 additions and 0 deletions

View File

@ -96,6 +96,7 @@ Ruby Marshal format
[commaize]
--
Apple Wireless Direct Link (AWDL)
Basic Transport Protocol (BTP)
BLIP Couchbase Mobile (BLIP)
CDMA 2000
Cisco Meraki Discovery Protocol (MDP)
@ -105,6 +106,7 @@ E1AP (5G)
EVS (3GPP TS 26.445 A.2 EVS RTP)
Exablaze trailers
General Circuit Services Notification Application Protocol (GCSNA)
GeoNetworking (GeoNw)
GLOW Lawo Emberplus Data format
GSM-R (User-to-User Information Element usage)
HI3CCLinkData

View File

@ -349,6 +349,7 @@ set(DISSECTOR_PUBLIC_HEADERS
packet-fmp.h
packet-frame.h
packet-ftam.h
packet-geonw.h
packet-giop.h
packet-gluster.h
packet-gmr1_common.h
@ -1035,6 +1036,7 @@ set(DISSECTOR_SRC
${CMAKE_CURRENT_SOURCE_DIR}/packet-gearman.c
${CMAKE_CURRENT_SOURCE_DIR}/packet-ged125.c
${CMAKE_CURRENT_SOURCE_DIR}/packet-geneve.c
${CMAKE_CURRENT_SOURCE_DIR}/packet-geonw.c
${CMAKE_CURRENT_SOURCE_DIR}/packet-gfp.c
${CMAKE_CURRENT_SOURCE_DIR}/packet-gift.c
${CMAKE_CURRENT_SOURCE_DIR}/packet-giop.c

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,66 @@
/* packet-geonw.h
* Routines for GeoNetworking and BTP-A/B dissection
* Coyright 2018, C. Guerber <cguerber@yahoo.com>
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef __PACKET_GEONW_H__
#define __PACKET_GEONW_H__
#define SN_MAX 0xffff
typedef struct geonwheader
{
guint8 gnw_ver; /* Version */
guint8 gnw_lt; /* Life time */
guint8 gnw_rhl; /* Remaining Hop Limit */
guint8 gnw_proto; /* Next header */
guint8 gnw_htype; /* Header type */
guint8 gnw_tc; /* Traffic class */
guint8 gnw_flags; /* Flags */
guint8 gnw_mhl; /* Remaining Hop Limit */
guint16 gnw_len; /* Payload length */
guint32 gnw_sn; /* Sequence number or MAX+1 */
guint32 gnw_tst; /* Sequence number or MAX+1 */
address gnw_src; /* source address */
address gnw_dst; /* destination address */
gint32 gnw_lat; /* Latitude */
gint32 gnw_lon; /* Longitude */
} geonwheader;
typedef struct btpaheader
{
address gnw_src; /* source address */
address gnw_dst; /* destination address */
guint16 btp_psrc; /* Source port */
guint16 btp_pdst; /* Destination port */
} btpaheader;
typedef struct btpbheader
{
address gnw_src; /* source address */
address gnw_dst; /* destination address */
guint16 btp_pdst; /* Destination port */
guint16 btp_idst; /* Destination info */
} btpbheader;
#endif /* __PACKET_GEONW_H__ */
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
* Local variables:
* c-basic-offset: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/