📄 usmdhuserkeytable_data_get.c
字号:
* On exit, this value should contain the data size (in bytes). * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) * @retval MFD_ERROR : Any other error* * @note If you need more than (*usmDHUserAuthKeyChange_val_ptr_len_ptr) bytes of memory, * allocate it using malloc() and update usmDHUserAuthKeyChange_val_ptr_ptr. * <b>DO NOT</b> free the previous pointer. * The MFD helper will release the memory you allocate. * * @remark If you call this function yourself, you are responsible * for checking if the pointer changed, and freeing any * previously allocated memory. (Not necessary if you pass * in a pointer to static memory, obviously.) */intusmDHUserAuthKeyChange_get(usmDHUserKeyTable_rowreq_ctx * rowreq_ctx, char **usmDHUserAuthKeyChange_val_ptr_ptr, size_t *usmDHUserAuthKeyChange_val_ptr_len_ptr){ /** we should have a non-NULL pointer and enough storage */ netsnmp_assert((NULL != usmDHUserAuthKeyChange_val_ptr_ptr) && (NULL != *usmDHUserAuthKeyChange_val_ptr_ptr)); netsnmp_assert(NULL != usmDHUserAuthKeyChange_val_ptr_len_ptr); DEBUGMSGTL(("verbose:usmDHUserKeyTable:usmDHUserAuthKeyChange_get", "called\n")); netsnmp_assert(NULL != rowreq_ctx); /* * TODO:231:o: |-> Extract the current value of the usmDHUserAuthKeyChange data. * set (* usmDHUserAuthKeyChange_val_ptr_ptr ) and (* usmDHUserAuthKeyChange_val_ptr_len_ptr ) from rowreq_ctx->data */ if (!rowreq_ctx || !usmDHUserAuthKeyChange_val_ptr_len_ptr || !usmDHUserAuthKeyChange_val_ptr_ptr || !*usmDHUserAuthKeyChange_val_ptr_ptr) { return MFD_ERROR; } return usmDHGetUserKeyChange(rowreq_ctx->data, 1, usmDHUserAuthKeyChange_val_ptr_ptr, usmDHUserAuthKeyChange_val_ptr_len_ptr); return MFD_SUCCESS;} /* usmDHUserAuthKeyChange_get *//*--------------------------------------------------------------------- * SNMP-USM-DH-OBJECTS-MIB::usmDHUserKeyEntry.usmDHUserOwnAuthKeyChange * usmDHUserOwnAuthKeyChange is subid 2 of usmDHUserKeyEntry. * Its status is Current, and its access level is Create. * OID: .1.3.6.1.3.101.1.1.2.1.2 * Description:The object used to change the agents own Authentication Key using a Diffie-Hellman key exchange. The right-most n bits of the shared secret 'sk', where 'n' is the number of bits required for the protocol defined by usmUserAuthProtocol, are installed as the operational authentication key for this row after a successful SET. * * Attributes: * accessible 1 isscalar 0 enums 0 hasdefval 0 * readable 1 iscolumn 1 ranges 0 hashint 0 * settable 1 * * * Its syntax is DHKeyChange (based on perltype OCTETSTR) * The net-snmp type is ASN_OCTET_STR. The C type decl is char (char) * This data type requires a length. (Max ) *//** * Extract the current value of the usmDHUserOwnAuthKeyChange data. * * Set a value using the data context for the row. * * @param rowreq_ctx * Pointer to the row request context. * @param usmDHUserOwnAuthKeyChange_val_ptr_ptr * Pointer to storage for a char variable * @param usmDHUserOwnAuthKeyChange_val_ptr_len_ptr * Pointer to a size_t. On entry, it will contain the size (in bytes) * pointed to by usmDHUserOwnAuthKeyChange. * On exit, this value should contain the data size (in bytes). * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) * @retval MFD_ERROR : Any other error* * @note If you need more than (*usmDHUserOwnAuthKeyChange_val_ptr_len_ptr) bytes of memory, * allocate it using malloc() and update usmDHUserOwnAuthKeyChange_val_ptr_ptr. * <b>DO NOT</b> free the previous pointer. * The MFD helper will release the memory you allocate. * * @remark If you call this function yourself, you are responsible * for checking if the pointer changed, and freeing any * previously allocated memory. (Not necessary if you pass * in a pointer to static memory, obviously.) */intusmDHUserOwnAuthKeyChange_get(usmDHUserKeyTable_rowreq_ctx * rowreq_ctx, char **usmDHUserOwnAuthKeyChange_val_ptr_ptr, size_t *usmDHUserOwnAuthKeyChange_val_ptr_len_ptr){ /** we should have a non-NULL pointer and enough storage */ netsnmp_assert((NULL != usmDHUserOwnAuthKeyChange_val_ptr_ptr) && (NULL != *usmDHUserOwnAuthKeyChange_val_ptr_ptr)); netsnmp_assert(NULL != usmDHUserOwnAuthKeyChange_val_ptr_len_ptr); DEBUGMSGTL(("verbose:usmDHUserKeyTable:usmDHUserOwnAuthKeyChange_get", "called\n")); netsnmp_assert(NULL != rowreq_ctx); /* * TODO:231:o: |-> Extract the current value of the usmDHUserOwnAuthKeyChange data. * set (* usmDHUserOwnAuthKeyChange_val_ptr_ptr ) and (* usmDHUserOwnAuthKeyChange_val_ptr_len_ptr ) from rowreq_ctx->data */ if (!rowreq_ctx || !usmDHUserOwnAuthKeyChange_val_ptr_len_ptr || !usmDHUserOwnAuthKeyChange_val_ptr_ptr || !*usmDHUserOwnAuthKeyChange_val_ptr_ptr) { return MFD_ERROR; } return usmDHGetUserKeyChange(rowreq_ctx->data, 1, usmDHUserOwnAuthKeyChange_val_ptr_ptr, usmDHUserOwnAuthKeyChange_val_ptr_len_ptr); return MFD_SUCCESS;} /* usmDHUserOwnAuthKeyChange_get *//*--------------------------------------------------------------------- * SNMP-USM-DH-OBJECTS-MIB::usmDHUserKeyEntry.usmDHUserPrivKeyChange * usmDHUserPrivKeyChange is subid 3 of usmDHUserKeyEntry. * Its status is Current, and its access level is Create. * OID: .1.3.6.1.3.101.1.1.2.1.3 * Description:The object used to change any given user's Privacy Key using a Diffie-Hellman key exchange. The right-most n bits of the shared secret 'sk', where 'n' is the number of bits required for the protocol defined by usmUserPrivProtocol, are installed as the operational privacy key for this row after a successful SET. * * Attributes: * accessible 1 isscalar 0 enums 0 hasdefval 0 * readable 1 iscolumn 1 ranges 0 hashint 0 * settable 1 * * * Its syntax is DHKeyChange (based on perltype OCTETSTR) * The net-snmp type is ASN_OCTET_STR. The C type decl is char (char) * This data type requires a length. (Max ) *//** * Extract the current value of the usmDHUserPrivKeyChange data. * * Set a value using the data context for the row. * * @param rowreq_ctx * Pointer to the row request context. * @param usmDHUserPrivKeyChange_val_ptr_ptr * Pointer to storage for a char variable * @param usmDHUserPrivKeyChange_val_ptr_len_ptr * Pointer to a size_t. On entry, it will contain the size (in bytes) * pointed to by usmDHUserPrivKeyChange. * On exit, this value should contain the data size (in bytes). * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) * @retval MFD_ERROR : Any other error* * @note If you need more than (*usmDHUserPrivKeyChange_val_ptr_len_ptr) bytes of memory, * allocate it using malloc() and update usmDHUserPrivKeyChange_val_ptr_ptr. * <b>DO NOT</b> free the previous pointer. * The MFD helper will release the memory you allocate. * * @remark If you call this function yourself, you are responsible * for checking if the pointer changed, and freeing any * previously allocated memory. (Not necessary if you pass * in a pointer to static memory, obviously.) */intusmDHUserPrivKeyChange_get(usmDHUserKeyTable_rowreq_ctx * rowreq_ctx, char **usmDHUserPrivKeyChange_val_ptr_ptr, size_t *usmDHUserPrivKeyChange_val_ptr_len_ptr){ /** we should have a non-NULL pointer and enough storage */ netsnmp_assert((NULL != usmDHUserPrivKeyChange_val_ptr_ptr) && (NULL != *usmDHUserPrivKeyChange_val_ptr_ptr)); netsnmp_assert(NULL != usmDHUserPrivKeyChange_val_ptr_len_ptr); DEBUGMSGTL(("verbose:usmDHUserKeyTable:usmDHUserPrivKeyChange_get", "called\n")); netsnmp_assert(NULL != rowreq_ctx); /* * TODO:231:o: |-> Extract the current value of the usmDHUserPrivKeyChange data. * set (* usmDHUserPrivKeyChange_val_ptr_ptr ) and (* usmDHUserPrivKeyChange_val_ptr_len_ptr ) from rowreq_ctx->data */ if (!rowreq_ctx || !usmDHUserPrivKeyChange_val_ptr_len_ptr || !usmDHUserPrivKeyChange_val_ptr_ptr || !*usmDHUserPrivKeyChange_val_ptr_ptr) { return MFD_ERROR; } return usmDHGetUserKeyChange(rowreq_ctx->data, 0, usmDHUserPrivKeyChange_val_ptr_ptr, usmDHUserPrivKeyChange_val_ptr_len_ptr); return MFD_SUCCESS;} /* usmDHUserPrivKeyChange_get *//*--------------------------------------------------------------------- * SNMP-USM-DH-OBJECTS-MIB::usmDHUserKeyEntry.usmDHUserOwnPrivKeyChange * usmDHUserOwnPrivKeyChange is subid 4 of usmDHUserKeyEntry. * Its status is Current, and its access level is Create. * OID: .1.3.6.1.3.101.1.1.2.1.4 * Description:The object used to change the agent's own Privacy Key using a Diffie-Hellman key exchange. The right-most n bits of the shared secret 'sk', where 'n' is the number of bits required for the protocol defined by usmUserPrivProtocol, are installed as the operational privacy key for this row after a successful SET. * * Attributes: * accessible 1 isscalar 0 enums 0 hasdefval 0 * readable 1 iscolumn 1 ranges 0 hashint 0 * settable 1 * * * Its syntax is DHKeyChange (based on perltype OCTETSTR) * The net-snmp type is ASN_OCTET_STR. The C type decl is char (char) * This data type requires a length. (Max ) *//** * Extract the current value of the usmDHUserOwnPrivKeyChange data. * * Set a value using the data context for the row. * * @param rowreq_ctx * Pointer to the row request context. * @param usmDHUserOwnPrivKeyChange_val_ptr_ptr * Pointer to storage for a char variable * @param usmDHUserOwnPrivKeyChange_val_ptr_len_ptr * Pointer to a size_t. On entry, it will contain the size (in bytes) * pointed to by usmDHUserOwnPrivKeyChange. * On exit, this value should contain the data size (in bytes). * * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) * @retval MFD_ERROR : Any other error* * @note If you need more than (*usmDHUserOwnPrivKeyChange_val_ptr_len_ptr) bytes of memory, * allocate it using malloc() and update usmDHUserOwnPrivKeyChange_val_ptr_ptr. * <b>DO NOT</b> free the previous pointer. * The MFD helper will release the memory you allocate. * * @remark If you call this function yourself, you are responsible * for checking if the pointer changed, and freeing any * previously allocated memory. (Not necessary if you pass * in a pointer to static memory, obviously.) */intusmDHUserOwnPrivKeyChange_get(usmDHUserKeyTable_rowreq_ctx * rowreq_ctx, char **usmDHUserOwnPrivKeyChange_val_ptr_ptr, size_t *usmDHUserOwnPrivKeyChange_val_ptr_len_ptr){ /** we should have a non-NULL pointer and enough storage */ netsnmp_assert((NULL != usmDHUserOwnPrivKeyChange_val_ptr_ptr) && (NULL != *usmDHUserOwnPrivKeyChange_val_ptr_ptr)); netsnmp_assert(NULL != usmDHUserOwnPrivKeyChange_val_ptr_len_ptr); DEBUGMSGTL(("verbose:usmDHUserKeyTable:usmDHUserOwnPrivKeyChange_get", "called\n")); netsnmp_assert(NULL != rowreq_ctx); /* * TODO:231:o: |-> Extract the current value of the usmDHUserOwnPrivKeyChange data. * set (* usmDHUserOwnPrivKeyChange_val_ptr_ptr ) and (* usmDHUserOwnPrivKeyChange_val_ptr_len_ptr ) from rowreq_ctx->data */ if (!rowreq_ctx || !usmDHUserOwnPrivKeyChange_val_ptr_len_ptr || !usmDHUserOwnPrivKeyChange_val_ptr_ptr || !*usmDHUserOwnPrivKeyChange_val_ptr_ptr) { return MFD_ERROR; } return usmDHGetUserKeyChange(rowreq_ctx->data, 0, usmDHUserOwnPrivKeyChange_val_ptr_ptr, usmDHUserOwnPrivKeyChange_val_ptr_len_ptr);} /* usmDHUserOwnPrivKeyChange_get *//** @} */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -