Skip to content

Commit c991549

Browse files
authored
Fixing typos in doxygen markup (#189)
* Fixing typos in doxygen cross-references * Update mock bpa help message
1 parent 38a64d0 commit c991549

12 files changed

Lines changed: 453 additions & 247 deletions

docs/api/04-examples-and-mocks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The BSL proper is associated with the @ref frontend and @ref backend_dyn groups.
2929
The unit tests of the BSL use, where necessary, very minimal implementations of a PP to set up preconditons for test cases.
3030

3131
The Mock BPA uses a PP implementation tailored to meet the needs of the BSL acceptance tests.
32-
This PP uses a set of bit fields within an integer program argument to control policy options; the fields are documented on ::bsl_mock_policy_configuration_t.
32+
This PP uses a set of bit fields within an integer program argument to control policy options; the fields are documented on ::BSLP_BitstringPolicyConfiguration_t.
3333
It also allows multiple integer policy values to be configured in a single running Mock BPA.
3434
This PP is registered and used by the @ref mock-bpa for many BSL testing cases.
3535

@@ -65,7 +65,7 @@ The policies used by the Mock BPA example policy providers can be provided with
6565

6666
### Policy Bit Fields
6767

68-
This policy provider initializes its policy using a set of bit fields within an integer program argument to control policy options; the fields are documented on ::bsl_mock_policy_configuration_t.
68+
This policy provider initializes its policy using a set of bit fields within an integer program argument to control policy options; the fields are documented on ::BSLP_BitstringPolicyConfiguration_t.
6969
The bit fields should be comma-separated, and passed to the Mock BPA with the `-p` command line option (see [Command Line Options](#command-line-options)).
7070

7171
### ION-Like JSON-Encoded Policy

docs/api/Doxyfile.in

Lines changed: 409 additions & 213 deletions
Large diffs are not rendered by default.

src/BPSecLib_Private.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -924,10 +924,10 @@ BSL_ReasonCode_t BSL_SecOper_GetReasonCode(const BSL_SecOper_t *self);
924924
*/
925925
void BSL_SecOper_SetReasonCode(BSL_SecOper_t *self, BSL_ReasonCode_t new_reason_code);
926926

927-
/// Forward declaration of this struct
927+
// Forward declaration of this struct
928928
typedef struct BSL_AbsSecBlock_s BSL_AbsSecBlock_t;
929929

930-
/// @brief Returns the size of the ::BSL_AbsSecBlock_t struct in bytes
930+
/// @brief Returns the size of the ::BSL_AbsSecBlock_s struct in bytes
931931
/// @return size of the struct
932932
size_t BSL_AbsSecBlock_Sizeof(void);
933933

src/BPSecLib_Public.h

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,29 +51,32 @@ extern "C" {
5151
#define BSL_REQUIRE_CHECK
5252
#endif
5353

54-
/// Forward declaration for BSL library context.
54+
// Forward declaration of this struct.
5555
typedef struct BSL_LibCtx_s BSL_LibCtx_t;
5656

5757
/**
5858
* Return size of library context
5959
*/
6060
size_t BSL_LibCtx_Sizeof(void);
6161

62-
/// @brief Forward declaration of ::BSL_SecurityResponseSet_s, which contains information for BSL and the host BPA to
63-
/// process the Bundle.
62+
// Forward declaration of this struct.
63+
// This contains information for BSL and the host BPA to process the Bundle.
6464
typedef struct BSL_SecurityResponseSet_s BSL_SecurityResponseSet_t;
6565

66-
/// @brief Forward declaration of ::BSL_SecurityActionSet_s, which contains actions for BSL to process the Bundle.
66+
// Forward declaration of this struct.
67+
// This contains actions for BSL to process the Bundle.
6768
typedef struct BSL_SecurityActionSet_s BSL_SecurityActionSet_t;
6869

69-
/// @brief Forward declaration of ::BSL_SecurityAction_s, which contains security operations for BSL to process the
70-
/// Bundle.
70+
// Forward declaration of this struct.
71+
// This contains security operations for BSL to process the Bundle.
7172
typedef struct BSL_SecurityAction_s BSL_SecurityAction_t;
7273

73-
/// @brief Forward-declaration for structure containing callbacks to a security context.
74+
// Forward declaration of this struct.
75+
// This contains callbacks to a security context.
7476
typedef struct BSL_SecCtxDesc_s BSL_SecCtxDesc_t;
7577

76-
/// @brief Forward-declaration for structure containing callbacks to provider.
78+
// Forward declaration of this struct.
79+
// This contains callbacks to a policy provider.
7780
typedef struct BSL_PolicyDesc_s BSL_PolicyDesc_t;
7881

7982
/** @brief Indicates where in the lifecycle of the BPA the bundle is querying for security policy.
@@ -300,7 +303,7 @@ typedef struct
300303

301304
/** Dynamic BPA descriptor.
302305
*
303-
* @caution All functions in this structure must be thread safe, as they
306+
* @warning All functions in this structure must be thread safe, as they
304307
* can be called by any number of BSL instances across any threads.
305308
*/
306309
typedef struct
@@ -432,7 +435,7 @@ typedef struct
432435
/** Set the BPA descriptor (callbacks) for this process.
433436
*
434437
* @warning This function is not thread safe and should be used before any
435-
* ::BSL_LibCtx_t is initialized or other BSL interfaces used.
438+
* ::BSL_LibCtx_s is initialized or other BSL interfaces used.
436439
*
437440
* @param desc The descriptor to use for future BPA functions.
438441
* @return Zero if successful, negative on error.
@@ -449,7 +452,7 @@ void BSL_HostDescriptors_Get(BSL_HostDescriptors_t *desc);
449452
/** Reset the host descriptors to their default, unusable state.
450453
*
451454
* @warning This function is not thread safe and should be used after any
452-
* ::BSL_LibCtx_t is deinitialized.
455+
* ::BSL_LibCtx_s is deinitialized.
453456
*/
454457
void BSL_HostDescriptors_Clear(void);
455458

src/backend/SecParam.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ struct BSL_SecParam_s
7878
m_bstring_t _bytes;
7979
};
8080

81-
/// OPLIST for ::BSL_SecParam_t
81+
/// OPLIST for ::BSL_SecParam_s
8282
#define M_OPL_BSL_SecParam_t() \
8383
(INIT(API_2(BSL_SecParam_Init)), INIT_SET(API_6(BSL_SecParam_InitSet)), CLEAR(API_2(BSL_SecParam_Deinit)), \
8484
SET(API_6(BSL_SecParam_Set)))
8585

8686
/** @struct BSLB_SecParamList_t
87-
* Defines a basic list of Security Parameters (::BSL_SecParam_t).
87+
* Defines a basic list of Security Parameters (::BSL_SecParam_s).
8888
*/
8989
// NOLINTBEGIN
9090
/// @cond Doxygen_Suppress

src/backend/SecResult.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ struct BSL_SecResult_s
9191
m_bstring_t _bytes;
9292
};
9393

94-
/// OPLIST for ::BSL_SecParam_t
94+
/// OPLIST for ::BSL_SecParam_s
9595
#define M_OPL_BSL_SecResult_t() \
9696
(INIT(API_2(BSL_SecResult_Init)), INIT_SET(API_6(BSL_SecResult_InitSet)), CLEAR(API_2(BSL_SecResult_Deinit)), \
9797
SET(API_6(BSL_SecResult_Set)))
9898

9999
/** @struct BSLB_SecResultList_t
100-
* Defines a basic list of Security Results (::BSL_SecResult_t).
100+
* Defines a basic list of Security Results (::BSL_SecResult_s).
101101
*/
102102
/// @cond Doxygen_Suppress
103103
// NOLINTBEGIN

src/backend/SecurityAction.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323
#include <BPSecLib_Private.h>
2424
#include "SecOperation.h"
2525

26-
/// OPLIST for ::BSL_SecOper_t
26+
/// OPLIST for ::BSL_SecOper_s
2727
#define M_OPL_BSL_SecOper_t() \
2828
(INIT(API_2(BSL_SecOper_Init)), INIT_SET(API_6(BSL_SecOper_InitSet)), SET(API_6(BSL_SecOper_Set)), \
2929
CLEAR(API_2(BSL_SecOper_Deinit)))
3030

3131
/** @struct BSL_SecOperList_t
32-
* Defines a basic list of ::BSL_SecOper_t.
32+
* Defines a basic list of ::BSL_SecOper_s.
3333
*/
3434
/// @cond Doxygen_Suppress
3535
// NOLINTBEGIN

src/backend/SecurityActionSet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include "SecurityAction.h"
3131

3232
/** @struct BSL_SecActionList_t
33-
* Defines a basic list of ::BSL_SecurityAction_t.
33+
* Defines a basic list of ::BSL_SecurityAction_s.
3434
*/
3535
/// @cond Doxygen_Suppress
3636
// NOLINTBEGIN

src/backend/SecurityResultSet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include <m-array.h>
3232

3333
/** @struct BSL_SecResultSet_ResultCodes
34-
* Defines a basic list of ::int64_t for result values.
34+
* Defines a basic list of @c int64_t for result values.
3535
*/
3636
/** @struct BSL_SecResultSet_ErrorActionCodes_t
3737
* Defines a basic list of ::BSL_PolicyAction_e.

src/mock_bpa/mock_bpa.c

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,22 @@ static void sig_stop(int signum)
9898
static void show_usage(const char *argv0)
9999
{
100100
fprintf(stderr,
101-
"Usage: %s -o <over-socket address:port> -a <application address:port>\n"
102-
" -u <under-socket address:port> -r <router address:port>\n"
103-
" -e <app-EID> -s <sec-src-EID>\n"
104-
" -p (optional - defaults to none) comma delimited hex list of <bsl_mock_policy_configuration_t>, "
105-
"e.g. '0x000f,0x0021'\n"
106-
" -j (optional - defaults to none) path to JSON file containing policy configuration\n"
107-
" -k (optional - defaults to none) path to JSON file containing JWKs to register\n"
108-
" -c (optional - defaults to OpenSSL RAND) enable custom RNG generator for testing purposes\n",
109-
argv0);
101+
// options use the form of man-pages.7
102+
"BSL Mock BPA v%s\n\n"
103+
"Usage: %s [options]\n"
104+
"Where the options are:\n"
105+
" {-o <address:port>} the over-socket UDP listen\n"
106+
" {-a <address:port>} the application UDP address\n"
107+
" {-u <address:port>} the under-socket UDP listen\n"
108+
" {-r <address:port>} the neighbor UDP address\n"
109+
" {-e <app-EID>} the overlayer application BPv7 EID\n"
110+
" {-s <sec-src-EID>} the security source BPv7 EID\n"
111+
" [-p <hex-list>] comma delimited hex list of <BSLP_BitstringPolicyConfiguration_t>, "
112+
"e.g. '0x000f,0x0021' (default: none)\n"
113+
" [-j <file-path>] path to JSON file containing policy configuration (default: none)\n"
114+
" [-k <file-path>] path to JSON file containing JWKs to register (default: none)\n"
115+
" [-c] enable custom RNG generator for testing purposes (default: use OpenSSL RAND)\n",
116+
BSL_VERSION, argv0);
110117
}
111118

112119
int main(int argc, char **argv)

0 commit comments

Comments
 (0)