2009-04-27 16:57:02 +00:00
/* packet-pw-satop.c
* Routines for CESoPSN PW dissection as per RFC5086 .
* Copyright 2009 , Dmitry Trebich , Artem Tamazov < artem . tamazov @ tellabs . com >
*
* Wireshark - Network traffic analyzer
* By Gerald Combs < gerald @ wireshark . org >
* Copyright 1998 Gerald Combs
*
* This program is free software ; you can redistribute it and / or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation ; either version 2
* of the License , or ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program ; if not , write to the Free Software
2012-06-28 23:18:38 +00:00
* Foundation , Inc . , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 USA .
2009-04-27 16:57:02 +00:00
*
* History :
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2009-09-10 15:30:10 +00:00
* 16.03 .2009 initial implementation for MPLS
* 14.08 .2009 added : support for IP / UDP demultiplexing
* Not supported yet :
2009-04-27 16:57:02 +00:00
* - All PW modes , except Basic NxDS0 mode .
* - < Optional > RTP Headers ( RFC3550 )
* - Decoding of PW payload
*/
2012-09-20 02:03:38 +00:00
# include "config.h"
2009-04-27 16:57:02 +00:00
# include <epan/packet.h>
# include <epan/expert.h>
# include "packet-mpls.h"
# include "packet-pw-common.h"
2013-12-12 19:52:14 +00:00
void proto_register_pw_cesopsn ( void ) ;
void proto_reg_handoff_pw_cesopsn ( void ) ;
2009-04-27 16:57:02 +00:00
static gint proto = - 1 ;
static gint ett = - 1 ;
static int hf_cw = - 1 ;
static int hf_cw_bits03 = - 1 ;
static int hf_cw_lm = - 1 ;
static int hf_cw_r = - 1 ;
static int hf_cw_frg = - 1 ;
static int hf_cw_len = - 1 ;
static int hf_cw_seq = - 1 ;
static int hf_payload = - 1 ;
2009-06-29 19:24:14 +00:00
static int hf_payload_l = - 1 ;
2009-04-27 16:57:02 +00:00
2013-09-08 00:47:15 +00:00
static expert_field ei_payload_size_invalid_undecoded = EI_INIT ;
static expert_field ei_cw_frg = EI_INIT ;
static expert_field ei_payload_size_invalid_error = EI_INIT ;
static expert_field ei_cw_bits03 = EI_INIT ;
static expert_field ei_pref_cw_len = EI_INIT ;
static expert_field ei_cw_lm = EI_INIT ;
static expert_field ei_packet_size_too_small = EI_INIT ;
2009-04-27 16:57:02 +00:00
static dissector_handle_t data_handle ;
2009-06-29 19:24:14 +00:00
static dissector_handle_t pw_padding_handle ;
2009-04-27 16:57:02 +00:00
2009-06-29 19:24:14 +00:00
const char pwc_longname_pw_cesopsn [ ] = " CESoPSN basic NxDS0 mode (no RTP support) " ;
2009-04-27 16:57:02 +00:00
static const char shortname [ ] = " CESoPSN basic (no RTP) " ;
static const value_string vals_cw_lm [ ] = {
/* note that bitmask in hs_register_info is 0xb == 1011B */
/* this is why 0x8 comes just after 0x3 */
{ 0x0 , " Normal situation - no AC faults " } ,
/*{ 0x1, "Reserved combination" },*/
{ 0x2 , " AC Fault - RDI condition " } ,
{ 0x3 , " Reserved for CESoPSN signaling " } ,
{ 0x8 , " AC Fault - TDM data is invalid " } ,
/*{ 0x9, "Reserved combination" },*/
/*{ 0xa, "Reserved combination" },*/
/*{ 0xb, "Reserved combination" },*/
{ 0 , NULL }
} ;
2009-09-10 15:30:10 +00:00
static
void dissect_pw_cesopsn ( tvbuff_t * tvb_original
, packet_info * pinfo
, proto_tree * tree
, pwc_demux_type_t demux )
2009-04-27 16:57:02 +00:00
{
const int encaps_size = 4 ; /*RTP header in encapsulation is not supported yet*/
2012-09-28 19:50:49 +00:00
gint packet_size ;
gint payload_size ;
gint padding_size ;
2013-03-18 21:16:23 +00:00
int properties ;
2009-04-27 16:57:02 +00:00
packet_size = tvb_reported_length_remaining ( tvb_original , 0 ) ;
2009-09-10 15:30:10 +00:00
2009-04-27 16:57:02 +00:00
/*
* FIXME
* " 4 " below should be replaced by something like " min_packet_size_this_dissector "
* Also call to dissect_try_cw_first_nibble ( ) should be moved before this block
*/
if ( packet_size < 4 ) /* 4 is smallest size which may be sensible (for PWACH dissector) */
{
2012-09-28 19:50:49 +00:00
proto_item * item ;
item = proto_tree_add_item ( tree , proto , tvb_original , 0 , - 1 , ENC_NA ) ;
2013-09-09 00:44:09 +00:00
expert_add_info_format ( pinfo , item , & ei_packet_size_too_small ,
2012-09-28 19:50:49 +00:00
" PW packet size (%d) is too small to carry sensible information "
, ( int ) packet_size ) ;
col_set_str ( pinfo - > cinfo , COL_PROTOCOL , shortname ) ;
2009-08-09 07:59:51 +00:00
col_set_str ( pinfo - > cinfo , COL_INFO , " Malformed: PW packet is too small " ) ;
2009-04-27 16:57:02 +00:00
return ;
}
2009-09-10 15:30:10 +00:00
switch ( demux )
2009-04-27 16:57:02 +00:00
{
2009-09-10 15:30:10 +00:00
case PWC_DEMUX_MPLS :
if ( dissect_try_cw_first_nibble ( tvb_original , pinfo , tree ) )
{
return ;
}
break ;
case PWC_DEMUX_UDP :
break ;
default :
DISSECTOR_ASSERT_NOT_REACHED ( ) ;
2009-04-27 16:57:02 +00:00
return ;
}
/* check how "good" is this packet */
/* also decide payload length from packet size and CW */
2009-06-29 19:24:14 +00:00
properties = PWC_PACKET_PROPERTIES_T_INITIALIZER ;
2009-04-27 16:57:02 +00:00
if ( 0 ! = ( tvb_get_guint8 ( tvb_original , 0 ) & 0xf0 /*bits03*/ ) )
{
properties | = PWC_CW_BAD_BITS03 ;
}
if ( 0 ! = ( tvb_get_guint8 ( tvb_original , 1 ) & 0xc0 /*frag*/ ) )
{
properties | = PWC_CW_BAD_FRAG ;
}
{
/* RFC5086:
* [ LEN ( bits ( 10 to 15 ) MAY be used to carry the length of the CESoPSN
* packet ( defined as the size of the CESoPSN header + the payload size )
* if it is less than 64 bytes , and MUST be set to zero otherwise .
* Note : If fixed RTP header is used in the encapsulation , it is
* considered part of the CESoPSN header . ]
*
* Note that this differs from RFC4385 ' s definition of length :
* [ If the MPLS payload is less than 64 bytes , the length field
* MUST be set to the length of the PW payload . . . ]
*
* We will use RFC5086 ' s definition here .
*/
2012-09-28 19:50:49 +00:00
int cw_len ;
2009-04-27 16:57:02 +00:00
gint payload_size_from_packet ;
cw_len = tvb_get_guint8 ( tvb_original , 1 ) & 0x3f ;
payload_size_from_packet = packet_size - encaps_size ;
if ( cw_len ! = 0 )
{
gint payload_size_from_cw ;
payload_size_from_cw = cw_len - encaps_size ;
/*
* Assumptions for error case ,
* will be overwritten if no errors found :
*/
payload_size = payload_size_from_packet ;
padding_size = 0 ;
2009-09-10 15:30:10 +00:00
2009-04-27 16:57:02 +00:00
if ( payload_size_from_cw < 0 )
{
properties | = PWC_CW_BAD_PAYLEN_LT_0 ;
}
else if ( payload_size_from_cw > payload_size_from_packet )
{
properties | = PWC_CW_BAD_PAYLEN_GT_PACKET ;
}
else if ( payload_size_from_packet > = 64 )
{
properties | = PWC_CW_BAD_LEN_MUST_BE_0 ;
}
else /* ok */
{
payload_size = payload_size_from_cw ;
padding_size = payload_size_from_packet - payload_size_from_cw ; /* >=0 */
}
}
else
{
payload_size = payload_size_from_packet ;
padding_size = 0 ;
}
}
2009-09-10 15:30:10 +00:00
2009-04-27 16:57:02 +00:00
{
guint8 cw_lm ;
cw_lm = tvb_get_guint8 ( tvb_original , 0 ) & 0x0b /*l+mod*/ ;
2013-03-29 00:26:23 +00:00
if ( NULL = = try_val_to_str ( cw_lm , vals_cw_lm ) )
2009-04-27 16:57:02 +00:00
{
properties | = PWC_CW_SUSPECT_LM ;
}
{
guint8 l_bit , m_bits ;
l_bit = ( cw_lm & 0x08 ) > > 3 ;
m_bits = ( cw_lm & 0x03 ) > > 0 ;
if ( ( l_bit = = 0 & & m_bits = = 0x0 ) /*CESoPSN data packet - normal situation*/
| | ( l_bit = = 0 & & m_bits = = 0x2 ) /*CESoPSN data packet - RDI on the AC*/ )
{
if ( ( payload_size = = 0 ) | | ( ( payload_size % 8 ) ! = 0 ) )
{
properties | = PWC_PAY_SIZE_BAD ;
}
}
else if ( l_bit = = 1 & & m_bits = = 0x0 ) /*TDM data is invalid ; payload MAY be omitted */
{
/*allow any size of payload*/
}
else /*reserved combinations*/
{
/*allow any size of payload*/
}
}
}
/* fill up columns*/
2012-09-28 19:50:49 +00:00
col_set_str ( pinfo - > cinfo , COL_PROTOCOL , shortname ) ;
2013-06-14 01:56:28 +00:00
col_clear ( pinfo - > cinfo , COL_INFO ) ;
if ( properties & PWC_ANYOF_CW_BAD )
2009-04-27 16:57:02 +00:00
{
2013-10-29 14:09:20 +00:00
col_set_str ( pinfo - > cinfo , COL_INFO , " CW:Bad, " ) ;
2013-06-14 01:56:28 +00:00
}
else if ( properties & PWC_ANYOF_CW_SUSPECT )
{
col_append_str ( pinfo - > cinfo , COL_INFO , " CW:Suspect, " ) ;
}
2009-04-27 16:57:02 +00:00
2013-06-14 01:56:28 +00:00
if ( properties & PWC_PAY_SIZE_BAD )
{
col_append_str ( pinfo - > cinfo , COL_INFO , " Payload size:Bad, " ) ;
}
2009-04-27 16:57:02 +00:00
2013-06-14 01:56:28 +00:00
col_append_fstr ( pinfo - > cinfo , COL_INFO , " TDM octets:%d " , ( int ) payload_size ) ;
2009-09-10 15:30:10 +00:00
2013-06-14 01:56:28 +00:00
if ( padding_size ! = 0 )
{
col_append_fstr ( pinfo - > cinfo , COL_INFO , " , Padding:%d " , ( int ) padding_size ) ;
2009-04-27 16:57:02 +00:00
}
2009-09-10 15:30:10 +00:00
2009-04-27 16:57:02 +00:00
{
proto_item * item ;
2011-10-21 02:10:19 +00:00
item = proto_tree_add_item ( tree , proto , tvb_original , 0 , - 1 , ENC_NA ) ;
2009-04-27 16:57:02 +00:00
pwc_item_append_cw ( item , tvb_get_ntohl ( tvb_original , 0 ) , TRUE ) ;
pwc_item_append_text_n_items ( item , ( int ) payload_size , " octet " ) ;
{
2010-01-22 13:56:19 +00:00
proto_tree * tree2 ;
tree2 = proto_item_add_subtree ( item , ett ) ;
2009-04-27 16:57:02 +00:00
{
tvbuff_t * tvb ;
2010-01-22 13:56:19 +00:00
proto_item * item2 ;
2014-06-06 14:35:50 +00:00
tvb = tvb_new_subset_length ( tvb_original , 0 , PWC_SIZEOF_CW ) ;
2011-10-04 22:44:31 +00:00
item2 = proto_tree_add_item ( tree2 , hf_cw , tvb , 0 , - 1 , ENC_NA ) ;
2010-01-22 13:56:19 +00:00
pwc_item_append_cw ( item2 , tvb_get_ntohl ( tvb , 0 ) , FALSE ) ;
2009-04-27 16:57:02 +00:00
{
2010-01-22 13:56:19 +00:00
proto_tree * tree3 ;
tree3 = proto_item_add_subtree ( item , ett ) ;
2009-04-27 16:57:02 +00:00
{
2010-01-22 13:56:19 +00:00
proto_item * item3 ;
2009-04-27 16:57:02 +00:00
if ( properties & PWC_CW_BAD_BITS03 ) /*display only if value is wrong*/
{
2011-10-06 03:35:44 +00:00
item3 = proto_tree_add_item ( tree3 , hf_cw_bits03 , tvb , 0 , 1 , ENC_BIG_ENDIAN ) ;
2013-09-08 00:47:15 +00:00
expert_add_info ( pinfo , item3 , & ei_cw_bits03 ) ;
2009-04-27 16:57:02 +00:00
}
2009-09-10 15:30:10 +00:00
2011-10-16 23:38:49 +00:00
item3 = proto_tree_add_item ( tree3 , hf_cw_lm , tvb , 0 , 1 , ENC_BIG_ENDIAN ) ;
2009-04-27 16:57:02 +00:00
if ( properties & PWC_CW_SUSPECT_LM )
{
2013-09-08 00:47:15 +00:00
expert_add_info ( pinfo , item3 , & ei_cw_lm ) ;
2009-04-27 16:57:02 +00:00
}
2009-09-10 15:30:10 +00:00
2011-10-06 03:35:44 +00:00
proto_tree_add_item ( tree3 , hf_cw_r , tvb , 0 , 1 , ENC_BIG_ENDIAN ) ;
2009-09-10 15:30:10 +00:00
2011-10-06 03:35:44 +00:00
item3 = proto_tree_add_item ( tree3 , hf_cw_frg , tvb , 1 , 1 , ENC_BIG_ENDIAN ) ;
2009-04-27 16:57:02 +00:00
if ( properties & PWC_CW_BAD_FRAG )
{
2013-09-08 00:47:15 +00:00
expert_add_info ( pinfo , item3 , & ei_cw_frg ) ;
2009-04-27 16:57:02 +00:00
}
2009-09-10 15:30:10 +00:00
2011-10-06 03:35:44 +00:00
item3 = proto_tree_add_item ( tree3 , hf_cw_len , tvb , 1 , 1 , ENC_BIG_ENDIAN ) ;
2009-04-27 16:57:02 +00:00
if ( properties & PWC_CW_BAD_PAYLEN_LT_0 )
{
2013-09-09 00:44:09 +00:00
expert_add_info_format ( pinfo , item3 , & ei_pref_cw_len ,
2013-09-08 00:47:15 +00:00
" Bad Length: too small, must be > %d " ,
( int ) encaps_size ) ;
2009-04-27 16:57:02 +00:00
}
if ( properties & PWC_CW_BAD_PAYLEN_GT_PACKET )
{
2013-09-09 00:44:09 +00:00
expert_add_info_format ( pinfo , item3 , & ei_pref_cw_len ,
2013-09-08 00:47:15 +00:00
" Bad Length: must be <= than PSN packet size (%d) " ,
( int ) packet_size ) ;
2009-04-27 16:57:02 +00:00
}
if ( properties & PWC_CW_BAD_LEN_MUST_BE_0 )
{
2013-09-09 00:44:09 +00:00
expert_add_info_format ( pinfo , item3 , & ei_pref_cw_len ,
2013-09-08 00:47:15 +00:00
" Bad Length: must be 0 if CESoPSN packet size (%d) is > 64 " ,
( int ) packet_size ) ;
2009-04-27 16:57:02 +00:00
}
2009-09-10 15:30:10 +00:00
2011-10-06 03:35:44 +00:00
proto_tree_add_item ( tree3 , hf_cw_seq , tvb , 2 , 2 , ENC_BIG_ENDIAN ) ;
2009-09-10 15:30:10 +00:00
2009-04-27 16:57:02 +00:00
}
}
}
}
/* payload */
if ( payload_size = = 0 )
{
if ( properties & PWC_PAY_SIZE_BAD )
{
2013-09-09 00:44:09 +00:00
expert_add_info_format ( pinfo , item , & ei_payload_size_invalid_error ,
2013-09-08 00:47:15 +00:00
" CESoPSN payload: none found. Size of payload must be <> 0 " ) ;
2009-04-27 16:57:02 +00:00
}
else
{
2013-09-09 00:44:09 +00:00
expert_add_info_format ( pinfo , item , & ei_payload_size_invalid_undecoded ,
2013-09-08 00:47:15 +00:00
" CESoPSN payload: omitted to conserve bandwidth " ) ;
2009-04-27 16:57:02 +00:00
}
}
else
{
2010-01-22 13:56:19 +00:00
proto_tree * tree2 ;
tree2 = proto_item_add_subtree ( item , ett ) ;
2009-04-27 16:57:02 +00:00
{
2010-01-22 13:56:19 +00:00
proto_item * item2 ;
2009-04-27 16:57:02 +00:00
tvbuff_t * tvb ;
2014-06-06 14:35:50 +00:00
tvb = tvb_new_subset_length ( tvb_original , PWC_SIZEOF_CW , payload_size ) ;
2011-10-04 22:44:31 +00:00
item2 = proto_tree_add_item ( tree2 , hf_payload , tvb , 0 , - 1 , ENC_NA ) ;
2010-01-22 13:56:19 +00:00
pwc_item_append_text_n_items ( item2 , ( int ) payload_size , " octet " ) ;
2009-04-27 16:57:02 +00:00
if ( properties & PWC_PAY_SIZE_BAD )
{
2013-09-09 00:44:09 +00:00
expert_add_info_format ( pinfo , item2 , & ei_payload_size_invalid_error ,
2013-09-08 00:47:15 +00:00
" CESoPSN packet payload size must be multiple of 8 " ) ;
2009-04-27 16:57:02 +00:00
}
2010-01-22 13:56:19 +00:00
tree2 = proto_item_add_subtree ( item2 , ett ) ;
call_dissector ( data_handle , tvb , pinfo , tree2 ) ;
item2 = proto_tree_add_int ( tree2 , hf_payload_l , tvb , 0 , 0
2009-06-29 19:24:14 +00:00
, ( int ) payload_size ) ; /* allow filtering */
2010-01-22 13:56:19 +00:00
PROTO_ITEM_SET_HIDDEN ( item2 ) ;
2009-04-27 16:57:02 +00:00
}
}
2009-09-10 15:30:10 +00:00
2009-04-27 16:57:02 +00:00
/* padding */
if ( padding_size > 0 )
{
2010-01-22 13:56:19 +00:00
proto_tree * tree2 ;
tree2 = proto_item_add_subtree ( item , ett ) ;
2009-04-27 16:57:02 +00:00
{
tvbuff_t * tvb ;
tvb = tvb_new_subset ( tvb_original , PWC_SIZEOF_CW + payload_size , padding_size , - 1 ) ;
2010-01-22 13:56:19 +00:00
call_dissector ( pw_padding_handle , tvb , pinfo , tree2 ) ;
2009-04-27 16:57:02 +00:00
}
2009-09-10 15:30:10 +00:00
}
2009-04-27 16:57:02 +00:00
}
return ;
}
2009-09-10 15:30:10 +00:00
static
void dissect_pw_cesopsn_mpls ( tvbuff_t * tvb_original , packet_info * pinfo , proto_tree * tree )
{
dissect_pw_cesopsn ( tvb_original , pinfo , tree , PWC_DEMUX_MPLS ) ;
return ;
}
static
void dissect_pw_cesopsn_udp ( tvbuff_t * tvb_original , packet_info * pinfo , proto_tree * tree )
{
dissect_pw_cesopsn ( tvb_original , pinfo , tree , PWC_DEMUX_UDP ) ;
return ;
}
2009-04-27 16:57:02 +00:00
void proto_register_pw_cesopsn ( void )
{
static hf_register_info hf [ ] = {
2010-04-25 17:38:46 +00:00
{ & hf_cw , { " Control Word " , " pwcesopsn.cw "
2013-01-26 16:31:24 +00:00
, FT_NONE , BASE_NONE , NULL
, 0 , NULL , HFILL } } ,
{ & hf_cw_bits03 , { " Bits 0 to 3 " , " pwcesopsn.cw.bits03 "
2009-04-27 16:57:02 +00:00
, FT_UINT8 , BASE_DEC , NULL
2013-01-26 16:31:24 +00:00
, 0xf0 , NULL , HFILL } } ,
{ & hf_cw_lm , { " L+M bits " , " pwcesopsn.cw.lm "
, FT_UINT8 , BASE_HEX , VALS ( vals_cw_lm )
, 0x0b , NULL , HFILL } } ,
{ & hf_cw_r , { " R bit: Local CE-bound IWF " , " pwcesopsn.cw.rbit "
, FT_UINT8 , BASE_DEC , VALS ( pwc_vals_cw_r_bit )
, 0x04 , NULL , HFILL } } ,
{ & hf_cw_frg , { " Fragmentation " , " pwcesopsn.cw.frag "
, FT_UINT8 , BASE_DEC , VALS ( pwc_vals_cw_frag )
, 0xc0 , NULL , HFILL } } ,
{ & hf_cw_len , { " Length " , " pwcesopsn.cw.length "
, FT_UINT8 , BASE_DEC , NULL
, 0x3f , NULL , HFILL } } ,
{ & hf_cw_seq , { " Sequence number " , " pwcesopsn.cw.seqno "
, FT_UINT16 , BASE_DEC , NULL
, 0 , NULL , HFILL } } ,
{ & hf_payload , { " TDM payload " , " pwcesopsn.payload "
, FT_BYTES , BASE_NONE , NULL
, 0 , NULL , HFILL } } ,
{ & hf_payload_l , { " TDM payload length " , " pwcesopsn.payload.len "
, FT_INT32 , BASE_DEC , NULL
, 0 , NULL , HFILL } }
2009-04-27 16:57:02 +00:00
} ;
2009-09-10 15:30:10 +00:00
2009-04-27 16:57:02 +00:00
static gint * ett_array [ ] = {
& ett
} ;
2013-09-08 00:47:15 +00:00
static ei_register_info ei [ ] = {
{ & ei_packet_size_too_small , { " pwcesopsn.packet_size_too_small " , PI_MALFORMED , PI_ERROR , " PW packet size is too small to carry sensible information " , EXPFILL } } ,
{ & ei_cw_bits03 , { " pwcesopsn.cw.bits03.not_zero " , PI_MALFORMED , PI_ERROR , " Bits 0..3 of Control Word must be 0 " , EXPFILL } } ,
{ & ei_cw_lm , { " pwcesopsn.cw.lm.reserved " , PI_UNDECODED , PI_WARN , " Reserved combination of L and Modifier bits " , EXPFILL } } ,
{ & ei_cw_frg , { " pwcesopsn.cw.frag.not_allowed " , PI_MALFORMED , PI_ERROR , " Fragmentation of payload is not allowed for basic CESoPSN mode " , EXPFILL } } ,
{ & ei_pref_cw_len , { " pwcesopsn.cw.length.invalid " , PI_MALFORMED , PI_ERROR , " Bad Length: too small " , EXPFILL } } ,
{ & ei_payload_size_invalid_error , { " pwcesopsn.payload.size_invalid " , PI_MALFORMED , PI_ERROR , " CESoPSN payload size invalid " , EXPFILL } } ,
{ & ei_payload_size_invalid_undecoded , { " pwcesopsn.payload.undecoded " , PI_UNDECODED , PI_NOTE , " CESoPSN payload: omitted to conserve bandwidth " , EXPFILL } } ,
} ;
expert_module_t * expert_pwcesopsn ;
2009-04-27 16:57:02 +00:00
proto = proto_register_protocol ( pwc_longname_pw_cesopsn , shortname , " pwcesopsn " ) ;
proto_register_field_array ( proto , hf , array_length ( hf ) ) ;
proto_register_subtree_array ( ett_array , array_length ( ett_array ) ) ;
2013-09-08 00:47:15 +00:00
expert_pwcesopsn = expert_register_protocol ( proto ) ;
expert_register_field_array ( expert_pwcesopsn , ei , array_length ( ei ) ) ;
2009-09-10 15:30:10 +00:00
register_dissector ( " pw_cesopsn_udp " , dissect_pw_cesopsn_udp , proto ) ;
2009-04-27 16:57:02 +00:00
return ;
}
2009-09-10 15:30:10 +00:00
2009-04-27 16:57:02 +00:00
void proto_reg_handoff_pw_cesopsn ( void )
{
2015-04-03 12:43:19 +00:00
dissector_handle_t pw_cesopsn_mpls_handle ;
2009-04-28 02:06:35 +00:00
data_handle = find_dissector ( " data " ) ;
2009-06-29 19:24:14 +00:00
pw_padding_handle = find_dissector ( " pw_padding " ) ;
2015-04-03 12:43:19 +00:00
2014-06-19 17:54:01 +00:00
/* For Decode As */
2015-04-03 12:43:19 +00:00
pw_cesopsn_mpls_handle = create_dissector_handle ( dissect_pw_cesopsn_mpls , proto ) ;
dissector_add_for_decode_as ( " mpls.label " , pw_cesopsn_mpls_handle ) ;
2014-06-20 16:43:28 +00:00
dissector_add_for_decode_as ( " udp.port " , find_dissector ( " pw_cesopsn_udp " ) ) ;
2009-04-27 16:57:02 +00:00
return ;
}
2014-10-04 15:28:35 +00:00
/*
* Editor modelines - http : //www.wireshark.org/tools/modelines.html
*
* Local variables :
* c - basic - offset : 8
* tab - width : 8
* indent - tabs - mode : t
* End :
*
* vi : set shiftwidth = 8 tabstop = 8 noexpandtab :
* : indentSize = 8 : tabSize = 8 : noTabs = false :
*/