mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-04 22:30:09 +00:00
Upgrade SBI(Service-based Interface)
* OpenAPI Generator version: 4.3.1 ==> 5.5.1 * Specification : r16.8.0 (20210629)
This commit is contained in:
parent
2aaa8200c2
commit
f278d58a69
1914 changed files with 91329 additions and 57361 deletions
30
lib/sbi/openapi/model/ip_reachability.c
Normal file
30
lib/sbi/openapi/model/ip_reachability.c
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "ip_reachability.h"
|
||||
|
||||
char* OpenAPI_ip_reachability_ToString(OpenAPI_ip_reachability_e ip_reachability)
|
||||
{
|
||||
const char *ip_reachabilityArray[] = { "NULL", "IPV4", "IPV6", "IPV4V6" };
|
||||
size_t sizeofArray = sizeof(ip_reachabilityArray) / sizeof(ip_reachabilityArray[0]);
|
||||
if (ip_reachability < sizeofArray)
|
||||
return (char *)ip_reachabilityArray[ip_reachability];
|
||||
else
|
||||
return (char *)"Unknown";
|
||||
}
|
||||
|
||||
OpenAPI_ip_reachability_e OpenAPI_ip_reachability_FromString(char* ip_reachability)
|
||||
{
|
||||
int stringToReturn = 0;
|
||||
const char *ip_reachabilityArray[] = { "NULL", "IPV4", "IPV6", "IPV4V6" };
|
||||
size_t sizeofArray = sizeof(ip_reachabilityArray) / sizeof(ip_reachabilityArray[0]);
|
||||
while (stringToReturn < sizeofArray) {
|
||||
if (strcmp(ip_reachability, ip_reachabilityArray[stringToReturn]) == 0) {
|
||||
return stringToReturn;
|
||||
}
|
||||
stringToReturn++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue