Ethereal-dev: RE: [Ethereal-dev] NFS filenames

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

From: Jeff Foster <jfoste@xxxxxxxxxxxx>
Date: Thu, 25 Jan 2001 08:07:12 -0600
From: Ronnie Sahlberg [mailto:rsahlber@xxxxxxxxxxxxxx]
Sent: Thursday, January 25, 2001 5:30 AM

> I thought of adding a small feature to ethereal, thoug it would impact
> performance...

> I was thinking something along the line of adding code to packet-nfs.c to
> scan for
> special packets where one can determine the mapping between filehandles
and
> filenames,
> say LOOKUP and similar packets.
> The code could then build a dynamic linked list holding all these
mappings.
>
> When later dissecting other NFS or related packets (NLM) which only
contain
> an NFS
>filehandle, one could add code which would print the filename that handle
> corresponds to.

This fits into some ideas I have had concerning name resolution in ethereal.
I would like to see a name system along the lines of the Preferences system.
It would allow dissectors to register a naming system with the common code
that allows users to view/edit the names.  Underlying this would be some 
common code to support name lookup, modifying names, and adding new name
mappings.  The system would also allow users to turn name resolution on and
off. And of course users can save/load name mappings from config files.

I envision that the names entries would have a source information field that
would describe the source of the name mapping:

1) static - entered by user or from config file
2) dynamic - extracted from capture
3) resolved - found with external lookup, i.e. DNS
4) file - stored in the capture file, when this is available.

The user would be able to set preferences as to which source is preferable,
so that a static or dynamic name would be used depending upon what the user
wants.  

I agree with Ronnie Sahlberg comments about using either a hash or balanced 
tree for the tables; Gtk supports both of these. You can find examples of
hash tree in the conversation.c code and balanced tree in the packet-x11.c 
code.


Jeff Foster
jfoste@xxxxxxxxxxxx