代码拉取完成,页面将自动刷新
package packet
import "gitee.com/ixxyy/goboot/utils/text/gstr"
//
// FlowPacket
// @Description: flow packet
//
type FlowPacket struct {
Seq uint64
SrcMac string `json:"SrcMac"`
SrcIp string `json:"SrcIp"`
SrcIpv6 string `json:"SrcIpv6"`
SrcPort int `json:"SrcPort"`
DstMac string `json:"DstMac"`
DstIp string `json:"DstIp"`
DstIpv6 string `json:"DstIpv6"`
DstPort int `json:"DstPort"`
MetaTimestamp int64
MetaCaptureLength int
MetaLength int
MetaInterfaceIndex int
MetaTruncated int
EtherType string `json:"EtherType"`
L3Version string `json:"L3Version"`
L4Protocol string `json:"L4Protocol"`
Protocol string `json:"Protocol"`
PacketData string `json:"PacketData"`
PacketLength int `json:"PacketLength"`
SampleTime int64 `json:"TimeReceived"`
SampleIp string `json:"SamplerIp"`
HttpType string `json:"HttpType"`
Command string `json:"Command"`
HttpHeaders map[string]string `json:"HttpHeaders"`
UserAgent string `json:"UserAgent"`
HttpStatus string `json:"HttpStatus"`
RequestUri string `json:"RequestUri"`
Body string `json:"body"`
PassivePort int `json:"PassivePort"`
}
//
// getServiceHost
// @Description: get target service ip and port
// @receiver flow
// @return string
//
func (flow *FlowPacket) getServiceHost() string {
if flow.DstPort <= 0 && !gstr.IsValidIp(flow.DstIp) {
return ""
}
return flow.DstIp + ":" + gstr.ToString(flow.DstPort)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。