arm_register_transaction (3) Linux Manual Page
NAME
arm_register_transaction – describe transaction
SYNOPSIS
#include <arm4.h>
arm_error_t
arm_register_transaction(
DESCRIPTION
arm_register_transaction() describes metadata about a transaction.
app_id is an application ID returned from an arm_register_application() call in the same process.
buffer4 is a pointer to the user data buffer, if any. If the pointer is null (ARM_BUF4_NONE), there is no buffer. The sub-buffers that may be used are arm_subbuffer_metric_bindings_t and arm_subbuffer_tran_identity_t.
- 1.
- The Universal Unique Identifier (UUID) algorithm that is part of The Open Group specification: DCE 1.1: Remote Procedure Call. A developer could use the algorithm at the time the application is developed using a utility on his or her system, and be reasonably certain that nobody else would generate the same 128-bit ID.
- 2.
- The MD5 Message-Digest Algorithm, described in IETF RFC 1321. Applying this algorithm to a concatenation of all the metadata properties would almost certainly result in a value that would not collide with any other ID created with a different set of metadata properties. If an ARM implementation is passed an ID that was previously registered within this process, the implementation can ignore the other metadata parameters and assume they are identical to the previously registered metadata. The transaction metadata consists of the following fields: app_id, tran_name, and the arm_subbuffer_metric_bindings_t and arm_subbuffer_tran_identity_t sub-buffers passed in buffer4.
output_tran_id is a pointer to a 16-byte field. ARM will store a 16-byte value. There are no requirements on the value it is set to, except that it must be possible to pass it on other calls, such as arm_start_transaction(), without the application needing to do any error checking.
tran_name is a pointer to a null-terminated string containing the name of the transaction. Each transaction registered by an application must have a unique name. The maximum length of the string is 128 characters, including the termination character. It serves no purpose and is illegal to make this call if the pointer is null. The name should not contain trailing blank characters or consist of only blank characters.
RETURN VALUE
On success, the function returns ARM_SUCCESS. A non-zero value indicates an error.
ERRORS
If the return code is negative, an error occurred. If the return code is not negative, an error may or may not have occurred – the determination of what is an error and whether an error code is returned is at the discretion of the ARM implementation. The application can test the return code if it wants to provide its own error logging.
The following errors are recognized by this implementation, but may not be portable to other implementations:
- ARM_FAILURE_NULL_ARGUMENT
- The output_tran_id pointer must not be null.
- ARM_FAILURE_INVALID_ARGUMENT
- The tran_name argument doesn’t match the string requirements.
-
- ARM_FAILURE_BAD_ALIAS
-
- The alias provided contains all 0’s or all 1’s.
- ARM_FAILURE_DUPLICATE_ALIAS
- The alias provided already refers to a transaction with different metadata. ARM_FAILURE_INTERNAL_ERROR An internal error has occurred that prevented the operation from completing. Check your system log for more details.
CONFORMING TO
ARM Issue 4.0 C Language Bindings, Version 2
EXAMPLE
None.
SEE ALSO
arm_register_application(3), arm_report_transaction(3), arm_start_transaction(3)
