On Sunday 14 December 2008 11:37:48 Stjepan Gros wrote:
> It turns out that the function plug_get_oid returns numerical values
> (in a string) for all the plugins, so maybe numerical values should be
> used consistently with symbolic names (if necessary at all) being soft
> links to numercal values.

AFAIU, the OID numerical values are the ones that count.

> >> > I propose a careful step-by-step implementation.
> >> > For example, moving the caching into a separate directory would be a
> >> > first nice step. There, it could already be realized to have a
> >> > directory strucure based on the OIDs of the NVTs.
> >>
> >> This idea is fine with me. I could split patch so that only cache is
> >> changed. This could be first iteration. What is not implemented is
> >> storing plugins according to OID and to try to implement that part
> >> would be the second iteration.
> >
> > that would be just perfect.
>
> Ok, I started to work on this but stumbled on a problem at a very
> start. :) Apart from the questions I sent in another mail (they are
> general enough and do not influence so much the cache reoganization)
> there is one bigger problem to OID organization of the plugins.
>
> Currently, the code functions in such a way that it starts with the
> name of the plugin and then searches for this name in the cache
> directory. If it's found then checks are made to determine if the
> cache is current or not followed by other processing.
>
> Now, the idea is to also start with a name but then to look it into
> the cache _by OID_. But the OID is not known until the source of the
> plugin is loaded and parsed, which beats the idea of the cache.
>
> The possible solution is to pelaod the cache, and than to start
> loading the sources. Then, the cache can be searched by the full
> pathname. There are two ways in which this can be implemented:

Wouldn't another solution option be to reorganize the caching as such
to be based on OIDs instead of names?

> What are opinions of the people on this list about this?

I am not 100% sure I understood you proposed solution options.
Preloading seems to me (at a very first glance) quite complicated.
I confess I did not dig into this code path, but wouldn't it be possible
to build the cache in a way that the key  for searching is the OID? 

> P.S. Should I update CR with this information?

Sure, CRs are living documents. You may update them whenever it
makes sense.

Best

        Jan
_______________________________________________
Openvas-devel mailing list
Openvas-devel@wald.intevation.org
http://lists.wald.intevation.org/mailman/listinfo/openvas-devel

Reply via email to