Merge remote-tracking branch 'microsoft/master'

* microsoft/master: (71 commits)
  Clang formatting
  Mask ports before inserting them into the map
  Fix compiler warning from applied patch
  Remove statistics plugin in favor of stats bif
  Add EventHandler version of stats plugin
  Mark a few EventHandler methods const
  Changed implementation from std::map to std::unordered_map of Val.cc
  Removed const, Windows build is now working
  Added fixes suggested in PR
  Update src/packet_analysis/protocol/ip/IP.cc
  Apply suggestions from code review
  Clang format again but now with v13.0.1
  Rewrote usages of define(_MSC_VER) to ifdef _MSC_VER
  Clang format it all
  Fixed initial CR comments
  Add NEWS entry about Windows port
  Add a couple of extra unistd.h includes to fix a build failure
  Use std::chrono instead of gettimeofday
  Update libkqueue submodule [nomail]
  Don't call tokenize_string if the input string is empty
  ...
This commit is contained in:
Tim Wojtulewicz 2022-11-11 15:13:47 -07:00
commit a8fc63e182
86 changed files with 1001 additions and 261 deletions

View file

@ -2,6 +2,8 @@
#pragma once
#include "zeek/zeek-config.h"
#include <sys/types.h>
#include <chrono>
#include <cstdint>
@ -143,18 +145,26 @@ public:
*/
struct NodeConfig
{
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
// This block exists because the default implementations
// themselves trigger deprecation warnings for accessing the
// "scripts" field. It can go when we remove that deprecation.
NodeConfig() = default;
#ifndef _MSC_VER
// MSVC throws this error when specifing this constructor:
// error C2580: multiple versions of a defaulted special member functions are not allowed
NodeConfig(NodeConfig&) = default;
#endif
NodeConfig(const NodeConfig&) = default;
NodeConfig(NodeConfig&&) = default;
~NodeConfig() = default;
NodeConfig& operator=(const NodeConfig&) = default;
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
/**
* Create configuration from script-layer record value.