cve-toolkit

CVE helper toolkit
git clone git://git.finwo.net/app/cve-toolkit
Log | Files | Refs | README | LICENSE

setup.h (941B)


      1 #ifndef __CVETK_DETECTOR_SETUP_H__
      2 #define __CVETK_DETECTOR_SETUP_H__
      3 
      4 #ifdef __cplusplus
      5 extern "C" {
      6 #endif
      7 
      8 #include <stddef.h>
      9 
     10 struct cve_context {
     11   int verbose;
     12 };
     13 
     14 extern struct cve_context g_cve_ctx;
     15 
     16 struct detector_queue_entry {
     17   int (*handler)(struct cve_context *ctx);
     18   const char *name;
     19   const char *remediation;
     20   const char *alias;
     21   int         result;
     22 };
     23 
     24 extern struct detector_queue_entry **detector_queue;
     25 extern int                           detector_queue_cap;
     26 extern int                           detector_queue_length;
     27 extern int                           detector_total;
     28 extern int                           detector_pass;
     29 extern int                           detector_fail;
     30 
     31 void detector_queue_append(const char *name, const char *alias, const char *remediation,
     32                            int (*fn)(struct cve_context *ctx));
     33 
     34 #ifdef __cplusplus
     35 }  // extern "C"
     36 #endif
     37 
     38 #endif  // __CVETK_DETECTOR_SETUP_H__