Ethereal-dev: [Ethereal-dev] packet-tns.c

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

Date: Fri, 24 Sep 2004 19:09:29 +0100
Here's a code portion of the packet-tns.c :

static void dissect_tns_data(tvbuff_t *tvb, int offset, packet_info *pinfo,
	proto_tree *tree, proto_tree *tns_tree)
{
        ......

if ( tvb_bytes_exist(tvb, offset+2, 4) )
	{
		if ( tvb_get_guint8(tvb, offset+2) == 0xDE &&
		     tvb_get_guint8(tvb, offset+3) == 0xAD &&
		     tvb_get_guint8(tvb, offset+4) == 0xBE &&
		     tvb_get_guint8(tvb, offset+5) == 0xEF )

....
}

I know that the tvb_get_guint8 return a byte from the tvbuffer, but I can't understand the meaning of the hexadecimal numbers.  It's something like a pattern or what?

I would like to develop dissectors to new protocols, and I have no clue in how to get the right quantify of bytes from the tvbuffer.

any help?
thnks

________________________________________________________________________________
A sua Internet tem tudo o que precisa?
IOL. Tem tudo para ser mais simples
Saiba como instalar: http://www.iol.pt/correio/rodape.php?dst=1409041