|
|
NVIDIA DriveOS Linux NSR SDK API Reference
|
7.0.3.0 Release
|
Go to the documentation of this file.
40 #define DULINK_SUID_LINK (0U)
41 #define DULINK_SUID_CB (1U)
45 #define DULINK_ECODE(err) DU_ECODE(DU_UID_LINK, DULINK_SUID_LINK, (err))
46 #define DULINK_CB_ECODE(err) DU_ECODE(DU_UID_LINK, DULINK_SUID_CB, (err))
51 #define DULINK_ERR_GENERIC DULINK_ECODE(1U)
52 #define DULINK_ERR_INVALID_ARGUMENT DULINK_ECODE(2U)
54 #define DULINK_ERR_BUFFER_TOO_SMALL DULINK_ECODE(3U)
56 #define DULINK_ERR_NOT_FOUND DULINK_ECODE(4U)
58 #define DULINK_ERR_NOT_SUPPORTED DULINK_ECODE(5U)
60 #define DULINK_ERR_NO_PERMISSION DULINK_ECODE(6U)
62 #define DULINK_ERR_ALLOC_FAILED DULINK_ECODE(7U)
64 #define DULINK_ERR_BUSY DULINK_ECODE(8U)
66 #define DULINK_ERR_UPLINK_NOT_READY DULINK_ECODE(9U)
68 #define DULINK_ERR_ROUTING DULINK_ECODE(10U)
70 #define DULINK_ERR_TIMEOUT DULINK_ECODE(11U)
72 #define DULINK_ERR_TRANSPORT DULINK_ECODE(12U)
76 #define DULINK_ERR_ILLEGALMSG DULINK_ECODE(13U)
77 #define DULINK_ERR_ROUTING_RETMSG DULINK_ECODE(14U)
79 #define DULINK_ERR_NO_DST DULINK_ECODE(15U)
81 #define DULINK_ERR_NO_MEMORY DULINK_ECODE(16U)
83 #define DULINK_ERR_NO_P2P DULINK_ECODE(17U)
85 #define DULINK_ERR_NO_CONNECT DULINK_ECODE(18U)
87 #define DULINK_ERR_ILLEGAL_OP DULINK_ECODE(19U)
89 #define DULINK_ERR_INIT DULINK_ECODE(20U)
91 #define DULINK_ERR_CLOSE DULINK_ECODE(21U)
93 #define DULINK_ERR_NOT_INIT DULINK_ECODE(22U)
97 #define DULINK_CB_RCODE DU_RCODE
98 #define DULINK_CB_OK DU_OK
99 #define DULINK_CB_ERR_IO DULINK_CB_ECODE(1U)
100 #define DULINK_CB_ERR_INVALID_ARGUMENT DULINK_CB_ECODE(2U)
101 #define DULINK_CB_ERR_SYNTAX DULINK_CB_ECODE(3U)
102 #define DULINK_CB_ERR_UNKNOWN DULINK_CB_ECODE(4U)
103 #define DULINK_CB_ERR_BUSY_RETRY DULINK_CB_ECODE(5U)
105 #define DULINK_CB_ERR_NOT_SUPPORTED DULINK_CB_ECODE(6U)
106 #define DULINK_CB_ERR_NO_NODE DULINK_CB_ECODE(7U)
112 #define DULINK_IS_CB_ERR(rcode) (DU_ECODE_GET_SUID(rcode) == DULINK_SUID_CB)
117 #define DULINK_GET_CB_ERR(rcode) (DU_ECODE_GET_ERR(rcode))
120 #define DULINK_VERSION_STR "2"
126 #define DULINK_MAX_PATH (256U)
127 #define DULINK_MAX_NODE_NAME (DULINK_MAX_PATH)
129 #define DULINK_MAX_CHILDNODE (256U)
131 #define DULINK_MAX_NODES (256U)
133 #define DULINK_MAX_ACL (16U)
135 #define DULINK_MAX_NOTIFY_NODES (16U)
137 #define DULINK_MAX_NODES_TO_NOTIFY (8U)
139 #define DULINK_MAX_NOTIFY_MSG_LEN (1024U)
141 #define DULINK_MAX_DATA_SIZE (1024U * 1024U)
144 #define DULINK_PERMISSION_NONE (0x00U)
145 #define DULINK_PERMISSION_READ (0x01U)
147 #define DULINK_PERMISSION_WRITE (0x02U)
149 #define DULINK_PERMISSION_WRITE_MASK (0xFDU)
153 #define DULINK_CLOSE_ALL (0xFFFFFFFFU)
253 #define DULINK_CB_READ (0U)
254 #define DULINK_CB_WRITE (1U)
257 #define DULINK_CB_SIZE (2U)
260 #define DULINK_CB_ATTR (3U)
312 const char* pOriginPath,
void *pCtx, uint64_t offset,
313 uint64_t length,
void* pBuf,
362 const char *pParentPath
445 const char *pRemotePath,
448 const void *pTrParam,
449 const void *pSeParam,
1115 const char *pNotifyPath
1177 const char *pNotifyPath,
1182 #ifdef NON_SAFETY_BUILD
1217 uint32_t *pDulinkConnectionSize,
1218 uint32_t *pDulinkWorkerSize,
1219 uint32_t *pDulinkWaitObjSize
1262 uint32_t numConnection,
1263 void *pConnectionTable,
uint8_t allowMask
Bitmask of allowed operation, this has lower priority of denied operation.
NVIDIA DRIVE® Update DU-Transport library interface.
struct DULINK_ACL_ENTRY DULINK_ACL_ENTRY
Access Control List Entry.
uint32_t numACL
Number of valid ACL entries stored in ACL table.
struct DULINK_ACL_ENTRY * PDULINK_ACL_ENTRY
DU_RCODE dulinkClose(uint32_t connRefId)
Close DU Link connection.
uint32_t DULINK_CB_OPERATION
Type of Callback operation.
DULINK_NODE_TYPE
Type of DU Link node.
DULINK_NODE_TYPE type
Type of this DU-Link node: file, directory, or element.
DU_RCODE dulinkExportDirectory(const char *pPath, const DULINK_ATTR *pAttribute)
Register a directory to DU LINK.
DU_RCODE dulinkRead(const char *pPath, uint64_t offset, uint64_t length, void *pBuf, uint64_t *pRetLen)
Read content from a DU-Link node.
Attribute of an DU-Link node.
@ DULINK_CONNECT_DOWNLINK
DUTR_TR_TYPE
Defines DU-Transport back-end transport protocols.
DULINK_ACL_ENTRY acl[DULINK_MAX_ACL]
Content of Access Control List.
DU_RCODE dulinkExportFile(const char *pPath, const DULINK_ATTR *pAttribute, DULINK_CB callback, void *pCtx)
Register a file to DU LINK.
uint8_t denyMask
Bitmask of denied operation, setting this would force disallow operation specified in srcElement.
DU_RCODE dulinkExportNotifyNode(const char *pNotifyPath)
Create a node to notify other DU Link nodes when change has occurred.
uint32_t DU_RCODE
Drive Update error codes.
Access Control List Entry.
DU_RCODE dulinkWrite(const char *pPath, uint64_t offset, uint64_t length, void *pBuf, uint64_t *pRetLen)
Write content to a DU-Link file.
DU_RCODE dulinkTriggerNotify(const char *pNotifyPath, void *pBuf, uint64_t bufSize)
Trigger notification to all nodes listening to a notify node.
DULINK_CONNECTION_TYPE
Type of DU Link connection.
@ DULINK_NODE_TYPE_FILE
File type node.
struct DULINK_ATTR * PDULINK_ATTR
DU_RCODE dulinkUnlinkFile(const char *pPath)
Unregister a file from DU LINK.
DUTR_SEC_TYPE
Defines DU-Transport security protocols.
#define DULINK_MAX_PATH
Maximum string length of a DU Link path.
@ DULINK_NODE_TYPE_ELEMENT
Element type node. There is one element node per instance of DU Link.
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.
struct DULINK_ATTR DULINK_ATTR
Attribute of an DU-Link node.
DU_RCODE dulinkGetAttribute(const char *pPath, PDULINK_ATTR pAttribute)
Get attribute of a DU-Link node.
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.
@ DULINK_NODE_TYPE_DIRECTORY
Directory node which can store file nodes beneath it.
DU_RCODE dulinkGetSize(const char *pPath, uint64_t *pSize)
Get size needed for reading content from DU-Link node.
Common definitions and declarations for NVIDIA DRIVE® Update.
DU_RCODE dulinkUnlinkDirectory(const char *pPath)
Unregister a directory from DU LINK.
char srcElement[DULINK_MAX_PATH]
Absolute path of element that this access control take effect.
DU_RCODE dulinkInit(const char *pName, const char *pParentPath)
Initialize the DU Link element.
#define DULINK_MAX_ACL
Maximum number of ACLs of a single node.