define stream_security_context_t as a struct to get type checking
By using a struct we may have warnings at compilation time in some cases if the type is not used properly. The type definition becomes a bit weird, so we need to properly comment. If too strange, we can revert to the classical "void" definition.
This commit is contained in:
@@ -28,10 +28,14 @@
|
|||||||
#define SECU_DIRECTION_UPLINK 0
|
#define SECU_DIRECTION_UPLINK 0
|
||||||
#define SECU_DIRECTION_DOWNLINK 1
|
#define SECU_DIRECTION_DOWNLINK 1
|
||||||
|
|
||||||
/* stream_security_context_t is an opaque structure
|
/* stream_security_context_t is an opaque structure.
|
||||||
* it is different for each integrity and ciphering algorithm in use
|
* It is different for each integrity and ciphering algorithm in use.
|
||||||
|
* Defined as a struct to have compilation time type checking
|
||||||
|
* (the "context" field is never actually used).
|
||||||
*/
|
*/
|
||||||
typedef void stream_security_context_t;
|
typedef struct {
|
||||||
|
void *context;
|
||||||
|
} stream_security_context_t;
|
||||||
|
|
||||||
/* stream_security_container_t contains the current configuration
|
/* stream_security_container_t contains the current configuration
|
||||||
* of integrity and ciphering. It is used by PDCP and NAS.
|
* of integrity and ciphering. It is used by PDCP and NAS.
|
||||||
|
|||||||
Reference in New Issue
Block a user