[SBI] Added config for service-names discovery
This commit is contained in:
parent
f020732ce9
commit
9f98d421a0
|
@ -94,6 +94,30 @@ logger:
|
||||||
# service_name:
|
# service_name:
|
||||||
# - namf-comm
|
# - namf-comm
|
||||||
#
|
#
|
||||||
|
# <NF Discovery Query Parameter>
|
||||||
|
#
|
||||||
|
# o (Default) If you do not set Query Parameter as shown below,
|
||||||
|
#
|
||||||
|
# sbi:
|
||||||
|
# - addr: 127.0.0.5
|
||||||
|
# port: 7777
|
||||||
|
#
|
||||||
|
# - 'service-names' is included.
|
||||||
|
#
|
||||||
|
# sbi:
|
||||||
|
# - addr: 127.0.0.5
|
||||||
|
# port: 7777
|
||||||
|
# discovery:
|
||||||
|
# option:
|
||||||
|
# no_service_names: false
|
||||||
|
#
|
||||||
|
# o To remove 'service-names' from URI query parameters in NS Discovery
|
||||||
|
# no_service_names: true
|
||||||
|
#
|
||||||
|
# * For Indirect Communication with Delegated Discovery,
|
||||||
|
# 'service-names' is always included in the URI query parameter.
|
||||||
|
# * That is, 'no_service_names' has no effect.
|
||||||
|
#
|
||||||
# <NGAP Server>>
|
# <NGAP Server>>
|
||||||
#
|
#
|
||||||
# o NGAP Server(all address available)
|
# o NGAP Server(all address available)
|
||||||
|
|
|
@ -94,6 +94,30 @@ logger:
|
||||||
# service_name:
|
# service_name:
|
||||||
# - nausf-auth
|
# - nausf-auth
|
||||||
#
|
#
|
||||||
|
# <NF Discovery Query Parameter>
|
||||||
|
#
|
||||||
|
# o (Default) If you do not set Query Parameter as shown below,
|
||||||
|
#
|
||||||
|
# sbi:
|
||||||
|
# - addr: 127.0.0.11
|
||||||
|
# port: 7777
|
||||||
|
#
|
||||||
|
# - 'service-names' is included.
|
||||||
|
#
|
||||||
|
# sbi:
|
||||||
|
# - addr: 127.0.0.11
|
||||||
|
# port: 7777
|
||||||
|
# discovery:
|
||||||
|
# option:
|
||||||
|
# no_service_names: false
|
||||||
|
#
|
||||||
|
# o To remove 'service-names' from URI query parameters in NS Discovery
|
||||||
|
# no_service_names: true
|
||||||
|
#
|
||||||
|
# * For Indirect Communication with Delegated Discovery,
|
||||||
|
# 'service-names' is always included in the URI query parameter.
|
||||||
|
# * That is, 'no_service_names' has no effect.
|
||||||
|
#
|
||||||
ausf:
|
ausf:
|
||||||
sbi:
|
sbi:
|
||||||
- addr: 127.0.0.11
|
- addr: 127.0.0.11
|
||||||
|
|
|
@ -96,6 +96,30 @@ logger:
|
||||||
# service_name:
|
# service_name:
|
||||||
# - nbsf-management
|
# - nbsf-management
|
||||||
#
|
#
|
||||||
|
# <NF Discovery Query Parameter>
|
||||||
|
#
|
||||||
|
# o (Default) If you do not set Query Parameter as shown below,
|
||||||
|
#
|
||||||
|
# sbi:
|
||||||
|
# - addr: 127.0.0.15
|
||||||
|
# port: 7777
|
||||||
|
#
|
||||||
|
# - 'service-names' is included.
|
||||||
|
#
|
||||||
|
# sbi:
|
||||||
|
# - addr: 127.0.0.15
|
||||||
|
# port: 7777
|
||||||
|
# discovery:
|
||||||
|
# option:
|
||||||
|
# no_service_names: false
|
||||||
|
#
|
||||||
|
# o To remove 'service-names' from URI query parameters in NS Discovery
|
||||||
|
# no_service_names: true
|
||||||
|
#
|
||||||
|
# * For Indirect Communication with Delegated Discovery,
|
||||||
|
# 'service-names' is always included in the URI query parameter.
|
||||||
|
# * That is, 'no_service_names' has no effect.
|
||||||
|
#
|
||||||
bsf:
|
bsf:
|
||||||
sbi:
|
sbi:
|
||||||
- addr: 127.0.0.15
|
- addr: 127.0.0.15
|
||||||
|
|
|
@ -144,6 +144,30 @@ logger:
|
||||||
# service_name:
|
# service_name:
|
||||||
# - nnssf-nsselection
|
# - nnssf-nsselection
|
||||||
#
|
#
|
||||||
|
# <NF Discovery Query Parameter>
|
||||||
|
#
|
||||||
|
# o (Default) If you do not set Query Parameter as shown below,
|
||||||
|
#
|
||||||
|
# sbi:
|
||||||
|
# - addr: 127.0.0.14
|
||||||
|
# port: 7777
|
||||||
|
#
|
||||||
|
# - 'service-names' is included.
|
||||||
|
#
|
||||||
|
# sbi:
|
||||||
|
# - addr: 127.0.0.14
|
||||||
|
# port: 7777
|
||||||
|
# discovery:
|
||||||
|
# option:
|
||||||
|
# no_service_names: false
|
||||||
|
#
|
||||||
|
# o To remove 'service-names' from URI query parameters in NS Discovery
|
||||||
|
# no_service_names: true
|
||||||
|
#
|
||||||
|
# * For Indirect Communication with Delegated Discovery,
|
||||||
|
# 'service-names' is always included in the URI query parameter.
|
||||||
|
# * That is, 'no_service_names' has no effect.
|
||||||
|
#
|
||||||
nssf:
|
nssf:
|
||||||
sbi:
|
sbi:
|
||||||
- addr: 127.0.0.14
|
- addr: 127.0.0.14
|
||||||
|
|
|
@ -98,6 +98,30 @@ logger:
|
||||||
# - npcf-smpolicycontrol
|
# - npcf-smpolicycontrol
|
||||||
# - npcf-policyauthorization
|
# - npcf-policyauthorization
|
||||||
#
|
#
|
||||||
|
# <NF Discovery Query Parameter>
|
||||||
|
#
|
||||||
|
# o (Default) If you do not set Query Parameter as shown below,
|
||||||
|
#
|
||||||
|
# sbi:
|
||||||
|
# - addr: 127.0.0.13
|
||||||
|
# port: 7777
|
||||||
|
#
|
||||||
|
# - 'service-names' is included.
|
||||||
|
#
|
||||||
|
# sbi:
|
||||||
|
# - addr: 127.0.0.13
|
||||||
|
# port: 7777
|
||||||
|
# discovery:
|
||||||
|
# option:
|
||||||
|
# no_service_names: false
|
||||||
|
#
|
||||||
|
# o To remove 'service-names' from URI query parameters in NS Discovery
|
||||||
|
# no_service_names: true
|
||||||
|
#
|
||||||
|
# * For Indirect Communication with Delegated Discovery,
|
||||||
|
# 'service-names' is always included in the URI query parameter.
|
||||||
|
# * That is, 'no_service_names' has no effect.
|
||||||
|
#
|
||||||
pcf:
|
pcf:
|
||||||
sbi:
|
sbi:
|
||||||
- addr: 127.0.0.13
|
- addr: 127.0.0.13
|
||||||
|
|
|
@ -96,26 +96,30 @@ logger:
|
||||||
# - addr: 127.0.1.11
|
# - addr: 127.0.1.11
|
||||||
# port: 7777
|
# port: 7777
|
||||||
#
|
#
|
||||||
# <Discovery>
|
# <For Indirect Communication with Delegated Discovery>
|
||||||
#
|
#
|
||||||
# o NF Discovery and Selection
|
# o (Default) If you do not set Delegated Discovery as shown below,
|
||||||
# for indirect communication with Delegated Discovery;
|
|
||||||
#
|
|
||||||
# o delegated:
|
|
||||||
# o auto: (Default)
|
|
||||||
# Use next-hop SCP if next-hop SCP available. Otherwise NRF is used.
|
|
||||||
# => App fails if both next-hop SCP and NRF are unavailable.
|
|
||||||
# o yes: Use next-hop SCP always.
|
|
||||||
# => App fails if no next-hop SCP available.
|
|
||||||
# o no: Don't use next-hop SCP server.
|
|
||||||
# => App fails if no NRF available.
|
|
||||||
#
|
#
|
||||||
# next_scp:
|
# next_scp:
|
||||||
# sbi:
|
# sbi:
|
||||||
# - addr: 127.0.1.11
|
# - addr: 127.0.1.10
|
||||||
|
# port: 7777
|
||||||
|
#
|
||||||
|
# - Use SCP if SCP avaiable. Otherwise NRF is used.
|
||||||
|
# => App fails if both NRF and SCP are unavailable.
|
||||||
|
#
|
||||||
|
# next_scp:
|
||||||
|
# sbi:
|
||||||
|
# - addr: 127.0.1.10
|
||||||
# port: 7777
|
# port: 7777
|
||||||
# discovery:
|
# discovery:
|
||||||
# delegated: auto|yes|no
|
# delegated: auto
|
||||||
|
#
|
||||||
|
# o To use SCP always => App fails if no SCP available.
|
||||||
|
# delegated: yes
|
||||||
|
#
|
||||||
|
# o Don't use SCP server => App fails if no NRF available.
|
||||||
|
# delegated: no
|
||||||
#
|
#
|
||||||
scp:
|
scp:
|
||||||
sbi:
|
sbi:
|
||||||
|
|
|
@ -94,6 +94,31 @@ logger:
|
||||||
# service_name:
|
# service_name:
|
||||||
# - nsmf-pdusession
|
# - nsmf-pdusession
|
||||||
#
|
#
|
||||||
|
# <NF Discovery Query Parameter>
|
||||||
|
#
|
||||||
|
# o (Default) If you do not set Query Parameter as shown below,
|
||||||
|
#
|
||||||
|
# sbi:
|
||||||
|
# - addr: 127.0.0.4
|
||||||
|
# port: 7777
|
||||||
|
#
|
||||||
|
# - 'service-names' is included.
|
||||||
|
#
|
||||||
|
# sbi:
|
||||||
|
# - addr: 127.0.0.4
|
||||||
|
# port: 7777
|
||||||
|
# discovery:
|
||||||
|
# option:
|
||||||
|
# no_service_names: false
|
||||||
|
#
|
||||||
|
# o To remove 'service-names' from URI query parameters in NS Discovery
|
||||||
|
# no_service_names: true
|
||||||
|
#
|
||||||
|
# * For Indirect Communication with Delegated Discovery,
|
||||||
|
# 'service-names' is always included in the URI query parameter.
|
||||||
|
# * That is, 'no_service_names' has no effect.
|
||||||
|
#
|
||||||
|
#
|
||||||
# <PFCP Server>
|
# <PFCP Server>
|
||||||
#
|
#
|
||||||
# o PFCP Server(127.0.0.4:8805, ::1:8805)
|
# o PFCP Server(127.0.0.4:8805, ::1:8805)
|
||||||
|
|
|
@ -96,6 +96,30 @@ logger:
|
||||||
# - nudm-uecm
|
# - nudm-uecm
|
||||||
# - nudm-ueau
|
# - nudm-ueau
|
||||||
#
|
#
|
||||||
|
# <NF Discovery Query Parameter>
|
||||||
|
#
|
||||||
|
# o (Default) If you do not set Query Parameter as shown below,
|
||||||
|
#
|
||||||
|
# sbi:
|
||||||
|
# - addr: 127.0.0.12
|
||||||
|
# port: 7777
|
||||||
|
#
|
||||||
|
# - 'service-names' is included.
|
||||||
|
#
|
||||||
|
# sbi:
|
||||||
|
# - addr: 127.0.0.12
|
||||||
|
# port: 7777
|
||||||
|
# discovery:
|
||||||
|
# option:
|
||||||
|
# no_service_names: false
|
||||||
|
#
|
||||||
|
# o To remove 'service-names' from URI query parameters in NS Discovery
|
||||||
|
# no_service_names: true
|
||||||
|
#
|
||||||
|
# * For Indirect Communication with Delegated Discovery,
|
||||||
|
# 'service-names' is always included in the URI query parameter.
|
||||||
|
# * That is, 'no_service_names' has no effect.
|
||||||
|
#
|
||||||
udm:
|
udm:
|
||||||
sbi:
|
sbi:
|
||||||
- addr: 127.0.0.12
|
- addr: 127.0.0.12
|
||||||
|
|
|
@ -96,6 +96,30 @@ logger:
|
||||||
# service_name:
|
# service_name:
|
||||||
# - nudr-dr
|
# - nudr-dr
|
||||||
#
|
#
|
||||||
|
# <NF Discovery Query Parameter>
|
||||||
|
#
|
||||||
|
# o (Default) If you do not set Query Parameter as shown below,
|
||||||
|
#
|
||||||
|
# sbi:
|
||||||
|
# - addr: 127.0.0.20
|
||||||
|
# port: 7777
|
||||||
|
#
|
||||||
|
# - 'service-names' is included.
|
||||||
|
#
|
||||||
|
# sbi:
|
||||||
|
# - addr: 127.0.0.20
|
||||||
|
# port: 7777
|
||||||
|
# discovery:
|
||||||
|
# option:
|
||||||
|
# no_service_names: false
|
||||||
|
#
|
||||||
|
# o To remove 'service-names' from URI query parameters in NS Discovery
|
||||||
|
# no_service_names: true
|
||||||
|
#
|
||||||
|
# * For Indirect Communication with Delegated Discovery,
|
||||||
|
# 'service-names' is always included in the URI query parameter.
|
||||||
|
# * That is, 'no_service_names' has no effect.
|
||||||
|
#
|
||||||
udr:
|
udr:
|
||||||
sbi:
|
sbi:
|
||||||
- addr: 127.0.0.20
|
- addr: 127.0.0.20
|
||||||
|
|
|
@ -106,44 +106,11 @@ smf:
|
||||||
- identity: pcrf.localdomain
|
- identity: pcrf.localdomain
|
||||||
addr: 127.0.0.9
|
addr: 127.0.0.9
|
||||||
|
|
||||||
#
|
|
||||||
# <NF Discovery Query Parameter>
|
|
||||||
#
|
|
||||||
# o (Default) If you do not set Query Parameter as shown below,
|
|
||||||
#
|
|
||||||
# amf:
|
|
||||||
# sbi:
|
|
||||||
# - addr: 127.0.0.5
|
|
||||||
# port: 7777
|
|
||||||
#
|
|
||||||
# - 'service-names' is included.
|
|
||||||
# - 'requester-nf-instance-id' is NOT included.
|
|
||||||
#
|
|
||||||
# amf:
|
|
||||||
# sbi:
|
|
||||||
# - addr: 127.0.0.5
|
|
||||||
# port: 7777
|
|
||||||
# discovery:
|
|
||||||
# option:
|
|
||||||
# no_service_names: false
|
|
||||||
# prefer_requester_nf_instance_id: false
|
|
||||||
#
|
|
||||||
# o To remove 'service-names' from URI query parameters in NS Discovery
|
|
||||||
# no_service_names: true
|
|
||||||
#
|
|
||||||
# * For Indirect Communication with Delegated Discovery,
|
|
||||||
# 'service-names' is always included in the URI query parameter.
|
|
||||||
# * That is, 'no_service_names' has no effect.
|
|
||||||
#
|
|
||||||
# o To add 'requester-nf-instance-id' from URI query parameters in NS Discovery
|
|
||||||
# prefer_requester_nf_instance_id: true
|
|
||||||
#
|
|
||||||
#
|
#
|
||||||
# <For Indirect Communication with Delegated Discovery>
|
# <For Indirect Communication with Delegated Discovery>
|
||||||
#
|
#
|
||||||
# o (Default) If you do not set Delegated Discovery as shown below,
|
# o (Default) If you do not set Delegated Discovery as shown below,
|
||||||
#
|
#
|
||||||
# amf:
|
|
||||||
# sbi:
|
# sbi:
|
||||||
# - addr: 127.0.0.5
|
# - addr: 127.0.0.5
|
||||||
# port: 7777
|
# port: 7777
|
||||||
|
@ -151,7 +118,6 @@ smf:
|
||||||
# - Use SCP if SCP avaiable. Otherwise NRF is used.
|
# - Use SCP if SCP avaiable. Otherwise NRF is used.
|
||||||
# => App fails if both NRF and SCP are unavailable.
|
# => App fails if both NRF and SCP are unavailable.
|
||||||
#
|
#
|
||||||
# amf:
|
|
||||||
# sbi:
|
# sbi:
|
||||||
# - addr: 127.0.0.5
|
# - addr: 127.0.0.5
|
||||||
# port: 7777
|
# port: 7777
|
||||||
|
|
|
@ -235,6 +235,37 @@ char *ogs_supi_from_suci(char *suci)
|
||||||
return supi;
|
return supi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *ogs_supi_from_supi_or_suci(char *supi_or_suci)
|
||||||
|
{
|
||||||
|
char *type = NULL;
|
||||||
|
char *supi = NULL;
|
||||||
|
|
||||||
|
ogs_assert(supi_or_suci);
|
||||||
|
type = ogs_id_get_type(supi_or_suci);
|
||||||
|
if (!type) {
|
||||||
|
ogs_error("ogs_id_get_type[%s] failed", supi_or_suci);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
SWITCH(type)
|
||||||
|
CASE("imsi")
|
||||||
|
supi = ogs_strdup(supi_or_suci);
|
||||||
|
ogs_expect(supi);
|
||||||
|
break;
|
||||||
|
CASE("suci")
|
||||||
|
supi = ogs_supi_from_suci(supi_or_suci);
|
||||||
|
ogs_expect(supi);
|
||||||
|
break;
|
||||||
|
DEFAULT
|
||||||
|
ogs_error("Not implemented [%s]", type);
|
||||||
|
break;
|
||||||
|
END
|
||||||
|
|
||||||
|
cleanup:
|
||||||
|
if (type)
|
||||||
|
ogs_free(type);
|
||||||
|
return supi;
|
||||||
|
}
|
||||||
|
|
||||||
char *ogs_id_get_type(char *str)
|
char *ogs_id_get_type(char *str)
|
||||||
{
|
{
|
||||||
char *token, *p, *tmp;
|
char *token, *p, *tmp;
|
||||||
|
@ -242,14 +273,25 @@ char *ogs_id_get_type(char *str)
|
||||||
|
|
||||||
ogs_assert(str);
|
ogs_assert(str);
|
||||||
tmp = ogs_strdup(str);
|
tmp = ogs_strdup(str);
|
||||||
ogs_expect_or_return_val(tmp, NULL);
|
if (!tmp) {
|
||||||
|
ogs_error("ogs_strdup[%s] failed", str);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
p = tmp;
|
p = tmp;
|
||||||
token = strsep(&p, "-");
|
token = strsep(&p, "-");
|
||||||
ogs_assert(token);
|
if (!token) {
|
||||||
|
ogs_error("strsep[%s] failed", str);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
type = ogs_strdup(token);
|
type = ogs_strdup(token);
|
||||||
ogs_expect_or_return_val(type, NULL);
|
if (!type) {
|
||||||
|
ogs_error("ogs_strdup[%s:%s] failed", str, token);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
cleanup:
|
||||||
|
if (tmp)
|
||||||
ogs_free(tmp);
|
ogs_free(tmp);
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
@ -261,16 +303,30 @@ char *ogs_id_get_value(char *str)
|
||||||
|
|
||||||
ogs_assert(str);
|
ogs_assert(str);
|
||||||
tmp = ogs_strdup(str);
|
tmp = ogs_strdup(str);
|
||||||
ogs_expect_or_return_val(tmp, NULL);
|
if (!tmp) {
|
||||||
|
ogs_error("ogs_strdup[%s] failed", str);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
p = tmp;
|
p = tmp;
|
||||||
token = strsep(&p, "-");
|
token = strsep(&p, "-");
|
||||||
ogs_assert(token);
|
if (!token) {
|
||||||
|
ogs_error("strsep[%s] failed", str);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
token = strsep(&p, "-");
|
token = strsep(&p, "-");
|
||||||
ogs_assert(token);
|
if (!token) {
|
||||||
|
ogs_error("strsep[%s] failed", str);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
ueid = ogs_strdup(token);
|
ueid = ogs_strdup(token);
|
||||||
ogs_expect_or_return_val(ueid, NULL);
|
if (!ueid) {
|
||||||
|
ogs_error("ogs_strdup[%s:%s] failed", str, token);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
cleanup:
|
||||||
|
if (tmp)
|
||||||
ogs_free(tmp);
|
ogs_free(tmp);
|
||||||
return ueid;
|
return ueid;
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,6 +177,7 @@ ogs_amf_id_t *ogs_amf_id_build(ogs_amf_id_t *amf_id,
|
||||||
/************************************
|
/************************************
|
||||||
* SUPI/SUCI */
|
* SUPI/SUCI */
|
||||||
char *ogs_supi_from_suci(char *suci);
|
char *ogs_supi_from_suci(char *suci);
|
||||||
|
char *ogs_supi_from_supi_or_suci(char *supi_or_suci);
|
||||||
|
|
||||||
/************************************
|
/************************************
|
||||||
* SUPI/GPSI */
|
* SUPI/GPSI */
|
||||||
|
|
|
@ -1307,6 +1307,8 @@ ogs_sbi_nf_service_t *ogs_sbi_nf_service_build_default(
|
||||||
ogs_assert(nf_service->fqdn);
|
ogs_assert(nf_service->fqdn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ogs_info("NF Service [%s]", nf_service->name);
|
||||||
|
|
||||||
return nf_service;
|
return nf_service;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -303,7 +303,8 @@ ogs_sbi_request_t *ogs_sbi_build_request(ogs_sbi_message_t *message)
|
||||||
OGS_SBI_PARAM_REQUESTER_NF_INSTANCE_ID,
|
OGS_SBI_PARAM_REQUESTER_NF_INSTANCE_ID,
|
||||||
discovery_option->requester_nf_instance_id);
|
discovery_option->requester_nf_instance_id);
|
||||||
}
|
}
|
||||||
if (discovery_option->num_of_service_names) {
|
if (ogs_sbi_self()->discovery_config.no_service_names == false &&
|
||||||
|
discovery_option->num_of_service_names) {
|
||||||
char *v = NULL;
|
char *v = NULL;
|
||||||
cJSON *item = NULL;
|
cJSON *item = NULL;
|
||||||
|
|
||||||
|
|
|
@ -823,6 +823,8 @@ int amf_context_parse_config(void)
|
||||||
/* handle config in sbi library */
|
/* handle config in sbi library */
|
||||||
} else if (!strcmp(amf_key, "service_name")) {
|
} else if (!strcmp(amf_key, "service_name")) {
|
||||||
/* handle config in sbi library */
|
/* handle config in sbi library */
|
||||||
|
} else if (!strcmp(amf_key, "discovery")) {
|
||||||
|
/* handle config in sbi library */
|
||||||
} else
|
} else
|
||||||
ogs_warn("unknown key `%s`", amf_key);
|
ogs_warn("unknown key `%s`", amf_key);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1085,6 +1085,7 @@ int gmm_handle_ul_nas_transport(amf_ue_t *amf_ue,
|
||||||
OGS_SBI_SERVICE_TYPE_NSMF_PDUSESSION);
|
OGS_SBI_SERVICE_TYPE_NSMF_PDUSESSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (discovery_option)
|
||||||
ogs_sbi_discovery_option_free(discovery_option);
|
ogs_sbi_discovery_option_free(discovery_option);
|
||||||
|
|
||||||
if (nf_instance) {
|
if (nf_instance) {
|
||||||
|
|
|
@ -104,6 +104,8 @@ int ausf_context_parse_config(void)
|
||||||
/* handle config in sbi library */
|
/* handle config in sbi library */
|
||||||
} else if (!strcmp(ausf_key, "service_name")) {
|
} else if (!strcmp(ausf_key, "service_name")) {
|
||||||
/* handle config in sbi library */
|
/* handle config in sbi library */
|
||||||
|
} else if (!strcmp(ausf_key, "discovery")) {
|
||||||
|
/* handle config in sbi library */
|
||||||
} else
|
} else
|
||||||
ogs_warn("unknown key `%s`", ausf_key);
|
ogs_warn("unknown key `%s`", ausf_key);
|
||||||
}
|
}
|
||||||
|
@ -135,7 +137,7 @@ ausf_ue_t *ausf_ue_add(char *suci)
|
||||||
ogs_assert(ausf_ue->suci);
|
ogs_assert(ausf_ue->suci);
|
||||||
ogs_hash_set(self.suci_hash, ausf_ue->suci, strlen(ausf_ue->suci), ausf_ue);
|
ogs_hash_set(self.suci_hash, ausf_ue->suci, strlen(ausf_ue->suci), ausf_ue);
|
||||||
|
|
||||||
ausf_ue->supi = ogs_supi_from_suci(ausf_ue->suci);
|
ausf_ue->supi = ogs_supi_from_supi_or_suci(ausf_ue->suci);
|
||||||
ogs_assert(ausf_ue->supi);
|
ogs_assert(ausf_ue->supi);
|
||||||
ogs_hash_set(self.supi_hash, ausf_ue->supi, strlen(ausf_ue->supi), ausf_ue);
|
ogs_hash_set(self.supi_hash, ausf_ue->supi, strlen(ausf_ue->supi), ausf_ue);
|
||||||
|
|
||||||
|
|
|
@ -106,6 +106,8 @@ int bsf_context_parse_config(void)
|
||||||
/* handle config in sbi library */
|
/* handle config in sbi library */
|
||||||
} else if (!strcmp(bsf_key, "service_name")) {
|
} else if (!strcmp(bsf_key, "service_name")) {
|
||||||
/* handle config in sbi library */
|
/* handle config in sbi library */
|
||||||
|
} else if (!strcmp(bsf_key, "discovery")) {
|
||||||
|
/* handle config in sbi library */
|
||||||
} else
|
} else
|
||||||
ogs_warn("unknown key `%s`", bsf_key);
|
ogs_warn("unknown key `%s`", bsf_key);
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,6 +98,8 @@ int nssf_context_parse_config(void)
|
||||||
/* handle config in sbi library */
|
/* handle config in sbi library */
|
||||||
} else if (!strcmp(nssf_key, "service_name")) {
|
} else if (!strcmp(nssf_key, "service_name")) {
|
||||||
/* handle config in sbi library */
|
/* handle config in sbi library */
|
||||||
|
} else if (!strcmp(nssf_key, "discovery")) {
|
||||||
|
/* handle config in sbi library */
|
||||||
} else if (!strcmp(nssf_key, "nsi")) {
|
} else if (!strcmp(nssf_key, "nsi")) {
|
||||||
ogs_list_t list, list6;
|
ogs_list_t list, list6;
|
||||||
ogs_socknode_t *node = NULL, *node6 = NULL;
|
ogs_socknode_t *node = NULL, *node6 = NULL;
|
||||||
|
|
|
@ -119,6 +119,8 @@ int pcf_context_parse_config(void)
|
||||||
/* handle config in sbi library */
|
/* handle config in sbi library */
|
||||||
} else if (!strcmp(pcf_key, "service_name")) {
|
} else if (!strcmp(pcf_key, "service_name")) {
|
||||||
/* handle config in sbi library */
|
/* handle config in sbi library */
|
||||||
|
} else if (!strcmp(pcf_key, "discovery")) {
|
||||||
|
/* handle config in sbi library */
|
||||||
} else
|
} else
|
||||||
ogs_warn("unknown key `%s`", pcf_key);
|
ogs_warn("unknown key `%s`", pcf_key);
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,7 +179,11 @@ void pcf_state_operational(ogs_fsm_t *s, pcf_event_t *e)
|
||||||
message.SmPolicyContextData->supi) {
|
message.SmPolicyContextData->supi) {
|
||||||
pcf_ue = pcf_ue_find_by_supi(
|
pcf_ue = pcf_ue_find_by_supi(
|
||||||
message.SmPolicyContextData->supi);
|
message.SmPolicyContextData->supi);
|
||||||
if (pcf_ue) {
|
if (!pcf_ue) {
|
||||||
|
pcf_ue = pcf_ue_add(
|
||||||
|
message.SmPolicyContextData->supi);
|
||||||
|
ogs_assert(pcf_ue);
|
||||||
|
}
|
||||||
if (message.SmPolicyContextData->pdu_session_id) {
|
if (message.SmPolicyContextData->pdu_session_id) {
|
||||||
sess = pcf_sess_find_by_psi(pcf_ue, message.
|
sess = pcf_sess_find_by_psi(pcf_ue, message.
|
||||||
SmPolicyContextData->pdu_session_id);
|
SmPolicyContextData->pdu_session_id);
|
||||||
|
@ -192,7 +196,6 @@ void pcf_state_operational(ogs_fsm_t *s, pcf_event_t *e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
sess = pcf_sess_find_by_sm_policy_id(
|
sess = pcf_sess_find_by_sm_policy_id(
|
||||||
message.h.resource.component[1]);
|
message.h.resource.component[1]);
|
||||||
|
|
|
@ -98,6 +98,8 @@ int scp_context_parse_config(void)
|
||||||
/* handle config in sbi library */
|
/* handle config in sbi library */
|
||||||
} else if (!strcmp(scp_key, "service_name")) {
|
} else if (!strcmp(scp_key, "service_name")) {
|
||||||
/* handle config in sbi library */
|
/* handle config in sbi library */
|
||||||
|
} else if (!strcmp(scp_key, "discovery")) {
|
||||||
|
/* handle config in sbi library */
|
||||||
} else
|
} else
|
||||||
ogs_warn("unknown key `%s`", scp_key);
|
ogs_warn("unknown key `%s`", scp_key);
|
||||||
}
|
}
|
||||||
|
|
|
@ -833,6 +833,8 @@ int smf_context_parse_config(void)
|
||||||
/* handle config in sbi library */
|
/* handle config in sbi library */
|
||||||
} else if (!strcmp(smf_key, "service_name")) {
|
} else if (!strcmp(smf_key, "service_name")) {
|
||||||
/* handle config in sbi library */
|
/* handle config in sbi library */
|
||||||
|
} else if (!strcmp(smf_key, "discovery")) {
|
||||||
|
/* handle config in sbi library */
|
||||||
} else
|
} else
|
||||||
ogs_warn("unknown key `%s`", smf_key);
|
ogs_warn("unknown key `%s`", smf_key);
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,6 +104,8 @@ int udm_context_parse_config(void)
|
||||||
/* handle config in sbi library */
|
/* handle config in sbi library */
|
||||||
} else if (!strcmp(udm_key, "service_name")) {
|
} else if (!strcmp(udm_key, "service_name")) {
|
||||||
/* handle config in sbi library */
|
/* handle config in sbi library */
|
||||||
|
} else if (!strcmp(udm_key, "discovery")) {
|
||||||
|
/* handle config in sbi library */
|
||||||
} else
|
} else
|
||||||
ogs_warn("unknown key `%s`", udm_key);
|
ogs_warn("unknown key `%s`", udm_key);
|
||||||
}
|
}
|
||||||
|
@ -135,7 +137,7 @@ udm_ue_t *udm_ue_add(char *suci)
|
||||||
ogs_assert(udm_ue->suci);
|
ogs_assert(udm_ue->suci);
|
||||||
ogs_hash_set(self.suci_hash, udm_ue->suci, strlen(udm_ue->suci), udm_ue);
|
ogs_hash_set(self.suci_hash, udm_ue->suci, strlen(udm_ue->suci), udm_ue);
|
||||||
|
|
||||||
udm_ue->supi = ogs_supi_from_suci(udm_ue->suci);
|
udm_ue->supi = ogs_supi_from_supi_or_suci(udm_ue->suci);
|
||||||
ogs_assert(udm_ue->supi);
|
ogs_assert(udm_ue->supi);
|
||||||
ogs_hash_set(self.supi_hash, udm_ue->supi, strlen(udm_ue->supi), udm_ue);
|
ogs_hash_set(self.supi_hash, udm_ue->supi, strlen(udm_ue->supi), udm_ue);
|
||||||
|
|
||||||
|
|
|
@ -86,6 +86,8 @@ int udr_context_parse_config(void)
|
||||||
/* handle config in sbi library */
|
/* handle config in sbi library */
|
||||||
} else if (!strcmp(udr_key, "service_name")) {
|
} else if (!strcmp(udr_key, "service_name")) {
|
||||||
/* handle config in sbi library */
|
/* handle config in sbi library */
|
||||||
|
} else if (!strcmp(udr_key, "discovery")) {
|
||||||
|
/* handle config in sbi library */
|
||||||
} else
|
} else
|
||||||
ogs_warn("unknown key `%s`", udr_key);
|
ogs_warn("unknown key `%s`", udr_key);
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,6 +113,8 @@ int af_context_parse_config(void)
|
||||||
/* handle config in sbi library */
|
/* handle config in sbi library */
|
||||||
} else if (!strcmp(af_key, "service_name")) {
|
} else if (!strcmp(af_key, "service_name")) {
|
||||||
/* handle config in sbi library */
|
/* handle config in sbi library */
|
||||||
|
} else if (!strcmp(af_key, "discovery")) {
|
||||||
|
/* handle config in sbi library */
|
||||||
} else
|
} else
|
||||||
ogs_warn("unknown key `%s`", af_key);
|
ogs_warn("unknown key `%s`", af_key);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue