EDGESEC
0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
|
File containing the definition of the sqlite header utilities. More...
#include <stdint.h>
#include <pcap.h>
#include <sqlite3.h>
#include "../../../utils/allocs.h"
#include "../../../utils/os.h"
#include "../../capture_config.h"
#include "packet_decoder.h"
Go to the source code of this file.
Macros | |
#define | MAX_DB_NAME 100 |
#define | ETH_CREATE_TABLE |
#define | ARP_CREATE_TABLE |
#define | IP4_CREATE_TABLE |
#define | IP6_CREATE_TABLE |
#define | TCP_CREATE_TABLE |
#define | UDP_CREATE_TABLE |
#define | ICMP4_CREATE_TABLE |
#define | ICMP6_CREATE_TABLE |
#define | DNS_CREATE_TABLE |
#define | MDNS_CREATE_TABLE |
#define | DHCP_CREATE_TABLE |
#define | ETH_INSERT_INTO |
#define | ARP_INSERT_INTO |
#define | IP4_INSERT_INTO |
#define | IP6_INSERT_INTO |
#define | TCP_INSERT_INTO |
#define | UDP_INSERT_INTO "INSERT INTO udp VALUES(@id, @source, @dest, @len, @check_p);" |
#define | ICMP4_INSERT_INTO "INSERT INTO icmp4 VALUES(@id, @type, @code, @checksum, @gateway);" |
#define | ICMP6_INSERT_INTO |
#define | DNS_INSERT_INTO |
#define | MDNS_INSERT_INTO |
#define | DHCP_INSERT_INTO |
Functions | |
int | save_packet_statement (sqlite3 *db, struct tuple_packet *tp) |
Save packets to sqlite db. More... | |
int | init_sqlite_header_db (sqlite3 *db) |
Initialises the sqlite3 header db tables. More... | |
File containing the definition of the sqlite header utilities.
#define ARP_CREATE_TABLE |
#define ARP_INSERT_INTO |
#define DHCP_CREATE_TABLE |
#define DHCP_INSERT_INTO |
#define DNS_CREATE_TABLE |
#define DNS_INSERT_INTO |
#define ETH_CREATE_TABLE |
#define ETH_INSERT_INTO |
#define ICMP4_CREATE_TABLE |
#define ICMP4_INSERT_INTO "INSERT INTO icmp4 VALUES(@id, @type, @code, @checksum, @gateway);" |
#define ICMP6_CREATE_TABLE |
#define ICMP6_INSERT_INTO |
#define IP4_CREATE_TABLE |
#define IP4_INSERT_INTO |
#define IP6_CREATE_TABLE |
#define IP6_INSERT_INTO |
#define MAX_DB_NAME 100 |
#define MDNS_CREATE_TABLE |
#define MDNS_INSERT_INTO |
#define TCP_CREATE_TABLE |
#define TCP_INSERT_INTO |
#define UDP_CREATE_TABLE |
#define UDP_INSERT_INTO "INSERT INTO udp VALUES(@id, @source, @dest, @len, @check_p);" |
int init_sqlite_header_db | ( | sqlite3 * | db | ) |
Initialises the sqlite3 header db tables.
db | The sqlite3 db |
int save_packet_statement | ( | sqlite3 * | db, |
struct tuple_packet * | tp | ||
) |
Save packets to sqlite db.
db | The sqlite3 db |
tp | The packet tuple structure |