Crate zeek_websocket

Source
Expand description

§Rust types for interacting with Zeek over WebSocket

This library provides types for interacting with Zeek’s WebSocket API.

The main type of this crate is protocol::Binding which models Zeek’s WebSocket protocol. Binding depends on tungstenite and uses lower-level data types defined in types.

Types in types can be used independently from Binding with any backend.

The lowest-level type of the API is types::Value which allows converting between Zeek API types and Rust types, even user-defined types with ZeekType.

§Feature flags

  • tokio-client (enabled by default) — Enables tokio client.
  • derive (enabled by default) — Enables derive macros for converting to and from zeek_websocket_types::Value
  • tungstenite (enabled by default) — Enables conversions to and from tungstenite messages.

Modules§

client
Client implementation
protocol
Sans I/O-style protocol wrapper for the Zeek API
types
Types of Zeek’s WebSocket API

Structs§

Binding
Protocol wrapper for a Zeek WebSocket connection.
DateTime
Compound struct, holds Date and Time.
Event
A Zeek event.
Port
A Zeek port which holds both a port number and a protocol identifier.
Subscriptions
Topics to subscribe to. This should be the first message sent to the server.
TableEntry
An entry in a table in a Value::Table.
TimeDelta
Time duration with nanosecond precision.

Enums§

ConversionError
Error enum for errors related to conversions from a Zeek value.
Data
Data payload of a Zeek API message.
DeserializationError
Error enum for Zeek-related deserialization errors.
IpNetwork
Represents a generic network range. This type can have two variants: the v4 and the v6 case.
Message
Data messages of the Zeek API.
ParseError
Error enum for Zeek-related deserialization errors.
Protocol
A network protocol understood by Zeek.
SerializationError
Error enum for Zeek-related serialization errors.
Value
Enum for all basic types understood by Zeek’s WebSocket API.

Derive Macros§

ZeekType
Derive macro to convert a type from and to a zeek_websocket_types::Value