Expand description
The OpenC2 Language Specification defines a language used to compose messages that instruct and coordinate the command and control of cyber defenses between and within networks and systems.
This crate provides types for OpenC2 commands and responses.
§Crate Purpose
This crate helps actuator implementers and other cybersecurity vendors interact with OpenC2 messages.
Re-exports§
pub use header::Headers;
Modules§
- header
- json
- Type aliases for JSON-based OpenC2 messages.
- primitive
- target
- Types for declaring the object of an action.
Structs§
- Args
- Command
- An OpenC2 command communicates an action to be performed on a target.
- Date
Time - Epoch milliseconds
- Domain
Name - Duration
- Email
Addr - Error
- Extensions
- Hashes
- Ipv4Net
- Ipv6Net
- MacAddr6
- MAC address in EUI-48 format.
- MacAddr8
- MAC address in EUI-64 format.
- Message
- An OpenC2 message.
- Notification
- Nsid
- Period
- Profile
Features - Response
- A message sent from an entity as the result of a command. Response messages provide acknowledgement, status, results from a query or other information as requested from the issuer of the command.
- Results
- Version
- OpenC2 version in “Major.Minor” format
Enums§
- Action
- The task or activity to be performed.
- Body
- The body of an OpenC2 message.
- Content
- The content of an OpenC2 message body.
- Feature
- MacAddr
- A MAC address, either in EUI-48 or EUI-64 format.
- Payload
- Response
Type - Status
Code - Target
- Target
Type
Traits§
- AsBody
- Trait for converting a type into a serializable body that conforms to the OpenC2 message body structure.
This allows for types such as
Message<Command>to be serialized correctly as OpenC2 bodies. - AsContent
- Trait for converting a type into a serializable message content that conforms to the OpenC2 message content structure.
This allows for types such as
Message<Command>to be serialized correctly as OpenC2 message contents. - Check
- Check an OpenC2 structure for validity that can’t be enforced by the type system.
- ErrorAt
- Trait for prepending location information to errors.
- IsEmpty
- Profile
- An OpenC2 actuator profile.
- Value
- An abstraction over different value types, such as JSON or CBOR.