From eea0a9fbbf1aff1eac1f17914d5c116de98e1d93 Mon Sep 17 00:00:00 2001 From: David Timber Date: Mon, 9 Aug 2021 17:30:18 +1000 Subject: Protocol and build system change ... * Use autoheader * Add --enable-minmem * Add OS code. Bin archive and protocol changed accordingly * Add instance flags in hostinfo frame. Bitfield util added for this * Add org_id in hostinfo for lineage record * SQL schema change: store integer value of hostinfo arch and os * Remove config.c * prne_index_nybin() now sets errno * Instance ids are now preserved for lineage record * Proone: remove arguments after init * Fix bug in prne_htbt_ser_bin_meta(): alloc_len is not checked --- src/data/sql/hi-create.sql | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/data/sql') diff --git a/src/data/sql/hi-create.sql b/src/data/sql/hi-create.sql index b173aaa..8859248 100644 --- a/src/data/sql/hi-create.sql +++ b/src/data/sql/hi-create.sql @@ -1,5 +1,6 @@ CREATE TABLE `prne-hi` ( `instance_id` binary(16) NOT NULL, + `org_id` binary(16) DEFAULT NULL, `inserted` datetime NOT NULL, `updated` datetime NOT NULL, `parent_uptime` bigint(20) unsigned DEFAULT NULL, @@ -13,7 +14,9 @@ CREATE TABLE `prne-hi` ( `cred_id` varchar(255) DEFAULT NULL, `cred_pw` varchar(255) DEFAULT NULL, `crash_cnt` int(10) unsigned DEFAULT NULL, - `arch` varchar(255) DEFAULT NULL, + `arch` tinyint unsigned DEFAULT NULL, + `os` tinyint unsigned DEFAULT NULL, + `flags` varbinary(255) DEFAULT NULL, `ipaddr` binary(16) DEFAULT NULL, PRIMARY KEY (`instance_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -21,6 +24,7 @@ CREATE TABLE `prne-hi` ( CREATE VIEW `prne`.`prne-hi-view` AS SELECT HEX(`prne`.`prne-hi`.`instance_id`) AS `HEX(instance_id)`, + HEX(`prne`.`prne-hi`.`org_id`) AS `HEX(org_id)`, `prne`.`prne-hi`.`inserted` AS `inserted`, `prne`.`prne-hi`.`updated` AS `updated`, `prne`.`prne-hi`.`parent_uptime` AS `parent_uptime`, @@ -35,6 +39,8 @@ CREATE VIEW `prne`.`prne-hi-view` AS `prne`.`prne-hi`.`cred_pw` AS `cred_pw`, `prne`.`prne-hi`.`crash_cnt` AS `crash_cnt`, `prne`.`prne-hi`.`arch` AS `arch`, + `prne`.`prne-hi`.`os` AS `os`, + HEX(`prne`.`prne-hi`.`flags`) AS `flags`, INET6_NTOA(`prne`.`prne-hi`.`ipaddr`) AS `INET6_NTOA(ipaddr)` FROM `prne`.`prne-hi`; -- cgit