Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Ethereal: dev

proto_tree_add_bytes_format vs proto_tree_add_XXX_format?

 

 

Ethereal dev RSS feed   Index | Next | Previous | View Threaded


mra at pobox

Oct 12, 2000, 5:09 PM

Post #1 of 3 (259 views)
Permalink
proto_tree_add_bytes_format vs proto_tree_add_XXX_format?

What does, say, proto_tree_add_ipv4_format do that
proto_tree_add_bytes_format doesn't?

--
Mark Atwood |
mra [at] pobox |
http://www.pobox.com/~mra


guy at netapp

Oct 12, 2000, 5:30 PM

Post #2 of 3 (245 views)
Permalink
Re: proto_tree_add_bytes_format vs proto_tree_add_XXX_format? [In reply to]

> What does, say, proto_tree_add_ipv4_format do that
> proto_tree_add_bytes_format doesn't?

"proto_tree_add_ipv4_format()" marks the field as being an IPv4 address,
so that, for example, the packet-filtering code knows that it should be
compared with an IP address, and you can say

myproto.addr == www.sun.com

in a filter expression, rather than having to say

myproto.addr == 192:18:97:241

(assuming we currently support comparisons on "sequence of bytes"
fields).


guy at netapp

Oct 12, 2000, 5:32 PM

Post #3 of 3 (242 views)
Permalink
Re: proto_tree_add_bytes_format vs proto_tree_add_XXX_format? [In reply to]

> What does, say, proto_tree_add_ipv4_format do that
> proto_tree_add_bytes_format doesn't?

Note also that the "_format" routines are needed only if you want the
entry in the protocol dissection to look like something other than

Name: value

where "Name" is a string you specify for the field and "value" is the
value displayed in the standard format for that field type - e.g., a
host name or dotted quad for an IPv4 address.

Ethereal dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.