mirror of
https://gitee.com/openharmony/communication_dsoftbus
synced 2024-11-23 08:49:59 +00:00
feat:update event type
Signed-off-by: hu-xiusong <huxiusong1@huawei.com>
This commit is contained in:
parent
3aa31140c3
commit
fc2c86f9e1
@ -29,6 +29,7 @@ extern "C" {
|
||||
#define SOFTBUS_EVENT_DOMAIN "DSOFTBUS"
|
||||
#define SOFTBUS_EVENT_PKG_NAME "dsoftbus"
|
||||
#define SOFTBUS_EVENT_TYPE_BEHAVIOR 4
|
||||
#define SOFTBUS_EVENT_TYPE_SECURITY 3
|
||||
|
||||
typedef struct {
|
||||
int32_t scene; // BIZ_SCENE
|
||||
|
@ -197,7 +197,7 @@ void SoftbusAuditInner(SoftbusEventModule module, SoftbusEventForm *form)
|
||||
return;
|
||||
}
|
||||
form->domain = SOFTBUS_EVENT_DOMAIN;
|
||||
form->eventType = SOFTBUS_EVENT_TYPE_BEHAVIOR;
|
||||
form->eventType = SOFTBUS_EVENT_TYPE_SECURITY;
|
||||
form->orgPkg = SOFTBUS_EVENT_PKG_NAME;
|
||||
WriteSoftbusAudit(module, form);
|
||||
}
|
@ -68,7 +68,7 @@ DISCOVER_BEHAVIOR:
|
||||
PEER_DEV_TYPE: { type: STRING, desc: peer device type }
|
||||
|
||||
DISCOVER_AUDIT:
|
||||
__BASE: {type: BEHAVIOR, level: MINOR, desc: discovery audit behavior }
|
||||
__BASE: {type: SECURITY, level: CRITICAL, desc: discovery security audit }
|
||||
ORG_PKG: {type: STRING, desc: organization module name }
|
||||
FUNC: {type: STRING, desc: current function name }
|
||||
HOST_PKG: {type: STRING, desc: host module name }
|
||||
@ -138,7 +138,7 @@ BUSCENTER_BEHAVIOR:
|
||||
PEER_DEV_TYPE: { type: STRING, desc: peer device type }
|
||||
|
||||
BUSCENTER_AUDIT:
|
||||
__BASE: {type: BEHAVIOR, level: MINOR, desc: bus center audit behavior }
|
||||
__BASE: {type: SECURITY, level: CRITICAL, desc: bus center security audit }
|
||||
BIZ_SCENE: {type: INT32, desc: business scene }
|
||||
BIZ_STAGE: {type: INT32, desc: business stage }
|
||||
ORG_PKG: {type: STRING, desc: organization module name }
|
||||
@ -202,7 +202,7 @@ TRANSPORT_BEHAVIOR:
|
||||
PEER_NET_ID: { type: STRING, desc: peer device net id }
|
||||
|
||||
TRANSPORT_AUDIT:
|
||||
__BASE: {type: BEHAVIOR, level: MINOR, desc: transport audit behavior }
|
||||
__BASE: {type: SECURITY, level: CRITICAL, desc: transport recurity audit }
|
||||
ORG_PKG: {type: STRING, desc: business module name }
|
||||
FUNC: {type: STRING, desc: function name }
|
||||
HOST_PKG: {type: STRING, desc: host module name }
|
||||
@ -263,7 +263,7 @@ CONNECTION_BEHAVIOR:
|
||||
PEER_PORT: { type: STRING, desc: peer device port }
|
||||
|
||||
CONNECTION_AUDIT:
|
||||
__BASE: {type: BEHAVIOR, level: MINOR, desc: connection audit behavior }
|
||||
__BASE: {type: SECURITY, level: CRITICAL, desc: connection security audit }
|
||||
ORG_PKG: {type: STRING, desc: organization module name }
|
||||
FUNC: {type: STRING, desc: current function name }
|
||||
HOST_PKG: {type: STRING, desc: host module name }
|
||||
|
@ -191,7 +191,7 @@ HWTEST_F(LnnEventTest, LnnAuditTest001, TestSize.Level0)
|
||||
|
||||
HiSysEventMock mock;
|
||||
EXPECT_CALL(mock,
|
||||
HiSysEvent_Write(_, _, StrEq(SOFTBUS_EVENT_DOMAIN), StrEq(LNN_AUDIT_NAME), Eq(SOFTBUS_EVENT_TYPE_BEHAVIOR),
|
||||
HiSysEvent_Write(_, _, StrEq(SOFTBUS_EVENT_DOMAIN), StrEq(LNN_AUDIT_NAME), Eq(SOFTBUS_EVENT_TYPE_SECURITY),
|
||||
LnnAuditValidParamArrayMatcher(extra, VALID_EXTRA_SIZE), ParamArraySizeMatcher(VALID_EXTRA_SIZE - 1)))
|
||||
.Times(1);
|
||||
LNN_AUDIT(AUDIT_SCENE_DECRYPT_CONN_DATA, extra);
|
||||
|
@ -317,11 +317,11 @@ HWTEST_F(TransEventTest, TransEventTest008, TestSize.Level0)
|
||||
.errcode = 9527,
|
||||
.auditType = AUDIT_EVENT_MSG_ERROR,
|
||||
};
|
||||
constexpr int32_t VALID_EXTRA_SIZE = 3;
|
||||
constexpr int32_t VALID_EXTRA_SIZE = 4;
|
||||
|
||||
HiSysEventMock mock;
|
||||
EXPECT_CALL(mock,
|
||||
HiSysEvent_Write(_, _, StrEq(SOFTBUS_EVENT_DOMAIN), StrEq(TRANS_AUDIT_NAME), Eq(SOFTBUS_EVENT_TYPE_BEHAVIOR), _,
|
||||
HiSysEvent_Write(_, _, StrEq(SOFTBUS_EVENT_DOMAIN), StrEq(TRANS_AUDIT_NAME), Eq(SOFTBUS_EVENT_TYPE_SECURITY), _,
|
||||
ParamArraySizeMatcher(VALID_EXTRA_SIZE)))
|
||||
.Times(1);
|
||||
TRANS_AUDIT(AUDIT_SCENE_OPEN_SESSION, extra);
|
||||
@ -369,7 +369,7 @@ HWTEST_F(TransEventTest, TransEventTest009, TestSize.Level0)
|
||||
|
||||
HiSysEventMock mock;
|
||||
EXPECT_CALL(mock,
|
||||
HiSysEvent_Write(_, _, StrEq(SOFTBUS_EVENT_DOMAIN), StrEq(TRANS_AUDIT_NAME), Eq(SOFTBUS_EVENT_TYPE_BEHAVIOR),
|
||||
HiSysEvent_Write(_, _, StrEq(SOFTBUS_EVENT_DOMAIN), StrEq(TRANS_AUDIT_NAME), Eq(SOFTBUS_EVENT_TYPE_SECURITY),
|
||||
TransAuditValidParamArrayMatcher(validExtra, VALID_EXTRA_SIZE), ParamArraySizeMatcher(VALID_EXTRA_SIZE)))
|
||||
.Times(1);
|
||||
TRANS_AUDIT(AUDIT_SCENE_OPEN_SESSION, validExtra);
|
||||
|
Loading…
Reference in New Issue
Block a user