Ethereal-dev: [ethereal-dev] FT_STRINGZ

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

From: Gilbert Ramirez <gram@xxxxxxxxxx>
Date: Tue, 29 Aug 2000 22:57:38 -0400
I commited the code for the new FT_STRINGZ type. That leaves FT_STRING as a fixed-length
string... I think it might make sense to rename that to FT_STRING_FW or something.

I'll make proto_tree_add_string*() into proto_tree_add_stringz*(), because
adding a C string via that API (instead of having proto_tree_add_item() pull the string
from the tvbuff) is more like adding an FT_STRINGZ rather than an FT_STRING.

Here's a small capture file showing an FT_STRINGZ. Filter on "ncp.object_name1"...
it's the field called "Object Name". This is a sample of a "padded" FT_STRINGZ; that
leads me to think I either need to change the string API a bit, or split FT_STRINGZ into
two types:

FT_STRINGZ_PADDED	for strings that are NUL-padded to fill a fixed-length buffer
FT_STRINGZ_VAR		for strings that terminate at the NUL, wherever it lies.

Thoughts?

--gilbert