Do one or more of the following:

- Convert "4 space tabs" to spaces;
- Remove some unneeded initializers;
- 'offset++' --> 'offset += 1' for consistency;
- Reformat hf[] entries;
- Rework/add whitespace;
- Adjust editor modelines (set tab-width to 8).

svn path=/trunk/; revision=54005
This commit is contained in:
Bill Meier 2013-12-13 00:44:32 +00:00
parent 2fd6bb79ea
commit 721b5d266a
19 changed files with 12767 additions and 10840 deletions

View File

@ -59,171 +59,171 @@ void proto_register_sm(void);
void proto_reg_handoff_sm(void);
static const value_string sm_message_type_value[] = {
{ MESSAGE_TYPE_START, "Start Message" },
{ MESSAGE_TYPE_STOP, "Stop Message" },
{ MESSAGE_TYPE_ACTIVE, "Active Message" },
{ MESSAGE_TYPE_STANDBY, "Standby Message" },
{ MESSAGE_TYPE_Q_HOLD_INVOKE, "Q_HOLD Invoke Message" },
{ MESSAGE_TYPE_Q_HOLD_RESPONSE, "Q_HOLD Response Message" },
{ MESSAGE_TYPE_Q_RESUME_INVOKE, "Q_RESUME Invoke Message" },
{ MESSAGE_TYPE_Q_RESUME_RESPONSE, "Q_RESUME Response Message" },
{ MESSAGE_TYPE_Q_RESET_INVOKE, "Q_RESET Invoke Message" },
{ MESSAGE_TYPE_Q_RESET_RESPONSE, "Q_RESET Response Message" },
{ MESSAGE_TYPE_PDU, "PDU Message" },
{ 0, NULL }
{ MESSAGE_TYPE_START, "Start Message" },
{ MESSAGE_TYPE_STOP, "Stop Message" },
{ MESSAGE_TYPE_ACTIVE, "Active Message" },
{ MESSAGE_TYPE_STANDBY, "Standby Message" },
{ MESSAGE_TYPE_Q_HOLD_INVOKE, "Q_HOLD Invoke Message" },
{ MESSAGE_TYPE_Q_HOLD_RESPONSE, "Q_HOLD Response Message" },
{ MESSAGE_TYPE_Q_RESUME_INVOKE, "Q_RESUME Invoke Message" },
{ MESSAGE_TYPE_Q_RESUME_RESPONSE, "Q_RESUME Response Message" },
{ MESSAGE_TYPE_Q_RESET_INVOKE, "Q_RESET Invoke Message" },
{ MESSAGE_TYPE_Q_RESET_RESPONSE, "Q_RESET Response Message" },
{ MESSAGE_TYPE_PDU, "PDU Message" },
{ 0, NULL }
};
static const value_string sm_message_type_value_info[] = {
{ MESSAGE_TYPE_START, "Start" },
{ MESSAGE_TYPE_STOP, "Stop" },
{ MESSAGE_TYPE_ACTIVE, "Active" },
{ MESSAGE_TYPE_STANDBY, "Standby" },
{ MESSAGE_TYPE_Q_HOLD_INVOKE, "Q_HOLD Invoke" },
{ MESSAGE_TYPE_Q_HOLD_RESPONSE, "Q_HOLD Response" },
{ MESSAGE_TYPE_Q_RESUME_INVOKE, "Q_RESUME Invoke" },
{ MESSAGE_TYPE_Q_RESUME_RESPONSE, "Q_RESUME Response" },
{ MESSAGE_TYPE_Q_RESET_INVOKE, "Q_RESET Invoke" },
{ MESSAGE_TYPE_Q_RESET_RESPONSE, "Q_RESET Response" },
{ MESSAGE_TYPE_PDU, "PDU" },
{ 0, NULL }
{ MESSAGE_TYPE_START, "Start" },
{ MESSAGE_TYPE_STOP, "Stop" },
{ MESSAGE_TYPE_ACTIVE, "Active" },
{ MESSAGE_TYPE_STANDBY, "Standby" },
{ MESSAGE_TYPE_Q_HOLD_INVOKE, "Q_HOLD Invoke" },
{ MESSAGE_TYPE_Q_HOLD_RESPONSE, "Q_HOLD Response" },
{ MESSAGE_TYPE_Q_RESUME_INVOKE, "Q_RESUME Invoke" },
{ MESSAGE_TYPE_Q_RESUME_RESPONSE, "Q_RESUME Response" },
{ MESSAGE_TYPE_Q_RESET_INVOKE, "Q_RESET Invoke" },
{ MESSAGE_TYPE_Q_RESET_RESPONSE, "Q_RESET Response" },
{ MESSAGE_TYPE_PDU, "PDU" },
{ 0, NULL }
};
static const value_string sm_alignment_type[] = {
{ 0x00, "Unknown (probably linkset was already up)"},
{ 0x03, "Emergency alignment"},
{ 0x04, "Normal alignment"},
{ 0x05, "Power On MTP2"},
{ 0x06, "Start MTP2"},
{ 0, NULL}
{ 0x00, "Unknown (probably linkset was already up)"},
{ 0x03, "Emergency alignment"},
{ 0x04, "Normal alignment"},
{ 0x05, "Power On MTP2"},
{ 0x06, "Start MTP2"},
{ 0, NULL}
};
static const value_string sm_backhaul_reason_code[] = {
{ 0x00, "Layer management request"},
{ 0x01, "SUERM (Signal Unit Error Monitor) failure"},
{ 0x02, "Excessively long alignment period"},
{ 0x03, "T7 timer expired"},
{ 0x04, "Physical interface failure"},
{ 0x05, "Two or three invalid BSNs"},
{ 0x06, "Two or three invalid FIBs"},
{ 0x07, "LSSU (Link Status Signal Unit) condition"},
{ 0x13, "SIOs (Service Information Octets) received "
"in Link State Control (LSC)"},
{ 0x14, "Timer T2 expired waiting for SIO"},
{ 0x15, "Timer T3 expired waiting for SIE/SIN "},
{ 0x16, "SIO received in initial alignment control (IAC)"},
{ 0x17, "Proving period failure"},
{ 0x18, "Timer T1 expired waiting for FISU (Fill-In Signal Unit)"},
{ 0x19, "SIN received in the in-service state"},
{ 0x20, "CTS lost"},
{ 0x25, "No resources"},
{ 0, NULL}
{ 0x00, "Layer management request"},
{ 0x01, "SUERM (Signal Unit Error Monitor) failure"},
{ 0x02, "Excessively long alignment period"},
{ 0x03, "T7 timer expired"},
{ 0x04, "Physical interface failure"},
{ 0x05, "Two or three invalid BSNs"},
{ 0x06, "Two or three invalid FIBs"},
{ 0x07, "LSSU (Link Status Signal Unit) condition"},
{ 0x13, "SIOs (Service Information Octets) received "
"in Link State Control (LSC)"},
{ 0x14, "Timer T2 expired waiting for SIO"},
{ 0x15, "Timer T3 expired waiting for SIE/SIN "},
{ 0x16, "SIO received in initial alignment control (IAC)"},
{ 0x17, "Proving period failure"},
{ 0x18, "Timer T1 expired waiting for FISU (Fill-In Signal Unit)"},
{ 0x19, "SIN received in the in-service state"},
{ 0x20, "CTS lost"},
{ 0x25, "No resources"},
{ 0, NULL}
};
static const value_string sm_backhaul_event_code[] = {
{ 0x00, "Local processor outage"},
{ 0x01, "Local processor outage recovered"},
{ 0x02, "Entered a congested state"},
{ 0x03, "Exited a congested state"},
{ 0x04, "Physical layer up"},
{ 0x05, "Physical layer down"},
{ 0x06, "Protocol error"},
{ 0x07, "Link is aligned"},
{ 0x08, "Link alignment lost"},
{ 0x09, "Retransmit buffer full"},
{ 0x0a, "Retransmit buffer no longer full"},
{ 0x0b, "Negative acknowledgment"},
{ 0x0c, "Remote entered congestion"},
{ 0x0d, "Remote exited congestion"},
{ 0x0e, "Remote entered processor outage"},
{ 0x0f, "Remote exited processor outage"},
{ 0, NULL}
{ 0x00, "Local processor outage"},
{ 0x01, "Local processor outage recovered"},
{ 0x02, "Entered a congested state"},
{ 0x03, "Exited a congested state"},
{ 0x04, "Physical layer up"},
{ 0x05, "Physical layer down"},
{ 0x06, "Protocol error"},
{ 0x07, "Link is aligned"},
{ 0x08, "Link alignment lost"},
{ 0x09, "Retransmit buffer full"},
{ 0x0a, "Retransmit buffer no longer full"},
{ 0x0b, "Negative acknowledgment"},
{ 0x0c, "Remote entered congestion"},
{ 0x0d, "Remote exited congestion"},
{ 0x0e, "Remote entered processor outage"},
{ 0x0f, "Remote exited processor outage"},
{ 0, NULL}
};
static const value_string sm_backhaul_cause_code[] = {
{ 0x00, "Unknown (default)"},
{ 0x01, "Management initiated"},
{ 0x02, "Abnormal BSN (backward sequence number)"},
{ 0x03, "Abnormal FIB (Forward Indicator Bit)"},
{ 0x04, "Congestion discard"},
{ 0, NULL}
{ 0x00, "Unknown (default)"},
{ 0x01, "Management initiated"},
{ 0x02, "Abnormal BSN (backward sequence number)"},
{ 0x03, "Abnormal FIB (Forward Indicator Bit)"},
{ 0x04, "Congestion discard"},
{ 0, NULL}
};
static const value_string sm_linkdown_cause_code[] = {
{ 0x00, "Unknown (default)"},
{ 0x01, "Management initiated"},
{ 0x03, "Congestion ended"},
{ 0, NULL}
{ 0x00, "Unknown (default)"},
{ 0x01, "Management initiated"},
{ 0x03, "Congestion ended"},
{ 0, NULL}
};
static const value_string sm_retrieval_type[] = {
{ 0x01, "Request for BSN"},
{ 0x02, "Request for MSUs"},
{ 0x03, "Request to drop MSUs"},
{ 0, NULL}
{ 0x01, "Request for BSN"},
{ 0x02, "Request for MSUs"},
{ 0x03, "Request to drop MSUs"},
{ 0, NULL}
};
static const value_string sm_lsc_state_type[] = {
{ 0x00, "Set LPO"},
{ 0x01, "Clear LPO"},
{ 0x02, "Set Emergency"},
{ 0x03, "Clear Emergency"},
{ 0x04, "Clear Buffers"},
{ 0x05, "Clear Transmit Buffer"},
{ 0x06, "Clear ReTransmission Buffer"},
{ 0x07, "Clear Receive Buffer"},
{ 0x08, "Continue"},
{ 0x09, "Power On"},
{ 0x0a, "Start"},
{ 0x0b, "Stop"},
{ 0, NULL}
{ 0x00, "Set LPO"},
{ 0x01, "Clear LPO"},
{ 0x02, "Set Emergency"},
{ 0x03, "Clear Emergency"},
{ 0x04, "Clear Buffers"},
{ 0x05, "Clear Transmit Buffer"},
{ 0x06, "Clear ReTransmission Buffer"},
{ 0x07, "Clear Receive Buffer"},
{ 0x08, "Continue"},
{ 0x09, "Power On"},
{ 0x0a, "Start"},
{ 0x0b, "Stop"},
{ 0, NULL}
};
static const value_string sm_stat_request_type[] = {
{ 0x00, "Reset"},
{ 0x01, "Send & Reset"},
{ 0x02, "Send"},
{ 0, NULL}
{ 0x00, "Reset"},
{ 0x01, "Send & Reset"},
{ 0x02, "Send"},
{ 0, NULL}
};
#define PDU_CONNECT_REQUEST 0x06
#define PDU_CONNECT_CONFIRM 0x07
#define PDU_DISCONNECT_CONFIRM 0x0b
#define PDU_DISCONNECT_INDICATION 0x0c
#define PDU_MTP3_TO_SLT 0x10
#define PDU_MTP3_FROM_SLT 0x11
#define PDU_RETRIEVAL_REQUEST 0x12
#define PDU_RETRIEVAL_CONFIRM 0x13
#define PDU_LSC_REQUEST 0x20
#define PDU_LSC_CONFIRM 0x21
#define PDU_LSC_INDICATION 0x22
#define PDU_STAT_REQUEST 0x44
#define PDU_CONNECT_REQUEST 0x06
#define PDU_CONNECT_CONFIRM 0x07
#define PDU_DISCONNECT_CONFIRM 0x0b
#define PDU_DISCONNECT_INDICATION 0x0c
#define PDU_MTP3_TO_SLT 0x10
#define PDU_MTP3_FROM_SLT 0x11
#define PDU_RETRIEVAL_REQUEST 0x12
#define PDU_RETRIEVAL_CONFIRM 0x13
#define PDU_LSC_REQUEST 0x20
#define PDU_LSC_CONFIRM 0x21
#define PDU_LSC_INDICATION 0x22
#define PDU_STAT_REQUEST 0x44
static const value_string sm_pdu_type_value[] = {
{ PDU_CONNECT_REQUEST, "Connect Request"},
{ PDU_CONNECT_CONFIRM, "Connect Confirm"},
{ 0x0a, "Disconnect Request"},
{ PDU_DISCONNECT_CONFIRM, "Disconnect Confirm"},
{ PDU_DISCONNECT_INDICATION, "Disconnect Indication Message"},
{ PDU_MTP3_TO_SLT, "MSU Request (message to MTP2 link)"},
{ PDU_MTP3_FROM_SLT, "MSU Indication (message from MTP2 link)"},
{ PDU_RETRIEVAL_REQUEST, "Retrieval Request"},
{ PDU_RETRIEVAL_CONFIRM, "Retrieval Confirm"},
{ 0x14, "Retrieval Indication"},
{ 0x15, "Retrieval Message"},
{ PDU_LSC_REQUEST, "Link State Controller Request"},
{ PDU_LSC_CONFIRM, "Link State Controller Confirm"},
{ PDU_LSC_INDICATION, "Link State Controller Indication"},
{ 0x40, "Configuration Request"},
{ 0x41, "Configuration Confirm"},
{ 0x42, "Status Request"},
{ 0x43, "Status Confirm"},
{ PDU_STAT_REQUEST, "Statistic Request"},
{ 0x45, "Statistic Confirm"},
{ 0x46, "Control Request"},
{ 0x47, "Control Confirm"},
{ 0x50, "Flow Control Request"},
{ 0x51, "Flow Control Indication"},
{ 0, NULL }
{ PDU_CONNECT_REQUEST, "Connect Request"},
{ PDU_CONNECT_CONFIRM, "Connect Confirm"},
{ 0x0a, "Disconnect Request"},
{ PDU_DISCONNECT_CONFIRM, "Disconnect Confirm"},
{ PDU_DISCONNECT_INDICATION, "Disconnect Indication Message"},
{ PDU_MTP3_TO_SLT, "MSU Request (message to MTP2 link)"},
{ PDU_MTP3_FROM_SLT, "MSU Indication (message from MTP2 link)"},
{ PDU_RETRIEVAL_REQUEST, "Retrieval Request"},
{ PDU_RETRIEVAL_CONFIRM, "Retrieval Confirm"},
{ 0x14, "Retrieval Indication"},
{ 0x15, "Retrieval Message"},
{ PDU_LSC_REQUEST, "Link State Controller Request"},
{ PDU_LSC_CONFIRM, "Link State Controller Confirm"},
{ PDU_LSC_INDICATION, "Link State Controller Indication"},
{ 0x40, "Configuration Request"},
{ 0x41, "Configuration Confirm"},
{ 0x42, "Status Request"},
{ 0x43, "Status Confirm"},
{ PDU_STAT_REQUEST, "Statistic Request"},
{ 0x45, "Statistic Confirm"},
{ 0x46, "Control Request"},
{ 0x47, "Control Confirm"},
{ 0x50, "Flow Control Request"},
{ 0x51, "Flow Control Indication"},
{ 0, NULL }
};
/* TODO: Change to useful name once known */
@ -271,355 +271,355 @@ static dissector_handle_t data_handle;
static void
dissect_sm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_item *ti;
proto_tree *sm_tree;
tvbuff_t *next_tvb = NULL;
guint32 sm_message_type;
guint32 bh_event_code = 0;
guint16 protocol;
guint16 msg_type = 0;
guint16 length;
guint16 tag;
int offset = 0;
proto_item *ti;
proto_tree *sm_tree;
tvbuff_t *next_tvb = NULL;
guint32 sm_message_type;
guint32 bh_event_code = 0;
guint16 protocol;
guint16 msg_type = 0;
guint16 length;
guint16 tag;
int offset = 0;
sm_message_type = tvb_get_ntohl(tvb,offset);
sm_message_type = tvb_get_ntohl(tvb,offset);
col_set_str(pinfo->cinfo, COL_PROTOCOL, "SM");
col_set_str(pinfo->cinfo, COL_PROTOCOL, "SM");
col_add_fstr(pinfo->cinfo, COL_INFO, "Cisco SM Packet (%s)",
val_to_str_const(sm_message_type, sm_message_type_value_info,"reserved"));
col_add_fstr(pinfo->cinfo, COL_INFO, "Cisco SM Packet (%s)",
val_to_str_const(sm_message_type, sm_message_type_value_info,"reserved"));
ti = proto_tree_add_item(tree, proto_sm, tvb, offset, 0, ENC_NA);
sm_tree = proto_item_add_subtree(ti, ett_sm);
ti = proto_tree_add_item(tree, proto_sm, tvb, offset, 0, ENC_NA);
sm_tree = proto_item_add_subtree(ti, ett_sm);
proto_tree_add_uint_format_value(sm_tree, hf_sm_sm_msg_type, tvb, offset, 4, sm_message_type,
"%s (0x%0x)", val_to_str_const(sm_message_type, sm_message_type_value, "reserved"), sm_message_type);
proto_tree_add_uint_format_value(sm_tree, hf_sm_sm_msg_type, tvb, offset, 4, sm_message_type,
"%s (0x%0x)", val_to_str_const(sm_message_type, sm_message_type_value, "reserved"), sm_message_type);
offset = offset + 4;
if (sm_message_type == MESSAGE_TYPE_PDU) {
proto_tree_add_item(sm_tree, hf_sm_protocol, tvb, offset, 2, ENC_BIG_ENDIAN);
protocol = tvb_get_ntohs(tvb,offset);
offset = offset + 2;
switch(protocol){
/* start case RUDP BSM v.1 ---------------------------------------------------------- */
case SM_PROTOCOL_X004:
if (!tree)
return;
offset = offset + 4;
if (sm_message_type == MESSAGE_TYPE_PDU) {
proto_tree_add_item(sm_tree, hf_sm_protocol, tvb, offset, 2, ENC_BIG_ENDIAN);
protocol = tvb_get_ntohs(tvb,offset);
offset = offset + 2;
switch(protocol){
/* start case RUDP BSM v.1 ---------------------------------------------------------- */
case SM_PROTOCOL_X004:
if (!tree)
return;
proto_tree_add_item(sm_tree, hf_sm_msg_id, tvb, offset, 2, ENC_BIG_ENDIAN);
offset = offset +2;
msg_type = tvb_get_ntohs(tvb,offset);
proto_tree_add_uint_format_value(sm_tree, hf_sm_msg_type, tvb, offset, 2, msg_type,
"%s (0x%0x)", val_to_str_const(msg_type, sm_pdu_type_value, "reserved"),
msg_type);
msg_type = tvb_get_ntohs(tvb,offset);
offset = offset + 2;
proto_tree_add_item(sm_tree, hf_sm_channel, tvb, offset, 2, ENC_BIG_ENDIAN);
offset = offset + 2;
proto_tree_add_item(sm_tree, hf_sm_bearer, tvb, offset, 2, ENC_BIG_ENDIAN);
offset = offset +2;
proto_tree_add_item(sm_tree, hf_sm_len, tvb, offset, 2, ENC_BIG_ENDIAN);
length = tvb_get_ntohs(tvb,offset);
offset = offset +2;
proto_item_set_len(ti, 16);
proto_tree_add_item(sm_tree, hf_sm_msg_id, tvb, offset, 2, ENC_BIG_ENDIAN);
offset = offset +2;
msg_type = tvb_get_ntohs(tvb,offset);
proto_tree_add_uint_format_value(sm_tree, hf_sm_msg_type, tvb, offset, 2, msg_type,
"%s (0x%0x)", val_to_str_const(msg_type, sm_pdu_type_value, "reserved"),
msg_type);
msg_type = tvb_get_ntohs(tvb,offset);
offset = offset + 2;
proto_tree_add_item(sm_tree, hf_sm_channel, tvb, offset, 2, ENC_BIG_ENDIAN);
offset = offset + 2;
proto_tree_add_item(sm_tree, hf_sm_bearer, tvb, offset, 2, ENC_BIG_ENDIAN);
offset = offset +2;
proto_tree_add_item(sm_tree, hf_sm_len, tvb, offset, 2, ENC_BIG_ENDIAN);
length = tvb_get_ntohs(tvb,offset);
offset = offset +2;
proto_item_set_len(ti, 16);
if (length > 0) {
next_tvb = tvb_new_subset(tvb, offset, length, length);
if (length > 0) {
next_tvb = tvb_new_subset(tvb, offset, length, length);
if ((msg_type == PDU_MTP3_TO_SLT || msg_type == PDU_MTP3_FROM_SLT)) {
call_dissector(q931_handle, next_tvb, pinfo, tree);
} else {
call_dissector(data_handle, next_tvb, pinfo, tree);
}
}
if ((msg_type == PDU_MTP3_TO_SLT || msg_type == PDU_MTP3_FROM_SLT)) {
call_dissector(q931_handle, next_tvb, pinfo, tree);
} else {
call_dissector(data_handle, next_tvb, pinfo, tree);
}
}
break;
/* end case RUDP BSM v.1 ---------------------------------------------------------- */
break;
/* end case RUDP BSM v.1 ---------------------------------------------------------- */
case SM_PROTOCOL_X100:
case SM_PROTOCOL_X122:
if (!tree)
return;
/* Protocol 0x100/0x122 only contains a length and then an EISUP packet */
proto_tree_add_item(sm_tree, hf_sm_len, tvb, offset, 2, ENC_BIG_ENDIAN);
length = tvb_get_ntohs(tvb,offset);
offset = offset + 2;
proto_item_set_len(ti, 8);
case SM_PROTOCOL_X100:
case SM_PROTOCOL_X122:
if (!tree)
return;
/* Protocol 0x100/0x122 only contains a length and then an EISUP packet */
proto_tree_add_item(sm_tree, hf_sm_len, tvb, offset, 2, ENC_BIG_ENDIAN);
length = tvb_get_ntohs(tvb,offset);
offset = offset + 2;
proto_item_set_len(ti, 8);
/* This should be the EISUP dissector but we havent got one
* right now - so decode it as data for now ... */
next_tvb = tvb_new_subset(tvb, offset, length, length);
call_dissector(data_handle, next_tvb, pinfo, sm_tree);
/* This should be the EISUP dissector but we havent got one
* right now - so decode it as data for now ... */
next_tvb = tvb_new_subset(tvb, offset, length, length);
call_dissector(data_handle, next_tvb, pinfo, sm_tree);
break;
case SM_PROTOCOL_X101:
if (!tree)
return;
/* XXX Reverse enginered so this may not be correct!!!
* EISUP - used between Cisco HSI and Cisco PGW devices,
* uses RUDP with default port number 8003.
* Protocol stack is RUDP->Cisco SM->SDP.
* This implementation is PROPRIETARY
*/
proto_tree_add_item(sm_tree, hf_sm_len, tvb, offset, 2, ENC_BIG_ENDIAN);
length = tvb_get_ntohs(tvb,offset);
offset = offset + 2;
proto_item_set_len(ti, length + offset);
/* The next stuff seems to be IP addr */
proto_tree_add_item(sm_tree, hf_sm_ip_addr, tvb, offset, 4, ENC_BIG_ENDIAN);
offset = offset + 4;
/* This part looks to be the same per session */
proto_tree_add_item(sm_tree, hf_sm_context, tvb, offset, 4, ENC_BIG_ENDIAN);
offset = offset +4;
/* Some sort of message type? */
proto_tree_add_item(sm_tree, hf_sm_eisup_msg_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset = offset + 1;
/* XXX Problem are tags 1 or two bytes???*/
proto_tree_add_item(sm_tree, hf_sm_tag, tvb, offset, 2, ENC_BIG_ENDIAN);
break;
case SM_PROTOCOL_X101:
if (!tree)
return;
/* XXX Reverse enginered so this may not be correct!!!
* EISUP - used between Cisco HSI and Cisco PGW devices,
* uses RUDP with default port number 8003.
* Protocol stack is RUDP->Cisco SM->SDP.
* This implementation is PROPRIETARY
*/
proto_tree_add_item(sm_tree, hf_sm_len, tvb, offset, 2, ENC_BIG_ENDIAN);
length = tvb_get_ntohs(tvb,offset);
offset = offset + 2;
proto_item_set_len(ti, length + offset);
/* The next stuff seems to be IP addr */
proto_tree_add_item(sm_tree, hf_sm_ip_addr, tvb, offset, 4, ENC_BIG_ENDIAN);
offset = offset + 4;
/* This part looks to be the same per session */
proto_tree_add_item(sm_tree, hf_sm_context, tvb, offset, 4, ENC_BIG_ENDIAN);
offset = offset +4;
/* Some sort of message type? */
proto_tree_add_item(sm_tree, hf_sm_eisup_msg_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset = offset + 1;
/* XXX Problem are tags 1 or two bytes???*/
proto_tree_add_item(sm_tree, hf_sm_tag, tvb, offset, 2, ENC_BIG_ENDIAN);
tag = tvb_get_ntohs(tvb,offset);
offset = offset +2;
if (tag== 0x01ac) {
proto_tree_add_item(sm_tree, hf_sm_len, tvb, offset, 2, ENC_BIG_ENDIAN);
length = tvb_get_ntohs(tvb,offset);
offset = offset +2;
next_tvb = tvb_new_subset(tvb, offset, length, length);
call_dissector(sdp_handle, next_tvb, pinfo, sm_tree);
/*offset = offset+length;*/
tag = tvb_get_ntohs(tvb,offset);
offset = offset +2;
if (tag== 0x01ac) {
proto_tree_add_item(sm_tree, hf_sm_len, tvb, offset, 2, ENC_BIG_ENDIAN);
length = tvb_get_ntohs(tvb,offset);
offset = offset +2;
next_tvb = tvb_new_subset(tvb, offset, length, length);
call_dissector(sdp_handle, next_tvb, pinfo, sm_tree);
/*offset = offset+length;*/
}
/*return;*/
break;
case SM_PROTOCOL_X114:
if (!tree)
return;
/* XXX Reverse enginered so this may not be correct!!! */
proto_tree_add_item(sm_tree, hf_sm_len, tvb, offset, 2, ENC_BIG_ENDIAN);
length = tvb_get_ntohs(tvb,offset);
offset = offset + 2;
proto_item_set_len(ti, length + offset);
/* The next stuff seems to be IP addr */
proto_tree_add_item(sm_tree, hf_sm_ip_addr, tvb, offset, 4, ENC_BIG_ENDIAN);
offset = offset + 4;
proto_tree_add_item(sm_tree, hf_sm_context, tvb, offset, 4, ENC_BIG_ENDIAN);
offset = offset +4;
/* Some sort of message type? */
proto_tree_add_item(sm_tree, hf_sm_eisup_msg_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset = offset + 1;
/* XXX Problem are tags 1 or two bytes???*/
proto_tree_add_item(sm_tree, hf_sm_tag, tvb, offset, 2, ENC_BIG_ENDIAN);
}
/*return;*/
break;
case SM_PROTOCOL_X114:
if (!tree)
return;
/* XXX Reverse enginered so this may not be correct!!! */
proto_tree_add_item(sm_tree, hf_sm_len, tvb, offset, 2, ENC_BIG_ENDIAN);
length = tvb_get_ntohs(tvb,offset);
offset = offset + 2;
proto_item_set_len(ti, length + offset);
/* The next stuff seems to be IP addr */
proto_tree_add_item(sm_tree, hf_sm_ip_addr, tvb, offset, 4, ENC_BIG_ENDIAN);
offset = offset + 4;
proto_tree_add_item(sm_tree, hf_sm_context, tvb, offset, 4, ENC_BIG_ENDIAN);
offset = offset +4;
/* Some sort of message type? */
proto_tree_add_item(sm_tree, hf_sm_eisup_msg_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset = offset + 1;
/* XXX Problem are tags 1 or two bytes???*/
proto_tree_add_item(sm_tree, hf_sm_tag, tvb, offset, 2, ENC_BIG_ENDIAN);
tag = tvb_get_ntohs(tvb,offset);
offset = offset +2;
if (tag== 0x01ac) {
proto_tree_add_item(sm_tree, hf_sm_len, tvb, offset, 2, ENC_BIG_ENDIAN);
length = tvb_get_ntohs(tvb,offset);
offset = offset +2;
next_tvb = tvb_new_subset(tvb, offset, length, length);
call_dissector(sdp_handle, next_tvb, pinfo, sm_tree);
/*offset = offset+length;*/
tag = tvb_get_ntohs(tvb,offset);
offset = offset +2;
if (tag== 0x01ac) {
proto_tree_add_item(sm_tree, hf_sm_len, tvb, offset, 2, ENC_BIG_ENDIAN);
length = tvb_get_ntohs(tvb,offset);
offset = offset +2;
next_tvb = tvb_new_subset(tvb, offset, length, length);
call_dissector(sdp_handle, next_tvb, pinfo, sm_tree);
/*offset = offset+length;*/
}
break;
default:
proto_tree_add_item(sm_tree, hf_sm_msg_id, tvb, offset, 2, ENC_BIG_ENDIAN);
offset = offset +2;
msg_type = tvb_get_ntohs(tvb,offset);
proto_tree_add_uint_format_value(sm_tree, hf_sm_msg_type, tvb, offset, 2, msg_type,
"%s (0x%0x)", val_to_str_const(msg_type, sm_pdu_type_value, "reserved"),
msg_type);
msg_type = tvb_get_ntohs(tvb,offset);
offset = offset + 2;
proto_tree_add_item(sm_tree, hf_sm_channel, tvb, offset, 2, ENC_BIG_ENDIAN);
offset = offset + 2;
proto_tree_add_item(sm_tree, hf_sm_bearer, tvb, offset, 2, ENC_BIG_ENDIAN);
offset = offset +2;
proto_tree_add_item(sm_tree, hf_sm_len, tvb, offset, 2, ENC_BIG_ENDIAN);
length = tvb_get_ntohs(tvb,offset);
offset = offset +2;
proto_item_set_len(ti, 16);
}
break;
default:
proto_tree_add_item(sm_tree, hf_sm_msg_id, tvb, offset, 2, ENC_BIG_ENDIAN);
offset = offset +2;
msg_type = tvb_get_ntohs(tvb,offset);
proto_tree_add_uint_format_value(sm_tree, hf_sm_msg_type, tvb, offset, 2, msg_type,
"%s (0x%0x)", val_to_str_const(msg_type, sm_pdu_type_value, "reserved"),
msg_type);
msg_type = tvb_get_ntohs(tvb,offset);
offset = offset + 2;
proto_tree_add_item(sm_tree, hf_sm_channel, tvb, offset, 2, ENC_BIG_ENDIAN);
offset = offset + 2;
proto_tree_add_item(sm_tree, hf_sm_bearer, tvb, offset, 2, ENC_BIG_ENDIAN);
offset = offset +2;
proto_tree_add_item(sm_tree, hf_sm_len, tvb, offset, 2, ENC_BIG_ENDIAN);
length = tvb_get_ntohs(tvb,offset);
offset = offset +2;
proto_item_set_len(ti, 16);
if (length > 0) {
next_tvb = tvb_new_subset(tvb, offset, length, length);
if (length > 0) {
next_tvb = tvb_new_subset(tvb, offset, length, length);
switch (msg_type) {
case PDU_MTP3_TO_SLT:
case PDU_MTP3_FROM_SLT:
call_dissector(mtp3_handle, next_tvb, pinfo, tree);
break;
case PDU_CONNECT_REQUEST:
case PDU_CONNECT_CONFIRM:
proto_tree_add_item(sm_tree, hf_sm_alignment_type, tvb, offset, 4, ENC_BIG_ENDIAN);
break;
case PDU_DISCONNECT_CONFIRM:
case PDU_DISCONNECT_INDICATION:
proto_tree_add_item(sm_tree, hf_sm_backhaul_reason_code, tvb, offset, 4, ENC_BIG_ENDIAN);
break;
case PDU_RETRIEVAL_REQUEST:
case PDU_RETRIEVAL_CONFIRM:
proto_tree_add_item(sm_tree, hf_sm_retrieval_type, tvb, offset, 4, ENC_BIG_ENDIAN);
if (msg_type == PDU_RETRIEVAL_CONFIRM && tvb_get_ntohl(tvb,offset) == 0x01) {
offset += 4;
proto_tree_add_item(sm_tree, hf_sm_bsn_num, tvb, offset, 4, ENC_BIG_ENDIAN);
}
break;
case PDU_LSC_REQUEST:
case PDU_LSC_CONFIRM:
proto_tree_add_item(sm_tree, hf_sm_lsc_state_type, tvb, offset, 4, ENC_BIG_ENDIAN);
break;
case PDU_LSC_INDICATION:
proto_tree_add_item(sm_tree, hf_sm_backhaul_event_code, tvb, offset, 4, ENC_BIG_ENDIAN);
bh_event_code = tvb_get_ntohl(tvb,offset);
if (bh_event_code == 0x02 || bh_event_code == 0x04) {
offset += 4;
proto_tree_add_item(sm_tree, hf_sm_linkdown_cause_code, tvb, offset, 4, ENC_BIG_ENDIAN);
} else if (bh_event_code == 0x06) {
offset += 4;
proto_tree_add_item(sm_tree, hf_sm_backhaul_cause_code, tvb, offset, 4, ENC_BIG_ENDIAN);
}
break;
case PDU_STAT_REQUEST:
proto_tree_add_item(sm_tree, hf_sm_stat_request_type, tvb, offset, 4, ENC_BIG_ENDIAN);
break;
default:
call_dissector(data_handle, next_tvb, pinfo, tree);
}
}
}
}
switch (msg_type) {
case PDU_MTP3_TO_SLT:
case PDU_MTP3_FROM_SLT:
call_dissector(mtp3_handle, next_tvb, pinfo, tree);
break;
case PDU_CONNECT_REQUEST:
case PDU_CONNECT_CONFIRM:
proto_tree_add_item(sm_tree, hf_sm_alignment_type, tvb, offset, 4, ENC_BIG_ENDIAN);
break;
case PDU_DISCONNECT_CONFIRM:
case PDU_DISCONNECT_INDICATION:
proto_tree_add_item(sm_tree, hf_sm_backhaul_reason_code, tvb, offset, 4, ENC_BIG_ENDIAN);
break;
case PDU_RETRIEVAL_REQUEST:
case PDU_RETRIEVAL_CONFIRM:
proto_tree_add_item(sm_tree, hf_sm_retrieval_type, tvb, offset, 4, ENC_BIG_ENDIAN);
if (msg_type == PDU_RETRIEVAL_CONFIRM && tvb_get_ntohl(tvb,offset) == 0x01) {
offset += 4;
proto_tree_add_item(sm_tree, hf_sm_bsn_num, tvb, offset, 4, ENC_BIG_ENDIAN);
}
break;
case PDU_LSC_REQUEST:
case PDU_LSC_CONFIRM:
proto_tree_add_item(sm_tree, hf_sm_lsc_state_type, tvb, offset, 4, ENC_BIG_ENDIAN);
break;
case PDU_LSC_INDICATION:
proto_tree_add_item(sm_tree, hf_sm_backhaul_event_code, tvb, offset, 4, ENC_BIG_ENDIAN);
bh_event_code = tvb_get_ntohl(tvb,offset);
if (bh_event_code == 0x02 || bh_event_code == 0x04) {
offset += 4;
proto_tree_add_item(sm_tree, hf_sm_linkdown_cause_code, tvb, offset, 4, ENC_BIG_ENDIAN);
} else if (bh_event_code == 0x06) {
offset += 4;
proto_tree_add_item(sm_tree, hf_sm_backhaul_cause_code, tvb, offset, 4, ENC_BIG_ENDIAN);
}
break;
case PDU_STAT_REQUEST:
proto_tree_add_item(sm_tree, hf_sm_stat_request_type, tvb, offset, 4, ENC_BIG_ENDIAN);
break;
default:
call_dissector(data_handle, next_tvb, pinfo, tree);
}
}
}
}
}
void
proto_register_sm(void)
{
static hf_register_info hf[] = {
{ &hf_sm_sm_msg_type,
{ "SM Message Type", "sm.sm_msg_type",
FT_UINT32, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_sm_protocol,
{ "Protocol Type", "sm.protocol",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_sm_msg_id,
{ "Message ID", "sm.msgid",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_sm_msg_type,
{ "Message Type", "sm.msg_type",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_sm_channel,
{ "Channel ID", "sm.channel",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_sm_bearer,
{ "Bearer ID", "sm.bearer",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_sm_len,
{ "Length", "sm.len",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_sm_ip_addr,
{ "IPv4 address","sm.ip_addr",
FT_IPv4,BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_sm_context,
{ "Context","sm.context",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Context(guesswork!)", HFILL }
},
{ &hf_sm_eisup_msg_id,
{ "Message id","sm.eisup_message_id",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Message id(guesswork!)", HFILL }
},
{ &hf_sm_tag,
{ "Tag","sm.tag",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Tag(guesswork!)", HFILL }
},
{ &hf_sm_alignment_type,
{ "Alignment type","sm.connect_type",
FT_UINT32, BASE_HEX, VALS(sm_alignment_type), 0x0,
NULL, HFILL }
},
{ &hf_sm_backhaul_reason_code,
{ "Backhaul reason code","sm.backhaul_reason",
FT_UINT32, BASE_HEX, VALS(sm_backhaul_reason_code), 0x0,
NULL, HFILL }
},
{ &hf_sm_backhaul_event_code,
{ "Backhaul event code","sm.backhaul_event",
FT_UINT32, BASE_HEX, VALS(sm_backhaul_event_code), 0x0,
NULL, HFILL }
},
{ &hf_sm_backhaul_cause_code,
{ "Backhaul cause code","sm.backhaul_cause",
FT_UINT32, BASE_HEX, VALS(sm_backhaul_cause_code), 0x0,
NULL, HFILL }
},
{ &hf_sm_linkdown_cause_code,
{ "Link down cause","sm.linkdown_reason",
FT_UINT32, BASE_HEX, VALS(sm_linkdown_cause_code), 0x0,
NULL, HFILL }
},
static hf_register_info hf[] = {
{ &hf_sm_sm_msg_type,
{ "SM Message Type", "sm.sm_msg_type",
FT_UINT32, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_sm_protocol,
{ "Protocol Type", "sm.protocol",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_sm_msg_id,
{ "Message ID", "sm.msgid",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_sm_msg_type,
{ "Message Type", "sm.msg_type",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_sm_channel,
{ "Channel ID", "sm.channel",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_sm_bearer,
{ "Bearer ID", "sm.bearer",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_sm_len,
{ "Length", "sm.len",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_sm_ip_addr,
{ "IPv4 address","sm.ip_addr",
FT_IPv4,BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_sm_context,
{ "Context","sm.context",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Context(guesswork!)", HFILL }
},
{ &hf_sm_eisup_msg_id,
{ "Message id","sm.eisup_message_id",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Message id(guesswork!)", HFILL }
},
{ &hf_sm_tag,
{ "Tag","sm.tag",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Tag(guesswork!)", HFILL }
},
{ &hf_sm_alignment_type,
{ "Alignment type","sm.connect_type",
FT_UINT32, BASE_HEX, VALS(sm_alignment_type), 0x0,
NULL, HFILL }
},
{ &hf_sm_backhaul_reason_code,
{ "Backhaul reason code","sm.backhaul_reason",
FT_UINT32, BASE_HEX, VALS(sm_backhaul_reason_code), 0x0,
NULL, HFILL }
},
{ &hf_sm_backhaul_event_code,
{ "Backhaul event code","sm.backhaul_event",
FT_UINT32, BASE_HEX, VALS(sm_backhaul_event_code), 0x0,
NULL, HFILL }
},
{ &hf_sm_backhaul_cause_code,
{ "Backhaul cause code","sm.backhaul_cause",
FT_UINT32, BASE_HEX, VALS(sm_backhaul_cause_code), 0x0,
NULL, HFILL }
},
{ &hf_sm_linkdown_cause_code,
{ "Link down cause","sm.linkdown_reason",
FT_UINT32, BASE_HEX, VALS(sm_linkdown_cause_code), 0x0,
NULL, HFILL }
},
{ &hf_sm_retrieval_type,
{ "Retrieval type","sm.retrieval_type",
FT_UINT32, BASE_HEX, VALS(sm_retrieval_type), 0x0,
NULL, HFILL }
},
{ &hf_sm_lsc_state_type,
{ "LSC Request type","sm.lsc_state_type",
FT_UINT32, BASE_HEX, VALS(sm_lsc_state_type), 0x0,
NULL, HFILL }
},
{ &hf_sm_stat_request_type,
{ "Statistic request type","sm.stat_request_type",
FT_UINT32, BASE_HEX, VALS(sm_stat_request_type), 0x0,
NULL, HFILL }
},
{ &hf_sm_bsn_num,
{ "BSN","sm.bsn_num",
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_sm_retrieval_type,
{ "Retrieval type","sm.retrieval_type",
FT_UINT32, BASE_HEX, VALS(sm_retrieval_type), 0x0,
NULL, HFILL }
},
{ &hf_sm_lsc_state_type,
{ "LSC Request type","sm.lsc_state_type",
FT_UINT32, BASE_HEX, VALS(sm_lsc_state_type), 0x0,
NULL, HFILL }
},
{ &hf_sm_stat_request_type,
{ "Statistic request type","sm.stat_request_type",
FT_UINT32, BASE_HEX, VALS(sm_stat_request_type), 0x0,
NULL, HFILL }
},
{ &hf_sm_bsn_num,
{ "BSN","sm.bsn_num",
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
};
};
/* Setup protocol subtree array */
static gint *ett[] = {
&ett_sm,
};
static gint *ett[] = {
&ett_sm,
};
/* Register the protocol name and description */
proto_sm = proto_register_protocol("Cisco Session Management",
"SM", "sm");
proto_sm = proto_register_protocol("Cisco Session Management",
"SM", "sm");
register_dissector("sm", dissect_sm, proto_sm);
register_dissector("sm", dissect_sm, proto_sm);
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_sm, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
proto_register_field_array(proto_sm, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
void
proto_reg_handoff_sm(void)
{
sdp_handle = find_dissector("sdp");
mtp3_handle = find_dissector("mtp3");
q931_handle = find_dissector("q931");
data_handle = find_dissector("data");
sdp_handle = find_dissector("sdp");
mtp3_handle = find_dissector("mtp3");
q931_handle = find_dissector("q931");
data_handle = find_dissector("data");
}
/*
@ -627,10 +627,10 @@ proto_reg_handoff_sm(void)
*
* Local variables:
* c-basic-offset: 4
* tab-width: 4
* indent-tabs-mode: t
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=false:
* :indentSize=4:tabSize=8:noTabs=true:
*/

View File

@ -46,8 +46,8 @@ static expert_field ei_finger_nocrlf = EI_INIT;
static gint ett_finger = -1;
typedef struct _finger_transaction_t {
guint32 req_frame;
guint32 rep_frame;
guint32 req_frame;
guint32 rep_frame;
nstime_t req_time;
} finger_transaction_t;
@ -55,12 +55,12 @@ static int
dissect_finger(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
void *data _U_)
{
proto_item *ti, *expert_ti;
proto_tree *finger_tree;
conversation_t *conversation;
proto_item *ti, *expert_ti;
proto_tree *finger_tree;
conversation_t *conversation;
finger_transaction_t *finger_trans;
gboolean is_query;
guint len;
gboolean is_query;
guint len;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FINGER");
@ -213,11 +213,11 @@ proto_reg_handoff_finger(void)
*
* Local variables:
* c-basic-offset: 4
* tab-width: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=4 tabstop=4 expandtab:
* :indentSize=4:tabSize=4:noTabs=true:
* vi: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/

View File

@ -211,11 +211,11 @@ proto_reg_handoff_fmtp(void)
*
* Local variables:
* c-basic-offset: 4
* tab-width: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=4 tabstop=4 expandtab:
* :indentSize=4:tabSize=4:noTabs=true:
* vi: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/

View File

@ -526,8 +526,8 @@ static void
dissect_ftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
gboolean is_request;
proto_tree *ftp_tree = NULL;
proto_tree *reqresp_tree = NULL;
proto_tree *ftp_tree;
proto_tree *reqresp_tree;
proto_item *ti, *hidden_item;
gint offset;
const guchar *line;
@ -1080,10 +1080,10 @@ proto_reg_handoff_ftp(void)
*
* Local variables:
* c-basic-offset: 4
* tab-width: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=4 tabstop=4 expandtab:
* :indentSize=4:tabSize=4:noTabs=true:
* vi: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/

View File

@ -325,7 +325,7 @@ dissect_session_init(proto_tree *body_tree, tvbuff_t *tvb, gint offset,
{
if (bodylen == 5) {
proto_tree_add_item(body_tree, hf_hartip_master_type, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
offset += 1;
proto_tree_add_item(body_tree, hf_hartip_inactivity_close_timer, tvb, offset, 4, ENC_BIG_ENDIAN);
} else {
@ -736,8 +736,8 @@ dissect_pass_through(proto_tree *body_tree, tvbuff_t *tvb, gint offset,
delimiter = tvb_get_guint8(tvb, offset);
ti = proto_tree_add_uint(body_tree, hf_hartip_pt_delimiter, tvb, offset, 1,
delimiter);
offset++;
length--;
offset += 1;
length -= 1;
if ((delimiter & 0x7) == 2) {
frame_type_str = "STX";
@ -759,8 +759,8 @@ dissect_pass_through(proto_tree *body_tree, tvbuff_t *tvb, gint offset,
if (is_short == 1) {
if (length > 0) {
proto_tree_add_item(body_tree, hf_hartip_pt_short_addr, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
length--;
offset += 1;
length -= 1;
}
} else {
if (length > 4) {
@ -776,25 +776,25 @@ dissect_pass_through(proto_tree *body_tree, tvbuff_t *tvb, gint offset,
if (length > 0) {
cmd = tvb_get_guint8(tvb, offset);
proto_tree_add_item(body_tree, hf_hartip_pt_command, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
length--;
offset += 1;
length -= 1;
}
if (length > 0) {
proto_tree_add_item(body_tree, hf_hartip_pt_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
length--;
offset += 1;
length -= 1;
}
if (is_rsp == 1) {
if (length > 0) {
proto_tree_add_item(body_tree, hf_hartip_pt_response_code, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
length--;
offset += 1;
length -= 1;
}
if (length > 0) {
proto_tree_add_item(body_tree, hf_hartip_pt_device_status, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
length--;
offset += 1;
length -= 1;
}
}
@ -868,17 +868,17 @@ dissect_hartip_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
hdr_tree = proto_item_add_subtree(ti, ett_hartip_hdr);
proto_tree_add_item(hdr_tree, hf_hartip_hdr_version, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
offset += 1;
message_type = tvb_get_guint8(tvb, offset);
msg_type_str = val_to_str(message_type, hartip_message_type_values, "Unknown message type %d");
proto_tree_add_item(hdr_tree, hf_hartip_hdr_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
offset += 1;
message_id = tvb_get_guint8(tvb, offset);
msg_id_str = val_to_str(message_id, hartip_message_id_values, "Unknown message %d");
proto_tree_add_item(hdr_tree, hf_hartip_hdr_message_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
offset += 1;
/* Setup statistics for tap. */
tapinfo = wmem_new(wmem_packet_scope(), hartip_tap_info);
@ -891,7 +891,7 @@ dissect_hartip_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
}
proto_tree_add_item(hdr_tree, hf_hartip_hdr_status, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
offset += 1;
transaction_id = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(hdr_tree, hf_hartip_hdr_transaction_id, tvb, offset, 2, ENC_BIG_ENDIAN);
@ -947,37 +947,37 @@ dissect_hartip_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
static guint
get_dissect_hartip_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
{
return tvb_get_ntohs(tvb, offset+6);
return tvb_get_ntohs(tvb, offset+6);
}
static int
dissect_hartip_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
return dissect_hartip_common(tvb, pinfo, tree, 0);
return dissect_hartip_common(tvb, pinfo, tree, 0);
}
static int
dissect_hartip_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
void *data)
{
if (!tvb_bytes_exist(tvb, 0, HARTIP_HEADER_LENGTH))
return 0;
if (!tvb_bytes_exist(tvb, 0, HARTIP_HEADER_LENGTH))
return 0;
tcp_dissect_pdus(tvb, pinfo, tree, hartip_desegment, HARTIP_HEADER_LENGTH,
get_dissect_hartip_len, dissect_hartip_pdu, data);
return tvb_reported_length(tvb);
tcp_dissect_pdus(tvb, pinfo, tree, hartip_desegment, HARTIP_HEADER_LENGTH,
get_dissect_hartip_len, dissect_hartip_pdu, data);
return tvb_reported_length(tvb);
}
static int
dissect_hartip_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
void *data _U_)
{
gint offset = 0;
gint offset = 0;
while (tvb_reported_length_remaining(tvb, offset) >= HARTIP_HEADER_LENGTH)
offset += dissect_hartip_common(tvb, pinfo, tree, offset);
while (tvb_reported_length_remaining(tvb, offset) >= HARTIP_HEADER_LENGTH)
offset += dissect_hartip_common(tvb, pinfo, tree, offset);
return offset;
return offset;
}
void
@ -1560,11 +1560,11 @@ proto_reg_handoff_hartip(void)
*
* Local variables:
* c-basic-offset: 2
* tab-width: 2
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=2 tabstop=2 expandtab:
* :indentSize=2:tabSize=2:noTabs=true:
* vi: set shiftwidth=2 tabstop=8 expandtab:
* :indentSize=2:tabSize=8:noTabs=true:
*/

View File

@ -125,41 +125,45 @@ static int hf_idrp_rib_refresh_rib_attr_security_reg_id = -1;
static int hf_idrp_rib_refresh_rib_attr_security_info = -1;
/* flags */
#define IDRP_UPDATE_PATH_FLAG_OPTIONAL 0x80
#define IDRP_UPDATE_PATH_FLAG_OPTIONAL_TRANSITIVE 0xc0
#define IDRP_UPDATE_PATH_FLAG_OPTIONAL 0x80
#define IDRP_UPDATE_PATH_FLAG_OPTIONAL_TRANSITIVE 0xc0
#define IDRP_UPDATE_PATH_FLAG_OPTIONAL_TRANSITIVE_PARTIAL 0xe0
#define IDRP_UPDATE_PATH_FLAG_TRANSITIVE 0x40
#define IDRP_UPDATE_PATH_FLAG_PARTIAL 0x20
#define IDRP_UPDATE_PATH_FLAG_TRANSITIVE 0x40
#define IDRP_UPDATE_PATH_FLAG_PARTIAL 0x20
static const value_string idrp_path_attr_flags[] = {
{IDRP_UPDATE_PATH_FLAG_OPTIONAL, "Optional"},
{IDRP_UPDATE_PATH_FLAG_TRANSITIVE, "Transitive"},
{IDRP_UPDATE_PATH_FLAG_PARTIAL, "Partial"},
{IDRP_UPDATE_PATH_FLAG_OPTIONAL_TRANSITIVE, "Optional, Transitive"},
{IDRP_UPDATE_PATH_FLAG_OPTIONAL,
"Optional"},
{IDRP_UPDATE_PATH_FLAG_TRANSITIVE,
"Transitive"},
{IDRP_UPDATE_PATH_FLAG_PARTIAL,
"Partial"},
{IDRP_UPDATE_PATH_FLAG_OPTIONAL_TRANSITIVE,
"Optional, Transitive"},
{IDRP_UPDATE_PATH_FLAG_OPTIONAL_TRANSITIVE_PARTIAL,
"Optional, Transitive, Partial"},
"Optional, Transitive, Partial"},
{0, NULL}
};
/* BISPDU Type Codes */
#define IDRP_TYPE_OPEN 1
#define IDRP_TYPE_UPDATE 2
#define IDRP_TYPE_ERROR 3
#define IDRP_TYPE_KEEPALIVE 4
#define IDRP_TYPE_CEASE 5
#define IDRP_TYPE_OPEN 1
#define IDRP_TYPE_UPDATE 2
#define IDRP_TYPE_ERROR 3
#define IDRP_TYPE_KEEPALIVE 4
#define IDRP_TYPE_CEASE 5
#define IDRP_TYPE_RIB_REFRESH 6
static const value_string idrp_pdu_types[] = {
{IDRP_TYPE_OPEN, "OPEN"},
{IDRP_TYPE_UPDATE, "UPDATE"},
{IDRP_TYPE_ERROR, "ERROR"},
{IDRP_TYPE_KEEPALIVE, "KEEPALIVE"},
{IDRP_TYPE_CEASE, "CEASE"},
{IDRP_TYPE_OPEN, "OPEN"},
{IDRP_TYPE_UPDATE, "UPDATE"},
{IDRP_TYPE_ERROR, "ERROR"},
{IDRP_TYPE_KEEPALIVE, "KEEPALIVE"},
{IDRP_TYPE_CEASE, "CEASE"},
{IDRP_TYPE_RIB_REFRESH, "RIB REFRESH"},
{0, NULL}
};
#define IDRP_OPEN_AUTHENTICATION_CODE_INTEGRITY_ONLY 0
#define IDRP_OPEN_AUTHENTICATION_CODE_INTEGRITY_ONLY 0
#define IDRP_OPEN_AUTHENTICATION_CODE_INTEGRITY_PLUS_AUTHENTICATION 1
#define IDRP_OPEN_AUTHENTICATION_CODE_INTEGRITY_PLUS_SECRET_TEXT 2
#define IDRP_OPEN_AUTHENTICATION_CODE_INTEGRITY_PLUS_SECRET_TEXT 2
static const value_string idrp_pdu_open_authentication_codes[] = {
{IDRP_OPEN_AUTHENTICATION_CODE_INTEGRITY_ONLY,
"Integrity Only"},
@ -171,49 +175,49 @@ static const value_string idrp_pdu_open_authentication_codes[] = {
};
#define IDRP_PATH_ATTR_TYPE_ROUTE_SEPARATOR 1
#define IDRP_PATH_ATTR_TYPE_EXT_INFO 2
#define IDRP_PATH_ATTR_TYPE_RD_PATH 3
#define IDRP_PATH_ATTR_TYPE_NEXT_HOP 4
#define IDRP_PATH_ATTR_TYPE_DIST_LIST_INCL 5
#define IDRP_PATH_ATTR_TYPE_DIST_LIST_EXCL 6
#define IDRP_PATH_ATTR_TYPE_MULTI_EXIT_DISC 7
#define IDRP_PATH_ATTR_TYPE_TRANSIT_DELAY 8
#define IDRP_PATH_ATTR_TYPE_RESIDUAL_ERROR 9
#define IDRP_PATH_ATTR_TYPE_EXPENSE 10
#define IDRP_PATH_ATTR_TYPE_LOCALLY_DEFINED_QOS 11
#define IDRP_PATH_ATTR_TYPE_ROUTE_SEPARATOR 1
#define IDRP_PATH_ATTR_TYPE_EXT_INFO 2
#define IDRP_PATH_ATTR_TYPE_RD_PATH 3
#define IDRP_PATH_ATTR_TYPE_NEXT_HOP 4
#define IDRP_PATH_ATTR_TYPE_DIST_LIST_INCL 5
#define IDRP_PATH_ATTR_TYPE_DIST_LIST_EXCL 6
#define IDRP_PATH_ATTR_TYPE_MULTI_EXIT_DISC 7
#define IDRP_PATH_ATTR_TYPE_TRANSIT_DELAY 8
#define IDRP_PATH_ATTR_TYPE_RESIDUAL_ERROR 9
#define IDRP_PATH_ATTR_TYPE_EXPENSE 10
#define IDRP_PATH_ATTR_TYPE_LOCALLY_DEFINED_QOS 11
#define IDRP_PATH_ATTR_TYPE_HIERARCHICALRECORDING 12
#define IDRP_PATH_ATTR_TYPE_RD_HOP_COUNT 13
#define IDRP_PATH_ATTR_TYPE_SECURITY 14
#define IDRP_PATH_ATTR_TYPE_CAPACITY 15
#define IDRP_PATH_ATTR_TYPE_PRIORITY 16
#define IDRP_PATH_ATTR_TYPE_RD_HOP_COUNT 13
#define IDRP_PATH_ATTR_TYPE_SECURITY 14
#define IDRP_PATH_ATTR_TYPE_CAPACITY 15
#define IDRP_PATH_ATTR_TYPE_PRIORITY 16
static const value_string path_attr_types[] = {
{IDRP_PATH_ATTR_TYPE_ROUTE_SEPARATOR, "Route Separator"},
{IDRP_PATH_ATTR_TYPE_EXT_INFO, "Ext Info"},
{IDRP_PATH_ATTR_TYPE_RD_PATH, "RD Path"},
{IDRP_PATH_ATTR_TYPE_NEXT_HOP, "Next Hop"},
{IDRP_PATH_ATTR_TYPE_DIST_LIST_INCL, "Dist List Incl"},
{IDRP_PATH_ATTR_TYPE_DIST_LIST_EXCL, "Dist List Excl"},
{IDRP_PATH_ATTR_TYPE_MULTI_EXIT_DISC, "Multi Exit Disc"},
{IDRP_PATH_ATTR_TYPE_TRANSIT_DELAY, "Transit Delay"},
{IDRP_PATH_ATTR_TYPE_RESIDUAL_ERROR, "Residual Error"},
{IDRP_PATH_ATTR_TYPE_EXPENSE, "Expense"},
{IDRP_PATH_ATTR_TYPE_LOCALLY_DEFINED_QOS, "Locally Ddefined Qos"},
{IDRP_PATH_ATTR_TYPE_ROUTE_SEPARATOR, "Route Separator"},
{IDRP_PATH_ATTR_TYPE_EXT_INFO, "Ext Info"},
{IDRP_PATH_ATTR_TYPE_RD_PATH, "RD Path"},
{IDRP_PATH_ATTR_TYPE_NEXT_HOP, "Next Hop"},
{IDRP_PATH_ATTR_TYPE_DIST_LIST_INCL, "Dist List Incl"},
{IDRP_PATH_ATTR_TYPE_DIST_LIST_EXCL, "Dist List Excl"},
{IDRP_PATH_ATTR_TYPE_MULTI_EXIT_DISC, "Multi Exit Disc"},
{IDRP_PATH_ATTR_TYPE_TRANSIT_DELAY, "Transit Delay"},
{IDRP_PATH_ATTR_TYPE_RESIDUAL_ERROR, "Residual Error"},
{IDRP_PATH_ATTR_TYPE_EXPENSE, "Expense"},
{IDRP_PATH_ATTR_TYPE_LOCALLY_DEFINED_QOS, "Locally Ddefined Qos"},
{IDRP_PATH_ATTR_TYPE_HIERARCHICALRECORDING, "Hierarchical Recording"},
{IDRP_PATH_ATTR_TYPE_RD_HOP_COUNT, "RD Hop Count"},
{IDRP_PATH_ATTR_TYPE_SECURITY, "Security"},
{IDRP_PATH_ATTR_TYPE_CAPACITY, "Capacity"},
{IDRP_PATH_ATTR_TYPE_PRIORITY, "Priority"},
{IDRP_PATH_ATTR_TYPE_RD_HOP_COUNT, "RD Hop Count"},
{IDRP_PATH_ATTR_TYPE_SECURITY, "Security"},
{IDRP_PATH_ATTR_TYPE_CAPACITY, "Capacity"},
{IDRP_PATH_ATTR_TYPE_PRIORITY, "Priority"},
{0, NULL}
};
#define IDRP_RD_PATH_RD_SET 1
#define IDRP_RD_PATH_RD_SEQ 2
#define IDRP_RD_PATH_RD_SET 1
#define IDRP_RD_PATH_RD_SEQ 2
#define IDRP_RD_PATH_ENTRY_SEQ 3
#define IDRP_RD_PATH_ENTRY_SET 4
static const value_string path_rd_segment_types[] = {
{IDRP_RD_PATH_RD_SET, "RD_SET"},
{IDRP_RD_PATH_RD_SEQ, "RD_SEQ"},
{IDRP_RD_PATH_RD_SET, "RD_SET"},
{IDRP_RD_PATH_RD_SEQ, "RD_SEQ"},
{IDRP_RD_PATH_ENTRY_SEQ, "ENTRY_SEQ"},
{IDRP_RD_PATH_ENTRY_SET, "ENTRY_SET"},
{0, NULL}
@ -223,78 +227,93 @@ static const value_string path_rd_segment_types[] = {
#define IDRP_PROTO_TYPE_8802 2
static const value_string idrp_proto_type[] = {
{IDRP_PROTO_TYPE_TR_9577, "ISO TR 9577 IPI/SPI"},
{IDRP_PROTO_TYPE_8802, "ISO 8802 LSAP"},
{IDRP_PROTO_TYPE_8802, "ISO 8802 LSAP"},
{0, NULL}
};
/* ERROR PDU error codes: */
#define IDRP_ERROR_OPEN 1
#define IDRP_ERROR_UPDATE 2
#define IDRP_ERROR_HOLD_TIMER 3
#define IDRP_ERROR_FSM 4
#define IDRP_ERROR_OPEN 1
#define IDRP_ERROR_UPDATE 2
#define IDRP_ERROR_HOLD_TIMER 3
#define IDRP_ERROR_FSM 4
#define IDRP_ERROR_RIB_REFRESH 5
static const value_string idrp_error_codes[] = {
{IDRP_ERROR_OPEN, "OPEN PDU_Error"},
{IDRP_ERROR_UPDATE, "UPDATE PDU_Error"},
{IDRP_ERROR_HOLD_TIMER, "Hold Timer_Expired"},
{IDRP_ERROR_FSM, "FSM Error"},
{IDRP_ERROR_OPEN, "OPEN PDU_Error"},
{IDRP_ERROR_UPDATE, "UPDATE PDU_Error"},
{IDRP_ERROR_HOLD_TIMER, "Hold Timer_Expired"},
{IDRP_ERROR_FSM, "FSM Error"},
{IDRP_ERROR_RIB_REFRESH, "RIB REFRESH PDU Error"},
{0, NULL}
};
/* ERROR PDU sub error codes: OPEN */
#define IDRP_ERROR_OPEN_UNSUPPORTED_VERSION_NUMBER 1
#define IDRP_ERROR_OPEN_BAD_MAXPDU_SIZE 2
#define IDRP_ERROR_OPEN_BAD_PEER_RD 3
#define IDRP_ERROR_OPEN_UNSUPPORTED_VERSION_NUMBER 1
#define IDRP_ERROR_OPEN_BAD_MAXPDU_SIZE 2
#define IDRP_ERROR_OPEN_BAD_PEER_RD 3
#define IDRP_ERROR_OPEN_UNSUPPORTED_AUTHENTICATION_CODE 4
#define IDRP_ERROR_OPEN_AUTHENTICATION_FAILURE 5
#define IDRP_ERROR_OPEN_BAD_RIB_ATTRSSET 6
#define IDRP_ERROR_RDC_MISMATCH 7
#define IDRP_ERROR_OPEN_AUTHENTICATION_FAILURE 5
#define IDRP_ERROR_OPEN_BAD_RIB_ATTRSSET 6
#define IDRP_ERROR_RDC_MISMATCH 7
static const value_string idrp_error_open_subcodes[] = {
{IDRP_ERROR_OPEN_UNSUPPORTED_VERSION_NUMBER, "Unsupported Version Number"},
{IDRP_ERROR_OPEN_BAD_MAXPDU_SIZE, "Bad Maximum PDU Size"},
{IDRP_ERROR_OPEN_BAD_PEER_RD, "Bad Peer RD"},
{IDRP_ERROR_OPEN_UNSUPPORTED_VERSION_NUMBER,
"Unsupported Version Number"},
{IDRP_ERROR_OPEN_BAD_MAXPDU_SIZE,
"Bad Maximum PDU Size"},
{IDRP_ERROR_OPEN_BAD_PEER_RD,
"Bad Peer RD"},
{IDRP_ERROR_OPEN_UNSUPPORTED_AUTHENTICATION_CODE,
"Unsupported Authentication Code"},
{IDRP_ERROR_OPEN_AUTHENTICATION_FAILURE, "Authentication Failure"},
{IDRP_ERROR_OPEN_BAD_RIB_ATTRSSET, "Bad RIB Attribute Set"},
{IDRP_ERROR_RDC_MISMATCH, "RDC Mismatch"},
"Unsupported Authentication Code"},
{IDRP_ERROR_OPEN_AUTHENTICATION_FAILURE,
"Authentication Failure"},
{IDRP_ERROR_OPEN_BAD_RIB_ATTRSSET,
"Bad RIB Attribute Set"},
{IDRP_ERROR_RDC_MISMATCH,
"RDC Mismatch"},
{0, NULL}
};
/* ERROR PDU sub error codes: UPDATE */
#define IDRP_ERROR_UPDATE_MALFORMED_ATTRIBUTE_LIST 1
#define IDRP_ERROR_UPDATE_UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE 2
#define IDRP_ERROR_UPDATE_MISSING_WELL_KNOWN_ATTRIBUTE 3
#define IDRP_ERROR_UPDATE_ATTRIBUTE_FLAGS_ERROR 4
#define IDRP_ERROR_UPDATE_ATTRIBUTE_LENGTH_ERROR 5
#define IDRP_ERROR_UPDATE_RD_ROUTEING_LOOP 6
#define IDRP_ERROR_UPDATE_INVALID_NEXT_HOP_ATTRIBUTE 7
#define IDRP_ERROR_UPDATE_OPTIONAL_ATTRIBUTE_ERROR 8
#define IDRP_ERROR_UPDATE_INVALID_REACHABILITY_INFORMATION 9
#define IDRP_ERROR_UPDATE_MISCONFIGURED_RDCS 10
#define IDRP_ERROR_UPDATE_MALFORMED_NLRI 11
#define IDRP_ERROR_UPDATE_DUPLICATED_ATTRIBUTES 12
#define IDRP_ERROR_UPDATE_ILLEGAL_RD_PATH_SEGMENT 13
#define IDRP_ERROR_UPDATE_MALFORMED_ATTRIBUTE_LIST 1
#define IDRP_ERROR_UPDATE_UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE 2
#define IDRP_ERROR_UPDATE_MISSING_WELL_KNOWN_ATTRIBUTE 3
#define IDRP_ERROR_UPDATE_ATTRIBUTE_FLAGS_ERROR 4
#define IDRP_ERROR_UPDATE_ATTRIBUTE_LENGTH_ERROR 5
#define IDRP_ERROR_UPDATE_RD_ROUTEING_LOOP 6
#define IDRP_ERROR_UPDATE_INVALID_NEXT_HOP_ATTRIBUTE 7
#define IDRP_ERROR_UPDATE_OPTIONAL_ATTRIBUTE_ERROR 8
#define IDRP_ERROR_UPDATE_INVALID_REACHABILITY_INFORMATION 9
#define IDRP_ERROR_UPDATE_MISCONFIGURED_RDCS 10
#define IDRP_ERROR_UPDATE_MALFORMED_NLRI 11
#define IDRP_ERROR_UPDATE_DUPLICATED_ATTRIBUTES 12
#define IDRP_ERROR_UPDATE_ILLEGAL_RD_PATH_SEGMENT 13
static const value_string idrp_error_update_subcodes[] = {
{IDRP_ERROR_UPDATE_MALFORMED_ATTRIBUTE_LIST, "Malformed Attribute List"},
{IDRP_ERROR_UPDATE_MALFORMED_ATTRIBUTE_LIST,
"Malformed Attribute List"},
{IDRP_ERROR_UPDATE_UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE,
"Unrecognized Well-known Attribute"},
"Unrecognized Well-known Attribute"},
{IDRP_ERROR_UPDATE_MISSING_WELL_KNOWN_ATTRIBUTE,
"Missing Well-known Attribute"},
{IDRP_ERROR_UPDATE_ATTRIBUTE_FLAGS_ERROR, "Attribute Flags Error"},
{IDRP_ERROR_UPDATE_ATTRIBUTE_LENGTH_ERROR, "Attribute Length Error"},
{IDRP_ERROR_UPDATE_RD_ROUTEING_LOOP, "RD Routing Loop"},
"Missing Well-known Attribute"},
{IDRP_ERROR_UPDATE_ATTRIBUTE_FLAGS_ERROR,
"Attribute Flags Error"},
{IDRP_ERROR_UPDATE_ATTRIBUTE_LENGTH_ERROR,
"Attribute Length Error"},
{IDRP_ERROR_UPDATE_RD_ROUTEING_LOOP,
"RD Routing Loop"},
{IDRP_ERROR_UPDATE_INVALID_NEXT_HOP_ATTRIBUTE,
"Invalid NEXT HOP Attribute"},
{IDRP_ERROR_UPDATE_OPTIONAL_ATTRIBUTE_ERROR, "Optional Attribute error"},
"Invalid NEXT HOP Attribute"},
{IDRP_ERROR_UPDATE_OPTIONAL_ATTRIBUTE_ERROR,
"Optional Attribute error"},
{IDRP_ERROR_UPDATE_INVALID_REACHABILITY_INFORMATION,
"Invalid Reachability Information"},
{IDRP_ERROR_UPDATE_MISCONFIGURED_RDCS, "Misconfigured RDCs"},
{IDRP_ERROR_UPDATE_MALFORMED_NLRI, "Malformed NLRI"},
{IDRP_ERROR_UPDATE_DUPLICATED_ATTRIBUTES, "Duplicated_Attributes"},
{IDRP_ERROR_UPDATE_ILLEGAL_RD_PATH_SEGMENT, "Illegal RD Path Segment"},
"Invalid Reachability Information"},
{IDRP_ERROR_UPDATE_MISCONFIGURED_RDCS,
"Misconfigured RDCs"},
{IDRP_ERROR_UPDATE_MALFORMED_NLRI,
"Malformed NLRI"},
{IDRP_ERROR_UPDATE_DUPLICATED_ATTRIBUTES,
"Duplicated_Attributes"},
{IDRP_ERROR_UPDATE_ILLEGAL_RD_PATH_SEGMENT,
"Illegal RD Path Segment"},
{0, NULL}
};
@ -305,22 +324,22 @@ static const value_string idrp_error_hold_timer_subcodes[] = {
};
/* ERROR PDU sub error codes: FSM */
#define IDRP_ERROR_FSM_CLOSED 1
#define IDRP_ERROR_FSM_OPEN_RCVD 2
#define IDRP_ERROR_FSM_OPEN_SENT 3
#define IDRP_ERROR_FSM_CLOSE_WAIT 4
#define IDRP_ERROR_FSM_CLOSED 1
#define IDRP_ERROR_FSM_OPEN_RCVD 2
#define IDRP_ERROR_FSM_OPEN_SENT 3
#define IDRP_ERROR_FSM_CLOSE_WAIT 4
#define IDRP_ERROR_FSM_ESTABLISHED 5
static const value_string idrp_error_fsm_subcodes[] = {
{IDRP_ERROR_FSM_CLOSED, "CLOSED"},
{IDRP_ERROR_FSM_OPEN_RCVD, "OPEN-RCVD"},
{IDRP_ERROR_FSM_OPEN_SENT, "OPEN-SENT"},
{IDRP_ERROR_FSM_CLOSE_WAIT, "CLOSE-WAIT"},
{IDRP_ERROR_FSM_CLOSED, "CLOSED"},
{IDRP_ERROR_FSM_OPEN_RCVD, "OPEN-RCVD"},
{IDRP_ERROR_FSM_OPEN_SENT, "OPEN-SENT"},
{IDRP_ERROR_FSM_CLOSE_WAIT, "CLOSE-WAIT"},
{IDRP_ERROR_FSM_ESTABLISHED, "ESTABLISHED"},
{0, NULL}
};
#define IDRP_ERROR_RIB_REFRESH_INVALID_OPCODE 1
#define IDRP_ERROR_RIB_REFRESH_INVALID_OPCODE 1
#define IDRP_ERROR_RIB_REFRESH_UNSUPPORTED_RIB_ATTS 2
static const value_string idrp_error_rib_refresh_subcodes[] = {
{IDRP_ERROR_RIB_REFRESH_INVALID_OPCODE, "Invalid OpCode"},
@ -336,8 +355,8 @@ static const value_string idrp_error_rib_refresh_subcodes[] = {
#define IDRP_RIB_REFRESH_END 3
static const value_string idrp_rib_refresh_opcodes[] = {
{IDRP_RIB_REFRESH_REQUEST, "RIB Refresh Request"},
{IDRP_RIB_REFRESH_START, "RIB Refresh Start"},
{IDRP_RIB_REFRESH_END, "RIB Refresh End"},
{IDRP_RIB_REFRESH_START, "RIB Refresh Start"},
{IDRP_RIB_REFRESH_END, "RIB Refresh End"},
{0, NULL}
};
#endif
@ -351,12 +370,12 @@ static int dissect_BISPDU_OPEN(tvbuff_t * tvb, int offset, proto_tree * tree)
guint8 rib_attribute_type;
guint8 number_of_rdcs;
guint8 length_indicator_guint8;
gint i;
gint j;
gint i;
gint j;
/* 1 octet idrp version */
proto_tree_add_item(tree, hf_idrp_open_version, tvb, offset,1, ENC_BIG_ENDIAN);
offset++;
offset += 1;
/* Hold Time (2 octets) */
proto_tree_add_item(tree, hf_idrp_open_hold_time, tvb, offset, 2, ENC_BIG_ENDIAN);
@ -368,7 +387,7 @@ static int dissect_BISPDU_OPEN(tvbuff_t * tvb, int offset, proto_tree * tree)
/* Source RDI Length Indicator (1 octet) */
rdi_len = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* Source RDI */
proto_tree_add_item(tree, hf_idrp_open_src_rdi, tvb, offset, rdi_len, ENC_ASCII | ENC_NA);
@ -376,20 +395,20 @@ static int dissect_BISPDU_OPEN(tvbuff_t * tvb, int offset, proto_tree * tree)
/* Number of Non-empty RIB-Atts */
number_of_non_empty_rib_attributes = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* process Nth non-empty RIB-Atts */
for (i = number_of_non_empty_rib_attributes; i > 0; i--) {
/* 1 octet number of distinguishing attributes that are contained in
the Nth RIB-Att. */
number_of_distinguishing_attributes = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* process Nth RIB-Att */
for (j = number_of_distinguishing_attributes; j > 0; j--) {
/* 1 octet Type of RIB-Att */
rib_attribute_type = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
switch (rib_attribute_type) {
case IDRP_PATH_ATTR_TYPE_ROUTE_SEPARATOR:
@ -409,7 +428,7 @@ static int dissect_BISPDU_OPEN(tvbuff_t * tvb, int offset, proto_tree * tree)
case IDRP_PATH_ATTR_TYPE_LOCALLY_DEFINED_QOS:
/* 1 octet Nsap prefix length */
length_indicator_guint8 = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* process Nsap prefix */
proto_tree_add_item(
tree,
@ -422,7 +441,7 @@ static int dissect_BISPDU_OPEN(tvbuff_t * tvb, int offset, proto_tree * tree)
/* 1 octet Qos length */
length_indicator_guint8 = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* process Qos */
proto_tree_add_item(
tree,
@ -436,7 +455,7 @@ static int dissect_BISPDU_OPEN(tvbuff_t * tvb, int offset, proto_tree * tree)
/* 1 octet Metric length */
/* note: metric always absent in OPEN BISPDU */
length_indicator_guint8 = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* process Metric */
proto_tree_add_item(
tree,
@ -453,7 +472,7 @@ static int dissect_BISPDU_OPEN(tvbuff_t * tvb, int offset, proto_tree * tree)
/* length of Security Registration ID */
length_indicator_guint8 = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* value of Security Registration ID */
proto_tree_add_item(
tree,
@ -467,7 +486,7 @@ static int dissect_BISPDU_OPEN(tvbuff_t * tvb, int offset, proto_tree * tree)
/* length of Security Information */
/* note: always absent for OPEN BISPDU*/
length_indicator_guint8 = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* value of Security Information */
proto_tree_add_item(
tree,
@ -490,13 +509,13 @@ static int dissect_BISPDU_OPEN(tvbuff_t * tvb, int offset, proto_tree * tree)
number_of_rdcs = tvb_get_guint8(tvb, offset);
proto_tree_add_item(tree, hf_idrp_open_number_of_confederations, tvb,
offset, 1, ENC_BIG_ENDIAN);
offset++;
offset += 1;
/* process Nth Confederation RDI */
for (i = number_of_rdcs; i > 0; i--) {
/* 1 octet of RDI length */
length_indicator_guint8 = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* process Nth RDI */
proto_tree_add_item(tree, hf_idrp_open_confederation, tvb,
@ -507,7 +526,7 @@ static int dissect_BISPDU_OPEN(tvbuff_t * tvb, int offset, proto_tree * tree)
/* Authentication Code */
proto_tree_add_item(tree, hf_idrp_open_authentication_code, tvb, offset, 1,
ENC_BIG_ENDIAN);
offset++;
offset += 1;
/* Authentication Data */
proto_tree_add_item(tree, hf_idrp_open_authentication_data, tvb, offset,
@ -521,19 +540,19 @@ static int dissect_BISPDU_UPDATE(tvbuff_t * tvb, int offset, proto_tree * tree)
{
guint16 nb_unfeasible_routes;
guint16 path_attrs_len;
int path_attrs_start_offset;
guint8 path_attr_type;
int path_attrs_start_offset;
guint8 path_attr_type;
guint16 path_attr_len;
int start_offset;
int start_offset;
guint16 rdi_len;
guint8 proto_len;
guint8 proto_len;
guint16 net_len;
int path_segment_rdi_offset;
int path_segment_rdi_offset;
guint16 length_indicator_guint16;
guint8 length_indicator_guint8;
guint8 nb_of_snpa;
guint8 dist_list_count;
int i;
guint8 length_indicator_guint8;
guint8 nb_of_snpa;
guint8 dist_list_count;
int i;
/* 2 octet withdrawn ("Unfeasible") Route Count */
nb_unfeasible_routes = tvb_get_ntohs(tvb, offset);
@ -558,12 +577,12 @@ static int dissect_BISPDU_UPDATE(tvbuff_t * tvb, int offset, proto_tree * tree)
/* Path attribute flag */
proto_tree_add_item(tree, hf_idrp_update_path_attr_flag, tvb,
offset, 1, ENC_BIG_ENDIAN);
offset++;
offset += 1;
/* Path attribute type */
path_attr_type = tvb_get_guint8(tvb, offset);
proto_tree_add_item(tree, hf_idrp_update_path_attr_type, tvb,
offset, 1, ENC_BIG_ENDIAN);
offset++;
offset += 1;
/* Path attribute length */
path_attr_len = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(tree, hf_idrp_update_path_attr_length, tvb,
@ -607,7 +626,7 @@ static int dissect_BISPDU_UPDATE(tvbuff_t * tvb, int offset, proto_tree * tree)
offset,
1,
ENC_BIG_ENDIAN);
offset++;
offset += 1;
/* 2 octets of path segment length */
length_indicator_guint16 = tvb_get_ntohs(tvb, offset);
@ -624,7 +643,7 @@ static int dissect_BISPDU_UPDATE(tvbuff_t * tvb, int offset, proto_tree * tree)
while (offset < (path_segment_rdi_offset + length_indicator_guint16)) {
/* 1 octet rdi length */
length_indicator_guint8 = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* print N times path RDI */
proto_tree_add_item(tree,
hf_idrp_update_path_attr_rd_path_rdi,
@ -644,7 +663,7 @@ static int dissect_BISPDU_UPDATE(tvbuff_t * tvb, int offset, proto_tree * tree)
offset,
1,
ENC_BIG_ENDIAN);
offset++;
offset += 1;
start_offset = offset;
/* process Nth next hop */
@ -656,10 +675,10 @@ static int dissect_BISPDU_UPDATE(tvbuff_t * tvb, int offset, proto_tree * tree)
offset,
1,
ENC_BIG_ENDIAN);
offset++;
offset += 1;
/* 1 octet Proto len */
length_indicator_guint8 = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* N octets Proto: in case of ISO 8473 one octet with the value 0x81 */
proto_tree_add_item(tree,
hf_idrp_update_path_attr_next_hop_proto,
@ -671,7 +690,7 @@ static int dissect_BISPDU_UPDATE(tvbuff_t * tvb, int offset, proto_tree * tree)
/* length of NET of Next HOP */
length_indicator_guint8 = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* NET of Next HOP */
proto_tree_add_item(tree,
hf_idrp_update_path_attr_next_hop_rdi,
@ -689,13 +708,13 @@ static int dissect_BISPDU_UPDATE(tvbuff_t * tvb, int offset, proto_tree * tree)
offset,
1,
ENC_BIG_ENDIAN);
offset++;
offset += 1;
/* process Nth SNPA */
for (i = nb_of_snpa; i > 0; i--) {
/* SNPS length in multiples of 4 bit */
length_indicator_guint8 =
(guint8) ceil((float)tvb_get_guint8(tvb, offset) / (float)2.0);
offset++;
offset += 1;
proto_tree_add_item(tree,
hf_idrp_update_path_attr_next_hop_snpa,
tvb,
@ -715,13 +734,13 @@ static int dissect_BISPDU_UPDATE(tvbuff_t * tvb, int offset, proto_tree * tree)
offset,
1 ,
ENC_BIG_ENDIAN);
offset++;
offset += 1;
/* process RDI's/Confederations's in DIST list */
for (i = dist_list_count; i > 0; i--) {
/* 1 octet RDI/Confed length indicator */
length_indicator_guint8 = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* variable size RDI/Conderation */
proto_tree_add_item(tree,
hf_idrp_update_path_attr_dist_list_excl_rdi ,
@ -741,13 +760,13 @@ static int dissect_BISPDU_UPDATE(tvbuff_t * tvb, int offset, proto_tree * tree)
offset,
1 ,
ENC_BIG_ENDIAN);
offset++;
offset += 1;
/* process RDI's/Confederations's in DIST list */
for (i = dist_list_count; i > 0; i--) {
/* 1 octet RDI/Confed length indicator */
length_indicator_guint8 = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* variable size RDI/Conderation */
proto_tree_add_item(tree,
hf_idrp_update_path_attr_dist_list_incl_rdi ,
@ -766,7 +785,7 @@ static int dissect_BISPDU_UPDATE(tvbuff_t * tvb, int offset, proto_tree * tree)
offset,
1 ,
ENC_BIG_ENDIAN);
offset++;
offset += 1;
break;
case IDRP_PATH_ATTR_TYPE_TRANSIT_DELAY:
/* 2 octets of transit delay */
@ -801,7 +820,7 @@ static int dissect_BISPDU_UPDATE(tvbuff_t * tvb, int offset, proto_tree * tree)
case IDRP_PATH_ATTR_TYPE_LOCALLY_DEFINED_QOS:
/* 1 octet Nsap prefix length */
length_indicator_guint8 = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* process Nsap prefix */
proto_tree_add_item(tree,
hf_idrp_update_path_attr_locally_defined_qos_nsap ,
@ -812,7 +831,7 @@ static int dissect_BISPDU_UPDATE(tvbuff_t * tvb, int offset, proto_tree * tree)
offset += length_indicator_guint8;
/* 1 octet Qoslength */
length_indicator_guint8 = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* process Qos */
proto_tree_add_item(tree,
hf_idrp_update_path_attr_locally_defined_qos_value,
@ -823,7 +842,7 @@ static int dissect_BISPDU_UPDATE(tvbuff_t * tvb, int offset, proto_tree * tree)
offset += length_indicator_guint8;
/* 1 octet Metric length */
length_indicator_guint8 = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* process Metric */
proto_tree_add_item(tree,
hf_idrp_update_path_attr_locally_defined_qos_metric,
@ -841,7 +860,7 @@ static int dissect_BISPDU_UPDATE(tvbuff_t * tvb, int offset, proto_tree * tree)
offset,
1 ,
ENC_BIG_ENDIAN);
offset++;
offset += 1;
break;
case IDRP_PATH_ATTR_TYPE_RD_HOP_COUNT:
proto_tree_add_item(tree,
@ -850,12 +869,12 @@ static int dissect_BISPDU_UPDATE(tvbuff_t * tvb, int offset, proto_tree * tree)
offset,
1 ,
ENC_BIG_ENDIAN);
offset++;
offset += 1;
break;
case IDRP_PATH_ATTR_TYPE_SECURITY:
/* length of Security Registration ID */
length_indicator_guint8 = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* value of Security Registration ID */
proto_tree_add_item(tree,
@ -868,7 +887,7 @@ static int dissect_BISPDU_UPDATE(tvbuff_t * tvb, int offset, proto_tree * tree)
/* length of Security Information */
length_indicator_guint8 = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* value of Security Information */
proto_tree_add_item(tree,
hf_idrp_update_path_attr_security_info,
@ -885,7 +904,7 @@ static int dissect_BISPDU_UPDATE(tvbuff_t * tvb, int offset, proto_tree * tree)
offset,
1 ,
ENC_BIG_ENDIAN);
offset++;
offset += 1;
break;
case IDRP_PATH_ATTR_TYPE_PRIORITY:
proto_tree_add_item(tree,
@ -894,7 +913,7 @@ static int dissect_BISPDU_UPDATE(tvbuff_t * tvb, int offset, proto_tree * tree)
offset,
1 ,
ENC_BIG_ENDIAN);
offset++;
offset += 1;
break;
default:
break;
@ -904,11 +923,11 @@ static int dissect_BISPDU_UPDATE(tvbuff_t * tvb, int offset, proto_tree * tree)
/* 1 octet Proto type */
proto_tree_add_item(tree, hf_idrp_update_nlri_proto_type, tvb, offset,
1, ENC_BIG_ENDIAN);
offset++;
offset += 1;
/* 1 octet Proto len */
proto_len = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* N octets Proto identity: in case of ISO 8473 one octet with the value 0x81 */
proto_tree_add_item(tree, hf_idrp_update_nlri_proto_id, tvb, offset,
@ -928,7 +947,7 @@ static int dissect_BISPDU_UPDATE(tvbuff_t * tvb, int offset, proto_tree * tree)
rdi_len = tvb_get_guint8(tvb, offset) / 8;
proto_tree_add_item(tree, hf_idrp_update_nlri_addr_info_nb_bits, tvb,
offset, 1, ENC_BIG_ENDIAN);
offset++;
offset += 1;
proto_tree_add_item(tree, hf_idrp_update_nlri_addr_info, tvb,
offset, rdi_len, ENC_ASCII | ENC_NA);
@ -940,12 +959,12 @@ static int dissect_BISPDU_UPDATE(tvbuff_t * tvb, int offset, proto_tree * tree)
static int dissect_BISPDU_ERROR(tvbuff_t * tvb, int offset, proto_tree * tree)
{
guint8 error_code = 0;
gint data_length;
gint data_length;
/* Error Code (1 octet) */
error_code = tvb_get_guint8(tvb, offset);
proto_tree_add_item(tree, hf_idrp_error_code, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
offset += 1;
switch (error_code) {
case IDRP_ERROR_OPEN:
@ -971,7 +990,7 @@ static int dissect_BISPDU_ERROR(tvbuff_t * tvb, int offset, proto_tree * tree)
default:
break;
}
offset++;
offset += 1;
/* data : zero or more octets of data to be used in diagnosing the reason
for the IDRP ERROR PDU. The contents of the Data field depends upon the
@ -990,17 +1009,17 @@ static int dissect_BISPDU_RIB_REFRESH(tvbuff_t * tvb, int offset, proto_tree * t
{
proto_tree *sub_tree;
proto_item *ti;
guint8 number_of_non_empty_rib_attributes;
guint8 number_of_distinguishing_attributes;
guint8 rib_attribute_type;
guint8 length_indicator_guint8;
int i;
int j;
guint8 number_of_non_empty_rib_attributes;
guint8 number_of_distinguishing_attributes;
guint8 rib_attribute_type;
guint8 length_indicator_guint8;
int i;
int j;
/* 1 octet Opcode */
proto_tree_add_item(tree, hf_idrp_rib_refresh_opcode, tvb, offset, 1,
ENC_BIG_ENDIAN);
offset++;
offset += 1;
/* Path Attributes subtree */
ti = proto_tree_add_text(tree, tvb, offset, 0, "Path Attributes");
@ -1008,7 +1027,7 @@ static int dissect_BISPDU_RIB_REFRESH(tvbuff_t * tvb, int offset, proto_tree * t
/* Number of Non-empty RIB-Atts */
number_of_non_empty_rib_attributes = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
if (!number_of_non_empty_rib_attributes)
proto_tree_add_text(sub_tree, tvb, offset, 0, "none");
@ -1019,13 +1038,13 @@ static int dissect_BISPDU_RIB_REFRESH(tvbuff_t * tvb, int offset, proto_tree * t
/* 1 octet number of distinguishing attributes that are contained in
the Nth RIB-Att. */
number_of_distinguishing_attributes = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* process Nth RIB-Att */
for (j = number_of_distinguishing_attributes; j > 0; j--) {
/* 1 octet Type of RIB-Att */
rib_attribute_type = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
switch (rib_attribute_type) {
case IDRP_PATH_ATTR_TYPE_ROUTE_SEPARATOR:
@ -1045,7 +1064,7 @@ static int dissect_BISPDU_RIB_REFRESH(tvbuff_t * tvb, int offset, proto_tree * t
case IDRP_PATH_ATTR_TYPE_LOCALLY_DEFINED_QOS:
/* 1 octet Nsap prefix length */
length_indicator_guint8 = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* process Nsap prefix */
proto_tree_add_item(
sub_tree,
@ -1058,7 +1077,7 @@ static int dissect_BISPDU_RIB_REFRESH(tvbuff_t * tvb, int offset, proto_tree * t
/* 1 octet Qos length */
length_indicator_guint8 = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* process Qos */
proto_tree_add_item(
sub_tree,
@ -1072,7 +1091,7 @@ static int dissect_BISPDU_RIB_REFRESH(tvbuff_t * tvb, int offset, proto_tree * t
/* 1 octet Metric length */
/* note: metric always absent in OPEN BISPDU */
length_indicator_guint8 = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* process Metric */
proto_tree_add_item(
sub_tree,
@ -1089,7 +1108,7 @@ static int dissect_BISPDU_RIB_REFRESH(tvbuff_t * tvb, int offset, proto_tree * t
/* length of Security Registration ID */
length_indicator_guint8 = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* value of Security Registration ID */
proto_tree_add_item(
sub_tree,
@ -1103,7 +1122,7 @@ static int dissect_BISPDU_RIB_REFRESH(tvbuff_t * tvb, int offset, proto_tree * t
/* length of Security Information */
/* note: always absent for OPEN BISPDU*/
length_indicator_guint8 = tvb_get_guint8(tvb, offset);
offset++;
offset += 1;
/* value of Security Information */
proto_tree_add_item(
sub_tree,
@ -1134,7 +1153,7 @@ dissect_idrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
if (tvb_get_guint8(tvb, offset) != NLPID_ISO10747_IDRP)
return 0; /* no idrp packet */
offset++;
offset += 1;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IDRP");
col_clear(pinfo->cinfo, COL_INFO);
@ -1151,7 +1170,7 @@ dissect_idrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
pdu_type = tvb_get_guint8(tvb, offset);
proto_tree_add_item(idrp_tree, hf_idrp_type,
tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
offset += 1;
/* 4 octets Sequence */
proto_tree_add_item(idrp_tree, hf_idrp_sequence,
@ -1166,12 +1185,12 @@ dissect_idrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
/* 1 octets credits offered */
proto_tree_add_item(idrp_tree, hf_idrp_credit_offered,
tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
offset += 1;
/* 1 octets credits offered */
proto_tree_add_item(idrp_tree, hf_idrp_credit_avail,
tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
offset += 1;
/* 16 octets validation */
proto_tree_add_item(idrp_tree, hf_idrp_validation_pattern,
@ -1579,10 +1598,10 @@ void proto_register_idrp(void)
*
* Local variables:
* c-basic-offset: 4
* tab-width: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=4 tabstop=4 expandtab:
* :indentSize=4:tabSize=4:noTabs=true:
* vi: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -768,10 +768,10 @@ proto_register_nmas(void)
*
* Local variables:
* c-basic-offset: 4
* tab-width: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=4 tabstop=4 expandtab:
* :indentSize=4:tabSize=4:noTabs=true:
* vi: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/

View File

@ -870,11 +870,11 @@ proto_register_sss(void)
*
* Local variables:
* c-basic-offset: 4
* tab-width: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=4 tabstop=4 expandtab:
* :indentSize=4:tabSize=4:noTabs=true:
* vi: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/

View File

@ -1200,10 +1200,10 @@ proto_reg_handoff_nsip(void) {
*
* Local variables:
* c-basic-offset: 2
* tab-width: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=2 tabstop=4 expandtab:
* :indentSize=2:tabSize=4:noTabs=true:
* vi: set shiftwidth=2 tabstop=8 expandtab:
* :indentSize=2:tabSize=8:noTabs=true:
*/

View File

@ -663,11 +663,11 @@ proto_register_osi_options(void) {
*
* Local variables:
* c-basic-offset: 2
* tab-width: 2
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=2 tabstop=2 expandtab:
* :indentSize=2:tabSize=2:noTabs=true:
* vi: set shiftwidth=2 tabstop=8 expandtab:
* :indentSize=2:tabSize=8:noTabs=true:
*/

View File

@ -338,7 +338,7 @@ static void cotp_frame_end(void)
static gboolean is_all_printable(const guchar *stringtocheck, int length)
{
gboolean allprintable;
int i;
int i;
allprintable=TRUE;
for (i=0;i<length;i++) {
@ -354,9 +354,9 @@ static gboolean is_all_printable(const guchar *stringtocheck, int length)
static gchar *print_tsap(const guchar *tsap, int length)
{
gchar *cur;
gboolean allprintable;
gint idx = 0, returned_length;
gchar *cur;
gboolean allprintable;
gint idx = 0, returned_length;
cur=(gchar *)wmem_alloc(wmem_packet_scope(), MAX_TSAP_LEN * 2 + 3);
cur[0] = '\0';
@ -389,18 +389,18 @@ static gboolean ositp_decode_var_part(tvbuff_t *tvb, int offset, int vp_length,
int class_option, int tpdu_len,
packet_info *pinfo, proto_tree *tree)
{
guint8 code, length;
guint8 c1;
guint16 s, s1,s2,s3,s4;
guint32 t1, t2, t3, t4;
guint32 offset_iso8073_checksum = 0;
gint32 i = 0;
guint8 tmp_code = 0;
guint tmp_len = 0;
cksum_status_t cksum_status;
gboolean checksum_ok = FALSE;
guint32 pref_max_tpdu_size;
proto_item *hidden_item;
guint8 code, length;
guint8 c1;
guint16 s, s1,s2,s3,s4;
guint32 t1, t2, t3, t4;
guint32 offset_iso8073_checksum = 0;
gint32 i = 0;
guint8 tmp_code = 0;
guint tmp_len = 0;
cksum_status_t cksum_status;
gboolean checksum_ok = FALSE;
guint32 pref_max_tpdu_size;
proto_item *hidden_item;
while (vp_length != 0) {
code = tvb_get_guint8(tvb, offset);
@ -844,11 +844,11 @@ static int ositp_decode_DR(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu,
packet_info *pinfo, proto_tree *tree)
{
proto_tree *cotp_tree = NULL;
proto_item *ti = NULL;
guint16 dst_ref, src_ref;
guchar reason;
proto_item *ti = NULL;
guint16 dst_ref, src_ref;
guchar reason;
const char *str;
guint tpdu_len;
guint tpdu_len;
/* ATN TPDU's tend to be larger than normal OSI,
* so nothing to do with respect to LI checks */
@ -934,19 +934,19 @@ static int ositp_decode_DT(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu,
gboolean uses_inactive_subset,
gboolean *subdissector_found)
{
proto_tree *cotp_tree = NULL;
proto_item *ti;
gboolean is_extended;
gboolean is_class_234;
guint32 dst_ref;
guint32 *prev_dst_ref;
guint tpdu_nr;
gboolean fragment = FALSE;
guint32 fragment_length = 0;
tvbuff_t *next_tvb;
fragment_head *fd_head;
proto_tree *cotp_tree = NULL;
proto_item *ti;
gboolean is_extended;
gboolean is_class_234;
guint32 dst_ref;
guint32 *prev_dst_ref;
guint tpdu_nr;
gboolean fragment = FALSE;
guint32 fragment_length = 0;
tvbuff_t *next_tvb;
fragment_head *fd_head;
conversation_t *conv;
guint tpdu_len;
guint tpdu_len;
/* DT TPDUs have user data, so they run to the end of the containing PDU */
tpdu_len = tvb_reported_length_remaining(tvb, offset);
@ -1261,11 +1261,11 @@ static int ositp_decode_ED(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu,
{
proto_tree *cotp_tree = NULL;
proto_item *ti;
gboolean is_extended;
guint16 dst_ref;
guint tpdu_nr;
tvbuff_t *next_tvb;
guint tpdu_len;
gboolean is_extended;
guint16 dst_ref;
guint tpdu_nr;
tvbuff_t *next_tvb;
guint tpdu_len;
/* ED TPDUs have user data, so they run to the end of the containing PDU */
tpdu_len = tvb_reported_length_remaining(tvb, offset);
@ -2490,11 +2490,11 @@ proto_reg_handoff_cotp(void)
*
* Local variables:
* c-basic-offset: 2
* tab-width: 2
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=2 tabstop=2 expandtab:
* :indentSize=2:tabSize=2:noTabs=true:
* vi: set shiftwidth=2 tabstop=8 expandtab:
* :indentSize=2:tabSize=8:noTabs=true:
*/

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -355,205 +355,205 @@ static expert_field ei_usb_vid_bitmask_len = EI_INIT;
/* Lookup tables */
static const value_string vc_ep_descriptor_subtypes[] = {
{ EP_INTERRUPT, "Interrupt" },
{ 0, NULL }
{ EP_INTERRUPT, "Interrupt" },
{ 0, NULL }
};
static const value_string vid_descriptor_type_vals[] = {
{CS_INTERFACE, "video class interface"},
{CS_ENDPOINT, "video class endpoint"},
{0,NULL}
{CS_INTERFACE, "video class interface"},
{CS_ENDPOINT, "video class endpoint"},
{0,NULL}
};
static value_string_ext vid_descriptor_type_vals_ext =
VALUE_STRING_EXT_INIT(vid_descriptor_type_vals);
static const value_string vc_if_descriptor_subtypes[] = {
{ VC_HEADER, "Header" },
{ VC_INPUT_TERMINAL, "Input Terminal" },
{ VC_OUTPUT_TERMINAL, "Output Terminal" },
{ VC_SELECTOR_UNIT, "Selector Unit" },
{ VC_PROCESSING_UNIT, "Processing Unit" },
{ VC_EXTENSION_UNIT, "Extension Unit" },
{ VC_ENCODING_UNIT, "Encoding Unit" },
{ 0, NULL }
{ VC_HEADER, "Header" },
{ VC_INPUT_TERMINAL, "Input Terminal" },
{ VC_OUTPUT_TERMINAL, "Output Terminal" },
{ VC_SELECTOR_UNIT, "Selector Unit" },
{ VC_PROCESSING_UNIT, "Processing Unit" },
{ VC_EXTENSION_UNIT, "Extension Unit" },
{ VC_ENCODING_UNIT, "Encoding Unit" },
{ 0, NULL }
};
static value_string_ext vc_if_descriptor_subtypes_ext =
VALUE_STRING_EXT_INIT(vc_if_descriptor_subtypes);
static const value_string cs_control_interface[] = {
{ VC_CONTROL_UNDEFINED, "Undefined" },
{ VC_VIDEO_POWER_MODE_CONTROL, "Video Power Mode" },
{ VC_REQUEST_ERROR_CODE_CONTROL, "Request Error Code" },
{ VC_REQUEST_INDICATE_HOST_CLOCK_CONTROL, "Request Indicate Host Clock" },
{ 0, NULL }
{ VC_CONTROL_UNDEFINED, "Undefined" },
{ VC_VIDEO_POWER_MODE_CONTROL, "Video Power Mode" },
{ VC_REQUEST_ERROR_CODE_CONTROL, "Request Error Code" },
{ VC_REQUEST_INDICATE_HOST_CLOCK_CONTROL, "Request Indicate Host Clock" },
{ 0, NULL }
};
static value_string_ext cs_control_interface_ext =
VALUE_STRING_EXT_INIT(cs_control_interface);
static const value_string cs_streaming_interface[] = {
{ VS_CONTROL_UNDEFINED, "Undefined" },
{ VS_PROBE_CONTROL, "Probe" },
{ VS_COMMIT_CONTROL, "Commit" },
{ VS_STILL_PROBE_CONTROL, "Still Probe" },
{ VS_STILL_COMMIT_CONTROL, "Still Commit" },
{ VS_STILL_IMAGE_TRIGGER_CONTROL, "Still Image Trigger" },
{ VS_STREAM_ERROR_CODE_CONTROL, "Stream Error Code" },
{ VS_GENERATE_KEY_FRAME_CONTROL, "Generate Key Frame" },
{ VS_UPDATE_FRAME_SEGMENT_CONTROL, "Update Frame Segment" },
{ VS_SYNCH_DELAY_CONTROL, "Synch Delay" },
{ 0, NULL }
{ VS_CONTROL_UNDEFINED, "Undefined" },
{ VS_PROBE_CONTROL, "Probe" },
{ VS_COMMIT_CONTROL, "Commit" },
{ VS_STILL_PROBE_CONTROL, "Still Probe" },
{ VS_STILL_COMMIT_CONTROL, "Still Commit" },
{ VS_STILL_IMAGE_TRIGGER_CONTROL, "Still Image Trigger" },
{ VS_STREAM_ERROR_CODE_CONTROL, "Stream Error Code" },
{ VS_GENERATE_KEY_FRAME_CONTROL, "Generate Key Frame" },
{ VS_UPDATE_FRAME_SEGMENT_CONTROL, "Update Frame Segment" },
{ VS_SYNCH_DELAY_CONTROL, "Synch Delay" },
{ 0, NULL }
};
static value_string_ext cs_streaming_interface_ext =
VALUE_STRING_EXT_INIT(cs_streaming_interface);
static const value_string cs_selector_unit[] = {
{ SU_CONTROL_UNDEFINED, "Undefined" },
{ SU_INPUT_SELECT_CONTROL, "Input Select" },
{ 0, NULL }
{ SU_CONTROL_UNDEFINED, "Undefined" },
{ SU_INPUT_SELECT_CONTROL, "Input Select" },
{ 0, NULL }
};
static value_string_ext cs_selector_unit_ext =
VALUE_STRING_EXT_INIT(cs_selector_unit);
static const value_string cs_camera_terminal[] = {
{ CT_CONTROL_UNDEFINED, "Undefined" },
{ CT_SCANNING_MODE_CONTROL, "Scanning Mode" },
{ CT_AE_MODE_CONTROL, "Auto-Exposure Mode" },
{ CT_AE_PRIORITY_CONTROL, "Auto-Exposure Priority" },
{ CT_EXPOSURE_TIME_ABSOLUTE_CONTROL, "Exposure Time (Absolute)" },
{ CT_EXPOSURE_TIME_RELATIVE_CONTROL, "Exposure Time (Relative)" },
{ CT_FOCUS_ABSOLUTE_CONTROL, "Focus (Absolute)" },
{ CT_FOCUS_RELATIVE_CONTROL, "Focus (Relative)" },
{ CT_FOCUS_AUTO_CONTROL, "Focus, Auto" },
{ CT_IRIS_ABSOLUTE_CONTROL, "Iris (Absolute)" },
{ CT_IRIS_RELATIVE_CONTROL, "Iris (Relative)" },
{ CT_ZOOM_ABSOLUTE_CONTROL, "Zoom (Absolute)" },
{ CT_ZOOM_RELATIVE_CONTROL, "Zoom (Relative)" },
{ CT_PANTILT_ABSOLUTE_CONTROL, "PanTilt (Absolute)" },
{ CT_PANTILT_RELATIVE_CONTROL, "PanTilt (Relative)" },
{ CT_ROLL_ABSOLUTE_CONTROL, "Roll (Absolute)" },
{ CT_ROLL_RELATIVE_CONTROL, "Roll (Relative)" },
{ CT_PRIVACY_CONTROL, "Privacy" },
{ CT_FOCUS_SIMPLE_CONTROL, "Focus (Simple)" },
{ CT_WINDOW_CONTROL, "Window" },
{ CT_REGION_OF_INTEREST_CONTROL, "Region of Interest" },
{ 0, NULL }
{ CT_CONTROL_UNDEFINED, "Undefined" },
{ CT_SCANNING_MODE_CONTROL, "Scanning Mode" },
{ CT_AE_MODE_CONTROL, "Auto-Exposure Mode" },
{ CT_AE_PRIORITY_CONTROL, "Auto-Exposure Priority" },
{ CT_EXPOSURE_TIME_ABSOLUTE_CONTROL, "Exposure Time (Absolute)" },
{ CT_EXPOSURE_TIME_RELATIVE_CONTROL, "Exposure Time (Relative)" },
{ CT_FOCUS_ABSOLUTE_CONTROL, "Focus (Absolute)" },
{ CT_FOCUS_RELATIVE_CONTROL, "Focus (Relative)" },
{ CT_FOCUS_AUTO_CONTROL, "Focus, Auto" },
{ CT_IRIS_ABSOLUTE_CONTROL, "Iris (Absolute)" },
{ CT_IRIS_RELATIVE_CONTROL, "Iris (Relative)" },
{ CT_ZOOM_ABSOLUTE_CONTROL, "Zoom (Absolute)" },
{ CT_ZOOM_RELATIVE_CONTROL, "Zoom (Relative)" },
{ CT_PANTILT_ABSOLUTE_CONTROL, "PanTilt (Absolute)" },
{ CT_PANTILT_RELATIVE_CONTROL, "PanTilt (Relative)" },
{ CT_ROLL_ABSOLUTE_CONTROL, "Roll (Absolute)" },
{ CT_ROLL_RELATIVE_CONTROL, "Roll (Relative)" },
{ CT_PRIVACY_CONTROL, "Privacy" },
{ CT_FOCUS_SIMPLE_CONTROL, "Focus (Simple)" },
{ CT_WINDOW_CONTROL, "Window" },
{ CT_REGION_OF_INTEREST_CONTROL, "Region of Interest" },
{ 0, NULL }
};
static value_string_ext cs_camera_terminal_ext =
VALUE_STRING_EXT_INIT(cs_camera_terminal);
static const value_string cs_processing_unit[] = {
{ PU_CONTROL_UNDEFINED, "Undefined" },
{ PU_BACKLIGHT_COMPENSATION_CONTROL, "Backlight Compensation" },
{ PU_BRIGHTNESS_CONTROL, "Brightness" },
{ PU_CONTRAST_CONTROL, "Contrast" },
{ PU_GAIN_CONTROL, "Gain" },
{ PU_POWER_LINE_FREQUENCY_CONTROL, "Power Line Frequency" },
{ PU_HUE_CONTROL, "Hue" },
{ PU_SATURATION_CONTROL, "Saturation" },
{ PU_SHARPNESS_CONTROL, "Sharpness" },
{ PU_GAMMA_CONTROL, "Gamma" },
{ PU_WHITE_BALANCE_TEMPERATURE_CONTROL, "White Balance Temperature" },
{ PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL,"White Balance Temperature Auto" },
{ PU_WHITE_BALANCE_COMPONENT_CONTROL, "White Balance Component" },
{ PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL, "White Balance Component Auto" },
{ PU_DIGITAL_MULTIPLIER_CONTROL, "Digital Multiplier" },
{ PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL, "Digital Multiplier Limit" },
{ PU_HUE_AUTO_CONTROL, "Hue Auto" },
{ PU_ANALOG_VIDEO_STANDARD_CONTROL, "Video Standard" },
{ PU_ANALOG_LOCK_STATUS_CONTROL, "Analog Lock Status" },
{ PU_CONTRAST_AUTO_CONTROL, "Contrast Auto" },
{ 0, NULL }
{ PU_CONTROL_UNDEFINED, "Undefined" },
{ PU_BACKLIGHT_COMPENSATION_CONTROL, "Backlight Compensation" },
{ PU_BRIGHTNESS_CONTROL, "Brightness" },
{ PU_CONTRAST_CONTROL, "Contrast" },
{ PU_GAIN_CONTROL, "Gain" },
{ PU_POWER_LINE_FREQUENCY_CONTROL, "Power Line Frequency" },
{ PU_HUE_CONTROL, "Hue" },
{ PU_SATURATION_CONTROL, "Saturation" },
{ PU_SHARPNESS_CONTROL, "Sharpness" },
{ PU_GAMMA_CONTROL, "Gamma" },
{ PU_WHITE_BALANCE_TEMPERATURE_CONTROL, "White Balance Temperature" },
{ PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL,"White Balance Temperature Auto" },
{ PU_WHITE_BALANCE_COMPONENT_CONTROL, "White Balance Component" },
{ PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL, "White Balance Component Auto" },
{ PU_DIGITAL_MULTIPLIER_CONTROL, "Digital Multiplier" },
{ PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL, "Digital Multiplier Limit" },
{ PU_HUE_AUTO_CONTROL, "Hue Auto" },
{ PU_ANALOG_VIDEO_STANDARD_CONTROL, "Video Standard" },
{ PU_ANALOG_LOCK_STATUS_CONTROL, "Analog Lock Status" },
{ PU_CONTRAST_AUTO_CONTROL, "Contrast Auto" },
{ 0, NULL }
};
static value_string_ext cs_processing_unit_ext =
VALUE_STRING_EXT_INIT(cs_processing_unit);
static const value_string vc_terminal_types[] = {
{ TT_VENDOR_SPECIFIC, "Vendor Specific", },
{ TT_STREAMING, "Streaming" },
{ ITT_VENDOR_SPECIFIC, "Vendor Specific Input" },
{ ITT_CAMERA, "Camera Input" },
{ ITT_MEDIA_TRANSPORT_INPUT, "Media Transport Input" },
{ OTT_VENDOR_SPECIFIC, "Vendor Specific Output" },
{ OTT_DISPLAY, "Display Output" },
{ OTT_MEDIA_TRANSPORT_OUTPUT, "Media Transport Output" },
{ EXTERNAL_VENDOR_SPECIFIC, "Vendor Specific External" },
{ COMPOSITE_CONNECTOR, "Composite Connector" },
{ SVIDEO_CONNECTOR, "SVideo Connector" },
{ COMPONENT_CONNECTOR, "Component Connector" },
{ 0, NULL }
{ TT_VENDOR_SPECIFIC, "Vendor Specific", },
{ TT_STREAMING, "Streaming" },
{ ITT_VENDOR_SPECIFIC, "Vendor Specific Input" },
{ ITT_CAMERA, "Camera Input" },
{ ITT_MEDIA_TRANSPORT_INPUT, "Media Transport Input" },
{ OTT_VENDOR_SPECIFIC, "Vendor Specific Output" },
{ OTT_DISPLAY, "Display Output" },
{ OTT_MEDIA_TRANSPORT_OUTPUT, "Media Transport Output" },
{ EXTERNAL_VENDOR_SPECIFIC, "Vendor Specific External" },
{ COMPOSITE_CONNECTOR, "Composite Connector" },
{ SVIDEO_CONNECTOR, "SVideo Connector" },
{ COMPONENT_CONNECTOR, "Component Connector" },
{ 0, NULL }
};
static value_string_ext vc_terminal_types_ext =
VALUE_STRING_EXT_INIT(vc_terminal_types);
static const value_string vs_if_descriptor_subtypes[] = {
{ VS_UNDEFINED, "Undefined" },
{ VS_INPUT_HEADER, "Input Header" },
{ VS_OUTPUT_HEADER, "Output Header" },
{ VS_STILL_IMAGE_FRAME, "Still Image Frame" },
{ VS_FORMAT_UNCOMPRESSED, "Format Uncompressed" },
{ VS_FRAME_UNCOMPRESSED, "Frame Uncompressed" },
{ VS_FORMAT_MJPEG, "Format MJPEG" },
{ VS_FRAME_MJPEG, "Frame MJPEG" },
{ VS_FORMAT_MPEG1, "Format MPEG1" },
{ VS_FORMAT_MPEG2PS, "Format MPEG2-PS" },
{ VS_FORMAT_MPEG2TS, "Format MPEG2-TS" },
{ VS_FORMAT_MPEG4SL, "Format MPEG4-SL" },
{ VS_FORMAT_DV, "Format DV" },
{ VS_COLORFORMAT, "Colorformat" },
{ VS_FORMAT_VENDOR, "Format Vendor" },
{ VS_FRAME_VENDOR, "Frame Vendor" },
{ VS_FORMAT_FRAME_BASED, "Format Frame-Based" },
{ VS_FRAME_FRAME_BASED, "Frame Frame-Based" },
{ VS_FORMAT_STREAM_BASED, "Format Stream Based" },
{ VS_FORMAT_H264, "Format H.264" },
{ VS_FRAME_H264, "Frame H.264" },
{ VS_FORMAT_H264_SIMULCAST, "Format H.264 Simulcast" },
{ VS_FORMAT_VP8, "Format VP8" },
{ VS_FRAME_VP8, "Frame VP8" },
{ VS_FORMAT_VP8_SIMULCAST, "Format VP8 Simulcast" },
{ 0, NULL }
{ VS_UNDEFINED, "Undefined" },
{ VS_INPUT_HEADER, "Input Header" },
{ VS_OUTPUT_HEADER, "Output Header" },
{ VS_STILL_IMAGE_FRAME, "Still Image Frame" },
{ VS_FORMAT_UNCOMPRESSED, "Format Uncompressed" },
{ VS_FRAME_UNCOMPRESSED, "Frame Uncompressed" },
{ VS_FORMAT_MJPEG, "Format MJPEG" },
{ VS_FRAME_MJPEG, "Frame MJPEG" },
{ VS_FORMAT_MPEG1, "Format MPEG1" },
{ VS_FORMAT_MPEG2PS, "Format MPEG2-PS" },
{ VS_FORMAT_MPEG2TS, "Format MPEG2-TS" },
{ VS_FORMAT_MPEG4SL, "Format MPEG4-SL" },
{ VS_FORMAT_DV, "Format DV" },
{ VS_COLORFORMAT, "Colorformat" },
{ VS_FORMAT_VENDOR, "Format Vendor" },
{ VS_FRAME_VENDOR, "Frame Vendor" },
{ VS_FORMAT_FRAME_BASED, "Format Frame-Based" },
{ VS_FRAME_FRAME_BASED, "Frame Frame-Based" },
{ VS_FORMAT_STREAM_BASED, "Format Stream Based" },
{ VS_FORMAT_H264, "Format H.264" },
{ VS_FRAME_H264, "Frame H.264" },
{ VS_FORMAT_H264_SIMULCAST, "Format H.264 Simulcast" },
{ VS_FORMAT_VP8, "Format VP8" },
{ VS_FRAME_VP8, "Frame VP8" },
{ VS_FORMAT_VP8_SIMULCAST, "Format VP8 Simulcast" },
{ 0, NULL }
};
static value_string_ext vs_if_descriptor_subtypes_ext =
VALUE_STRING_EXT_INIT(vs_if_descriptor_subtypes);
static const value_string interrupt_status_types[] = {
{ INT_VIDEOCONTROL, "VideoControl Interface" },
{ INT_VIDEOSTREAMING, "VideoStreaming Interface" },
{ 0, NULL }
{ INT_VIDEOCONTROL, "VideoControl Interface" },
{ INT_VIDEOSTREAMING, "VideoStreaming Interface" },
{ 0, NULL }
};
static const value_string control_change_types[] = {
{ CONTROL_CHANGE_VALUE, "Value" },
{ CONTROL_CHANGE_INFO, "Info" },
{ CONTROL_CHANGE_FAILURE, "Failure" },
{ CONTROL_CHANGE_MIN, "Min" },
{ CONTROL_CHANGE_MAX, "Max" },
{ 0, NULL }
{ CONTROL_CHANGE_VALUE, "Value" },
{ CONTROL_CHANGE_INFO, "Info" },
{ CONTROL_CHANGE_FAILURE, "Failure" },
{ CONTROL_CHANGE_MIN, "Min" },
{ CONTROL_CHANGE_MAX, "Max" },
{ 0, NULL }
};
static value_string_ext control_change_types_ext =
VALUE_STRING_EXT_INIT(control_change_types);
static const value_string control_interrupt_events[] = {
{ CONTROL_INTERRUPT_EVENT_CONTROL_CHANGE, "Control Change" },
{ 0, NULL }
{ CONTROL_INTERRUPT_EVENT_CONTROL_CHANGE, "Control Change" },
{ 0, NULL }
};
/* Table 3-13 VS Interface Input Header Descriptor - bStillCaptureMethod field */
static const value_string vs_still_capture_methods[] = {
{ 0, "None" },
{ 1, "Uninterrupted streaming" },
{ 2, "Suspended streaming" },
{ 3, "Dedicated pipe" },
{ 0, NULL }
{ 0, "None" },
{ 1, "Uninterrupted streaming" },
{ 2, "Suspended streaming" },
{ 3, "Dedicated pipe" },
{ 0, NULL }
};
static value_string_ext vs_still_capture_methods_ext =
VALUE_STRING_EXT_INIT(vs_still_capture_methods);
/* Table 3-13 VS Interface Input Header Descriptor - bTriggerUsage field */
static const value_string vs_trigger_usage[] = {
{ 0, "Initiate still image capture" },
{ 1, "General purpose button event" },
{ 0, NULL }
{ 0, "Initiate still image capture" },
{ 1, "General purpose button event" },
{ 0, NULL }
};
/* bmInterlaceFlags for format descriptors */
@ -570,20 +570,20 @@ static const true_false_string interlaced_fields_meaning = {
/* bmInterlaceFlags for format descriptors */
static const value_string field_pattern_meaning[] = {
{ 0, "Field 1 only" },
{ 1, "Field 2 only" },
{ 2, "Regular pattern of fields 1 and 2" },
{ 3, "Random pattern of fields 1 and 2" },
{0, NULL},
{ 0, "Field 1 only" },
{ 1, "Field 2 only" },
{ 2, "Regular pattern of fields 1 and 2" },
{ 3, "Random pattern of fields 1 and 2" },
{0, NULL},
};
static value_string_ext field_pattern_meaning_ext =
VALUE_STRING_EXT_INIT(field_pattern_meaning);
/* bCopyProtect for format descriptors */
static const value_string copy_protect_meaning[] = {
{ 0, "No restrictions" },
{ 1, "Restrict duplication" },
{0, NULL},
{ 0, "No restrictions" },
{ 1, "Restrict duplication" },
{0, NULL},
};
/* Table 4-46 Video Probe and Commit Controls - bmHint field */
@ -594,57 +594,57 @@ static const true_false_string probe_hint_meaning = {
/* Table 3-19 Color Matching Descriptor - bColorPrimaries field */
static const value_string color_primaries_meaning[] = {
{ 0, "Unspecified" },
{ 1, "BT.709, sRGB" },
{ 2, "BT.470-2 (M)" },
{ 3, "BT.470-2 (B,G)" },
{ 4, "SMPTE 170M" },
{ 5, "SMPTE 240M" },
{0, NULL},
{ 0, "Unspecified" },
{ 1, "BT.709, sRGB" },
{ 2, "BT.470-2 (M)" },
{ 3, "BT.470-2 (B,G)" },
{ 4, "SMPTE 170M" },
{ 5, "SMPTE 240M" },
{0, NULL},
};
static value_string_ext color_primaries_meaning_ext =
VALUE_STRING_EXT_INIT(color_primaries_meaning);
/* Table 3-19 Color Matching Descriptor - bTransferCharacteristics field */
static const value_string color_transfer_characteristics[] = {
{ 0, "Unspecified" },
{ 1, "BT.709" },
{ 2, "BT.470-2 (M)" },
{ 3, "BT.470-2 (B,G)" },
{ 4, "SMPTE 170M" },
{ 5, "SMPTE 240M" },
{ 6, "Linear (V=Lc)" },
{ 7, "sRGB" },
{0, NULL},
{ 0, "Unspecified" },
{ 1, "BT.709" },
{ 2, "BT.470-2 (M)" },
{ 3, "BT.470-2 (B,G)" },
{ 4, "SMPTE 170M" },
{ 5, "SMPTE 240M" },
{ 6, "Linear (V=Lc)" },
{ 7, "sRGB" },
{0, NULL},
};
static value_string_ext color_transfer_characteristics_ext =
VALUE_STRING_EXT_INIT(color_transfer_characteristics);
/* Table 3-19 Color Matching Descriptor - bMatrixCoefficients field */
static const value_string matrix_coefficients_meaning[] = {
{ 0, "Unspecified" },
{ 1, "BT.709" },
{ 2, "FCC" },
{ 3, "BT.470-2 (B,G)" },
{ 4, "SMPTE 170M (BT.601)" },
{ 5, "SMPTE 240M" },
{0, NULL},
{ 0, "Unspecified" },
{ 1, "BT.709" },
{ 2, "FCC" },
{ 3, "BT.470-2 (B,G)" },
{ 4, "SMPTE 170M (BT.601)" },
{ 5, "SMPTE 240M" },
{0, NULL},
};
static value_string_ext matrix_coefficients_meaning_ext =
VALUE_STRING_EXT_INIT(matrix_coefficients_meaning);
static const value_string request_error_codes[] = {
{ UVC_ERROR_NONE, "No error" },
{ UVC_ERROR_NOT_READY, "Not ready" },
{ UVC_ERROR_WRONG_STATE, "Wrong state" },
{ UVC_ERROR_POWER, "Insufficient power" } ,
{ UVC_ERROR_OUT_OF_RANGE, "Out of range" },
{ UVC_ERROR_INVALID_UNIT, "Invalid unit" },
{ UVC_ERROR_INVALID_CONTROL, "Invalid control" },
{ UVC_ERROR_INVALID_REQUEST, "Invalid request" },
{ UVC_ERROR_INVALID_VALUE, "Invalid value within range" },
{ UVC_ERROR_UNKNOWN, "Unknown" },
{0, NULL},
{ UVC_ERROR_NONE, "No error" },
{ UVC_ERROR_NOT_READY, "Not ready" },
{ UVC_ERROR_WRONG_STATE, "Wrong state" },
{ UVC_ERROR_POWER, "Insufficient power" } ,
{ UVC_ERROR_OUT_OF_RANGE, "Out of range" },
{ UVC_ERROR_INVALID_UNIT, "Invalid unit" },
{ UVC_ERROR_INVALID_CONTROL, "Invalid control" },
{ UVC_ERROR_INVALID_REQUEST, "Invalid request" },
{ UVC_ERROR_INVALID_VALUE, "Invalid value within range" },
{ UVC_ERROR_UNKNOWN, "Unknown" },
{0, NULL},
};
static value_string_ext request_error_codes_ext =
VALUE_STRING_EXT_INIT(request_error_codes);
@ -897,20 +897,20 @@ dissect_usb_video_control_interface_descriptor(proto_tree *parent_tree, tvbuff_t
guint8 descriptor_len, packet_info *pinfo, usb_conv_info_t *usb_conv_info)
{
video_conv_info_t *video_conv_info = NULL;
video_entity_t *entity = NULL;
proto_item *item = NULL;
proto_item *subtype_item = NULL;
proto_tree *tree = NULL;
guint8 entity_id = 0;
guint16 terminal_type = 0;
int offset = 0;
guint8 subtype;
video_entity_t *entity = NULL;
proto_item *item = NULL;
proto_item *subtype_item = NULL;
proto_tree *tree = NULL;
guint8 entity_id = 0;
guint16 terminal_type = 0;
int offset = 0;
guint8 subtype;
subtype = tvb_get_guint8(tvb, offset+2);
if (parent_tree)
{
const gchar* subtype_str;
const gchar *subtype_str;
subtype_str = val_to_str_ext(subtype, &vc_if_descriptor_subtypes_ext, "Unknown (0x%x)");
@ -1245,10 +1245,10 @@ dissect_usb_video_frame(proto_tree *tree, tvbuff_t *tvb, int offset,
NULL
};
proto_item *desc_item;
guint8 bFrameIntervalType;
guint8 frame_index;
guint16 frame_width;
guint16 frame_height;
guint8 bFrameIntervalType;
guint8 frame_index;
guint16 frame_width;
guint16 frame_height;
frame_index = tvb_get_guint8(tvb, offset);
proto_tree_add_item(tree, hf_usb_vid_frame_index, tvb, offset, 1, ENC_NA);
@ -1348,11 +1348,11 @@ static int
dissect_usb_video_streaming_interface_descriptor(proto_tree *parent_tree, tvbuff_t *tvb,
guint8 descriptor_len)
{
proto_item *item;
proto_tree *tree;
int offset = 0;
const gchar* subtype_str;
guint8 subtype;
proto_item *item;
proto_tree *tree;
int offset = 0;
const gchar *subtype_str;
guint8 subtype;
subtype = tvb_get_guint8(tvb, offset+2);
@ -1418,10 +1418,10 @@ static int
dissect_usb_video_endpoint_descriptor(proto_tree *parent_tree, tvbuff_t *tvb,
guint8 descriptor_len)
{
proto_item *item = NULL;
proto_tree *tree = NULL;
int offset = 0;
guint8 subtype;
proto_item *item = NULL;
proto_tree *tree = NULL;
int offset = 0;
guint8 subtype;
subtype = tvb_get_guint8(tvb, offset+2);
@ -1713,9 +1713,9 @@ dissect_usb_vid_control_info(proto_tree *tree, tvbuff_t *tvb, int offset)
static void
dissect_usb_vid_control_value(proto_tree *tree, tvbuff_t *tvb, int offset, guint8 request)
{
gint value_size;
const char* fallback_name;
int hf;
gint value_size;
const char *fallback_name;
int hf;
switch (request)
{
@ -1800,9 +1800,9 @@ dissect_usb_vid_get_set(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb,
usb_trans_info_t *usb_trans_info,
usb_conv_info_t *usb_conv_info)
{
const gchar *short_name = NULL;
guint8 control_sel;
guint8 entity_id;
const gchar *short_name = NULL;
guint8 control_sel;
guint8 entity_id;
entity_id = usb_trans_info->setup.wIndex >> 8;
control_sel = usb_trans_info->setup.wValue >> 8;
@ -1996,11 +1996,11 @@ static const value_string setup_request_names_vals[] = {
static int
dissect_usb_vid_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
gboolean is_request = (pinfo->srcport == NO_ENDPOINT);
usb_conv_info_t *usb_conv_info;
usb_trans_info_t *usb_trans_info;
int offset = 0;
usb_setup_dissector dissector = NULL;
gboolean is_request = (pinfo->srcport == NO_ENDPOINT);
usb_conv_info_t *usb_conv_info;
usb_trans_info_t *usb_trans_info;
int offset = 0;
usb_setup_dissector dissector = NULL;
const usb_setup_dissector_table_t *tmp;
/* Reject the packet if data or usb_trans_info are NULL */
@ -2053,9 +2053,9 @@ dissect_usb_vid_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
static int
dissect_usb_vid_interrupt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
usb_conv_info_t *usb_conv_info;
usb_conv_info_t *usb_conv_info;
gint bytes_available;
int offset = 0;
int offset = 0;
usb_conv_info = (usb_conv_info_t *)data;
bytes_available = tvb_length_remaining(tvb, offset);
@ -3254,10 +3254,10 @@ proto_reg_handoff_usb_vid(void)
*
* Local variables:
* c-basic-offset: 4
* tab-width: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=4 tabstop=4 expandtab:
* :indentSize=4:tabSize=4:noTabs=true:
* vi: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/

View File

@ -47,8 +47,8 @@ static expert_field ei_whois_nocrlf = EI_INIT;
static gint ett_whois = -1;
typedef struct _whois_transaction_t {
guint32 req_frame;
guint32 rep_frame;
guint32 req_frame;
guint32 rep_frame;
nstime_t req_time;
} whois_transaction_t;
@ -56,12 +56,12 @@ static int
dissect_whois(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
void *data _U_)
{
proto_item *ti, *expert_ti;
proto_tree *whois_tree;
conversation_t *conversation;
proto_item *ti, *expert_ti;
proto_tree *whois_tree;
conversation_t *conversation;
whois_transaction_t *whois_trans;
gboolean is_query;
guint len;
gboolean is_query;
guint len;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "WHOIS");
@ -215,11 +215,11 @@ proto_reg_handoff_whois(void)
*
* Local variables:
* c-basic-offset: 4
* tab-width: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=4 tabstop=4 expandtab:
* :indentSize=4:tabSize=4:noTabs=true:
* vi: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/

View File

@ -1077,10 +1077,10 @@ proto_reg_handoff_wtp(void)
*
* Local variables:
* c-basic-offset: 4
* tab-width: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=4 tabstop=4 expandtab:
* :indentSize=4:tabSize=4:noTabs=true:
* vi: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/