📄 create_postgresql
字号:
# Copyright (C) 2000 Carnegie Mellon University
#
# Author: Jed Pickel <jed@pickel.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
CREATE TABLE event ( sid INT NOT NULL,
cid INT8 NOT NULL,
signature TEXT NOT NULL,
timestamp DATETIME NOT NULL,
PRIMARY KEY (sid,cid));
CREATE TABLE sensor ( sid SERIAL,
hostname TEXT,
interface TEXT,
filter TEXT,
PRIMARY KEY (sid));
CREATE TABLE iphdr ( sid INT4 NOT NULL,
cid INT8 NOT NULL,
ip_proto INT2,
ip_src0 INT2 NOT NULL,
ip_src1 INT2 NOT NULL,
ip_src2 INT2 NOT NULL,
ip_src3 INT2 NOT NULL,
ip_dst0 INT2 NOT NULL,
ip_dst1 INT2 NOT NULL,
ip_dst2 INT2 NOT NULL,
ip_dst3 INT2 NOT NULL,
ip_tos INT2,
ip_ttl INT2,
ip_id INT4,
ip_off INT4,
ip_len INT4,
PRIMARY KEY (sid,cid));
CREATE TABLE tcphdr ( sid INT4 NOT NULL,
cid INT8 NOT NULL,
th_sport INT4 NOT NULL,
th_dport INT4 NOT NULL,
th_flags INT4,
th_win INT4,
th_urp INT4,
PRIMARY KEY (sid,cid));
CREATE TABLE udphdr ( sid INT4 NOT NULL,
cid INT8 NOT NULL,
uh_sport INT4 NOT NULL,
uh_dport INT4 NOT NULL,
uh_len INT4,
PRIMARY KEY (sid,cid));
CREATE TABLE icmphdr ( sid INT4 NOT NULL,
cid INT8 NOT NULL,
type INT2 NOT NULL,
code INT2 NOT NULL,
PRIMARY KEY (sid,cid));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -