From cd3400f957ee846243a270f61061e758a23f2ee8 Mon Sep 17 00:00:00 2001 From: Johanna Amann Date: Fri, 31 Jul 2020 14:53:27 -0700 Subject: [PATCH] Re-add TYPE_COUNTER without function and deprecation marker. --- NEWS | 6 +++ src/Type.cc | 43 +++++++++--------- src/Type.h | 45 ++++++++++--------- .../manager-1..stdout | 16 +++---- .../manager-1..stdout | 16 +++---- .../proxy-1..stdout | 4 +- .../proxy-2..stdout | 4 +- .../scripts.base.utils.hash_hrw/output | 18 ++++---- 8 files changed, 81 insertions(+), 71 deletions(-) diff --git a/NEWS b/NEWS index 5401b91919..12ccfe656f 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,12 @@ Zeek 4.0.0 TODO: nothing notable yet +Removed Functionality +--------------------- + +- The counter type was removed. This type was never fully functional/used + anywhere. + Zeek 3.2.0 ========== diff --git a/src/Type.cc b/src/Type.cc index 4fc8e97bdd..f0031cff06 100644 --- a/src/Type.cc +++ b/src/Type.cc @@ -34,27 +34,28 @@ const char* type_name(zeek::TypeTag t) "bool", // 1 "int", // 2 "count", // 3 - "double", // 4 - "time", // 5 - "interval", // 6 - "string", // 7 - "pattern", // 8 - "enum", // 9 - "timer", // 10 - "port", // 11 - "addr", // 12 - "subnet", // 13 - "any", // 14 - "table", // 15 - "union", // 16 - "record", // 17 - "types", // 18 - "func", // 19 - "file", // 20 - "vector", // 21 - "opaque", // 22 - "type", // 23 - "error", // 24 + "counter", // 4 + "double", // 5 + "time", // 6 + "interval", // 7 + "string", // 8 + "pattern", // 9 + "enum", // 10 + "timer", // 11 + "port", // 12 + "addr", // 13 + "subnet", // 14 + "any", // 16 + "table", // 16 + "union", // 17 + "record", // 18 + "types", // 19 + "func", // 20 + "file", // 21 + "vector", // 22 + "opaque", // 23 + "type", // 24 + "error", // 25 }; if ( int(t) >= NUM_TYPES ) diff --git a/src/Type.h b/src/Type.h index 178249d802..432bd4adc1 100644 --- a/src/Type.h +++ b/src/Type.h @@ -39,27 +39,28 @@ enum TypeTag { TYPE_BOOL, // 1 TYPE_INT, // 2 TYPE_COUNT, // 3 - TYPE_DOUBLE, // 4 - TYPE_TIME, // 5 - TYPE_INTERVAL, // 6 - TYPE_STRING, // 7 - TYPE_PATTERN, // 8 - TYPE_ENUM, // 9 - TYPE_TIMER, // 10 - TYPE_PORT, // 11 - TYPE_ADDR, // 12 - TYPE_SUBNET, // 13 - TYPE_ANY, // 14 - TYPE_TABLE, // 15 - TYPE_UNION, // 16 - TYPE_RECORD, // 17 - TYPE_LIST, // 18 - TYPE_FUNC, // 19 - TYPE_FILE, // 20 - TYPE_VECTOR, // 21 - TYPE_OPAQUE, // 22 - TYPE_TYPE, // 23 - TYPE_ERROR // 24 + TYPE_COUNTER [[deprecated("Remove in v4.1. TYPE_COUNTER was removed; use TYPE_COUNT instead.")]], // 4 + TYPE_DOUBLE, // 5 + TYPE_TIME, // 6 + TYPE_INTERVAL, // 7 + TYPE_STRING, // 8 + TYPE_PATTERN, // 9 + TYPE_ENUM, // 10 + TYPE_TIMER, // 11 + TYPE_PORT, // 12 + TYPE_ADDR, // 13 + TYPE_SUBNET, // 14 + TYPE_ANY, // 15 + TYPE_TABLE, // 16 + TYPE_UNION, // 17 + TYPE_RECORD, // 18 + TYPE_LIST, // 19 + TYPE_FUNC, // 20 + TYPE_FILE, // 21 + TYPE_VECTOR, // 22 + TYPE_OPAQUE, // 23 + TYPE_TYPE, // 24 + TYPE_ERROR // 25 #define NUM_TYPES (int(TYPE_ERROR) + 1) }; @@ -935,6 +936,8 @@ constexpr auto TYPE_BOOL = zeek::TYPE_BOOL; constexpr auto TYPE_INT = zeek::TYPE_INT; [[deprecated("Remove in v4.1. Use zeek::TYPE_COUNT instead.")]] constexpr auto TYPE_COUNT = zeek::TYPE_COUNT; +[[deprecated("Remove in v4.1. TYPE_COUNTER was removed. Use zeek::TYPE_COUNT instead.")]] +constexpr auto TYPE_COUNTER = zeek::TYPE_COUNTER; [[deprecated("Remove in v4.1. Use zeek::TYPE_DOUBLE instead.")]] constexpr auto TYPE_DOUBLE = zeek::TYPE_DOUBLE; [[deprecated("Remove in v4.1. Use zeek::TYPE_TIME instead.")]] diff --git a/testing/btest/Baseline/scripts.base.frameworks.cluster.custom_pool_limits/manager-1..stdout b/testing/btest/Baseline/scripts.base.frameworks.cluster.custom_pool_limits/manager-1..stdout index 1c62e0700d..015d95ee9d 100644 --- a/testing/btest/Baseline/scripts.base.frameworks.cluster.custom_pool_limits/manager-1..stdout +++ b/testing/btest/Baseline/scripts.base.frameworks.cluster.custom_pool_limits/manager-1..stdout @@ -1,18 +1,18 @@ 1st stuff hrw, 0, zeek/cluster/node/proxy-1/ -hrw (custom pool), 0, zeek/cluster/node/proxy-2/ +hrw (custom pool), 0, zeek/cluster/node/proxy-1/ hrw, 1, zeek/cluster/node/proxy-1/ -hrw (custom pool), 1, zeek/cluster/node/proxy-2/ +hrw (custom pool), 1, zeek/cluster/node/proxy-1/ hrw, 2, zeek/cluster/node/proxy-1/ hrw (custom pool), 2, zeek/cluster/node/proxy-1/ hrw, 3, zeek/cluster/node/proxy-1/ -hrw (custom pool), 3, zeek/cluster/node/proxy-2/ +hrw (custom pool), 3, zeek/cluster/node/proxy-1/ hrw, 13, zeek/cluster/node/proxy-1/ hrw (custom pool), 13, zeek/cluster/node/proxy-2/ hrw, 37, zeek/cluster/node/proxy-1/ hrw (custom pool), 37, zeek/cluster/node/proxy-2/ hrw, 42, zeek/cluster/node/proxy-1/ -hrw (custom pool), 42, zeek/cluster/node/proxy-1/ +hrw (custom pool), 42, zeek/cluster/node/proxy-2/ hrw, 101, zeek/cluster/node/proxy-1/ hrw (custom pool), 101, zeek/cluster/node/proxy-2/ rr, zeek/cluster/node/proxy-1/ @@ -32,19 +32,19 @@ rr (custom pool), zeek/cluster/node/proxy-1/ rr, zeek/cluster/node/proxy-1/ rr (custom pool), zeek/cluster/node/proxy-2/ hrw, 0, zeek/cluster/node/proxy-1/ -hrw (custom pool), 0, zeek/cluster/node/proxy-2/ +hrw (custom pool), 0, zeek/cluster/node/proxy-1/ hrw, 1, zeek/cluster/node/proxy-1/ -hrw (custom pool), 1, zeek/cluster/node/proxy-2/ +hrw (custom pool), 1, zeek/cluster/node/proxy-1/ hrw, 2, zeek/cluster/node/proxy-1/ hrw (custom pool), 2, zeek/cluster/node/proxy-1/ hrw, 3, zeek/cluster/node/proxy-1/ -hrw (custom pool), 3, zeek/cluster/node/proxy-2/ +hrw (custom pool), 3, zeek/cluster/node/proxy-1/ hrw, 13, zeek/cluster/node/proxy-1/ hrw (custom pool), 13, zeek/cluster/node/proxy-2/ hrw, 37, zeek/cluster/node/proxy-1/ hrw (custom pool), 37, zeek/cluster/node/proxy-2/ hrw, 42, zeek/cluster/node/proxy-1/ -hrw (custom pool), 42, zeek/cluster/node/proxy-1/ +hrw (custom pool), 42, zeek/cluster/node/proxy-2/ hrw, 101, zeek/cluster/node/proxy-1/ hrw (custom pool), 101, zeek/cluster/node/proxy-2/ 2nd stuff diff --git a/testing/btest/Baseline/scripts.base.frameworks.cluster.topic_distribution/manager-1..stdout b/testing/btest/Baseline/scripts.base.frameworks.cluster.topic_distribution/manager-1..stdout index 4966d2a267..5ef98205eb 100644 --- a/testing/btest/Baseline/scripts.base.frameworks.cluster.topic_distribution/manager-1..stdout +++ b/testing/btest/Baseline/scripts.base.frameworks.cluster.topic_distribution/manager-1..stdout @@ -1,11 +1,11 @@ 1st stuff -hrw, 0, zeek/cluster/node/proxy-2/ -hrw, 1, zeek/cluster/node/proxy-2/ +hrw, 0, zeek/cluster/node/proxy-1/ +hrw, 1, zeek/cluster/node/proxy-1/ hrw, 2, zeek/cluster/node/proxy-1/ -hrw, 3, zeek/cluster/node/proxy-2/ +hrw, 3, zeek/cluster/node/proxy-1/ hrw, 13, zeek/cluster/node/proxy-2/ hrw, 37, zeek/cluster/node/proxy-2/ -hrw, 42, zeek/cluster/node/proxy-1/ +hrw, 42, zeek/cluster/node/proxy-2/ hrw, 101, zeek/cluster/node/proxy-2/ rr, zeek/cluster/node/proxy-1/ rr, zeek/cluster/node/proxy-2/ @@ -15,13 +15,13 @@ rr, zeek/cluster/node/proxy-1/ rr, zeek/cluster/node/proxy-2/ rr, zeek/cluster/node/proxy-1/ rr, zeek/cluster/node/proxy-2/ -hrw, 0, zeek/cluster/node/proxy-2/ -hrw, 1, zeek/cluster/node/proxy-2/ +hrw, 0, zeek/cluster/node/proxy-1/ +hrw, 1, zeek/cluster/node/proxy-1/ hrw, 2, zeek/cluster/node/proxy-1/ -hrw, 3, zeek/cluster/node/proxy-2/ +hrw, 3, zeek/cluster/node/proxy-1/ hrw, 13, zeek/cluster/node/proxy-2/ hrw, 37, zeek/cluster/node/proxy-2/ -hrw, 42, zeek/cluster/node/proxy-1/ +hrw, 42, zeek/cluster/node/proxy-2/ hrw, 101, zeek/cluster/node/proxy-2/ 2nd stuff hrw, 0, zeek/cluster/node/proxy-2/ diff --git a/testing/btest/Baseline/scripts.base.frameworks.cluster.topic_distribution_bifs/proxy-1..stdout b/testing/btest/Baseline/scripts.base.frameworks.cluster.topic_distribution_bifs/proxy-1..stdout index 0649079972..b86028c482 100644 --- a/testing/btest/Baseline/scripts.base.frameworks.cluster.topic_distribution_bifs/proxy-1..stdout +++ b/testing/btest/Baseline/scripts.base.frameworks.cluster.topic_distribution_bifs/proxy-1..stdout @@ -1,5 +1,7 @@ +got distributed event hrw, 0 +got distributed event hrw, 1 got distributed event hrw, 2 -got distributed event hrw, 42 +got distributed event hrw, 3 got distributed event rr, 0 got distributed event rr, 2 got distributed event rr, 13 diff --git a/testing/btest/Baseline/scripts.base.frameworks.cluster.topic_distribution_bifs/proxy-2..stdout b/testing/btest/Baseline/scripts.base.frameworks.cluster.topic_distribution_bifs/proxy-2..stdout index 4f2bbbcea9..a83f3f7394 100644 --- a/testing/btest/Baseline/scripts.base.frameworks.cluster.topic_distribution_bifs/proxy-2..stdout +++ b/testing/btest/Baseline/scripts.base.frameworks.cluster.topic_distribution_bifs/proxy-2..stdout @@ -1,8 +1,6 @@ -got distributed event hrw, 0 -got distributed event hrw, 1 -got distributed event hrw, 3 got distributed event hrw, 13 got distributed event hrw, 37 +got distributed event hrw, 42 got distributed event hrw, 101 got distributed event rr, 1 got distributed event rr, 3 diff --git a/testing/btest/Baseline/scripts.base.utils.hash_hrw/output b/testing/btest/Baseline/scripts.base.utils.hash_hrw/output index 94ef962584..2c37b5b752 100644 --- a/testing/btest/Baseline/scripts.base.utils.hash_hrw/output +++ b/testing/btest/Baseline/scripts.base.utils.hash_hrw/output @@ -8,18 +8,18 @@ T F [id=0, user_data=alice] [id=3, user_data=dave] -[id=4, user_data=eve] -[id=4, user_data=eve] +[id=3, user_data=dave] +[id=0, user_data=alice] +[id=0, user_data=alice] [id=4, user_data=eve] [id=0, user_data=alice] -[id=3, user_data=dave] [id=1, user_data=bob] [id=0, user_data=alice] [id=1, user_data=bob] T -[id=4, user_data=eve] [id=3, user_data=dave] -[id=4, user_data=eve] +[id=3, user_data=dave] +[id=3, user_data=dave] [id=4, user_data=eve] [id=4, user_data=eve] [id=4, user_data=eve] @@ -30,11 +30,11 @@ T T [id=0, user_data=alice] [id=3, user_data=dave] -[id=4, user_data=eve] -[id=4, user_data=eve] -[id=4, user_data=eve] -[id=0, user_data=alice] [id=3, user_data=dave] +[id=0, user_data=alice] +[id=0, user_data=alice] +[id=4, user_data=eve] +[id=0, user_data=alice] [id=1, user_data=bob] [id=0, user_data=alice] [id=1, user_data=bob]