Ransomware attackers specifically target and attempt to destroy backup systems to increase the probability of payment. Hardening your system is critical. Please ensure you have reviewed your platform security using the Security Hardening Checklist
Cohesity

COHESITY Documentation

Explore our documentation to get started, discover products & new features, access troubleshooting guides, register sources, platforms support.

Products
Data Security Alliance
Visit Cohesity.com
Demos
Support
Blogs
Developers
Partner Portals
Cohesity Community
© 2026 Cohesity, Inc. All Rights Reserved.
Terms of Use|
Privacy Policy|
Legal|
  1. Home
  2. Veritas NetBackup™ DataStore SDK Programmer's Guide for XBSA 1.1.0
  3. API reference
  4. Function specifications
  5. BSACreateObject
Veritas NetBackup™ DataStore SDK Programmer's Guide for XBSA 1.1.0

BSACreateObject

Create an XBSA object.

SYNOPSIS

#include <xbsa.h>

int BSACreateObject(BSA_Handle bsaHandle, BSA_ObjectDescriptor *objectDescriptorPtr, BSA_DataBlock32 *dataBlockPtr)

DESCRIPTION

The BSACreateObject() call creates an XBSA object within NetBackup. Duplicate BSA_ObjectNames are allowed.

The BSACreateObject() call is used to create an XBSA object based on the information in the objectDescriptor. This call initiates the communication between the NetBackup XBSA interface and the NetBackup server. The XBSA object data can then be passed in memory buffers. The dataBlockPtr parameter in the BSACreateObject() call allows the caller to obtain information about the buffer structure required by the NetBackup XBSA interface.

The XBSA object data is passed through one or more BSASendData() calls. If there is no data to be sent, then a BSAEndData() call must be used to indicate completion of the XBSA object. The BSASendData() and BSAEndData() calls must follow the BSACreateObject() call and must be in the same transaction.

PARAMETERS

BSA_Handle bsaHandle (I)

This parameter is the handle that associates this call with a previous BSAInit() call.

BSA_ObjectDescriptor *objectDescriptorPtr (I/O)

This parameter is used to pass XBSA object attributes, including its name, copy type, and so on.

BSA_DataBlock32 *dataBlockPtr (O)

This parameter is a pointer to a structure that is used to obtain the details of the required buffer structure.

EXTENDED DESCRIPTION

Within the XBSA object descriptor, all fields must contain valid values. Enumerations must contain one of their enumerated values. Strings must be null-terminated. All other fields must be in the range of valid values for that field.

The following fields in the XBSA object descriptor are optional: objectOwner, objectDescription, and objectInfo. The optional value for either field of objectOwner and the field objectDescription is the empty string. The optional value for objectInfo is all zeros. If the bsa_ObjectOwner is empty, it defaults to the value specified in BSAInit().

Note:

For NetBackup XBSA Version 1.1.0, the NetBackup XBSA interface and NetBackup determine the XBSA object ownership. If the bsa_ObjectOwner field is specified, it is saved with the object but does not define ownership.

The following fields in the XBSA object descriptor are mandatory: objectName, copyType, estimatedSize, resourceType, and objectType. For objectName this means that the pathName must contain a non-empty string. For copyType and objectType the enumeration value "ANY" is not allowed.

The estimatedSize must contain a non-zero estimate if the XBSA application intends to create a non-empty XBSA object (that is, there is XBSA object data). This size is in bytes. If the estimatedSize is zero, this call must be followed by a BSAEndData() without calling BSASendData() in between. There are no resource allocations based on this estimate, only whether the object will have data or not, so the estimate does not need to be accurate.

The NetBackup XBSA interface can return several values to the XBSA application through the objectDescriptorPtr for a newly created XBSA object. The interface returns either all or none of these values.

The copyId attribute is a persistent, fixed-length object identifier that remains unchanged throughout the life of the XBSA object.

Note:

For NetBackup XBSA Version 1.1.0, the copyId is only guaranteed to be unique on a given NetBackup master server.

If the copyId field is non-zero, the NetBackup XBSA interface returned values for the copyId, createTime, restoreOrder, and objectStatus fields.

The createTime field is in UTC. The restoreOrder field can have the value zero, which means that the NetBackup XBSA interface did not specify a restore order.

The dataBlockPtr structure does not point to an actual data buffer. All of the values in the dataBlockPtr should be zero, and they are overwritten. The structure is used by the NetBackup XBSA interface to provide the XBSA application with the interface preference for the structure of the data blocks that are used to pass the NetBackup XBSA object's data. The XBSA application should examine the values returned to determine the buffer structure that it should create. The significance of the returned values is as follows:

bufferLen == 0

NetBackup has no restrictions on the buffer length. No trailer portion is required.

bufferLen != 0

NetBackup accepts buffers that are at least bufferLen bytes in length (minimum length). The length of the trailer portion of buffers is: trailerBytes >= (bufferLen - numBytes - headerBytes)

numBytes == 0

NetBackup has no restrictions on the length of the data portion of the buffer.

numBytes != 0

The maximum length of the data portion of buffers accepted by NetBackup must not exceed numBytes bytes.

headerBytes == 0

NetBackup only accepts buffers with no header portion.

headerBytes != 0

The length of the header portion of buffers accepted by NetBackup is headerBytes bytes.

bufferPtr

Not used

The values returned by the call to BSACreateObject() remain in effect for the duration of the data transfer of the XBSA object being created, that is, until the next BSAEndData() call. The NetBackup XBSA interface currently does not have any header or trailer requirements, so the full buffer specified can be used by the XBSA application. This is documented for completeness with the XBSA specification and to allow for future use of these fields as specified by the XBSA specifications.

RETURN VALUE

The following return codes are returned by this function:

BSA_RC_ABORT_SYSTEM_ERROR

System detected error, operation aborted.

BSA_RC_ACCESS_FAILURE

Cannot create the XBSA object with the given descriptor.

BSA_RC_INVALID_CALL_SEQUENCE

The sequence of API calls is incorrect.

BSA_RC_INVALID_DATABLOCK

The BSA_DataBlock32 parameter contained an inconsistent value.

BSA_RC_INVALID_HANDLE

The handle used to associate this call with a previous BSAInit() call is invalid.

BSA_RC_INVALID_OBJECTDESCRIPTOR

The BSA_ObjectDescriptor was invalid.

BSA_RC_NULL_ARGUMENT

A NULL pointer was encountered in one of the arguments

BSA_RC_SUCCESS

The function succeeded.

Feedback

Was this page helpful?
Previous

BSABeginTxn

Next

BSADeleteObject

Feedback

Was this page helpful?