mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-02 13:20:08 +00:00
Add only one 5GC scenario (call-flow)
This commit is contained in:
parent
20008b6a13
commit
dbee687a75
1415 changed files with 86635 additions and 5877 deletions
30
lib/sbi/openapi/model/integrity_algorithm.c
Normal file
30
lib/sbi/openapi/model/integrity_algorithm.c
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "integrity_algorithm.h"
|
||||
|
||||
char* OpenAPI_integrity_algorithm_ToString(OpenAPI_integrity_algorithm_e integrity_algorithm)
|
||||
{
|
||||
const char *integrity_algorithmArray[] = { "NULL", "NIA0", "NIA1", "NIA2", "NIA3" };
|
||||
size_t sizeofArray = sizeof(integrity_algorithmArray) / sizeof(integrity_algorithmArray[0]);
|
||||
if (integrity_algorithm < sizeofArray)
|
||||
return (char *)integrity_algorithmArray[integrity_algorithm];
|
||||
else
|
||||
return (char *)"Unknown";
|
||||
}
|
||||
|
||||
OpenAPI_integrity_algorithm_e OpenAPI_integrity_algorithm_FromString(char* integrity_algorithm)
|
||||
{
|
||||
int stringToReturn = 0;
|
||||
const char *integrity_algorithmArray[] = { "NULL", "NIA0", "NIA1", "NIA2", "NIA3" };
|
||||
size_t sizeofArray = sizeof(integrity_algorithmArray) / sizeof(integrity_algorithmArray[0]);
|
||||
while (stringToReturn < sizeofArray) {
|
||||
if (strcmp(integrity_algorithm, integrity_algorithmArray[stringToReturn]) == 0) {
|
||||
return stringToReturn;
|
||||
}
|
||||
stringToReturn++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue