Files
be.ems/src/modules/trace/model/trace_task_udp_msg.go
2025-04-22 14:25:55 +08:00

43 lines
1.7 KiB
Go

package model
type TraceDefType = int64
const (
MSG_TYPE_REQ TraceDefType = 0
MSG_TYPE_RSP TraceDefType = 1
MSG_DIRECT_RECV TraceDefType = 0
MSG_DIRECT_SEND TraceDefType = 1
// NF_TYPE_AMF = "AMF"
// NF_TYPE_SMF = "SMF"
// NF_TYPE_AUSF = "AUSF"
// NF_TYPE_UDM = "UDM"
// NF_TYPE_PCF = "PCF"
)
// TraceMsg 跟踪_消息
type TraceMsg struct {
TraceId int
MsgType TraceDefType //0-req, 1-rsp
MsgDirect TraceDefType //0-recv,1-send
NfName string
MsgEvent string //e.g: CreateContextReq
IMSI string
IfType string //interface type: N2,N8...
SrcIpStr string
DstIpStr string
Timestamp int64
}
// TraceReq 跟踪_请求
type TraceReq struct {
TraceId int64 `json:"traceId"` // Unique identifier for trace operations:delete...
TraceType string `json:"traceType"` // Type of trace: Interface;UE; Device
StartTime string `json:"startTime"` // Start time of the trace: e.g., "2025-04-12 11:24:59"
EndTime string `json:"endTime"` // End time of the trace: e.g., "2025-04-12 14:24:59"
Interfaces []string `json:"interfaces,omitempty"` // List of interfaces: e.g., ["N8", "N10", "N1/N2"]
IMSI string `json:"imsi,omitempty"` // International Mobile Subscriber Identity
SrcIp string `json:"srcIp,omitempty"` // Source IP address (used for device-level filtering)
DstIp string `json:"dstIp,omitempty"` // Destination IP address (used for device-level filtering)
NotifyUrl string `json:"notifyUrl,omitempty"` // Notification URL: e.g., "udp:192.168.5.58:33033"
}