mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 08:08:19 +00:00
Reformat the world
This commit is contained in:
parent
194cb24547
commit
b2f171ec69
714 changed files with 35149 additions and 35203 deletions
|
@ -7,7 +7,8 @@
|
|||
|
||||
#include "zeek/plugin/Component.h"
|
||||
|
||||
namespace zeek::iosource {
|
||||
namespace zeek::iosource
|
||||
{
|
||||
|
||||
class IOSource;
|
||||
class PktSrc;
|
||||
|
@ -16,7 +17,8 @@ class PktDumper;
|
|||
/**
|
||||
* Component description for plugins providing IOSources.
|
||||
*/
|
||||
class Component : public plugin::Component {
|
||||
class Component : public plugin::Component
|
||||
{
|
||||
public:
|
||||
typedef IOSource* (*factory_callback)();
|
||||
|
||||
|
@ -34,7 +36,6 @@ public:
|
|||
~Component() override;
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Constructor to use by derived classes.
|
||||
*
|
||||
|
@ -44,21 +45,23 @@ protected:
|
|||
* be unique across all components of this type.
|
||||
*/
|
||||
Component(plugin::component::Type type, const std::string& name);
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Component description for plugins providing a PktSrc for packet input.
|
||||
*/
|
||||
class PktSrcComponent : public Component {
|
||||
class PktSrcComponent : public Component
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Type of input a packet source supports.
|
||||
*/
|
||||
enum InputType {
|
||||
LIVE, ///< Live input.
|
||||
TRACE, ///< Offline input from trace file.
|
||||
BOTH ///< Live input as well as offline.
|
||||
};
|
||||
enum InputType
|
||||
{
|
||||
LIVE, ///< Live input.
|
||||
TRACE, ///< Offline input from trace file.
|
||||
BOTH ///< Live input as well as offline.
|
||||
};
|
||||
|
||||
typedef PktSrc* (*factory_callback)(const std::string& path, bool is_live);
|
||||
|
||||
|
@ -75,7 +78,8 @@ public:
|
|||
*
|
||||
* @param factor Factory function to instantiate component.
|
||||
*/
|
||||
PktSrcComponent(const std::string& name, const std::string& prefixes, InputType type, factory_callback factory);
|
||||
PktSrcComponent(const std::string& name, const std::string& prefixes, InputType type,
|
||||
factory_callback factory);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
|
@ -119,7 +123,7 @@ private:
|
|||
std::vector<std::string> prefixes;
|
||||
InputType type;
|
||||
factory_callback factory;
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Component description for plugins providing a PktDumper for packet output.
|
||||
|
@ -127,14 +131,16 @@ private:
|
|||
* PktDumpers aren't IOSurces but we locate them here to keep them along with
|
||||
* the PktSrc.
|
||||
*/
|
||||
class PktDumperComponent : public plugin::Component {
|
||||
class PktDumperComponent : public plugin::Component
|
||||
{
|
||||
public:
|
||||
typedef PktDumper* (*factory_callback)(const std::string& path, bool append);
|
||||
|
||||
/**
|
||||
* XXX
|
||||
*/
|
||||
PktDumperComponent(const std::string& name, const std::string& prefixes, factory_callback factory);
|
||||
PktDumperComponent(const std::string& name, const std::string& prefixes,
|
||||
factory_callback factory);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
|
@ -165,6 +171,6 @@ public:
|
|||
private:
|
||||
std::vector<std::string> prefixes;
|
||||
factory_callback factory;
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace zeek::iosource
|
||||
} // namespace zeek::iosource
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue