diff options
author | Artjoms Rimdjonoks <artjoms.rimdjonoks@zabbix.com> | 2021-08-05 09:22:00 +0300 |
---|---|---|
committer | Artjoms Rimdjonoks <artjoms.rimdjonoks@zabbix.com> | 2021-08-05 09:22:00 +0300 |
commit | adb86f8b0a1ca7a8aa8c548fdcfc657609b0deae (patch) | |
tree | 3b13abd1b51e186e66a69312f205632305c367c2 /src/libs/zbxaudit/audit_host.h | |
parent | d65744c3b121f5bcec2a1fd8c622ab9357620030 (diff) |
........S. [ZBXNEXT-6802] fixed formatting
Diffstat (limited to 'src/libs/zbxaudit/audit_host.h')
-rw-r--r-- | src/libs/zbxaudit/audit_host.h | 110 |
1 files changed, 42 insertions, 68 deletions
diff --git a/src/libs/zbxaudit/audit_host.h b/src/libs/zbxaudit/audit_host.h index 7245b09ae13..bfa436a03e8 100644 --- a/src/libs/zbxaudit/audit_host.h +++ b/src/libs/zbxaudit/audit_host.h @@ -23,27 +23,23 @@ #include "common.h" #include "audit.h" -#define PREPARE_AUDIT_SNMP_INTERFACE(resource) \ -void zbx_audit_##resource##_update_json_add_snmp_interface(zbx_uint64_t hostid, zbx_uint64_t version, zbx_uint64_t bulk,\ - const char *community, const char *securityname, zbx_uint64_t securitylevel, const char *authpassphrase,\ - const char *privpassphrase, zbx_uint64_t authprotocol, zbx_uint64_t privprotocol,\ - const char *contextname, zbx_uint64_t interfaceid); \ +#define PREPARE_AUDIT_SNMP_INTERFACE(resource) \ +void zbx_audit_##resource##_update_json_add_snmp_interface(zbx_uint64_t hostid, zbx_uint64_t version, \ + zbx_uint64_t bulk, const char *community, const char *securityname, zbx_uint64_t securitylevel, \ + const char *authpassphrase, const char *privpassphrase, zbx_uint64_t authprotocol, \ + zbx_uint64_t privprotocol, const char *contextname, zbx_uint64_t interfaceid); \ +void zbx_audit_##resource##_update_json_update_snmp_interface(zbx_uint64_t hostid, zbx_uint64_t version_old, \ + zbx_uint64_t version_new, zbx_uint64_t bulk_old, zbx_uint64_t bulk_new, \ + const char *community_old, const char *community_new, const char *securityname_old, \ + const char *securityname_new, zbx_uint64_t securitylevel_old, zbx_uint64_t securitylevel_new, \ + const char *authpassphrase_old, const char *authpassphrase_new, const char *privpassphrase_old, \ + const char *privpassphrase_new, zbx_uint64_t authprotocol_old, zbx_uint64_t authprotocol_new, \ + zbx_uint64_t privprotocol_old, zbx_uint64_t privprotocol_new, const char *contextname_old, \ + const char *contextname_new, zbx_uint64_t interfaceid); \ PREPARE_AUDIT_SNMP_INTERFACE(host) PREPARE_AUDIT_SNMP_INTERFACE(host_prototype) -void zbx_audit_host_update_json_add_snmp_interface(zbx_uint64_t hostid, zbx_uint64_t version, - zbx_uint64_t bulk, const char *community, const char *securityname, zbx_uint64_t securitylevel, - const char *authpassphrase, const char *privpassphrase, zbx_uint64_t authprotocol, - zbx_uint64_t privprotocol, const char *contextname, zbx_uint64_t interfaceid); -void zbx_audit_host_update_json_update_snmp_interface(zbx_uint64_t hostid, - zbx_uint64_t version_old, zbx_uint64_t version_new, zbx_uint64_t bulk_old, zbx_uint64_t bulk_new, - const char *community_old, const char *community_new, const char *securityname_old, - const char *securityname_new, zbx_uint64_t securitylevel_old, zbx_uint64_t securitylevel_new, - const char *authpassphrase_old, const char *authpassphrase_new, const char *privpassphrase_old, - const char *privpassphrase_new, zbx_uint64_t authprotocol_old, zbx_uint64_t authprotocol_new, - zbx_uint64_t privprotocol_old, zbx_uint64_t privprotocol_new, const char *contextname_old, - const char *contextname_new, zbx_uint64_t interfaceid); void zbx_audit_host_update_json_add_proxy_hostid_and_hostname(zbx_uint64_t hostid, zbx_uint64_t proxy_hostid, const char *hostname); void zbx_audit_host_update_json_add_tls_and_psk(zbx_uint64_t hostid, int tls_connect, int tls_accept, @@ -53,32 +49,33 @@ void zbx_audit_host_update_json_update_inventory_mode(zbx_uint64_t hostid, int i int inventory_mode_new); void zbx_audit_host_update_json_update_host_status(zbx_uint64_t hostid, int host_status_old, int host_status_new); -#define PREPARE_AUDIT_HOST_INTERFACE(resource, interface_resource, type1, type2) \ -void zbx_audit_##resource##_update_json_update_interface_##interface_resource(zbx_uint64_t hostid, \ - zbx_uint64_t interfaceid, type1 interface_resource##_old, type1 interface_resource##_new); \ -#define PREPARE_AUDIT_HOST(resource, audit_resource_flag) \ -void zbx_audit_##resource##_create_entry(int audit_action, zbx_uint64_t hostid, const char *name); \ -void zbx_audit_##resource##_update_json_add_interfaces(zbx_uint64_t hostid, zbx_uint64_t interfaceid, \ - zbx_uint64_t main_, zbx_uint64_t type, zbx_uint64_t useip, const char *ip, const char *dns, \ - int port); \ -PREPARE_AUDIT_HOST_INTERFACE(resource, useip, zbx_uint64_t, uint64) \ -PREPARE_AUDIT_HOST_INTERFACE(resource, main, zbx_uint64_t, uint64) \ -PREPARE_AUDIT_HOST_INTERFACE(resource, type, zbx_uint64_t, uint64) \ -PREPARE_AUDIT_HOST_INTERFACE(resource, ip, const char*, string) \ -PREPARE_AUDIT_HOST_INTERFACE(resource, dns, const char*, string) \ -PREPARE_AUDIT_HOST_INTERFACE(resource, port, int, int) \ -/* snmp */ \ -PREPARE_AUDIT_HOST_INTERFACE(resource, version, zbx_uint64_t, uint64) \ -PREPARE_AUDIT_HOST_INTERFACE(resource, bulk, zbx_uint64_t, uint64) \ -PREPARE_AUDIT_HOST_INTERFACE(resource, community, const char*, string) \ -PREPARE_AUDIT_HOST_INTERFACE(resource, securityname, const char*, string) \ -PREPARE_AUDIT_HOST_INTERFACE(resource, securitylevel, int, int) \ -PREPARE_AUDIT_HOST_INTERFACE(resource, authpassphrase, const char*, string) \ -PREPARE_AUDIT_HOST_INTERFACE(resource, privpassphrase, const char*, string) \ -PREPARE_AUDIT_HOST_INTERFACE(resource, authprotocol, zbx_uint64_t, uint64) \ -PREPARE_AUDIT_HOST_INTERFACE(resource, privprotocol, zbx_uint64_t, uint64) \ -PREPARE_AUDIT_HOST_INTERFACE(resource, contextname, const char*, string) \ +#define PREPARE_AUDIT_HOST_INTERFACE(resource, interface_resource, type1, type2) \ +void zbx_audit_##resource##_update_json_update_interface_##interface_resource(zbx_uint64_t hostid, \ + zbx_uint64_t interfaceid, type1 interface_resource##_old, type1 interface_resource##_new); \ + +#define PREPARE_AUDIT_HOST(resource, audit_resource_flag) \ +void zbx_audit_##resource##_create_entry(int audit_action, zbx_uint64_t hostid, const char *name); \ +void zbx_audit_##resource##_update_json_add_interfaces(zbx_uint64_t hostid, zbx_uint64_t interfaceid, \ + zbx_uint64_t main_, zbx_uint64_t type, zbx_uint64_t useip, const char *ip, const char *dns, \ + int port); \ +PREPARE_AUDIT_HOST_INTERFACE(resource, useip, zbx_uint64_t, uint64) \ +PREPARE_AUDIT_HOST_INTERFACE(resource, main, zbx_uint64_t, uint64) \ +PREPARE_AUDIT_HOST_INTERFACE(resource, type, zbx_uint64_t, uint64) \ +PREPARE_AUDIT_HOST_INTERFACE(resource, ip, const char*, string) \ +PREPARE_AUDIT_HOST_INTERFACE(resource, dns, const char*, string) \ +PREPARE_AUDIT_HOST_INTERFACE(resource, port, int, int) \ +/* snmp */ \ +PREPARE_AUDIT_HOST_INTERFACE(resource, version, zbx_uint64_t, uint64) \ +PREPARE_AUDIT_HOST_INTERFACE(resource, bulk, zbx_uint64_t, uint64) \ +PREPARE_AUDIT_HOST_INTERFACE(resource, community, const char*, string) \ +PREPARE_AUDIT_HOST_INTERFACE(resource, securityname, const char*, string) \ +PREPARE_AUDIT_HOST_INTERFACE(resource, securitylevel, int, int) \ +PREPARE_AUDIT_HOST_INTERFACE(resource, authpassphrase, const char*, string) \ +PREPARE_AUDIT_HOST_INTERFACE(resource, privpassphrase, const char*, string) \ +PREPARE_AUDIT_HOST_INTERFACE(resource, authprotocol, zbx_uint64_t, uint64) \ +PREPARE_AUDIT_HOST_INTERFACE(resource, privprotocol, zbx_uint64_t, uint64) \ +PREPARE_AUDIT_HOST_INTERFACE(resource, contextname, const char*, string) \ PREPARE_AUDIT_HOST(host, AUDIT_RESOURCE_HOST) PREPARE_AUDIT_HOST(host_prototype, AUDIT_RESOURCE_HOST_PROTOTYPE) @@ -92,9 +89,9 @@ void zbx_audit_host_prototype_update_json_add_details(zbx_uint64_t hostid, zbx_u int status, int discover, int custom_interfaces); void zbx_audit_host_prototype_update_json_add_templateid(zbx_uint64_t hostid, zbx_uint64_t templateid); -#define PREPARE_AUDIT_HOST_PROTOTYPE_UPDATE(resource, type1, type2) \ -void zbx_audit_host_prototype_update_json_update_##resource(zbx_uint64_t hostid, type1 old_##resource, \ - type1 new_##resource); \ +#define PREPARE_AUDIT_HOST_PROTOTYPE_UPDATE(resource, type1, type2) \ +void zbx_audit_host_prototype_update_json_update_##resource(zbx_uint64_t hostid, type1 old_##resource, \ + type1 new_##resource); \ PREPARE_AUDIT_HOST_PROTOTYPE_UPDATE(name, const char*, string) PREPARE_AUDIT_HOST_PROTOTYPE_UPDATE(status, int, int) @@ -106,27 +103,4 @@ void zbx_audit_host_prototype_update_json_add_group_details(zbx_uint64_t hostid, zbx_uint64_t groupid, zbx_uint64_t templateid); void zbx_audit_host_update_json_add_parent_template(zbx_uint64_t hostid, zbx_uint64_t templateid); void zbx_audit_host_prototype_update_json_add_templates(zbx_uint64_t hostid, zbx_vector_uint64_t *templateids); - - - -/* void zbx_audit_host_create_entry(int audit_action, zbx_uint64_t hostid, const char *name); */ -/* void zbx_audit_host_prototype_create_entry(int audit_action, zbx_uint64_t hostid, const char *name); */ - - - - - -/* void zbx_audit_host_prototype_update_json_add_snmp_interface(zbx_uint64_t hostid, zbx_uint64_t version, */ -/* zbx_uint64_t bulk, const char *community, const char *securityname, zbx_uint64_t securitylevel, */ -/* const char *authpassphrase, const char *privpassphrase, zbx_uint64_t authprotocol, */ -/* zbx_uint64_t privprotocol, const char *contextname, zbx_uint64_t interfaceid); */ -/* void zbx_audit_host_prototype_update_json_update_snmp_interface(zbx_uint64_t hostid, */ -/* zbx_uint64_t version_old, zbx_uint64_t version_new, zbx_uint64_t bulk_old, zbx_uint64_t bulk_new, */ -/* const char *community_old, const char *community_new, const char *securityname_old, */ -/* const char *securityname_new, zbx_uint64_t securitylevel_old, zbx_uint64_t securitylevel_new, */ -/* const char *authpassphrase_old, const char *authpassphrase_new, const char *privpassphrase_old, */ -/* const char *privpassphrase_new, zbx_uint64_t authprotocol_old, zbx_uint64_t authprotocol_new, */ -/* zbx_uint64_t privprotocol_old, zbx_uint64_t privprotocol_new, const char *contextname_old, */ -/* const char *contextname_new, zbx_uint64_t interfaceid); */ - #endif /* ZABBIX_AUDIT_HOST_H */ |