00001 00004 #ifndef RAZORBACK_METADATA_H 00005 #define RAZORBACK_METADATA_H 00006 00007 #include <razorback/visibility.h> 00008 #include <razorback/types.h> 00009 #include <razorback/ntlv.h> 00010 00011 #ifdef __cplusplus 00012 extern "C" { 00013 #endif 00014 00015 #define Metadata_Add NTLVList_Add ///< Add metadata to a metadata list. 00016 #define Metadata_Get NTLVList_Get ///< Get metadata from a metadata list. 00017 00025 SO_PUBLIC extern bool Metadata_Add_String (struct List *list, uuid_t name, const char *string); 00026 00036 SO_PUBLIC extern bool Metadata_Get_String (struct List *list, uuid_t name, uint32_t *len, const char **string); 00037 00044 SO_PUBLIC extern bool Metadata_Add_IPv4 (struct List *list, uuid_t name, const uint8_t *addr); 00045 00052 SO_PUBLIC extern bool Metadata_Get_IPv4 (struct List *list, uuid_t name, const uint8_t **addr); 00053 00060 SO_PUBLIC extern bool Metadata_Add_IPv6 (struct List *list, uuid_t name, const uint8_t *addr); 00061 00068 SO_PUBLIC extern bool Metadata_Get_IPv6 (struct List *list, uuid_t name, const uint8_t **addr); 00069 00076 SO_PUBLIC extern bool Metadata_Add_Port (struct List *list, uuid_t name, const uint16_t port); 00077 00084 SO_PUBLIC extern bool Metadata_Get_Port (struct List *list, uuid_t name, uint16_t *port); 00085 00091 SO_PUBLIC extern bool Metadata_Add_Filename (struct List *list, const char *name); 00092 00098 SO_PUBLIC extern bool Metadata_Add_Hostname (struct List *list, const char *name); 00099 00105 SO_PUBLIC extern bool Metadata_Add_URI (struct List *list, const char *uri); 00106 00112 SO_PUBLIC extern bool Metadata_Add_Path (struct List *list, const char *path); 00113 00120 SO_PUBLIC extern bool Metadata_Add_MalwareName (struct List *list, const char *vendor, const char *name); 00121 00127 SO_PUBLIC extern bool Metadata_Add_Report (struct List *list, const char *text); 00128 00134 SO_PUBLIC extern bool Metadata_Add_CVE (struct List *list, const char *text); 00135 00141 SO_PUBLIC extern bool Metadata_Add_BID (struct List *list, const char *text); 00142 00148 SO_PUBLIC extern bool Metadata_Add_OSVDB (struct List *list, const char *text); 00149 00155 SO_PUBLIC extern bool Metadata_Add_HttpRequest (struct List *list, const char *name); 00156 00162 SO_PUBLIC extern bool Metadata_Add_HttpResponse (struct List *list, const char *name); 00163 00169 SO_PUBLIC extern bool Metadata_Add_IPv4_Source (struct List *list, const uint8_t *addr); 00170 00176 SO_PUBLIC extern bool Metadata_Get_IPv4_Source (struct List *list, const uint8_t **addr); 00177 00183 SO_PUBLIC extern bool Metadata_Add_IPv4_Destination (struct List *list, const uint8_t *addr); 00184 00190 SO_PUBLIC extern bool Metadata_Get_IPv4_Destination (struct List *list, const uint8_t **addr); 00191 00197 SO_PUBLIC extern bool Metadata_Add_IPv6_Source (struct List *list, const uint8_t *addr); 00198 00204 SO_PUBLIC extern bool Metadata_Get_IPv6_Source (struct List *list, const uint8_t **addr); 00205 00211 SO_PUBLIC extern bool Metadata_Add_IPv6_Destination (struct List *list, const uint8_t *addr); 00212 00218 SO_PUBLIC extern bool Metadata_Get_IPv6_Destination (struct List *list, const uint8_t **addr); 00219 00225 SO_PUBLIC extern bool Metadata_Add_Port_Source (struct List *list, const uint16_t port); 00226 00232 SO_PUBLIC extern bool Metadata_Get_Port_Source (struct List *list, uint16_t *port); 00233 00239 SO_PUBLIC extern bool Metadata_Add_Port_Destination (struct List *list, const uint16_t port); 00240 00246 SO_PUBLIC extern bool Metadata_Get_Port_Destination (struct List *list, uint16_t *port); 00247 #ifdef __cplusplus 00248 } 00249 #endif 00250 #endif