[netfilter-cvslog] r7514 - branches/ulog/ulogd2/doc
pablo at netfilter.org
pablo at netfilter.org
Sun Apr 27 09:54:56 CEST 2008
Author: pablo at netfilter.org
Date: 2008-04-27 09:54:56 +0200 (Sun, 27 Apr 2008)
New Revision: 7514
Modified:
branches/ulog/ulogd2/doc/pgsql-ulogd2.sql
Log:
Update PostgreSQL schema to add the insert procedure for conntrack
connections.
Signed-off-by: Pierre Chifflier <chifflier at inl.fr>
Modified: branches/ulog/ulogd2/doc/pgsql-ulogd2.sql
===================================================================
--- branches/ulog/ulogd2/doc/pgsql-ulogd2.sql 2008-04-27 07:54:05 UTC (rev 7513)
+++ branches/ulog/ulogd2/doc/pgsql-ulogd2.sql 2008-04-27 07:54:56 UTC (rev 7514)
@@ -228,10 +228,10 @@
icmp_code smallint default NULL,
icmp_type smallint default NULL,
ct_mark bigint default 0,
- flow_start_sec integer default 0,
- flow_start_usec integer default 0,
- flow_end_sec integer default 0,
- flow_end_usec integer default 0,
+ flow_start_sec bigint default 0,
+ flow_start_usec bigint default 0,
+ flow_end_sec bigint default 0,
+ flow_end_usec bigint default 0,
state smallint default 0
) WITH (OIDS=FALSE);
@@ -518,6 +518,46 @@
+CREATE OR REPLACE FUNCTION INSERT_CT(
+ IN _oob_family integer,
+ IN _orig_ip_saddr inet,
+ IN _orig_ip_daddr inet,
+ IN _orig_ip_protocol integer,
+ IN _orig_l4_sport integer,
+ IN _orig_l4_dport integer,
+ IN _orig_bytes bigint,
+ IN _orig_packets bigint,
+ IN _reply_ip_saddr inet,
+ IN _reply_ip_daddr inet,
+ IN _reply_ip_protocol integer,
+ IN _reply_l4_sport integer,
+ IN _reply_l4_dport integer,
+ IN _reply_bytes bigint,
+ IN _reply_packets bigint,
+ IN _icmp_code integer,
+ IN _icmp_type integer,
+ IN _ct_mark bigint,
+ IN _flow_start_sec bigint,
+ IN _flow_start_usec bigint,
+ IN _flow_end_sec bigint,
+ IN _flow_end_usec bigint,
+ IN _state smallint
+ )
+RETURNS bigint AS $$
+ INSERT INTO ulog2_ct (oob_family, orig_ip_saddr_str, orig_ip_daddr_str, orig_ip_protocol,
+ orig_l4_sport, orig_l4_dport, orig_bytes, orig_packets,
+ reply_ip_saddr_str, reply_ip_daddr_str, reply_ip_protocol,
+ reply_l4_sport, reply_l4_dport, reply_bytes, reply_packets,
+ icmp_code, icmp_type, ct_mark,
+ flow_start_sec, flow_start_usec,
+ flow_end_sec, flow_end_usec, state)
+ VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23);
+ SELECT currval('ulog2_ct__ct_id_seq');
+$$ LANGUAGE SQL SECURITY INVOKER;
+
+
+
+
CREATE OR REPLACE FUNCTION DELETE_PACKET(
IN _packet_id bigint
)
More information about the netfilter-cvslog
mailing list