MariuszSkamra commented on code in PR #1684:
URL: https://github.com/apache/mynewt-nimble/pull/1684#discussion_r1505526091


##########
nimble/host/include/host/ble_sm.h:
##########
@@ -29,68 +36,216 @@
 extern "C" {
 #endif
 
+/**
+ * @defgroup ble_sm_err Security Manager (SM) Error Codes
+ * @{
+ */
+
+/** SM Error Code: Success */
 #define BLE_SM_ERR_SUCCESS                      0x00
+
+/** SM Error Code: Passkey entry failed */
 #define BLE_SM_ERR_PASSKEY                      0x01
+
+/** SM Error Code: Out Of Band (OOB) not available */
 #define BLE_SM_ERR_OOB                          0x02
+
+/** SM Error Code: Authentication Requirements */
 #define BLE_SM_ERR_AUTHREQ                      0x03
+
+/** SM Error Code: Confirm Value failed */
 #define BLE_SM_ERR_CONFIRM_MISMATCH             0x04
+
+/** SM Error Code: Pairing Not Supported */
 #define BLE_SM_ERR_PAIR_NOT_SUPP                0x05
+
+/** SM Error Code: Encryption Key Size */
 #define BLE_SM_ERR_ENC_KEY_SZ                   0x06
+
+/** SM Error Code: Command Not Supported */
 #define BLE_SM_ERR_CMD_NOT_SUPP                 0x07
+
+/** SM Error Code: Unspecified Reason */
 #define BLE_SM_ERR_UNSPECIFIED                  0x08
+
+/** SM Error Code: Repeated Attempts */
 #define BLE_SM_ERR_REPEATED                     0x09
+
+/** SM Error Code: Invalid Parameters */
 #define BLE_SM_ERR_INVAL                        0x0a
+
+/** SM Error Code: DHKey Check failed */
 #define BLE_SM_ERR_DHKEY                        0x0b
+
+/** SM Error Code: Numeric Comparison failed */
 #define BLE_SM_ERR_NUMCMP                       0x0c
+
+/** SM Error Code: Pairing in progress */
 #define BLE_SM_ERR_ALREADY                      0x0d
+
+/** SM Error Code: Cross-transport Key Derivation/Generation not allowed */
 #define BLE_SM_ERR_CROSS_TRANS                  0x0e
+
+/** SM Error Code: Key Rejected */
 #define BLE_SM_ERR_KEY_REJ                      0x0f
+
+/** SM Error Code: Out Of Boundary Code Value */
 #define BLE_SM_ERR_MAX_PLUS_1                   0x10
 
+/** @} */
+
+/**
+ * @defgroup ble_sm_pair_alg Security Manager (SM) Pairing Algorithms
+ * @{
+ */
+
+/** SM Pairing Algorithm: Just Works */
 #define BLE_SM_PAIR_ALG_JW                      0
+
+/** SM Pairing Algorithm: Passkey Entry */
 #define BLE_SM_PAIR_ALG_PASSKEY                 1
+
+/** SM Pairing Algorithm: Out Of Band */
 #define BLE_SM_PAIR_ALG_OOB                     2
+
+/** SM Pairing Algorithm: Numeric Comparison */
 #define BLE_SM_PAIR_ALG_NUMCMP                  3
 
+/** @} */
+
+/**
+ * @defgroup ble_sm_pair_key_dist Security Manager (SM) Key Distribution Flags
+ * @{
+ */
+
+/**
+ * SM Key Distribution: Distribute LTK using the Encryption Information command
+ * followed by EDIV and Rand using the Central Identification command
+ */
 #define BLE_SM_PAIR_KEY_DIST_ENC                0x01
+
+/** SM Key Distribution: Distribute IRK using the Identity Information command 
*/
 #define BLE_SM_PAIR_KEY_DIST_ID                 0x02
+
+/** SM Key Distribution: Distribute CSRK using the Signing Information command 
*/

Review Comment:
   ```suggestion
   /** SM Key Distribution: Distribute Connection Signature Resolving Key 
(CSRK) */
   ```



##########
nimble/host/include/host/ble_sm.h:
##########
@@ -29,68 +36,216 @@
 extern "C" {
 #endif
 
+/**
+ * @defgroup ble_sm_err Security Manager (SM) Error Codes
+ * @{
+ */
+
+/** SM Error Code: Success */
 #define BLE_SM_ERR_SUCCESS                      0x00
+
+/** SM Error Code: Passkey entry failed */
 #define BLE_SM_ERR_PASSKEY                      0x01
+
+/** SM Error Code: Out Of Band (OOB) not available */
 #define BLE_SM_ERR_OOB                          0x02
+
+/** SM Error Code: Authentication Requirements */
 #define BLE_SM_ERR_AUTHREQ                      0x03
+
+/** SM Error Code: Confirm Value failed */
 #define BLE_SM_ERR_CONFIRM_MISMATCH             0x04
+
+/** SM Error Code: Pairing Not Supported */
 #define BLE_SM_ERR_PAIR_NOT_SUPP                0x05
+
+/** SM Error Code: Encryption Key Size */
 #define BLE_SM_ERR_ENC_KEY_SZ                   0x06
+
+/** SM Error Code: Command Not Supported */
 #define BLE_SM_ERR_CMD_NOT_SUPP                 0x07
+
+/** SM Error Code: Unspecified Reason */
 #define BLE_SM_ERR_UNSPECIFIED                  0x08
+
+/** SM Error Code: Repeated Attempts */
 #define BLE_SM_ERR_REPEATED                     0x09
+
+/** SM Error Code: Invalid Parameters */
 #define BLE_SM_ERR_INVAL                        0x0a
+
+/** SM Error Code: DHKey Check failed */
 #define BLE_SM_ERR_DHKEY                        0x0b
+
+/** SM Error Code: Numeric Comparison failed */
 #define BLE_SM_ERR_NUMCMP                       0x0c
+
+/** SM Error Code: Pairing in progress */
 #define BLE_SM_ERR_ALREADY                      0x0d
+
+/** SM Error Code: Cross-transport Key Derivation/Generation not allowed */
 #define BLE_SM_ERR_CROSS_TRANS                  0x0e
+
+/** SM Error Code: Key Rejected */
 #define BLE_SM_ERR_KEY_REJ                      0x0f
+
+/** SM Error Code: Out Of Boundary Code Value */
 #define BLE_SM_ERR_MAX_PLUS_1                   0x10
 
+/** @} */
+
+/**
+ * @defgroup ble_sm_pair_alg Security Manager (SM) Pairing Algorithms
+ * @{
+ */
+
+/** SM Pairing Algorithm: Just Works */
 #define BLE_SM_PAIR_ALG_JW                      0
+
+/** SM Pairing Algorithm: Passkey Entry */
 #define BLE_SM_PAIR_ALG_PASSKEY                 1
+
+/** SM Pairing Algorithm: Out Of Band */
 #define BLE_SM_PAIR_ALG_OOB                     2
+
+/** SM Pairing Algorithm: Numeric Comparison */
 #define BLE_SM_PAIR_ALG_NUMCMP                  3
 
+/** @} */
+
+/**
+ * @defgroup ble_sm_pair_key_dist Security Manager (SM) Key Distribution Flags
+ * @{
+ */
+
+/**
+ * SM Key Distribution: Distribute LTK using the Encryption Information command
+ * followed by EDIV and Rand using the Central Identification command
+ */
 #define BLE_SM_PAIR_KEY_DIST_ENC                0x01
+
+/** SM Key Distribution: Distribute IRK using the Identity Information command 
*/

Review Comment:
   ```suggestion
   /** SM Key Distribution: Distribute Identity Resolving Key (IRK) */
   ```



##########
nimble/host/include/host/ble_sm.h:
##########
@@ -29,68 +36,216 @@
 extern "C" {
 #endif
 
+/**
+ * @defgroup ble_sm_err Security Manager (SM) Error Codes
+ * @{
+ */
+
+/** SM Error Code: Success */
 #define BLE_SM_ERR_SUCCESS                      0x00
+
+/** SM Error Code: Passkey entry failed */
 #define BLE_SM_ERR_PASSKEY                      0x01
+
+/** SM Error Code: Out Of Band (OOB) not available */
 #define BLE_SM_ERR_OOB                          0x02
+
+/** SM Error Code: Authentication Requirements */
 #define BLE_SM_ERR_AUTHREQ                      0x03
+
+/** SM Error Code: Confirm Value failed */
 #define BLE_SM_ERR_CONFIRM_MISMATCH             0x04
+
+/** SM Error Code: Pairing Not Supported */
 #define BLE_SM_ERR_PAIR_NOT_SUPP                0x05
+
+/** SM Error Code: Encryption Key Size */
 #define BLE_SM_ERR_ENC_KEY_SZ                   0x06
+
+/** SM Error Code: Command Not Supported */
 #define BLE_SM_ERR_CMD_NOT_SUPP                 0x07
+
+/** SM Error Code: Unspecified Reason */
 #define BLE_SM_ERR_UNSPECIFIED                  0x08
+
+/** SM Error Code: Repeated Attempts */
 #define BLE_SM_ERR_REPEATED                     0x09
+
+/** SM Error Code: Invalid Parameters */
 #define BLE_SM_ERR_INVAL                        0x0a
+
+/** SM Error Code: DHKey Check failed */
 #define BLE_SM_ERR_DHKEY                        0x0b
+
+/** SM Error Code: Numeric Comparison failed */
 #define BLE_SM_ERR_NUMCMP                       0x0c
+
+/** SM Error Code: Pairing in progress */
 #define BLE_SM_ERR_ALREADY                      0x0d
+
+/** SM Error Code: Cross-transport Key Derivation/Generation not allowed */
 #define BLE_SM_ERR_CROSS_TRANS                  0x0e
+
+/** SM Error Code: Key Rejected */
 #define BLE_SM_ERR_KEY_REJ                      0x0f
+
+/** SM Error Code: Out Of Boundary Code Value */
 #define BLE_SM_ERR_MAX_PLUS_1                   0x10
 
+/** @} */
+
+/**
+ * @defgroup ble_sm_pair_alg Security Manager (SM) Pairing Algorithms
+ * @{
+ */
+
+/** SM Pairing Algorithm: Just Works */
 #define BLE_SM_PAIR_ALG_JW                      0
+
+/** SM Pairing Algorithm: Passkey Entry */
 #define BLE_SM_PAIR_ALG_PASSKEY                 1
+
+/** SM Pairing Algorithm: Out Of Band */
 #define BLE_SM_PAIR_ALG_OOB                     2
+
+/** SM Pairing Algorithm: Numeric Comparison */
 #define BLE_SM_PAIR_ALG_NUMCMP                  3
 
+/** @} */
+
+/**
+ * @defgroup ble_sm_pair_key_dist Security Manager (SM) Key Distribution Flags
+ * @{
+ */
+
+/**
+ * SM Key Distribution: Distribute LTK using the Encryption Information command
+ * followed by EDIV and Rand using the Central Identification command
+ */

Review Comment:
   ```suggestion
   /** SM Key Distribution: Distribute Long Term Key (LTK) */
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to