Attachment 'ethereal-0.10.13-ewsd.diff'

Download

   1 diff -ruN ethereal-0.10.13/epan/dissectors/Makefile.common ethereal-0.10.13-2/epan/dissectors/Makefile.common
   2 --- ethereal-0.10.13/epan/dissectors/Makefile.common	2005-10-10 15:23:00.000000000 +0200
   3 +++ ethereal-0.10.13-2/epan/dissectors/Makefile.common	2006-02-05 15:49:51.000000000 +0100
   4 @@ -270,6 +270,7 @@
   5  	packet-etheric.c	\
   6  	packet-etherip.c	\
   7  	packet-ethertype.c	\
   8 +	packet-ewsd.c	\
   9  	packet-extreme.c	\
  10  	packet-fc.c	\
  11  	packet-fcct.c	\
  12 diff -ruN ethereal-0.10.13/epan/dissectors/Makefile.in ethereal-0.10.13-2/epan/dissectors/Makefile.in
  13 --- ethereal-0.10.13/epan/dissectors/Makefile.in	2005-10-19 17:48:39.000000000 +0200
  14 +++ ethereal-0.10.13-2/epan/dissectors/Makefile.in	2006-02-05 15:53:10.000000000 +0100
  15 @@ -184,7 +184,7 @@
  16  	packet-eapol.lo packet-echo.lo packet-edonkey.lo \
  17  	packet-eigrp.lo packet-enc.lo packet-enip.lo packet-enrp.lo \
  18  	packet-esis.lo packet-ess.lo packet-eth.lo packet-etheric.lo \
  19 -	packet-etherip.lo packet-ethertype.lo packet-extreme.lo \
  20 +	packet-etherip.lo packet-ethertype.lo packet-ewsd.lo packet-extreme.lo \
  21  	packet-fc.lo packet-fcct.lo packet-fcdns.lo packet-fcels.lo \
  22  	packet-fcfcs.lo packet-fcfzs.lo packet-fcip.lo \
  23  	packet-fclctl.lo packet-fcp.lo packet-fcsb3.lo packet-fcsp.lo \
  24 @@ -783,6 +783,7 @@
  25  	packet-etheric.c	\
  26  	packet-etherip.c	\
  27  	packet-ethertype.c	\
  28 +	packet-ewsd.c	\
  29  	packet-extreme.c	\
  30  	packet-fc.c	\
  31  	packet-fcct.c	\
  32 @@ -1728,6 +1729,7 @@
  33  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packet-etheric.Plo@am__quote@
  34  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packet-etherip.Plo@am__quote@
  35  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packet-ethertype.Plo@am__quote@
  36 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packet-ewsd.Plo@am__quote@
  37  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packet-extreme.Plo@am__quote@
  38  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packet-fc.Plo@am__quote@
  39  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packet-fcct.Plo@am__quote@
  40 diff -ruN ethereal-0.10.13/epan/dissectors/packet-ewsd.c ethereal-0.10.13-2/epan/dissectors/packet-ewsd.c
  41 --- ethereal-0.10.13/epan/dissectors/packet-ewsd.c	1970-01-01 01:00:00.000000000 +0100
  42 +++ ethereal-0.10.13-2/epan/dissectors/packet-ewsd.c	2006-02-05 15:46:43.000000000 +0100
  43 @@ -0,0 +1,306 @@
  44 +/* packet-ewsd.c
  45 + *
  46 + * Radek Podgorny <radek@podgorny.cz>
  47 + *
  48 + * This program is free software; you can redistribute it and/or
  49 + * modify it under the terms of the GNU General Public License
  50 + * as published by the Free Software Foundation; either version 2
  51 + * of the License, or (at your option) any later version.
  52 + *
  53 + * This program is distributed in the hope that it will be useful,
  54 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  55 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  56 + * GNU General Public License for more details.
  57 + *
  58 + * You should have received a copy of the GNU General Public License
  59 + * along with this program; if not, write to the Free Software
  60 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  61 + */
  62 +
  63 + 
  64 +#ifdef HAVE_CONFIG_H
  65 +	#include "config.h"
  66 +#endif
  67 +
  68 +#include <stdio.h>
  69 +#include <string.h>
  70 +#include <glib.h>
  71 +#include <epan/packet.h>
  72 +
  73 +
  74 +#define FAMILY_COMMAND 0xf1
  75 +#define FAMILY_ANSWER 0xf2
  76 +
  77 +
  78 +static int proto_ewsd = -1;
  79 +
  80 +static guint8 hf_ewsd_family = -1;
  81 +static guint8 hf_ewsd_dir = -1;
  82 +static guint8 hf_ewsd_pltype = -1;
  83 +static guint16 hf_ewsd_connid = -1;
  84 +static guint8 hf_ewsd_subseq = -1;
  85 +//static gint hf_ewsd_shit = -1;
  86 +
  87 +static gint ett_ewsd = -1;
  88 +static gint ett_ewsd_preamble = -1;
  89 +static gint ett_ewsd_ewsd = -1;
  90 +
  91 +
  92 +guint8 idmatch(guint8 *info, guint8 *mask) {
  93 +	int info_len = strlen(info);
  94 +	int mask_len = strlen(mask);
  95 +
  96 +	if (info_len != mask_len) return 0;
  97 +
  98 +	int i = 0;
  99 +	for (i = 0; i < mask_len; i++) {
 100 +		if (mask[i] == 'x') continue;
 101 +		if (mask[i] != info[i]) return 0;
 102 +	}
 103 +
 104 +	return 1;
 105 +}
 106 +
 107 +/* idinfo is used as we recurse deeper (we need to keep track of upper level ids) */
 108 +guint16 dis_ewsd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 *levelinfo) {
 109 +	guint8 id;
 110 +	guint16 len;
 111 +
 112 +	tvbuff_t *subtvb;
 113 +
 114 +	guint16 pos;
 115 +
 116 +	id = tvb_get_guint8(tvb, 0);
 117 +	len = tvb_get_ntohs(tvb, 1);
 118 +
 119 +	// Broken when enabled?
 120 +	//tvb_set_reported_length(tvb, len+3);
 121 +
 122 +	guint8 mylevel[100];
 123 +	strcpy(mylevel, levelinfo);
 124 +	int i = strlen(mylevel);
 125 +	mylevel[i] = id + '0';
 126 +	mylevel[i+1] = 0;
 127 +
 128 +	if (idmatch(mylevel, "x")
 129 +	|| (idmatch(mylevel, "x3") && hf_ewsd_dir == 0x0c && hf_ewsd_pltype == 1)
 130 +	|| idmatch(mylevel, "x4")
 131 +	|| (idmatch(mylevel, "x43") && hf_ewsd_dir == 4 && hf_ewsd_pltype == 0)
 132 +	|| (idmatch(mylevel, "x432") && hf_ewsd_dir == 4 && hf_ewsd_pltype == 0)
 133 +	|| (idmatch(mylevel, "x5") && hf_ewsd_dir == 2 && hf_ewsd_pltype == 0)
 134 +	|| (idmatch(mylevel, "x5") && hf_ewsd_dir == 0x0e && hf_ewsd_pltype == 0)
 135 +	|| idmatch(mylevel, "x6")
 136 +	|| idmatch(mylevel, "x8")) {
 137 +		proto_item *ti = proto_tree_add_text(tree, tvb, 0, len+3, "ewsd %d (len: %d) (mylevel: %s)", id, len, mylevel);
 138 +		proto_tree *subtree = proto_item_add_subtree(ti, ett_ewsd_preamble);
 139 +
 140 +		pos = 3;
 141 +		while (pos < len+3) {
 142 +			subtvb = tvb_new_subset(tvb, pos, -1, -1);
 143 +			guint16 len = dis_ewsd(subtvb, pinfo, subtree, mylevel);
 144 +			pos += len;
 145 +		}
 146 +	} else if (idmatch(mylevel, "x2")) {
 147 +		guint8 *unk1 = tvb_bytes_to_str_punct(tvb, 3, 2, '.');
 148 +		guint16 jobnr = tvb_get_ntohs(tvb, 5);
 149 +		guint8 *unk2 = tvb_bytes_to_str_punct(tvb, 7, len-4, '.');
 150 +		proto_tree_add_text(tree, tvb, 3, 2, "!!!unknown!!! (mylevel: %s) - %s", mylevel, unk1);
 151 +		proto_tree_add_text(tree, tvb, 5, 2, "Job number: %d", jobnr);
 152 +		proto_tree_add_text(tree, tvb, 7, len-4, "!!!unknown!!! (mylevel: %s) - %s", mylevel, unk2);
 153 +/* */		if (check_col(pinfo->cinfo, COL_INFO)) col_append_fstr(pinfo->cinfo, COL_INFO, " (x2-unk2: %s)", unk2);
 154 +	} else if (idmatch(mylevel, "x31")) {
 155 +		guint8 *exname = tvb_get_ephemeral_string(tvb, 3, len);
 156 +		proto_tree_add_text(tree, tvb, 3, len, "Exchange name: %s", exname);
 157 +	} else if (idmatch(mylevel, "x32")) {
 158 +		guint8 *apsver = tvb_get_ephemeral_string(tvb, 3, len);
 159 +		proto_tree_add_text(tree, tvb, 3, len, "APS version: %s", apsver);
 160 +	} else if (idmatch(mylevel, "x33")) {
 161 +		guint8 *patchver = tvb_get_ephemeral_string(tvb, 3, len);
 162 +		proto_tree_add_text(tree, tvb, 3, len, "Patch version: %s", patchver);
 163 +	} else if (idmatch(mylevel, "x35")) {
 164 +		guint8 *username = tvb_get_ephemeral_string(tvb, 3, len);
 165 +		proto_tree_add_text(tree, tvb, 3, len, "Username: %s", username);
 166 +	} else if (idmatch(mylevel, "x41") && hf_ewsd_dir == 4 && hf_ewsd_pltype == 0) {
 167 +		guint8 *termname = tvb_get_ephemeral_string(tvb, 3, len);
 168 +		proto_tree_add_text(tree, tvb, 3, len, "Terminal name: %s", termname);
 169 +	} else if (idmatch(mylevel, "x41")) {
 170 +		guint8 *exname = tvb_get_ephemeral_string(tvb, 3, len);
 171 +		proto_tree_add_text(tree, tvb, 3, len, "Exchange name: %s", exname);
 172 +	} else if (idmatch(mylevel, "x42")) {
 173 +		guint8 *apsver = tvb_get_ephemeral_string(tvb, 3, len);
 174 +		proto_tree_add_text(tree, tvb, 3, len, "APS version: %s", apsver);
 175 +	} else if (idmatch(mylevel, "x43")) {
 176 +		guint8 *patchver = tvb_get_ephemeral_string(tvb, 3, len);
 177 +		proto_tree_add_text(tree, tvb, 3, len, "Patch version: %s", patchver);
 178 +	} else if (idmatch(mylevel, "x4322")) {
 179 +		guint8 *username = tvb_get_ephemeral_string(tvb, 3, len);
 180 +		proto_tree_add_text(tree, tvb, 3, len, "Username: %s", username);
 181 +	} else if (idmatch(mylevel, "x4323")) {
 182 +		guint8 *date = tvb_get_ephemeral_string(tvb, 3, 6);
 183 +		guint8 *time = tvb_get_ephemeral_string(tvb, 9, 6);
 184 +		guint8 *unk = tvb_bytes_to_str_punct(tvb, 15, len-12, '.');
 185 +		proto_tree_add_text(tree, tvb, 3, 6, "Date: %s", date);
 186 +		proto_tree_add_text(tree, tvb, 9, 6, "Time: %s", time);
 187 +		proto_tree_add_text(tree, tvb, 15, len-12, "!!!unknown!!! (mylevel: %s) - %s", mylevel, unk);
 188 +	} else if (idmatch(mylevel, "x44")) {
 189 +		guint8 *termname = tvb_get_ephemeral_string(tvb, 3, len);
 190 +		proto_tree_add_text(tree, tvb, 3, len, "Terminal name: %s", termname);
 191 +	} else if (idmatch(mylevel, "x45")) {
 192 +		guint8 *username = tvb_get_ephemeral_string(tvb, 3, len);
 193 +		proto_tree_add_text(tree, tvb, 3, len, "Username: %s", username);
 194 +	} else if (idmatch(mylevel, "x46")) {
 195 +		guint8 year = tvb_get_guint8(tvb, 3);
 196 +		guint8 month = tvb_get_guint8(tvb, 4);
 197 +		guint8 day = tvb_get_guint8(tvb, 5);
 198 +		proto_tree_add_text(tree, tvb, 3, len, "Date: %.2d-%.2d-%.2d", year, month, day);
 199 +	} else if (idmatch(mylevel, "x47")) {
 200 +		guint8 hour = tvb_get_guint8(tvb, 3);
 201 +		guint8 minute = tvb_get_guint8(tvb, 4);
 202 +		guint8 second = tvb_get_guint8(tvb, 5);
 203 +		proto_tree_add_text(tree, tvb, 3, len, "Time: %.2d:%.2d:%.2d", hour, minute, second);
 204 +	} else if (idmatch(mylevel, "x52") && hf_ewsd_family == FAMILY_COMMAND && hf_ewsd_dir == 2 && hf_ewsd_pltype == 0) {
 205 +		guint8 *err = tvb_get_ephemeral_string(tvb, 3, len);
 206 +		proto_tree_add_text(tree, tvb, 3, len, "Command error: %s", err);
 207 +	} else if (idmatch(mylevel, "x61") && hf_ewsd_family == FAMILY_COMMAND) {
 208 +		guint8 *command = tvb_get_ephemeral_string(tvb, 3, len);
 209 +		proto_tree_add_text(tree, tvb, 3, len, "Command: %s", command);
 210 +	} else if (idmatch(mylevel, "x7") && hf_ewsd_family == FAMILY_ANSWER) {
 211 +		// tvb_get_ephemeral_string seems to be unhappy with large lengths
 212 +		guint16 tmp = len; if (tmp > 1024) tmp = 1024;
 213 +		guint8 *ans = tvb_get_ephemeral_string(tvb, 3, tmp);
 214 +		proto_tree_add_text(tree, tvb, 3, len, "Answer: %s", ans);
 215 +	} else {
 216 +		guint8 *data = tvb_bytes_to_str_punct(tvb, 3, len, '.');
 217 +		proto_tree_add_text(tree, tvb, 3, len, "!!!unknown!!! (mylevel: %s) - %s", mylevel, data);
 218 +	}
 219 +
 220 +	return len+3;
 221 +}
 222 +
 223 +void dis_preamble(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
 224 +	proto_item *ti;
 225 +	proto_tree *subtree;
 226 +	tvbuff_t *subtvb;
 227 +
 228 +	hf_ewsd_family = tvb_get_guint8(tvb, 0);
 229 +
 230 +	if (hf_ewsd_family != FAMILY_COMMAND
 231 +	&& hf_ewsd_family != FAMILY_ANSWER) {
 232 +		if (check_col(pinfo->cinfo, COL_INFO)) col_add_str(pinfo->cinfo, COL_INFO, "Something weird!!!");
 233 +		return;
 234 +	}
 235 +
 236 +	guint8 unk1 = tvb_get_guint8(tvb, 1);
 237 +	hf_ewsd_dir = tvb_get_guint8(tvb, 2);
 238 +	hf_ewsd_pltype = tvb_get_guint8(tvb, 3);
 239 +	hf_ewsd_connid = tvb_get_ntohs(tvb, 4);
 240 +	hf_ewsd_subseq = tvb_get_guint8(tvb, 6);
 241 +	guint8 unk2 = tvb_get_guint8(tvb, 7);
 242 +	guint16 unk3 = tvb_get_ntohs(tvb, 8);
 243 +	guint8 tail = tvb_get_guint8(tvb, 10);
 244 +
 245 +	ti = proto_tree_add_text(tree, tvb, 0, 11,
 246 +		"preamble (family?: %#.2x) (dir?: %#.2x) (pltype?: %#.2x) (connid?: %#.4x) (subseq?: %d) (unk3?: %#.4x) (tail?: %#.2x)",
 247 +		hf_ewsd_family, hf_ewsd_dir, hf_ewsd_pltype, hf_ewsd_connid, hf_ewsd_subseq, unk3, tail);
 248 +
 249 +	subtree = proto_item_add_subtree(ti, ett_ewsd_preamble);
 250 +	proto_tree_add_text(subtree, tvb, 0, 1, "family: %#.2x", hf_ewsd_family);
 251 +	proto_tree_add_text(subtree, tvb, 1, 1, "unk1: %#.2x", unk1);
 252 +	proto_tree_add_text(subtree, tvb, 2, 1, "dir: %#.2x", hf_ewsd_dir);
 253 +	proto_tree_add_text(subtree, tvb, 3, 1, "payload type: %#.2x", hf_ewsd_pltype);
 254 +	proto_tree_add_text(subtree, tvb, 4, 2, "cennection id: %#.4x", hf_ewsd_connid);
 255 +	proto_tree_add_text(subtree, tvb, 6, 1, "subseq: %d", hf_ewsd_subseq);
 256 +	proto_tree_add_text(subtree, tvb, 7, 1, "unk2: %#.2x", unk2);
 257 +	proto_tree_add_text(subtree, tvb, 8, 2, "unk3: %#.4x", unk3);
 258 +	proto_tree_add_text(subtree, tvb, 10, 1, "tail: %#.2x", tail);
 259 +
 260 +
 261 +	if (hf_ewsd_dir == 1 && hf_ewsd_pltype == 2) {
 262 +		if (check_col(pinfo->cinfo, COL_INFO)) col_add_str(pinfo->cinfo, COL_INFO, "Something!!!");
 263 +		subtvb = tvb_new_subset(tvb, 11, -1, -1);
 264 +		dis_ewsd(subtvb, pinfo, tree, "");
 265 +	} else if (hf_ewsd_dir == 2 && hf_ewsd_subseq > 1) {
 266 +		if (check_col(pinfo->cinfo, COL_INFO)) col_add_str(pinfo->cinfo, COL_INFO, "Continued answer");
 267 +		// tvb_get_ephemeral_string seems to be unhappy with large lengths
 268 +		guint16 tmp = tvb_length_remaining(tvb, 11);// if (tmp > 1024) tmp = 1024;
 269 +		guint8 *ans = tvb_get_ephemeral_string(tvb, 11, tmp);
 270 +		proto_tree_add_text(tree, tvb, 11, -1, "Continued answer: %s", ans);
 271 +	} else if (hf_ewsd_dir == 2 && hf_ewsd_pltype == 0) {
 272 +		if (check_col(pinfo->cinfo, COL_INFO)) col_add_str(pinfo->cinfo, COL_INFO, "Command");
 273 +		subtvb = tvb_new_subset(tvb, 11, -1, -1);
 274 +		dis_ewsd(subtvb, pinfo, tree, "");
 275 +	} else if (hf_ewsd_dir == 2 && hf_ewsd_pltype == 1 && hf_ewsd_subseq <= 1) {
 276 +		if (check_col(pinfo->cinfo, COL_INFO)) col_add_str(pinfo->cinfo, COL_INFO, "Long answer");
 277 +		subtvb = tvb_new_subset(tvb, 11, -1, -1);
 278 +		dis_ewsd(subtvb, pinfo, tree, "");
 279 +	} else if (hf_ewsd_dir == 2 && hf_ewsd_pltype == 2) {
 280 +		if (check_col(pinfo->cinfo, COL_INFO)) col_add_str(pinfo->cinfo, COL_INFO, "Short answer");
 281 +		subtvb = tvb_new_subset(tvb, 11, -1, -1);
 282 +		dis_ewsd(subtvb, pinfo, tree, "");
 283 +	} else if (hf_ewsd_dir == 3 && hf_ewsd_pltype == 1) {
 284 +		if (check_col(pinfo->cinfo, COL_INFO)) col_add_str(pinfo->cinfo, COL_INFO, "Command confirmation");
 285 +		subtvb = tvb_new_subset(tvb, 11, -1, -1);
 286 +		dis_ewsd(subtvb, pinfo, tree, "");
 287 +	} else if (hf_ewsd_dir == 4 && hf_ewsd_pltype == 0) {
 288 +		if (check_col(pinfo->cinfo, COL_INFO)) col_add_str(pinfo->cinfo, COL_INFO, "Login attempt ?");
 289 +		subtvb = tvb_new_subset(tvb, 11, -1, -1);
 290 +		dis_ewsd(subtvb, pinfo, tree, "");
 291 +	} else if (hf_ewsd_dir == 0x0c && hf_ewsd_pltype == 1) {
 292 +		if (check_col(pinfo->cinfo, COL_INFO)) col_add_str(pinfo->cinfo, COL_INFO, "Login accept ?");
 293 +		subtvb = tvb_new_subset(tvb, 11, -1, -1);
 294 +		dis_ewsd(subtvb, pinfo, tree, "");
 295 +	} else if (hf_ewsd_dir == 0x0e && hf_ewsd_pltype == 0) {
 296 +		if (check_col(pinfo->cinfo, COL_INFO)) col_add_str(pinfo->cinfo, COL_INFO, "Something!!!");
 297 +		subtvb = tvb_new_subset(tvb, 11, -1, -1);
 298 +		dis_ewsd(subtvb, pinfo, tree, "");
 299 +	} else if (hf_ewsd_dir == 3 && hf_ewsd_pltype == 6) {
 300 +		if (check_col(pinfo->cinfo, COL_INFO)) col_add_str(pinfo->cinfo, COL_INFO, "Answer confirmation, send more data");
 301 +	} else {
 302 +		if (check_col(pinfo->cinfo, COL_INFO)) col_add_str(pinfo->cinfo, COL_INFO, "!!!unknown!!!");
 303 +	}
 304 +}
 305 +
 306 +static void dissect_ewsd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
 307 +	proto_item *ti;
 308 +	proto_tree *subtree;
 309 +	tvbuff_t *subtvb;
 310 +
 311 +	if (check_col(pinfo->cinfo, COL_PROTOCOL)) col_add_str(pinfo->cinfo, COL_PROTOCOL, "EWSD");
 312 +
 313 +	if (tree) {
 314 +		ti = proto_tree_add_item(tree, proto_ewsd, tvb, 0, -1, FALSE);
 315 +		subtree = proto_item_add_subtree(ti, ett_ewsd);
 316 +
 317 +		subtvb = tvb_new_subset(tvb, 0, -1, -1);
 318 +		dis_preamble(subtvb, pinfo, subtree);
 319 +	}
 320 +}
 321 +
 322 +void proto_register_ewsd(void) {
 323 +//	static hf_register_info hf[] = {
 324 +//		{&hf_ewsd_direction, {"Direction", "ewsd.direction", FT_INT8, BASE_HEX, NULL, 0x0, "Direction", HFILL}},
 325 +//		{&hf_ewsd_data, {"Test data", "ewsd.data", FT_BYTES, BASE_HEX, NULL, 0x0, "Test data", HFILL}},
 326 +//		{&hf_ewsd_realdata, {"realdata", "ewsd.realdata", FT_BYTES, BASE_HEX, NULL, 0, "realdata", HFILL}},
 327 +//	};
 328 +
 329 +	static gint *ett[] = {
 330 +		&ett_ewsd,
 331 +		&ett_ewsd_preamble,
 332 +		&ett_ewsd_ewsd
 333 +	};
 334 +
 335 +	proto_ewsd = proto_register_protocol("Siemens EWSD", "EWSD", "ewsd");
 336 +//	proto_register_field_array(proto_ewsd, hf, array_length(hf));
 337 +	proto_register_subtree_array(ett, array_length(ett));
 338 +
 339 +	register_dissector("ewsd", dissect_ewsd, proto_ewsd);
 340 +	register_dissector_table("ewsd.ewsd", "ewsd ewsd", FT_UINT8, BASE_DEC);
 341 +}
 342 +
 343 +void proto_reg_handoff_ewsd(void) {
 344 +	dissector_handle_t ewsd_handle = NULL;
 345 +
 346 +	ewsd_handle = create_dissector_handle(dissect_ewsd, proto_ewsd);
 347 +
 348 +	dissector_add("ewsd.ewsd", 0, proto_ewsd);
 349 +}
 350 diff -ruN ethereal-0.10.13/epan/dissectors/packet-x25.c ethereal-0.10.13-2/epan/dissectors/packet-x25.c
 351 --- ethereal-0.10.13/epan/dissectors/packet-x25.c	2005-10-10 15:23:04.000000000 +0200
 352 +++ ethereal-0.10.13-2/epan/dissectors/packet-x25.c	2006-02-05 15:49:42.000000000 +0100
 353 @@ -2365,6 +2365,12 @@
 354  	return;
 355      }
 356  
 357 +	// added by Radek Podgorny
 358 +	dissector_handle_t *t = find_dissector("ewsd");
 359 +	call_dissector(t, next_tvb, pinfo, tree);
 360 +	pinfo->private_data = saved_private_data;
 361 +	return;
 362 +
 363      /* All else failed; dissect it as raw data */
 364      call_dissector(data_handle, next_tvb, pinfo, tree);
 365      pinfo->private_data = saved_private_data;
 366 diff -ruN ethereal-0.10.13/epan/dissectors/register.c ethereal-0.10.13-2/epan/dissectors/register.c
 367 --- ethereal-0.10.13/epan/dissectors/register.c	2005-10-19 18:39:15.000000000 +0200
 368 +++ ethereal-0.10.13-2/epan/dissectors/register.c	2006-02-05 15:50:02.000000000 +0100
 369 @@ -188,6 +188,7 @@
 370    {extern void proto_register_etheric (void); proto_register_etheric ();}
 371    {extern void proto_register_etherip (void); proto_register_etherip ();}
 372    {extern void proto_register_ethertype (void); proto_register_ethertype ();}
 373 +  {extern void proto_register_ewsd (void); proto_register_ewsd ();}
 374    {extern void proto_register_extreme_oui (void); proto_register_extreme_oui ();}
 375    {extern void proto_register_fc (void); proto_register_fc ();}
 376    {extern void proto_register_fcct (void); proto_register_fcct ();}
 377 @@ -786,6 +787,7 @@
 378    {extern void proto_reg_handoff_etheric (void); proto_reg_handoff_etheric ();}
 379    {extern void proto_reg_handoff_etherip (void); proto_reg_handoff_etherip ();}
 380    {extern void proto_reg_handoff_ethertype (void); proto_reg_handoff_ethertype ();}
 381 +  {extern void proto_reg_handoff_ewsd (void); proto_reg_handoff_ewsd ();}
 382    {extern void proto_reg_handoff_fc (void); proto_reg_handoff_fc ();}
 383    {extern void proto_reg_handoff_fcct (void); proto_reg_handoff_fcct ();}
 384    {extern void proto_reg_handoff_fcdns (void); proto_reg_handoff_fcdns ();}

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2006-02-06 13:44:29, 17.0 KB) [[attachment:ethereal-0.10.13-ewsd.diff]]
  • [get | view] (2006-02-06 13:44:51, 14.3 KB) [[attachment:ethereal-0.10.14-ewsd.diff]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.