Barrelfish
|
Interface for filter execution virtual machine. More...
Macros | |
#define | ERR_BAD_OP -1 |
Execution failed because of an unknown opcode. | |
#define | ERR_BAD_ACCESS -2 |
Filter did not match because it tried to access a non existing location in the packet. | |
#define | ERR_UNKNOWN -3 |
An unknown internal error occurred during the execution. | |
Typedefs | |
typedef uint8_t | op_t |
Define opcode type as single byte. | |
Functions | |
bool | execute_filter (uint8_t *filter_code, int filter_len, uint8_t *packet_data, int packet_len, int *error_out) |
Executes the specified filter on the given packet. More... | |
Interface for filter execution virtual machine.
bool execute_filter | ( | uint8_t * | filter_code, |
int | filter_len, | ||
uint8_t * | packet_data, | ||
int | packet_len, | ||
int * | error_out | ||
) |
Executes the specified filter on the given packet.
filter_code | Points to the filters byte code | |
filter_len | Length of the byte code | |
packet_data | Points to the packet data to run the filter on | |
packet_len | Length of packet data in bytes | |
[out] | error_out | Error information upon failure during execution |