Ethereal-dev: Re: [ethereal-dev] dissector port range register

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

From: Frank Singleton <frank.singleton@xxxxxxxxxxxx>
Date: Fri, 15 Sep 2000 11:28:42 -0500
Gilbert Ramirez wrote:
> 
> On Fri, Sep 15, 2000 at 08:19:43AM -0500, Frank Singleton wrote:
> > Hi,
> >
> > Ok, now I have some dissectors that instead
> > of using a few "well known" port numbers,
> > are actually want to register for a range
> > instead.
> >
> > eg: 10100 - 10120  protocol xyz
> >
> > Does there exist a way to register a range via
> > dissector_add(); instead of explicitly doing
> > a dissector_add() for each port.
> 
> No, not yet. One way would be to add a function which
> registered many ports for you, given a range:
> 
> dissect_add_range(...., guint32 min, guint32 max)
> 
> Another way would be to have the dissector tables maintain
> not only a hash of port numbers, but also a list of port ranges
> 
> struct port_range {
>         guint32 min;
>         guint32 max;
> }
> 
> I imagine that the first idea might not be so bad, performance-wise.
> 
> --gilbert

Yeah, that was my thinking also. A port range struct
would be cool. Anyway, I'll just spin in a loop
of dissector_add for now.

Thanks / Frank..

-- 
EUS/SV/Z Frank Singleton      ASO Americas BSS
Office : +1 972 583 3251      ECN 800 33251  
Pager  : +1 800 651 1184      Email : eusfrsi@xxxxxxxxxxxxxxx 
Amateur Radio: VK3FCS/KM5WS   Email : frank.singleton@xxxxxxxxxxxx

Hardware: HP Omnibook 4150 running Redhat Linux 6.2 (2.2.16 kernel).