init
This commit is contained in:
31
internal/model/packet.go
Normal file
31
internal/model/packet.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package model
|
||||
|
||||
// TCPData TCP数据包模型
|
||||
type TCPData struct {
|
||||
Payload []byte
|
||||
Seq uint32
|
||||
Ack uint32
|
||||
SrcPort uint16
|
||||
DstPort uint16
|
||||
}
|
||||
|
||||
// CaptureResult 抓包结果
|
||||
type CaptureResult struct {
|
||||
Data []Equipment `json:"data"`
|
||||
Units []interface{} `json:"units"`
|
||||
}
|
||||
|
||||
// NetworkInterface 网络接口信息
|
||||
type NetworkInterface struct {
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Addresses []string `json:"addresses"`
|
||||
IsLoopback bool `json:"is_loopback"`
|
||||
}
|
||||
|
||||
// CaptureStatus 抓包状态
|
||||
type CaptureStatus struct {
|
||||
IsCapturing bool `json:"is_capturing"`
|
||||
Status string `json:"status"`
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user