Importing all of DRL, including ulogd and all of its files.
[distributedratelimiting.git] / doc / pgsql.table
1 /*  ulogd.pgsql.table, Version 0.1
2  *
3  *  sample of a postgres table for ulogd
4  *
5  *  All columns except "id" are optional!  Comment all unwanted
6  *  columns out, e.g. by prefixing them with '--'
7  *
8  *  "raw_pkt" is not supported by ulogd_PGSQL
9  */
10
11 CREATE SEQUENCE "seq_ulog";
12
13 CREATE TABLE "ulog" (
14         "id"             integer DEFAULT nextval('seq_ulog') NOT NULL,
15
16         "oob_prefix"     character varying(32),
17         "oob_time_sec"   integer,
18         "oob_time_usec"  integer,
19         "oob_mark"       bigint,
20         "oob_in"         character varying(32),
21         "oob_out"        character varying(32),
22
23         "raw_mac"        character varying(80),
24         "raw_pktlen"     bigint,
25
26         "ip_ihl"         smallint,
27         "ip_tos"         smallint,
28         "ip_totlen"      integer,
29         "ip_id"          integer,
30         "ip_fragoff"     integer,
31         "ip_ttl"         smallint,
32         "ip_protocol"    smallint,
33         "ip_csum"        integer,
34
35 /* log IPs as unsigned int32 (default)                */
36         "ip_saddr"       bigint,
37         "ip_daddr"       bigint,
38
39 /* log IPs as string (--with-pgsql-log-ip-as-string)  */
40 --      "ip_saddr"       character varying(40),
41 --      "ip_daddr"       character varying(40),
42
43 /* log IPs as inet   (--with-pgsql-log-ip-as-string)  */
44 --      "ip_saddr"       inet,
45 --      "ip_daddr"       inet,
46
47
48         "tcp_sport"      integer,
49         "tcp_dport"      integer,
50         "tcp_seq"        bigint,
51         "tcp_ackseq"     bigint,
52         "tcp_urg"        boolean,
53         "tcp_ack"        boolean,
54         "tcp_psh"        boolean,
55         "tcp_rst"        boolean,
56         "tcp_syn"        boolean,
57         "tcp_fin"        boolean,
58         "tcp_window"     integer,
59         "tcp_urgp"       integer,
60
61         "udp_sport"      integer,
62         "udp_dport"      integer,
63         "udp_len"        integer,
64
65         "icmp_type"      smallint,
66         "icmp_code"      smallint,
67         "icmp_echoid"    integer,
68         "icmp_echoseq"   integer,
69         "icmp_gateway"   bigint,
70         "icmp_fragmtu"   integer,
71
72         "pwsniff_user"   character varying(30),
73         "pwsniff_pass"   character varying(30),
74
75         "ahesp_spi"      smallint,
76
77         "local_time"     bigint,
78         "local_hostname" character varying(40)
79 );
80
81