|
|
@ -84,6 +84,8 @@ CREATE OR REPLACE FUNCTION INSERT_CT( |
|
|
IN _ct_event integer |
|
|
IN _ct_event integer |
|
|
) |
|
|
) |
|
|
RETURNS bigint AS $$ |
|
|
RETURNS bigint AS $$ |
|
|
|
|
|
DECLARE _id bigint; |
|
|
|
|
|
BEGIN |
|
|
INSERT INTO ulog2_ct (ct_id, oob_family, orig_ip_saddr_str, orig_ip_daddr_str, orig_ip_protocol, |
|
|
INSERT INTO ulog2_ct (ct_id, oob_family, orig_ip_saddr_str, orig_ip_daddr_str, orig_ip_protocol, |
|
|
orig_l4_sport, orig_l4_dport, orig_raw_pktlen, orig_raw_pktcount, |
|
|
orig_l4_sport, orig_l4_dport, orig_raw_pktlen, orig_raw_pktcount, |
|
|
reply_ip_saddr_str, reply_ip_daddr_str, reply_ip_protocol, |
|
|
reply_ip_saddr_str, reply_ip_daddr_str, reply_ip_protocol, |
|
|
@ -92,8 +94,10 @@ RETURNS bigint AS $$ |
|
|
flow_start_sec, flow_start_usec, |
|
|
flow_start_sec, flow_start_usec, |
|
|
flow_end_sec, flow_end_usec, ct_event) |
|
|
flow_end_sec, flow_end_usec, ct_event) |
|
|
VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24); |
|
|
VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24); |
|
|
$1; |
|
|
_id = $1; |
|
|
$$ LANGUAGE SQL SECURITY INVOKER; |
|
|
RETURN _id; |
|
|
|
|
|
END |
|
|
|
|
|
$$ LANGUAGE plpgsql SECURITY INVOKER; |
|
|
|
|
|
|
|
|
CREATE OR REPLACE FUNCTION INSERT_OR_REPLACE_CT( |
|
|
CREATE OR REPLACE FUNCTION INSERT_OR_REPLACE_CT( |
|
|
IN _ct_id integer, |
|
|
IN _ct_id integer, |
|
|
|