package
Version:
v1.0.0
Opens a new window with list of versions in this module.
Published: Mar 25, 2026
License: GPL-3.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package stack provides multi-layer protocol stack decoding engine.
Encapsulate wraps data in multiple protocol layers.
Engine is the multi-layer protocol stack decoder.
NewEngine creates a new stack engine with default rules.
AddRule adds a dispatch rule.
Decode decodes multiple protocol layers from raw data.
type Layer struct {
Protocol string `json:"protocol"`
Fields map[string]any `json:"fields"`
Bytes int `json:"bytes_read"`
}
Layer represents a decoded protocol layer.
type Rule struct {
Field string `json:"field"`
Value any `json:"value"`
Next string `json:"next_protocol"`
}
Rule defines a protocol dispatch rule.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.