aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/t125
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2007-10-29 11:32:07 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2007-10-29 11:32:07 +0000
commiteca5a7d7d410554825e972c28c7be7732b32e9d4 (patch)
tree7f28c6d5d782d1eece3e8d1ccb64197cabe878bb /asn1/t125
parentbf43e715215b9120b99b26bba7385defbc207bda (diff)
add a asn2wrs generated T.125 MCP dissector
This dissects the initial Connect-Initial and Connect-confirm pdus of setting up t.125 The dissector needs to be enhanced to also decode the data payload so that it can decode any furhter packets on the connection after these two initial handshake packets svn path=/trunk/; revision=23307
Diffstat (limited to 'asn1/t125')
-rw-r--r--asn1/t125/MCS-PROTOCOL.asn445
-rw-r--r--asn1/t125/Makefile.am26
-rw-r--r--asn1/t125/Makefile.common49
-rw-r--r--asn1/t125/Makefile.nmake29
-rw-r--r--asn1/t125/packet-t125-template.c115
-rw-r--r--asn1/t125/packet-t125-template.h38
-rw-r--r--asn1/t125/t125.cnf42
7 files changed, 744 insertions, 0 deletions
diff --git a/asn1/t125/MCS-PROTOCOL.asn b/asn1/t125/MCS-PROTOCOL.asn
new file mode 100644
index 0000000000..95fda65887
--- /dev/null
+++ b/asn1/t125/MCS-PROTOCOL.asn
@@ -0,0 +1,445 @@
+-- Module MCS-PROTOCOL (T.125:02/1998)
+MCS-PROTOCOL DEFINITIONS ::=
+BEGIN
+
+-- Part 1: Fundamental MCS types
+ChannelId ::= INTEGER(0..65535) -- range is 16 bits
+
+
+StaticChannelId ::= ChannelId(1..1000) -- those known permanently
+
+
+DynamicChannelId ::= ChannelId(1001..65535) -- those created and deleted
+
+
+UserId ::= DynamicChannelId -- created by Attach-User
+
+-- deleted by Detach-User
+PrivateChannelId ::=
+ DynamicChannelId -- created by Channel-Convene
+
+-- deleted by Channel-Disband
+AssignedChannelId ::=
+ DynamicChannelId -- created by Channel-Join zero
+
+-- deleted by last Channel-Leave
+TokenId ::= INTEGER(1..65535) -- all are known permanently
+
+
+TokenStatus ::= ENUMERATED {
+ notInUse(0), selfGrabbed(1), otherGrabbed(2), selfInhibited(3),
+ otherInhibited(4), selfRecipient(5), selfGiving(6), otherGiving(7)}
+
+DataPriority ::= ENUMERATED {top(0), high(1), medium(2), low(3)}
+
+Segmentation ::= BIT STRING {begin(0), end(1)}(SIZE (2))
+
+DomainParameters ::= SEQUENCE {
+ maxChannelIds INTEGER(0..MAX),
+ -- a limit on channel ids in use,
+ -- static + user id + private + assigned
+ maxUserIds INTEGER(0..MAX),
+ -- a sublimit on user id channels alone
+ maxTokenIds INTEGER(0..MAX),
+ -- a limit on token ids in use
+ -- grabbed + inhibited + giving + ungivable + given
+ numPriorities INTEGER(0..MAX),
+ -- the number of TCs in an MCS connection
+ minThroughput INTEGER(0..MAX),
+ -- the enforced number of octets per second
+ maxHeight INTEGER(0..MAX),
+ -- a limit on the height of a provider
+ maxMCSPDUsize INTEGER(0..MAX),
+ -- an octet limit on domain MCSPDUs
+ protocolVersion INTEGER(0..MAX)
+}
+
+-- Part 2: Connect provider
+Connect-Initial ::= [APPLICATION 101] IMPLICIT SEQUENCE {
+ callingDomainSelector OCTET STRING,
+ calledDomainSelector OCTET STRING,
+ upwardFlag BOOLEAN,
+ -- TRUE if called provider is higher
+ targetParameters DomainParameters,
+ minimumParameters DomainParameters,
+ maximumParameters DomainParameters,
+ userData OCTET STRING
+}
+
+Connect-Response ::= [APPLICATION 102] IMPLICIT SEQUENCE {
+ result Result,
+ calledConnectId INTEGER(0..MAX),
+ -- assigned by the called provider
+ -- to identify additional TCs of
+ -- the same MCS connection
+ domainParameters DomainParameters,
+ userData OCTET STRING
+}
+
+Connect-Additional ::= [APPLICATION 103] IMPLICIT SEQUENCE {
+ calledConnectId INTEGER(0..MAX),
+ dataPriority DataPriority
+}
+
+Connect-Result ::= [APPLICATION 104] IMPLICIT SEQUENCE {result Result
+}
+
+-- Part 3: Merge domain
+PlumbDomainIndication ::= [APPLICATION 0] IMPLICIT SEQUENCE {
+ heightLimit INTEGER(0..MAX)
+} -- a restriction on the MCSPDU receiver
+
+ErectDomainRequest ::= [APPLICATION 1] IMPLICIT SEQUENCE {
+ subHeight INTEGER(0..MAX),
+ -- height in domain of the MCSPDU transmitter
+ subInterval INTEGER(0..MAX)
+} -- its throughput enforcement interval in milliseconds
+
+ChannelAttributes ::= CHOICE {
+ static [0] IMPLICIT SEQUENCE {channelId StaticChannelId}, -- joined is implicitly TRUE
+ userId
+ [1] IMPLICIT SEQUENCE {joined BOOLEAN,
+ -- TRUE if user is joined to its user id
+ userId UserId},
+ private
+ [2] IMPLICIT SEQUENCE {joined BOOLEAN,
+ -- TRUE if channel id is joined below
+ channelId PrivateChannelId,
+ manager UserId,
+ admitted SET OF UserId}, -- may span multiple MergeChannelsRequest
+ assigned [3] IMPLICIT SEQUENCE {channelId AssignedChannelId} -- joined is implicitly TRUE
+}
+
+MergeChannelsRequest ::= [APPLICATION 2] IMPLICIT SEQUENCE {
+ mergeChannels SET OF ChannelAttributes,
+ purgeChannelIds SET OF ChannelId
+}
+
+MergeChannelsConfirm ::= [APPLICATION 3] IMPLICIT SEQUENCE {
+ mergeChannels SET OF ChannelAttributes,
+ purgeChannelIds SET OF ChannelId
+}
+
+PurgeChannelsIndication ::= [APPLICATION 4] IMPLICIT SEQUENCE {
+ detachUserIds SET OF UserId,
+ -- purge user id channels
+ purgeChannelIds SET OF ChannelId
+} -- purge other channels
+
+TokenAttributes ::= CHOICE {
+ grabbed [0] IMPLICIT SEQUENCE {tokenId TokenId,
+ grabber UserId},
+ inhibited
+ [1] IMPLICIT SEQUENCE {tokenId TokenId,
+ inhibitors SET OF UserId}, -- may span multiple MergeTokensRequest
+ giving
+ [2] IMPLICIT SEQUENCE {tokenId TokenId,
+ grabber UserId,
+ recipient UserId},
+ ungivable [3] IMPLICIT SEQUENCE {tokenId TokenId,
+ grabber UserId}, -- recipient has since detached
+ given [4] IMPLICIT SEQUENCE {tokenId TokenId,
+ recipient UserId} -- grabber released or detached
+}
+
+MergeTokensRequest ::= [APPLICATION 5] IMPLICIT SEQUENCE {
+ mergeTokens SET OF TokenAttributes,
+ purgeTokenIds SET OF TokenId
+}
+
+MergeTokensConfirm ::= [APPLICATION 6] IMPLICIT SEQUENCE {
+ mergeTokens SET OF TokenAttributes,
+ purgeTokenIds SET OF TokenId
+}
+
+PurgeTokensIndication ::= [APPLICATION 7] IMPLICIT SEQUENCE {
+ purgeTokenIds SET OF TokenId
+}
+
+-- Part 4: Disconnect provider
+DisconnectProviderUltimatum ::= [APPLICATION 8] IMPLICIT SEQUENCE {
+ reason Reason
+}
+
+RejectMCSPDUUltimatum ::= [APPLICATION 9] IMPLICIT SEQUENCE {
+ diagnostic Diagnostic,
+ initialOctets OCTET STRING
+}
+
+-- Part 5: Attach/Detach user
+AttachUserRequest ::= [APPLICATION 10] IMPLICIT SEQUENCE {
+}
+
+AttachUserConfirm ::= [APPLICATION 11] IMPLICIT SEQUENCE {
+ result Result,
+ initiator UserId OPTIONAL
+}
+
+DetachUserRequest ::= [APPLICATION 12] IMPLICIT SEQUENCE {
+ reason Reason,
+ userIds SET OF UserId
+}
+
+DetachUserIndication ::= [APPLICATION 13] IMPLICIT SEQUENCE {
+ reason Reason,
+ userIds SET OF UserId
+}
+
+-- Part 6: Channel management
+ChannelJoinRequest ::= [APPLICATION 14] IMPLICIT SEQUENCE {
+ initiator UserId,
+ channelId ChannelId
+} -- may be zero
+
+ChannelJoinConfirm ::= [APPLICATION 15] IMPLICIT SEQUENCE {
+ result Result,
+ initiator UserId,
+ requested ChannelId,
+ -- may be zero
+ channelId ChannelId OPTIONAL
+}
+
+ChannelLeaveRequest ::= [APPLICATION 16] IMPLICIT SEQUENCE {
+ channelIds SET OF ChannelId
+}
+
+ChannelConveneRequest ::= [APPLICATION 17] IMPLICIT SEQUENCE {initiator UserId
+}
+
+ChannelConveneConfirm ::= [APPLICATION 18] IMPLICIT SEQUENCE {
+ result Result,
+ initiator UserId,
+ channelId PrivateChannelId OPTIONAL
+}
+
+ChannelDisbandRequest ::= [APPLICATION 19] IMPLICIT SEQUENCE {
+ initiator UserId,
+ channelId PrivateChannelId
+}
+
+ChannelDisbandIndication ::= [APPLICATION 20] IMPLICIT SEQUENCE {
+ channelId PrivateChannelId
+}
+
+ChannelAdmitRequest ::= [APPLICATION 21] IMPLICIT SEQUENCE {
+ initiator UserId,
+ channelId PrivateChannelId,
+ userIds SET OF UserId
+}
+
+ChannelAdmitIndication ::= [APPLICATION 22] IMPLICIT SEQUENCE {
+ initiator UserId,
+ channelId PrivateChannelId,
+ userIds SET OF UserId
+}
+
+ChannelExpelRequest ::= [APPLICATION 23] IMPLICIT SEQUENCE {
+ initiator UserId,
+ channelId PrivateChannelId,
+ userIds SET OF UserId
+}
+
+ChannelExpelIndication ::= [APPLICATION 24] IMPLICIT SEQUENCE {
+ channelId PrivateChannelId,
+ userIds SET OF UserId
+}
+
+-- Part 7: Data transfer
+SendDataRequest ::= [APPLICATION 25] IMPLICIT SEQUENCE {
+ initiator UserId,
+ channelId ChannelId,
+ dataPriority DataPriority,
+ segmentation Segmentation,
+ userData OCTET STRING
+}
+
+SendDataIndication ::= [APPLICATION 26] IMPLICIT SEQUENCE {
+ initiator UserId,
+ channelId ChannelId,
+ dataPriority DataPriority,
+ segmentation Segmentation,
+ userData OCTET STRING
+}
+
+UniformSendDataRequest ::= [APPLICATION 27] IMPLICIT SEQUENCE {
+ initiator UserId,
+ channelId ChannelId,
+ dataPriority DataPriority,
+ segmentation Segmentation,
+ userData OCTET STRING
+}
+
+UniformSendDataIndication ::= [APPLICATION 28] IMPLICIT SEQUENCE {
+ initiator UserId,
+ channelId ChannelId,
+ dataPriority DataPriority,
+ segmentation Segmentation,
+ userData OCTET STRING
+}
+
+-- Part 8: Token management
+TokenGrabRequest ::= [APPLICATION 29] IMPLICIT SEQUENCE {
+ initiator UserId,
+ tokenId TokenId
+}
+
+TokenGrabConfirm ::= [APPLICATION 30] IMPLICIT SEQUENCE {
+ result Result,
+ initiator UserId,
+ tokenId TokenId,
+ tokenStatus TokenStatus
+}
+
+TokenInhibitRequest ::= [APPLICATION 31] IMPLICIT SEQUENCE {
+ initiator UserId,
+ tokenId TokenId
+}
+
+TokenInhibitConfirm ::= [APPLICATION 32] IMPLICIT SEQUENCE {
+ result Result,
+ initiator UserId,
+ tokenId TokenId,
+ tokenStatus TokenStatus
+}
+
+TokenGiveRequest ::= [APPLICATION 33] IMPLICIT SEQUENCE {
+ initiator UserId,
+ tokenId TokenId,
+ recipient UserId
+}
+
+TokenGiveIndication ::= [APPLICATION 34] IMPLICIT SEQUENCE {
+ initiator UserId,
+ tokenId TokenId,
+ recipient UserId
+}
+
+TokenGiveResponse ::= [APPLICATION 35] IMPLICIT SEQUENCE {
+ result Result,
+ recipient UserId,
+ tokenId TokenId
+}
+
+TokenGiveConfirm ::= [APPLICATION 36] IMPLICIT SEQUENCE {
+ result Result,
+ initiator UserId,
+ tokenId TokenId,
+ tokenStatus TokenStatus
+}
+
+TokenPleaseRequest ::= [APPLICATION 37] IMPLICIT SEQUENCE {
+ initiator UserId,
+ tokenId TokenId
+}
+
+TokenPleaseIndication ::= [APPLICATION 38] IMPLICIT SEQUENCE {
+ initiator UserId,
+ tokenId TokenId
+}
+
+TokenReleaseRequest ::= [APPLICATION 39] IMPLICIT SEQUENCE {
+ initiator UserId,
+ tokenId TokenId
+}
+
+TokenReleaseConfirm ::= [APPLICATION 40] IMPLICIT SEQUENCE {
+ result Result,
+ initiator UserId,
+ tokenId TokenId,
+ tokenStatus TokenStatus
+}
+
+TokenTestRequest ::= [APPLICATION 41] IMPLICIT SEQUENCE {
+ initiator UserId,
+ tokenId TokenId
+}
+
+TokenTestConfirm ::= [APPLICATION 42] IMPLICIT SEQUENCE {
+ initiator UserId,
+ tokenId TokenId,
+ tokenStatus TokenStatus
+}
+
+-- Part 9: Status codes
+-- in DisconnectProviderUltimatum, DetachUserRequest, DetachUserIndication
+Reason ::= ENUMERATED {
+ rn-domain-disconnected(0), rn-provider-initiated(1), rn-token-purged(2),
+ rn-user-requested(3), rn-channel-purged(4)}
+
+-- in Connect, response, confirm
+Result ::= ENUMERATED {
+ rt-successful(0), rt-domain-merging(1), rt-domain-not-hierarchical(2),
+ rt-no-such-channel(3), rt-no-such-domain(4), rt-no-such-user(5),
+ rt-not-admitted(6), rt-other-user-id(7), rt-parameters-unacceptable(8),
+ rt-token-not-available(9), rt-token-not-possessed(10),
+ rt-too-many-channels(11), rt-too-many-tokens(12), rt-too-many-users(13),
+ rt-unspecified-failure(14), rt-user-rejected(15)}
+
+-- in RejectMCSPDUUltimatum
+Diagnostic ::= ENUMERATED {
+ dc-inconsistent-merge(0), dc-forbidden-PDU-downward(1),
+ dc-forbidden-PDU-upward(2), dc-invalid-BER-encoding(3),
+ dc-invalid-PER-encoding(4), dc-misrouted-user(5), dc-unrequested-confirm(6),
+ dc-wrong-transport-priority(7), dc-channel-id-conflict(8),
+ dc-token-id-conflict(9), dc-not-user-id-channel(10),
+ dc-too-many-channels(11), dc-too-many-tokens(12), dc-too-many-users(13)
+}
+
+-- Part 10: MCSPDU repertoire
+ConnectMCSPDU ::= CHOICE {
+ connect-initial Connect-Initial,
+ connect-response Connect-Response,
+ connect-additional Connect-Additional,
+ connect-result Connect-Result
+}
+
+DomainMCSPDU ::= CHOICE {
+ plumbDomainIndication PlumbDomainIndication,
+ erectDomainRequest ErectDomainRequest,
+ mergeChannelsRequest MergeChannelsRequest,
+ mergeChannelsConfirm MergeChannelsConfirm,
+ purgeChannelsIndication PurgeChannelsIndication,
+ mergeTokensRequest MergeTokensRequest,
+ mergeTokensConfirm MergeTokensConfirm,
+ purgeTokensIndication PurgeTokensIndication,
+ disconnectProviderUltimatum DisconnectProviderUltimatum,
+ rejectMCSPDUUltimatum RejectMCSPDUUltimatum,
+ attachUserRequest AttachUserRequest,
+ attachUserConfirm AttachUserConfirm,
+ detachUserRequest DetachUserRequest,
+ detachUserIndication DetachUserIndication,
+ channelJoinRequest ChannelJoinRequest,
+ channelJoinConfirm ChannelJoinConfirm,
+ channelLeaveRequest ChannelLeaveRequest,
+ channelConveneRequest ChannelConveneRequest,
+ channelConveneConfirm ChannelConveneConfirm,
+ channelDisbandRequest ChannelDisbandRequest,
+ channelDisbandIndication ChannelDisbandIndication,
+ channelAdmitRequest ChannelAdmitRequest,
+ channelAdmitIndication ChannelAdmitIndication,
+ channelExpelRequest ChannelExpelRequest,
+ channelExpelIndication ChannelExpelIndication,
+ sendDataRequest SendDataRequest,
+ sendDataIndication SendDataIndication,
+ uniformSendDataRequest UniformSendDataRequest,
+ uniformSendDataIndication UniformSendDataIndication,
+ tokenGrabRequest TokenGrabRequest,
+ tokenGrabConfirm TokenGrabConfirm,
+ tokenInhibitRequest TokenInhibitRequest,
+ tokenInhibitConfirm TokenInhibitConfirm,
+ tokenGiveRequest TokenGiveRequest,
+ tokenGiveIndication TokenGiveIndication,
+ tokenGiveResponse TokenGiveResponse,
+ tokenGiveConfirm TokenGiveConfirm,
+ tokenPleaseRequest TokenPleaseRequest,
+ tokenPleaseIndication TokenPleaseIndication,
+ tokenReleaseRequest TokenReleaseRequest,
+ tokenReleaseConfirm TokenReleaseConfirm,
+ tokenTestRequest TokenTestRequest,
+ tokenTestConfirm TokenTestConfirm
+}
+
+END
+
+-- Generated by Asnp, the ASN.1 pretty-printer of France Telecom R&D
+
diff --git a/asn1/t125/Makefile.am b/asn1/t125/Makefile.am
new file mode 100644
index 0000000000..462af31e88
--- /dev/null
+++ b/asn1/t125/Makefile.am
@@ -0,0 +1,26 @@
+# $Id$
+#
+#
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 1998 Gerald Combs
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+
+include ../Makefile.preinc
+include Makefile.common
+include ../Makefile.inc
+
diff --git a/asn1/t125/Makefile.common b/asn1/t125/Makefile.common
new file mode 100644
index 0000000000..f9fd7b52ff
--- /dev/null
+++ b/asn1/t125/Makefile.common
@@ -0,0 +1,49 @@
+# $Id$
+#
+#
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 1998 Gerald Combs
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+
+PROTOCOL_NAME=t125
+
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c \
+ packet-$(PROTOCOL_NAME).h
+
+NEED_PACKET_PROTO_H = 1
+
+EXT_ASN_FILE_LIST =
+
+ASN_FILE_LIST = MCS-PROTOCOL.asn
+
+# The packet-$(PROTOCOL_NAME)-template.h and $(PROTOCOL_NAME).asn
+# files do not exist # for all protocols: Please add/remove as required.
+EXTRA_DIST = \
+ $(ASN_FILE_LIST) \
+ packet-$(PROTOCOL_NAME)-template.c \
+ packet-$(PROTOCOL_NAME)-template.h \
+ $(PROTOCOL_NAME).cnf
+
+SRC_FILES = \
+ $(EXTRA_DIST) \
+ $(EXT_ASN_FILE_LIST)
+
+A2W_FLAGS= -b
+
+EXTRA_CNF=
+
diff --git a/asn1/t125/Makefile.nmake b/asn1/t125/Makefile.nmake
new file mode 100644
index 0000000000..5a32997c60
--- /dev/null
+++ b/asn1/t125/Makefile.nmake
@@ -0,0 +1,29 @@
+## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
+#
+# $Id$
+#
+#
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 1998 Gerald Combs
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+
+include ../../config.nmake
+include ../Makefile.preinc.nmake
+include Makefile.common
+include ../Makefile.inc.nmake
+
diff --git a/asn1/t125/packet-t125-template.c b/asn1/t125/packet-t125-template.c
new file mode 100644
index 0000000000..04106c447d
--- /dev/null
+++ b/asn1/t125/packet-t125-template.c
@@ -0,0 +1,115 @@
+/* packet-t125.c
+ * Routines for t125 packet dissection
+ * Copyright 2007, Ronnie Sahlberg
+ *
+ * $Id$
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * To quote the author of the previous H245 dissector:
+ * "This is a complete replacement of the previous limitied dissector
+ * that Ronnie was crazy enough to write by hand. It was a lot of time
+ * to hack it by hand, but it is incomplete and buggy and it is good when
+ * it will go away."
+ * Ronnie did a great job and all the VoIP users had made good use of it!
+ * Credit to Tomas Kukosa for developing the asn2wrs compiler.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <glib.h>
+#include <epan/packet.h>
+#include <epan/conversation.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include <epan/prefs.h>
+#include <epan/emem.h>
+#include <epan/asn1.h>
+#include "packet-ber.h"
+
+#define PNAME "MULTIPOINT-COMMUNICATION-SERVICE T.125"
+#define PSNAME "T.125"
+#define PFNAME "t125"
+
+
+/* Initialize the protocol and registered fields */
+int proto_t125 = -1;
+#include "packet-t125-hf.c"
+
+/* Initialize the subtree pointers */
+static int ett_t125 = -1;
+#include "packet-t125-ett.c"
+
+#include "packet-t125-fn.c"
+
+static int
+dissect_t125(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
+{
+ proto_item *item = NULL;
+ proto_tree *tree = NULL;
+
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)){
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "T.125");
+ }
+ if (check_col(pinfo->cinfo, COL_INFO)){
+ col_clear(pinfo->cinfo, COL_INFO);
+ }
+
+ item = proto_tree_add_item(parent_tree, proto_t125, tvb, 0, tvb_length(tvb), FALSE);
+ tree = proto_item_add_subtree(item, ett_t125);
+
+
+ dissect_ConnectMCSPDU_PDU(tvb, pinfo, tree);
+
+ return tvb_length(tvb);
+}
+
+
+/*--- proto_register_t125 -------------------------------------------*/
+void proto_register_t125(void) {
+
+ /* List of fields */
+ static hf_register_info hf[] = {
+#include "packet-t125-hfarr.c"
+ };
+
+ /* List of subtrees */
+ static gint *ett[] = {
+ &ett_t125,
+#include "packet-t125-ettarr.c"
+ };
+
+ /* Register protocol */
+ proto_t125 = proto_register_protocol(PNAME, PSNAME, PFNAME);
+ /* Register fields and subtrees */
+ proto_register_field_array(proto_t125, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+
+ new_register_dissector("t125", dissect_t125, proto_t125);
+}
+
+
+/*--- proto_reg_handoff_t125 ---------------------------------------*/
+void proto_reg_handoff_t125(void) {
+}
diff --git a/asn1/t125/packet-t125-template.h b/asn1/t125/packet-t125-template.h
new file mode 100644
index 0000000000..d93f11f900
--- /dev/null
+++ b/asn1/t125/packet-t125-template.h
@@ -0,0 +1,38 @@
+/* packet-t125.h
+ * Routines for t125 packet dissection
+ * Copyright 2007, Ronnie Sahlberg
+ *
+ * $Id$
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef PACKET_T125_H
+#define PACKET_T125_H
+
+#include <epan/packet_info.h>
+#include <epan/dissectors/packet-per.h>
+
+
+#include "packet-t125-exp.h"
+
+
+#endif /* PACKET_T125_H */
+
+
diff --git a/asn1/t125/t125.cnf b/asn1/t125/t125.cnf
new file mode 100644
index 0000000000..1adccdeff7
--- /dev/null
+++ b/asn1/t125/t125.cnf
@@ -0,0 +1,42 @@
+# T.125/MCS-PROTOCOL.cnf
+# Copyright 2007 Ronnie Sahlberg
+# $Id$
+#----------------------------------------------------------------------------------------
+#.EXPORTS
+#----------------------------------------------------------------------------------------
+#.END
+
+#.PDU
+#----------------------------------------------------------------------------------------
+
+#.PDU_NEW
+#----------------------------------------------------------------------------------------
+ConnectMCSPDU
+DomainMCSPDU
+#.END
+
+#.VIRTUAL_ASSGN
+#----------------------------------------------------------------------------------------
+
+#.FN_BODY ConnectMCSPDU VAL_PTR = &connectmcs_value
+ guint32 connectmcs_value;
+
+%(DEFAULT_BODY)s
+ if (check_col(%(ACTX)s->pinfo->cinfo, COL_INFO)){
+ col_add_fstr(%(ACTX)s->pinfo->cinfo, COL_INFO, "MCS: %%s ",
+ val_to_str(connectmcs_value, t125_ConnectMCSPDU_vals, "<unknown>"));
+ }
+#.END
+
+#.FN_BODY DomainMCSPDU VAL_PTR = &domainmcs_value
+ guint32 domainmcs_value;
+
+%(DEFAULT_BODY)s
+ if (check_col(%(ACTX)s->pinfo->cinfo, COL_INFO)){
+ col_add_fstr(%(ACTX)s->pinfo->cinfo, COL_INFO, "MCS: %%s ",
+ val_to_str(domainmcs_value, t125_DomainMCSPDU_vals, "<unknown>"));
+ }
+#.END
+
+#----------------------------------------------------------------------------------------
+# vim:set ts=4 sts=2 sw=2: