Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: [Ethereal-dev] Which characters can i compare using ' tvb_get_guint8'

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Anders Broman (TN/EAB)" <anders.broman@xxxxxxxxxxxx>
Date: Thu, 31 Jul 2003 16:18:16 +0200
Hi,
Shold'nt the following coding work?

	guint8		tempchar;

	tempchar = tvb_get_guint8(tvb, tvb_previous_offset );
	
	switch ( tempchar ){
		/* domainAddress */
		case '[':
			tvb_current_offset = tvb_find_guint8(tvb, tvb_previous_offset, tvb_len, ']');

I don't get a match eventhoug I'm prety certain that tempchar holds '['
How should I do this instead ?

Best regards
Anders