From: "Ulf Lamping" Subject: Re: Re: [Ethereal-dev] usability extensions: 2nd "recent" patch
[snip] > > * I would really like disdplay filters to be stored each in their own file, > > one filter > > per file. This would make it MUCH easier to transfer filters to other users. > > It would allow a central repository of useful filters, something we could > > have on the webpage: an annotated list of useful displayfilters? > > What to do with people already having a milion filters in the current > > single-file for all filters implementation? Perhaps just a warning if the > > single-file thing is detected with pointers to a shellscript or something > > that could convert it to one-file-per-filter? > > I am totally for this change. > > Well, in the ideal world, this should have nothing to do with the GUI implementation ;-) > I think, this would also apply to the other filters as well (capture and color). > > As we do a lot of conversions from old style things already in the code, I don't think we need a shellscript to change this, but could implement it "in code". Hm. I dont agree. By implementing it in code we get lots of new code to maintain in ethereal, code that will remain forever and ever and will need maintenance everytime we change something. It is much simpler, less code and less maintenance just to check if the old file exists and then just pop up a warning like "Old style of filter database detected. Current ethereal can not use old style database. Please see xxx.txt for instructions on how to convert it to the current format." Powerusers using filters would only need to do this conversion themself ONCE. Or if they think its not really worth it, they just delete the old file and starts building new filters from scratch. > Example: It would be hard to add a user comment to a display filter (which I think, could be useful) to the current file format. > This also could be easily invented, if we put the filters in separate files. The current format has many flaws. A new format could be : * All filters stored in .../dfilter/ * Each filter stored in its own file and the filename is the name of the filter, thus the filter "NFS_ALL" would be stored in .../dfilter/NFS_ALL * The first line in the filter is the actual filter string, e.g. "nfs" * All remaining lines in the file are treated as comments This would allow users a very simple way to trade filters with eachothers, just copy a file. Several people have asked me about this since they really want this . Allowing arbitrary comments in teh file would be an extra bonus with something describing what the filter does. A teacher can then use these files and email them to the student, and the student install them by just copying the file to the proper directory. It would allow someone to set up a simple filterdatabase where people could download just the filters they want and install them.