From: Ulf Lamping
| Guy Harris wrote:
|
| >On Sat, Feb 14, 2004 at 10:44:24AM +0100, Ulf Lamping wrote:
| >
| >>I might be an idea to sort this by protocol layer,
| >
| >Where do you propose to do the sorting?
| >
| >Note that menu items for taps aren't set up from a list in menu.c -
the
| >menu items are added by the tap's register routine.
| >"register_tap_menu_item()" would either have to figure out from the
menu
| >path where to put the items, or would have to be told where to put
them
| >by the taps.
| >
| I would think, that the tap should additionally have to tell this
| function into which layer it should be placed:
|
| 0 - TAP_LAYER_GENERIC
| 1 - TAP_LAYER_PHYSICAL (shouldn't happen with ethereal?)
| 2 - TAP_LAYER_LINK
| 3 - TAP_LAYER_NETWORK
| 4 - TAP_LAYER_TRANSPORT
| 5 - TAP_LAYER_SESSION
| 6 - TAP_LAYER_PRESENTATION
| 7 - TAP_LAYER_APPLICATION
|
| this would be an additional parameter for the
register_tap_menu_item()
| function. If a protocol handles more than one layer,
| it should be registered at the lowest layer. This is especially true
for
| the layers 5 to 7.
Please note that depending on the Ethereal use(r), the application
layer will be another one. For instance, a person tapping into a
mobile switch may have up to 12 protocols stacked on top of each
other, sometimes even more. However a GPRS capture's *application*
layer is the IP layer transported in an opaque manner (including
anything running on top of this IP), while the whole IP and up stack
starts at the *network* layer to people interested in the end-user
data.
There is no such "the" application layer (or any OSI layer name),
unless you define the *scope* of your protocol stack. Defining the
scope may be worthwile doing, though. One might want to run Ethereal
in "IP LAN" mode and then have the menu items sorted in a specific
way, and maybe have some protocols automatically disabled. Similarly
one may run Ethereal in "mobile telco" mode etc. Maybe we then can
define other values for the default preferences per scope?
| The alphabetical order should be done be the register function, by
| looking at the existing menuitems I would think (but didn't had a
look at).
| The tap shouldn't have to know which other taps are available.
|
| In general: I think it's more of a question *if* it's a good idea
worth
| to be implemented.
|
| How this should be implemented can be thought about, when the next
| release is out.
Regards,
Olivier