Documentation
¶
Index ¶
- Constants
- func Close()
- func Connected() bool
- func DPCtrlAddMAC(iface string, mac, ucmac, bcmac, oldmac, pmac net.HardwareAddr, pips []net.IP)
- func DPCtrlAddNfqPort(netns, iface string, qno int, epmac net.HardwareAddr, jumboframe *bool)
- func DPCtrlAddPortPair(vex_iface, vin_iface string, epmac net.HardwareAddr, quar *bool)
- func DPCtrlAddSrvcPort(iface string, jumboframe *bool)
- func DPCtrlAddTapPort(netns, iface string, epmac net.HardwareAddr)
- func DPCtrlBldDlp(dlpRulesInfo []*DPDlpRuleEntry, dlpDpMacs utils.Set, delmacs utils.Set, ...) int
- func DPCtrlBldDlpChgMac(oldmacs, addmacs, delmacs utils.Set)
- func DPCtrlClearSession(id uint32)
- func DPCtrlConfigAgent(debug *DPDebug)
- func DPCtrlConfigDlp(wldlprule *DPWorkloadDlpRule) int
- func DPCtrlConfigInternalSubnet(subnets map[string]share.CLUSSubnet)
- func DPCtrlConfigMAC(MACs []string, tap *bool, appMap map[share.CLUSProtoPort]*share.CLUSApp)
- func DPCtrlConfigNBE(MACs []string, nbe *bool)
- func DPCtrlConfigPolicy(policy *DPWorkloadIPPolicy, cmd uint) int
- func DPCtrlConfigPolicyAddr(subnets map[string]share.CLUSSubnet)
- func DPCtrlConfigSpecialIPSubnet(subnets map[string]share.CLUSSpecSubnet)
- func DPCtrlCountSession(cb DPCallback, param interface{})
- func DPCtrlCounterAgent(cb DPCallback, param interface{})
- func DPCtrlDelMAC(iface string, mac net.HardwareAddr)
- func DPCtrlDelNfqPort(netns, iface string)
- func DPCtrlDelPortPair(vex_iface, vin_iface string)
- func DPCtrlDelSrvcPort(iface string)
- func DPCtrlDelTapPort(netns, iface string)
- func DPCtrlDeleteFqdn(names []string) int
- func DPCtrlDlpCfgChgMac(delmacs utils.Set)
- func DPCtrlListMeter(cb DPCallback, param interface{})
- func DPCtrlListSession(cb DPCallback, param interface{})
- func DPCtrlRefreshApp()
- func DPCtrlSetDetectUnmanagedWl(detectUnmanagedWl *bool)
- func DPCtrlSetDisableNetPolicy(disableNetPolicy *bool)
- func DPCtrlSetEnableIcmpPolicy(enableIcmpPolicy *bool)
- func DPCtrlSetFqdnIp(fqdnip *share.CLUSFqdnIp) int
- func DPCtrlSetSysConf(xffenabled *bool)
- func DPCtrlStatsAgent(cb DPCallback, param interface{})
- func DPCtrlStatsMAC(macs []*net.HardwareAddr, cb DPCallback, param interface{})
- func Open(cb DPTaskCallback, sc chan bool, ec chan interface{})
- func ParseDPMsgHeader(msg []byte) *C.DPMsgHdr
- type Connection
- type ConnectionData
- type DPAddMAC
- type DPAddMACReq
- type DPAddNfqPortReq
- type DPAddPortPairReq
- type DPAddSrvcPortReq
- type DPAddTapPortReq
- type DPCallback
- type DPClearSession
- type DPClearSessionReq
- type DPConfigMACReq
- type DPConfigNbeReq
- type DPCountSessionReq
- type DPCounterAgentReq
- type DPDebug
- type DPDelMAC
- type DPDelMACReq
- type DPDelNfqPortReq
- type DPDelPortPairReq
- type DPDelSrvcPortReq
- type DPDelTapPortReq
- type DPDetectUnmanagedWl
- type DPDetectUnmanagedWlReq
- type DPDisableNetPolicy
- type DPDisableNetPolicyReq
- type DPDlpBldMACReq
- type DPDlpBldMac
- type DPDlpBldReq
- type DPDlpBuild
- type DPDlpCfg
- type DPDlpCfgMACReq
- type DPDlpCfgMac
- type DPDlpCfgReq
- type DPDlpRidSetting
- type DPDlpRuleEntry
- type DPDlpSetting
- type DPEmpty
- type DPEnableIcmpPolicy
- type DPEnableIcmpPolicyReq
- type DPFqdnDeleteReq
- type DPFqdnIpSetReq
- type DPFqdnIps
- type DPFqdnList
- type DPInternalSubnetCfg
- type DPInternalSubnetCfgReq
- type DPKeepAlive
- type DPKeepAliveReq
- type DPListMeterReq
- type DPListSessionReq
- type DPMACArray
- type DPMacConfig
- type DPMacPip
- type DPNbeConfig
- type DPNfqPort
- type DPPolicyAddressCfgReq
- type DPPolicyApp
- type DPPolicyCfg
- type DPPolicyCfgReq
- type DPPolicyIPRule
- type DPPortPair
- type DPProtoPortApp
- type DPRefreshApp
- type DPRefreshAppReq
- type DPSetDebugReq
- type DPSpecIPSubnetCfg
- type DPSpecSubnet
- type DPSpecialIPSubnetCfgReq
- type DPSrvcPort
- type DPStatsAgentReq
- type DPStatsMACReq
- type DPSubnet
- type DPSysConf
- type DPSysConfReq
- type DPTapPort
- type DPTask
- type DPTaskCallback
- type DPWorkloadDlpRule
- type DPWorkloadIPPolicy
- type IpFqdnStorageUpdate
Constants ¶
View Source
const ( DP_TASK_THREAT_LOG = iota DP_TASK_CONNECTION DP_TASK_HOST_CONNECTION DP_TASK_APPLICATION DP_TASK_FQDN_IP DP_TASK_IP_FQDN_STORAGE_UPDATE DP_TASK_IP_FQDN_STORAGE_RELEASE )
View Source
const DPServer string = "/tmp/dp_listen.sock"
Variables ¶
This section is empty.
Functions ¶
func DPCtrlAddMAC ¶
func DPCtrlAddMAC(iface string, mac, ucmac, bcmac, oldmac, pmac net.HardwareAddr, pips []net.IP)
func DPCtrlAddNfqPort ¶
func DPCtrlAddNfqPort(netns, iface string, qno int, epmac net.HardwareAddr, jumboframe *bool)
func DPCtrlAddPortPair ¶
func DPCtrlAddPortPair(vex_iface, vin_iface string, epmac net.HardwareAddr, quar *bool)
func DPCtrlAddSrvcPort ¶
func DPCtrlAddTapPort ¶
func DPCtrlAddTapPort(netns, iface string, epmac net.HardwareAddr)
func DPCtrlBldDlp ¶
func DPCtrlBldDlpChgMac ¶
func DPCtrlClearSession ¶
func DPCtrlClearSession(id uint32)
func DPCtrlConfigAgent ¶
func DPCtrlConfigAgent(debug *DPDebug)
func DPCtrlConfigDlp ¶
func DPCtrlConfigDlp(wldlprule *DPWorkloadDlpRule) int
func DPCtrlConfigInternalSubnet ¶
func DPCtrlConfigInternalSubnet(subnets map[string]share.CLUSSubnet)
func DPCtrlConfigMAC ¶
func DPCtrlConfigNBE ¶
func DPCtrlConfigPolicy ¶
func DPCtrlConfigPolicy(policy *DPWorkloadIPPolicy, cmd uint) int
func DPCtrlConfigPolicyAddr ¶
func DPCtrlConfigPolicyAddr(subnets map[string]share.CLUSSubnet)
func DPCtrlConfigSpecialIPSubnet ¶
func DPCtrlConfigSpecialIPSubnet(subnets map[string]share.CLUSSpecSubnet)
func DPCtrlCountSession ¶
func DPCtrlCountSession(cb DPCallback, param interface{})
func DPCtrlCounterAgent ¶
func DPCtrlCounterAgent(cb DPCallback, param interface{})
func DPCtrlDelMAC ¶
func DPCtrlDelMAC(iface string, mac net.HardwareAddr)
func DPCtrlDelNfqPort ¶
func DPCtrlDelNfqPort(netns, iface string)
func DPCtrlDelPortPair ¶
func DPCtrlDelPortPair(vex_iface, vin_iface string)
func DPCtrlDelSrvcPort ¶
func DPCtrlDelSrvcPort(iface string)
func DPCtrlDelTapPort ¶
func DPCtrlDelTapPort(netns, iface string)
func DPCtrlDeleteFqdn ¶
func DPCtrlDlpCfgChgMac ¶
func DPCtrlListMeter ¶
func DPCtrlListMeter(cb DPCallback, param interface{})
func DPCtrlListSession ¶
func DPCtrlListSession(cb DPCallback, param interface{})
func DPCtrlRefreshApp ¶
func DPCtrlRefreshApp()
func DPCtrlSetDetectUnmanagedWl ¶
func DPCtrlSetDetectUnmanagedWl(detectUnmanagedWl *bool)
func DPCtrlSetDisableNetPolicy ¶
func DPCtrlSetDisableNetPolicy(disableNetPolicy *bool)
func DPCtrlSetEnableIcmpPolicy ¶
func DPCtrlSetEnableIcmpPolicy(enableIcmpPolicy *bool)
func DPCtrlSetFqdnIp ¶
func DPCtrlSetFqdnIp(fqdnip *share.CLUSFqdnIp) int
func DPCtrlSetSysConf ¶
func DPCtrlSetSysConf(xffenabled *bool)
func DPCtrlStatsAgent ¶
func DPCtrlStatsAgent(cb DPCallback, param interface{})
func DPCtrlStatsMAC ¶
func DPCtrlStatsMAC(macs []*net.HardwareAddr, cb DPCallback, param interface{})
func Open ¶
func Open(cb DPTaskCallback, sc chan bool, ec chan interface{})
func ParseDPMsgHeader ¶
Types ¶
type Connection ¶
type Connection struct {
AgentID string
HostID string
ClientWL string
ServerWL string
ClientIP net.IP
ServerIP net.IP
Scope string
Network string
ServerPort uint16
ClientPort uint16
IPProto uint8
Application uint32
Bytes uint64
Sessions uint32
FirstSeenAt uint32
LastSeenAt uint32
ThreatID uint32
Severity uint8
PolicyAction uint8
Ingress bool
ExternalPeer bool
LocalPeer bool
PolicyId uint32
Violates uint32
Xff bool
SvcExtIP bool
ToSidecar bool
MeshToSvr bool
LinkLocal bool
TmpOpen bool
UwlIp bool
EpSessCurIn uint32
EpSessIn12 uint32
EpByteIn12 uint64
Nbe bool
NbeSns bool
}
type ConnectionData ¶
type ConnectionData struct {
EPMAC net.HardwareAddr
Conn *Connection
}
type DPAddMACReq ¶
type DPAddMACReq struct {
AddMAC *DPAddMAC `json:"ctrl_add_mac"`
}
type DPAddNfqPortReq ¶
type DPAddNfqPortReq struct {
AddNfqPort *DPNfqPort `json:"ctrl_add_nfq_port"`
}
type DPAddPortPairReq ¶
type DPAddPortPairReq struct {
AddPortPair *DPPortPair `json:"ctrl_add_port_pair"`
}
type DPAddSrvcPortReq ¶
type DPAddSrvcPortReq struct {
AddPort *DPSrvcPort `json:"ctrl_add_srvc_port"`
}
type DPAddTapPortReq ¶
type DPAddTapPortReq struct {
AddPort *DPTapPort `json:"ctrl_add_tap_port"`
}
type DPCallback ¶
type DPClearSession ¶
type DPClearSession struct {
ID uint32 `json:"filter_id"`
}
type DPClearSessionReq ¶
type DPClearSessionReq struct {
ClearSession *DPClearSession `json:"ctrl_clear_session"`
}
type DPConfigMACReq ¶
type DPConfigMACReq struct {
Cfg *DPMacConfig `json:"ctrl_cfg_mac"`
}
type DPConfigNbeReq ¶
type DPConfigNbeReq struct {
Cfg *DPNbeConfig `json:"ctrl_cfg_nbe"`
}
type DPCountSessionReq ¶
type DPCountSessionReq struct {
CountSession *DPEmpty `json:"ctrl_count_session"`
}
type DPCounterAgentReq ¶
type DPCounterAgentReq struct {
Counter *DPEmpty `json:"ctrl_counter_device"`
}
type DPDelMACReq ¶
type DPDelMACReq struct {
DelMAC *DPDelMAC `json:"ctrl_del_mac"`
}
type DPDelNfqPortReq ¶
type DPDelNfqPortReq struct {
DelNfqPort *DPNfqPort `json:"ctrl_del_nfq_port"`
}
type DPDelPortPairReq ¶
type DPDelPortPairReq struct {
DelPortPair *DPPortPair `json:"ctrl_del_port_pair"`
}
type DPDelSrvcPortReq ¶
type DPDelSrvcPortReq struct {
DelPort *DPSrvcPort `json:"ctrl_del_srvc_port"`
}
type DPDelTapPortReq ¶
type DPDelTapPortReq struct {
DelPort *DPTapPort `json:"ctrl_del_tap_port"`
}
type DPDetectUnmanagedWl ¶
type DPDetectUnmanagedWl struct {
DetectUnmanagedWl *bool `json:"detect_unmanaged_wl"`
}
type DPDetectUnmanagedWlReq ¶
type DPDetectUnmanagedWlReq struct {
DetectUnmanagedWlConf *DPDetectUnmanagedWl `json:"ctrl_detect_unmanaged_wl"`
}
type DPDisableNetPolicy ¶
type DPDisableNetPolicy struct {
DisableNetPolicy *bool `json:"disable_net_policy"`
}
type DPDisableNetPolicyReq ¶
type DPDisableNetPolicyReq struct {
DisableNetPolicyConf *DPDisableNetPolicy `json:"ctrl_disable_net_policy"`
}
type DPDlpBldMACReq ¶
type DPDlpBldMACReq struct {
DPDlpChgBldMac *DPDlpBldMac `json:"ctrl_bld_dlpmac"`
}
type DPDlpBldMac ¶
type DPDlpBldReq ¶
type DPDlpBldReq struct {
DPDlpBld *DPDlpBuild `json:"ctrl_bld_dlp"`
}
type DPDlpBuild ¶
type DPDlpBuild struct {
Flag uint `json:"flag"`
ApplyDir int `json:"dir"`
DlpRules []*DPDlpRuleEntry `json:"dlp_rules"`
WorkloadMac []string `json:"mac"`
DelMac []string `json:"delmac"`
}
type DPDlpCfg ¶
type DPDlpCfg struct {
Flag uint `json:"flag"`
WorkloadMac []string `json:"mac"`
DlpRuleNames []*DPDlpRidSetting `json:"dlp_rule_names"`
WafRuleNames []*DPDlpRidSetting `json:"waf_rule_names"`
RuleIds []uint32 `json:"rule_ids"`
WafRuleIds []uint32 `json:"waf_rule_ids"`
RuleType string `json:"ruletype"`
WafRuleType string `json:"wafruletype"`
}
type DPDlpCfgMACReq ¶
type DPDlpCfgMACReq struct {
DPDlpChgCfgMac *DPDlpCfgMac `json:"ctrl_cfg_dlpmac"`
}
type DPDlpCfgMac ¶
type DPDlpCfgMac struct {
DelMac []string `json:"delmac"`
}
type DPDlpCfgReq ¶
type DPDlpCfgReq struct {
DPWlDlpCfg *DPDlpCfg `json:"ctrl_cfg_dlp"`
}
type DPDlpRidSetting ¶
type DPDlpRuleEntry ¶
type DPDlpSetting ¶
type DPDlpSetting struct {
Name string `json:"name"`
ID uint32 `json:"id"`
Action uint8 `json:"action"`
}
dlp
type DPEnableIcmpPolicy ¶
type DPEnableIcmpPolicy struct {
EnableIcmpPolicy *bool `json:"enable_icmp_policy"`
}
type DPEnableIcmpPolicyReq ¶
type DPEnableIcmpPolicyReq struct {
EnableIcmpPolicyConf *DPEnableIcmpPolicy `json:"ctrl_enable_icmp_policy"`
}
type DPFqdnDeleteReq ¶
type DPFqdnDeleteReq struct {
Delete *DPFqdnList `json:"ctrl_cfg_del_fqdn"`
}
type DPFqdnIpSetReq ¶
type DPFqdnIpSetReq struct {
Fqdns *DPFqdnIps `json:"ctrl_cfg_set_fqdn"`
}
type DPFqdnList ¶
type DPFqdnList struct {
Names []string `json:"names"`
}
type DPInternalSubnetCfg ¶
type DPInternalSubnetCfgReq ¶
type DPInternalSubnetCfgReq struct {
SubnetCfg *DPInternalSubnetCfg `json:"ctrl_cfg_internal_net"`
}
type DPKeepAlive ¶
type DPKeepAlive struct {
SeqNum uint32 `json:"seq_num"`
}
type DPKeepAliveReq ¶
type DPKeepAliveReq struct {
Alive *DPKeepAlive `json:"ctrl_keep_alive"`
}
type DPListMeterReq ¶
type DPListMeterReq struct {
ListMeter *DPEmpty `json:"ctrl_list_meter"`
}
type DPListSessionReq ¶
type DPListSessionReq struct {
ListSession *DPEmpty `json:"ctrl_list_session"`
}
type DPMACArray ¶
type DPMACArray struct {
MACs []string `json:"macs"`
}
type DPMacConfig ¶
type DPMacConfig struct {
MACs []string `json:"macs"`
Tap *bool `json:"tap,omitempty"`
Apps *[]DPProtoPortApp `json:"apps,omitempty"`
}
type DPNbeConfig ¶
type DPPolicyAddressCfgReq ¶
type DPPolicyAddressCfgReq struct {
PolicyAddrCfg *DPInternalSubnetCfg `json:"ctrl_cfg_policy_addr"`
}
type DPPolicyApp ¶
type DPPolicyCfg ¶
type DPPolicyCfgReq ¶
type DPPolicyCfgReq struct {
DPPolicyCfg *DPPolicyCfg `json:"ctrl_cfg_policy"`
}
type DPPolicyIPRule ¶
type DPPolicyIPRule struct {
ID uint32 `json:"id"`
SrcIP net.IP `json:"sip"`
DstIP net.IP `json:"dip"`
SrcIPR net.IP `json:"sipr,omitempty"`
DstIPR net.IP `json:"dipr,omitempty"`
Port uint16 `json:"port"`
PortR uint16 `json:"portr"`
IPProto uint8 `json:"proto"`
Action uint8 `json:"action"`
Ingress bool `json:"ingress"`
Fqdn string `json:"fqdn,omitempty"`
Vhost bool `json:"vhost,omitempty"`
Apps []*DPPolicyApp `json:"apps,omitempty"`
}
type DPPortPair ¶
type DPProtoPortApp ¶
type DPRefreshApp ¶
type DPRefreshApp struct {
}
type DPRefreshAppReq ¶
type DPRefreshAppReq struct {
RefreshApp *DPRefreshApp `json:"ctrl_refresh_app"`
}
type DPSetDebugReq ¶
type DPSetDebugReq struct {
Debug *DPDebug `json:"ctrl_set_debug"`
}
type DPSpecIPSubnetCfg ¶
type DPSpecIPSubnetCfg struct {
Flag uint `json:"flag"`
Subnets []DPSpecSubnet `json:"subnet_addr"`
}
type DPSpecSubnet ¶
type DPSpecialIPSubnetCfgReq ¶
type DPSpecialIPSubnetCfgReq struct {
SubnetCfg *DPSpecIPSubnetCfg `json:"ctrl_cfg_specip_net"`
}
type DPSrvcPort ¶
type DPStatsAgentReq ¶
type DPStatsAgentReq struct {
Stats *DPEmpty `json:"ctrl_stats_device"`
}
type DPStatsMACReq ¶
type DPStatsMACReq struct {
Stats *DPMACArray `json:"ctrl_stats_macs"`
}
type DPSysConfReq ¶
type DPSysConfReq struct {
Sysconf *DPSysConf `json:"ctrl_sys_conf"`
}
type DPTask ¶
type DPTask struct {
Task int
MAC net.HardwareAddr
SecLog *share.CLUSThreatLog
Connects []*ConnectionData
Apps map[share.CLUSProtoPort]*share.CLUSApp
Fqdns *share.CLUSFqdnIp
FqdnStorageUpdate *IpFqdnStorageUpdate
FqdnStorageRelease net.IP
}
type DPTaskCallback ¶
type DPTaskCallback func(task *DPTask)
type DPWorkloadDlpRule ¶
type DPWorkloadDlpRule struct {
WlID string `json:"wl_id"`
Mode string `json:"mode"`
DefAction uint8 `json:"defact"`
ApplyDir int `json:"apply_dir"`
WorkloadMac []string `json:"mac"`
DlpRuleNames []*DPDlpSetting `json:"dlp_rule_names"`
WafRuleNames []*DPDlpSetting `json:"waf_rule_names"`
PolicyRuleIds []uint32 `json:"policy_rule_ids"`
PolWafRuleIds []uint32 `json:"polwaf_rule_ids"`
RuleType string `json:"ruletype"`
WafRuleType string `json:"wafruletype"`
}
type DPWorkloadIPPolicy ¶
type IpFqdnStorageUpdate ¶
Click to show internal directories.
Click to hide internal directories.