- all RAN code, CI code, configuration files, dockerfiles, in CSSL v1.0
- all deployment code (openshift, charts, ancillary files like shell
scripts), in MIT
- documentation in CC-BY-4.0
- exceptions might apply and are listed in NOTICE
- there is a new LICENSES folder with all licenses
- CONTRIBUTIONS.md has been updated accordingly
For automated changes based on OAI PL v1.1:
perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.{c,h,cpp}
perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.ts
perl -i~ -0pe 's/<!--.*Licensed to the OpenAirInterface.*openairinterface.org\n.*-->/<!-- SPDX-License-Identifier: LicenseRef-CSSL-1.0 -->/s' **/*.xml
The rest (cmake, files with missing license, cmake) manually.
54 lines
2.1 KiB
C
54 lines
2.1 KiB
C
/*
|
|
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
|
|
*/
|
|
|
|
#include <stdint.h>
|
|
#include <assert.h>
|
|
|
|
#ifndef OCTET_STRING_H_
|
|
#define OCTET_STRING_H_
|
|
|
|
typedef struct OctetString_tag {
|
|
uint32_t length;
|
|
uint8_t *value;
|
|
} OctetString;
|
|
#define FREE_OCTET_STRING(oCTETsTRING) \
|
|
do { \
|
|
if ((oCTETsTRING).value != NULL) { \
|
|
free((oCTETsTRING).value); \
|
|
(oCTETsTRING).value = NULL; \
|
|
} \
|
|
(oCTETsTRING).length = 0; \
|
|
} while (0);
|
|
|
|
|
|
#define DUP_OCTET_STRING(oCTETsTRINGoRIG,oCTETsTRINGcOPY) \
|
|
do { \
|
|
if ((oCTETsTRINGoRIG).value == NULL) { \
|
|
(oCTETsTRINGcOPY).length = 0; \
|
|
(oCTETsTRINGcOPY).value = NULL; \
|
|
break; \
|
|
} \
|
|
(oCTETsTRINGcOPY).length = (oCTETsTRINGoRIG).length; \
|
|
(oCTETsTRINGcOPY).value = malloc((oCTETsTRINGoRIG).length+1); \
|
|
(oCTETsTRINGcOPY).value[(oCTETsTRINGoRIG).length] = '\0'; \
|
|
memcpy((oCTETsTRINGcOPY).value, \
|
|
(oCTETsTRINGoRIG).value, \
|
|
(oCTETsTRINGoRIG).length); \
|
|
} while (0);
|
|
|
|
OctetString* dup_octet_string(OctetString*octetstring);
|
|
|
|
void free_octet_string(OctetString *octetstring);
|
|
|
|
int encode_octet_string(const OctetString *octetstring, uint8_t *buffer, uint32_t len);
|
|
|
|
int decode_octet_string(OctetString *octetstring, uint16_t pdulen, const uint8_t *buffer, uint32_t buflen);
|
|
|
|
char* dump_octet_string_xml(const OctetString * const octetstring);
|
|
|
|
char* dump_octet_string(const OctetString * const octetstring);
|
|
|
|
#endif /* OCTET_STRING_H_ */
|
|
|