EDGESEC
0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
|
File containing the definition of the sqlite macconn writer utilities. More...
#include <stdint.h>
#include <sqlite3.h>
#include "mac_mapper.h"
#include <utarray.h>
#include "../utils/allocs.h"
#include "../utils/os.h"
#include "../utils/squeue.h"
Go to the source code of this file.
Macros | |
#define | MACCONN_TABLE_NAME "instance" |
#define | MACCONN_CREATE_TABLE |
#define | MACCONN_INSERT_INTO |
#define | MACCONN_DELETE_FROM "DELETE FROM " MACCONN_TABLE_NAME " WHERE mac=@mac;" |
#define | MACCONN_SELECT_FROM |
Functions | |
int | open_sqlite_macconn_db (const char *db_path, sqlite3 **sql) |
Opens the sqlite macconn db. More... | |
void | free_sqlite_macconn_db (sqlite3 *db) |
Closes the sqlite db. More... | |
int | save_sqlite_macconn_entry (sqlite3 *db, struct mac_conn *conn) |
Saves a macconn entry in the sqlite db. More... | |
int | get_sqlite_macconn_entries (sqlite3 *db, UT_array *entries) |
Saves a macconn entries in the sqlite db. More... | |
File containing the definition of the sqlite macconn writer utilities.
#define MACCONN_CREATE_TABLE |
#define MACCONN_DELETE_FROM "DELETE FROM " MACCONN_TABLE_NAME " WHERE mac=@mac;" |
#define MACCONN_INSERT_INTO |
#define MACCONN_SELECT_FROM |
#define MACCONN_TABLE_NAME "instance" |
void free_sqlite_macconn_db | ( | sqlite3 * | db | ) |
Closes the sqlite db.
db | The sqlite db structure pointer |
int get_sqlite_macconn_entries | ( | sqlite3 * | db, |
UT_array * | entries | ||
) |
Saves a macconn entries in the sqlite db.
db | The sqlite db structure pointer |
entries | The macconn entries |
int open_sqlite_macconn_db | ( | const char * | db_path, |
sqlite3 ** | sql | ||
) |
Opens the sqlite macconn db.
db_path | The sqlite db path | |
[out] | sql | The returned sqlite db structure pointer |
int save_sqlite_macconn_entry | ( | sqlite3 * | db, |
struct mac_conn * | conn | ||
) |
Saves a macconn entry in the sqlite db.
db | The sqlite db structure pointer |
conn | The MAC connection structure |