SPI and Extensions
Specification Lifecycle Services
// Pattern for all domain services
ResolvedSpec resolved = DomainService.resolve(spec, backendContext);
RuntimeSpec runtime = DomainService.build(resolved, streamContext);PacketPolicyService
public interface PacketPolicyService {
static ResolvedPacketPolicy resolve(PacketPolicy policy, BackendContext backend);
static RuntimePacketPolicy build(ResolvedPacketPolicy resolved, StreamContext stream);
}// Typically called internally by frontend
ResolvedPacketPolicy resolved = PacketPolicyService.resolve(
stack.getPacketPolicy(),
backendContext);
RuntimePacketPolicy runtime = PacketPolicyService.build(
resolved,
streamContext);
// Now ready for hot-path operations
Packet packet = runtime.acquire(hdr, data, descriptorType);ProtocolStackService
Pack-Level Protocol Discovery
Implementing a Protocol Provider
Service Registration
Static Lookup Methods
Protocol Configuration Provider
Template Discovery
Available Templates
Template
Description
Use Case
Template Usage
Analyzer Plugins
Implementing an Analyzer Provider
Service Registration
Bitmask Pruning
Heuristics Plugins
Heuristic Provider
Example: HTTP Detection Heuristic
Backend Context
Backend Processor Substitution
Custom Protocol Pack Example
1. Define Protocol Configuration
2. Implement Protocol Provider
3. Implement Processor
4. Register Services
5. Use in Application
Last updated