static int _interp_bridge(struct ulogd_pluginstance *pi, u_int32_t len)
{
- struct ulogd_key *ret = pi->output.keys;
- const struct sk_buff *skb =
- GET_VALUE(pi->input.keys, INKEY_RAW_PCKT).ptr;
const u_int16_t proto =
GET_VALUE(pi->input.keys, INKEY_OOB_PROTOCOL).ui16;
if (!(what & ULOGD_FD_READ))
return 0;
- nlif_catch(nlif_inst);
+ return nlif_catch(nlif_inst);
}
static int ifindex_start(struct ulogd_pluginstance *upi)
default:
/* TODO handle error */
ulogd_log(ULOGD_NOTICE, "Unknown protocol family\n");
- return;
+ return NULL;
}
buffer = tmp;
addr8[0], addr8[1], addr8[2], addr8[3]);
if (written != 2 * 4) {
buffer[0] = 0;
- return;
+ return NULL;
}
buffer += written;
addr8 += 4;
static int interp_pwsniff(struct ulogd_pluginstance *pi)
{
- struct ulogd_key *inp = pi->input.keys;
struct ulogd_key *ret = pi->output.keys;
struct iphdr *iph;
void *protoh;
struct mysql_instance *mi = (struct mysql_instance *) upi->private;
MYSQL_RES *result;
MYSQL_FIELD *field;
- struct ulogd_key *f, *f2;
int i;
if (!mi->dbh) {
for (i = 0; field = mysql_fetch_field(result); i++) {
char buf[ULOGD_MAX_KEYLEN+1];
char *underscore;
- int id;
/* replace all underscores with dots */
strncpy(buf, field->name, ULOGD_MAX_KEYLEN);
for (i = 0; i < PQntuples(pi->pgres); i++) {
char buf[ULOGD_MAX_KEYLEN+1];
char *underscore;
- int id;
/* replace all underscores with dots */
strncpy(buf, PQgetvalue(pi->pgres, i, 0), ULOGD_MAX_KEYLEN);
/* second pass: copy key names */
llist_for_each_entry(pi_cur, &stack->list, list) {
- struct ulogd_key *cur;
int i;
for (i = 0; i < pi_cur->plugin->output.num_keys; i++)
{ "help", 0, NULL, 'h' },
{ "configfile", 1, NULL, 'c'},
{ "uid", 1, NULL, 'u' },
- { "info", 1, NULL, 'i'},
+ { "info", 1, NULL, 'i' },
{ 0 }
};
#include <errno.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#include <time.h>
#include <ulogd/ulogd.h>
#include <ulogd/db.h>
{
struct db_instance *mi = (struct db_instance *) upi->private;
unsigned int size;
- char buf[ULOGD_MAX_KEYLEN];
- char *underscore;
int i;
char *table = table_ce(upi->config_kset).u.string;
char *procedure = procedure_ce(upi->config_kset).u.string;
}
switch (res->type) {
- char *tmpstr;
- struct in_addr addr;
case ULOGD_RET_INT8:
sprintf(di->stmt_ins, "%d,", res->u.value.i8);
break;
static int printpkt_ipv6(struct ulogd_key *res, char *buf)
{
char *buf_cur = buf;
- char tmp[INET6_ADDRSTRLEN];
if (pp_is_valid(res, KEY_IP_SADDR))
buf_cur += sprintf(buf_cur, "SRC=%s ",
char *buf_cur = buf;
u_int16_t code = 0;
u_int8_t *mac;
- char tmp[INET_ADDRSTRLEN];
if (pp_is_valid(res, KEY_ARP_SPA))
buf_cur += sprintf(buf_cur, "SRC=%s ",