NVIDIA DRIVE® Update DU-Link library interface.
Access DU Link file node interfaces using 'libnvdulink'.
Definition in file dulink.h.
Go to the source code of this file.
Data Structures | |
| struct | DULINK_ACL_ENTRY |
| Access Control List Entry. More... | |
| struct | DULINK_ATTR |
| Attribute of an DU-Link node. More... | |
Macros | |
| #define | DULINK_SUID_LINK (0U) |
| Sub-unit ID for internal DU Link functionality. More... | |
| #define | DULINK_SUID_CB (1U) |
| Sub-unit ID for callback functionality. More... | |
| #define | DULINK_ECODE(err) DU_ECODE(DU_UID_LINK, DULINK_SUID_LINK, (err)) |
| Used to tag DU Link internal error codes. More... | |
| #define | DULINK_CB_ECODE(err) DU_ECODE(DU_UID_LINK, DULINK_SUID_CB, (err)) |
| Used to tag callback specific error codes. More... | |
| #define | DULINK_ERR_GENERIC DULINK_ECODE(1U) |
| DU Link generic error. More... | |
| #define | DULINK_ERR_INVALID_ARGUMENT DULINK_ECODE(2U) |
| DU Link invalid argument error. More... | |
| #define | DULINK_ERR_BUFFER_TOO_SMALL DULINK_ECODE(3U) |
| DU Link buffer too small error. More... | |
| #define | DULINK_ERR_NOT_FOUND DULINK_ECODE(4U) |
| DU Link element or node can not found error. More... | |
| #define | DULINK_ERR_NOT_SUPPORTED DULINK_ECODE(5U) |
| DU Link operation type or messag type not supportedd error. More... | |
| #define | DULINK_ERR_NO_PERMISSION DULINK_ECODE(6U) |
| DU Link no permission error. More... | |
| #define | DULINK_ERR_ALLOC_FAILED DULINK_ECODE(7U) |
| DU Link allocate error. More... | |
| #define | DULINK_ERR_BUSY DULINK_ECODE(8U) |
| DU Link resource busy error. More... | |
| #define | DULINK_ERR_UPLINK_NOT_READY DULINK_ECODE(9U) |
| DU Link uplink not ready error. More... | |
| #define | DULINK_ERR_ROUTING DULINK_ECODE(10U) |
| DU Link router can not routing error. More... | |
| #define | DULINK_ERR_TIMEOUT DULINK_ECODE(11U) |
| DU Link timeout error. More... | |
| #define | DULINK_ERR_TRANSPORT DULINK_ECODE(12U) |
| DU Link transport error. More... | |
| #define | DULINK_ERR_ILLEGALMSG DULINK_ECODE(13U) |
| DU Link illegal message error. More... | |
| #define | DULINK_ERR_ROUTING_RETMSG DULINK_ECODE(14U) |
| DU Link router routing ret message error. More... | |
| #define | DULINK_ERR_NO_DST DULINK_ECODE(15U) |
| DU Link no destination error. More... | |
| #define | DULINK_ERR_NO_MEMORY DULINK_ECODE(16U) |
| DU Link no enough memory error. More... | |
| #define | DULINK_ERR_NO_P2P DULINK_ECODE(17U) |
| DU Link no P2P connection error. More... | |
| #define | DULINK_ERR_NO_CONNECT DULINK_ECODE(18U) |
| DU Link no connection error. More... | |
| #define | DULINK_ERR_ILLEGAL_OP DULINK_ECODE(19U) |
| DU Link illegal operation error. More... | |
| #define | DULINK_ERR_INIT DULINK_ECODE(20U) |
| DU Link initialize error. More... | |
| #define | DULINK_ERR_CLOSE DULINK_ECODE(21U) |
| DU Link close error. More... | |
| #define | DULINK_ERR_NOT_INIT DULINK_ECODE(22U) |
| DU Link not initialized error. More... | |
| #define | DULINK_CB_RCODE DU_RCODE |
| #define | DULINK_CB_OK DU_OK |
| #define | DULINK_CB_ERR_IO DULINK_CB_ECODE(1U) |
| #define | DULINK_CB_ERR_INVALID_ARGUMENT DULINK_CB_ECODE(2U) |
| #define | DULINK_CB_ERR_SYNTAX DULINK_CB_ECODE(3U) |
| #define | DULINK_CB_ERR_UNKNOWN DULINK_CB_ECODE(4U) |
| #define | DULINK_CB_ERR_BUSY_RETRY DULINK_CB_ECODE(5U) |
| #define | DULINK_CB_ERR_NOT_SUPPORTED DULINK_CB_ECODE(6U) |
| #define | DULINK_CB_ERR_NO_NODE DULINK_CB_ECODE(7U) |
| #define | DULINK_IS_CB_ERR(rcode) (DU_ECODE_GET_SUID(rcode) == DULINK_SUID_CB) |
| Used to check if DU_RCODE return is from a DU Link callback. More... | |
| #define | DULINK_GET_CB_ERR(rcode) (DU_ECODE_GET_ERR(rcode)) |
| Get DULINK_CB_RCODE value from a DU_RCODE return value. More... | |
| #define | DULINK_VERSION_STR "2" |
| DU Link version string. More... | |
| #define | DULINK_MAX_PATH (256U) |
| Maximum string length of a DU Link path. More... | |
| #define | DULINK_MAX_NODE_NAME (DULINK_MAX_PATH) |
| Maximum allowed DU-Link node name. More... | |
| #define | DULINK_MAX_CHILDNODE (256U) |
| Maximum allowed child nodes within each DU-Link node. More... | |
| #define | DULINK_MAX_NODES (256U) |
| Maximum number of nodes within DU-Link instance. More... | |
| #define | DULINK_MAX_ACL (16U) |
| Maximum number of ACLs of a single node. More... | |
| #define | DULINK_MAX_NOTIFY_NODES (16U) |
| Maximum allowed number of notify nodes. More... | |
| #define | DULINK_MAX_NODES_TO_NOTIFY (8U) |
| Maximum number of nodes a notify node can signal. More... | |
| #define | DULINK_MAX_NOTIFY_MSG_LEN (1024U) |
| Maximum data length to read or write by notify node. More... | |
| #define | DULINK_MAX_DATA_SIZE (1024U * 1024U) |
| Maximum data buffer size that one DU-Link transaction can handle. More... | |
| #define | DULINK_PERMISSION_NONE (0x00U) |
| #define | DULINK_PERMISSION_READ (0x01U) |
| Represents read and size permission. More... | |
| #define | DULINK_PERMISSION_WRITE (0x02U) |
| Represents write permission. More... | |
| #define | DULINK_PERMISSION_WRITE_MASK (0xFDU) |
| Represents write permission mask. More... | |
| #define | DULINK_CLOSE_ALL (0xFFFFFFFFU) |
| Close all connection. More... | |
| #define | DULINK_CB_READ (0U) |
| Represents READ operation to be run in callback function for dulinkRead() More... | |
| #define | DULINK_CB_WRITE (1U) |
| Represents WRITE operation to be run in callback function for dulinkWrite() More... | |
| #define | DULINK_CB_SIZE (2U) |
| Represents SIZE operation to be run in callback function for dulinkGetSize() More... | |
| #define | DULINK_CB_ATTR (3U) |
| Reserved for internal usage and would not be passed to callback function. More... | |
Typedefs | |
| typedef enum DULINK_NODE_TYPE | DULINK_NODE_TYPE |
| Type of DU Link node. More... | |
| typedef enum DULINK_CONNECTION_TYPE | DULINK_CONNECTION_TYPE |
| Type of DU Link connection. More... | |
| typedef struct DULINK_ACL_ENTRY | DULINK_ACL_ENTRY |
| Access Control List Entry. More... | |
| typedef struct DULINK_ACL_ENTRY * | PDULINK_ACL_ENTRY |
| typedef struct DULINK_ATTR | DULINK_ATTR |
| Attribute of an DU-Link node. More... | |
| typedef struct DULINK_ATTR * | PDULINK_ATTR |
| typedef uint32_t | DULINK_CB_OPERATION |
| Type of Callback operation. More... | |
| typedef DULINK_CB_RCODE(* | DULINK_CB) (const char *pRequestPath, const char *pOriginPath, void *pCtx, uint64_t offset, uint64_t length, void *pBuf, DULINK_CB_OPERATION operation, uint64_t *pRetVal) |
| Callback function registered to handle IO operations of file. More... | |
Enumerations | |
| enum | DULINK_NODE_TYPE { DULINK_NODE_TYPE_ELEMENT = 0, DULINK_NODE_TYPE_DIRECTORY, DULINK_NODE_TYPE_FILE } |
| Type of DU Link node. More... | |
| enum | DULINK_CONNECTION_TYPE { DULINK_CONNECT_UPLINK = 0, DULINK_CONNECT_DOWNLINK, DULINK_CONNECT_P2P } |
| Type of DU Link connection. More... | |
Functions | |
| DU_RCODE | dulinkInit (const char *pName, const char *pParentPath) |
| Initialize the DU Link element. More... | |
| DU_RCODE | dulinkOpen (const char *pRemotePath, DUTR_TR_TYPE trType, DUTR_SEC_TYPE seType, const void *pTrParam, const void *pSeParam, DULINK_CONNECTION_TYPE connType, uint32_t *pConnRefId) |
| Register a connection. More... | |
| DU_RCODE | dulinkClose (uint32_t connRefId) |
| Close DU Link connection. More... | |
| DU_RCODE | dulinkRead (const char *pPath, uint64_t offset, uint64_t length, void *pBuf, uint64_t *pRetLen) |
| Read content from a DU-Link node. More... | |
| DU_RCODE | dulinkWrite (const char *pPath, uint64_t offset, uint64_t length, void *pBuf, uint64_t *pRetLen) |
| Write content to a DU-Link file. More... | |
| DU_RCODE | dulinkGetSize (const char *pPath, uint64_t *pSize) |
| Get size needed for reading content from DU-Link node. More... | |
| DU_RCODE | dulinkGetAttribute (const char *pPath, PDULINK_ATTR pAttribute) |
| Get attribute of a DU-Link node. More... | |
| DU_RCODE | dulinkExportDirectory (const char *pPath, const DULINK_ATTR *pAttribute) |
| Register a directory to DU LINK. More... | |
| DU_RCODE | dulinkExportFile (const char *pPath, const DULINK_ATTR *pAttribute, DULINK_CB callback, void *pCtx) |
| Register a file to DU LINK. More... | |
| DU_RCODE | dulinkUnlinkDirectory (const char *pPath) |
| Unregister a directory from DU LINK. More... | |
| DU_RCODE | dulinkUnlinkFile (const char *pPath) |
| Unregister a file from DU LINK. More... | |
| DU_RCODE | dulinkExportNotifyNode (const char *pNotifyPath) |
| Create a node to notify other DU Link nodes when change has occurred. More... | |
| DU_RCODE | dulinkTriggerNotify (const char *pNotifyPath, void *pBuf, uint64_t bufSize) |
| Trigger notification to all nodes listening to a notify node. More... | |