include/razorback/metadata.h File Reference

Metadata wrapper functions. More...

#include <razorback/visibility.h>
#include <razorback/types.h>
#include <razorback/ntlv.h>
Include dependency graph for metadata.h:

Go to the source code of this file.

Defines

#define Metadata_Add   NTLVList_Add
 Add metadata to a metadata list.
#define Metadata_Get   NTLVList_Get
 Get metadata from a metadata list.

Functions

SO_PUBLIC bool Metadata_Add_String (struct List *list, uuid_t name, const char *string)
 Add a string to a metadata list.
SO_PUBLIC bool Metadata_Get_String (struct List *list, uuid_t name, uint32_t *len, const char **string)
 Get a string from a metadata list.
SO_PUBLIC bool Metadata_Add_IPv4 (struct List *list, uuid_t name, const uint8_t *addr)
 Add an IPv4 address to a metadata list.
SO_PUBLIC bool Metadata_Get_IPv4 (struct List *list, uuid_t name, const uint8_t **addr)
 Get an IPv4 address from the metadata list.
SO_PUBLIC bool Metadata_Add_IPv6 (struct List *list, uuid_t name, const uint8_t *addr)
 Add an IPv6 address to a metadata list.
SO_PUBLIC bool Metadata_Get_IPv6 (struct List *list, uuid_t name, const uint8_t **addr)
 Get an IPv6 address from metadata list.
SO_PUBLIC bool Metadata_Add_Port (struct List *list, uuid_t name, const uint16_t port)
 Add a port to a metadata list.
SO_PUBLIC bool Metadata_Get_Port (struct List *list, uuid_t name, uint16_t *port)
 Get a port from a metadata list.
SO_PUBLIC bool Metadata_Add_Filename (struct List *list, const char *name)
 Add a filename to a metadata list.
SO_PUBLIC bool Metadata_Add_Hostname (struct List *list, const char *name)
 Add a hostname to a metadata list.
SO_PUBLIC bool Metadata_Add_URI (struct List *list, const char *uri)
 Add a URI to a metadata list.
SO_PUBLIC bool Metadata_Add_Path (struct List *list, const char *path)
 Add a path to a metadata list.
SO_PUBLIC bool Metadata_Add_MalwareName (struct List *list, const char *vendor, const char *name)
 Add a malware name to a metadata list.
SO_PUBLIC bool Metadata_Add_Report (struct List *list, const char *text)
 Add a report to a metadata list.
SO_PUBLIC bool Metadata_Add_CVE (struct List *list, const char *text)
 Add a CVE to a metadata list.
SO_PUBLIC bool Metadata_Add_BID (struct List *list, const char *text)
 Add a BugTraq ID to a metadata list.
SO_PUBLIC bool Metadata_Add_OSVDB (struct List *list, const char *text)
 Add a OSVDB id to a metadata list.
SO_PUBLIC bool Metadata_Add_HttpRequest (struct List *list, const char *name)
 Add a HTTP request to a metadata list.
SO_PUBLIC bool Metadata_Add_HttpResponse (struct List *list, const char *name)
 Add a HTTP Response to a metadata list.
SO_PUBLIC bool Metadata_Add_IPv4_Source (struct List *list, const uint8_t *addr)
 Add an IPv4 source address to a metadata list.
SO_PUBLIC bool Metadata_Get_IPv4_Source (struct List *list, const uint8_t **addr)
 Get an IPv4 source address from a metadata list.
SO_PUBLIC bool Metadata_Add_IPv4_Destination (struct List *list, const uint8_t *addr)
 Add an IPv4 destination address to a metadata list.
SO_PUBLIC bool Metadata_Get_IPv4_Destination (struct List *list, const uint8_t **addr)
 Get an IPv4 destination address from a metadata list.
SO_PUBLIC bool Metadata_Add_IPv6_Source (struct List *list, const uint8_t *addr)
 Add an IPv6 source address to a metadata list.
SO_PUBLIC bool Metadata_Get_IPv6_Source (struct List *list, const uint8_t **addr)
 Get an IPv6 source address from a metadata list.
SO_PUBLIC bool Metadata_Add_IPv6_Destination (struct List *list, const uint8_t *addr)
 Add an IPv6 destination address to a metadata list.
SO_PUBLIC bool Metadata_Get_IPv6_Destination (struct List *list, const uint8_t **addr)
 Get an IPv6 destination address from a metadata list.
SO_PUBLIC bool Metadata_Add_Port_Source (struct List *list, const uint16_t port)
 Add a source port to a metadata list.
SO_PUBLIC bool Metadata_Get_Port_Source (struct List *list, uint16_t *port)
 Get a source port from a metadata list.
SO_PUBLIC bool Metadata_Add_Port_Destination (struct List *list, const uint16_t port)
 Add a destination port to a metadata list.
SO_PUBLIC bool Metadata_Get_Port_Destination (struct List *list, uint16_t *port)
 Get a destination port from a metadata list.

Detailed Description

Metadata wrapper functions.


Function Documentation

SO_PUBLIC bool Metadata_Add_BID ( struct List list,
const char *  text 
)

Add a BugTraq ID to a metadata list.

Parameters:
list The metadata list.
text The BugTraq ID.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Add_CVE ( struct List list,
const char *  text 
)

Add a CVE to a metadata list.

Parameters:
list The metadata list.
text The CVE number.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Add_Filename ( struct List list,
const char *  name 
)

Add a filename to a metadata list.

Parameters:
list The metadata list.
name The file name.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Add_Hostname ( struct List list,
const char *  name 
)

Add a hostname to a metadata list.

Parameters:
list The metadata list.
name The hostname.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Add_HttpRequest ( struct List list,
const char *  name 
)

Add a HTTP request to a metadata list.

Parameters:
list The metadata list.
name The HTTP Request
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Add_HttpResponse ( struct List list,
const char *  name 
)

Add a HTTP Response to a metadata list.

Parameters:
list The metadata list.
name The HTTP Response
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Add_IPv4 ( struct List list,
uuid_t  name,
const uint8_t *  addr 
)

Add an IPv4 address to a metadata list.

Parameters:
list The metadata list.
name The NTLV Name of the metadata object.
addr The IP address.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Add_IPv4_Destination ( struct List list,
const uint8_t *  addr 
)

Add an IPv4 destination address to a metadata list.

Parameters:
list The metadata list.
addr The address.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Add_IPv4_Source ( struct List list,
const uint8_t *  addr 
)

Add an IPv4 source address to a metadata list.

Parameters:
list The metadata list.
addr The address.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Add_IPv6 ( struct List list,
uuid_t  name,
const uint8_t *  addr 
)

Add an IPv6 address to a metadata list.

Parameters:
list The metadata list.
name The NTLV Name of the metadata object.
addr The address to add to the list,
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Add_IPv6_Destination ( struct List list,
const uint8_t *  addr 
)

Add an IPv6 destination address to a metadata list.

Parameters:
list The metadata list.
addr The address.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Add_IPv6_Source ( struct List list,
const uint8_t *  addr 
)

Add an IPv6 source address to a metadata list.

Parameters:
list The metadata list.
addr The address.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Add_MalwareName ( struct List list,
const char *  vendor,
const char *  name 
)

Add a malware name to a metadata list.

Parameters:
list The metadata list.
vendor The detection vendor name.
name The vendors name for the malware.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Add_OSVDB ( struct List list,
const char *  text 
)

Add a OSVDB id to a metadata list.

Parameters:
list The metadata list.
text The OSVDB Id.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Add_Path ( struct List list,
const char *  path 
)

Add a path to a metadata list.

Parameters:
list The metadata list.
path The path to add.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Add_Port ( struct List list,
uuid_t  name,
const uint16_t  port 
)

Add a port to a metadata list.

Parameters:
list The metadata list.
name The NTLV Name of the metadata object.
port The port to add to the list.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Add_Port_Destination ( struct List list,
const uint16_t  port 
)

Add a destination port to a metadata list.

Parameters:
list The metadata list.
port The port.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Add_Port_Source ( struct List list,
const uint16_t  port 
)

Add a source port to a metadata list.

Parameters:
list The metadata list.
port The port.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Add_Report ( struct List list,
const char *  text 
)

Add a report to a metadata list.

Parameters:
list The metadata list.
text The report text.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Add_String ( struct List list,
uuid_t  name,
const char *  string 
)

Add a string to a metadata list.

Parameters:
list The metadata list.
name The NTLV Name of the metadata object.
string The string to add to the list.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Add_URI ( struct List list,
const char *  uri 
)

Add a URI to a metadata list.

Parameters:
list The metadata list.
uri The URI to add.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Get_IPv4 ( struct List list,
uuid_t  name,
const uint8_t **  addr 
)

Get an IPv4 address from the metadata list.

Parameters:
list The metadata list.
name The NTLV Name of the metadata object.
addr A pointer to a uint8_t* to store the address in.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Get_IPv4_Destination ( struct List list,
const uint8_t **  addr 
)

Get an IPv4 destination address from a metadata list.

Parameters:
list The metadata list.
addr A pointer to a uint8_t* to store the address in.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Get_IPv4_Source ( struct List list,
const uint8_t **  addr 
)

Get an IPv4 source address from a metadata list.

Parameters:
list The metadata list.
addr A pointer to a uint8_t* to store the address in.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Get_IPv6 ( struct List list,
uuid_t  name,
const uint8_t **  addr 
)

Get an IPv6 address from metadata list.

Parameters:
list The metadata list.
name The NTLV Name of the metadata object.
addr A pointer to a uint8_* to store the address in.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Get_IPv6_Destination ( struct List list,
const uint8_t **  addr 
)

Get an IPv6 destination address from a metadata list.

Parameters:
list The metadata list.
addr A pointer to a uint8_t* to store the address in.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Get_IPv6_Source ( struct List list,
const uint8_t **  addr 
)

Get an IPv6 source address from a metadata list.

Parameters:
list The metadata list.
addr A pointer to a uint8_t* to store the address in.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Get_Port ( struct List list,
uuid_t  name,
uint16_t *  port 
)

Get a port from a metadata list.

Parameters:
list The metadata list.
name The NTLV Name of the metadata object.
port A pointer to the uint16_t to store the port in.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Get_Port_Destination ( struct List list,
uint16_t *  port 
)

Get a destination port from a metadata list.

Parameters:
list The metadata list.
port A pointer to a uint16_t to store the port in.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Get_Port_Source ( struct List list,
uint16_t *  port 
)

Get a source port from a metadata list.

Parameters:
list The metadata list.
port A pointer to a uint16_t to store the port in.
Returns:
True on success, false on error.
SO_PUBLIC bool Metadata_Get_String ( struct List list,
uuid_t  name,
uint32_t *  len,
const char **  string 
)

Get a string from a metadata list.

Note:
This will return the first item in the list with that name. If there is more than with the same name type tuple then the first one will be returned.
Parameters:
list The metadata list.
name The NTLV Name of the metadata object.
len The length of the returned strng
string The a pointer to a char* to store the string in
Returns:
True on success, false on error.
 All Data Structures Files Functions Variables Enumerations Enumerator Defines
Generated on Sun Dec 9 04:00:11 2012 for RazorbackAPI by  doxygen 1.6.3