-
+ |
|
-
+ |
diff --git a/configs/310014.yaml.in b/configs/310014.yaml.in
index eaafc45c8..90919c622 100644
--- a/configs/310014.yaml.in
+++ b/configs/310014.yaml.in
@@ -24,6 +24,7 @@ mme:
identity: mme.localdomain
realm: localdomain
listen_on: 127.0.0.2
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
@@ -90,6 +91,7 @@ smf:
identity: smf.localdomain
realm: localdomain
listen_on: 127.0.0.4
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
@@ -153,6 +155,7 @@ hss:
identity: hss.localdomain
realm: localdomain
listen_on: 127.0.0.8
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
@@ -170,6 +173,7 @@ pcrf:
identity: pcrf.localdomain
realm: localdomain
listen_on: 127.0.0.9
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
diff --git a/configs/csfb.yaml.in b/configs/csfb.yaml.in
index b28cfae52..3adb8d552 100644
--- a/configs/csfb.yaml.in
+++ b/configs/csfb.yaml.in
@@ -24,6 +24,7 @@ mme:
identity: mme.localdomain
realm: localdomain
listen_on: 127.0.0.2
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
@@ -124,6 +125,7 @@ smf:
identity: smf.localdomain
realm: localdomain
listen_on: 127.0.0.4
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
@@ -187,6 +189,7 @@ hss:
identity: hss.localdomain
realm: localdomain
listen_on: 127.0.0.8
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
@@ -204,6 +207,7 @@ pcrf:
identity: pcrf.localdomain
realm: localdomain
listen_on: 127.0.0.9
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
diff --git a/configs/freeDiameter/hss.conf.in b/configs/freeDiameter/hss.conf.in
index 619d98f89..10c4b78df 100644
--- a/configs/freeDiameter/hss.conf.in
+++ b/configs/freeDiameter/hss.conf.in
@@ -175,6 +175,7 @@ TLS_CA = "@sysconfdir@/freeDiameter/cacert.pem";
# exchanges.
# Default: Relaying is enabled.
#NoRelay;
+NoRelay;
# Number of server threads that can handle incoming messages at the same time.
# Default: 4
diff --git a/configs/freeDiameter/mme.conf.in b/configs/freeDiameter/mme.conf.in
index 56158501c..790ce9742 100644
--- a/configs/freeDiameter/mme.conf.in
+++ b/configs/freeDiameter/mme.conf.in
@@ -175,6 +175,7 @@ TLS_CA = "@sysconfdir@/freeDiameter/cacert.pem";
# exchanges.
# Default: Relaying is enabled.
#NoRelay;
+NoRelay;
# Number of server threads that can handle incoming messages at the same time.
# Default: 4
diff --git a/configs/freeDiameter/pcrf.conf.in b/configs/freeDiameter/pcrf.conf.in
index 7d6322c4b..d0cc2ec02 100644
--- a/configs/freeDiameter/pcrf.conf.in
+++ b/configs/freeDiameter/pcrf.conf.in
@@ -175,6 +175,7 @@ TLS_CA = "@sysconfdir@/freeDiameter/cacert.pem";
# exchanges.
# Default: Relaying is enabled.
#NoRelay;
+NoRelay;
# Number of server threads that can handle incoming messages at the same time.
# Default: 4
diff --git a/configs/freeDiameter/smf.conf.in b/configs/freeDiameter/smf.conf.in
index 02e1695c0..77b881076 100644
--- a/configs/freeDiameter/smf.conf.in
+++ b/configs/freeDiameter/smf.conf.in
@@ -175,6 +175,7 @@ TLS_CA = "@sysconfdir@/freeDiameter/cacert.pem";
# exchanges.
# Default: Relaying is enabled.
#NoRelay;
+NoRelay;
# Number of server threads that can handle incoming messages at the same time.
# Default: 4
diff --git a/configs/meson.build b/configs/meson.build
index da7c21bc1..f0cb05a93 100644
--- a/configs/meson.build
+++ b/configs/meson.build
@@ -42,6 +42,7 @@ example_conf = '''
slice.yaml
srslte.yaml
sample.yaml
+ non3gpp.yaml
'''.split()
foreach file : example_conf
diff --git a/configs/non3gpp.yaml.in b/configs/non3gpp.yaml.in
new file mode 100644
index 000000000..b223812bf
--- /dev/null
+++ b/configs/non3gpp.yaml.in
@@ -0,0 +1,233 @@
+db_uri: mongodb://localhost/open5gs
+
+logger:
+
+parameter:
+# no_nrf: true
+# no_amf: true
+# no_smf: true
+# no_upf: true
+# no_ausf: true
+# no_udm: true
+# no_pcf: true
+# no_nssf: true
+# no_bsf: true
+# no_udr: true
+# no_mme: true
+# no_sgwc: true
+# no_sgwu: true
+# no_pcrf: true
+# no_hss: true
+
+mme:
+ freeDiameter:
+ identity: mme.localdomain
+ realm: localdomain
+ listen_on: 127.0.0.2
+ no_fwd: true
+ load_extension:
+ - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
+ conf: 0x8888
+ - module: @freediameter_extensions_builddir@/dict_rfc5777.fdx
+ - module: @freediameter_extensions_builddir@/dict_mip6i.fdx
+ - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
+ - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
+ - module: @freediameter_extensions_builddir@/dict_dcca.fdx
+ - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
+ connect:
+ - identity: hss.localdomain
+ addr: 127.0.0.8
+
+ s1ap:
+ - addr: 127.0.0.2
+ gtpc:
+ - addr: 127.0.0.2
+ gummei:
+ plmn_id:
+ mcc: 901
+ mnc: 70
+ mme_gid: 2
+ mme_code: 1
+ tai:
+ plmn_id:
+ mcc: 901
+ mnc: 70
+ tac: 1
+ security:
+ integrity_order : [ EIA2, EIA1, EIA0 ]
+ ciphering_order : [ EEA0, EEA1, EEA2 ]
+
+ network_name:
+ full: Open5GS
+
+sgwc:
+ gtpc:
+ - addr: 127.0.0.3
+ pfcp:
+ - addr: 127.0.0.3
+
+smf:
+ sbi:
+ - addr: 127.0.0.4
+ port: 7777
+ pfcp:
+ - addr: 127.0.0.4
+ gtpc:
+ - addr: 127.0.0.4
+ - addr: ::1
+ gtpu:
+ - addr: 127.0.0.4
+ - addr: ::1
+ subnet:
+ - addr: 10.45.0.1/16
+ - addr: 2001:230:cafe::1/48
+ dns:
+ - 8.8.8.8
+ - 8.8.4.4
+ - 2001:4860:4860::8888
+ - 2001:4860:4860::8844
+ mtu: 1400
+ freeDiameter:
+ identity: smf.localdomain
+ realm: localdomain
+ listen_on: 127.0.0.4
+ no_fwd: true
+ load_extension:
+ - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
+ conf: 0x8888
+ - module: @freediameter_extensions_builddir@/dict_rfc5777.fdx
+ - module: @freediameter_extensions_builddir@/dict_mip6i.fdx
+ - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
+ - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
+ - module: @freediameter_extensions_builddir@/dict_dcca.fdx
+ - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
+ connect:
+ - identity: pcrf.localdomain
+ addr: 127.0.0.9
+ - identity: aaa.localdomain
+ addr: 127.0.0.1
+amf:
+ sbi:
+ - addr: 127.0.0.5
+ port: 7777
+ ngap:
+ - addr: 127.0.0.5
+ guami:
+ - plmn_id:
+ mcc: 901
+ mnc: 70
+ amf_id:
+ region: 2
+ set: 1
+ tai:
+ - plmn_id:
+ mcc: 901
+ mnc: 70
+ tac: 1
+ plmn_support:
+ - plmn_id:
+ mcc: 901
+ mnc: 70
+ s_nssai:
+ - sst: 1
+ security:
+ integrity_order : [ NIA2, NIA1, NIA0 ]
+ ciphering_order : [ NEA0, NEA1, NEA2 ]
+ network_name:
+ full: Open5GS
+ amf_name: open5gs-amf0
+
+sgwu:
+ pfcp:
+ - addr: 127.0.0.6
+ gtpu:
+ - addr: 127.0.0.6
+
+upf:
+ pfcp:
+ - addr: 127.0.0.7
+ gtpu:
+ - addr: 127.0.0.7
+ subnet:
+ - addr: 10.45.0.1/16
+ - addr: 2001:230:cafe::1/48
+
+hss:
+ freeDiameter:
+ identity: hss.localdomain
+ realm: localdomain
+ listen_on: 127.0.0.8
+ no_fwd: true
+ load_extension:
+ - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
+ conf: 0x8888
+ - module: @freediameter_extensions_builddir@/dict_rfc5777.fdx
+ - module: @freediameter_extensions_builddir@/dict_mip6i.fdx
+ - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
+ - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
+ - module: @freediameter_extensions_builddir@/dict_dcca.fdx
+ - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
+ connect:
+ - identity: mme.localdomain
+ addr: 127.0.0.2
+ - identity: aaa.localdomain
+ addr: 127.0.0.1
+pcrf:
+ freeDiameter:
+ identity: pcrf.localdomain
+ realm: localdomain
+ listen_on: 127.0.0.9
+ no_fwd: true
+ load_extension:
+ - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
+ conf: 0x8888
+ - module: @freediameter_extensions_builddir@/dict_rfc5777.fdx
+ - module: @freediameter_extensions_builddir@/dict_mip6i.fdx
+ - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
+ - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
+ - module: @freediameter_extensions_builddir@/dict_dcca.fdx
+ - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
+ connect:
+ - identity: smf.localdomain
+ addr: 127.0.0.4
+
+nrf:
+ sbi:
+ - addr:
+ - 127.0.0.10
+ - ::1
+ port: 7777
+
+ausf:
+ sbi:
+ - addr: 127.0.0.11
+ port: 7777
+
+udm:
+ sbi:
+ - addr: 127.0.0.12
+ port: 7777
+
+pcf:
+ sbi:
+ - addr: 127.0.0.13
+ port: 7777
+
+nssf:
+ sbi:
+ - addr: 127.0.0.14
+ port: 7777
+ nsi:
+ - addr: ::1
+ port: 7777
+ s_nssai:
+ sst: 1
+bsf:
+ sbi:
+ - addr: 127.0.0.15
+ port: 7777
+
+udr:
+ sbi:
+ - addr: 127.0.0.20
+ port: 7777
diff --git a/configs/sample.yaml.in b/configs/sample.yaml.in
index fcffb11ba..0800ee3b4 100644
--- a/configs/sample.yaml.in
+++ b/configs/sample.yaml.in
@@ -24,6 +24,7 @@ mme:
identity: mme.localdomain
realm: localdomain
listen_on: 127.0.0.2
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
@@ -90,6 +91,7 @@ smf:
identity: smf.localdomain
realm: localdomain
listen_on: 127.0.0.4
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
@@ -153,6 +155,7 @@ hss:
identity: hss.localdomain
realm: localdomain
listen_on: 127.0.0.8
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
@@ -170,6 +173,7 @@ pcrf:
identity: pcrf.localdomain
realm: localdomain
listen_on: 127.0.0.9
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
diff --git a/configs/slice.yaml.in b/configs/slice.yaml.in
index beb1792df..a177901da 100644
--- a/configs/slice.yaml.in
+++ b/configs/slice.yaml.in
@@ -24,6 +24,7 @@ mme:
identity: mme.localdomain
realm: localdomain
listen_on: 127.0.0.2
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
@@ -90,6 +91,7 @@ smf:
identity: smf.localdomain
realm: localdomain
listen_on: 127.0.0.4
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
@@ -157,6 +159,7 @@ hss:
identity: hss.localdomain
realm: localdomain
listen_on: 127.0.0.8
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
@@ -174,6 +177,7 @@ pcrf:
identity: pcrf.localdomain
realm: localdomain
listen_on: 127.0.0.9
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
diff --git a/configs/srslte.yaml.in b/configs/srslte.yaml.in
index 9f3ad21ca..1dec96467 100644
--- a/configs/srslte.yaml.in
+++ b/configs/srslte.yaml.in
@@ -24,6 +24,7 @@ mme:
identity: mme.localdomain
realm: localdomain
listen_on: 127.0.0.2
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
@@ -90,6 +91,7 @@ smf:
identity: smf.localdomain
realm: localdomain
listen_on: 127.0.0.4
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
@@ -153,6 +155,7 @@ hss:
identity: hss.localdomain
realm: localdomain
listen_on: 127.0.0.8
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
@@ -170,6 +173,7 @@ pcrf:
identity: pcrf.localdomain
realm: localdomain
listen_on: 127.0.0.9
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
diff --git a/configs/volte.yaml.in b/configs/volte.yaml.in
index 5a19ce51d..169c35721 100644
--- a/configs/volte.yaml.in
+++ b/configs/volte.yaml.in
@@ -24,6 +24,7 @@ mme:
identity: mme.localdomain
realm: localdomain
listen_on: 127.0.0.2
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
@@ -93,6 +94,7 @@ smf:
identity: smf.localdomain
realm: localdomain
listen_on: 127.0.0.4
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
@@ -156,6 +158,7 @@ hss:
identity: hss.localdomain
realm: localdomain
listen_on: 127.0.0.8
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
@@ -175,6 +178,7 @@ pcrf:
identity: pcrf.localdomain
realm: localdomain
listen_on: 127.0.0.9
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
diff --git a/configs/vonr.yaml.in b/configs/vonr.yaml.in
index 21ce6b84d..08231e5fe 100644
--- a/configs/vonr.yaml.in
+++ b/configs/vonr.yaml.in
@@ -24,6 +24,7 @@ mme:
identity: mme.localdomain
realm: localdomain
listen_on: 127.0.0.2
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
@@ -93,6 +94,7 @@ smf:
identity: smf.localdomain
realm: localdomain
listen_on: 127.0.0.4
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
@@ -156,6 +158,7 @@ hss:
identity: hss.localdomain
realm: localdomain
listen_on: 127.0.0.8
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
@@ -173,6 +176,7 @@ pcrf:
identity: pcrf.localdomain
realm: localdomain
listen_on: 127.0.0.9
+ no_fwd: true
load_extension:
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
conf: 0x8888
diff --git a/debian/changelog b/debian/changelog
index 2c58fd098..3fb0a3724 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,27 @@
+open5gs (2.3.1) unstable; urgency=medium
+
+ * Support ePDG Interface
+
+ -- Sukchan Lee Tue, 29 Jun 2021 22:12:11 +0900
+
+open5gs (2.3.1~hirsute) hirsute; urgency=medium
+
+ * Support ePDG Interface
+
+ -- Sukchan Lee Tue, 29 Jun 2021 22:11:04 +0900
+
+open5gs (2.3.1~bionic) bionic; urgency=medium
+
+ * Support ePDG Interface
+
+ -- Sukchan Lee Tue, 29 Jun 2021 22:10:02 +0900
+
+open5gs (2.3.1~focal) focal; urgency=medium
+
+ * Support ePDG Interface
+
+ -- Sukchan Lee Tue, 29 Jun 2021 22:08:55 +0900
+
open5gs (2.3.0) unstable; urgency=medium
* Bug Fixed
diff --git a/debian/control b/debian/control
index 346766a42..1945b0c8e 100644
--- a/debian/control
+++ b/debian/control
@@ -218,7 +218,7 @@ Multi-Arch: same
Depends: ${shlibs:Depends},
${misc:Depends},
open5gs-common (= ${binary:Version})
-Description: PCF (Policy Control Function)
+Description: BSF (Binding Support Function)
Open5GS is a C-language implementation of 5G Core and EPC
Packet Core, i.e. the core network of an NR/LTE network (Release-16)
.
diff --git a/docker/debian/bullseye b/docker/debian/bullseye
new file mode 120000
index 000000000..b9bc2fdcb
--- /dev/null
+++ b/docker/debian/bullseye
@@ -0,0 +1 @@
+latest
\ No newline at end of file
diff --git a/docker/debian/sid b/docker/debian/sid
new file mode 120000
index 000000000..b9bc2fdcb
--- /dev/null
+++ b/docker/debian/sid
@@ -0,0 +1 @@
+latest
\ No newline at end of file
diff --git a/docker/debian/testing b/docker/debian/testing
new file mode 120000
index 000000000..b9bc2fdcb
--- /dev/null
+++ b/docker/debian/testing
@@ -0,0 +1 @@
+latest
\ No newline at end of file
diff --git a/docker/ubuntu/hirsute b/docker/ubuntu/hirsute
new file mode 120000
index 000000000..b9bc2fdcb
--- /dev/null
+++ b/docker/ubuntu/hirsute
@@ -0,0 +1 @@
+latest
\ No newline at end of file
diff --git a/docs/_docs/guide/01-quickstart.md b/docs/_docs/guide/01-quickstart.md
index 9cd45a9f2..b1ae283cd 100644
--- a/docs/_docs/guide/01-quickstart.md
+++ b/docs/_docs/guide/01-quickstart.md
@@ -108,7 +108,6 @@ https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Debian
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Debian_Unstable/
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Raspbian_10/
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_18.04/
-https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_19.04/
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_20.04/
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_20.10/
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_21.04/
@@ -145,7 +144,6 @@ https://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_Test
https://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_Unstable/
https://download.opensuse.org/repositories/network:/osmocom:/nightly/Raspbian_10/
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_18.04/
-https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_19.04/
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_20.04/
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_20.10/
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_21.04/
diff --git a/docs/_docs/hardware/01-genodebs.md b/docs/_docs/hardware/01-genodebs.md
index a81cbeb61..a82e24a51 100644
--- a/docs/_docs/hardware/01-genodebs.md
+++ b/docs/_docs/hardware/01-genodebs.md
@@ -29,6 +29,7 @@ If you have tested radio hardware from a vendor not listed with Open5GS, please
* Baicells Nova 436Q
* Baicells Nova 227 (EBS & CBRS)
* Baicells Nova 233
+ * Ericsson BaseBand 6630 (21Q1 Software)
* Gemtek WLTGFC-101 (S/W version 2.1.1746.1116)
* Huawei BTS 3900 (S/W version V100R011C10SPC230)
* NOKIA FW2PC BC28 Flexi Zone G2 Outdoor Micro FDD LTE 700 MHz High Power
diff --git a/docs/_pages/about.md b/docs/_pages/about.md
index 3dd8bc110..918a33899 100644
--- a/docs/_pages/about.md
+++ b/docs/_pages/about.md
@@ -16,7 +16,8 @@ Open5GS is a C-language Open Source implementation of 5GC and EPC, i.e. the core
- Multiple PDU session
- Handover(5GC Xn/N2 and EPC S1/X2)
- CSFB(Circuit Switched Fall Back) and SMSoS(SMS Over SGs)
-- VoLTE(Voice over LTE)
+- VoLTE(Voice over LTE) with HSS-Cx interface
+- Support ePDG Interface(SWx, S6b, S2b)
#### Known Limitations
---
@@ -29,4 +30,3 @@ Open5GS is a C-language Open Source implementation of 5GC and EPC, i.e. the core
- No SRVCC
- No Roaming
- No Emergency Call
-- No ePDG Gateway
diff --git a/docs/_posts/2021-06-08-release-v2.3.0.md b/docs/_posts/2021-06-08-release-v2.3.0.md
index f590b73a8..d1303fd47 100644
--- a/docs/_posts/2021-06-08-release-v2.3.0.md
+++ b/docs/_posts/2021-06-08-release-v2.3.0.md
@@ -19,7 +19,7 @@ head_inline: "
#### Bug Fixes
- [SMF] Fix the crash bug ([#1034](https://github.com/open5gs/open5gs/issues/1034), [#1006](https://github.com/open5gs/open5gs/issues/1006)) -- [mcatalancid](https://github.com/mcatalancid), [ramonss](https://github.com/ramonss)
-- [SBI] Fix the default SBI port number([#1008](https://github.com/open5gs/open5gs/issues/1008), [#997](https://github.com/open5gs/open5gs/issues/997)) -- [mmailand](https://github.com/mmailand), [plutec](https://github.com/plutec)
+- [SBI] Fix the default SBI port number ([#1008](https://github.com/open5gs/open5gs/issues/1008), [#997](https://github.com/open5gs/open5gs/issues/997)) -- [mmailand](https://github.com/mmailand), [plutec](https://github.com/plutec)
- [SMF] Fix DRB lost issue when additional TFTs needs to be added to existing bearer with TFTs ([#1019](https://github.com/open5gs/open5gs/pull/1019)) -- [herlesupreeth](https://github.com/herlesupreeth)
diff --git a/docs/_posts/2021-06-29-release-v2.3.1.md b/docs/_posts/2021-06-29-release-v2.3.1.md
new file mode 100644
index 000000000..d39a1c0a9
--- /dev/null
+++ b/docs/_posts/2021-06-29-release-v2.3.1.md
@@ -0,0 +1,30 @@
+---
+title: "v2.3.1 - Support ePDG Interface"
+date: 2021-06-29 22:13:00 +0900
+categories:
+ - Release
+tags:
+ - News
+ - Release
+head_inline: ""
+---
+
+#### New Features
+- [Non3GPP] Support ePDG Interface ([#1039](https://github.com/open5gs/open5gs/discussions/1039)) -- [herlesupreeth](https://github.com/herlesupreeth), [fasferraz](https://github.com/fasferraz)
+
+#### Enhancement
+- [GTP] Add Indication (Dual Address Bearer and Handover) ([#1049](https://github.com/open5gs/open5gs/pull/1049)) -- [medeiros405](https://github.com/medeiros405)
+
+#### Bug Fixes
+- [freeDiameter] Need to ASSERT on FD_LOG_FATAL ([#1069](https://github.com/open5gs/open5gs/pull/1069)) -- [spencersevilla](https://github.com/spencersevilla)
+- [UPF] Trim buffer to correct size after creating ARP or ND reply ([#1068](https://github.com/open5gs/open5gs/pull/1068)) -- [anarkiwi](https://github.com/anarkiwi)
+- [AMF] NG Setup Failure with proper cause "Slice not supported" ([#1064](https://github.com/open5gs/open5gs/issues/1064)) -- [irazairspan](https://github.com/irazairspan)
+- [ALL] Increase the number of 1024-memory pool (1024 --> 2048) ([#1062](https://github.com/open5gs/open5gs/issues/1062)) -- [UmakantKulkarni](https://github.com/UmakantKulkarni)
+- [AMF] fix the crash if 'ran_ue' context was removed ([#1061](https://github.com/open5gs/open5gs/issues/1061)) -- [aminssl](https://github.com/aminssl)
+- [PCF] fix the crash if PEI is not avaiable ([#1059](https://github.com/open5gs/open5gs/issues/1059)) -- [Spectranis](https://github.com/Spectranis)
+- [MME] fix the crash when release a UE ([#1058](https://github.com/open5gs/open5gs/issues/1058)) -- [duocpv89](https://github.com/duocpv89)
+- [UPF] Need to 'continue' during matching rule ([#1052](https://github.com/open5gs/open5gs/pull/1052)) -- [spencersevilla](https://github.com/spencersevilla)
+
+
+Download -- [v2.3.1.tar.gz](https://github.com/open5gs/open5gs/archive/v2.3.1.tar.gz)
+{: .notice--info}
diff --git a/lib/core/ogs-pkbuf.c b/lib/core/ogs-pkbuf.c
index 14b1c1dfc..e81bd6be2 100644
--- a/lib/core/ogs-pkbuf.c
+++ b/lib/core/ogs-pkbuf.c
@@ -95,7 +95,7 @@ void ogs_pkbuf_default_init(ogs_pkbuf_config_t *config)
config->cluster_128_pool = 65536;
config->cluster_256_pool = 16384;
config->cluster_512_pool = 4096;
- config->cluster_1024_pool = 1024;
+ config->cluster_1024_pool = 2048;
config->cluster_2048_pool = 512;
config->cluster_8192_pool = 512;
config->cluster_big_pool = 8;
diff --git a/lib/diameter/common/base.h b/lib/diameter/common/base.h
index e6aa0ceb2..748f3271e 100644
--- a/lib/diameter/common/base.h
+++ b/lib/diameter/common/base.h
@@ -43,9 +43,12 @@ typedef struct ogs_diam_config_s {
/* the local port for Diameter/TLS (default: 5658) in host byte order */
uint16_t cnf_port_tls;
- struct {
- unsigned no_sctp: 1; /* disable the use of SCTP */
- } cnf_flags;
+ struct {
+ /* the peer does not relay messages (0xffffff app id) */
+ unsigned no_fwd: 1;
+ /* disable the use of SCTP */
+ unsigned no_sctp: 1;
+ } cnf_flags;
#define MAX_NUM_OF_FD_EXTENSION 32
struct {
@@ -66,10 +69,11 @@ typedef struct ogs_diam_config_s {
} ogs_diam_config_t;
int ogs_diam_init(int mode, const char *conffile, ogs_diam_config_t *fd_config);
+int ogs_diam_start(void);
void ogs_diam_final(void);
int ogs_diam_config_init(ogs_diam_config_t *fd_config);
-bool ogs_diam_peer_connected(void);
+bool ogs_diam_app_connected(uint32_t app_id);
int fd_avp_search_avp ( struct avp * groupedavp,
struct dict_object * what, struct avp ** avp );
diff --git a/lib/diameter/common/config.c b/lib/diameter/common/config.c
index 086a58dee..5408c8392 100644
--- a/lib/diameter/common/config.c
+++ b/lib/diameter/common/config.c
@@ -66,6 +66,9 @@ static int diam_config_apply(ogs_diam_config_t *fd_config)
if (fd_config->cnf_flags.no_sctp)
fd_g_config->cnf_flags.no_sctp = fd_config->cnf_flags.no_sctp;
+ if (fd_config->cnf_flags.no_fwd)
+ fd_g_config->cnf_flags.no_fwd = fd_config->cnf_flags.no_fwd;
+
/********************************************************************
* Diameter Client
*/
diff --git a/lib/diameter/common/init.c b/lib/diameter/common/init.c
index 5b68c6a94..83b93b60d 100644
--- a/lib/diameter/common/init.c
+++ b/lib/diameter/common/init.c
@@ -57,6 +57,16 @@ int ogs_diam_init(int mode, const char *conffile, ogs_diam_config_t *fd_config)
/* Initialize FD logger */
CHECK_FCT_DO( ogs_diam_logger_init(mode), goto error );
+ return 0;
+error:
+ CHECK_FCT_DO( fd_core_shutdown(), );
+ CHECK_FCT_DO( fd_core_wait_shutdown_complete(), );
+
+ return -1;
+}
+
+int ogs_diam_start(void)
+{
/* Start the servers */
CHECK_FCT_DO( fd_core_start(), goto error );
@@ -126,6 +136,7 @@ static void diam_log_func(int printlevel, const char *format, va_list ap)
break;
case FD_LOG_FATAL:
diam_log_printf(OGS_LOG_FATAL, "%s\n", buffer);
+ ogs_assert_if_reached();
break;
default:
diam_log_printf(OGS_LOG_ERROR, "[%d] %s\n", printlevel, buffer);
diff --git a/lib/diameter/common/message.c b/lib/diameter/common/message.c
index 4b6ee0901..09de412d9 100644
--- a/lib/diameter/common/message.c
+++ b/lib/diameter/common/message.c
@@ -28,6 +28,9 @@ struct dict_object *ogs_diam_origin_realm = NULL;
struct dict_object *ogs_diam_destination_host = NULL;
struct dict_object *ogs_diam_destination_realm = NULL;
struct dict_object *ogs_diam_user_name = NULL;
+struct dict_object *ogs_diam_subscription_id = NULL;
+struct dict_object *ogs_diam_subscription_id_type = NULL;
+struct dict_object *ogs_diam_subscription_id_data = NULL;
struct dict_object *ogs_diam_auth_session_state = NULL;
struct dict_object *ogs_diam_auth_application_id = NULL;
struct dict_object *ogs_diam_auth_request_type = NULL;
@@ -41,6 +44,10 @@ struct dict_object *ogs_diam_mip_home_agent_address = NULL;
struct dict_object *ogs_diam_authorization_lifetime = NULL;
struct dict_object *ogs_diam_auth_grace_period = NULL;
struct dict_object *ogs_diam_session_timeout = NULL;
+struct dict_object *ogs_diam_rat_type = NULL;
+struct dict_object *ogs_diam_service_selection = NULL;
+struct dict_object *ogs_diam_visited_plmn_id = NULL;
+struct dict_object *ogs_diam_visited_network_identifier = NULL;
struct dict_object *ogs_diam_vendor = NULL;
struct dict_object *ogs_diam_vendor_id = NULL;
@@ -62,6 +69,9 @@ int ogs_diam_message_init()
CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Destination-Host", &ogs_diam_destination_host);
CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Destination-Realm", &ogs_diam_destination_realm);
CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "User-Name", &ogs_diam_user_name);
+ CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Subscription-Id", &ogs_diam_subscription_id);
+ CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Subscription-Id-Type", &ogs_diam_subscription_id_type);
+ CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Subscription-Id-Data", &ogs_diam_subscription_id_data);
CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Auth-Session-State", &ogs_diam_auth_session_state);
CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Auth-Application-Id", &ogs_diam_auth_application_id);
CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Auth-Request-Type", &ogs_diam_auth_request_type);
@@ -75,6 +85,10 @@ int ogs_diam_message_init()
CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Authorization-Lifetime", &ogs_diam_authorization_lifetime);
CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Auth-Grace-Period", &ogs_diam_auth_grace_period);
CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Session-Timeout", &ogs_diam_session_timeout);
+ CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "RAT-Type", &ogs_diam_rat_type);
+ CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Service-Selection", &ogs_diam_service_selection);
+ CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Visited-PLMN-Id", &ogs_diam_visited_plmn_id);
+ CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Visited-Network-Identifier", &ogs_diam_visited_network_identifier);
return 0;
}
diff --git a/lib/diameter/common/message.h b/lib/diameter/common/message.h
index e99245586..370d07549 100644
--- a/lib/diameter/common/message.h
+++ b/lib/diameter/common/message.h
@@ -47,6 +47,13 @@ extern struct dict_object *ogs_diam_origin_realm;
extern struct dict_object *ogs_diam_destination_host;
extern struct dict_object *ogs_diam_destination_realm;
extern struct dict_object *ogs_diam_user_name;
+extern struct dict_object *ogs_diam_subscription_id;
+#define OGS_DIAM_SUBSCRIPTION_ID_TYPE_END_USER_E164 0
+#define OGS_DIAM_SUBSCRIPTION_ID_TYPE_END_USER_IMSI 1
+#define OGS_DIAM_SUBSCRIPTION_ID_TYPE_END_USER_SIP_URI 2
+#define OGS_DIAM_SUBSCRIPTION_ID_TYPE_END_USER_NAI 3
+extern struct dict_object *ogs_diam_subscription_id_type;
+extern struct dict_object *ogs_diam_subscription_id_data;
#define OGS_DIAM_AUTH_SESSION_STATE_MAINTAINED 0
#define OGS_DIAM_AUTH_SESSION_NO_STATE_MAINTAINED 1
extern struct dict_object *ogs_diam_auth_session_state;
@@ -67,6 +74,22 @@ extern struct dict_object *ogs_diam_mip_home_agent_address;
extern struct dict_object *ogs_diam_authorization_lifetime;
extern struct dict_object *ogs_diam_auth_grace_period;
extern struct dict_object *ogs_diam_session_timeout;
+#define OGS_DIAM_RAT_TYPE_WLAN 0
+#define OGS_DIAM_RAT_TYPE_VIRTUAL 1
+#define OGS_DIAM_RAT_TYPE_UTRAN 1000
+#define OGS_DIAM_RAT_TYPE_GERAN 1001
+#define OGS_DIAM_RAT_TYPE_GAN 1002
+#define OGS_DIAM_RAT_TYPE_HSPA_EVOLUTION 1003
+#define OGS_DIAM_RAT_TYPE_EUTRAN 1004
+#define OGS_DIAM_RAT_TYPE_EUTRAN_NB_IoT 1005
+#define OGS_DIAM_RAT_TYPE_CDMA2000_1X 2000
+#define OGS_DIAM_RAT_TYPE_HRPD 2001
+#define OGS_DIAM_RAT_TYPE_UMB 2002
+#define OGS_DIAM_RAT_TYPE_EHRPD 2003
+extern struct dict_object *ogs_diam_rat_type;
+extern struct dict_object *ogs_diam_service_selection;
+extern struct dict_object *ogs_diam_visited_plmn_id;
+extern struct dict_object *ogs_diam_visited_network_identifier;
extern struct dict_object *ogs_diam_vendor;
extern struct dict_object *ogs_diam_vendor_id;
diff --git a/lib/diameter/common/util.c b/lib/diameter/common/util.c
index c483ef081..7bc41f8cd 100644
--- a/lib/diameter/common/util.c
+++ b/lib/diameter/common/util.c
@@ -19,10 +19,10 @@
#include "ogs-diameter-common.h"
-bool ogs_diam_peer_connected(void)
+bool ogs_diam_app_connected(uint32_t app_id)
{
- struct fd_list *li;
- bool connected = false;
+ struct fd_list *li = NULL;
+ struct fd_app *found = NULL;
CHECK_POSIX( pthread_rwlock_rdlock(&fd_g_peers_rw) );
for (li = fd_g_peers.next; li != &fd_g_peers; li = li->next) {
@@ -35,13 +35,19 @@ bool ogs_diam_peer_connected(void)
if (state == STATE_OPEN) {
ogs_debug("'%s' STATE is OPEN", p->info.pi_diamid);
- connected = true;
+
+ /* Check if the remote peer advertised the message's appli */
+ fd_app_check(&p->info.runtime.pir_apps, app_id, &found);
+
+ if (found) break;
} else {
ogs_debug("'%s' STATE[%d] is NOT open ", p->info.pi_diamid, state);
}
}
CHECK_POSIX( pthread_rwlock_unlock(&fd_g_peers_rw) );
- return connected;
+ if (found)
+ return true;
+ else
+ return false;
}
-
diff --git a/lib/diameter/cx/dict.c b/lib/diameter/cx/dict.c
index f4119d29d..7d8ebfdec 100644
--- a/lib/diameter/cx/dict.c
+++ b/lib/diameter/cx/dict.c
@@ -151,8 +151,10 @@ int ogs_dict_cx_entry(char *conffile)
{
struct dict_object * vendor;
CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_VENDOR, VENDOR_BY_NAME, "3GPP", &vendor, ENOENT));
- struct dict_application_data app_data = { 16777216, "Cx" };
- CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_APPLICATION, &app_data, vendor, NULL));
+ struct dict_application_data cx = { 16777216, "Cx" };
+ struct dict_application_data swx = { 16777265, "SWx" };
+ CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_APPLICATION, &cx, vendor, NULL));
+ CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_APPLICATION, &swx, vendor, NULL));
}
}
@@ -312,10 +314,18 @@ int ogs_dict_cx_entry(char *conffile)
{ { .avp_name = "Destination-Host" }, RULE_OPTIONAL, -1, 1 },
{ { .avp_name = "User-Name" }, RULE_REQUIRED, -1, 1 },
{ { .avp_vendor = 10415, .avp_name = "Supported-Features" }, RULE_OPTIONAL, -1, -1 },
+#if 0 /* modified by acetcom */
{ { .avp_vendor = 10415, .avp_name = "Public-Identity" }, RULE_REQUIRED, -1, 1 },
+#else
+ { { .avp_vendor = 10415, .avp_name = "Public-Identity" }, RULE_OPTIONAL, -1, 1 },
+#endif
{ { .avp_vendor = 10415, .avp_name = "SIP-Auth-Data-Item" }, RULE_REQUIRED, -1, 1 },
{ { .avp_vendor = 10415, .avp_name = "SIP-Number-Auth-Items" }, RULE_REQUIRED, -1, 1 },
+#if 0 /* modified by acetcom */
{ { .avp_vendor = 10415, .avp_name = "Server-Name" }, RULE_REQUIRED, -1, 1 },
+#else
+ { { .avp_vendor = 10415, .avp_name = "Server-Name" }, RULE_OPTIONAL, -1, 1 },
+#endif
{ { .avp_name = "Proxy-Info" }, RULE_OPTIONAL, -1, -1 },
{ { .avp_name = "Route-Record" }, RULE_OPTIONAL, -1, -1 },
};
@@ -380,9 +390,17 @@ int ogs_dict_cx_entry(char *conffile)
{ { .avp_vendor = 10415, .avp_name = "Supported-Features" }, RULE_OPTIONAL, -1, -1 },
{ { .avp_vendor = 10415, .avp_name = "Public-Identity" }, RULE_OPTIONAL, -1, -1 },
{ { .avp_vendor = 10415, .avp_name = "Wildcarded-Public-Identity" }, RULE_OPTIONAL, -1, 1 },
+#if 0 /* modified by acetcom */
{ { .avp_vendor = 10415, .avp_name = "Server-Name" }, RULE_REQUIRED, -1, 1 },
+#else
+ { { .avp_vendor = 10415, .avp_name = "Server-Name" }, RULE_OPTIONAL, -1, 1 },
+#endif
{ { .avp_vendor = 10415, .avp_name = "Server-Assignment-Type" }, RULE_REQUIRED, -1, 1 },
+#if 0 /* modified by acetcom */
{ { .avp_vendor = 10415, .avp_name = "User-Data-Already-Available" }, RULE_REQUIRED, -1, 1 },
+#else
+ { { .avp_vendor = 10415, .avp_name = "User-Data-Already-Available" }, RULE_OPTIONAL, -1, 1 },
+#endif
{ { .avp_vendor = 10415, .avp_name = "SCSCF-Restoration-Info" }, RULE_OPTIONAL, -1, 1 },
{ { .avp_vendor = 10415, .avp_name = "Multiple-Registration-Indication" }, RULE_OPTIONAL, -1, 1 },
{ { .avp_vendor = 10415, .avp_name = "Session-Priority" }, RULE_OPTIONAL, -1, 1 },
diff --git a/lib/diameter/cx/meson.build b/lib/diameter/cx/meson.build
index efb1a2f8b..dda225549 100644
--- a/lib/diameter/cx/meson.build
+++ b/lib/diameter/cx/meson.build
@@ -17,7 +17,6 @@
libdiameter_cx_sources = files('''
ogs-diameter-cx.h
-
message.h
dict.c
diff --git a/lib/diameter/cx/message.c b/lib/diameter/cx/message.c
index 93d2fa8bb..f298838a8 100644
--- a/lib/diameter/cx/message.c
+++ b/lib/diameter/cx/message.c
@@ -37,7 +37,6 @@ struct dict_object *ogs_diam_cx_cmd_lir = NULL;
struct dict_object *ogs_diam_cx_cmd_lia = NULL;
struct dict_object *ogs_diam_cx_public_identity = NULL;
-struct dict_object *ogs_diam_cx_visited_network_identifier = NULL;
struct dict_object *ogs_diam_cx_server_name = NULL;
struct dict_object *ogs_diam_cx_sip_number_auth_items = NULL;
@@ -170,9 +169,6 @@ int ogs_diam_cx_init(void)
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS,
"Public-Identity", &ogs_diam_cx_public_identity);
- CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS,
- "Visited-Network-Identifier",
- &ogs_diam_cx_visited_network_identifier);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS,
"Server-Name", &ogs_diam_cx_server_name);
diff --git a/lib/diameter/cx/message.h b/lib/diameter/cx/message.h
index 3951507d0..4bfa68267 100644
--- a/lib/diameter/cx/message.h
+++ b/lib/diameter/cx/message.h
@@ -42,7 +42,6 @@ extern struct dict_object *ogs_diam_cx_cmd_lir;
extern struct dict_object *ogs_diam_cx_cmd_lia;
extern struct dict_object *ogs_diam_cx_public_identity;
-extern struct dict_object *ogs_diam_cx_visited_network_identifier;
extern struct dict_object *ogs_diam_cx_server_name;
extern struct dict_object *ogs_diam_cx_sip_number_auth_items;
diff --git a/lib/diameter/gx/message.c b/lib/diameter/gx/message.c
index 34bfbf5df..47a09c8a0 100644
--- a/lib/diameter/gx/message.c
+++ b/lib/diameter/gx/message.c
@@ -32,16 +32,12 @@ struct dict_object *ogs_diam_gx_cmd_raa = NULL;
struct dict_object *ogs_diam_gx_cc_request_type = NULL;
struct dict_object *ogs_diam_gx_cc_request_number = NULL;
struct dict_object *ogs_diam_gx_network_request_support = NULL;
-struct dict_object *ogs_diam_gx_subscription_id = NULL;
-struct dict_object *ogs_diam_gx_subscription_id_type = NULL;
-struct dict_object *ogs_diam_gx_subscription_id_data = NULL;
struct dict_object *ogs_diam_gx_supported_features = NULL;
struct dict_object *ogs_diam_gx_feature_list_id = NULL;
struct dict_object *ogs_diam_gx_feature_list = NULL;
struct dict_object *ogs_diam_gx_framed_ip_address = NULL;
struct dict_object *ogs_diam_gx_framed_ipv6_prefix = NULL;
struct dict_object *ogs_diam_gx_ip_can_type = NULL;
-struct dict_object *ogs_diam_gx_rat_type = NULL;
struct dict_object *ogs_diam_gx_qos_information = NULL;
struct dict_object *ogs_diam_gx_qos_class_identifier = NULL;
struct dict_object *ogs_diam_gx_max_requested_bandwidth_ul = NULL;
@@ -82,6 +78,14 @@ struct dict_object *ogs_diam_gx_codec_data = NULL;
struct dict_object *ogs_diam_gx_media_sub_component = NULL;
struct dict_object *ogs_diam_gx_flow_number = NULL;
struct dict_object *ogs_diam_gx_flow_usage = NULL;
+struct dict_object *ogs_diam_gx_3gpp_sgsn_mcc_mnc = NULL;
+struct dict_object *ogs_diam_gx_an_gw_address = NULL;
+struct dict_object *ogs_diam_gx_online = NULL;
+struct dict_object *ogs_diam_gx_offline = NULL;
+struct dict_object *ogs_diam_gx_access_network_charging_address = NULL;
+struct dict_object *ogs_diam_gx_access_network_charging_identifier_gx = NULL;
+struct dict_object *ogs_diam_gx_access_network_charging_identifier_value = NULL;
+struct dict_object *ogs_diam_gx_an_trusted = NULL;
extern int ogs_dict_gx_entry(char *conffile);
@@ -101,16 +105,12 @@ int ogs_diam_gx_init(void)
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "CC-Request-Type", &ogs_diam_gx_cc_request_type);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "CC-Request-Number", &ogs_diam_gx_cc_request_number);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Network-Request-Support", &ogs_diam_gx_network_request_support);
- CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Subscription-Id", &ogs_diam_gx_subscription_id);
- CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Subscription-Id-Type", &ogs_diam_gx_subscription_id_type);
- CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Subscription-Id-Data", &ogs_diam_gx_subscription_id_data);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Supported-Features", &ogs_diam_gx_supported_features);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Feature-List-ID", &ogs_diam_gx_feature_list_id);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Feature-List", &ogs_diam_gx_feature_list);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Framed-IP-Address", &ogs_diam_gx_framed_ip_address);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Framed-IPv6-Prefix", &ogs_diam_gx_framed_ipv6_prefix);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "IP-CAN-Type", &ogs_diam_gx_ip_can_type);
- CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "RAT-Type", &ogs_diam_gx_rat_type);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "QoS-Information", &ogs_diam_gx_qos_information);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "QoS-Class-Identifier" , &ogs_diam_gx_qos_class_identifier);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Max-Requested-Bandwidth-UL" , &ogs_diam_gx_max_requested_bandwidth_ul);
@@ -154,6 +154,14 @@ int ogs_diam_gx_init(void)
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Media-Sub-Component", &ogs_diam_gx_media_sub_component);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Flow-Number", &ogs_diam_gx_flow_number);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Flow-Usage", &ogs_diam_gx_flow_usage);
+ CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "3GPP-SGSN-MCC-MNC", &ogs_diam_gx_3gpp_sgsn_mcc_mnc);
+ CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "AN-GW-Address", &ogs_diam_gx_an_gw_address);
+ CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Online", &ogs_diam_gx_online);
+ CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Offline", &ogs_diam_gx_offline);
+ CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Access-Network-Charging-Address", &ogs_diam_gx_access_network_charging_address);
+ CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Access-Network-Charging-Identifier-Gx", &ogs_diam_gx_access_network_charging_identifier_gx);
+ CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Access-Network-Charging-Identifier-Value", &ogs_diam_gx_access_network_charging_identifier_value);
+ CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "AN-Trusted", &ogs_diam_gx_an_trusted);
return 0;
}
diff --git a/lib/diameter/gx/message.h b/lib/diameter/gx/message.h
index 3837a0668..a6e39157e 100644
--- a/lib/diameter/gx/message.h
+++ b/lib/diameter/gx/message.h
@@ -54,13 +54,6 @@ extern struct dict_object *ogs_diam_gx_cmd_raa;
extern struct dict_object *ogs_diam_gx_cc_request_type;
extern struct dict_object *ogs_diam_gx_cc_request_number;
extern struct dict_object *ogs_diam_gx_network_request_support;
-extern struct dict_object *ogs_diam_gx_subscription_id;
-#define OGS_DIAM_GX_SUBSCRIPTION_ID_TYPE_END_USER_E164 0
-#define OGS_DIAM_GX_SUBSCRIPTION_ID_TYPE_END_USER_IMSI 1
-#define OGS_DIAM_GX_SUBSCRIPTION_ID_TYPE_END_USER_SIP_URI 2
-#define OGS_DIAM_GX_SUBSCRIPTION_ID_TYPE_END_USER_NAI 3
-extern struct dict_object *ogs_diam_gx_subscription_id_type;
-extern struct dict_object *ogs_diam_gx_subscription_id_data;
extern struct dict_object *ogs_diam_gx_supported_features;
extern struct dict_object *ogs_diam_gx_feature_list_id;
extern struct dict_object *ogs_diam_gx_feature_list;
@@ -72,21 +65,8 @@ extern struct dict_object *ogs_diam_gx_framed_ipv6_prefix;
#define OGS_DIAM_GX_IP_CAN_TYPE_WiMAX 3
#define OGS_DIAM_GX_IP_CAN_TYPE_3GPP2 4
#define OGS_DIAM_GX_IP_CAN_TYPE_3GPP_EPS 5
-#define OGS_DIAM_GX_IP_CAN_TYPE_Non_3GPP_EPS 6
+#define OGS_DIAM_GX_IP_CAN_TYPE_NON_3GPP_EPS 6
extern struct dict_object *ogs_diam_gx_ip_can_type;
-#define OGS_DIAM_GX_RAT_TYPE_WLAN 0
-#define OGS_DIAM_GX_RAT_TYPE_VIRTUAL 1
-#define OGS_DIAM_GX_RAT_TYPE_UTRAN 1000
-#define OGS_DIAM_GX_RAT_TYPE_GERAN 1001
-#define OGS_DIAM_GX_RAT_TYPE_GAN 1002
-#define OGS_DIAM_GX_RAT_TYPE_HSPA_EVOLUTION 1003
-#define OGS_DIAM_GX_RAT_TYPE_EUTRAN 1004
-#define OGS_DIAM_GX_RAT_TYPE_EUTRAN_NB_IoT 1005
-#define OGS_DIAM_GX_RAT_TYPE_CDMA2000_1X 2000
-#define OGS_DIAM_GX_RAT_TYPE_HRPD 2001
-#define OGS_DIAM_GX_RAT_TYPE_UMB 2002
-#define OGS_DIAM_GX_RAT_TYPE_EHRPD 2003
-extern struct dict_object *ogs_diam_gx_rat_type;
extern struct dict_object *ogs_diam_gx_qos_information;
extern struct dict_object *ogs_diam_gx_qos_class_identifier;
extern struct dict_object *ogs_diam_gx_max_requested_bandwidth_ul;
@@ -128,6 +108,20 @@ extern struct dict_object *ogs_diam_gx_codec_data;
extern struct dict_object *ogs_diam_gx_media_sub_component;
extern struct dict_object *ogs_diam_gx_flow_number;
extern struct dict_object *ogs_diam_gx_flow_usage;
+extern struct dict_object *ogs_diam_gx_3gpp_sgsn_mcc_mnc;
+extern struct dict_object *ogs_diam_gx_an_gw_address;
+#define OGS_DIAM_GX_DISABLE_ONLINE 0
+#define OGS_DIAM_GX_ENABLE_ONLINE 1
+extern struct dict_object *ogs_diam_gx_online;
+#define OGS_DIAM_GX_DISABLE_OFFLINE 0
+#define OGS_DIAM_GX_ENABLE_OFFLINE 1
+extern struct dict_object *ogs_diam_gx_offline;
+extern struct dict_object *ogs_diam_gx_access_network_charging_address;
+extern struct dict_object *ogs_diam_gx_access_network_charging_identifier_gx;
+extern struct dict_object *ogs_diam_gx_access_network_charging_identifier_value;
+#define OGS_DIAM_GX_AN_TRUSTED 0
+#define OGS_DIAM_GX_AN_UNTRUSTED 1
+extern struct dict_object *ogs_diam_gx_an_trusted;
typedef struct ogs_diam_gx_message_s {
#define OGS_DIAM_GX_CMD_CODE_CREDIT_CONTROL 272
diff --git a/lib/diameter/meson.build b/lib/diameter/meson.build
index 5d31907b6..25fa8bc8b 100644
--- a/lib/diameter/meson.build
+++ b/lib/diameter/meson.build
@@ -20,3 +20,5 @@ subdir('gx')
subdir('rx')
subdir('s6a')
subdir('cx')
+subdir('swx')
+subdir('s6b')
diff --git a/lib/diameter/rx/dict.c b/lib/diameter/rx/dict.c
index 95b788a97..e2b3298bf 100644
--- a/lib/diameter/rx/dict.c
+++ b/lib/diameter/rx/dict.c
@@ -151,8 +151,10 @@ int ogs_dict_rx_entry(char *conffile)
{
struct dict_object * vendor;
CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_VENDOR, VENDOR_BY_NAME, "3GPP", &vendor, ENOENT));
- struct dict_application_data app_data = { 16777236, "Rx" };
- CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_APPLICATION, &app_data, vendor, NULL));
+ struct dict_application_data rx = { 16777236, "Rx" };
+ struct dict_application_data s6b = { 16777272, "S6b" };
+ CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_APPLICATION, &rx, vendor, NULL));
+ CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_APPLICATION, &s6b, vendor, NULL));
}
}
diff --git a/lib/diameter/rx/message.c b/lib/diameter/rx/message.c
index 6b89b2aff..4de28a8bc 100644
--- a/lib/diameter/rx/message.c
+++ b/lib/diameter/rx/message.c
@@ -55,7 +55,6 @@ struct dict_object *ogs_diam_rx_specific_action = NULL;
struct dict_object *ogs_diam_rx_framed_ip_address = NULL;
struct dict_object *ogs_diam_rx_framed_ipv6_prefix = NULL;
struct dict_object *ogs_diam_rx_ip_can_type = NULL;
-struct dict_object *ogs_diam_rx_rat_type = NULL;
struct dict_object *ogs_diam_rx_abort_cause = NULL;
struct dict_object *ogs_diam_rx_termination_cause = NULL;
@@ -100,7 +99,6 @@ int ogs_diam_rx_init(void)
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Framed-IP-Address", &ogs_diam_rx_framed_ip_address);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Framed-IPv6-Prefix", &ogs_diam_rx_framed_ipv6_prefix);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "IP-CAN-Type", &ogs_diam_rx_ip_can_type);
- CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "RAT-Type", &ogs_diam_rx_rat_type);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Abort-Cause", &ogs_diam_rx_abort_cause);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Termination-Cause", &ogs_diam_rx_termination_cause);
diff --git a/lib/diameter/rx/message.h b/lib/diameter/rx/message.h
index c99b235fa..24cfdc5e0 100644
--- a/lib/diameter/rx/message.h
+++ b/lib/diameter/rx/message.h
@@ -115,19 +115,6 @@ extern struct dict_object *ogs_diam_rx_framed_ipv6_prefix;
#define OGS_DIAM_RX_IP_CAN_TYPE_3GPP_EPS 5
#define OGS_DIAM_RX_IP_CAN_TYPE_Non_3GPP_EPS 6
extern struct dict_object *ogs_diam_rx_ip_can_type;
-#define OGS_DIAM_RX_RAT_TYPE_WLAN 0
-#define OGS_DIAM_RX_RAT_TYPE_VIRTUAL 1
-#define OGS_DIAM_RX_RAT_TYPE_UTRAN 1000
-#define OGS_DIAM_RX_RAT_TYPE_GERAN 1001
-#define OGS_DIAM_RX_RAT_TYPE_GAN 1002
-#define OGS_DIAM_RX_RAT_TYPE_HSPA_EVOLUTION 1003
-#define OGS_DIAM_RX_RAT_TYPE_EUTRAN 1004
-#define OGS_DIAM_RX_RAT_TYPE_EUTRAN_NB_IoT 1005
-#define OGS_DIAM_RX_RAT_TYPE_CDMA2000_1X 2000
-#define OGS_DIAM_RX_RAT_TYPE_HRPD 2001
-#define OGS_DIAM_RX_RAT_TYPE_UMB 2002
-#define OGS_DIAM_RX_RAT_TYPE_EHRPD 2003
-extern struct dict_object *ogs_diam_rx_rat_type;
#define OGS_DIAM_RX_ABORT_CAUSE_BEARER_RELEASED 0
#define OGS_DIAM_RX_ABORT_CAUSE_INSUFFICIENT_SERVER_RESOURCES 1
#define OGS_DIAM_RX_ABORT_CAUSE_INSUFFICIENT_BEARER_RESOURCES 2
diff --git a/lib/diameter/s6a/message.c b/lib/diameter/s6a/message.c
index 2b597f64f..3b60e8070 100644
--- a/lib/diameter/s6a/message.c
+++ b/lib/diameter/s6a/message.c
@@ -31,8 +31,6 @@ struct dict_object *ogs_diam_s6a_cmd_ula = NULL;
struct dict_object *ogs_diam_s6a_cmd_pur = NULL;
struct dict_object *ogs_diam_s6a_cmd_pua = NULL;
-struct dict_object *ogs_diam_s6a_visited_plmn_id = NULL;
-struct dict_object *ogs_diam_s6a_rat_type = NULL;
struct dict_object *ogs_diam_s6a_ulr_flags = NULL;
struct dict_object *ogs_diam_s6a_ula_flags = NULL;
struct dict_object *ogs_diam_s6a_subscription_data = NULL;
@@ -41,7 +39,6 @@ struct dict_object *ogs_diam_s6a_number_of_requested_vectors = NULL;
struct dict_object *ogs_diam_s6a_immediate_response_preferred = NULL;
struct dict_object *ogs_diam_s6a_authentication_info = NULL;
struct dict_object *ogs_diam_s6a_re_synchronization_info = NULL;
-struct dict_object *ogs_diam_s6a_service_selection = NULL;
struct dict_object *ogs_diam_s6a_ue_srvcc_capability = NULL;
struct dict_object *ogs_diam_s6a_e_utran_vector = NULL;
struct dict_object *ogs_diam_s6a_rand = NULL;
@@ -67,6 +64,8 @@ struct dict_object *ogs_diam_s6a_allocation_retention_priority = NULL;
struct dict_object *ogs_diam_s6a_priority_level = NULL;
struct dict_object *ogs_diam_s6a_pre_emption_capability = NULL;
struct dict_object *ogs_diam_s6a_pre_emption_vulnerability = NULL;
+struct dict_object *ogs_diam_s6a_pdn_gw_allocation_type = NULL;
+struct dict_object *ogs_diam_s6a_vplmn_dynamic_address_allowed = NULL;
struct dict_object *ogs_diam_s6a_terminal_information = NULL;
struct dict_object *ogs_diam_s6a_imei = NULL;
@@ -92,8 +91,6 @@ int ogs_diam_s6a_init(void)
CHECK_dict_search(DICT_COMMAND, CMD_BY_NAME, "Purge-UE-Request", &ogs_diam_s6a_cmd_pur);
CHECK_dict_search(DICT_COMMAND, CMD_BY_NAME, "Purge-UE-Answer", &ogs_diam_s6a_cmd_pua);
- CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Visited-PLMN-Id", &ogs_diam_s6a_visited_plmn_id);
- CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "RAT-Type", &ogs_diam_s6a_rat_type);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "ULR-Flags", &ogs_diam_s6a_ulr_flags);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "ULA-Flags", &ogs_diam_s6a_ula_flags);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "UE-SRVCC-Capability", &ogs_diam_s6a_ue_srvcc_capability);
@@ -116,6 +113,8 @@ int ogs_diam_s6a_init(void)
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Priority-Level", &ogs_diam_s6a_priority_level);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Pre-emption-Capability", &ogs_diam_s6a_pre_emption_capability);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Pre-emption-Vulnerability", &ogs_diam_s6a_pre_emption_vulnerability);
+ CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "PDN-GW-Allocation-Type", &ogs_diam_s6a_pdn_gw_allocation_type);
+ CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "VPLMN-Dynamic-Address-Allowed", &ogs_diam_s6a_vplmn_dynamic_address_allowed);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "AMBR", &ogs_diam_s6a_ambr);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Max-Requested-Bandwidth-UL", &ogs_diam_s6a_max_bandwidth_ul);
@@ -125,7 +124,6 @@ int ogs_diam_s6a_init(void)
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Context-Identifier", &ogs_diam_s6a_context_identifier);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "All-APN-Configurations-Included-Indicator", &ogs_diam_s6a_all_apn_configuration_included_indicator);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "APN-Configuration", &ogs_diam_s6a_apn_configuration);
- CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Service-Selection", &ogs_diam_s6a_service_selection);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "PDN-Type", &ogs_diam_s6a_pdn_type);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Served-Party-IP-Address", &ogs_diam_s6a_served_party_ip_address);
CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Subscription-Data", &ogs_diam_s6a_subscription_data);
diff --git a/lib/diameter/s6a/message.h b/lib/diameter/s6a/message.h
index 747dbfa0f..7ddff6229 100644
--- a/lib/diameter/s6a/message.h
+++ b/lib/diameter/s6a/message.h
@@ -62,6 +62,12 @@ extern "C" {
#define OGS_DIAM_S6A_UE_SRVCC_NOT_SUPPORTED (0)
#define OGS_DIAM_S6A_UE_SRVCC_SUPPORTED (1)
+#define OGS_DIAM_S6A_PDN_GW_ALLOCATION_STATIC (0)
+#define OGS_DIAM_S6A_PDN_GW_ALLOCATION_DYNAMIC (1)
+
+#define OGS_DIAM_S6A_VPLMN_DYNAMIC_ADDRESS_NOTALLOWED (0)
+#define OGS_DIAM_S6A_VPLMN_DYNAMIC_ADDRESS_ALLOWED (1)
+
extern struct dict_object *ogs_diam_s6a_application;
extern struct dict_object *ogs_diam_s6a_cmd_air;
@@ -71,8 +77,6 @@ extern struct dict_object *ogs_diam_s6a_cmd_ula;
extern struct dict_object *ogs_diam_s6a_cmd_pur;
extern struct dict_object *ogs_diam_s6a_cmd_pua;
-extern struct dict_object *ogs_diam_s6a_visited_plmn_id;
-extern struct dict_object *ogs_diam_s6a_rat_type;
extern struct dict_object *ogs_diam_s6a_ulr_flags;
extern struct dict_object *ogs_diam_s6a_ula_flags;
extern struct dict_object *ogs_diam_s6a_subscription_data;
@@ -81,7 +85,6 @@ extern struct dict_object *ogs_diam_s6a_number_of_requested_vectors;
extern struct dict_object *ogs_diam_s6a_immediate_response_preferred;
extern struct dict_object *ogs_diam_s6a_authentication_info;
extern struct dict_object *ogs_diam_s6a_re_synchronization_info;
-extern struct dict_object *ogs_diam_s6a_service_selection;
extern struct dict_object *ogs_diam_s6a_ue_srvcc_capability;
extern struct dict_object *ogs_diam_s6a_e_utran_vector;
extern struct dict_object *ogs_diam_s6a_rand;
@@ -107,6 +110,8 @@ extern struct dict_object *ogs_diam_s6a_allocation_retention_priority;
extern struct dict_object *ogs_diam_s6a_priority_level;
extern struct dict_object *ogs_diam_s6a_pre_emption_capability;
extern struct dict_object *ogs_diam_s6a_pre_emption_vulnerability;
+extern struct dict_object *ogs_diam_s6a_pdn_gw_allocation_type;
+extern struct dict_object *ogs_diam_s6a_vplmn_dynamic_address_allowed;
extern struct dict_object *ogs_diam_s6a_terminal_information;
extern struct dict_object *ogs_diam_s6a_imei;
diff --git a/lib/diameter/s6b/meson.build b/lib/diameter/s6b/meson.build
new file mode 100644
index 000000000..611353be5
--- /dev/null
+++ b/lib/diameter/s6b/meson.build
@@ -0,0 +1,38 @@
+# Copyright (C) 2019 by Sukchan Lee
+
+# This file is part of Open5GS.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+libdiameter_s6b_sources = files('''
+ ogs-diameter-s6b.h
+ message.h
+
+ message.c
+'''.split())
+
+libdiameter_s6b_inc = include_directories('.')
+
+libdiameter_s6b = library('ogsdiameter-s6b',
+ sources : libdiameter_s6b_sources,
+ version : libogslib_version,
+ c_args : libdiameter_common_cc_flags,
+ include_directories : libdiameter_s6b_inc,
+ dependencies : libdiameter_rx_dep,
+ install : true)
+
+libdiameter_s6b_dep = declare_dependency(
+ link_with : libdiameter_s6b,
+ include_directories : libdiameter_s6b_inc,
+ dependencies : libdiameter_rx_dep)
diff --git a/lib/diameter/s6b/message.c b/lib/diameter/s6b/message.c
new file mode 100644
index 000000000..67ce6cb19
--- /dev/null
+++ b/lib/diameter/s6b/message.c
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2019 by Sukchan Lee
+ *
+ * This file is part of Open5GS.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#include "ogs-diameter-s6b.h"
+
+#define CHECK_dict_search( _type, _criteria, _what, _result ) \
+ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) );
+
+struct dict_object *ogs_diam_s6b_application = NULL;
+
+struct dict_object *ogs_diam_s6b_mip6_feature_vector = NULL;
+
+int ogs_diam_s6b_init(void)
+{
+ application_id_t id = OGS_DIAM_S6B_APPLICATION_ID;
+
+ CHECK_dict_search(DICT_APPLICATION, APPLICATION_BY_ID,
+ (void *)&id, &ogs_diam_s6b_application);
+
+ CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS,
+ "MIP6-Feature-Vector", &ogs_diam_s6b_mip6_feature_vector);
+
+ return 0;
+}
diff --git a/lib/diameter/s6b/message.h b/lib/diameter/s6b/message.h
new file mode 100644
index 000000000..d33ef167e
--- /dev/null
+++ b/lib/diameter/s6b/message.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2019 by Sukchan Lee
+ *
+ * This file is part of Open5GS.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#if !defined(OGS_DIAMETER_INSIDE) && !defined(OGS_DIAMETER_COMPILATION)
+#error "This header cannot be included directly."
+#endif
+
+#ifndef OGS_DIAM_S6B_MESSAGE_H
+#define OGS_DIAM_S6B_MESSAGE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define OGS_DIAM_S6B_APPLICATION_ID 16777272
+
+extern struct dict_object *ogs_diam_s6b_application;
+
+extern struct dict_object *ogs_diam_s6b_mip6_feature_vector;
+
+int ogs_diam_s6b_init(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* OGS_DIAM_OGS_DIAM_S6B_MESSAGE_H */
diff --git a/lib/diameter/s6b/ogs-diameter-s6b.h b/lib/diameter/s6b/ogs-diameter-s6b.h
new file mode 100644
index 000000000..fcb5b458a
--- /dev/null
+++ b/lib/diameter/s6b/ogs-diameter-s6b.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2019 by Sukchan Lee
+ *
+ * This file is part of Open5GS.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#ifndef OGS_DIAMETER_S6B_H
+#define OGS_DIAMETER_S6B_H
+
+#include "ogs-diameter-common.h"
+
+#define OGS_DIAMETER_INSIDE
+
+#include "diameter/s6b/message.h"
+
+#undef OGS_DIAMETER_INSIDE
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Nothing */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* OGS_DIAMETER_S6B_H */
diff --git a/lib/diameter/swx/meson.build b/lib/diameter/swx/meson.build
new file mode 100644
index 000000000..629d56a1b
--- /dev/null
+++ b/lib/diameter/swx/meson.build
@@ -0,0 +1,38 @@
+# Copyright (C) 2019 by Sukchan Lee
+
+# This file is part of Open5GS.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+libdiameter_swx_sources = files('''
+ ogs-diameter-swx.h
+ message.h
+
+ message.c
+'''.split())
+
+libdiameter_swx_inc = include_directories('.')
+
+libdiameter_swx = library('ogsdiameter-swx',
+ sources : libdiameter_swx_sources,
+ version : libogslib_version,
+ c_args : libdiameter_common_cc_flags,
+ include_directories : libdiameter_swx_inc,
+ dependencies : [libdiameter_cx_dep, libdiameter_s6a_dep],
+ install : true)
+
+libdiameter_swx_dep = declare_dependency(
+ link_with : libdiameter_swx,
+ include_directories : libdiameter_swx_inc,
+ dependencies : [libdiameter_cx_dep, libdiameter_s6a_dep])
diff --git a/lib/diameter/swx/message.c b/lib/diameter/swx/message.c
new file mode 100644
index 000000000..5760e9a85
--- /dev/null
+++ b/lib/diameter/swx/message.c
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2019 by Sukchan Lee
+ *
+ * This file is part of Open5GS.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#include "ogs-diameter-swx.h"
+
+#define CHECK_dict_search( _type, _criteria, _what, _result ) \
+ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) );
+
+struct dict_object *ogs_diam_swx_application = NULL;
+
+struct dict_object *ogs_diam_swx_non_3gpp_user_data = NULL;
+struct dict_object *ogs_diam_swx_non_3gpp_ip_access = NULL;
+struct dict_object *ogs_diam_swx_non_3gpp_ip_access_apn = NULL;
+
+int ogs_diam_swx_init(void)
+{
+ application_id_t id = OGS_DIAM_SWX_APPLICATION_ID;
+
+ CHECK_dict_search(DICT_APPLICATION, APPLICATION_BY_ID,
+ (void *)&id, &ogs_diam_swx_application);
+
+ CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS,
+ "Non-3GPP-User-Data", &ogs_diam_swx_non_3gpp_user_data);
+ CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS,
+ "Non-3GPP-IP-Access", &ogs_diam_swx_non_3gpp_ip_access);
+ CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS,
+ "Non-3GPP-IP-Access-APN", &ogs_diam_swx_non_3gpp_ip_access_apn);
+
+ return 0;
+}
diff --git a/lib/diameter/swx/message.h b/lib/diameter/swx/message.h
new file mode 100644
index 000000000..4cd35bda3
--- /dev/null
+++ b/lib/diameter/swx/message.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2019 by Sukchan Lee
+ *
+ * This file is part of Open5GS.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#if !defined(OGS_DIAMETER_INSIDE) && !defined(OGS_DIAMETER_COMPILATION)
+#error "This header cannot be included directly."
+#endif
+
+#ifndef OGS_DIAM_SWX_MESSAGE_H
+#define OGS_DIAM_SWX_MESSAGE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define OGS_DIAM_SWX_APPLICATION_ID 16777265
+
+extern struct dict_object *ogs_diam_swx_application;
+
+extern struct dict_object *ogs_diam_swx_non_3gpp_user_data;
+#define OGS_DIAM_SWX_NON_3GPP_SUBSCRIPTION_ALLOWED 0
+#define OGS_DIAM_SWX_NON_3GPP_SUBSCRIPTION_BARRED 1
+extern struct dict_object *ogs_diam_swx_non_3gpp_ip_access;
+#define OGS_DIAM_SWX_NON_3GPP_APNS_ENABLE 0
+#define OGS_DIAM_SWX_NON_3GPP_APNS_DISABLE 1
+extern struct dict_object *ogs_diam_swx_non_3gpp_ip_access_apn;
+
+#define OGS_DIAM_SWX_AUTH_SCHEME_EAP_AKA "EAP-AKA"
+#define OGS_DIAM_SWX_AUTH_SCHEME_EAP_AKA_QUOT "EAP-AKA'"
+
+int ogs_diam_swx_init(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* OGS_DIAM_OGS_DIAM_SWX_MESSAGE_H */
diff --git a/lib/diameter/swx/ogs-diameter-swx.h b/lib/diameter/swx/ogs-diameter-swx.h
new file mode 100644
index 000000000..4887ae169
--- /dev/null
+++ b/lib/diameter/swx/ogs-diameter-swx.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2019 by Sukchan Lee
+ *
+ * This file is part of Open5GS.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#ifndef OGS_DIAMETER_SWX_H
+#define OGS_DIAMETER_SWX_H
+
+#include "ogs-diameter-common.h"
+
+#define OGS_DIAMETER_INSIDE
+
+#include "diameter/swx/message.h"
+
+#undef OGS_DIAMETER_INSIDE
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Nothing */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* OGS_DIAMETER_SWX_H */
diff --git a/lib/gtp/context.h b/lib/gtp/context.h
index 69ec417c0..9a233deb1 100644
--- a/lib/gtp/context.h
+++ b/lib/gtp/context.h
@@ -39,7 +39,6 @@ typedef struct ogs_gtp_context_s {
ogs_sockaddr_t *gtpc_addr; /* GTPC IPv4 Address */
ogs_sockaddr_t *gtpc_addr6; /* GTPC IPv6 Address */
-
ogs_list_t gtpu_list; /* GTPU IPv4/IPv6 Server List */
ogs_sock_t *gtpu_sock; /* GTPU IPv4 Socket */
ogs_sock_t *gtpu_sock6; /* GTPU IPv6 Socket */
diff --git a/lib/gtp/message.c b/lib/gtp/message.c
index 8194bf154..8335da2c9 100644
--- a/lib/gtp/message.c
+++ b/lib/gtp/message.c
@@ -20,7 +20,7 @@
/*******************************************************************************
* This file had been created by gtp-tlv.py script v0.1.0
* Please do not modify this file but regenerate it via script.
- * Created on: 2020-10-14 13:48:14.476575 by acetcom
+ * Created on: 2021-06-15 11:28:13.532535 by acetcom
* from 29274-g30.docx
******************************************************************************/
@@ -490,10 +490,10 @@ ogs_tlv_desc_t ogs_gtp_tlv_desc_delay_value_0 =
ogs_tlv_desc_t ogs_gtp_tlv_desc_charging_id_0 =
{
- OGS_TLV_VAR_STR,
+ OGS_TLV_UINT32,
"Charging ID",
OGS_GTP_CHARGING_ID_TYPE,
- 0,
+ 4,
0,
sizeof(ogs_gtp_tlv_charging_id_t),
{ NULL }
diff --git a/lib/gtp/message.h b/lib/gtp/message.h
index 7021f4675..bb8a81f0f 100644
--- a/lib/gtp/message.h
+++ b/lib/gtp/message.h
@@ -20,7 +20,7 @@
/*******************************************************************************
* This file had been created by gtp-tlv.py script v0.1.0
* Please do not modify this file but regenerate it via script.
- * Created on: 2020-10-14 13:48:14.468022 by acetcom
+ * Created on: 2021-06-15 11:28:13.527903 by acetcom
* from 29274-g30.docx
******************************************************************************/
@@ -525,7 +525,7 @@ typedef ogs_tlv_octet_t ogs_gtp_tlv_global_cn_id_t;
typedef ogs_tlv_octet_t ogs_gtp_tlv_s103pdf_t;
typedef ogs_tlv_octet_t ogs_gtp_tlv_s1udf_t;
typedef ogs_tlv_octet_t ogs_gtp_tlv_delay_value_t;
-typedef ogs_tlv_octet_t ogs_gtp_tlv_charging_id_t;
+typedef ogs_tlv_uint32_t ogs_gtp_tlv_charging_id_t;
typedef ogs_tlv_octet_t ogs_gtp_tlv_charging_characteristics_t;
typedef ogs_tlv_octet_t ogs_gtp_tlv_trace_information_t;
typedef ogs_tlv_octet_t ogs_gtp_tlv_bearer_flags_t;
diff --git a/lib/gtp/support/README.md b/lib/gtp/support/README.md
index 09b961474..a9a9d02eb 100644
--- a/lib/gtp/support/README.md
+++ b/lib/gtp/support/README.md
@@ -1,16 +1,12 @@
-* Install python-pip
-user@host ~/Documents/git/open5gs/lib/gtp/support$ \
- sudo apt-get install python-pip
-
* Install python-docx
user@host ~/Documents/git/open5gs/lib/gtp/support$ \
- sudo pip install python-docx
+ sudo pip3 install python-docx
* Change the format of standard specification
from 29274-g30.doc to 29274-g30.docx
using Microsoft Office 2007+
* Generate TLV support files
-user@host ~/Documents/git/open5gs/lib/s1ap/support$ \
- python gtp-tlv.py -f 29274-g30.docx -o ..
+user@host ~/Documents/git/open5gs/lib/gtp/support$ \
+ python3 gtp-tlv.py -f 29274-g30.docx -o ..
diff --git a/lib/gtp/support/cache/tlv-msg-100.py b/lib/gtp/support/cache/tlv-msg-100.py
index 71f671a7d..923fd00b0 100644
--- a/lib/gtp/support/cache/tlv-msg-100.py
+++ b/lib/gtp/support/cache/tlv-msg-100.py
@@ -5,9 +5,7 @@ ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts", "pres
ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S4/S11, S5/S8 and S2a/S2b interfaces if contacting the peer for the first time "})
ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "MME-FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included by MME the on S11 interface and shall be forwarded by the SGW on S5/S8 interface according to the requirements in 3GPP TS 23.007 [17]."})
ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "SGW-FQ-CSID", "presence" : "C", "instance" : "1", "comment" : "This IE shall be included by the SGW on the S5/S8 interface according to the requirements in 3GPP TS 23.007 [17]."})
-type_list["FQ-CSID"]["max_instance"] = "2"
ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "ePDG-FQ-CSID", "presence" : "C", "instance" : "2", "comment" : "This IE shall be included by the ePDG on the S2b interface according to the requirements in 3GPP TS 23.007 [17]."})
-type_list["FQ-CSID"]["max_instance"] = "3"
ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "TWAN-FQ-CSID", "presence" : "C", "instance" : "3", "comment" : "This IE shall be included by the TWAN on the S2a interface according to the requirements in 3GPP TS 23.007 [17]."})
ies.append({ "ie_type" : "PCO", "ie_value" : "Protocol Configuration Options", "presence" : "CO", "instance" : "0", "comment" : "An MME/SGSN shall include the PCO IE if such information was received from the UE. If the SGW receives this IE, the SGW shall forward it to PGW on the S5/S8 interface."})
ies.append({ "ie_type" : "UE Time Zone", "ie_value" : "UE Time Zone", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included, if available, by the MME on the S11 interface or by the SGSN on the S4 interface."})
@@ -19,9 +17,7 @@ ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "MME/S4-SG
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S5/S8 interface if the overload control feature is supported by the SGW and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."})
ies.append({ "ie_type" : "IP Address", "ie_value" : "MME/S4-SGSN Identifier", "presence" : "CO", "instance" : "0", "comment" : "If the overload control feature is supported by the MME/S4-SGSN and is activated for the PLMN to which the PGW belongs (see clause 12.3.11), the MME/S4-SGSN shall include this IE on the S11/S4 interface when there is at least one bearer remaining for the given PDN connection after the bearer deletion, and the PGW has not been updated with the identity of the currently serving MME/S4-SGSN, i.e. if no other message carrying MME/S4-SGSN identity has been sent to the PGW during/after an inter-MME/S4-SGSN intra-SGW mobility procedure."})
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "TWAN/ePDG's Overload Control Information", "presence" : "O", "instance" : "2", "comment" : "During an overload condition, the TWAN/ePDG may include this IE over the S2a/S2b interface if the overload control feature is supported by the TWAN/ePDG and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the TWAN/ePDG shall provide only one instance of this IE, representing its overload information."})
-type_list["TWAN Identifier"]["max_instance"] = "1"
ies.append({ "ie_type" : "TWAN Identifier", "ie_value" : "WLAN Location Information", "presence" : "CO", "instance" : "1", "comment" : "The ePDG shall include this IE on the S2b interface if the WLAN Location Information is available. "})
-type_list["TWAN Identifier Timestamp"]["max_instance"] = "1"
ies.append({ "ie_type" : "TWAN Identifier Timestamp", "ie_value" : "WLAN Location Timestamp", "presence" : "CO", "instance" : "1", "comment" : "The ePDG shall include this IE on the S2b interface, if the WLAN Location Timestamp is available. "})
ies.append({ "ie_type" : "Port Number", "ie_value" : "UE UDP Port", "presence" : "CO", "instance" : "0", "comment" : "The ePDG shall include this IE on the S2b interface if NAT is detected and UDP encapsulation is used."})
ies.append({ "ie_type" : "F-Container", "ie_value" : "NBIFOM Container", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S11/S4 or S2a/S2b interfaces if the MME/S4-SGSN or the TWAN/ePDG receives a NBIFOM Container from the UE as specified in 3GPP TS 24.161 73]. The Container Type shall be set to 4."})
diff --git a/lib/gtp/support/cache/tlv-msg-32.py b/lib/gtp/support/cache/tlv-msg-32.py
index 0f070e710..684200d3e 100644
--- a/lib/gtp/support/cache/tlv-msg-32.py
+++ b/lib/gtp/support/cache/tlv-msg-32.py
@@ -18,17 +18,22 @@ ies.append({ "ie_type" : "EBI", "ie_value" : "Linked EPS Bearer ID", "presence"
ies.append({ "ie_type" : "TWMI", "ie_value" : "Trusted WLAN Mode Indication", "presence" : "CO", "instance" : "0", "comment" : "The TWAN shall include this IE on S2a interface (during initial attach, handover to TWAN with GTP on S2a procedure, UE-initiated additional PDN connectivity procedures), if the single-connection mode or multiple-connection mode is used.The TWAN shall not include this IE if transparent single-connection mode is used. The PGW shall assume that transparent single-connection mode is used if it receives this message without this IE from the TWAN."})
ies.append({ "ie_type" : "PCO", "ie_value" : "Protocol Configuration Options", "presence" : "C", "instance" : "0", "comment" : "If MME/SGSN receives PCO from the UE during the Attach, PDN connectivity or Handover to 3GPP access procedures, the MME/SGSN shall forward the PCO IE to SGW. The SGW shall also forward it to PGW."})
ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts to be created", "presence" : "M", "instance" : "0", "comment" : "Several IEs with the same type and instance value shall be included on the S4/S11 and S5/S8 interfaces as necessary to represent a list of Bearers. One single IE shall be included on the S2a/S2b interface.One bearer shall be included for E-UTRAN Initial Attach, PDP Context Activation, UE requested PDN Connectivity, Attach with GTP on S2b, UE initiated Connectivity to Additional PDN with GTP on S2b, Handovers between Untrusted Non-3GPP IP Access with GTP on S2b and 3GPP Access, Initial Attach for emergency session (GTP on S2b), Initial Attach in WLAN on GTP S2a, an Initial Attach in WLAN for Emergency Service on GTP S2a, Handovers between TWAN with GTP on S2a and 3GPP Access and UE initiated Connectivity to Additional PDN with GTP on S2a.One or more bearers shall be included for a Handover/TAU/RAU with an SGW change. See NOTE 6 and NOTE 7."})
+type_list["Bearer Context"]["max_instance"] = "1"
ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts to be removed", "presence" : "C", "instance" : "1", "comment" : "This IE shall be included on the S4/S11 interfaces for the TAU/RAU/Handover cases where any of the bearers existing before the TAU/RAU/Handover procedure will be deactivated as consequence of the TAU/RAU/Handover procedure.For each of those bearers, an IE with the same type and instance value shall be included.See NOTE 6 and NOTE 7."})
ies.append({ "ie_type" : "Trace Information", "ie_value" : "Trace Information", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S4/S11 interface if an SGW trace is activated, and/or on the S5/S8 and S2a/2b interfaces if a PGW trace is activated. See 3GPP TS 32.422 [18]."})
ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S4/S11, S5/S8 and S S2a/2b interfaces if contacting the peer node for the first time."})
ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "MME-FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included by the MME on the S11 interface and shall be forwarded by an SGW on the S5/S8 interfaces according to the requirements in 3GPP TS 23.007 [17]."})
+type_list["FQ-CSID"]["max_instance"] = "1"
ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "SGW-FQ-CSID", "presence" : "C", "instance" : "1", "comment" : "This IE shall be included by the SGW on the S5/S8 interfaces according to the requirements in 3GPP TS 23.007 [17]."})
+type_list["FQ-CSID"]["max_instance"] = "2"
ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "ePDG-FQ-CSID", "presence" : "C", "instance" : "2", "comment" : "This IE shall be included by the ePDG on the S2b interface according to the requirements in 3GPP TS 23.007 [17]."})
+type_list["FQ-CSID"]["max_instance"] = "3"
ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "TWAN-FQ-CSID", "presence" : "C", "instance" : "3", "comment" : "This IE shall be included by the TWAN on the S2a interface according to the requirements in 3GPP TS 23.007 [17]."})
ies.append({ "ie_type" : "UE Time Zone", "ie_value" : "UE Time Zone", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included by the MME over S11 during Initial Attach, a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN and UE Requested PDN Connectivity procedure.This IE shall be included by the SGSN over S4 during PDP Context Activation procedure and a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN/GERAN.This IE shall be included by the MME/SGSN over S11/S4 TAU/RAU/Handover with SGW relocation."})
ies.append({ "ie_type" : "UCI", "ie_value" : "User CSG Information", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S4/S11 interface for E-UTRAN Initial Attach, a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN, UE-requested PDN Connectivity, PDP Context Activation and a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN using S4 procedures, if the UE is accessed via CSG cell or hybrid cell. The MME/SGSN shall also include it for TAU/RAU/Handover procedures with SGW relocation if the UE is accessed via a CSG cell or hybrid cell or leaves a CSG or hybrid cell and the PGW/PCRF has requested CSG info reporting and MME/SGSN support CSG info reporting. NOTE 11.The SGW shall include this IE on S5/S8 if it receives the User CSG information from MME/SGSN.See NOTE 10."})
ies.append({ "ie_type" : "Charging Characteristics", "ie_value" : "Charging Characteristics", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S4/S11, S5/S8 and S2a/S2b interfaces according to 3GPP TS 32.251 [8]"})
ies.append({ "ie_type" : "LDN", "ie_value" : "MME/S4-SGSN LDN", "presence" : "O", "instance" : "0", "comment" : "This IE is optionally sent by the MME to the SGW on the S11 interface and by the S4-SGSN to the SGW on the S4 interface (see 3GPP TS 32.423 [44]), when communicating the LDN to the peer node for the first time."})
+type_list["LDN"]["max_instance"] = "1"
ies.append({ "ie_type" : "LDN", "ie_value" : "SGW LDN", "presence" : "O", "instance" : "1", "comment" : "This IE is optionally sent by the SGW to the PGW on the S5/S8 interfaces (see 3GPP TS 32.423 [44]), when communicating the LDN to the peer node for the first time."})
type_list["LDN"]["max_instance"] = "2"
ies.append({ "ie_type" : "LDN", "ie_value" : "ePDG LDN", "presence" : "O", "instance" : "2", "comment" : "This IE is optionally sent by the ePDG to the PGW on the S2b interfaces (see 3GPP TS 32.423 [44]), when contacting the peer node for the first time. "})
@@ -39,7 +44,9 @@ ies.append({ "ie_type" : "IP Address", "ie_value" : "UE Local IP Address", "pres
ies.append({ "ie_type" : "Port Number", "ie_value" : "UE UDP Port", "presence" : "CO", "instance" : "0", "comment" : "The ePDG shall include this IE on the S2b interface if NAT is detected, the UDP encapsulation is used and the UE Local IP Address is present."})
ies.append({ "ie_type" : "APCO", "ie_value" : "Additional Protocol Configuration Options", "presence" : "CO", "instance" : "0", "comment" : "If multiple authentications are supported by the ePDG, the ePDG shall include this IE on the S2b interface and perform the corresponding procedures as specified for PAP and CHAP authentication of the UE with external networks in 3GPP TS 33.402 [50]."})
ies.append({ "ie_type" : "IP Address", "ie_value" : "HNB Local IP Address", "presence" : "CO", "instance" : "1", "comment" : "The MME/SGSN shall include this IE on S11/S4 interface if the MME/SGSN receives this information from H(e)NB in UE associated S1/Iu signalling according (see 3GPP TS 23.139 [51]) during: E-UTRAN Initial Attach, a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN, UE-requested PDN Connectivity, PDP Context Activation and a a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN using S4;TAU/RAU/X2-based handover/Enhanced Serving RNS Relocation Procedure with SGW change, if the PGW/PCRF has requested H(e)NB information reporting for the PDN connection.The SGW shall forward this IE on S5/S8 interface if the SGW receives it from the MME/SGSN."})
+type_list["Port Number"]["max_instance"] = "1"
ies.append({ "ie_type" : "Port Number", "ie_value" : "HNB UDP Port", "presence" : "CO", "instance" : "1", "comment" : "The MME/SGSN shall include this IE on S11/S4 interface if the MME/SGSN receives this information from H(e)NB in UE associated S1/Iu signalling according (see 3GPP TS 23.139 [51]) during: E-UTRAN Initial Attach, a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN, UE-requested PDN Connectivity, PDP Context Activation and a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN using S4;TAU/RAU/X2-based handover/Enhanced Serving RNS Relocation Procedure with SGW relocation, if the PGW/PCRF has requested H(e)NB information reporting for the PDN connection.The SGW shall forward this IE on S5/S8 interface if the SGW receives it from the MME/SGSN."})
+type_list["IP Address"]["max_instance"] = "2"
ies.append({ "ie_type" : "IP Address", "ie_value" : "MME/S4-SGSN Identifier", "presence" : "CO", "instance" : "2", "comment" : "If the PGW triggered SGW restoration procedure is supported, the MME/S4-SGSN shall include this IE on S11/S4 interface and the SGW shall forward this IE on S5 interface in the existing signalling as specified in 3GPP TS 23.007 [17].If the overload control feature is supported by the MME/S4-SGSN and is activated for the PLMN to which the PGW belongs (see clause 12.3.11), the MME/S4-SGSN shall include this IE on the S11/S4 interface. In that case, the SGW shall forward this IE on the S5/S8 interface."})
ies.append({ "ie_type" : "TWAN Identifier", "ie_value" : "TWAN Identifier", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S2a interface for Initial Attach in WLAN procedure, UE-initiated Connectivity to Additional PDN with GTP on S2a and handover to TWAN with GTP on S2a procedure as specified in 3GPP TS 23.402 [45]. "})
type_list["IP Address"]["max_instance"] = "3"
@@ -47,10 +54,13 @@ ies.append({ "ie_type" : "IP Address", "ie_value" : "ePDG IP Address", "presence
ies.append({ "ie_type" : "CN Operator Selection Entity", "ie_value" : "CN Operator Selection Entity", "presence" : "CO", "instance" : "0", "comment" : "In shared networks, the SGSN shall include this IE on the S4 interface for a PDP Context Activation, a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN/GERAN and RAU with SGW relocation procedures, if the information is available, to indicate whether the Serving Network has been selected by the UE or by the network."})
ies.append({ "ie_type" : "Presence Reporting Area Information", "ie_value" : "Presence Reporting Area Information", "presence" : "CO", "instance" : "0", "comment" : "The MME/SGSN shall include this IE in the following procedures, if the PGW/PCRF/OCS requested reporting changes of UE presence in the Presence Reporting Area(s) and the MME/SGSN supports such reporting:- TAU/RAU/X2 Handover/Enhanced SRNS Relocation procedures with SGW relocation and MME/SGSN change. The new MME/SGSN shall then indicate whether the UE is inside or outside the PRA for each of the active Presence Reporting Area(s), or indicate that the Presence Reporting Area (s) is inactive; - TAU/RAU/X2 Handover/Enhanced SRNS Relocation procedures with SGW relocation and without MME/SGSN change, if the UE enters or leaves the Presence Reporting Area(s). In this case, this IE shall only include the active PRA(s) that the UE has newly entered or left.Several IEs with the same type and instance value may be included as necessary to represent a list of Presence Reporting Area Actions. See NOTE 20."})
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "MME/S4-SGSN's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the MME/S4-SGSN may include this IE on the S11/S4 interface if the overload control feature is supported by the MME/S4-SGSN and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the MME/S4-SGSN shall provide only one instance of this IE, representing its overload information."})
+type_list["Overload Control Information"]["max_instance"] = "1"
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S5/S8 interface if the overload control feature is supported by the SGW and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."})
+type_list["Overload Control Information"]["max_instance"] = "2"
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "TWAN/ePDG's Overload Control Information", "presence" : "O", "instance" : "2", "comment" : "During an overload condition, the TWAN/ePDG may include this IE over the S2a/S2b interface if the overload control feature is supported by the TWAN/ePDG and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the TWAN/ePDG shall provide only one instance of this IE, representing its overload information."})
ies.append({ "ie_type" : "Millisecond Time Stamp", "ie_value" : "Origination Time Stamp", "presence" : "CO", "instance" : "0", "comment" : "The MME/SGSN and the TWAN/ePDG shall include this IE on the S11/S4 and S2a/S2b interface respectively, in the conditions specified in clause 13.2.When present, the Origination Time Stamp shall contain the UTC time when the originating entity initiated the request."})
ies.append({ "ie_type" : "Integer Number", "ie_value" : "Maximum Wait Time", "presence" : "CO", "instance" : "0", "comment" : "The MME/SGSN and the TWAN/ePDG shall include this IE on the S11/S4 and S2a/S2b interface respectively, in the conditions specified in clause 13.3.When present, the Maximum Wait Time shall contain the duration (number of milliseconds since the Origination Time Stamp) during which the originator of the request waits for a response."})
+type_list["TWAN Identifier"]["max_instance"] = "1"
ies.append({ "ie_type" : "TWAN Identifier", "ie_value" : "WLAN Location Information", "presence" : "CO", "instance" : "1", "comment" : "This IE shall be included on the S2b interface if the WLAN Location Information is available. "})
ies.append({ "ie_type" : "TWAN Identifier Timestamp", "ie_value" : "WLAN Location Timestamp", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S2b interface, if the WLAN Location Timestamp is available. "})
ies.append({ "ie_type" : "F-Container", "ie_value" : "NBIFOM Container", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S11/S4 or S2a/S2b interfaces if the MME/S4-SGSN or the TWAN/ePDG receives an NBIFOM Container from the UE as specified in TS 24.161 73]. The Container Type shall be set to 4."})
@@ -62,6 +72,7 @@ ies.append({ "ie_type" : "Counter", "ie_value" : "MO Exception Data Counter", "p
type_list["Port Number"]["max_instance"] = "2"
ies.append({ "ie_type" : "Port Number", "ie_value" : "UE TCP Port", "presence" : "CO", "instance" : "2", "comment" : "The ePDG shall include this IE on the S2b interface if NAT is detected, the TCP encapsulation is used and the UE Local IP Address is present."})
ies.append({ "ie_type" : "Mapped UE Usage Type", "ie_value" : "Mapped UE Usage Type", "presence" : "CO", "instance" : "0", "comment" : "The MME/SGSN shall include this IE on the S11/S4 interface, if available. When present, this IE shall contain the mapped UE usage type applicable to the PDN connection. See NOTE 21. "})
+type_list["ULI"]["max_instance"] = "1"
ies.append({ "ie_type" : "ULI", "ie_value" : "User Location Information for SGW ", "presence" : "CO", "instance" : "1", "comment" : "The MME/SGSN shall include this IE on the S11/S4 interface, based on operator policy for the User Location Information to be sent to the SGW, if the user location information to be passed to the SGW is not already reported in the ULI IE in this message.When present, this IE shall include the ECGI, TAI, eNodeB ID, RAI and/or RNC-ID, based on local policy.See NOTE 21."})
ies.append({ "ie_type" : "FQDN", "ie_value" : "SGW-U node name", "presence" : "CO", "instance" : "0", "comment" : "The SGW-C shall include this IE on the S5 interface, if available. See NOTE 21. "})
ies.append({ "ie_type" : "Secondary RAT Usage Data Report", "ie_value" : "Secondary RAT Usage Data Report", "presence" : "CO", "instance" : "0", "comment" : "If the PLMN has configured secondary RAT usage reporting and PDN GW Secondary RAT reporting is active, the MME shall include this IE on the S11 interface if it has received Secondary RAT usage data from eNodeB in an X2-based handover with Serving GW relocation. The MME shall also set the IRSGW flag to 0, to indicate that the Secondary RAT usage data is reported for the Source SGW, and sent via the Target SGW to the PGW.Several IEs with the same type and instance value may be included, to represent multiple usage data reports."})
diff --git a/lib/gtp/support/cache/tlv-msg-33.py b/lib/gtp/support/cache/tlv-msg-33.py
index 4833f7d6d..6efd6bec3 100644
--- a/lib/gtp/support/cache/tlv-msg-33.py
+++ b/lib/gtp/support/cache/tlv-msg-33.py
@@ -25,7 +25,9 @@ ies.append({ "ie_type" : "IP4CP", "ie_value" : "Trusted WLAN IPv4 Parameters ",
ies.append({ "ie_type" : "Indication", "ie_value" : "Indication Flags", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included if any one of the applicable flags is set to 1.Applicable flags are:PDN Pause Support Indication: this flag shall be set to 1 on the S5/S8 interface if the PGW supports the PGW Pause of Charging procedure.PDN Pause Enable Indication: this flag shall be set to 1 on the S5/S8 interface if the PGW enables the SGW to use the PGW Pause of Charging procedure for this PDN connection.Associate OCI with PGW nodes identity: The PGW shall set this flag to 1 on the S5/S8 interface or S2a/S2b interface if it has included the PGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the HSS or DNS during the PGW selection) of the serving PGW. This flag shall be set to 1 by the PGW if the PGWs Overload Control Information is included and the Cause IE is set to a rejection cause code. The SGW shall set this flag on the S11/S4 interface if it supports the overload control feature and if the flag is set on the S5/S8 interface.Associate OCI with SGW nodes identity: The SGW shall set this flag to 1 on the S11/S4 interface if it has included the SGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the DNS during the SGW selection) of the serving SGW. This flag shall be set to 1 by the SGW if the SGWs Overload Control Information is included and the Cause IE is set to a rejection cause code. Delay Tolerant Connection Indication: the flag shall be set to 1 on the S5/S8 and S11/S4 interface if the PDN connection is Delay Tolerant (see clause 8.12).Triggering SGSN initiated PDP Context Creation/Modification Indication: this flag shall be set to 1 on the S5/S8 interfaces if the network-initiated NBIFOM mode is used for this PDN connection. The SGW shall set this flag on the S4 interface if it supports the NBIFOM feature and the flag is set on the S5/S8 interface."})
ies.append({ "ie_type" : "Presence Reporting Area Action", "ie_value" : "Presence Reporting Area Action", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 and S11/S4 interfaces with the appropriate Action field if reporting changes of UE presence in a Presence Routing Area is to be started, stopped or modified for this subscriber in the MME/SGSN.Several IEs with the same type and instance value may be included as necessary to represent a list of Presence Reporting Area Actions. One IE shall be included per PRA to be started, stopped or modified."})
ies.append({ "ie_type" : "Load Control Information", "ie_value" : "PGW's node level Load Control Information", "presence" : "O", "instance" : "0", "comment" : "The PGW may include this IE on the S5/S8 or S2a/S2b interface, providing its node level load information, if the load control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access network, ePDG/TWAN for non-3GPP access network, belongs (see clause 12.2.6)."})
+type_list["Load Control Information"]["max_instance"] = "1"
ies.append({ "ie_type" : "Load Control Information", "ie_value" : "PGW's APN level Load Control Information", "presence" : "O", "instance" : "1", "comment" : "The PGW may include this IE on the S5/S8 or S2a/S2b interface, providing APN level load information, if the APN level load control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access network, ePDG/TWAN for non-3GPP access based network, belongs (see clause 12.2.6).When present, the PGW shall provide one or more instances of this IE, up to maximum of 10, with the same type and instance value, each representing the load information for a list of APN(s).See NOTE 9, NOTE 11."})
+type_list["Load Control Information"]["max_instance"] = "2"
ies.append({ "ie_type" : "Load Control Information", "ie_value" : "SGW's node level Load Control Information", "presence" : "O", "instance" : "2", "comment" : "The SGW may include this IE, over the S11/S4 interface if the load control feature is supported by the SGW and is activated in the network (see clause 12.2.6).When present, the SGW shall provide only one instance of this IE, representing its node level load information."})
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "PGW's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the PGW may include this IE on the S5/S8 or S2a/S2b interface, if the overload control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access based network, ePDG/TWAN for non-3GPP access based network, belongs (see clause 12.3.11).When present, the PGW shall provide: node level overload control, in one instance of this IE; and/orAPN level overload control , in one or more instances of this IE, up to maximum of 10, with the same type and instance value, each representing the overload information for a list of APN(s).See NOTE 10, NOTE 12."})
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S11/S4 interface if the overload control feature is supported by the SGW and is activated in the network (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."})
diff --git a/lib/gtp/support/cache/tlv-msg-34.py b/lib/gtp/support/cache/tlv-msg-34.py
index 0a2223391..0695d2934 100644
--- a/lib/gtp/support/cache/tlv-msg-34.py
+++ b/lib/gtp/support/cache/tlv-msg-34.py
@@ -8,32 +8,26 @@ ies.append({ "ie_type" : "F-TEID", "ie_value" : "Sender F-TEID for Control Plane
ies.append({ "ie_type" : "AMBR", "ie_value" : "Aggregate Maximum Bit Rate", "presence" : "C", "instance" : "0", "comment" : "The APN-AMBR shall be sent for TAU/RAU/Handover from the Gn/Gp SGSN to the S4 SGSN/MME procedures."})
ies.append({ "ie_type" : "Delay Value", "ie_value" : "Delay Downlink Packet Notification Request", "presence" : "C", "instance" : "0", "comment" : "his IE shall be sent on the S11 interface for a UE triggered Service Request and UE initiated Connection Resume procedures. It shall contain the delay the SGW shall apply between receiving downlink data and sending Downlink Data Notification for all UEs served by that MME (see clause 5.3.4.2 of 3GPP TS 23.401 [3])."})
ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts to be modified", "presence" : "C", "instance" : "0", "comment" : "This IE shall be sent on the S4/S11 interface and S5/S8 interface, except on the S5/S8 interface for a UE triggered Service Request and UE initiated Connection Resume procedures. on the S5/S8 interface for a TAU/RAU/HO without SGW change procedure. See NOTE 10. .on the S5/S8 interface when requesting the PGW to pause or unpause charging for the PDN connection. on the S5/S8 interface for any other procedure without SGW change which requires to send a Modify Bearer Request to the PGW, e.g. HSS-based P-CSCF restoration for 3GPP access, reporting of UE presence in a Presence Reporting Area, implicit resume of suspended bearers.(see NOTE 6).When Handover Indication flag is set to 1 (i.e., for a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN or a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN/GERAN procedures), the PGW shall ignore this IE. See NOTE 1.Several IEs with the same type and instance value may be included as necessary to represent a list of Bearers to be modified.During a TAU/RAU/Handover procedure with an SGW change, the SGW includes all bearers it received from the MME/SGSN (Bearer Contexts to be created, or Bearer Contexts to be modified and also Bearer Contexts to be removed) into the list of Bearer Contexts to be modified IEs, which are then sent on the S5/S8 interface to the PGW (see NOTE 2, see NOTE 10). During an E-UTRAN Initiated E-RAB modification procedure the MME shall send a Modify Bearer Request, including all the bearers (those modified and those not modified), per PDN connection for which at least one bearer has changed. See NOTE 11."})
-type_list["Bearer Context"]["max_instance"] = "1"
ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts to be removed", "presence" : "C", "instance" : "1", "comment" : "This IE shall be included on the S4 and S11 interfaces for the TAU/RAU/Handover, UE initiated Connection Resume and Service Request procedures where any of the bearers existing before the TAU/RAU/Handover procedure, UE initiated Connection Resume and Service Request procedures will be deactivated as consequence of the TAU/RAU/Handover procedure, UE initiated Connection Resume and Service Request procedures. See NOTE 3 and NOTE 6.For each of those bearers, an IE with the same type and instance value, shall be included. See NOTE 11."})
ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if contacting the peer for the first time "})
ies.append({ "ie_type" : "UE Time Zone", "ie_value" : "UE Time Zone", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included by the MME/SGSN on the S11/S4 interfaces if the UE Time Zone has changed in the case of TAU/RAU/Handover or UE initiated Service Request procedure. See NOTE 5."})
ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "MME-FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included by MME on S11 and shall be forwarded by SGW on S5/S8 according to the requirements in 3GPP TS 23.007 [17]."})
ies.append({ "ie_type" : "UCI", "ie_value" : "User CSG Information", "presence" : "CO", "instance" : "0", "comment" : "The MME/SGSN shall include this IE for Handover procedures, UE initiated Connection Resume and UE-initiated Service Request procedure if the PGW/PCRF has requested CSG Info reporting and the MME/SGSN support the CSG information reporting and the User CSG information has changed (i.e. the UE is accessed via a new CSG cell or hybrid cell or leaves a CSG or hybrid cell).In TAU/RAU procedure without SGW change, this IE shall also be sent if the PGW/PCRF has requested CSG info reporting and MME/SGSN supports CSG info reporting and the User CSG information has changed (i.e. the UE is accessed via a new CSG cell or hybrid cell or leaves a CSG or hybrid cell) when UE requested to activate E-RAB for all the active EPS bearers in TAU procedure or to keep the Iu connection after the completion of the RAU procedure. See NOTE 5. See NOTE 10. See NOTE 16.The SGW shall include this IE on S5/S8 if it receives the User CSG Information from MME/SGSN. See NOTE 15."})
ies.append({ "ie_type" : "IP Address", "ie_value" : "UE Local IP Address", "presence" : "CO", "instance" : "1", "comment" : "If the UE local IP Address has changed, the ePDG shall include this IE on S2b interface based on local policy for Fixed Broadband access network interworking (see 3GPP TS 23.139 [51]). "})
-type_list["Port Number"]["max_instance"] = "1"
ies.append({ "ie_type" : "Port Number", "ie_value" : "UE UDP Port", "presence" : "CO", "instance" : "1", "comment" : "The ePDG shall include this IE on S2b interface if NAT is detected and UE Local IP Address is present for Fixed Broadband access network interworking (see 3GPP TS 23.139 [51]). "})
ies.append({ "ie_type" : "LDN", "ie_value" : "MME/S4-SGSN LDN", "presence" : "O", "instance" : "0", "comment" : "This IE is optionally sent by the MME to the SGW on the S11 interface and by the SGSN to the SGW on the S4 interface (see 3GPP TS 32.423 [44]), when communicating the LDN to the peer node for the first time."})
-type_list["LDN"]["max_instance"] = "1"
ies.append({ "ie_type" : "LDN", "ie_value" : "SGW LDN", "presence" : "O", "instance" : "1", "comment" : "This IE is optionally sent by the SGW to the PGW on the S5/S8 interfaces (see 3GPP TS 32.423 [44]), for inter-SGW mobity, when communicating the LDN to the peer node for the first time."})
ies.append({ "ie_type" : "IP Address", "ie_value" : "HNB Local IP Address", "presence" : "CO", "instance" : "0", "comment" : "The MME/SGSN shall include this IE on S11/S4 interface if the PGW/PCRF has requested H(e)NB information reporting and the MME/SGSN has received this information from H(e)NB in UE associated S1/Iu signalling (see 3GPP TS 23.139 [51]). The SGW shall forward this IE on S5/S8 interface if it is received from the MME/SGSN and the Modify Bearer Request message needs to be sent to the PGW as specified in the 3GPP TS 23.401 [3]; orthe Propagate BBAI information change flag is received from the MME/SGSN.(NOTE 7)"})
ies.append({ "ie_type" : "Port Number", "ie_value" : "HNB UDP Port", "presence" : "CO", "instance" : "0", "comment" : "The MME/SGSN shall include this IE on S11/S4 interface if the PGW/PCRF has requested H(e)NB information reporting and the MME/SGSN has received this information from H(e)NB in UE associated S1/Iu signalling (see 3GPP TS 23.139 [51]). The SGW shall forward this IE on S5/S8 interface if it is received from the MME/SGSN and the Modify Bearer Request message needs to be sent to the PGW as specified in the 3GPP TS 23.401 [3]; orthe Propagate BBAI information change flag is received from the MME/SGSN.(NOTE 7)"})
-type_list["IP Address"]["max_instance"] = "2"
ies.append({ "ie_type" : "IP Address", "ie_value" : "MME/S4-SGSN Identifier", "presence" : "CO", "instance" : "2", "comment" : "If the PGW triggered SGW restoration procedure is supported, the MME/S4-SGSN shall include this IE on S11/S4 interface and the SGW shall forward this IE on S5 interface in the existing signalling as specified in 3GPP TS 23.007 [17].If the overload control feature is supported by the MME/S4-SGSN and is activated for the PLMN to which the PGW belongs(see clause 12.3.11), the MME/S4-SGSN shall include this IE on the S11/S4 interface during mobility procedures with MME/S4-SGSN change."})
ies.append({ "ie_type" : "CN Operator Selection Entity", "ie_value" : "CN Operator Selection Entity", "presence" : "CO", "instance" : "0", "comment" : "In shared networks, the SGSN shall include this IE on the S4 interface for the RAU procedure, if the information is available, and if the Serving Network IE is present in the message or if the CN Operator Selection Entity has changed, to indicate whether the Serving Network has been selected by the UE or by the network."})
ies.append({ "ie_type" : "Presence Reporting Area Information", "ie_value" : "Presence Reporting Area Information", "presence" : "CO", "instance" : "0", "comment" : "The MME/SGSN shall include this IE: - if the PGW/PCRF/OCS has just requested to start or modify reporting changes of UE presence in a Presence Reporting Area and the MME/SGSN supports such reporting. The MME/SGSN shall then indicate whether the UE is inside or outside the newly started or modified Presence Reporting Area(s), or indicate the Presence Reporting Area(s) is inactive. Several IEs with the same type and instance value may be included as necessary to represent a list of Presence Reporting Area Information. One IE shall be included for each Presence Reporting Area newly started or modified.The MME/SGSN shall also include this IE in the following procedures, if the PGW/PCRF requested to report changes of UE presence in a Presence Reporting Area and the MME/SGSN supports such reporting: - TAU/RAU/Handover procedures without SGW change and with MME/SGSN change and S1-based handover procedure with SGW change. The MME/SGSN shall then indicate whether the UE is inside or outside the Presence Reporting Area(s) for each of the active Presence Reporting Area(s), or indicate that the Presence Reporting Area(s) is inactive. Several IEs with the same type and instance value may be included as necessary to represent a list of Presence Reporting Area Information.- TAU/RAU/Handover/Cell Update procedures without MME/SGSN change, UE initiated Connection Resume and UE-initiated Service Request procedure if the UE enters or leaves the Presence Reporting Area(s). Several IEs with the same type and instance value may be included as necessary to represent a list of Presence Reporting Area Information. One IE shall be included for each active Presence Reporting Area that the UE has newly entered or left. See NOTE 5, NOTE 10.- UE initiated Service Request, if ISR is active; See NOTE 22."})
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "MME/S4-SGSN's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the MME/S4-SGSN may include this IE on the S11/S4 interface if the overload control feature is supported by the MME/S4-SGSN and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the MME/S4-SGSN shall provide only one instance of this IE, representing its overload information."})
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S5/S8 interface if the overload control feature is supported by the SGW and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."})
-type_list["Overload Control Information"]["max_instance"] = "2"
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "ePDG's Overload Control Information", "presence" : "O", "instance" : "2", "comment" : "During an overload condition, the ePDG may include this IE over the S2b interface if the overload control feature is supported by the ePDG and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the ePDG shall provide only one instance of this IE, representing its overload information."})
ies.append({ "ie_type" : "Serving PLMN Rate Control", "ie_value" : "Serving PLMN Rate Control", "presence" : "CO", "instance" : "0", "comment" : "The MME shall include this IE on the S11 interface if the Serving PLMN Rate is changed.The target MME shall also include this IE on the S11 interface during an Inter-MME mobility procedure if the Serving PLMN Rate control is configured, and if the configured value is different from the one received from the old MME. See NOTE 20.The SGW shall include this IE on S5/S8 if it receives this IE from MME via the Create Session Request or the Modify Bearer Request message. "})
ies.append({ "ie_type" : "Counter", "ie_value" : "MO Exception Data Counter", "presence" : "CO", "instance" : "0", "comment" : "The MME shall include this IE on the S11 interface when it needs to send a non-zero counter value for the MO Exception Data Counter. The timestamp in the counter shall be set with the time at which the counter value increased from 0 to 1."})
ies.append({ "ie_type" : "IMSI", "ie_value" : "IMSI", "presence" : "O", "instance" : "0", "comment" : "The MME/SGSN should include the IMSI if available. See NOTE 23."})
-type_list["ULI"]["max_instance"] = "1"
ies.append({ "ie_type" : "ULI", "ie_value" : "User Location Information for SGW ", "presence" : "CO", "instance" : "1", "comment" : "The MME/SGSN shall include this IE on the S11/S4 interface, based on operator policy for the User Location Information to be sent to the SGW, if the user location information to be passed to the SGW is not already reported in the ULI IE in this message.When present, this IE shall include the ECGI, TAI, eNodeB ID, RAI and/or RNC-ID, based on local policy.See NOTE 25."})
ies.append({ "ie_type" : "TWAN Identifier", "ie_value" : "WLAN Location Information", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S2b interface, during a UE initiated IPsec tunnel update procedure, if the WLAN Location Information is available. "})
ies.append({ "ie_type" : "TWAN Identifier Timestamp", "ie_value" : "WLAN Location Timestamp", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S2b interface, during a UE initiated IPsec tunnel update procedure, if the WLAN Location Timestamp is available. "})
diff --git a/lib/gtp/support/cache/tlv-msg-36.py b/lib/gtp/support/cache/tlv-msg-36.py
index aa9f3a6bf..8fdd2831d 100644
--- a/lib/gtp/support/cache/tlv-msg-36.py
+++ b/lib/gtp/support/cache/tlv-msg-36.py
@@ -15,6 +15,7 @@ ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "MME/S4-SG
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S5/S8 interface if the overload control feature is supported by the SGW and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."})
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "TWAN/ePDG's Overload Control Information", "presence" : "O", "instance" : "2", "comment" : "During an overload condition, the TWAN/ePDG may include this IE over the S2a/S2b interface if the overload control feature is supported by the TWAN/ePDG and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the TWAN/ePDG shall provide only one instance of this IE, representing its overload information."})
ies.append({ "ie_type" : "TWAN Identifier", "ie_value" : "WLAN Location Information", "presence" : "CO", "instance" : "1", "comment" : "The ePDG shall include this IE on the S2b interface if the WLAN Location Information is available. "})
+type_list["TWAN Identifier Timestamp"]["max_instance"] = "1"
ies.append({ "ie_type" : "TWAN Identifier Timestamp", "ie_value" : "WLAN Location Timestamp", "presence" : "CO", "instance" : "1", "comment" : "The ePDG shall include this IE on the S2b interface, if the WLAN Location Timestamp is available. "})
ies.append({ "ie_type" : "IP Address", "ie_value" : "UE Local IP Address", "presence" : "CO", "instance" : "0", "comment" : "The ePDG shall include this IE on the S2b interface. "})
ies.append({ "ie_type" : "Port Number", "ie_value" : "UE UDP Port", "presence" : "CO", "instance" : "0", "comment" : "The ePDG shall include this IE on the S2b interface if NAT is detected and UDP encapsulation is used."})
diff --git a/lib/gtp/support/cache/tlv-msg-68.py b/lib/gtp/support/cache/tlv-msg-68.py
index d2007503d..f40101d33 100644
--- a/lib/gtp/support/cache/tlv-msg-68.py
+++ b/lib/gtp/support/cache/tlv-msg-68.py
@@ -14,7 +14,6 @@ ies.append({ "ie_type" : "F-TEID", "ie_value" : "S12 RNC F-TEID", "presence" : "
ies.append({ "ie_type" : "PCO", "ie_value" : "Protocol Configuration Options", "presence" : "O", "instance" : "0", "comment" : "If the UE includes the PCO IE, then the MME/SGSN shall copy the content of this IE transparently from the PCO IE included by the UE. If the SGW receives PCO from the MME/SGSN, the SGW shall forward it to the PGW."})
ies.append({ "ie_type" : "Signalling Priority Indication", "ie_value" : "Signalling Priority Indication ", "presence" : "CO", "instance" : "0", "comment" : "The SGSN/MME shall include this IE on the S4/S11 interface if the UE indicates low access priority during the procedure. The SGW shall forward this IE on the S5/S8 interfaces if received from the MME/SGSN. "})
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "MME/S4-SGSN's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the MME/S4-SGSN may include this IE on the S11/S4 interface if the overload control feature is supported by the MME/S4-SGSN and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the MME/S4-SGSN shall provide only one instance of this IE, representing its overload information."})
-type_list["Overload Control Information"]["max_instance"] = "1"
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S5/S8 interface if the overload control feature is supported by the SGW and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."})
ies.append({ "ie_type" : "F-Container", "ie_value" : "NBIFOM Container", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S11/S4 or S2a/S2b interfaces if the MME/S4-SGSN or the TWAN/ePDG receives an NBIFOM Container from the UE as specified in 3GPP TS 24.161 73]. The Container Type shall be set to 4."})
ies.append({ "ie_type" : "ePCO", "ie_value" : "Extended Protocol Configuration Options", "presence" : "O", "instance" : "0", "comment" : "If the UE includes the ePCO IE, then the MME shall copy the content of this IE transparently from the ePCO IE included by the UE. If the SGW receives ePCO from the MME, the SGW shall forward it to the PGW."})
diff --git a/lib/gtp/support/cache/tlv-msg-95.py b/lib/gtp/support/cache/tlv-msg-95.py
index 945e30a11..ceb7d7677 100644
--- a/lib/gtp/support/cache/tlv-msg-95.py
+++ b/lib/gtp/support/cache/tlv-msg-95.py
@@ -4,7 +4,6 @@ ies.append({ "ie_type" : "EBI", "ie_value" : "Linked EPS Bearer ID", "presence"
ies.append({ "ie_type" : "PCO", "ie_value" : "Protocol Configuration Options", "presence" : "O", "instance" : "0", "comment" : "This IE may be sent on the S5/S8 and S4/S11 interfaces if ePCO is not supported by the UE or the network."})
ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts", "presence" : "M", "instance" : "0", "comment" : "Several IEs with this type and instance values shall be included as necessary to represent a list of Bearers."})
ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "PGW-FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included by the PGW on the S5/S8 and S2a/S2b interfaces and, when received from S5/S8 be forwarded by the SGW on the S11 interface according to the requirements in 3GPP TS 23.007 [17]."})
-type_list["FQ-CSID"]["max_instance"] = "1"
ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "SGW-FQ-CSID", "presence" : "C", "instance" : "1", "comment" : "This IE shall be included by the SGW on the S11 interface according to the requirements in 3GPP TS 23.007 [17]."})
ies.append({ "ie_type" : "Change Reporting Action", "ie_value" : "Change Reporting Action", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 and S4/S11 interfaces with the appropriate Action field If the location Change Reporting mechanism is to be started or stopped for this subscriber in the SGSN/MME."})
ies.append({ "ie_type" : "CSG Information Reporting Action", "ie_value" : "CSG Information Reporting Action", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 and S4/S11 interfaces with the appropriate Action field if the CSG Info reporting mechanism is to be started or stopped for this subscriber in the SGSN/MME."})
@@ -12,9 +11,7 @@ ies.append({ "ie_type" : "eNB Information Reporting", "ie_value" : "HNB Informat
ies.append({ "ie_type" : "Presence Reporting Area Action", "ie_value" : "Presence Reporting Area Action", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 and S11/S4 interfaces with the appropriate Action field if reporting changes of UE presence in a Presence Routing Area is to be started, stopped or modified for this subscriber in the MME/SGSN.Several IEs with the same type and instance value may be included as necessary to represent a list of Presence Reporting Area Actions. One IE shall be included per PRA to be started, stopped or modified."})
ies.append({ "ie_type" : "Indication", "ie_value" : "Indication Flags", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included if any one of the applicable flags is set to 1.Applicable flags are:Associate OCI with PGW nodes identity: The PGW shall set this flag to 1 on the S5/S8 interface or S2a/S2b interface if it has included the PGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the HSS or DNS during the PGW selection) of the serving PGW. The SGW shall set this flag on the S11/S4 interface if it supports the overload control feature and if the flag is set on the S5/S8 interface.Associate OCI with SGW nodes identity: The SGW shall set this flag to 1 on the S11/S4 interface if it has included the SGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the DNS during the SGW selection) of the serving SGW. Extended EBI Value Range Support Indication: The PGW shall set this flag to 1 if it supports the 15 EPS Bearers."})
ies.append({ "ie_type" : "Load Control Information", "ie_value" : "PGW's node level Load Control Information", "presence" : "O", "instance" : "0", "comment" : "The PGW may include this IE on the S5/S8 or S2a/S2b interface, providing its node level load information, if the load control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access network, ePDG/TWAN for non-3GPP access network, belongs (see clause 12.2.6)."})
-type_list["Load Control Information"]["max_instance"] = "1"
ies.append({ "ie_type" : "Load Control Information", "ie_value" : "PGW's APN level Load Control Information", "presence" : "O", "instance" : "1", "comment" : "The PGW may include this IE on the S5/S8 or S2a/S2b interface, providing APN level load information, if the APN level load control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access network, ePDG/TWAN for non-3GPP access based network, belongs (see clause 12.2.6).When present, the PGW shall provide one or more instances of this IE, up to maximum of 10, with the same type and instance value, each representing the load information for a list of APN(s).See NOTE 2, NOTE 4."})
-type_list["Load Control Information"]["max_instance"] = "2"
ies.append({ "ie_type" : "Load Control Information", "ie_value" : "SGW's node level Load Control Information", "presence" : "O", "instance" : "2", "comment" : "The SGW may include this IE, over the S11/S4 interface if the load control feature is supported by the SGW and is activated in the network (see clause 12.2.6).When present, the SGW shall provide only one instance of this IE, representing its node level load information."})
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "PGW's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the PGW may include this IE on the S5/S8 or S2a/S2b interface, if the overload control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access based network, ePDG/TWAN for non-3GPP access based network, belongs (see clause 12.3.11).When present, the PGW shall provide node level overload control, in one instance of this IE; and/orAPN level overload control, in one or more instances of this IE, up to maximum of 10, with the same type and instance value, each representing the overload information for a list of APN(s).See NOTE 3, NOTE 5."})
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S11/S4 interface if the overload control feature is supported by the SGW and is activated in the network (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."})
diff --git a/lib/gtp/support/gtp-tlv.py b/lib/gtp/support/gtp-tlv.py
index c201180dd..68fbb7bd7 100644
--- a/lib/gtp/support/gtp-tlv.py
+++ b/lib/gtp/support/gtp-tlv.py
@@ -80,14 +80,14 @@ def output_header_to_file(f):
f.write(" ******************************************************************************/\n\n")
def usage():
- print "Python generating TLV build/parser for GTPv2-C v%s" % (version)
- print "Usage: python gtp-tlv.py [options]"
- print "Available options:"
- print "-d Enable script debug"
- print "-f [file] Input file to parse"
- print "-o [dir] Output files to given directory"
- print "-c [dir] Cache files to given directory"
- print "-h Print this help and return"
+ print("Python generating TLV build/parser for GTPv2-C v%s" % (version))
+ print("Usage: python gtp-tlv.py [options]")
+ print("Available options:")
+ print("-d Enable script debug")
+ print("-f [file] Input file to parse")
+ print("-o [dir] Output files to given directory")
+ print("-c [dir] Cache files to given directory")
+ print("-h Print this help and return")
def v_upper(v):
return re.sub('3GPP', '', re.sub('\'', '_', re.sub('/', '_', re.sub('-', '_', re.sub(' ', '_', v)))).upper())
@@ -96,10 +96,10 @@ def v_lower(v):
return re.sub('3gpp', '', re.sub('\'', '_', re.sub('/', '_', re.sub('-', '_', re.sub(' ', '_', v)))).lower())
def get_cells(cells):
- instance = cells[4].text.encode('ascii', 'ignore')
+ instance = cells[4].text
if instance.isdigit() is not True:
return None
- ie_type = re.sub('\s*$', '', re.sub('\s*\n*\s*\([A-z]*\s*NOTE.*\)*', '', cells[3].text.encode('ascii', 'ignore')))
+ ie_type = re.sub('\s*$', '', re.sub('\s*\n*\s*\([A-z]*\s*NOTE.*\)*', '', cells[3].text))
if ie_type.find('LDN') != -1:
ie_type = 'LDN'
elif ie_type.find('APCO') != -1:
@@ -119,10 +119,10 @@ def get_cells(cells):
if ie_type not in type_list.keys():
assert False, "Unknown IE type : [" \
+ cells[3].text + "]" + "(" + ie_type + ")"
- presence = cells[1].text.encode('ascii', 'ignore')
+ presence = cells[1].text
presence = re.sub('\n', '', presence);
- ie_value = re.sub('\s*\n*\s*\([^\)]*\)*', '', cells[0].text).encode('ascii', 'ignore')
- comment = cells[2].text.encode('ascii', 'ignore')
+ ie_value = re.sub('\s*\n*\s*\([^\)]*\)*', '', cells[0].text)
+ comment = cells[2].text.encode('ascii', 'ignore').decode('utf-8')
comment = re.sub('\n|\"|\'|\\\\', '', comment);
if int(instance) > int(type_list[ie_type]["max_instance"]):
@@ -163,15 +163,15 @@ for o, a in opts:
sys.exit(2)
if os.path.isfile(filename) and os.access(filename, os.R_OK):
- file = open(filename, 'r')
+ file = open(filename, 'r')
else:
d_error("Cannot find file : " + filename)
d_info("[Message List]")
cachefile = cachedir + 'tlv-msg-list.py'
if os.path.isfile(cachefile) and os.access(cachefile, os.R_OK):
- execfile(cachefile)
- print "Read from " + cachefile
+ exec(open(cachefile).read())
+ print("Read from " + cachefile)
else:
document = Document(filename)
f = open(cachefile, 'w')
@@ -184,8 +184,8 @@ else:
d_print("Table Index = %d\n" % i)
for row in msg_table.rows[2:-4]:
- key = row.cells[1].text.encode('ascii', 'ignore')
- type = row.cells[0].text.encode('ascii', 'ignore')
+ key = row.cells[1].text
+ type = row.cells[0].text
if type.isdigit() is False:
continue
if int(type) in range(128, 160):
@@ -202,8 +202,8 @@ else:
d_info("[IE Type List]")
cachefile = cachedir + 'tlv-type-list.py'
if os.path.isfile(cachefile) and os.access(cachefile, os.R_OK):
- execfile(cachefile)
- print "Read from " + cachefile
+ exec(open(cachefile).read())
+ print("Read from " + cachefile)
else:
document = Document(filename)
f = open(cachefile, 'w')
@@ -216,7 +216,7 @@ else:
d_print("Table Index = %d\n" % i)
for row in ie_table.rows[1:-5]:
- key = row.cells[1].text.encode('ascii', 'ignore')
+ key = row.cells[1].text
if key.find('Reserved') != -1:
continue
if key.find('MM Context') != -1:
@@ -234,10 +234,10 @@ else:
elif key.find('Procedure Transaction ID') != -1:
key = 'PTI'
else:
- key = re.sub('.*\(', '', row.cells[1].text.encode('ascii', 'ignore'))
+ key = re.sub('.*\(', '', row.cells[1].text)
key = re.sub('\)', '', key)
key = re.sub('\s*$', '', key)
- type = row.cells[0].text.encode('ascii', 'ignore')
+ type = row.cells[0].text
type_list[key] = { "type": type , "max_instance" : "0" }
write_file(f, "type_list[\"" + key + "\"] = { \"type\" : \"" + type)
write_file(f, "\", \"max_instance\" : \"0\" }\n")
@@ -247,8 +247,8 @@ type_list['MM Context'] = { "type": "107", "max_instance" : "0" }
d_info("[Group IE List]")
cachefile = cachedir + 'tlv-group-list.py'
if os.path.isfile(cachefile) and os.access(cachefile, os.R_OK):
- execfile(cachefile)
- print "Read from " + cachefile
+ exec(open(cachefile).read())
+ print("Read from " + cachefile)
else:
document = Document(filename)
f = open(cachefile, 'w')
@@ -262,8 +262,8 @@ else:
if len(re.findall('\d+', row.cells[2].text)) == 0:
continue;
- ie_type = re.findall('\d+', row.cells[2].text)[0].encode('ascii', 'ignore')
- ie_name = re.sub('\s*IE Type.*', '', row.cells[2].text.encode('ascii', 'ignore'))
+ ie_type = re.findall('\d+', row.cells[2].text)[0]
+ ie_name = re.sub('\s*IE Type.*', '', row.cells[2].text)
if ie_name not in group_list.keys():
ies = []
@@ -347,8 +347,8 @@ for key in msg_list.keys():
d_info("[" + key + "]")
cachefile = cachedir + "tlv-msg-" + msg_list[key]["type"] + ".py"
if os.path.isfile(cachefile) and os.access(cachefile, os.R_OK):
- execfile(cachefile)
- print "Read from " + cachefile
+ exec(open(cachefile).read())
+ print("Read from " + cachefile)
else:
document = Document(filename)
f = open(cachefile, 'w')
@@ -375,6 +375,7 @@ for key in msg_list.keys():
type_list["Recovery"]["size"] = 1 # Type : 3
type_list["EBI"]["size"] = 1 # Type : 73
type_list["RAT Type"]["size"] = 1 # Type : 82
+type_list["Charging ID"]["size"] = 4 # Type : 94
type_list["PDN Type"]["size"] = 1 # Type : 99
type_list["PTI"]["size"] = 1 # Type : 100
type_list["Port Number"]["size"] = 2 # Type : 126
diff --git a/lib/gtp/types.h b/lib/gtp/types.h
index 90ab3bce9..d188971af 100644
--- a/lib/gtp/types.h
+++ b/lib/gtp/types.h
@@ -69,7 +69,7 @@ typedef struct ogs_gtp_extension_header_s {
} __attribute__ ((packed)) ogs_gtp_extension_header_t;
/* 8.4 Cause */
-#define OGS_GTP_CAUSE_INVALID_VALUE 0
+#define OGS_GTP_CAUSE_UNDEFINED_VALUE 0
#define OGS_GTP_CAUSE_LOCAL_DETACH 2
#define OGS_GTP_CAUSE_COMPLETE_DETACH_3
#define OGS_GTP_CAUSE_RAT_CHANGED_FROM_3GPP_TO_NON_3GPP 4
diff --git a/lib/gtp/xact.c b/lib/gtp/xact.c
index cb7dc278e..f249efe00 100644
--- a/lib/gtp/xact.c
+++ b/lib/gtp/xact.c
@@ -560,7 +560,7 @@ int ogs_gtp_xact_commit(ogs_gtp_xact_t *xact)
rv = ogs_gtp_sendto(xact->gnode, pkbuf);
ogs_expect(rv == OGS_OK);
- return OGS_OK;
+ return rv;
}
static void response_timeout(void *data)
diff --git a/lib/nas/5gs/decoder.c b/lib/nas/5gs/decoder.c
index 18449c105..94c3e43b2 100644
--- a/lib/nas/5gs/decoder.c
+++ b/lib/nas/5gs/decoder.c
@@ -28,7 +28,7 @@
/*******************************************************************************
* This file had been created by nas-message.py script v0.2.0
* Please do not modify this file but regenerate it via script.
- * Created on: 2021-05-30 21:57:39.474183 by acetcom
+ * Created on: 2021-06-21 14:15:53.792358 by acetcom
* from 24501-g41.docx
******************************************************************************/
@@ -84,11 +84,19 @@ int ogs_nas_5gs_decode_registration_request(ogs_nas_5gs_message_t *message, ogs_
ogs_trace("[NAS] Decode REGISTRATION_REQUEST\n");
size = ogs_nas_5gs_decode_5gs_registration_type(®istration_request->registration_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gs_registration_type() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_5gs_decode_5gs_mobile_identity(®istration_request->mobile_identity, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gs_mobile_identity() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -96,7 +104,10 @@ int ogs_nas_5gs_decode_registration_request(ogs_nas_5gs_message_t *message, ogs_
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
@@ -104,49 +115,81 @@ int ogs_nas_5gs_decode_registration_request(ogs_nas_5gs_message_t *message, ogs_
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_key_set_identifier(®istration_request->non_current_native_nas_key_set_identifier, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_key_set_identifier() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_NON_CURRENT_NATIVE_NAS_KEY_SET_IDENTIFIER_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_5GMM_CAPABILITY_TYPE:
size = ogs_nas_5gs_decode_5gmm_capability(®istration_request->gmm_capability, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gmm_capability() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_5GMM_CAPABILITY_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_UE_SECURITY_CAPABILITY_TYPE:
size = ogs_nas_5gs_decode_ue_security_capability(®istration_request->ue_security_capability, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_ue_security_capability() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_UE_SECURITY_CAPABILITY_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_REQUESTED_NSSAI_TYPE:
size = ogs_nas_5gs_decode_nssai(®istration_request->requested_nssai, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_nssai() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_REQUESTED_NSSAI_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_LAST_VISITED_REGISTERED_TAI_TYPE:
size = ogs_nas_5gs_decode_5gs_tracking_area_identity(®istration_request->last_visited_registered_tai, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gs_tracking_area_identity() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_LAST_VISITED_REGISTERED_TAI_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_S1_UE_NETWORK_CAPABILITY_TYPE:
size = ogs_nas_5gs_decode_s1_ue_network_capability(®istration_request->s1_ue_network_capability, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_s1_ue_network_capability() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_S1_UE_NETWORK_CAPABILITY_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_UPLINK_DATA_STATUS_TYPE:
size = ogs_nas_5gs_decode_uplink_data_status(®istration_request->uplink_data_status, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_uplink_data_status() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_UPLINK_DATA_STATUS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_PDU_SESSION_STATUS_TYPE:
size = ogs_nas_5gs_decode_pdu_session_status(®istration_request->pdu_session_status, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_status() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_PDU_SESSION_STATUS_PRESENT;
decoded += size;
break;
@@ -154,49 +197,81 @@ int ogs_nas_5gs_decode_registration_request(ogs_nas_5gs_message_t *message, ogs_
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_mico_indication(®istration_request->mico_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_mico_indication() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_MICO_INDICATION_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_UE_STATUS_TYPE:
size = ogs_nas_5gs_decode_ue_status(®istration_request->ue_status, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_ue_status() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_UE_STATUS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_ADDITIONAL_GUTI_TYPE:
size = ogs_nas_5gs_decode_5gs_mobile_identity(®istration_request->additional_guti, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gs_mobile_identity() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_ADDITIONAL_GUTI_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_ALLOWED_PDU_SESSION_STATUS_TYPE:
size = ogs_nas_5gs_decode_allowed_pdu_session_status(®istration_request->allowed_pdu_session_status, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_allowed_pdu_session_status() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_ALLOWED_PDU_SESSION_STATUS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_UE_USAGE_SETTING_TYPE:
size = ogs_nas_5gs_decode_ue_usage_setting(®istration_request->ue_usage_setting, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_ue_usage_setting() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_UE_USAGE_SETTING_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_REQUESTED_DRX_PARAMETERS_TYPE:
size = ogs_nas_5gs_decode_5gs_drx_parameters(®istration_request->requested_drx_parameters, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gs_drx_parameters() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_REQUESTED_DRX_PARAMETERS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_EPS_NAS_MESSAGE_CONTAINER_TYPE:
size = ogs_nas_5gs_decode_eps_nas_message_container(®istration_request->eps_nas_message_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_eps_nas_message_container() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_EPS_NAS_MESSAGE_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_LADN_INDICATION_TYPE:
size = ogs_nas_5gs_decode_ladn_indication(®istration_request->ladn_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_ladn_indication() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_LADN_INDICATION_PRESENT;
decoded += size;
break;
@@ -204,13 +279,21 @@ int ogs_nas_5gs_decode_registration_request(ogs_nas_5gs_message_t *message, ogs_
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_payload_container_type(®istration_request->payload_container_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_payload_container_type() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_PAYLOAD_CONTAINER_TYPE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_PAYLOAD_CONTAINER_TYPE:
size = ogs_nas_5gs_decode_payload_container(®istration_request->payload_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_payload_container() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_PAYLOAD_CONTAINER_PRESENT;
decoded += size;
break;
@@ -218,73 +301,121 @@ int ogs_nas_5gs_decode_registration_request(ogs_nas_5gs_message_t *message, ogs_
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_network_slicing_indication(®istration_request->network_slicing_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_network_slicing_indication() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_NETWORK_SLICING_INDICATION_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_5GS_UPDATE_TYPE_TYPE:
size = ogs_nas_5gs_decode_5gs_update_type(®istration_request->update_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gs_update_type() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_5GS_UPDATE_TYPE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_MOBILE_STATION_CLASSMARK_2_TYPE:
size = ogs_nas_5gs_decode_mobile_station_classmark_2(®istration_request->mobile_station_classmark_2, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_mobile_station_classmark_2() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_MOBILE_STATION_CLASSMARK_2_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_SUPPORTED_CODECS_TYPE:
size = ogs_nas_5gs_decode_supported_codec_list(®istration_request->supported_codecs, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_supported_codec_list() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_SUPPORTED_CODECS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_NAS_MESSAGE_CONTAINER_TYPE:
size = ogs_nas_5gs_decode_message_container(®istration_request->nas_message_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_message_container() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_NAS_MESSAGE_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_EPS_BEARER_CONTEXT_STATUS_TYPE:
size = ogs_nas_5gs_decode_eps_bearer_context_status(®istration_request->eps_bearer_context_status, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_eps_bearer_context_status() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_EPS_BEARER_CONTEXT_STATUS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_REQUESTED_EXTENDED_DRX_PARAMETERS_TYPE:
size = ogs_nas_5gs_decode_extended_drx_parameters(®istration_request->requested_extended_drx_parameters, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_extended_drx_parameters() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_REQUESTED_EXTENDED_DRX_PARAMETERS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_T3324_VALUE_TYPE:
size = ogs_nas_5gs_decode_gprs_timer_3(®istration_request->t3324_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_gprs_timer_3() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_T3324_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_UE_RADIO_CAPABILITY_ID_TYPE:
size = ogs_nas_5gs_decode_ue_radio_capability_id(®istration_request->ue_radio_capability_id, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_ue_radio_capability_id() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_UE_RADIO_CAPABILITY_ID_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_REQUESTED_MAPPED_NSSAI_TYPE:
size = ogs_nas_5gs_decode_mapped_nssai(®istration_request->requested_mapped_nssai, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_mapped_nssai() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_REQUESTED_MAPPED_NSSAI_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_ADDITIONAL_INFORMATION_REQUESTED_TYPE:
size = ogs_nas_5gs_decode_additional_information_requested(®istration_request->additional_information_requested, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_additional_information_requested() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_ADDITIONAL_INFORMATION_REQUESTED_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REQUEST_REQUESTED_WUS_ASSISTANCE_INFORMATION_TYPE:
size = ogs_nas_5gs_decode_wus_assistance_information(®istration_request->requested_wus_assistance_information, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_wus_assistance_information() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_REQUESTED_WUS_ASSISTANCE_INFORMATION_PRESENT;
decoded += size;
break;
@@ -292,7 +423,11 @@ int ogs_nas_5gs_decode_registration_request(ogs_nas_5gs_message_t *message, ogs_
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_n5gc_indication(®istration_request->n5gc_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_n5gc_indication() failed");
+ return size;
+ }
+
registration_request->presencemask |= OGS_NAS_5GS_REGISTRATION_REQUEST_N5GC_INDICATION_PRESENT;
decoded += size;
break;
@@ -314,7 +449,11 @@ int ogs_nas_5gs_decode_registration_accept(ogs_nas_5gs_message_t *message, ogs_p
ogs_trace("[NAS] Decode REGISTRATION_ACCEPT\n");
size = ogs_nas_5gs_decode_5gs_registration_result(®istration_accept->registration_result, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gs_registration_result() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -322,73 +461,120 @@ int ogs_nas_5gs_decode_registration_accept(ogs_nas_5gs_message_t *message, ogs_p
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_REGISTRATION_ACCEPT_5G_GUTI_TYPE:
size = ogs_nas_5gs_decode_5gs_mobile_identity(®istration_accept->guti, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gs_mobile_identity() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_5G_GUTI_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_EQUIVALENT_PLMNS_TYPE:
size = ogs_nas_5gs_decode_plmn_list(®istration_accept->equivalent_plmns, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_plmn_list() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_EQUIVALENT_PLMNS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_TAI_LIST_TYPE:
size = ogs_nas_5gs_decode_5gs_tracking_area_identity_list(®istration_accept->tai_list, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gs_tracking_area_identity_list() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_TAI_LIST_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_ALLOWED_NSSAI_TYPE:
size = ogs_nas_5gs_decode_nssai(®istration_accept->allowed_nssai, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_nssai() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_ALLOWED_NSSAI_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_REJECTED_NSSAI_TYPE:
size = ogs_nas_5gs_decode_rejected_nssai(®istration_accept->rejected_nssai, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_rejected_nssai() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_REJECTED_NSSAI_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_CONFIGURED_NSSAI_TYPE:
size = ogs_nas_5gs_decode_nssai(®istration_accept->configured_nssai, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_nssai() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_CONFIGURED_NSSAI_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_5GS_NETWORK_FEATURE_SUPPORT_TYPE:
size = ogs_nas_5gs_decode_5gs_network_feature_support(®istration_accept->network_feature_support, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gs_network_feature_support() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_5GS_NETWORK_FEATURE_SUPPORT_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_PDU_SESSION_STATUS_TYPE:
size = ogs_nas_5gs_decode_pdu_session_status(®istration_accept->pdu_session_status, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_status() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_PDU_SESSION_STATUS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_PDU_SESSION_REACTIVATION_RESULT_TYPE:
size = ogs_nas_5gs_decode_pdu_session_reactivation_result(®istration_accept->pdu_session_reactivation_result, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_reactivation_result() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_PDU_SESSION_REACTIVATION_RESULT_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_PDU_SESSION_REACTIVATION_RESULT_ERROR_CAUSE_TYPE:
size = ogs_nas_5gs_decode_pdu_session_reactivation_result_error_cause(®istration_accept->pdu_session_reactivation_result_error_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_reactivation_result_error_cause() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_PDU_SESSION_REACTIVATION_RESULT_ERROR_CAUSE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_LADN_INFORMATION_TYPE:
size = ogs_nas_5gs_decode_ladn_information(®istration_accept->ladn_information, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_ladn_information() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_LADN_INFORMATION_PRESENT;
decoded += size;
break;
@@ -396,7 +582,11 @@ int ogs_nas_5gs_decode_registration_accept(ogs_nas_5gs_message_t *message, ogs_p
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_mico_indication(®istration_accept->mico_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_mico_indication() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_MICO_INDICATION_PRESENT;
decoded += size;
break;
@@ -404,55 +594,91 @@ int ogs_nas_5gs_decode_registration_accept(ogs_nas_5gs_message_t *message, ogs_p
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_network_slicing_indication(®istration_accept->network_slicing_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_network_slicing_indication() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_NETWORK_SLICING_INDICATION_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_SERVICE_AREA_LIST_TYPE:
size = ogs_nas_5gs_decode_service_area_list(®istration_accept->service_area_list, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_service_area_list() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_SERVICE_AREA_LIST_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_T3512_VALUE_TYPE:
size = ogs_nas_5gs_decode_gprs_timer_3(®istration_accept->t3512_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_gprs_timer_3() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_T3512_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_NON_3GPP_DE_REGISTRATION_TIMER_VALUE_TYPE:
size = ogs_nas_5gs_decode_gprs_timer_2(®istration_accept->non_3gpp_de_registration_timer_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_gprs_timer_2() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_NON_3GPP_DE_REGISTRATION_TIMER_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_T3502_VALUE_TYPE:
size = ogs_nas_5gs_decode_gprs_timer_2(®istration_accept->t3502_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_gprs_timer_2() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_T3502_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_EMERGENCY_NUMBER_LIST_TYPE:
size = ogs_nas_5gs_decode_emergency_number_list(®istration_accept->emergency_number_list, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_emergency_number_list() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_EMERGENCY_NUMBER_LIST_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_EXTENDED_EMERGENCY_NUMBER_LIST_TYPE:
size = ogs_nas_5gs_decode_extended_emergency_number_list(®istration_accept->extended_emergency_number_list, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_extended_emergency_number_list() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_EXTENDED_EMERGENCY_NUMBER_LIST_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_SOR_TRANSPARENT_CONTAINER_TYPE:
size = ogs_nas_5gs_decode_sor_transparent_container(®istration_accept->sor_transparent_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_sor_transparent_container() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_SOR_TRANSPARENT_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_EAP_MESSAGE_TYPE:
size = ogs_nas_5gs_decode_eap_message(®istration_accept->eap_message, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_eap_message() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_EAP_MESSAGE_PRESENT;
decoded += size;
break;
@@ -460,19 +686,31 @@ int ogs_nas_5gs_decode_registration_accept(ogs_nas_5gs_message_t *message, ogs_p
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_nssai_inclusion_mode(®istration_accept->nssai_inclusion_mode, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_nssai_inclusion_mode() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_NSSAI_INCLUSION_MODE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_OPERATOR_DEFINED_ACCESS_CATEGORY_DEFINITIONS_TYPE:
size = ogs_nas_5gs_decode_operator_defined_access_category_definitions(®istration_accept->operator_defined_access_category_definitions, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_operator_defined_access_category_definitions() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_OPERATOR_DEFINED_ACCESS_CATEGORY_DEFINITIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_NEGOTIATED_DRX_PARAMETERS_TYPE:
size = ogs_nas_5gs_decode_5gs_drx_parameters(®istration_accept->negotiated_drx_parameters, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gs_drx_parameters() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_NEGOTIATED_DRX_PARAMETERS_PRESENT;
decoded += size;
break;
@@ -480,43 +718,71 @@ int ogs_nas_5gs_decode_registration_accept(ogs_nas_5gs_message_t *message, ogs_p
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_non_3gpp_nw_provided_policies(®istration_accept->non_3gpp_nw_policies, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_non_3gpp_nw_provided_policies() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_NON_3GPP_NW_POLICIES_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_EPS_BEARER_CONTEXT_STATUS_TYPE:
size = ogs_nas_5gs_decode_eps_bearer_context_status(®istration_accept->eps_bearer_context_status, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_eps_bearer_context_status() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_EPS_BEARER_CONTEXT_STATUS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_NEGOTIATED_EXTENDED_DRX_PARAMETERS_TYPE:
size = ogs_nas_5gs_decode_extended_drx_parameters(®istration_accept->negotiated_extended_drx_parameters, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_extended_drx_parameters() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_NEGOTIATED_EXTENDED_DRX_PARAMETERS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_T3447_VALUE_TYPE:
size = ogs_nas_5gs_decode_gprs_timer_3(®istration_accept->t3447_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_gprs_timer_3() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_T3447_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_T3448_VALUE_TYPE:
size = ogs_nas_5gs_decode_gprs_timer_3(®istration_accept->t3448_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_gprs_timer_3() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_T3448_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_T3324_VALUE_TYPE:
size = ogs_nas_5gs_decode_gprs_timer_3(®istration_accept->t3324_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_gprs_timer_3() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_T3324_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_UE_RADIO_CAPABILITY_ID_TYPE:
size = ogs_nas_5gs_decode_ue_radio_capability_id(®istration_accept->ue_radio_capability_id, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_ue_radio_capability_id() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_UE_RADIO_CAPABILITY_ID_PRESENT;
decoded += size;
break;
@@ -524,37 +790,61 @@ int ogs_nas_5gs_decode_registration_accept(ogs_nas_5gs_message_t *message, ogs_p
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_ue_radio_capability_id_deletion_indication(®istration_accept->ue_radio_capability_id_deletion_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_ue_radio_capability_id_deletion_indication() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_UE_RADIO_CAPABILITY_ID_DELETION_INDICATION_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_PENDING_NSSAI_TYPE:
size = ogs_nas_5gs_decode_nssai(®istration_accept->pending_nssai, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_nssai() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_PENDING_NSSAI_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_CIPHERING_KEY_DATA_TYPE:
size = ogs_nas_5gs_decode_ciphering_key_data(®istration_accept->ciphering_key_data, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_ciphering_key_data() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_CIPHERING_KEY_DATA_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_CAG_INFORMATION_LIST_TYPE:
size = ogs_nas_5gs_decode_cag_information_list(®istration_accept->cag_information_list, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_cag_information_list() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_CAG_INFORMATION_LIST_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_TRUNCATED_5G_S_TMSI_CONFIGURATION_TYPE:
size = ogs_nas_5gs_decode_truncated_5g_s_tmsi_configuration(®istration_accept->truncated_s_tmsi_configuration, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_truncated_5g_s_tmsi_configuration() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_TRUNCATED_5G_S_TMSI_CONFIGURATION_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT_NEGOTIATED_WUS_ASSISTANCE_INFORMATION_TYPE:
size = ogs_nas_5gs_decode_wus_assistance_information(®istration_accept->negotiated_wus_assistance_information, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_wus_assistance_information() failed");
+ return size;
+ }
+
registration_accept->presencemask |= OGS_NAS_5GS_REGISTRATION_ACCEPT_NEGOTIATED_WUS_ASSISTANCE_INFORMATION_PRESENT;
decoded += size;
break;
@@ -580,13 +870,20 @@ int ogs_nas_5gs_decode_registration_complete(ogs_nas_5gs_message_t *message, ogs
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_REGISTRATION_COMPLETE_SOR_TRANSPARENT_CONTAINER_TYPE:
size = ogs_nas_5gs_decode_sor_transparent_container(®istration_complete->sor_transparent_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_sor_transparent_container() failed");
+ return size;
+ }
+
registration_complete->presencemask |= OGS_NAS_5GS_REGISTRATION_COMPLETE_SOR_TRANSPARENT_CONTAINER_PRESENT;
decoded += size;
break;
@@ -608,7 +905,11 @@ int ogs_nas_5gs_decode_registration_reject(ogs_nas_5gs_message_t *message, ogs_p
ogs_trace("[NAS] Decode REGISTRATION_REJECT\n");
size = ogs_nas_5gs_decode_5gmm_cause(®istration_reject->gmm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gmm_cause() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -616,31 +917,50 @@ int ogs_nas_5gs_decode_registration_reject(ogs_nas_5gs_message_t *message, ogs_p
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_REGISTRATION_REJECT_T3346_VALUE_TYPE:
size = ogs_nas_5gs_decode_gprs_timer_2(®istration_reject->t3346_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_gprs_timer_2() failed");
+ return size;
+ }
+
registration_reject->presencemask |= OGS_NAS_5GS_REGISTRATION_REJECT_T3346_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REJECT_T3502_VALUE_TYPE:
size = ogs_nas_5gs_decode_gprs_timer_2(®istration_reject->t3502_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_gprs_timer_2() failed");
+ return size;
+ }
+
registration_reject->presencemask |= OGS_NAS_5GS_REGISTRATION_REJECT_T3502_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REJECT_EAP_MESSAGE_TYPE:
size = ogs_nas_5gs_decode_eap_message(®istration_reject->eap_message, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_eap_message() failed");
+ return size;
+ }
+
registration_reject->presencemask |= OGS_NAS_5GS_REGISTRATION_REJECT_EAP_MESSAGE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REJECT_REJECTED_NSSAI_TYPE:
size = ogs_nas_5gs_decode_rejected_nssai(®istration_reject->rejected_nssai, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_rejected_nssai() failed");
+ return size;
+ }
+
registration_reject->presencemask |= OGS_NAS_5GS_REGISTRATION_REJECT_REJECTED_NSSAI_PRESENT;
decoded += size;
break;
@@ -662,11 +982,19 @@ int ogs_nas_5gs_decode_deregistration_request_from_ue(ogs_nas_5gs_message_t *mes
ogs_trace("[NAS] Decode DEREGISTRATION_REQUEST\n");
size = ogs_nas_5gs_decode_de_registration_type(&deregistration_request_from_ue->de_registration_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_de_registration_type() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_5gs_decode_5gs_mobile_identity(&deregistration_request_from_ue->mobile_identity, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gs_mobile_identity() failed");
+ return size;
+ }
+
decoded += size;
return decoded;
@@ -681,7 +1009,11 @@ int ogs_nas_5gs_decode_deregistration_request_to_ue(ogs_nas_5gs_message_t *messa
ogs_trace("[NAS] Decode DEREGISTRATION_REQUEST\n");
size = ogs_nas_5gs_decode_de_registration_type(&deregistration_request_to_ue->de_registration_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_de_registration_type() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -689,25 +1021,40 @@ int ogs_nas_5gs_decode_deregistration_request_to_ue(ogs_nas_5gs_message_t *messa
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_DEREGISTRATION_REQUEST_5GMM_CAUSE_TYPE:
size = ogs_nas_5gs_decode_5gmm_cause(&deregistration_request_to_ue->gmm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gmm_cause() failed");
+ return size;
+ }
+
deregistration_request_to_ue->presencemask |= OGS_NAS_5GS_DEREGISTRATION_REQUEST_5GMM_CAUSE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_DEREGISTRATION_REQUEST_T3346_VALUE_TYPE:
size = ogs_nas_5gs_decode_gprs_timer_2(&deregistration_request_to_ue->t3346_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_gprs_timer_2() failed");
+ return size;
+ }
+
deregistration_request_to_ue->presencemask |= OGS_NAS_5GS_DEREGISTRATION_REQUEST_T3346_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_DEREGISTRATION_REQUEST_REJECTED_NSSAI_TYPE:
size = ogs_nas_5gs_decode_rejected_nssai(&deregistration_request_to_ue->rejected_nssai, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_rejected_nssai() failed");
+ return size;
+ }
+
deregistration_request_to_ue->presencemask |= OGS_NAS_5GS_DEREGISTRATION_REQUEST_REJECTED_NSSAI_PRESENT;
decoded += size;
break;
@@ -729,11 +1076,19 @@ int ogs_nas_5gs_decode_service_request(ogs_nas_5gs_message_t *message, ogs_pkbuf
ogs_trace("[NAS] Decode SERVICE_REQUEST\n");
size = ogs_nas_5gs_decode_key_set_identifier(&service_request->ngksi, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_key_set_identifier() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_5gs_decode_5gs_mobile_identity(&service_request->s_tmsi, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gs_mobile_identity() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -741,31 +1096,50 @@ int ogs_nas_5gs_decode_service_request(ogs_nas_5gs_message_t *message, ogs_pkbuf
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_SERVICE_REQUEST_UPLINK_DATA_STATUS_TYPE:
size = ogs_nas_5gs_decode_uplink_data_status(&service_request->uplink_data_status, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_uplink_data_status() failed");
+ return size;
+ }
+
service_request->presencemask |= OGS_NAS_5GS_SERVICE_REQUEST_UPLINK_DATA_STATUS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_SERVICE_REQUEST_PDU_SESSION_STATUS_TYPE:
size = ogs_nas_5gs_decode_pdu_session_status(&service_request->pdu_session_status, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_status() failed");
+ return size;
+ }
+
service_request->presencemask |= OGS_NAS_5GS_SERVICE_REQUEST_PDU_SESSION_STATUS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_SERVICE_REQUEST_ALLOWED_PDU_SESSION_STATUS_TYPE:
size = ogs_nas_5gs_decode_allowed_pdu_session_status(&service_request->allowed_pdu_session_status, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_allowed_pdu_session_status() failed");
+ return size;
+ }
+
service_request->presencemask |= OGS_NAS_5GS_SERVICE_REQUEST_ALLOWED_PDU_SESSION_STATUS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_SERVICE_REQUEST_NAS_MESSAGE_CONTAINER_TYPE:
size = ogs_nas_5gs_decode_message_container(&service_request->nas_message_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_message_container() failed");
+ return size;
+ }
+
service_request->presencemask |= OGS_NAS_5GS_SERVICE_REQUEST_NAS_MESSAGE_CONTAINER_PRESENT;
decoded += size;
break;
@@ -787,7 +1161,11 @@ int ogs_nas_5gs_decode_service_reject(ogs_nas_5gs_message_t *message, ogs_pkbuf_
ogs_trace("[NAS] Decode SERVICE_REJECT\n");
size = ogs_nas_5gs_decode_5gmm_cause(&service_reject->gmm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gmm_cause() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -795,31 +1173,50 @@ int ogs_nas_5gs_decode_service_reject(ogs_nas_5gs_message_t *message, ogs_pkbuf_
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_SERVICE_REJECT_PDU_SESSION_STATUS_TYPE:
size = ogs_nas_5gs_decode_pdu_session_status(&service_reject->pdu_session_status, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_status() failed");
+ return size;
+ }
+
service_reject->presencemask |= OGS_NAS_5GS_SERVICE_REJECT_PDU_SESSION_STATUS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_SERVICE_REJECT_T3346_VALUE_TYPE:
size = ogs_nas_5gs_decode_gprs_timer_2(&service_reject->t3346_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_gprs_timer_2() failed");
+ return size;
+ }
+
service_reject->presencemask |= OGS_NAS_5GS_SERVICE_REJECT_T3346_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_SERVICE_REJECT_EAP_MESSAGE_TYPE:
size = ogs_nas_5gs_decode_eap_message(&service_reject->eap_message, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_eap_message() failed");
+ return size;
+ }
+
service_reject->presencemask |= OGS_NAS_5GS_SERVICE_REJECT_EAP_MESSAGE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_SERVICE_REJECT_T3448_VALUE_TYPE:
size = ogs_nas_5gs_decode_gprs_timer_3(&service_reject->t3448_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_gprs_timer_3() failed");
+ return size;
+ }
+
service_reject->presencemask |= OGS_NAS_5GS_SERVICE_REJECT_T3448_VALUE_PRESENT;
decoded += size;
break;
@@ -845,37 +1242,60 @@ int ogs_nas_5gs_decode_service_accept(ogs_nas_5gs_message_t *message, ogs_pkbuf_
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_SERVICE_ACCEPT_PDU_SESSION_STATUS_TYPE:
size = ogs_nas_5gs_decode_pdu_session_status(&service_accept->pdu_session_status, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_status() failed");
+ return size;
+ }
+
service_accept->presencemask |= OGS_NAS_5GS_SERVICE_ACCEPT_PDU_SESSION_STATUS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_SERVICE_ACCEPT_PDU_SESSION_REACTIVATION_RESULT_TYPE:
size = ogs_nas_5gs_decode_pdu_session_reactivation_result(&service_accept->pdu_session_reactivation_result, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_reactivation_result() failed");
+ return size;
+ }
+
service_accept->presencemask |= OGS_NAS_5GS_SERVICE_ACCEPT_PDU_SESSION_REACTIVATION_RESULT_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_SERVICE_ACCEPT_PDU_SESSION_REACTIVATION_RESULT_ERROR_CAUSE_TYPE:
size = ogs_nas_5gs_decode_pdu_session_reactivation_result_error_cause(&service_accept->pdu_session_reactivation_result_error_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_reactivation_result_error_cause() failed");
+ return size;
+ }
+
service_accept->presencemask |= OGS_NAS_5GS_SERVICE_ACCEPT_PDU_SESSION_REACTIVATION_RESULT_ERROR_CAUSE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_SERVICE_ACCEPT_EAP_MESSAGE_TYPE:
size = ogs_nas_5gs_decode_eap_message(&service_accept->eap_message, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_eap_message() failed");
+ return size;
+ }
+
service_accept->presencemask |= OGS_NAS_5GS_SERVICE_ACCEPT_EAP_MESSAGE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_SERVICE_ACCEPT_T3448_VALUE_TYPE:
size = ogs_nas_5gs_decode_gprs_timer_3(&service_accept->t3448_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_gprs_timer_3() failed");
+ return size;
+ }
+
service_accept->presencemask |= OGS_NAS_5GS_SERVICE_ACCEPT_T3448_VALUE_PRESENT;
decoded += size;
break;
@@ -901,7 +1321,10 @@ int ogs_nas_5gs_decode_configuration_update_command(ogs_nas_5gs_message_t *messa
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
@@ -909,67 +1332,111 @@ int ogs_nas_5gs_decode_configuration_update_command(ogs_nas_5gs_message_t *messa
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_configuration_update_indication(&configuration_update_command->configuration_update_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_configuration_update_indication() failed");
+ return size;
+ }
+
configuration_update_command->presencemask |= OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_CONFIGURATION_UPDATE_INDICATION_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_5G_GUTI_TYPE:
size = ogs_nas_5gs_decode_5gs_mobile_identity(&configuration_update_command->guti, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gs_mobile_identity() failed");
+ return size;
+ }
+
configuration_update_command->presencemask |= OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_5G_GUTI_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_TAI_LIST_TYPE:
size = ogs_nas_5gs_decode_5gs_tracking_area_identity_list(&configuration_update_command->tai_list, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gs_tracking_area_identity_list() failed");
+ return size;
+ }
+
configuration_update_command->presencemask |= OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_TAI_LIST_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_ALLOWED_NSSAI_TYPE:
size = ogs_nas_5gs_decode_nssai(&configuration_update_command->allowed_nssai, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_nssai() failed");
+ return size;
+ }
+
configuration_update_command->presencemask |= OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_ALLOWED_NSSAI_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_SERVICE_AREA_LIST_TYPE:
size = ogs_nas_5gs_decode_service_area_list(&configuration_update_command->service_area_list, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_service_area_list() failed");
+ return size;
+ }
+
configuration_update_command->presencemask |= OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_SERVICE_AREA_LIST_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_FULL_NAME_FOR_NETWORK_TYPE:
size = ogs_nas_5gs_decode_network_name(&configuration_update_command->full_name_for_network, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_network_name() failed");
+ return size;
+ }
+
configuration_update_command->presencemask |= OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_FULL_NAME_FOR_NETWORK_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_SHORT_NAME_FOR_NETWORK_TYPE:
size = ogs_nas_5gs_decode_network_name(&configuration_update_command->short_name_for_network, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_network_name() failed");
+ return size;
+ }
+
configuration_update_command->presencemask |= OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_SHORT_NAME_FOR_NETWORK_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_LOCAL_TIME_ZONE_TYPE:
size = ogs_nas_5gs_decode_time_zone(&configuration_update_command->local_time_zone, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_time_zone() failed");
+ return size;
+ }
+
configuration_update_command->presencemask |= OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_LOCAL_TIME_ZONE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_UNIVERSAL_TIME_AND_LOCAL_TIME_ZONE_TYPE:
size = ogs_nas_5gs_decode_time_zone_and_time(&configuration_update_command->universal_time_and_local_time_zone, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_time_zone_and_time() failed");
+ return size;
+ }
+
configuration_update_command->presencemask |= OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_UNIVERSAL_TIME_AND_LOCAL_TIME_ZONE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_NETWORK_DAYLIGHT_SAVING_TIME_TYPE:
size = ogs_nas_5gs_decode_daylight_saving_time(&configuration_update_command->network_daylight_saving_time, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_daylight_saving_time() failed");
+ return size;
+ }
+
configuration_update_command->presencemask |= OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_NETWORK_DAYLIGHT_SAVING_TIME_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_LADN_INFORMATION_TYPE:
size = ogs_nas_5gs_decode_ladn_information(&configuration_update_command->ladn_information, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_ladn_information() failed");
+ return size;
+ }
+
configuration_update_command->presencemask |= OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_LADN_INFORMATION_PRESENT;
decoded += size;
break;
@@ -977,7 +1444,11 @@ int ogs_nas_5gs_decode_configuration_update_command(ogs_nas_5gs_message_t *messa
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_mico_indication(&configuration_update_command->mico_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_mico_indication() failed");
+ return size;
+ }
+
configuration_update_command->presencemask |= OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_MICO_INDICATION_PRESENT;
decoded += size;
break;
@@ -985,25 +1456,41 @@ int ogs_nas_5gs_decode_configuration_update_command(ogs_nas_5gs_message_t *messa
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_network_slicing_indication(&configuration_update_command->network_slicing_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_network_slicing_indication() failed");
+ return size;
+ }
+
configuration_update_command->presencemask |= OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_NETWORK_SLICING_INDICATION_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_CONFIGURED_NSSAI_TYPE:
size = ogs_nas_5gs_decode_nssai(&configuration_update_command->configured_nssai, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_nssai() failed");
+ return size;
+ }
+
configuration_update_command->presencemask |= OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_CONFIGURED_NSSAI_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_REJECTED_NSSAI_TYPE:
size = ogs_nas_5gs_decode_rejected_nssai(&configuration_update_command->rejected_nssai, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_rejected_nssai() failed");
+ return size;
+ }
+
configuration_update_command->presencemask |= OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_REJECTED_NSSAI_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_OPERATOR_DEFINED_ACCESS_CATEGORY_DEFINITIONS_TYPE:
size = ogs_nas_5gs_decode_operator_defined_access_category_definitions(&configuration_update_command->operator_defined_access_category_definitions, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_operator_defined_access_category_definitions() failed");
+ return size;
+ }
+
configuration_update_command->presencemask |= OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_OPERATOR_DEFINED_ACCESS_CATEGORY_DEFINITIONS_PRESENT;
decoded += size;
break;
@@ -1011,25 +1498,41 @@ int ogs_nas_5gs_decode_configuration_update_command(ogs_nas_5gs_message_t *messa
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_sms_indication(&configuration_update_command->sms_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_sms_indication() failed");
+ return size;
+ }
+
configuration_update_command->presencemask |= OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_SMS_INDICATION_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_T3447_VALUE_TYPE:
size = ogs_nas_5gs_decode_gprs_timer_3(&configuration_update_command->t3447_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_gprs_timer_3() failed");
+ return size;
+ }
+
configuration_update_command->presencemask |= OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_T3447_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_CAG_INFORMATION_LIST_TYPE:
size = ogs_nas_5gs_decode_cag_information_list(&configuration_update_command->cag_information_list, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_cag_information_list() failed");
+ return size;
+ }
+
configuration_update_command->presencemask |= OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_CAG_INFORMATION_LIST_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_UE_RADIO_CAPABILITY_ID_TYPE:
size = ogs_nas_5gs_decode_ue_radio_capability_id(&configuration_update_command->ue_radio_capability_id, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_ue_radio_capability_id() failed");
+ return size;
+ }
+
configuration_update_command->presencemask |= OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_UE_RADIO_CAPABILITY_ID_PRESENT;
decoded += size;
break;
@@ -1037,19 +1540,31 @@ int ogs_nas_5gs_decode_configuration_update_command(ogs_nas_5gs_message_t *messa
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_ue_radio_capability_id_deletion_indication(&configuration_update_command->ue_radio_capability_id_deletion_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_ue_radio_capability_id_deletion_indication() failed");
+ return size;
+ }
+
configuration_update_command->presencemask |= OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_UE_RADIO_CAPABILITY_ID_DELETION_INDICATION_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_5GS_REGISTRATION_RESULT_TYPE:
size = ogs_nas_5gs_decode_5gs_registration_result(&configuration_update_command->registration_result, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gs_registration_result() failed");
+ return size;
+ }
+
configuration_update_command->presencemask |= OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_5GS_REGISTRATION_RESULT_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_TRUNCATED_5G_S_TMSI_CONFIGURATION_TYPE:
size = ogs_nas_5gs_decode_truncated_5g_s_tmsi_configuration(&configuration_update_command->truncated_s_tmsi_configuration, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_truncated_5g_s_tmsi_configuration() failed");
+ return size;
+ }
+
configuration_update_command->presencemask |= OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_TRUNCATED_5G_S_TMSI_CONFIGURATION_PRESENT;
decoded += size;
break;
@@ -1071,11 +1586,19 @@ int ogs_nas_5gs_decode_authentication_request(ogs_nas_5gs_message_t *message, og
ogs_trace("[NAS] Decode AUTHENTICATION_REQUEST\n");
size = ogs_nas_5gs_decode_key_set_identifier(&authentication_request->ngksi, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_key_set_identifier() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_5gs_decode_abba(&authentication_request->abba, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_abba() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -1083,25 +1606,40 @@ int ogs_nas_5gs_decode_authentication_request(ogs_nas_5gs_message_t *message, og
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_AUTHENTICATION_REQUEST_AUTHENTICATION_PARAMETER_RAND_TYPE:
size = ogs_nas_5gs_decode_authentication_parameter_rand(&authentication_request->authentication_parameter_rand, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_authentication_parameter_rand() failed");
+ return size;
+ }
+
authentication_request->presencemask |= OGS_NAS_5GS_AUTHENTICATION_REQUEST_AUTHENTICATION_PARAMETER_RAND_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_AUTHENTICATION_REQUEST_AUTHENTICATION_PARAMETER_AUTN_TYPE:
size = ogs_nas_5gs_decode_authentication_parameter_autn(&authentication_request->authentication_parameter_autn, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_authentication_parameter_autn() failed");
+ return size;
+ }
+
authentication_request->presencemask |= OGS_NAS_5GS_AUTHENTICATION_REQUEST_AUTHENTICATION_PARAMETER_AUTN_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_AUTHENTICATION_REQUEST_EAP_MESSAGE_TYPE:
size = ogs_nas_5gs_decode_eap_message(&authentication_request->eap_message, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_eap_message() failed");
+ return size;
+ }
+
authentication_request->presencemask |= OGS_NAS_5GS_AUTHENTICATION_REQUEST_EAP_MESSAGE_PRESENT;
decoded += size;
break;
@@ -1127,19 +1665,30 @@ int ogs_nas_5gs_decode_authentication_response(ogs_nas_5gs_message_t *message, o
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_AUTHENTICATION_RESPONSE_AUTHENTICATION_RESPONSE_PARAMETER_TYPE:
size = ogs_nas_5gs_decode_authentication_response_parameter(&authentication_response->authentication_response_parameter, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_authentication_response_parameter() failed");
+ return size;
+ }
+
authentication_response->presencemask |= OGS_NAS_5GS_AUTHENTICATION_RESPONSE_AUTHENTICATION_RESPONSE_PARAMETER_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_AUTHENTICATION_RESPONSE_EAP_MESSAGE_TYPE:
size = ogs_nas_5gs_decode_eap_message(&authentication_response->eap_message, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_eap_message() failed");
+ return size;
+ }
+
authentication_response->presencemask |= OGS_NAS_5GS_AUTHENTICATION_RESPONSE_EAP_MESSAGE_PRESENT;
decoded += size;
break;
@@ -1165,13 +1714,20 @@ int ogs_nas_5gs_decode_authentication_reject(ogs_nas_5gs_message_t *message, ogs
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_AUTHENTICATION_REJECT_EAP_MESSAGE_TYPE:
size = ogs_nas_5gs_decode_eap_message(&authentication_reject->eap_message, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_eap_message() failed");
+ return size;
+ }
+
authentication_reject->presencemask |= OGS_NAS_5GS_AUTHENTICATION_REJECT_EAP_MESSAGE_PRESENT;
decoded += size;
break;
@@ -1193,7 +1749,11 @@ int ogs_nas_5gs_decode_authentication_failure(ogs_nas_5gs_message_t *message, og
ogs_trace("[NAS] Decode AUTHENTICATION_FAILURE\n");
size = ogs_nas_5gs_decode_5gmm_cause(&authentication_failure->gmm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gmm_cause() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -1201,13 +1761,20 @@ int ogs_nas_5gs_decode_authentication_failure(ogs_nas_5gs_message_t *message, og
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_AUTHENTICATION_FAILURE_AUTHENTICATION_FAILURE_PARAMETER_TYPE:
size = ogs_nas_5gs_decode_authentication_failure_parameter(&authentication_failure->authentication_failure_parameter, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_authentication_failure_parameter() failed");
+ return size;
+ }
+
authentication_failure->presencemask |= OGS_NAS_5GS_AUTHENTICATION_FAILURE_AUTHENTICATION_FAILURE_PARAMETER_PRESENT;
decoded += size;
break;
@@ -1229,11 +1796,19 @@ int ogs_nas_5gs_decode_authentication_result(ogs_nas_5gs_message_t *message, ogs
ogs_trace("[NAS] Decode AUTHENTICATION_RESULT\n");
size = ogs_nas_5gs_decode_key_set_identifier(&authentication_result->ngksi, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_key_set_identifier() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_5gs_decode_eap_message(&authentication_result->eap_message, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_eap_message() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -1241,13 +1816,20 @@ int ogs_nas_5gs_decode_authentication_result(ogs_nas_5gs_message_t *message, ogs
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_AUTHENTICATION_RESULT_ABBA_TYPE:
size = ogs_nas_5gs_decode_abba(&authentication_result->abba, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_abba() failed");
+ return size;
+ }
+
authentication_result->presencemask |= OGS_NAS_5GS_AUTHENTICATION_RESULT_ABBA_PRESENT;
decoded += size;
break;
@@ -1269,7 +1851,11 @@ int ogs_nas_5gs_decode_identity_request(ogs_nas_5gs_message_t *message, ogs_pkbu
ogs_trace("[NAS] Decode IDENTITY_REQUEST\n");
size = ogs_nas_5gs_decode_5gs_identity_type(&identity_request->identity_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gs_identity_type() failed");
+ return size;
+ }
+
decoded += size;
return decoded;
@@ -1284,7 +1870,11 @@ int ogs_nas_5gs_decode_identity_response(ogs_nas_5gs_message_t *message, ogs_pkb
ogs_trace("[NAS] Decode IDENTITY_RESPONSE\n");
size = ogs_nas_5gs_decode_5gs_mobile_identity(&identity_response->mobile_identity, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gs_mobile_identity() failed");
+ return size;
+ }
+
decoded += size;
return decoded;
@@ -1299,15 +1889,27 @@ int ogs_nas_5gs_decode_security_mode_command(ogs_nas_5gs_message_t *message, ogs
ogs_trace("[NAS] Decode SECURITY_MODE_COMMAND\n");
size = ogs_nas_5gs_decode_security_algorithms(&security_mode_command->selected_nas_security_algorithms, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_security_algorithms() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_5gs_decode_key_set_identifier(&security_mode_command->ngksi, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_key_set_identifier() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_5gs_decode_ue_security_capability(&security_mode_command->replayed_ue_security_capabilities, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_ue_security_capability() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -1315,7 +1917,10 @@ int ogs_nas_5gs_decode_security_mode_command(ogs_nas_5gs_message_t *message, ogs
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
@@ -1323,37 +1928,61 @@ int ogs_nas_5gs_decode_security_mode_command(ogs_nas_5gs_message_t *message, ogs
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_imeisv_request(&security_mode_command->imeisv_request, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_imeisv_request() failed");
+ return size;
+ }
+
security_mode_command->presencemask |= OGS_NAS_5GS_SECURITY_MODE_COMMAND_IMEISV_REQUEST_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_SECURITY_MODE_COMMAND_SELECTED_EPS_NAS_SECURITY_ALGORITHMS_TYPE:
size = ogs_nas_5gs_decode_eps_nas_security_algorithms(&security_mode_command->selected_eps_nas_security_algorithms, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_eps_nas_security_algorithms() failed");
+ return size;
+ }
+
security_mode_command->presencemask |= OGS_NAS_5GS_SECURITY_MODE_COMMAND_SELECTED_EPS_NAS_SECURITY_ALGORITHMS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_SECURITY_MODE_COMMAND_ADDITIONAL_5G_SECURITY_INFORMATION_TYPE:
size = ogs_nas_5gs_decode_additional_5g_security_information(&security_mode_command->additional_security_information, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_additional_5g_security_information() failed");
+ return size;
+ }
+
security_mode_command->presencemask |= OGS_NAS_5GS_SECURITY_MODE_COMMAND_ADDITIONAL_5G_SECURITY_INFORMATION_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_SECURITY_MODE_COMMAND_EAP_MESSAGE_TYPE:
size = ogs_nas_5gs_decode_eap_message(&security_mode_command->eap_message, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_eap_message() failed");
+ return size;
+ }
+
security_mode_command->presencemask |= OGS_NAS_5GS_SECURITY_MODE_COMMAND_EAP_MESSAGE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_SECURITY_MODE_COMMAND_ABBA_TYPE:
size = ogs_nas_5gs_decode_abba(&security_mode_command->abba, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_abba() failed");
+ return size;
+ }
+
security_mode_command->presencemask |= OGS_NAS_5GS_SECURITY_MODE_COMMAND_ABBA_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_SECURITY_MODE_COMMAND_REPLAYED_S1_UE_SECURITY_CAPABILITIES_TYPE:
size = ogs_nas_5gs_decode_s1_ue_security_capability(&security_mode_command->replayed_s1_ue_security_capabilities, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_s1_ue_security_capability() failed");
+ return size;
+ }
+
security_mode_command->presencemask |= OGS_NAS_5GS_SECURITY_MODE_COMMAND_REPLAYED_S1_UE_SECURITY_CAPABILITIES_PRESENT;
decoded += size;
break;
@@ -1379,25 +2008,40 @@ int ogs_nas_5gs_decode_security_mode_complete(ogs_nas_5gs_message_t *message, og
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_SECURITY_MODE_COMPLETE_IMEISV_TYPE:
size = ogs_nas_5gs_decode_5gs_mobile_identity(&security_mode_complete->imeisv, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gs_mobile_identity() failed");
+ return size;
+ }
+
security_mode_complete->presencemask |= OGS_NAS_5GS_SECURITY_MODE_COMPLETE_IMEISV_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_SECURITY_MODE_COMPLETE_NAS_MESSAGE_CONTAINER_TYPE:
size = ogs_nas_5gs_decode_message_container(&security_mode_complete->nas_message_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_message_container() failed");
+ return size;
+ }
+
security_mode_complete->presencemask |= OGS_NAS_5GS_SECURITY_MODE_COMPLETE_NAS_MESSAGE_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_SECURITY_MODE_COMPLETE_NON_IMEISV_PEI_TYPE:
size = ogs_nas_5gs_decode_5gs_mobile_identity(&security_mode_complete->non_imeisv_pei, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gs_mobile_identity() failed");
+ return size;
+ }
+
security_mode_complete->presencemask |= OGS_NAS_5GS_SECURITY_MODE_COMPLETE_NON_IMEISV_PEI_PRESENT;
decoded += size;
break;
@@ -1419,7 +2063,11 @@ int ogs_nas_5gs_decode_security_mode_reject(ogs_nas_5gs_message_t *message, ogs_
ogs_trace("[NAS] Decode SECURITY_MODE_REJECT\n");
size = ogs_nas_5gs_decode_5gmm_cause(&security_mode_reject->gmm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gmm_cause() failed");
+ return size;
+ }
+
decoded += size;
return decoded;
@@ -1434,7 +2082,11 @@ int ogs_nas_5gs_decode_5gmm_status(ogs_nas_5gs_message_t *message, ogs_pkbuf_t *
ogs_trace("[NAS] Decode 5GMM_STATUS\n");
size = ogs_nas_5gs_decode_5gmm_cause(&gmm_status->gmm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gmm_cause() failed");
+ return size;
+ }
+
decoded += size;
return decoded;
@@ -1449,7 +2101,11 @@ int ogs_nas_5gs_decode_notification(ogs_nas_5gs_message_t *message, ogs_pkbuf_t
ogs_trace("[NAS] Decode NOTIFICATION\n");
size = ogs_nas_5gs_decode_access_type(¬ification->access_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_access_type() failed");
+ return size;
+ }
+
decoded += size;
return decoded;
@@ -1468,13 +2124,20 @@ int ogs_nas_5gs_decode_notification_response(ogs_nas_5gs_message_t *message, ogs
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_NOTIFICATION_RESPONSE_PDU_SESSION_STATUS_TYPE:
size = ogs_nas_5gs_decode_pdu_session_status(¬ification_response->pdu_session_status, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_status() failed");
+ return size;
+ }
+
notification_response->presencemask |= OGS_NAS_5GS_NOTIFICATION_RESPONSE_PDU_SESSION_STATUS_PRESENT;
decoded += size;
break;
@@ -1496,11 +2159,19 @@ int ogs_nas_5gs_decode_ul_nas_transport(ogs_nas_5gs_message_t *message, ogs_pkbu
ogs_trace("[NAS] Decode UL_NAS_TRANSPORT\n");
size = ogs_nas_5gs_decode_payload_container_type(&ul_nas_transport->payload_container_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_payload_container_type() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_5gs_decode_payload_container(&ul_nas_transport->payload_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_payload_container() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -1508,19 +2179,30 @@ int ogs_nas_5gs_decode_ul_nas_transport(ogs_nas_5gs_message_t *message, ogs_pkbu
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_UL_NAS_TRANSPORT_PDU_SESSION_ID_TYPE:
size = ogs_nas_5gs_decode_pdu_session_identity_2(&ul_nas_transport->pdu_session_id, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_identity_2() failed");
+ return size;
+ }
+
ul_nas_transport->presencemask |= OGS_NAS_5GS_UL_NAS_TRANSPORT_PDU_SESSION_ID_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_UL_NAS_TRANSPORT_OLD_PDU_SESSION_ID_TYPE:
size = ogs_nas_5gs_decode_pdu_session_identity_2(&ul_nas_transport->old_pdu_session_id, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_identity_2() failed");
+ return size;
+ }
+
ul_nas_transport->presencemask |= OGS_NAS_5GS_UL_NAS_TRANSPORT_OLD_PDU_SESSION_ID_PRESENT;
decoded += size;
break;
@@ -1528,25 +2210,41 @@ int ogs_nas_5gs_decode_ul_nas_transport(ogs_nas_5gs_message_t *message, ogs_pkbu
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_request_type(&ul_nas_transport->request_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_request_type() failed");
+ return size;
+ }
+
ul_nas_transport->presencemask |= OGS_NAS_5GS_UL_NAS_TRANSPORT_REQUEST_TYPE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_UL_NAS_TRANSPORT_S_NSSAI_TYPE:
size = ogs_nas_5gs_decode_s_nssai(&ul_nas_transport->s_nssai, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_s_nssai() failed");
+ return size;
+ }
+
ul_nas_transport->presencemask |= OGS_NAS_5GS_UL_NAS_TRANSPORT_S_NSSAI_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_UL_NAS_TRANSPORT_DNN_TYPE:
size = ogs_nas_5gs_decode_dnn(&ul_nas_transport->dnn, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_dnn() failed");
+ return size;
+ }
+
ul_nas_transport->presencemask |= OGS_NAS_5GS_UL_NAS_TRANSPORT_DNN_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_UL_NAS_TRANSPORT_ADDITIONAL_INFORMATION_TYPE:
size = ogs_nas_5gs_decode_additional_information(&ul_nas_transport->additional_information, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_additional_information() failed");
+ return size;
+ }
+
ul_nas_transport->presencemask |= OGS_NAS_5GS_UL_NAS_TRANSPORT_ADDITIONAL_INFORMATION_PRESENT;
decoded += size;
break;
@@ -1554,7 +2252,11 @@ int ogs_nas_5gs_decode_ul_nas_transport(ogs_nas_5gs_message_t *message, ogs_pkbu
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_ma_pdu_session_information(&ul_nas_transport->ma_pdu_session_information, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_ma_pdu_session_information() failed");
+ return size;
+ }
+
ul_nas_transport->presencemask |= OGS_NAS_5GS_UL_NAS_TRANSPORT_MA_PDU_SESSION_INFORMATION_PRESENT;
decoded += size;
break;
@@ -1562,7 +2264,11 @@ int ogs_nas_5gs_decode_ul_nas_transport(ogs_nas_5gs_message_t *message, ogs_pkbu
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_release_assistance_indication(&ul_nas_transport->release_assistance_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_release_assistance_indication() failed");
+ return size;
+ }
+
ul_nas_transport->presencemask |= OGS_NAS_5GS_UL_NAS_TRANSPORT_RELEASE_ASSISTANCE_INDICATION_PRESENT;
decoded += size;
break;
@@ -1584,11 +2290,19 @@ int ogs_nas_5gs_decode_dl_nas_transport(ogs_nas_5gs_message_t *message, ogs_pkbu
ogs_trace("[NAS] Decode DL_NAS_TRANSPORT\n");
size = ogs_nas_5gs_decode_payload_container_type(&dl_nas_transport->payload_container_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_payload_container_type() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_5gs_decode_payload_container(&dl_nas_transport->payload_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_payload_container() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -1596,31 +2310,50 @@ int ogs_nas_5gs_decode_dl_nas_transport(ogs_nas_5gs_message_t *message, ogs_pkbu
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_DL_NAS_TRANSPORT_PDU_SESSION_ID_TYPE:
size = ogs_nas_5gs_decode_pdu_session_identity_2(&dl_nas_transport->pdu_session_id, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_identity_2() failed");
+ return size;
+ }
+
dl_nas_transport->presencemask |= OGS_NAS_5GS_DL_NAS_TRANSPORT_PDU_SESSION_ID_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_DL_NAS_TRANSPORT_ADDITIONAL_INFORMATION_TYPE:
size = ogs_nas_5gs_decode_additional_information(&dl_nas_transport->additional_information, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_additional_information() failed");
+ return size;
+ }
+
dl_nas_transport->presencemask |= OGS_NAS_5GS_DL_NAS_TRANSPORT_ADDITIONAL_INFORMATION_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_DL_NAS_TRANSPORT_5GMM_CAUSE_TYPE:
size = ogs_nas_5gs_decode_5gmm_cause(&dl_nas_transport->gmm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gmm_cause() failed");
+ return size;
+ }
+
dl_nas_transport->presencemask |= OGS_NAS_5GS_DL_NAS_TRANSPORT_5GMM_CAUSE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_DL_NAS_TRANSPORT_BACK_OFF_TIMER_VALUE_TYPE:
size = ogs_nas_5gs_decode_gprs_timer_3(&dl_nas_transport->back_off_timer_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_gprs_timer_3() failed");
+ return size;
+ }
+
dl_nas_transport->presencemask |= OGS_NAS_5GS_DL_NAS_TRANSPORT_BACK_OFF_TIMER_VALUE_PRESENT;
decoded += size;
break;
@@ -1642,7 +2375,11 @@ int ogs_nas_5gs_decode_pdu_session_establishment_request(ogs_nas_5gs_message_t *
ogs_trace("[NAS] Decode PDU_SESSION_ESTABLISHMENT_REQUEST\n");
size = ogs_nas_5gs_decode_integrity_protection_maximum_data_rate(&pdu_session_establishment_request->integrity_protection_maximum_data_rate, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_integrity_protection_maximum_data_rate() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -1650,7 +2387,10 @@ int ogs_nas_5gs_decode_pdu_session_establishment_request(ogs_nas_5gs_message_t *
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
@@ -1658,7 +2398,11 @@ int ogs_nas_5gs_decode_pdu_session_establishment_request(ogs_nas_5gs_message_t *
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_pdu_session_type(&pdu_session_establishment_request->pdu_session_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_type() failed");
+ return size;
+ }
+
pdu_session_establishment_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REQUEST_PDU_SESSION_TYPE_PRESENT;
decoded += size;
break;
@@ -1666,19 +2410,31 @@ int ogs_nas_5gs_decode_pdu_session_establishment_request(ogs_nas_5gs_message_t *
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_ssc_mode(&pdu_session_establishment_request->ssc_mode, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_ssc_mode() failed");
+ return size;
+ }
+
pdu_session_establishment_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REQUEST_SSC_MODE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REQUEST_5GSM_CAPABILITY_TYPE:
size = ogs_nas_5gs_decode_5gsm_capability(&pdu_session_establishment_request->gsm_capability, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gsm_capability() failed");
+ return size;
+ }
+
pdu_session_establishment_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REQUEST_5GSM_CAPABILITY_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REQUEST_MAXIMUM_NUMBER_OF_SUPPORTED_PACKET_FILTERS_TYPE:
size = ogs_nas_5gs_decode_maximum_number_of_supported_packet_filters(&pdu_session_establishment_request->maximum_number_of_supported_packet_filters, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_maximum_number_of_supported_packet_filters() failed");
+ return size;
+ }
+
pdu_session_establishment_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REQUEST_MAXIMUM_NUMBER_OF_SUPPORTED_PACKET_FILTERS_PRESENT;
decoded += size;
break;
@@ -1686,43 +2442,71 @@ int ogs_nas_5gs_decode_pdu_session_establishment_request(ogs_nas_5gs_message_t *
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_always_on_pdu_session_requested(&pdu_session_establishment_request->always_on_pdu_session_requested, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_always_on_pdu_session_requested() failed");
+ return size;
+ }
+
pdu_session_establishment_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REQUEST_ALWAYS_ON_PDU_SESSION_REQUESTED_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REQUEST_SM_PDU_DN_REQUEST_CONTAINER_TYPE:
size = ogs_nas_5gs_decode_sm_pdu_dn_request_container(&pdu_session_establishment_request->sm_pdu_dn_request_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_sm_pdu_dn_request_container() failed");
+ return size;
+ }
+
pdu_session_establishment_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REQUEST_SM_PDU_DN_REQUEST_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_5gs_decode_extended_protocol_configuration_options(&pdu_session_establishment_request->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
pdu_session_establishment_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REQUEST_HEADER_COMPRESSION_CONFIGURATION_TYPE:
size = ogs_nas_5gs_decode_header_compression_configuration(&pdu_session_establishment_request->header_compression_configuration, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_header_compression_configuration() failed");
+ return size;
+ }
+
pdu_session_establishment_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REQUEST_HEADER_COMPRESSION_CONFIGURATION_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REQUEST_DS_TT_ETHERNET_PORT_MAC_ADDRESS_TYPE:
size = ogs_nas_5gs_decode_ds_tt_ethernet_port_mac_address(&pdu_session_establishment_request->ds_tt_ethernet_port_mac_address, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_ds_tt_ethernet_port_mac_address() failed");
+ return size;
+ }
+
pdu_session_establishment_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REQUEST_DS_TT_ETHERNET_PORT_MAC_ADDRESS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REQUEST_UE_DS_TT_RESIDENCE_TIME_TYPE:
size = ogs_nas_5gs_decode_ue_ds_tt_residence_time(&pdu_session_establishment_request->ue_ds_tt_residence_time, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_ue_ds_tt_residence_time() failed");
+ return size;
+ }
+
pdu_session_establishment_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REQUEST_UE_DS_TT_RESIDENCE_TIME_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REQUEST_PORT_MANAGEMENT_INFORMATION_CONTAINER_TYPE:
size = ogs_nas_5gs_decode_port_management_information_container(&pdu_session_establishment_request->port_management_information_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_port_management_information_container() failed");
+ return size;
+ }
+
pdu_session_establishment_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REQUEST_PORT_MANAGEMENT_INFORMATION_CONTAINER_PRESENT;
decoded += size;
break;
@@ -1744,15 +2528,27 @@ int ogs_nas_5gs_decode_pdu_session_establishment_accept(ogs_nas_5gs_message_t *m
ogs_trace("[NAS] Decode PDU_SESSION_ESTABLISHMENT_ACCEPT\n");
size = ogs_nas_5gs_decode_pdu_session_type(&pdu_session_establishment_accept->selected_pdu_session_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_type() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_5gs_decode_qos_rules(&pdu_session_establishment_accept->authorized_qos_rules, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_qos_rules() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_5gs_decode_session_ambr(&pdu_session_establishment_accept->session_ambr, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_session_ambr() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -1760,31 +2556,50 @@ int ogs_nas_5gs_decode_pdu_session_establishment_accept(ogs_nas_5gs_message_t *m
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_5GSM_CAUSE_TYPE:
size = ogs_nas_5gs_decode_5gsm_cause(&pdu_session_establishment_accept->gsm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gsm_cause() failed");
+ return size;
+ }
+
pdu_session_establishment_accept->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_5GSM_CAUSE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_PDU_ADDRESS_TYPE:
size = ogs_nas_5gs_decode_pdu_address(&pdu_session_establishment_accept->pdu_address, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_address() failed");
+ return size;
+ }
+
pdu_session_establishment_accept->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_PDU_ADDRESS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_RQ_TIMER_VALUE_TYPE:
size = ogs_nas_5gs_decode_gprs_timer(&pdu_session_establishment_accept->rq_timer_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_gprs_timer() failed");
+ return size;
+ }
+
pdu_session_establishment_accept->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_RQ_TIMER_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_S_NSSAI_TYPE:
size = ogs_nas_5gs_decode_s_nssai(&pdu_session_establishment_accept->s_nssai, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_s_nssai() failed");
+ return size;
+ }
+
pdu_session_establishment_accept->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_S_NSSAI_PRESENT;
decoded += size;
break;
@@ -1792,55 +2607,91 @@ int ogs_nas_5gs_decode_pdu_session_establishment_accept(ogs_nas_5gs_message_t *m
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_always_on_pdu_session_indication(&pdu_session_establishment_accept->always_on_pdu_session_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_always_on_pdu_session_indication() failed");
+ return size;
+ }
+
pdu_session_establishment_accept->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_ALWAYS_ON_PDU_SESSION_INDICATION_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_MAPPED_EPS_BEARER_CONTEXTS_TYPE:
size = ogs_nas_5gs_decode_mapped_eps_bearer_contexts(&pdu_session_establishment_accept->mapped_eps_bearer_contexts, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_mapped_eps_bearer_contexts() failed");
+ return size;
+ }
+
pdu_session_establishment_accept->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_MAPPED_EPS_BEARER_CONTEXTS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_EAP_MESSAGE_TYPE:
size = ogs_nas_5gs_decode_eap_message(&pdu_session_establishment_accept->eap_message, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_eap_message() failed");
+ return size;
+ }
+
pdu_session_establishment_accept->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_EAP_MESSAGE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_AUTHORIZED_QOS_FLOW_DESCRIPTIONS_TYPE:
size = ogs_nas_5gs_decode_qos_flow_descriptions(&pdu_session_establishment_accept->authorized_qos_flow_descriptions, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_qos_flow_descriptions() failed");
+ return size;
+ }
+
pdu_session_establishment_accept->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_AUTHORIZED_QOS_FLOW_DESCRIPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_5gs_decode_extended_protocol_configuration_options(&pdu_session_establishment_accept->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
pdu_session_establishment_accept->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_DNN_TYPE:
size = ogs_nas_5gs_decode_dnn(&pdu_session_establishment_accept->dnn, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_dnn() failed");
+ return size;
+ }
+
pdu_session_establishment_accept->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_DNN_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_5GSM_NETWORK_FEATURE_SUPPORT_TYPE:
size = ogs_nas_5gs_decode_5gsm_network_feature_support(&pdu_session_establishment_accept->gsm_network_feature_support, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gsm_network_feature_support() failed");
+ return size;
+ }
+
pdu_session_establishment_accept->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_5GSM_NETWORK_FEATURE_SUPPORT_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_SERVING_PLMN_RATE_CONTROL_TYPE:
size = ogs_nas_5gs_decode_serving_plmn_rate_control(&pdu_session_establishment_accept->serving_plmn_rate_control, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_serving_plmn_rate_control() failed");
+ return size;
+ }
+
pdu_session_establishment_accept->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_SERVING_PLMN_RATE_CONTROL_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_ATSSS_CONTAINER_TYPE:
size = ogs_nas_5gs_decode_atsss_container(&pdu_session_establishment_accept->atsss_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_atsss_container() failed");
+ return size;
+ }
+
pdu_session_establishment_accept->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_ATSSS_CONTAINER_PRESENT;
decoded += size;
break;
@@ -1848,13 +2699,21 @@ int ogs_nas_5gs_decode_pdu_session_establishment_accept(ogs_nas_5gs_message_t *m
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_control_plane_only_indication(&pdu_session_establishment_accept->control_plane_only_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_control_plane_only_indication() failed");
+ return size;
+ }
+
pdu_session_establishment_accept->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_CONTROL_PLANE_ONLY_INDICATION_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_HEADER_COMPRESSION_CONFIGURATION_TYPE:
size = ogs_nas_5gs_decode_header_compression_configuration(&pdu_session_establishment_accept->header_compression_configuration, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_header_compression_configuration() failed");
+ return size;
+ }
+
pdu_session_establishment_accept->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_HEADER_COMPRESSION_CONFIGURATION_PRESENT;
decoded += size;
break;
@@ -1876,7 +2735,11 @@ int ogs_nas_5gs_decode_pdu_session_establishment_reject(ogs_nas_5gs_message_t *m
ogs_trace("[NAS] Decode PDU_SESSION_ESTABLISHMENT_REJECT\n");
size = ogs_nas_5gs_decode_5gsm_cause(&pdu_session_establishment_reject->gsm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gsm_cause() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -1884,13 +2747,20 @@ int ogs_nas_5gs_decode_pdu_session_establishment_reject(ogs_nas_5gs_message_t *m
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REJECT_BACK_OFF_TIMER_VALUE_TYPE:
size = ogs_nas_5gs_decode_gprs_timer_3(&pdu_session_establishment_reject->back_off_timer_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_gprs_timer_3() failed");
+ return size;
+ }
+
pdu_session_establishment_reject->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REJECT_BACK_OFF_TIMER_VALUE_PRESENT;
decoded += size;
break;
@@ -1898,31 +2768,51 @@ int ogs_nas_5gs_decode_pdu_session_establishment_reject(ogs_nas_5gs_message_t *m
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_allowed_ssc_mode(&pdu_session_establishment_reject->allowed_ssc_mode, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_allowed_ssc_mode() failed");
+ return size;
+ }
+
pdu_session_establishment_reject->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REJECT_ALLOWED_SSC_MODE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REJECT_EAP_MESSAGE_TYPE:
size = ogs_nas_5gs_decode_eap_message(&pdu_session_establishment_reject->eap_message, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_eap_message() failed");
+ return size;
+ }
+
pdu_session_establishment_reject->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REJECT_EAP_MESSAGE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_5gs_decode_extended_protocol_configuration_options(&pdu_session_establishment_reject->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
pdu_session_establishment_reject->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REJECT_RE_ATTEMPT_INDICATOR_TYPE:
size = ogs_nas_5gs_decode_re_attempt_indicator(&pdu_session_establishment_reject->re_attempt_indicator, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_re_attempt_indicator() failed");
+ return size;
+ }
+
pdu_session_establishment_reject->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REJECT_RE_ATTEMPT_INDICATOR_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REJECT_5GSM_CONGESTION_RE_ATTEMPT_INDICATOR_TYPE:
size = ogs_nas_5gs_decode_5gsm_congestion_re_attempt_indicator(&pdu_session_establishment_reject->gsm_congestion_re_attempt_indicator, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gsm_congestion_re_attempt_indicator() failed");
+ return size;
+ }
+
pdu_session_establishment_reject->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REJECT_5GSM_CONGESTION_RE_ATTEMPT_INDICATOR_PRESENT;
decoded += size;
break;
@@ -1944,7 +2834,11 @@ int ogs_nas_5gs_decode_pdu_session_authentication_command(ogs_nas_5gs_message_t
ogs_trace("[NAS] Decode PDU_SESSION_AUTHENTICATION_COMMAND\n");
size = ogs_nas_5gs_decode_eap_message(&pdu_session_authentication_command->eap_message, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_eap_message() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -1952,13 +2846,20 @@ int ogs_nas_5gs_decode_pdu_session_authentication_command(ogs_nas_5gs_message_t
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_PDU_SESSION_AUTHENTICATION_COMMAND_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_5gs_decode_extended_protocol_configuration_options(&pdu_session_authentication_command->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
pdu_session_authentication_command->presencemask |= OGS_NAS_5GS_PDU_SESSION_AUTHENTICATION_COMMAND_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -1980,7 +2881,11 @@ int ogs_nas_5gs_decode_pdu_session_authentication_complete(ogs_nas_5gs_message_t
ogs_trace("[NAS] Decode PDU_SESSION_AUTHENTICATION_COMPLETE\n");
size = ogs_nas_5gs_decode_eap_message(&pdu_session_authentication_complete->eap_message, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_eap_message() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -1988,13 +2893,20 @@ int ogs_nas_5gs_decode_pdu_session_authentication_complete(ogs_nas_5gs_message_t
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_PDU_SESSION_AUTHENTICATION_COMPLETE_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_5gs_decode_extended_protocol_configuration_options(&pdu_session_authentication_complete->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
pdu_session_authentication_complete->presencemask |= OGS_NAS_5GS_PDU_SESSION_AUTHENTICATION_COMPLETE_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2020,19 +2932,30 @@ int ogs_nas_5gs_decode_pdu_session_authentication_result(ogs_nas_5gs_message_t *
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_PDU_SESSION_AUTHENTICATION_RESULT_EAP_MESSAGE_TYPE:
size = ogs_nas_5gs_decode_eap_message(&pdu_session_authentication_result->eap_message, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_eap_message() failed");
+ return size;
+ }
+
pdu_session_authentication_result->presencemask |= OGS_NAS_5GS_PDU_SESSION_AUTHENTICATION_RESULT_EAP_MESSAGE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_AUTHENTICATION_RESULT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_5gs_decode_extended_protocol_configuration_options(&pdu_session_authentication_result->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
pdu_session_authentication_result->presencemask |= OGS_NAS_5GS_PDU_SESSION_AUTHENTICATION_RESULT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2058,25 +2981,40 @@ int ogs_nas_5gs_decode_pdu_session_modification_request(ogs_nas_5gs_message_t *m
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REQUEST_5GSM_CAPABILITY_TYPE:
size = ogs_nas_5gs_decode_5gsm_capability(&pdu_session_modification_request->gsm_capability, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gsm_capability() failed");
+ return size;
+ }
+
pdu_session_modification_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REQUEST_5GSM_CAPABILITY_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REQUEST_5GSM_CAUSE_TYPE:
size = ogs_nas_5gs_decode_5gsm_cause(&pdu_session_modification_request->gsm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gsm_cause() failed");
+ return size;
+ }
+
pdu_session_modification_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REQUEST_5GSM_CAUSE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REQUEST_MAXIMUM_NUMBER_OF_SUPPORTED_PACKET_FILTERS_TYPE:
size = ogs_nas_5gs_decode_maximum_number_of_supported_packet_filters(&pdu_session_modification_request->maximum_number_of_supported_packet_filters, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_maximum_number_of_supported_packet_filters() failed");
+ return size;
+ }
+
pdu_session_modification_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REQUEST_MAXIMUM_NUMBER_OF_SUPPORTED_PACKET_FILTERS_PRESENT;
decoded += size;
break;
@@ -2084,49 +3022,81 @@ int ogs_nas_5gs_decode_pdu_session_modification_request(ogs_nas_5gs_message_t *m
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_always_on_pdu_session_requested(&pdu_session_modification_request->always_on_pdu_session_requested, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_always_on_pdu_session_requested() failed");
+ return size;
+ }
+
pdu_session_modification_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REQUEST_ALWAYS_ON_PDU_SESSION_REQUESTED_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REQUEST_INTEGRITY_PROTECTION_MAXIMUM_DATA_RATE_TYPE:
size = ogs_nas_5gs_decode_integrity_protection_maximum_data_rate(&pdu_session_modification_request->integrity_protection_maximum_data_rate, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_integrity_protection_maximum_data_rate() failed");
+ return size;
+ }
+
pdu_session_modification_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REQUEST_INTEGRITY_PROTECTION_MAXIMUM_DATA_RATE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REQUEST_REQUESTED_QOS_RULES_TYPE:
size = ogs_nas_5gs_decode_qos_rules(&pdu_session_modification_request->requested_qos_rules, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_qos_rules() failed");
+ return size;
+ }
+
pdu_session_modification_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REQUEST_REQUESTED_QOS_RULES_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REQUEST_REQUESTED_QOS_FLOW_DESCRIPTIONS_TYPE:
size = ogs_nas_5gs_decode_qos_flow_descriptions(&pdu_session_modification_request->requested_qos_flow_descriptions, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_qos_flow_descriptions() failed");
+ return size;
+ }
+
pdu_session_modification_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REQUEST_REQUESTED_QOS_FLOW_DESCRIPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REQUEST_MAPPED_EPS_BEARER_CONTEXTS_TYPE:
size = ogs_nas_5gs_decode_mapped_eps_bearer_contexts(&pdu_session_modification_request->mapped_eps_bearer_contexts, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_mapped_eps_bearer_contexts() failed");
+ return size;
+ }
+
pdu_session_modification_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REQUEST_MAPPED_EPS_BEARER_CONTEXTS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_5gs_decode_extended_protocol_configuration_options(&pdu_session_modification_request->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
pdu_session_modification_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REQUEST_PORT_MANAGEMENT_INFORMATION_CONTAINER_TYPE:
size = ogs_nas_5gs_decode_port_management_information_container(&pdu_session_modification_request->port_management_information_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_port_management_information_container() failed");
+ return size;
+ }
+
pdu_session_modification_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REQUEST_PORT_MANAGEMENT_INFORMATION_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REQUEST_HEADER_COMPRESSION_CONFIGURATION_TYPE:
size = ogs_nas_5gs_decode_header_compression_configuration(&pdu_session_modification_request->header_compression_configuration, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_header_compression_configuration() failed");
+ return size;
+ }
+
pdu_session_modification_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REQUEST_HEADER_COMPRESSION_CONFIGURATION_PRESENT;
decoded += size;
break;
@@ -2148,7 +3118,11 @@ int ogs_nas_5gs_decode_pdu_session_modification_reject(ogs_nas_5gs_message_t *me
ogs_trace("[NAS] Decode PDU_SESSION_MODIFICATION_REJECT\n");
size = ogs_nas_5gs_decode_5gsm_cause(&pdu_session_modification_reject->gsm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gsm_cause() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -2156,31 +3130,50 @@ int ogs_nas_5gs_decode_pdu_session_modification_reject(ogs_nas_5gs_message_t *me
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REJECT_BACK_OFF_TIMER_VALUE_TYPE:
size = ogs_nas_5gs_decode_gprs_timer_3(&pdu_session_modification_reject->back_off_timer_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_gprs_timer_3() failed");
+ return size;
+ }
+
pdu_session_modification_reject->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REJECT_BACK_OFF_TIMER_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_5gs_decode_extended_protocol_configuration_options(&pdu_session_modification_reject->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
pdu_session_modification_reject->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REJECT_RE_ATTEMPT_INDICATOR_TYPE:
size = ogs_nas_5gs_decode_re_attempt_indicator(&pdu_session_modification_reject->re_attempt_indicator, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_re_attempt_indicator() failed");
+ return size;
+ }
+
pdu_session_modification_reject->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REJECT_RE_ATTEMPT_INDICATOR_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REJECT_5GSM_CONGESTION_RE_ATTEMPT_INDICATOR_TYPE:
size = ogs_nas_5gs_decode_5gsm_congestion_re_attempt_indicator(&pdu_session_modification_reject->gsm_congestion_re_attempt_indicator, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gsm_congestion_re_attempt_indicator() failed");
+ return size;
+ }
+
pdu_session_modification_reject->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REJECT_5GSM_CONGESTION_RE_ATTEMPT_INDICATOR_PRESENT;
decoded += size;
break;
@@ -2206,25 +3199,40 @@ int ogs_nas_5gs_decode_pdu_session_modification_command(ogs_nas_5gs_message_t *m
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_5GSM_CAUSE_TYPE:
size = ogs_nas_5gs_decode_5gsm_cause(&pdu_session_modification_command->gsm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gsm_cause() failed");
+ return size;
+ }
+
pdu_session_modification_command->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_5GSM_CAUSE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_SESSION_AMBR_TYPE:
size = ogs_nas_5gs_decode_session_ambr(&pdu_session_modification_command->session_ambr, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_session_ambr() failed");
+ return size;
+ }
+
pdu_session_modification_command->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_SESSION_AMBR_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_RQ_TIMER_VALUE_TYPE:
size = ogs_nas_5gs_decode_gprs_timer(&pdu_session_modification_command->rq_timer_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_gprs_timer() failed");
+ return size;
+ }
+
pdu_session_modification_command->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_RQ_TIMER_VALUE_PRESENT;
decoded += size;
break;
@@ -2232,55 +3240,91 @@ int ogs_nas_5gs_decode_pdu_session_modification_command(ogs_nas_5gs_message_t *m
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_always_on_pdu_session_indication(&pdu_session_modification_command->always_on_pdu_session_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_always_on_pdu_session_indication() failed");
+ return size;
+ }
+
pdu_session_modification_command->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_ALWAYS_ON_PDU_SESSION_INDICATION_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_AUTHORIZED_QOS_RULES_TYPE:
size = ogs_nas_5gs_decode_qos_rules(&pdu_session_modification_command->authorized_qos_rules, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_qos_rules() failed");
+ return size;
+ }
+
pdu_session_modification_command->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_AUTHORIZED_QOS_RULES_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_MAPPED_EPS_BEARER_CONTEXTS_TYPE:
size = ogs_nas_5gs_decode_mapped_eps_bearer_contexts(&pdu_session_modification_command->mapped_eps_bearer_contexts, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_mapped_eps_bearer_contexts() failed");
+ return size;
+ }
+
pdu_session_modification_command->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_MAPPED_EPS_BEARER_CONTEXTS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_AUTHORIZED_QOS_FLOW_DESCRIPTIONS_TYPE:
size = ogs_nas_5gs_decode_qos_flow_descriptions(&pdu_session_modification_command->authorized_qos_flow_descriptions, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_qos_flow_descriptions() failed");
+ return size;
+ }
+
pdu_session_modification_command->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_AUTHORIZED_QOS_FLOW_DESCRIPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_5gs_decode_extended_protocol_configuration_options(&pdu_session_modification_command->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
pdu_session_modification_command->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_ATSSS_CONTAINER_TYPE:
size = ogs_nas_5gs_decode_atsss_container(&pdu_session_modification_command->atsss_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_atsss_container() failed");
+ return size;
+ }
+
pdu_session_modification_command->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_ATSSS_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_HEADER_COMPRESSION_CONFIGURATION_TYPE:
size = ogs_nas_5gs_decode_header_compression_configuration(&pdu_session_modification_command->header_compression_configuration, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_header_compression_configuration() failed");
+ return size;
+ }
+
pdu_session_modification_command->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_HEADER_COMPRESSION_CONFIGURATION_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_PORT_MANAGEMENT_INFORMATION_CONTAINER_TYPE:
size = ogs_nas_5gs_decode_port_management_information_container(&pdu_session_modification_command->port_management_information_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_port_management_information_container() failed");
+ return size;
+ }
+
pdu_session_modification_command->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_PORT_MANAGEMENT_INFORMATION_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_SERVING_PLMN_RATE_CONTROL_TYPE:
size = ogs_nas_5gs_decode_serving_plmn_rate_control(&pdu_session_modification_command->serving_plmn_rate_control, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_serving_plmn_rate_control() failed");
+ return size;
+ }
+
pdu_session_modification_command->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_SERVING_PLMN_RATE_CONTROL_PRESENT;
decoded += size;
break;
@@ -2306,19 +3350,30 @@ int ogs_nas_5gs_decode_pdu_session_modification_complete(ogs_nas_5gs_message_t *
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMPLETE_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_5gs_decode_extended_protocol_configuration_options(&pdu_session_modification_complete->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
pdu_session_modification_complete->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMPLETE_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMPLETE_PORT_MANAGEMENT_INFORMATION_CONTAINER_TYPE:
size = ogs_nas_5gs_decode_port_management_information_container(&pdu_session_modification_complete->port_management_information_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_port_management_information_container() failed");
+ return size;
+ }
+
pdu_session_modification_complete->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMPLETE_PORT_MANAGEMENT_INFORMATION_CONTAINER_PRESENT;
decoded += size;
break;
@@ -2340,7 +3395,11 @@ int ogs_nas_5gs_decode_pdu_session_modification_command_reject(ogs_nas_5gs_messa
ogs_trace("[NAS] Decode PDU_SESSION_MODIFICATION_COMMAND_REJECT\n");
size = ogs_nas_5gs_decode_5gsm_cause(&pdu_session_modification_command_reject->gsm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gsm_cause() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -2348,13 +3407,20 @@ int ogs_nas_5gs_decode_pdu_session_modification_command_reject(ogs_nas_5gs_messa
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_5gs_decode_extended_protocol_configuration_options(&pdu_session_modification_command_reject->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
pdu_session_modification_command_reject->presencemask |= OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2380,19 +3446,30 @@ int ogs_nas_5gs_decode_pdu_session_release_request(ogs_nas_5gs_message_t *messag
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_PDU_SESSION_RELEASE_REQUEST_5GSM_CAUSE_TYPE:
size = ogs_nas_5gs_decode_5gsm_cause(&pdu_session_release_request->gsm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gsm_cause() failed");
+ return size;
+ }
+
pdu_session_release_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_RELEASE_REQUEST_5GSM_CAUSE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_RELEASE_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_5gs_decode_extended_protocol_configuration_options(&pdu_session_release_request->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
pdu_session_release_request->presencemask |= OGS_NAS_5GS_PDU_SESSION_RELEASE_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2414,7 +3491,11 @@ int ogs_nas_5gs_decode_pdu_session_release_reject(ogs_nas_5gs_message_t *message
ogs_trace("[NAS] Decode PDU_SESSION_RELEASE_REJECT\n");
size = ogs_nas_5gs_decode_5gsm_cause(&pdu_session_release_reject->gsm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gsm_cause() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -2422,13 +3503,20 @@ int ogs_nas_5gs_decode_pdu_session_release_reject(ogs_nas_5gs_message_t *message
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_PDU_SESSION_RELEASE_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_5gs_decode_extended_protocol_configuration_options(&pdu_session_release_reject->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
pdu_session_release_reject->presencemask |= OGS_NAS_5GS_PDU_SESSION_RELEASE_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2450,7 +3538,11 @@ int ogs_nas_5gs_decode_pdu_session_release_command(ogs_nas_5gs_message_t *messag
ogs_trace("[NAS] Decode PDU_SESSION_RELEASE_COMMAND\n");
size = ogs_nas_5gs_decode_5gsm_cause(&pdu_session_release_command->gsm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gsm_cause() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -2458,31 +3550,50 @@ int ogs_nas_5gs_decode_pdu_session_release_command(ogs_nas_5gs_message_t *messag
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_PDU_SESSION_RELEASE_COMMAND_BACK_OFF_TIMER_VALUE_TYPE:
size = ogs_nas_5gs_decode_gprs_timer_3(&pdu_session_release_command->back_off_timer_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_gprs_timer_3() failed");
+ return size;
+ }
+
pdu_session_release_command->presencemask |= OGS_NAS_5GS_PDU_SESSION_RELEASE_COMMAND_BACK_OFF_TIMER_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_RELEASE_COMMAND_EAP_MESSAGE_TYPE:
size = ogs_nas_5gs_decode_eap_message(&pdu_session_release_command->eap_message, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_eap_message() failed");
+ return size;
+ }
+
pdu_session_release_command->presencemask |= OGS_NAS_5GS_PDU_SESSION_RELEASE_COMMAND_EAP_MESSAGE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_RELEASE_COMMAND_5GSM_CONGESTION_RE_ATTEMPT_INDICATOR_TYPE:
size = ogs_nas_5gs_decode_5gsm_congestion_re_attempt_indicator(&pdu_session_release_command->gsm_congestion_re_attempt_indicator, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gsm_congestion_re_attempt_indicator() failed");
+ return size;
+ }
+
pdu_session_release_command->presencemask |= OGS_NAS_5GS_PDU_SESSION_RELEASE_COMMAND_5GSM_CONGESTION_RE_ATTEMPT_INDICATOR_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_RELEASE_COMMAND_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_5gs_decode_extended_protocol_configuration_options(&pdu_session_release_command->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
pdu_session_release_command->presencemask |= OGS_NAS_5GS_PDU_SESSION_RELEASE_COMMAND_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2490,7 +3601,11 @@ int ogs_nas_5gs_decode_pdu_session_release_command(ogs_nas_5gs_message_t *messag
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_5gs_decode_access_type(&pdu_session_release_command->access_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_access_type() failed");
+ return size;
+ }
+
pdu_session_release_command->presencemask |= OGS_NAS_5GS_PDU_SESSION_RELEASE_COMMAND_ACCESS_TYPE_PRESENT;
decoded += size;
break;
@@ -2516,19 +3631,30 @@ int ogs_nas_5gs_decode_pdu_session_release_complete(ogs_nas_5gs_message_t *messa
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
case OGS_NAS_5GS_PDU_SESSION_RELEASE_COMPLETE_5GSM_CAUSE_TYPE:
size = ogs_nas_5gs_decode_5gsm_cause(&pdu_session_release_complete->gsm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gsm_cause() failed");
+ return size;
+ }
+
pdu_session_release_complete->presencemask |= OGS_NAS_5GS_PDU_SESSION_RELEASE_COMPLETE_5GSM_CAUSE_PRESENT;
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_RELEASE_COMPLETE_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_5gs_decode_extended_protocol_configuration_options(&pdu_session_release_complete->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
pdu_session_release_complete->presencemask |= OGS_NAS_5GS_PDU_SESSION_RELEASE_COMPLETE_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2550,7 +3676,11 @@ int ogs_nas_5gs_decode_5gsm_status(ogs_nas_5gs_message_t *message, ogs_pkbuf_t *
ogs_trace("[NAS] Decode 5GSM_STATUS\n");
size = ogs_nas_5gs_decode_5gsm_cause(&gsm_status->gsm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gsm_cause() failed");
+ return size;
+ }
+
decoded += size;
return decoded;
@@ -2559,7 +3689,7 @@ int ogs_nas_5gs_decode_5gsm_status(ogs_nas_5gs_message_t *message, ogs_pkbuf_t *
int ogs_nas_5gmm_decode(ogs_nas_5gs_message_t *message, ogs_pkbuf_t *pkbuf)
{
int size = 0;
- uint16_t decoded = 0;
+ int decoded = 0;
ogs_assert(pkbuf);
ogs_assert(pkbuf->data);
@@ -2568,133 +3698,232 @@ int ogs_nas_5gmm_decode(ogs_nas_5gs_message_t *message, ogs_pkbuf_t *pkbuf)
memset(message, 0, sizeof(ogs_nas_5gs_message_t));
size = sizeof(ogs_nas_5gmm_header_t);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return OGS_ERROR;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
memcpy(&message->gmm.h, pkbuf->data - size, size);
decoded += size;
switch(message->gmm.h.message_type) {
case OGS_NAS_5GS_REGISTRATION_REQUEST:
size = ogs_nas_5gs_decode_registration_request(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_registration_request() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_ACCEPT:
size = ogs_nas_5gs_decode_registration_accept(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_registration_accept() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_COMPLETE:
size = ogs_nas_5gs_decode_registration_complete(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_registration_complete() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_REGISTRATION_REJECT:
size = ogs_nas_5gs_decode_registration_reject(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_registration_reject() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_DEREGISTRATION_REQUEST:
size = ogs_nas_5gs_decode_deregistration_request_from_ue(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_deregistration_request_from_ue() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_DEREGISTRATION_ACCEPT:
break;
case OGS_NAS_5GS_SERVICE_REQUEST:
size = ogs_nas_5gs_decode_service_request(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_service_request() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_SERVICE_REJECT:
size = ogs_nas_5gs_decode_service_reject(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_service_reject() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_SERVICE_ACCEPT:
size = ogs_nas_5gs_decode_service_accept(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_service_accept() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND:
size = ogs_nas_5gs_decode_configuration_update_command(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_configuration_update_command() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_CONFIGURATION_UPDATE_COMPLETE:
break;
case OGS_NAS_5GS_AUTHENTICATION_REQUEST:
size = ogs_nas_5gs_decode_authentication_request(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_authentication_request() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_AUTHENTICATION_RESPONSE:
size = ogs_nas_5gs_decode_authentication_response(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_authentication_response() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_AUTHENTICATION_REJECT:
size = ogs_nas_5gs_decode_authentication_reject(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_authentication_reject() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_AUTHENTICATION_FAILURE:
size = ogs_nas_5gs_decode_authentication_failure(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_authentication_failure() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_AUTHENTICATION_RESULT:
size = ogs_nas_5gs_decode_authentication_result(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_authentication_result() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_IDENTITY_REQUEST:
size = ogs_nas_5gs_decode_identity_request(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_identity_request() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_IDENTITY_RESPONSE:
size = ogs_nas_5gs_decode_identity_response(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_identity_response() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_SECURITY_MODE_COMMAND:
size = ogs_nas_5gs_decode_security_mode_command(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_security_mode_command() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_SECURITY_MODE_COMPLETE:
size = ogs_nas_5gs_decode_security_mode_complete(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_security_mode_complete() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_SECURITY_MODE_REJECT:
size = ogs_nas_5gs_decode_security_mode_reject(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_security_mode_reject() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_5GMM_STATUS:
size = ogs_nas_5gs_decode_5gmm_status(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gmm_status() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_NOTIFICATION:
size = ogs_nas_5gs_decode_notification(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_notification() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_NOTIFICATION_RESPONSE:
size = ogs_nas_5gs_decode_notification_response(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_notification_response() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_UL_NAS_TRANSPORT:
size = ogs_nas_5gs_decode_ul_nas_transport(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_ul_nas_transport() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_DL_NAS_TRANSPORT:
size = ogs_nas_5gs_decode_dl_nas_transport(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_dl_nas_transport() failed");
+ return size;
+ }
+
decoded += size;
break;
default:
@@ -2710,7 +3939,7 @@ int ogs_nas_5gmm_decode(ogs_nas_5gs_message_t *message, ogs_pkbuf_t *pkbuf)
int ogs_nas_5gsm_decode(ogs_nas_5gs_message_t *message, ogs_pkbuf_t *pkbuf)
{
int size = 0;
- uint16_t decoded = 0;
+ int decoded = 0;
ogs_assert(pkbuf);
ogs_assert(pkbuf->data);
@@ -2719,89 +3948,156 @@ int ogs_nas_5gsm_decode(ogs_nas_5gs_message_t *message, ogs_pkbuf_t *pkbuf)
memset(message, 0, sizeof(ogs_nas_5gs_message_t));
size = sizeof(ogs_nas_5gsm_header_t);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return OGS_ERROR;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
memcpy(&message->gsm.h, pkbuf->data - size, size);
decoded += size;
switch(message->gsm.h.message_type) {
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REQUEST:
size = ogs_nas_5gs_decode_pdu_session_establishment_request(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_establishment_request() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT:
size = ogs_nas_5gs_decode_pdu_session_establishment_accept(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_establishment_accept() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REJECT:
size = ogs_nas_5gs_decode_pdu_session_establishment_reject(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_establishment_reject() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_AUTHENTICATION_COMMAND:
size = ogs_nas_5gs_decode_pdu_session_authentication_command(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_authentication_command() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_AUTHENTICATION_COMPLETE:
size = ogs_nas_5gs_decode_pdu_session_authentication_complete(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_authentication_complete() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_AUTHENTICATION_RESULT:
size = ogs_nas_5gs_decode_pdu_session_authentication_result(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_authentication_result() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REQUEST:
size = ogs_nas_5gs_decode_pdu_session_modification_request(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_modification_request() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_REJECT:
size = ogs_nas_5gs_decode_pdu_session_modification_reject(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_modification_reject() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND:
size = ogs_nas_5gs_decode_pdu_session_modification_command(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_modification_command() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMPLETE:
size = ogs_nas_5gs_decode_pdu_session_modification_complete(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_modification_complete() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND_REJECT:
size = ogs_nas_5gs_decode_pdu_session_modification_command_reject(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_modification_command_reject() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_RELEASE_REQUEST:
size = ogs_nas_5gs_decode_pdu_session_release_request(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_release_request() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_RELEASE_REJECT:
size = ogs_nas_5gs_decode_pdu_session_release_reject(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_release_reject() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_RELEASE_COMMAND:
size = ogs_nas_5gs_decode_pdu_session_release_command(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_release_command() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_PDU_SESSION_RELEASE_COMPLETE:
size = ogs_nas_5gs_decode_pdu_session_release_complete(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdu_session_release_complete() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_5GS_5GSM_STATUS:
size = ogs_nas_5gs_decode_5gsm_status(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_5gsm_status() failed");
+ return size;
+ }
+
decoded += size;
break;
default:
diff --git a/lib/nas/5gs/encoder.c b/lib/nas/5gs/encoder.c
index 80900edf2..1599cf8ab 100644
--- a/lib/nas/5gs/encoder.c
+++ b/lib/nas/5gs/encoder.c
@@ -28,7 +28,7 @@
/*******************************************************************************
* This file had been created by nas-message.py script v0.2.0
* Please do not modify this file but regenerate it via script.
- * Created on: 2021-05-30 21:57:39.484594 by acetcom
+ * Created on: 2021-06-21 14:15:53.800337 by acetcom
* from 24501-g41.docx
******************************************************************************/
diff --git a/lib/nas/5gs/ies.c b/lib/nas/5gs/ies.c
index 1a3b2007a..da082aeb5 100644
--- a/lib/nas/5gs/ies.c
+++ b/lib/nas/5gs/ies.c
@@ -28,7 +28,7 @@
/*******************************************************************************
* This file had been created by nas-message.py script v0.2.0
* Please do not modify this file but regenerate it via script.
- * Created on: 2021-05-30 21:57:39.457575 by acetcom
+ * Created on: 2021-06-21 14:15:53.780969 by acetcom
* from 24501-g41.docx
******************************************************************************/
@@ -36,7 +36,7 @@
int ogs_nas_5gs_encode_optional_type(ogs_pkbuf_t *pkbuf, uint8_t type)
{
- uint16_t size = sizeof(uint8_t);
+ int size = sizeof(uint8_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, &type, size);
@@ -47,13 +47,17 @@ int ogs_nas_5gs_encode_optional_type(ogs_pkbuf_t *pkbuf, uint8_t type)
* O TLV 3-n */
int ogs_nas_5gs_decode_additional_information(ogs_nas_additional_information_t *additional_information, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_additional_information_t *source = (ogs_nas_additional_information_t *)pkbuf->data;
additional_information->length = source->length;
size = additional_information->length + sizeof(additional_information->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*additional_information) < size) return -1;
memcpy(additional_information, pkbuf->data - size, size);
@@ -65,7 +69,7 @@ int ogs_nas_5gs_decode_additional_information(ogs_nas_additional_information_t *
int ogs_nas_5gs_encode_additional_information(ogs_pkbuf_t *pkbuf, ogs_nas_additional_information_t *additional_information)
{
- uint16_t size = additional_information->length + sizeof(additional_information->length);
+ int size = additional_information->length + sizeof(additional_information->length);
ogs_nas_additional_information_t target;
memcpy(&target, additional_information, sizeof(ogs_nas_additional_information_t));
@@ -82,9 +86,13 @@ int ogs_nas_5gs_encode_additional_information(ogs_pkbuf_t *pkbuf, ogs_nas_additi
* M V 1/2 */
int ogs_nas_5gs_decode_access_type(ogs_nas_access_type_t *access_type, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_access_type_t);
+ int size = sizeof(ogs_nas_access_type_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(access_type, pkbuf->data - size, size);
ogs_trace(" ACCESS_TYPE - ");
@@ -95,7 +103,7 @@ int ogs_nas_5gs_decode_access_type(ogs_nas_access_type_t *access_type, ogs_pkbuf
int ogs_nas_5gs_encode_access_type(ogs_pkbuf_t *pkbuf, ogs_nas_access_type_t *access_type)
{
- uint16_t size = sizeof(ogs_nas_access_type_t);
+ int size = sizeof(ogs_nas_access_type_t);
ogs_nas_access_type_t target;
memcpy(&target, access_type, size);
@@ -112,13 +120,17 @@ int ogs_nas_5gs_encode_access_type(ogs_pkbuf_t *pkbuf, ogs_nas_access_type_t *ac
* O TLV 3-102 */
int ogs_nas_5gs_decode_dnn(ogs_nas_dnn_t *dnn, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_dnn_t *source = (ogs_nas_dnn_t *)pkbuf->data;
dnn->length = source->length;
size = dnn->length + sizeof(dnn->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*dnn) < size) return -1;
memcpy(dnn, pkbuf->data - size, size);
@@ -136,7 +148,7 @@ int ogs_nas_5gs_decode_dnn(ogs_nas_dnn_t *dnn, ogs_pkbuf_t *pkbuf)
int ogs_nas_5gs_encode_dnn(ogs_pkbuf_t *pkbuf, ogs_nas_dnn_t *dnn)
{
- uint16_t size = dnn->length + sizeof(dnn->length);
+ int size = dnn->length + sizeof(dnn->length);
ogs_nas_dnn_t target;
memcpy(&target, dnn, sizeof(ogs_nas_dnn_t));
@@ -156,13 +168,17 @@ int ogs_nas_5gs_encode_dnn(ogs_pkbuf_t *pkbuf, ogs_nas_dnn_t *dnn)
* O TLV-E 7-1503 */
int ogs_nas_5gs_decode_eap_message(ogs_nas_eap_message_t *eap_message, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_eap_message_t *source = (ogs_nas_eap_message_t *)pkbuf->data;
eap_message->length = be16toh(source->length);
size = eap_message->length + sizeof(eap_message->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
eap_message->buffer = pkbuf->data - size + sizeof(eap_message->length);
ogs_trace(" EAP_MESSAGE - ");
@@ -173,8 +189,8 @@ int ogs_nas_5gs_decode_eap_message(ogs_nas_eap_message_t *eap_message, ogs_pkbuf
int ogs_nas_5gs_encode_eap_message(ogs_pkbuf_t *pkbuf, ogs_nas_eap_message_t *eap_message)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(eap_message);
ogs_assert(eap_message->buffer);
@@ -198,9 +214,13 @@ int ogs_nas_5gs_encode_eap_message(ogs_pkbuf_t *pkbuf, ogs_nas_eap_message_t *ea
* O TV 2 */
int ogs_nas_5gs_decode_gprs_timer(ogs_nas_gprs_timer_t *gprs_timer, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_gprs_timer_t);
+ int size = sizeof(ogs_nas_gprs_timer_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(gprs_timer, pkbuf->data - size, size);
ogs_trace(" GPRS_TIMER - ");
@@ -211,7 +231,7 @@ int ogs_nas_5gs_decode_gprs_timer(ogs_nas_gprs_timer_t *gprs_timer, ogs_pkbuf_t
int ogs_nas_5gs_encode_gprs_timer(ogs_pkbuf_t *pkbuf, ogs_nas_gprs_timer_t *gprs_timer)
{
- uint16_t size = sizeof(ogs_nas_gprs_timer_t);
+ int size = sizeof(ogs_nas_gprs_timer_t);
ogs_nas_gprs_timer_t target;
memcpy(&target, gprs_timer, size);
@@ -228,13 +248,17 @@ int ogs_nas_5gs_encode_gprs_timer(ogs_pkbuf_t *pkbuf, ogs_nas_gprs_timer_t *gprs
* O TLV 3 */
int ogs_nas_5gs_decode_gprs_timer_2(ogs_nas_gprs_timer_2_t *gprs_timer_2, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_gprs_timer_2_t *source = (ogs_nas_gprs_timer_2_t *)pkbuf->data;
gprs_timer_2->length = source->length;
size = gprs_timer_2->length + sizeof(gprs_timer_2->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*gprs_timer_2) < size) return -1;
memcpy(gprs_timer_2, pkbuf->data - size, size);
@@ -246,7 +270,7 @@ int ogs_nas_5gs_decode_gprs_timer_2(ogs_nas_gprs_timer_2_t *gprs_timer_2, ogs_pk
int ogs_nas_5gs_encode_gprs_timer_2(ogs_pkbuf_t *pkbuf, ogs_nas_gprs_timer_2_t *gprs_timer_2)
{
- uint16_t size = gprs_timer_2->length + sizeof(gprs_timer_2->length);
+ int size = gprs_timer_2->length + sizeof(gprs_timer_2->length);
ogs_nas_gprs_timer_2_t target;
memcpy(&target, gprs_timer_2, sizeof(ogs_nas_gprs_timer_2_t));
@@ -263,13 +287,17 @@ int ogs_nas_5gs_encode_gprs_timer_2(ogs_pkbuf_t *pkbuf, ogs_nas_gprs_timer_2_t *
* O TLV 3 */
int ogs_nas_5gs_decode_gprs_timer_3(ogs_nas_gprs_timer_3_t *gprs_timer_3, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_gprs_timer_3_t *source = (ogs_nas_gprs_timer_3_t *)pkbuf->data;
gprs_timer_3->length = source->length;
size = gprs_timer_3->length + sizeof(gprs_timer_3->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*gprs_timer_3) < size) return -1;
memcpy(gprs_timer_3, pkbuf->data - size, size);
@@ -281,7 +309,7 @@ int ogs_nas_5gs_decode_gprs_timer_3(ogs_nas_gprs_timer_3_t *gprs_timer_3, ogs_pk
int ogs_nas_5gs_encode_gprs_timer_3(ogs_pkbuf_t *pkbuf, ogs_nas_gprs_timer_3_t *gprs_timer_3)
{
- uint16_t size = gprs_timer_3->length + sizeof(gprs_timer_3->length);
+ int size = gprs_timer_3->length + sizeof(gprs_timer_3->length);
ogs_nas_gprs_timer_3_t target;
memcpy(&target, gprs_timer_3, sizeof(ogs_nas_gprs_timer_3_t));
@@ -298,13 +326,17 @@ int ogs_nas_5gs_encode_gprs_timer_3(ogs_pkbuf_t *pkbuf, ogs_nas_gprs_timer_3_t *
* O TLV 3-10 */
int ogs_nas_5gs_decode_s_nssai(ogs_nas_s_nssai_t *s_nssai, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_s_nssai_t *source = (ogs_nas_s_nssai_t *)pkbuf->data;
s_nssai->length = source->length;
size = s_nssai->length + sizeof(s_nssai->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*s_nssai) < size) return -1;
memcpy(s_nssai, pkbuf->data - size, size);
@@ -316,7 +348,7 @@ int ogs_nas_5gs_decode_s_nssai(ogs_nas_s_nssai_t *s_nssai, ogs_pkbuf_t *pkbuf)
int ogs_nas_5gs_encode_s_nssai(ogs_pkbuf_t *pkbuf, ogs_nas_s_nssai_t *s_nssai)
{
- uint16_t size = s_nssai->length + sizeof(s_nssai->length);
+ int size = s_nssai->length + sizeof(s_nssai->length);
ogs_nas_s_nssai_t target;
memcpy(&target, s_nssai, sizeof(ogs_nas_s_nssai_t));
@@ -333,13 +365,17 @@ int ogs_nas_5gs_encode_s_nssai(ogs_pkbuf_t *pkbuf, ogs_nas_s_nssai_t *s_nssai)
* O TLV 3-15 */
int ogs_nas_5gs_decode_5gmm_capability(ogs_nas_5gmm_capability_t *gmm_capability, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_5gmm_capability_t *source = (ogs_nas_5gmm_capability_t *)pkbuf->data;
gmm_capability->length = source->length;
size = gmm_capability->length + sizeof(gmm_capability->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*gmm_capability) < size) return -1;
memcpy(gmm_capability, pkbuf->data - size, size);
@@ -351,7 +387,7 @@ int ogs_nas_5gs_decode_5gmm_capability(ogs_nas_5gmm_capability_t *gmm_capability
int ogs_nas_5gs_encode_5gmm_capability(ogs_pkbuf_t *pkbuf, ogs_nas_5gmm_capability_t *gmm_capability)
{
- uint16_t size = gmm_capability->length + sizeof(gmm_capability->length);
+ int size = gmm_capability->length + sizeof(gmm_capability->length);
ogs_nas_5gmm_capability_t target;
memcpy(&target, gmm_capability, sizeof(ogs_nas_5gmm_capability_t));
@@ -368,13 +404,17 @@ int ogs_nas_5gs_encode_5gmm_capability(ogs_pkbuf_t *pkbuf, ogs_nas_5gmm_capabili
* M LV 3-n */
int ogs_nas_5gs_decode_abba(ogs_nas_abba_t *abba, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_abba_t *source = (ogs_nas_abba_t *)pkbuf->data;
abba->length = source->length;
size = abba->length + sizeof(abba->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*abba) < size) return -1;
memcpy(abba, pkbuf->data - size, size);
@@ -386,7 +426,7 @@ int ogs_nas_5gs_decode_abba(ogs_nas_abba_t *abba, ogs_pkbuf_t *pkbuf)
int ogs_nas_5gs_encode_abba(ogs_pkbuf_t *pkbuf, ogs_nas_abba_t *abba)
{
- uint16_t size = abba->length + sizeof(abba->length);
+ int size = abba->length + sizeof(abba->length);
ogs_nas_abba_t target;
memcpy(&target, abba, sizeof(ogs_nas_abba_t));
@@ -403,13 +443,17 @@ int ogs_nas_5gs_encode_abba(ogs_pkbuf_t *pkbuf, ogs_nas_abba_t *abba)
* O TLV 3 */
int ogs_nas_5gs_decode_additional_5g_security_information(ogs_nas_additional_5g_security_information_t *additional_security_information, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_additional_5g_security_information_t *source = (ogs_nas_additional_5g_security_information_t *)pkbuf->data;
additional_security_information->length = source->length;
size = additional_security_information->length + sizeof(additional_security_information->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*additional_security_information) < size) return -1;
memcpy(additional_security_information, pkbuf->data - size, size);
@@ -421,7 +465,7 @@ int ogs_nas_5gs_decode_additional_5g_security_information(ogs_nas_additional_5g_
int ogs_nas_5gs_encode_additional_5g_security_information(ogs_pkbuf_t *pkbuf, ogs_nas_additional_5g_security_information_t *additional_security_information)
{
- uint16_t size = additional_security_information->length + sizeof(additional_security_information->length);
+ int size = additional_security_information->length + sizeof(additional_security_information->length);
ogs_nas_additional_5g_security_information_t target;
memcpy(&target, additional_security_information, sizeof(ogs_nas_additional_5g_security_information_t));
@@ -438,13 +482,17 @@ int ogs_nas_5gs_encode_additional_5g_security_information(ogs_pkbuf_t *pkbuf, og
* O TLV 3 */
int ogs_nas_5gs_decode_additional_information_requested(ogs_nas_additional_information_requested_t *additional_information_requested, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_additional_information_requested_t *source = (ogs_nas_additional_information_requested_t *)pkbuf->data;
additional_information_requested->length = source->length;
size = additional_information_requested->length + sizeof(additional_information_requested->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*additional_information_requested) < size) return -1;
memcpy(additional_information_requested, pkbuf->data - size, size);
@@ -456,7 +504,7 @@ int ogs_nas_5gs_decode_additional_information_requested(ogs_nas_additional_infor
int ogs_nas_5gs_encode_additional_information_requested(ogs_pkbuf_t *pkbuf, ogs_nas_additional_information_requested_t *additional_information_requested)
{
- uint16_t size = additional_information_requested->length + sizeof(additional_information_requested->length);
+ int size = additional_information_requested->length + sizeof(additional_information_requested->length);
ogs_nas_additional_information_requested_t target;
memcpy(&target, additional_information_requested, sizeof(ogs_nas_additional_information_requested_t));
@@ -473,13 +521,17 @@ int ogs_nas_5gs_encode_additional_information_requested(ogs_pkbuf_t *pkbuf, ogs_
* O TLV 4-34 */
int ogs_nas_5gs_decode_allowed_pdu_session_status(ogs_nas_allowed_pdu_session_status_t *allowed_pdu_session_status, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_allowed_pdu_session_status_t *source = (ogs_nas_allowed_pdu_session_status_t *)pkbuf->data;
allowed_pdu_session_status->length = source->length;
size = allowed_pdu_session_status->length + sizeof(allowed_pdu_session_status->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*allowed_pdu_session_status) < size) return -1;
memcpy(allowed_pdu_session_status, pkbuf->data - size, size);
@@ -493,7 +545,7 @@ int ogs_nas_5gs_decode_allowed_pdu_session_status(ogs_nas_allowed_pdu_session_st
int ogs_nas_5gs_encode_allowed_pdu_session_status(ogs_pkbuf_t *pkbuf, ogs_nas_allowed_pdu_session_status_t *allowed_pdu_session_status)
{
- uint16_t size = allowed_pdu_session_status->length + sizeof(allowed_pdu_session_status->length);
+ int size = allowed_pdu_session_status->length + sizeof(allowed_pdu_session_status->length);
ogs_nas_allowed_pdu_session_status_t target;
memcpy(&target, allowed_pdu_session_status, sizeof(ogs_nas_allowed_pdu_session_status_t));
@@ -512,13 +564,17 @@ int ogs_nas_5gs_encode_allowed_pdu_session_status(ogs_pkbuf_t *pkbuf, ogs_nas_al
* O TLV 16 */
int ogs_nas_5gs_decode_authentication_failure_parameter(ogs_nas_authentication_failure_parameter_t *authentication_failure_parameter, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_authentication_failure_parameter_t *source = (ogs_nas_authentication_failure_parameter_t *)pkbuf->data;
authentication_failure_parameter->length = source->length;
size = authentication_failure_parameter->length + sizeof(authentication_failure_parameter->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*authentication_failure_parameter) < size) return -1;
memcpy(authentication_failure_parameter, pkbuf->data - size, size);
@@ -530,7 +586,7 @@ int ogs_nas_5gs_decode_authentication_failure_parameter(ogs_nas_authentication_f
int ogs_nas_5gs_encode_authentication_failure_parameter(ogs_pkbuf_t *pkbuf, ogs_nas_authentication_failure_parameter_t *authentication_failure_parameter)
{
- uint16_t size = authentication_failure_parameter->length + sizeof(authentication_failure_parameter->length);
+ int size = authentication_failure_parameter->length + sizeof(authentication_failure_parameter->length);
ogs_nas_authentication_failure_parameter_t target;
memcpy(&target, authentication_failure_parameter, sizeof(ogs_nas_authentication_failure_parameter_t));
@@ -547,13 +603,17 @@ int ogs_nas_5gs_encode_authentication_failure_parameter(ogs_pkbuf_t *pkbuf, ogs_
* O TLV 18 */
int ogs_nas_5gs_decode_authentication_parameter_autn(ogs_nas_authentication_parameter_autn_t *authentication_parameter_autn, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_authentication_parameter_autn_t *source = (ogs_nas_authentication_parameter_autn_t *)pkbuf->data;
authentication_parameter_autn->length = source->length;
size = authentication_parameter_autn->length + sizeof(authentication_parameter_autn->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*authentication_parameter_autn) < size) return -1;
memcpy(authentication_parameter_autn, pkbuf->data - size, size);
@@ -565,7 +625,7 @@ int ogs_nas_5gs_decode_authentication_parameter_autn(ogs_nas_authentication_para
int ogs_nas_5gs_encode_authentication_parameter_autn(ogs_pkbuf_t *pkbuf, ogs_nas_authentication_parameter_autn_t *authentication_parameter_autn)
{
- uint16_t size = authentication_parameter_autn->length + sizeof(authentication_parameter_autn->length);
+ int size = authentication_parameter_autn->length + sizeof(authentication_parameter_autn->length);
ogs_nas_authentication_parameter_autn_t target;
memcpy(&target, authentication_parameter_autn, sizeof(ogs_nas_authentication_parameter_autn_t));
@@ -582,9 +642,13 @@ int ogs_nas_5gs_encode_authentication_parameter_autn(ogs_pkbuf_t *pkbuf, ogs_nas
* O TV 17 */
int ogs_nas_5gs_decode_authentication_parameter_rand(ogs_nas_authentication_parameter_rand_t *authentication_parameter_rand, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_authentication_parameter_rand_t);
+ int size = sizeof(ogs_nas_authentication_parameter_rand_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(authentication_parameter_rand, pkbuf->data - size, size);
ogs_trace(" AUTHENTICATION_PARAMETER_RAND - ");
@@ -595,7 +659,7 @@ int ogs_nas_5gs_decode_authentication_parameter_rand(ogs_nas_authentication_para
int ogs_nas_5gs_encode_authentication_parameter_rand(ogs_pkbuf_t *pkbuf, ogs_nas_authentication_parameter_rand_t *authentication_parameter_rand)
{
- uint16_t size = sizeof(ogs_nas_authentication_parameter_rand_t);
+ int size = sizeof(ogs_nas_authentication_parameter_rand_t);
ogs_nas_authentication_parameter_rand_t target;
memcpy(&target, authentication_parameter_rand, size);
@@ -612,13 +676,17 @@ int ogs_nas_5gs_encode_authentication_parameter_rand(ogs_pkbuf_t *pkbuf, ogs_nas
* O TLV 18 */
int ogs_nas_5gs_decode_authentication_response_parameter(ogs_nas_authentication_response_parameter_t *authentication_response_parameter, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_authentication_response_parameter_t *source = (ogs_nas_authentication_response_parameter_t *)pkbuf->data;
authentication_response_parameter->length = source->length;
size = authentication_response_parameter->length + sizeof(authentication_response_parameter->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*authentication_response_parameter) < size) return -1;
memcpy(authentication_response_parameter, pkbuf->data - size, size);
@@ -630,7 +698,7 @@ int ogs_nas_5gs_decode_authentication_response_parameter(ogs_nas_authentication_
int ogs_nas_5gs_encode_authentication_response_parameter(ogs_pkbuf_t *pkbuf, ogs_nas_authentication_response_parameter_t *authentication_response_parameter)
{
- uint16_t size = authentication_response_parameter->length + sizeof(authentication_response_parameter->length);
+ int size = authentication_response_parameter->length + sizeof(authentication_response_parameter->length);
ogs_nas_authentication_response_parameter_t target;
memcpy(&target, authentication_response_parameter, sizeof(ogs_nas_authentication_response_parameter_t));
@@ -647,9 +715,13 @@ int ogs_nas_5gs_encode_authentication_response_parameter(ogs_pkbuf_t *pkbuf, ogs
* O TV 1 */
int ogs_nas_5gs_decode_configuration_update_indication(ogs_nas_configuration_update_indication_t *configuration_update_indication, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_configuration_update_indication_t);
+ int size = sizeof(ogs_nas_configuration_update_indication_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(configuration_update_indication, pkbuf->data - size, size);
ogs_trace(" CONFIGURATION_UPDATE_INDICATION - ");
@@ -660,7 +732,7 @@ int ogs_nas_5gs_decode_configuration_update_indication(ogs_nas_configuration_upd
int ogs_nas_5gs_encode_configuration_update_indication(ogs_pkbuf_t *pkbuf, ogs_nas_configuration_update_indication_t *configuration_update_indication)
{
- uint16_t size = sizeof(ogs_nas_configuration_update_indication_t);
+ int size = sizeof(ogs_nas_configuration_update_indication_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, configuration_update_indication, size);
@@ -675,13 +747,17 @@ int ogs_nas_5gs_encode_configuration_update_indication(ogs_pkbuf_t *pkbuf, ogs_n
* O TLV-E 3-n */
int ogs_nas_5gs_decode_cag_information_list(ogs_nas_cag_information_list_t *cag_information_list, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_cag_information_list_t *source = (ogs_nas_cag_information_list_t *)pkbuf->data;
cag_information_list->length = be16toh(source->length);
size = cag_information_list->length + sizeof(cag_information_list->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
cag_information_list->buffer = pkbuf->data - size + sizeof(cag_information_list->length);
ogs_trace(" CAG_INFORMATION_LIST - ");
@@ -692,8 +768,8 @@ int ogs_nas_5gs_decode_cag_information_list(ogs_nas_cag_information_list_t *cag_
int ogs_nas_5gs_encode_cag_information_list(ogs_pkbuf_t *pkbuf, ogs_nas_cag_information_list_t *cag_information_list)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(cag_information_list);
ogs_assert(cag_information_list->buffer);
@@ -717,13 +793,17 @@ int ogs_nas_5gs_encode_cag_information_list(ogs_pkbuf_t *pkbuf, ogs_nas_cag_info
* O TLV-E x-n */
int ogs_nas_5gs_decode_ciphering_key_data(ogs_nas_ciphering_key_data_t *ciphering_key_data, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_ciphering_key_data_t *source = (ogs_nas_ciphering_key_data_t *)pkbuf->data;
ciphering_key_data->length = be16toh(source->length);
size = ciphering_key_data->length + sizeof(ciphering_key_data->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
ciphering_key_data->buffer = pkbuf->data - size + sizeof(ciphering_key_data->length);
ogs_trace(" CIPHERING_KEY_DATA - ");
@@ -734,8 +814,8 @@ int ogs_nas_5gs_decode_ciphering_key_data(ogs_nas_ciphering_key_data_t *cipherin
int ogs_nas_5gs_encode_ciphering_key_data(ogs_pkbuf_t *pkbuf, ogs_nas_ciphering_key_data_t *ciphering_key_data)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(ciphering_key_data);
ogs_assert(ciphering_key_data->buffer);
@@ -759,13 +839,17 @@ int ogs_nas_5gs_encode_ciphering_key_data(ogs_pkbuf_t *pkbuf, ogs_nas_ciphering_
* O TLV 3 */
int ogs_nas_5gs_decode_daylight_saving_time(ogs_nas_daylight_saving_time_t *daylight_saving_time, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_daylight_saving_time_t *source = (ogs_nas_daylight_saving_time_t *)pkbuf->data;
daylight_saving_time->length = source->length;
size = daylight_saving_time->length + sizeof(daylight_saving_time->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*daylight_saving_time) < size) return -1;
memcpy(daylight_saving_time, pkbuf->data - size, size);
@@ -777,7 +861,7 @@ int ogs_nas_5gs_decode_daylight_saving_time(ogs_nas_daylight_saving_time_t *dayl
int ogs_nas_5gs_encode_daylight_saving_time(ogs_pkbuf_t *pkbuf, ogs_nas_daylight_saving_time_t *daylight_saving_time)
{
- uint16_t size = daylight_saving_time->length + sizeof(daylight_saving_time->length);
+ int size = daylight_saving_time->length + sizeof(daylight_saving_time->length);
ogs_nas_daylight_saving_time_t target;
memcpy(&target, daylight_saving_time, sizeof(ogs_nas_daylight_saving_time_t));
@@ -794,9 +878,13 @@ int ogs_nas_5gs_encode_daylight_saving_time(ogs_pkbuf_t *pkbuf, ogs_nas_daylight
* M V 1 */
int ogs_nas_5gs_decode_5gmm_cause(ogs_nas_5gmm_cause_t *gmm_cause, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_5gmm_cause_t);
+ int size = sizeof(ogs_nas_5gmm_cause_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(gmm_cause, pkbuf->data - size, size);
ogs_trace(" 5GMM_CAUSE - ");
@@ -807,7 +895,7 @@ int ogs_nas_5gs_decode_5gmm_cause(ogs_nas_5gmm_cause_t *gmm_cause, ogs_pkbuf_t *
int ogs_nas_5gs_encode_5gmm_cause(ogs_pkbuf_t *pkbuf, ogs_nas_5gmm_cause_t *gmm_cause)
{
- uint16_t size = sizeof(ogs_nas_5gmm_cause_t);
+ int size = sizeof(ogs_nas_5gmm_cause_t);
ogs_nas_5gmm_cause_t target;
memcpy(&target, gmm_cause, size);
@@ -824,9 +912,13 @@ int ogs_nas_5gs_encode_5gmm_cause(ogs_pkbuf_t *pkbuf, ogs_nas_5gmm_cause_t *gmm_
* M V 1/2 */
int ogs_nas_5gs_decode_de_registration_type(ogs_nas_de_registration_type_t *de_registration_type, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_de_registration_type_t);
+ int size = sizeof(ogs_nas_de_registration_type_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(de_registration_type, pkbuf->data - size, size);
ogs_trace(" DE_REGISTRATION_TYPE - ");
@@ -837,7 +929,7 @@ int ogs_nas_5gs_decode_de_registration_type(ogs_nas_de_registration_type_t *de_r
int ogs_nas_5gs_encode_de_registration_type(ogs_pkbuf_t *pkbuf, ogs_nas_de_registration_type_t *de_registration_type)
{
- uint16_t size = sizeof(ogs_nas_de_registration_type_t);
+ int size = sizeof(ogs_nas_de_registration_type_t);
ogs_nas_de_registration_type_t target;
memcpy(&target, de_registration_type, size);
@@ -854,13 +946,17 @@ int ogs_nas_5gs_encode_de_registration_type(ogs_pkbuf_t *pkbuf, ogs_nas_de_regis
* O TLV 5-50 */
int ogs_nas_5gs_decode_emergency_number_list(ogs_nas_emergency_number_list_t *emergency_number_list, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_emergency_number_list_t *source = (ogs_nas_emergency_number_list_t *)pkbuf->data;
emergency_number_list->length = source->length;
size = emergency_number_list->length + sizeof(emergency_number_list->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*emergency_number_list) < size) return -1;
memcpy(emergency_number_list, pkbuf->data - size, size);
@@ -872,7 +968,7 @@ int ogs_nas_5gs_decode_emergency_number_list(ogs_nas_emergency_number_list_t *em
int ogs_nas_5gs_encode_emergency_number_list(ogs_pkbuf_t *pkbuf, ogs_nas_emergency_number_list_t *emergency_number_list)
{
- uint16_t size = emergency_number_list->length + sizeof(emergency_number_list->length);
+ int size = emergency_number_list->length + sizeof(emergency_number_list->length);
ogs_nas_emergency_number_list_t target;
memcpy(&target, emergency_number_list, sizeof(ogs_nas_emergency_number_list_t));
@@ -889,13 +985,17 @@ int ogs_nas_5gs_encode_emergency_number_list(ogs_pkbuf_t *pkbuf, ogs_nas_emergen
* O TLV 4 */
int ogs_nas_5gs_decode_eps_bearer_context_status(ogs_nas_eps_bearer_context_status_t *eps_bearer_context_status, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_eps_bearer_context_status_t *source = (ogs_nas_eps_bearer_context_status_t *)pkbuf->data;
eps_bearer_context_status->length = source->length;
size = eps_bearer_context_status->length + sizeof(eps_bearer_context_status->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*eps_bearer_context_status) < size) return -1;
memcpy(eps_bearer_context_status, pkbuf->data - size, size);
@@ -907,7 +1007,7 @@ int ogs_nas_5gs_decode_eps_bearer_context_status(ogs_nas_eps_bearer_context_stat
int ogs_nas_5gs_encode_eps_bearer_context_status(ogs_pkbuf_t *pkbuf, ogs_nas_eps_bearer_context_status_t *eps_bearer_context_status)
{
- uint16_t size = eps_bearer_context_status->length + sizeof(eps_bearer_context_status->length);
+ int size = eps_bearer_context_status->length + sizeof(eps_bearer_context_status->length);
ogs_nas_eps_bearer_context_status_t target;
memcpy(&target, eps_bearer_context_status, sizeof(ogs_nas_eps_bearer_context_status_t));
@@ -924,13 +1024,17 @@ int ogs_nas_5gs_encode_eps_bearer_context_status(ogs_pkbuf_t *pkbuf, ogs_nas_eps
* O TLV-E 4-n */
int ogs_nas_5gs_decode_eps_nas_message_container(ogs_nas_eps_nas_message_container_t *eps_nas_message_container, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_eps_nas_message_container_t *source = (ogs_nas_eps_nas_message_container_t *)pkbuf->data;
eps_nas_message_container->length = be16toh(source->length);
size = eps_nas_message_container->length + sizeof(eps_nas_message_container->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
eps_nas_message_container->buffer = pkbuf->data - size + sizeof(eps_nas_message_container->length);
ogs_trace(" EPS_NAS_MESSAGE_CONTAINER - ");
@@ -941,8 +1045,8 @@ int ogs_nas_5gs_decode_eps_nas_message_container(ogs_nas_eps_nas_message_contain
int ogs_nas_5gs_encode_eps_nas_message_container(ogs_pkbuf_t *pkbuf, ogs_nas_eps_nas_message_container_t *eps_nas_message_container)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(eps_nas_message_container);
ogs_assert(eps_nas_message_container->buffer);
@@ -966,9 +1070,13 @@ int ogs_nas_5gs_encode_eps_nas_message_container(ogs_pkbuf_t *pkbuf, ogs_nas_eps
* O TV 2 */
int ogs_nas_5gs_decode_eps_nas_security_algorithms(ogs_nas_eps_nas_security_algorithms_t *eps_nas_security_algorithms, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_eps_nas_security_algorithms_t);
+ int size = sizeof(ogs_nas_eps_nas_security_algorithms_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(eps_nas_security_algorithms, pkbuf->data - size, size);
ogs_trace(" EPS_NAS_SECURITY_ALGORITHMS - ");
@@ -979,7 +1087,7 @@ int ogs_nas_5gs_decode_eps_nas_security_algorithms(ogs_nas_eps_nas_security_algo
int ogs_nas_5gs_encode_eps_nas_security_algorithms(ogs_pkbuf_t *pkbuf, ogs_nas_eps_nas_security_algorithms_t *eps_nas_security_algorithms)
{
- uint16_t size = sizeof(ogs_nas_eps_nas_security_algorithms_t);
+ int size = sizeof(ogs_nas_eps_nas_security_algorithms_t);
ogs_nas_eps_nas_security_algorithms_t target;
memcpy(&target, eps_nas_security_algorithms, size);
@@ -996,13 +1104,17 @@ int ogs_nas_5gs_encode_eps_nas_security_algorithms(ogs_pkbuf_t *pkbuf, ogs_nas_e
* O TLV-E 7-65538 */
int ogs_nas_5gs_decode_extended_emergency_number_list(ogs_nas_extended_emergency_number_list_t *extended_emergency_number_list, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_extended_emergency_number_list_t *source = (ogs_nas_extended_emergency_number_list_t *)pkbuf->data;
extended_emergency_number_list->length = be16toh(source->length);
size = extended_emergency_number_list->length + sizeof(extended_emergency_number_list->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
extended_emergency_number_list->buffer = pkbuf->data - size + sizeof(extended_emergency_number_list->length);
ogs_trace(" EXTENDED_EMERGENCY_NUMBER_LIST - ");
@@ -1013,8 +1125,8 @@ int ogs_nas_5gs_decode_extended_emergency_number_list(ogs_nas_extended_emergency
int ogs_nas_5gs_encode_extended_emergency_number_list(ogs_pkbuf_t *pkbuf, ogs_nas_extended_emergency_number_list_t *extended_emergency_number_list)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(extended_emergency_number_list);
ogs_assert(extended_emergency_number_list->buffer);
@@ -1038,13 +1150,17 @@ int ogs_nas_5gs_encode_extended_emergency_number_list(ogs_pkbuf_t *pkbuf, ogs_na
* O TLV 3 */
int ogs_nas_5gs_decode_extended_drx_parameters(ogs_nas_extended_drx_parameters_t *extended_drx_parameters, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_extended_drx_parameters_t *source = (ogs_nas_extended_drx_parameters_t *)pkbuf->data;
extended_drx_parameters->length = source->length;
size = extended_drx_parameters->length + sizeof(extended_drx_parameters->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*extended_drx_parameters) < size) return -1;
memcpy(extended_drx_parameters, pkbuf->data - size, size);
@@ -1056,7 +1172,7 @@ int ogs_nas_5gs_decode_extended_drx_parameters(ogs_nas_extended_drx_parameters_t
int ogs_nas_5gs_encode_extended_drx_parameters(ogs_pkbuf_t *pkbuf, ogs_nas_extended_drx_parameters_t *extended_drx_parameters)
{
- uint16_t size = extended_drx_parameters->length + sizeof(extended_drx_parameters->length);
+ int size = extended_drx_parameters->length + sizeof(extended_drx_parameters->length);
ogs_nas_extended_drx_parameters_t target;
memcpy(&target, extended_drx_parameters, sizeof(ogs_nas_extended_drx_parameters_t));
@@ -1073,9 +1189,13 @@ int ogs_nas_5gs_encode_extended_drx_parameters(ogs_pkbuf_t *pkbuf, ogs_nas_exten
* O TV 1 */
int ogs_nas_5gs_decode_imeisv_request(ogs_nas_imeisv_request_t *imeisv_request, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_imeisv_request_t);
+ int size = sizeof(ogs_nas_imeisv_request_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(imeisv_request, pkbuf->data - size, size);
ogs_trace(" IMEISV_REQUEST - ");
@@ -1086,7 +1206,7 @@ int ogs_nas_5gs_decode_imeisv_request(ogs_nas_imeisv_request_t *imeisv_request,
int ogs_nas_5gs_encode_imeisv_request(ogs_pkbuf_t *pkbuf, ogs_nas_imeisv_request_t *imeisv_request)
{
- uint16_t size = sizeof(ogs_nas_imeisv_request_t);
+ int size = sizeof(ogs_nas_imeisv_request_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, imeisv_request, size);
@@ -1101,13 +1221,17 @@ int ogs_nas_5gs_encode_imeisv_request(ogs_pkbuf_t *pkbuf, ogs_nas_imeisv_request
* O TLV-E 3-811 */
int ogs_nas_5gs_decode_ladn_indication(ogs_nas_ladn_indication_t *ladn_indication, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_ladn_indication_t *source = (ogs_nas_ladn_indication_t *)pkbuf->data;
ladn_indication->length = be16toh(source->length);
size = ladn_indication->length + sizeof(ladn_indication->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
ladn_indication->buffer = pkbuf->data - size + sizeof(ladn_indication->length);
ogs_trace(" LADN_INDICATION - ");
@@ -1118,8 +1242,8 @@ int ogs_nas_5gs_decode_ladn_indication(ogs_nas_ladn_indication_t *ladn_indicatio
int ogs_nas_5gs_encode_ladn_indication(ogs_pkbuf_t *pkbuf, ogs_nas_ladn_indication_t *ladn_indication)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(ladn_indication);
ogs_assert(ladn_indication->buffer);
@@ -1143,13 +1267,17 @@ int ogs_nas_5gs_encode_ladn_indication(ogs_pkbuf_t *pkbuf, ogs_nas_ladn_indicati
* O TLV 3 */
int ogs_nas_5gs_decode_5gs_drx_parameters(ogs_nas_5gs_drx_parameters_t *drx_parameters, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_5gs_drx_parameters_t *source = (ogs_nas_5gs_drx_parameters_t *)pkbuf->data;
drx_parameters->length = source->length;
size = drx_parameters->length + sizeof(drx_parameters->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*drx_parameters) < size) return -1;
memcpy(drx_parameters, pkbuf->data - size, size);
@@ -1161,7 +1289,7 @@ int ogs_nas_5gs_decode_5gs_drx_parameters(ogs_nas_5gs_drx_parameters_t *drx_para
int ogs_nas_5gs_encode_5gs_drx_parameters(ogs_pkbuf_t *pkbuf, ogs_nas_5gs_drx_parameters_t *drx_parameters)
{
- uint16_t size = drx_parameters->length + sizeof(drx_parameters->length);
+ int size = drx_parameters->length + sizeof(drx_parameters->length);
ogs_nas_5gs_drx_parameters_t target;
memcpy(&target, drx_parameters, sizeof(ogs_nas_5gs_drx_parameters_t));
@@ -1178,9 +1306,13 @@ int ogs_nas_5gs_encode_5gs_drx_parameters(ogs_pkbuf_t *pkbuf, ogs_nas_5gs_drx_pa
* M V 1/2 */
int ogs_nas_5gs_decode_5gs_identity_type(ogs_nas_5gs_identity_type_t *identity_type, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_5gs_identity_type_t);
+ int size = sizeof(ogs_nas_5gs_identity_type_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(identity_type, pkbuf->data - size, size);
ogs_trace(" 5GS_IDENTITY_TYPE - ");
@@ -1191,7 +1323,7 @@ int ogs_nas_5gs_decode_5gs_identity_type(ogs_nas_5gs_identity_type_t *identity_t
int ogs_nas_5gs_encode_5gs_identity_type(ogs_pkbuf_t *pkbuf, ogs_nas_5gs_identity_type_t *identity_type)
{
- uint16_t size = sizeof(ogs_nas_5gs_identity_type_t);
+ int size = sizeof(ogs_nas_5gs_identity_type_t);
ogs_nas_5gs_identity_type_t target;
memcpy(&target, identity_type, size);
@@ -1208,13 +1340,17 @@ int ogs_nas_5gs_encode_5gs_identity_type(ogs_pkbuf_t *pkbuf, ogs_nas_5gs_identit
* O TLV-E 12-1715 */
int ogs_nas_5gs_decode_ladn_information(ogs_nas_ladn_information_t *ladn_information, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_ladn_information_t *source = (ogs_nas_ladn_information_t *)pkbuf->data;
ladn_information->length = be16toh(source->length);
size = ladn_information->length + sizeof(ladn_information->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
ladn_information->buffer = pkbuf->data - size + sizeof(ladn_information->length);
ogs_trace(" LADN_INFORMATION - ");
@@ -1225,8 +1361,8 @@ int ogs_nas_5gs_decode_ladn_information(ogs_nas_ladn_information_t *ladn_informa
int ogs_nas_5gs_encode_ladn_information(ogs_pkbuf_t *pkbuf, ogs_nas_ladn_information_t *ladn_information)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(ladn_information);
ogs_assert(ladn_information->buffer);
@@ -1250,9 +1386,13 @@ int ogs_nas_5gs_encode_ladn_information(ogs_pkbuf_t *pkbuf, ogs_nas_ladn_informa
* O TV 1 */
int ogs_nas_5gs_decode_mico_indication(ogs_nas_mico_indication_t *mico_indication, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_mico_indication_t);
+ int size = sizeof(ogs_nas_mico_indication_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(mico_indication, pkbuf->data - size, size);
ogs_trace(" MICO_INDICATION - ");
@@ -1263,7 +1403,7 @@ int ogs_nas_5gs_decode_mico_indication(ogs_nas_mico_indication_t *mico_indicatio
int ogs_nas_5gs_encode_mico_indication(ogs_pkbuf_t *pkbuf, ogs_nas_mico_indication_t *mico_indication)
{
- uint16_t size = sizeof(ogs_nas_mico_indication_t);
+ int size = sizeof(ogs_nas_mico_indication_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, mico_indication, size);
@@ -1278,9 +1418,13 @@ int ogs_nas_5gs_encode_mico_indication(ogs_pkbuf_t *pkbuf, ogs_nas_mico_indicati
* O TV 1 */
int ogs_nas_5gs_decode_ma_pdu_session_information(ogs_nas_ma_pdu_session_information_t *ma_pdu_session_information, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_ma_pdu_session_information_t);
+ int size = sizeof(ogs_nas_ma_pdu_session_information_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(ma_pdu_session_information, pkbuf->data - size, size);
ogs_trace(" MA_PDU_SESSION_INFORMATION - ");
@@ -1291,7 +1435,7 @@ int ogs_nas_5gs_decode_ma_pdu_session_information(ogs_nas_ma_pdu_session_informa
int ogs_nas_5gs_encode_ma_pdu_session_information(ogs_pkbuf_t *pkbuf, ogs_nas_ma_pdu_session_information_t *ma_pdu_session_information)
{
- uint16_t size = sizeof(ogs_nas_ma_pdu_session_information_t);
+ int size = sizeof(ogs_nas_ma_pdu_session_information_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, ma_pdu_session_information, size);
@@ -1306,13 +1450,17 @@ int ogs_nas_5gs_encode_ma_pdu_session_information(ogs_pkbuf_t *pkbuf, ogs_nas_ma
* O TLV 3-42 */
int ogs_nas_5gs_decode_mapped_nssai(ogs_nas_mapped_nssai_t *mapped_nssai, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_mapped_nssai_t *source = (ogs_nas_mapped_nssai_t *)pkbuf->data;
mapped_nssai->length = source->length;
size = mapped_nssai->length + sizeof(mapped_nssai->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*mapped_nssai) < size) return -1;
memcpy(mapped_nssai, pkbuf->data - size, size);
@@ -1324,7 +1472,7 @@ int ogs_nas_5gs_decode_mapped_nssai(ogs_nas_mapped_nssai_t *mapped_nssai, ogs_pk
int ogs_nas_5gs_encode_mapped_nssai(ogs_pkbuf_t *pkbuf, ogs_nas_mapped_nssai_t *mapped_nssai)
{
- uint16_t size = mapped_nssai->length + sizeof(mapped_nssai->length);
+ int size = mapped_nssai->length + sizeof(mapped_nssai->length);
ogs_nas_mapped_nssai_t target;
memcpy(&target, mapped_nssai, sizeof(ogs_nas_mapped_nssai_t));
@@ -1341,13 +1489,17 @@ int ogs_nas_5gs_encode_mapped_nssai(ogs_pkbuf_t *pkbuf, ogs_nas_mapped_nssai_t *
* O TLV 5 */
int ogs_nas_5gs_decode_mobile_station_classmark_2(ogs_nas_mobile_station_classmark_2_t *mobile_station_classmark_2, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_mobile_station_classmark_2_t *source = (ogs_nas_mobile_station_classmark_2_t *)pkbuf->data;
mobile_station_classmark_2->length = source->length;
size = mobile_station_classmark_2->length + sizeof(mobile_station_classmark_2->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*mobile_station_classmark_2) < size) return -1;
memcpy(mobile_station_classmark_2, pkbuf->data - size, size);
@@ -1359,7 +1511,7 @@ int ogs_nas_5gs_decode_mobile_station_classmark_2(ogs_nas_mobile_station_classma
int ogs_nas_5gs_encode_mobile_station_classmark_2(ogs_pkbuf_t *pkbuf, ogs_nas_mobile_station_classmark_2_t *mobile_station_classmark_2)
{
- uint16_t size = mobile_station_classmark_2->length + sizeof(mobile_station_classmark_2->length);
+ int size = mobile_station_classmark_2->length + sizeof(mobile_station_classmark_2->length);
ogs_nas_mobile_station_classmark_2_t target;
memcpy(&target, mobile_station_classmark_2, sizeof(ogs_nas_mobile_station_classmark_2_t));
@@ -1376,9 +1528,13 @@ int ogs_nas_5gs_encode_mobile_station_classmark_2(ogs_pkbuf_t *pkbuf, ogs_nas_mo
* O TV 1 */
int ogs_nas_5gs_decode_key_set_identifier(ogs_nas_key_set_identifier_t *key_set_identifier, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_key_set_identifier_t);
+ int size = sizeof(ogs_nas_key_set_identifier_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(key_set_identifier, pkbuf->data - size, size);
ogs_trace(" KEY_SET_IDENTIFIER - ");
@@ -1389,7 +1545,7 @@ int ogs_nas_5gs_decode_key_set_identifier(ogs_nas_key_set_identifier_t *key_set_
int ogs_nas_5gs_encode_key_set_identifier(ogs_pkbuf_t *pkbuf, ogs_nas_key_set_identifier_t *key_set_identifier)
{
- uint16_t size = sizeof(ogs_nas_key_set_identifier_t);
+ int size = sizeof(ogs_nas_key_set_identifier_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, key_set_identifier, size);
@@ -1404,13 +1560,17 @@ int ogs_nas_5gs_encode_key_set_identifier(ogs_pkbuf_t *pkbuf, ogs_nas_key_set_id
* O TLV-E 4-n */
int ogs_nas_5gs_decode_message_container(ogs_nas_message_container_t *message_container, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_message_container_t *source = (ogs_nas_message_container_t *)pkbuf->data;
message_container->length = be16toh(source->length);
size = message_container->length + sizeof(message_container->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
message_container->buffer = pkbuf->data - size + sizeof(message_container->length);
ogs_trace(" MESSAGE_CONTAINER - ");
@@ -1421,8 +1581,8 @@ int ogs_nas_5gs_decode_message_container(ogs_nas_message_container_t *message_co
int ogs_nas_5gs_encode_message_container(ogs_pkbuf_t *pkbuf, ogs_nas_message_container_t *message_container)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(message_container);
ogs_assert(message_container->buffer);
@@ -1446,9 +1606,13 @@ int ogs_nas_5gs_encode_message_container(ogs_pkbuf_t *pkbuf, ogs_nas_message_con
* M V 1 */
int ogs_nas_5gs_decode_security_algorithms(ogs_nas_security_algorithms_t *security_algorithms, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_security_algorithms_t);
+ int size = sizeof(ogs_nas_security_algorithms_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(security_algorithms, pkbuf->data - size, size);
ogs_trace(" SECURITY_ALGORITHMS - ");
@@ -1459,7 +1623,7 @@ int ogs_nas_5gs_decode_security_algorithms(ogs_nas_security_algorithms_t *securi
int ogs_nas_5gs_encode_security_algorithms(ogs_pkbuf_t *pkbuf, ogs_nas_security_algorithms_t *security_algorithms)
{
- uint16_t size = sizeof(ogs_nas_security_algorithms_t);
+ int size = sizeof(ogs_nas_security_algorithms_t);
ogs_nas_security_algorithms_t target;
memcpy(&target, security_algorithms, size);
@@ -1476,13 +1640,17 @@ int ogs_nas_5gs_encode_security_algorithms(ogs_pkbuf_t *pkbuf, ogs_nas_security_
* O TLV 3-n */
int ogs_nas_5gs_decode_network_name(ogs_nas_network_name_t *network_name, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_network_name_t *source = (ogs_nas_network_name_t *)pkbuf->data;
network_name->length = source->length;
size = network_name->length + sizeof(network_name->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*network_name) < size) return -1;
memcpy(network_name, pkbuf->data - size, size);
@@ -1494,7 +1662,7 @@ int ogs_nas_5gs_decode_network_name(ogs_nas_network_name_t *network_name, ogs_pk
int ogs_nas_5gs_encode_network_name(ogs_pkbuf_t *pkbuf, ogs_nas_network_name_t *network_name)
{
- uint16_t size = network_name->length + sizeof(network_name->length);
+ int size = network_name->length + sizeof(network_name->length);
ogs_nas_network_name_t target;
memcpy(&target, network_name, sizeof(ogs_nas_network_name_t));
@@ -1511,9 +1679,13 @@ int ogs_nas_5gs_encode_network_name(ogs_pkbuf_t *pkbuf, ogs_nas_network_name_t *
* O TV 1 */
int ogs_nas_5gs_decode_network_slicing_indication(ogs_nas_network_slicing_indication_t *network_slicing_indication, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_network_slicing_indication_t);
+ int size = sizeof(ogs_nas_network_slicing_indication_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(network_slicing_indication, pkbuf->data - size, size);
ogs_trace(" NETWORK_SLICING_INDICATION - ");
@@ -1524,7 +1696,7 @@ int ogs_nas_5gs_decode_network_slicing_indication(ogs_nas_network_slicing_indica
int ogs_nas_5gs_encode_network_slicing_indication(ogs_pkbuf_t *pkbuf, ogs_nas_network_slicing_indication_t *network_slicing_indication)
{
- uint16_t size = sizeof(ogs_nas_network_slicing_indication_t);
+ int size = sizeof(ogs_nas_network_slicing_indication_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, network_slicing_indication, size);
@@ -1539,9 +1711,13 @@ int ogs_nas_5gs_encode_network_slicing_indication(ogs_pkbuf_t *pkbuf, ogs_nas_ne
* O TV 1 */
int ogs_nas_5gs_decode_non_3gpp_nw_provided_policies(ogs_nas_non_3gpp_nw_provided_policies_t *non_3gpp_nw_provided_policies, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_non_3gpp_nw_provided_policies_t);
+ int size = sizeof(ogs_nas_non_3gpp_nw_provided_policies_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(non_3gpp_nw_provided_policies, pkbuf->data - size, size);
ogs_trace(" NON_3GPP_NW_PROVIDED_POLICIES - ");
@@ -1552,7 +1728,7 @@ int ogs_nas_5gs_decode_non_3gpp_nw_provided_policies(ogs_nas_non_3gpp_nw_provide
int ogs_nas_5gs_encode_non_3gpp_nw_provided_policies(ogs_pkbuf_t *pkbuf, ogs_nas_non_3gpp_nw_provided_policies_t *non_3gpp_nw_provided_policies)
{
- uint16_t size = sizeof(ogs_nas_non_3gpp_nw_provided_policies_t);
+ int size = sizeof(ogs_nas_non_3gpp_nw_provided_policies_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, non_3gpp_nw_provided_policies, size);
@@ -1567,13 +1743,17 @@ int ogs_nas_5gs_encode_non_3gpp_nw_provided_policies(ogs_pkbuf_t *pkbuf, ogs_nas
* O TLV 4-74 */
int ogs_nas_5gs_decode_nssai(ogs_nas_nssai_t *nssai, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_nssai_t *source = (ogs_nas_nssai_t *)pkbuf->data;
nssai->length = source->length;
size = nssai->length + sizeof(nssai->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*nssai) < size) return -1;
memcpy(nssai, pkbuf->data - size, size);
@@ -1585,7 +1765,7 @@ int ogs_nas_5gs_decode_nssai(ogs_nas_nssai_t *nssai, ogs_pkbuf_t *pkbuf)
int ogs_nas_5gs_encode_nssai(ogs_pkbuf_t *pkbuf, ogs_nas_nssai_t *nssai)
{
- uint16_t size = nssai->length + sizeof(nssai->length);
+ int size = nssai->length + sizeof(nssai->length);
ogs_nas_nssai_t target;
memcpy(&target, nssai, sizeof(ogs_nas_nssai_t));
@@ -1602,9 +1782,13 @@ int ogs_nas_5gs_encode_nssai(ogs_pkbuf_t *pkbuf, ogs_nas_nssai_t *nssai)
* O TV 1 */
int ogs_nas_5gs_decode_nssai_inclusion_mode(ogs_nas_nssai_inclusion_mode_t *nssai_inclusion_mode, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_nssai_inclusion_mode_t);
+ int size = sizeof(ogs_nas_nssai_inclusion_mode_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(nssai_inclusion_mode, pkbuf->data - size, size);
ogs_trace(" NSSAI_INCLUSION_MODE - ");
@@ -1615,7 +1799,7 @@ int ogs_nas_5gs_decode_nssai_inclusion_mode(ogs_nas_nssai_inclusion_mode_t *nssa
int ogs_nas_5gs_encode_nssai_inclusion_mode(ogs_pkbuf_t *pkbuf, ogs_nas_nssai_inclusion_mode_t *nssai_inclusion_mode)
{
- uint16_t size = sizeof(ogs_nas_nssai_inclusion_mode_t);
+ int size = sizeof(ogs_nas_nssai_inclusion_mode_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, nssai_inclusion_mode, size);
@@ -1630,13 +1814,17 @@ int ogs_nas_5gs_encode_nssai_inclusion_mode(ogs_pkbuf_t *pkbuf, ogs_nas_nssai_in
* O TLV-E 3-n */
int ogs_nas_5gs_decode_operator_defined_access_category_definitions(ogs_nas_operator_defined_access_category_definitions_t *operator_defined_access_category_definitions, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_operator_defined_access_category_definitions_t *source = (ogs_nas_operator_defined_access_category_definitions_t *)pkbuf->data;
operator_defined_access_category_definitions->length = be16toh(source->length);
size = operator_defined_access_category_definitions->length + sizeof(operator_defined_access_category_definitions->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
operator_defined_access_category_definitions->buffer = pkbuf->data - size + sizeof(operator_defined_access_category_definitions->length);
ogs_trace(" OPERATOR_DEFINED_ACCESS_CATEGORY_DEFINITIONS - ");
@@ -1647,8 +1835,8 @@ int ogs_nas_5gs_decode_operator_defined_access_category_definitions(ogs_nas_oper
int ogs_nas_5gs_encode_operator_defined_access_category_definitions(ogs_pkbuf_t *pkbuf, ogs_nas_operator_defined_access_category_definitions_t *operator_defined_access_category_definitions)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(operator_defined_access_category_definitions);
ogs_assert(operator_defined_access_category_definitions->buffer);
@@ -1672,13 +1860,17 @@ int ogs_nas_5gs_encode_operator_defined_access_category_definitions(ogs_pkbuf_t
* O TLV-E 4-65538 */
int ogs_nas_5gs_decode_payload_container(ogs_nas_payload_container_t *payload_container, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_payload_container_t *source = (ogs_nas_payload_container_t *)pkbuf->data;
payload_container->length = be16toh(source->length);
size = payload_container->length + sizeof(payload_container->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
payload_container->buffer = pkbuf->data - size + sizeof(payload_container->length);
ogs_trace(" PAYLOAD_CONTAINER - ");
@@ -1689,8 +1881,8 @@ int ogs_nas_5gs_decode_payload_container(ogs_nas_payload_container_t *payload_co
int ogs_nas_5gs_encode_payload_container(ogs_pkbuf_t *pkbuf, ogs_nas_payload_container_t *payload_container)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(payload_container);
ogs_assert(payload_container->buffer);
@@ -1714,13 +1906,17 @@ int ogs_nas_5gs_encode_payload_container(ogs_pkbuf_t *pkbuf, ogs_nas_payload_con
* M LV-E 6-n */
int ogs_nas_5gs_decode_5gs_mobile_identity(ogs_nas_5gs_mobile_identity_t *mobile_identity, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_5gs_mobile_identity_t *source = (ogs_nas_5gs_mobile_identity_t *)pkbuf->data;
mobile_identity->length = be16toh(source->length);
size = mobile_identity->length + sizeof(mobile_identity->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
mobile_identity->buffer = pkbuf->data - size + sizeof(mobile_identity->length);
ogs_trace(" 5GS_MOBILE_IDENTITY - ");
@@ -1731,8 +1927,8 @@ int ogs_nas_5gs_decode_5gs_mobile_identity(ogs_nas_5gs_mobile_identity_t *mobile
int ogs_nas_5gs_encode_5gs_mobile_identity(ogs_pkbuf_t *pkbuf, ogs_nas_5gs_mobile_identity_t *mobile_identity)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(mobile_identity);
ogs_assert(mobile_identity->buffer);
@@ -1756,9 +1952,13 @@ int ogs_nas_5gs_encode_5gs_mobile_identity(ogs_pkbuf_t *pkbuf, ogs_nas_5gs_mobil
* O TV 1 */
int ogs_nas_5gs_decode_payload_container_type(ogs_nas_payload_container_type_t *payload_container_type, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_payload_container_type_t);
+ int size = sizeof(ogs_nas_payload_container_type_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(payload_container_type, pkbuf->data - size, size);
ogs_trace(" PAYLOAD_CONTAINER_TYPE - ");
@@ -1769,7 +1969,7 @@ int ogs_nas_5gs_decode_payload_container_type(ogs_nas_payload_container_type_t *
int ogs_nas_5gs_encode_payload_container_type(ogs_pkbuf_t *pkbuf, ogs_nas_payload_container_type_t *payload_container_type)
{
- uint16_t size = sizeof(ogs_nas_payload_container_type_t);
+ int size = sizeof(ogs_nas_payload_container_type_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, payload_container_type, size);
@@ -1784,9 +1984,13 @@ int ogs_nas_5gs_encode_payload_container_type(ogs_pkbuf_t *pkbuf, ogs_nas_payloa
* C TV 2 */
int ogs_nas_5gs_decode_pdu_session_identity_2(ogs_nas_pdu_session_identity_2_t *pdu_session_identity_2, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_pdu_session_identity_2_t);
+ int size = sizeof(ogs_nas_pdu_session_identity_2_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(pdu_session_identity_2, pkbuf->data - size, size);
ogs_trace(" PDU_SESSION_IDENTITY_2 - ");
@@ -1797,7 +2001,7 @@ int ogs_nas_5gs_decode_pdu_session_identity_2(ogs_nas_pdu_session_identity_2_t *
int ogs_nas_5gs_encode_pdu_session_identity_2(ogs_pkbuf_t *pkbuf, ogs_nas_pdu_session_identity_2_t *pdu_session_identity_2)
{
- uint16_t size = sizeof(ogs_nas_pdu_session_identity_2_t);
+ int size = sizeof(ogs_nas_pdu_session_identity_2_t);
ogs_nas_pdu_session_identity_2_t target;
memcpy(&target, pdu_session_identity_2, size);
@@ -1814,13 +2018,17 @@ int ogs_nas_5gs_encode_pdu_session_identity_2(ogs_pkbuf_t *pkbuf, ogs_nas_pdu_se
* O TLV 4-34 */
int ogs_nas_5gs_decode_pdu_session_reactivation_result(ogs_nas_pdu_session_reactivation_result_t *pdu_session_reactivation_result, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_pdu_session_reactivation_result_t *source = (ogs_nas_pdu_session_reactivation_result_t *)pkbuf->data;
pdu_session_reactivation_result->length = source->length;
size = pdu_session_reactivation_result->length + sizeof(pdu_session_reactivation_result->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*pdu_session_reactivation_result) < size) return -1;
memcpy(pdu_session_reactivation_result, pkbuf->data - size, size);
@@ -1834,7 +2042,7 @@ int ogs_nas_5gs_decode_pdu_session_reactivation_result(ogs_nas_pdu_session_react
int ogs_nas_5gs_encode_pdu_session_reactivation_result(ogs_pkbuf_t *pkbuf, ogs_nas_pdu_session_reactivation_result_t *pdu_session_reactivation_result)
{
- uint16_t size = pdu_session_reactivation_result->length + sizeof(pdu_session_reactivation_result->length);
+ int size = pdu_session_reactivation_result->length + sizeof(pdu_session_reactivation_result->length);
ogs_nas_pdu_session_reactivation_result_t target;
memcpy(&target, pdu_session_reactivation_result, sizeof(ogs_nas_pdu_session_reactivation_result_t));
@@ -1853,13 +2061,17 @@ int ogs_nas_5gs_encode_pdu_session_reactivation_result(ogs_pkbuf_t *pkbuf, ogs_n
* O TLV-E 5-515 */
int ogs_nas_5gs_decode_pdu_session_reactivation_result_error_cause(ogs_nas_pdu_session_reactivation_result_error_cause_t *pdu_session_reactivation_result_error_cause, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_pdu_session_reactivation_result_error_cause_t *source = (ogs_nas_pdu_session_reactivation_result_error_cause_t *)pkbuf->data;
pdu_session_reactivation_result_error_cause->length = be16toh(source->length);
size = pdu_session_reactivation_result_error_cause->length + sizeof(pdu_session_reactivation_result_error_cause->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
pdu_session_reactivation_result_error_cause->buffer = pkbuf->data - size + sizeof(pdu_session_reactivation_result_error_cause->length);
ogs_trace(" PDU_SESSION_REACTIVATION_RESULT_ERROR_CAUSE - ");
@@ -1870,8 +2082,8 @@ int ogs_nas_5gs_decode_pdu_session_reactivation_result_error_cause(ogs_nas_pdu_s
int ogs_nas_5gs_encode_pdu_session_reactivation_result_error_cause(ogs_pkbuf_t *pkbuf, ogs_nas_pdu_session_reactivation_result_error_cause_t *pdu_session_reactivation_result_error_cause)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(pdu_session_reactivation_result_error_cause);
ogs_assert(pdu_session_reactivation_result_error_cause->buffer);
@@ -1895,13 +2107,17 @@ int ogs_nas_5gs_encode_pdu_session_reactivation_result_error_cause(ogs_pkbuf_t *
* O TLV 4-34 */
int ogs_nas_5gs_decode_pdu_session_status(ogs_nas_pdu_session_status_t *pdu_session_status, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_pdu_session_status_t *source = (ogs_nas_pdu_session_status_t *)pkbuf->data;
pdu_session_status->length = source->length;
size = pdu_session_status->length + sizeof(pdu_session_status->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*pdu_session_status) < size) return -1;
memcpy(pdu_session_status, pkbuf->data - size, size);
@@ -1915,7 +2131,7 @@ int ogs_nas_5gs_decode_pdu_session_status(ogs_nas_pdu_session_status_t *pdu_sess
int ogs_nas_5gs_encode_pdu_session_status(ogs_pkbuf_t *pkbuf, ogs_nas_pdu_session_status_t *pdu_session_status)
{
- uint16_t size = pdu_session_status->length + sizeof(pdu_session_status->length);
+ int size = pdu_session_status->length + sizeof(pdu_session_status->length);
ogs_nas_pdu_session_status_t target;
memcpy(&target, pdu_session_status, sizeof(ogs_nas_pdu_session_status_t));
@@ -1934,13 +2150,17 @@ int ogs_nas_5gs_encode_pdu_session_status(ogs_pkbuf_t *pkbuf, ogs_nas_pdu_sessio
* O TLV 5-47 */
int ogs_nas_5gs_decode_plmn_list(ogs_nas_plmn_list_t *plmn_list, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_plmn_list_t *source = (ogs_nas_plmn_list_t *)pkbuf->data;
plmn_list->length = source->length;
size = plmn_list->length + sizeof(plmn_list->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*plmn_list) < size) return -1;
memcpy(plmn_list, pkbuf->data - size, size);
@@ -1952,7 +2172,7 @@ int ogs_nas_5gs_decode_plmn_list(ogs_nas_plmn_list_t *plmn_list, ogs_pkbuf_t *pk
int ogs_nas_5gs_encode_plmn_list(ogs_pkbuf_t *pkbuf, ogs_nas_plmn_list_t *plmn_list)
{
- uint16_t size = plmn_list->length + sizeof(plmn_list->length);
+ int size = plmn_list->length + sizeof(plmn_list->length);
ogs_nas_plmn_list_t target;
memcpy(&target, plmn_list, sizeof(ogs_nas_plmn_list_t));
@@ -1969,13 +2189,17 @@ int ogs_nas_5gs_encode_plmn_list(ogs_pkbuf_t *pkbuf, ogs_nas_plmn_list_t *plmn_l
* O TLV 4-42 */
int ogs_nas_5gs_decode_rejected_nssai(ogs_nas_rejected_nssai_t *rejected_nssai, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_rejected_nssai_t *source = (ogs_nas_rejected_nssai_t *)pkbuf->data;
rejected_nssai->length = source->length;
size = rejected_nssai->length + sizeof(rejected_nssai->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*rejected_nssai) < size) return -1;
memcpy(rejected_nssai, pkbuf->data - size, size);
@@ -1987,7 +2211,7 @@ int ogs_nas_5gs_decode_rejected_nssai(ogs_nas_rejected_nssai_t *rejected_nssai,
int ogs_nas_5gs_encode_rejected_nssai(ogs_pkbuf_t *pkbuf, ogs_nas_rejected_nssai_t *rejected_nssai)
{
- uint16_t size = rejected_nssai->length + sizeof(rejected_nssai->length);
+ int size = rejected_nssai->length + sizeof(rejected_nssai->length);
ogs_nas_rejected_nssai_t target;
memcpy(&target, rejected_nssai, sizeof(ogs_nas_rejected_nssai_t));
@@ -2004,9 +2228,13 @@ int ogs_nas_5gs_encode_rejected_nssai(ogs_pkbuf_t *pkbuf, ogs_nas_rejected_nssai
* O TV 1 */
int ogs_nas_5gs_decode_release_assistance_indication(ogs_nas_release_assistance_indication_t *release_assistance_indication, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_release_assistance_indication_t);
+ int size = sizeof(ogs_nas_release_assistance_indication_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(release_assistance_indication, pkbuf->data - size, size);
ogs_trace(" RELEASE_ASSISTANCE_INDICATION - ");
@@ -2017,7 +2245,7 @@ int ogs_nas_5gs_decode_release_assistance_indication(ogs_nas_release_assistance_
int ogs_nas_5gs_encode_release_assistance_indication(ogs_pkbuf_t *pkbuf, ogs_nas_release_assistance_indication_t *release_assistance_indication)
{
- uint16_t size = sizeof(ogs_nas_release_assistance_indication_t);
+ int size = sizeof(ogs_nas_release_assistance_indication_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, release_assistance_indication, size);
@@ -2032,9 +2260,13 @@ int ogs_nas_5gs_encode_release_assistance_indication(ogs_pkbuf_t *pkbuf, ogs_nas
* O TV 1 */
int ogs_nas_5gs_decode_request_type(ogs_nas_request_type_t *request_type, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_request_type_t);
+ int size = sizeof(ogs_nas_request_type_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(request_type, pkbuf->data - size, size);
ogs_trace(" REQUEST_TYPE - ");
@@ -2045,7 +2277,7 @@ int ogs_nas_5gs_decode_request_type(ogs_nas_request_type_t *request_type, ogs_pk
int ogs_nas_5gs_encode_request_type(ogs_pkbuf_t *pkbuf, ogs_nas_request_type_t *request_type)
{
- uint16_t size = sizeof(ogs_nas_request_type_t);
+ int size = sizeof(ogs_nas_request_type_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, request_type, size);
@@ -2060,13 +2292,17 @@ int ogs_nas_5gs_encode_request_type(ogs_pkbuf_t *pkbuf, ogs_nas_request_type_t *
* O TLV 4-15 */
int ogs_nas_5gs_decode_s1_ue_network_capability(ogs_nas_s1_ue_network_capability_t *s1_ue_network_capability, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_s1_ue_network_capability_t *source = (ogs_nas_s1_ue_network_capability_t *)pkbuf->data;
s1_ue_network_capability->length = source->length;
size = s1_ue_network_capability->length + sizeof(s1_ue_network_capability->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*s1_ue_network_capability) < size) return -1;
memcpy(s1_ue_network_capability, pkbuf->data - size, size);
@@ -2078,7 +2314,7 @@ int ogs_nas_5gs_decode_s1_ue_network_capability(ogs_nas_s1_ue_network_capability
int ogs_nas_5gs_encode_s1_ue_network_capability(ogs_pkbuf_t *pkbuf, ogs_nas_s1_ue_network_capability_t *s1_ue_network_capability)
{
- uint16_t size = s1_ue_network_capability->length + sizeof(s1_ue_network_capability->length);
+ int size = s1_ue_network_capability->length + sizeof(s1_ue_network_capability->length);
ogs_nas_s1_ue_network_capability_t target;
memcpy(&target, s1_ue_network_capability, sizeof(ogs_nas_s1_ue_network_capability_t));
@@ -2095,13 +2331,17 @@ int ogs_nas_5gs_encode_s1_ue_network_capability(ogs_pkbuf_t *pkbuf, ogs_nas_s1_u
* O TLV 4-7 */
int ogs_nas_5gs_decode_s1_ue_security_capability(ogs_nas_s1_ue_security_capability_t *s1_ue_security_capability, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_s1_ue_security_capability_t *source = (ogs_nas_s1_ue_security_capability_t *)pkbuf->data;
s1_ue_security_capability->length = source->length;
size = s1_ue_security_capability->length + sizeof(s1_ue_security_capability->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*s1_ue_security_capability) < size) return -1;
memcpy(s1_ue_security_capability, pkbuf->data - size, size);
@@ -2113,7 +2353,7 @@ int ogs_nas_5gs_decode_s1_ue_security_capability(ogs_nas_s1_ue_security_capabili
int ogs_nas_5gs_encode_s1_ue_security_capability(ogs_pkbuf_t *pkbuf, ogs_nas_s1_ue_security_capability_t *s1_ue_security_capability)
{
- uint16_t size = s1_ue_security_capability->length + sizeof(s1_ue_security_capability->length);
+ int size = s1_ue_security_capability->length + sizeof(s1_ue_security_capability->length);
ogs_nas_s1_ue_security_capability_t target;
memcpy(&target, s1_ue_security_capability, sizeof(ogs_nas_s1_ue_security_capability_t));
@@ -2130,13 +2370,17 @@ int ogs_nas_5gs_encode_s1_ue_security_capability(ogs_pkbuf_t *pkbuf, ogs_nas_s1_
* O TLV 6-114 */
int ogs_nas_5gs_decode_service_area_list(ogs_nas_service_area_list_t *service_area_list, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_service_area_list_t *source = (ogs_nas_service_area_list_t *)pkbuf->data;
service_area_list->length = source->length;
size = service_area_list->length + sizeof(service_area_list->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*service_area_list) < size) return -1;
memcpy(service_area_list, pkbuf->data - size, size);
@@ -2148,7 +2392,7 @@ int ogs_nas_5gs_decode_service_area_list(ogs_nas_service_area_list_t *service_ar
int ogs_nas_5gs_encode_service_area_list(ogs_pkbuf_t *pkbuf, ogs_nas_service_area_list_t *service_area_list)
{
- uint16_t size = service_area_list->length + sizeof(service_area_list->length);
+ int size = service_area_list->length + sizeof(service_area_list->length);
ogs_nas_service_area_list_t target;
memcpy(&target, service_area_list, sizeof(ogs_nas_service_area_list_t));
@@ -2165,13 +2409,17 @@ int ogs_nas_5gs_encode_service_area_list(ogs_pkbuf_t *pkbuf, ogs_nas_service_are
* O TLV 3-5 */
int ogs_nas_5gs_decode_5gs_network_feature_support(ogs_nas_5gs_network_feature_support_t *network_feature_support, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_5gs_network_feature_support_t *source = (ogs_nas_5gs_network_feature_support_t *)pkbuf->data;
network_feature_support->length = source->length;
size = network_feature_support->length + sizeof(network_feature_support->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*network_feature_support) < size) return -1;
memcpy(network_feature_support, pkbuf->data - size, size);
@@ -2183,7 +2431,7 @@ int ogs_nas_5gs_decode_5gs_network_feature_support(ogs_nas_5gs_network_feature_s
int ogs_nas_5gs_encode_5gs_network_feature_support(ogs_pkbuf_t *pkbuf, ogs_nas_5gs_network_feature_support_t *network_feature_support)
{
- uint16_t size = network_feature_support->length + sizeof(network_feature_support->length);
+ int size = network_feature_support->length + sizeof(network_feature_support->length);
ogs_nas_5gs_network_feature_support_t target;
memcpy(&target, network_feature_support, sizeof(ogs_nas_5gs_network_feature_support_t));
@@ -2200,9 +2448,13 @@ int ogs_nas_5gs_encode_5gs_network_feature_support(ogs_pkbuf_t *pkbuf, ogs_nas_5
* O TV 1 */
int ogs_nas_5gs_decode_sms_indication(ogs_nas_sms_indication_t *sms_indication, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_sms_indication_t);
+ int size = sizeof(ogs_nas_sms_indication_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(sms_indication, pkbuf->data - size, size);
ogs_trace(" SMS_INDICATION - ");
@@ -2213,7 +2465,7 @@ int ogs_nas_5gs_decode_sms_indication(ogs_nas_sms_indication_t *sms_indication,
int ogs_nas_5gs_encode_sms_indication(ogs_pkbuf_t *pkbuf, ogs_nas_sms_indication_t *sms_indication)
{
- uint16_t size = sizeof(ogs_nas_sms_indication_t);
+ int size = sizeof(ogs_nas_sms_indication_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, sms_indication, size);
@@ -2228,13 +2480,17 @@ int ogs_nas_5gs_encode_sms_indication(ogs_pkbuf_t *pkbuf, ogs_nas_sms_indication
* O TLV-E 20-n */
int ogs_nas_5gs_decode_sor_transparent_container(ogs_nas_sor_transparent_container_t *sor_transparent_container, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_sor_transparent_container_t *source = (ogs_nas_sor_transparent_container_t *)pkbuf->data;
sor_transparent_container->length = be16toh(source->length);
size = sor_transparent_container->length + sizeof(sor_transparent_container->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
sor_transparent_container->buffer = pkbuf->data - size + sizeof(sor_transparent_container->length);
ogs_trace(" SOR_TRANSPARENT_CONTAINER - ");
@@ -2245,8 +2501,8 @@ int ogs_nas_5gs_decode_sor_transparent_container(ogs_nas_sor_transparent_contain
int ogs_nas_5gs_encode_sor_transparent_container(ogs_pkbuf_t *pkbuf, ogs_nas_sor_transparent_container_t *sor_transparent_container)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(sor_transparent_container);
ogs_assert(sor_transparent_container->buffer);
@@ -2270,13 +2526,17 @@ int ogs_nas_5gs_encode_sor_transparent_container(ogs_pkbuf_t *pkbuf, ogs_nas_sor
* O TLV 5-n */
int ogs_nas_5gs_decode_supported_codec_list(ogs_nas_supported_codec_list_t *supported_codec_list, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_supported_codec_list_t *source = (ogs_nas_supported_codec_list_t *)pkbuf->data;
supported_codec_list->length = source->length;
size = supported_codec_list->length + sizeof(supported_codec_list->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*supported_codec_list) < size) return -1;
memcpy(supported_codec_list, pkbuf->data - size, size);
@@ -2288,7 +2548,7 @@ int ogs_nas_5gs_decode_supported_codec_list(ogs_nas_supported_codec_list_t *supp
int ogs_nas_5gs_encode_supported_codec_list(ogs_pkbuf_t *pkbuf, ogs_nas_supported_codec_list_t *supported_codec_list)
{
- uint16_t size = supported_codec_list->length + sizeof(supported_codec_list->length);
+ int size = supported_codec_list->length + sizeof(supported_codec_list->length);
ogs_nas_supported_codec_list_t target;
memcpy(&target, supported_codec_list, sizeof(ogs_nas_supported_codec_list_t));
@@ -2305,9 +2565,13 @@ int ogs_nas_5gs_encode_supported_codec_list(ogs_pkbuf_t *pkbuf, ogs_nas_supporte
* O TV 2 */
int ogs_nas_5gs_decode_time_zone(ogs_nas_time_zone_t *time_zone, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_time_zone_t);
+ int size = sizeof(ogs_nas_time_zone_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(time_zone, pkbuf->data - size, size);
ogs_trace(" TIME_ZONE - ");
@@ -2318,7 +2582,7 @@ int ogs_nas_5gs_decode_time_zone(ogs_nas_time_zone_t *time_zone, ogs_pkbuf_t *pk
int ogs_nas_5gs_encode_time_zone(ogs_pkbuf_t *pkbuf, ogs_nas_time_zone_t *time_zone)
{
- uint16_t size = sizeof(ogs_nas_time_zone_t);
+ int size = sizeof(ogs_nas_time_zone_t);
ogs_nas_time_zone_t target;
memcpy(&target, time_zone, size);
@@ -2335,9 +2599,13 @@ int ogs_nas_5gs_encode_time_zone(ogs_pkbuf_t *pkbuf, ogs_nas_time_zone_t *time_z
* O TV 8 */
int ogs_nas_5gs_decode_time_zone_and_time(ogs_nas_time_zone_and_time_t *time_zone_and_time, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_time_zone_and_time_t);
+ int size = sizeof(ogs_nas_time_zone_and_time_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(time_zone_and_time, pkbuf->data - size, size);
ogs_trace(" TIME_ZONE_AND_TIME - ");
@@ -2348,7 +2616,7 @@ int ogs_nas_5gs_decode_time_zone_and_time(ogs_nas_time_zone_and_time_t *time_zon
int ogs_nas_5gs_encode_time_zone_and_time(ogs_pkbuf_t *pkbuf, ogs_nas_time_zone_and_time_t *time_zone_and_time)
{
- uint16_t size = sizeof(ogs_nas_time_zone_and_time_t);
+ int size = sizeof(ogs_nas_time_zone_and_time_t);
ogs_nas_time_zone_and_time_t target;
memcpy(&target, time_zone_and_time, size);
@@ -2365,13 +2633,17 @@ int ogs_nas_5gs_encode_time_zone_and_time(ogs_pkbuf_t *pkbuf, ogs_nas_time_zone_
* O TLV 4-10 */
int ogs_nas_5gs_decode_ue_security_capability(ogs_nas_ue_security_capability_t *ue_security_capability, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_ue_security_capability_t *source = (ogs_nas_ue_security_capability_t *)pkbuf->data;
ue_security_capability->length = source->length;
size = ue_security_capability->length + sizeof(ue_security_capability->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*ue_security_capability) < size) return -1;
memcpy(ue_security_capability, pkbuf->data - size, size);
@@ -2383,7 +2655,7 @@ int ogs_nas_5gs_decode_ue_security_capability(ogs_nas_ue_security_capability_t *
int ogs_nas_5gs_encode_ue_security_capability(ogs_pkbuf_t *pkbuf, ogs_nas_ue_security_capability_t *ue_security_capability)
{
- uint16_t size = ue_security_capability->length + sizeof(ue_security_capability->length);
+ int size = ue_security_capability->length + sizeof(ue_security_capability->length);
ogs_nas_ue_security_capability_t target;
memcpy(&target, ue_security_capability, sizeof(ogs_nas_ue_security_capability_t));
@@ -2400,13 +2672,17 @@ int ogs_nas_5gs_encode_ue_security_capability(ogs_pkbuf_t *pkbuf, ogs_nas_ue_sec
* O TLV 3 */
int ogs_nas_5gs_decode_ue_usage_setting(ogs_nas_ue_usage_setting_t *ue_usage_setting, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_ue_usage_setting_t *source = (ogs_nas_ue_usage_setting_t *)pkbuf->data;
ue_usage_setting->length = source->length;
size = ue_usage_setting->length + sizeof(ue_usage_setting->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*ue_usage_setting) < size) return -1;
memcpy(ue_usage_setting, pkbuf->data - size, size);
@@ -2418,7 +2694,7 @@ int ogs_nas_5gs_decode_ue_usage_setting(ogs_nas_ue_usage_setting_t *ue_usage_set
int ogs_nas_5gs_encode_ue_usage_setting(ogs_pkbuf_t *pkbuf, ogs_nas_ue_usage_setting_t *ue_usage_setting)
{
- uint16_t size = ue_usage_setting->length + sizeof(ue_usage_setting->length);
+ int size = ue_usage_setting->length + sizeof(ue_usage_setting->length);
ogs_nas_ue_usage_setting_t target;
memcpy(&target, ue_usage_setting, sizeof(ogs_nas_ue_usage_setting_t));
@@ -2435,13 +2711,17 @@ int ogs_nas_5gs_encode_ue_usage_setting(ogs_pkbuf_t *pkbuf, ogs_nas_ue_usage_set
* O TLV 3 */
int ogs_nas_5gs_decode_ue_status(ogs_nas_ue_status_t *ue_status, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_ue_status_t *source = (ogs_nas_ue_status_t *)pkbuf->data;
ue_status->length = source->length;
size = ue_status->length + sizeof(ue_status->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*ue_status) < size) return -1;
memcpy(ue_status, pkbuf->data - size, size);
@@ -2453,7 +2733,7 @@ int ogs_nas_5gs_decode_ue_status(ogs_nas_ue_status_t *ue_status, ogs_pkbuf_t *pk
int ogs_nas_5gs_encode_ue_status(ogs_pkbuf_t *pkbuf, ogs_nas_ue_status_t *ue_status)
{
- uint16_t size = ue_status->length + sizeof(ue_status->length);
+ int size = ue_status->length + sizeof(ue_status->length);
ogs_nas_ue_status_t target;
memcpy(&target, ue_status, sizeof(ogs_nas_ue_status_t));
@@ -2470,13 +2750,17 @@ int ogs_nas_5gs_encode_ue_status(ogs_pkbuf_t *pkbuf, ogs_nas_ue_status_t *ue_sta
* O TLV 4-34 */
int ogs_nas_5gs_decode_uplink_data_status(ogs_nas_uplink_data_status_t *uplink_data_status, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_uplink_data_status_t *source = (ogs_nas_uplink_data_status_t *)pkbuf->data;
uplink_data_status->length = source->length;
size = uplink_data_status->length + sizeof(uplink_data_status->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*uplink_data_status) < size) return -1;
memcpy(uplink_data_status, pkbuf->data - size, size);
@@ -2490,7 +2774,7 @@ int ogs_nas_5gs_decode_uplink_data_status(ogs_nas_uplink_data_status_t *uplink_d
int ogs_nas_5gs_encode_uplink_data_status(ogs_pkbuf_t *pkbuf, ogs_nas_uplink_data_status_t *uplink_data_status)
{
- uint16_t size = uplink_data_status->length + sizeof(uplink_data_status->length);
+ int size = uplink_data_status->length + sizeof(uplink_data_status->length);
ogs_nas_uplink_data_status_t target;
memcpy(&target, uplink_data_status, sizeof(ogs_nas_uplink_data_status_t));
@@ -2509,13 +2793,17 @@ int ogs_nas_5gs_encode_uplink_data_status(ogs_pkbuf_t *pkbuf, ogs_nas_uplink_dat
* M LV 2 */
int ogs_nas_5gs_decode_5gs_registration_result(ogs_nas_5gs_registration_result_t *registration_result, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_5gs_registration_result_t *source = (ogs_nas_5gs_registration_result_t *)pkbuf->data;
registration_result->length = source->length;
size = registration_result->length + sizeof(registration_result->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*registration_result) < size) return -1;
memcpy(registration_result, pkbuf->data - size, size);
@@ -2527,7 +2815,7 @@ int ogs_nas_5gs_decode_5gs_registration_result(ogs_nas_5gs_registration_result_t
int ogs_nas_5gs_encode_5gs_registration_result(ogs_pkbuf_t *pkbuf, ogs_nas_5gs_registration_result_t *registration_result)
{
- uint16_t size = registration_result->length + sizeof(registration_result->length);
+ int size = registration_result->length + sizeof(registration_result->length);
ogs_nas_5gs_registration_result_t target;
memcpy(&target, registration_result, sizeof(ogs_nas_5gs_registration_result_t));
@@ -2544,13 +2832,17 @@ int ogs_nas_5gs_encode_5gs_registration_result(ogs_pkbuf_t *pkbuf, ogs_nas_5gs_r
* O TLV 3-n */
int ogs_nas_5gs_decode_ue_radio_capability_id(ogs_nas_ue_radio_capability_id_t *ue_radio_capability_id, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_ue_radio_capability_id_t *source = (ogs_nas_ue_radio_capability_id_t *)pkbuf->data;
ue_radio_capability_id->length = source->length;
size = ue_radio_capability_id->length + sizeof(ue_radio_capability_id->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*ue_radio_capability_id) < size) return -1;
memcpy(ue_radio_capability_id, pkbuf->data - size, size);
@@ -2562,7 +2854,7 @@ int ogs_nas_5gs_decode_ue_radio_capability_id(ogs_nas_ue_radio_capability_id_t *
int ogs_nas_5gs_encode_ue_radio_capability_id(ogs_pkbuf_t *pkbuf, ogs_nas_ue_radio_capability_id_t *ue_radio_capability_id)
{
- uint16_t size = ue_radio_capability_id->length + sizeof(ue_radio_capability_id->length);
+ int size = ue_radio_capability_id->length + sizeof(ue_radio_capability_id->length);
ogs_nas_ue_radio_capability_id_t target;
memcpy(&target, ue_radio_capability_id, sizeof(ogs_nas_ue_radio_capability_id_t));
@@ -2579,9 +2871,13 @@ int ogs_nas_5gs_encode_ue_radio_capability_id(ogs_pkbuf_t *pkbuf, ogs_nas_ue_rad
* O TV 1 */
int ogs_nas_5gs_decode_ue_radio_capability_id_deletion_indication(ogs_nas_ue_radio_capability_id_deletion_indication_t *ue_radio_capability_id_deletion_indication, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_ue_radio_capability_id_deletion_indication_t);
+ int size = sizeof(ogs_nas_ue_radio_capability_id_deletion_indication_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(ue_radio_capability_id_deletion_indication, pkbuf->data - size, size);
ogs_trace(" UE_RADIO_CAPABILITY_ID_DELETION_INDICATION - ");
@@ -2592,7 +2888,7 @@ int ogs_nas_5gs_decode_ue_radio_capability_id_deletion_indication(ogs_nas_ue_rad
int ogs_nas_5gs_encode_ue_radio_capability_id_deletion_indication(ogs_pkbuf_t *pkbuf, ogs_nas_ue_radio_capability_id_deletion_indication_t *ue_radio_capability_id_deletion_indication)
{
- uint16_t size = sizeof(ogs_nas_ue_radio_capability_id_deletion_indication_t);
+ int size = sizeof(ogs_nas_ue_radio_capability_id_deletion_indication_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, ue_radio_capability_id_deletion_indication, size);
@@ -2607,9 +2903,13 @@ int ogs_nas_5gs_encode_ue_radio_capability_id_deletion_indication(ogs_pkbuf_t *p
* M V 1/2 */
int ogs_nas_5gs_decode_5gs_registration_type(ogs_nas_5gs_registration_type_t *registration_type, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_5gs_registration_type_t);
+ int size = sizeof(ogs_nas_5gs_registration_type_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(registration_type, pkbuf->data - size, size);
ogs_trace(" 5GS_REGISTRATION_TYPE - ");
@@ -2620,7 +2920,7 @@ int ogs_nas_5gs_decode_5gs_registration_type(ogs_nas_5gs_registration_type_t *re
int ogs_nas_5gs_encode_5gs_registration_type(ogs_pkbuf_t *pkbuf, ogs_nas_5gs_registration_type_t *registration_type)
{
- uint16_t size = sizeof(ogs_nas_5gs_registration_type_t);
+ int size = sizeof(ogs_nas_5gs_registration_type_t);
ogs_nas_5gs_registration_type_t target;
memcpy(&target, registration_type, size);
@@ -2637,13 +2937,17 @@ int ogs_nas_5gs_encode_5gs_registration_type(ogs_pkbuf_t *pkbuf, ogs_nas_5gs_reg
* O TLV 3 */
int ogs_nas_5gs_decode_truncated_5g_s_tmsi_configuration(ogs_nas_truncated_5g_s_tmsi_configuration_t *truncated_s_tmsi_configuration, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_truncated_5g_s_tmsi_configuration_t *source = (ogs_nas_truncated_5g_s_tmsi_configuration_t *)pkbuf->data;
truncated_s_tmsi_configuration->length = source->length;
size = truncated_s_tmsi_configuration->length + sizeof(truncated_s_tmsi_configuration->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*truncated_s_tmsi_configuration) < size) return -1;
memcpy(truncated_s_tmsi_configuration, pkbuf->data - size, size);
@@ -2655,7 +2959,7 @@ int ogs_nas_5gs_decode_truncated_5g_s_tmsi_configuration(ogs_nas_truncated_5g_s_
int ogs_nas_5gs_encode_truncated_5g_s_tmsi_configuration(ogs_pkbuf_t *pkbuf, ogs_nas_truncated_5g_s_tmsi_configuration_t *truncated_s_tmsi_configuration)
{
- uint16_t size = truncated_s_tmsi_configuration->length + sizeof(truncated_s_tmsi_configuration->length);
+ int size = truncated_s_tmsi_configuration->length + sizeof(truncated_s_tmsi_configuration->length);
ogs_nas_truncated_5g_s_tmsi_configuration_t target;
memcpy(&target, truncated_s_tmsi_configuration, sizeof(ogs_nas_truncated_5g_s_tmsi_configuration_t));
@@ -2672,13 +2976,17 @@ int ogs_nas_5gs_encode_truncated_5g_s_tmsi_configuration(ogs_pkbuf_t *pkbuf, ogs
* O TLV 3-n */
int ogs_nas_5gs_decode_wus_assistance_information(ogs_nas_wus_assistance_information_t *wus_assistance_information, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_wus_assistance_information_t *source = (ogs_nas_wus_assistance_information_t *)pkbuf->data;
wus_assistance_information->length = source->length;
size = wus_assistance_information->length + sizeof(wus_assistance_information->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*wus_assistance_information) < size) return -1;
memcpy(wus_assistance_information, pkbuf->data - size, size);
@@ -2690,7 +2998,7 @@ int ogs_nas_5gs_decode_wus_assistance_information(ogs_nas_wus_assistance_informa
int ogs_nas_5gs_encode_wus_assistance_information(ogs_pkbuf_t *pkbuf, ogs_nas_wus_assistance_information_t *wus_assistance_information)
{
- uint16_t size = wus_assistance_information->length + sizeof(wus_assistance_information->length);
+ int size = wus_assistance_information->length + sizeof(wus_assistance_information->length);
ogs_nas_wus_assistance_information_t target;
memcpy(&target, wus_assistance_information, sizeof(ogs_nas_wus_assistance_information_t));
@@ -2707,9 +3015,13 @@ int ogs_nas_5gs_encode_wus_assistance_information(ogs_pkbuf_t *pkbuf, ogs_nas_wu
* O T 1 */
int ogs_nas_5gs_decode_n5gc_indication(ogs_nas_n5gc_indication_t *n5gc_indication, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_n5gc_indication_t);
+ int size = sizeof(ogs_nas_n5gc_indication_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(n5gc_indication, pkbuf->data - size, size);
ogs_trace(" N5GC_INDICATION - ");
@@ -2720,7 +3032,7 @@ int ogs_nas_5gs_decode_n5gc_indication(ogs_nas_n5gc_indication_t *n5gc_indicatio
int ogs_nas_5gs_encode_n5gc_indication(ogs_pkbuf_t *pkbuf, ogs_nas_n5gc_indication_t *n5gc_indication)
{
- uint16_t size = sizeof(ogs_nas_n5gc_indication_t);
+ int size = sizeof(ogs_nas_n5gc_indication_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, n5gc_indication, size);
@@ -2735,9 +3047,13 @@ int ogs_nas_5gs_encode_n5gc_indication(ogs_pkbuf_t *pkbuf, ogs_nas_n5gc_indicati
* O TV 7 */
int ogs_nas_5gs_decode_5gs_tracking_area_identity(ogs_nas_5gs_tracking_area_identity_t *tracking_area_identity, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_5gs_tracking_area_identity_t);
+ int size = sizeof(ogs_nas_5gs_tracking_area_identity_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(tracking_area_identity, pkbuf->data - size, size);
tracking_area_identity->tac = ogs_be24toh(tracking_area_identity->tac);
@@ -2750,7 +3066,7 @@ int ogs_nas_5gs_decode_5gs_tracking_area_identity(ogs_nas_5gs_tracking_area_iden
int ogs_nas_5gs_encode_5gs_tracking_area_identity(ogs_pkbuf_t *pkbuf, ogs_nas_5gs_tracking_area_identity_t *tracking_area_identity)
{
- uint16_t size = sizeof(ogs_nas_5gs_tracking_area_identity_t);
+ int size = sizeof(ogs_nas_5gs_tracking_area_identity_t);
ogs_nas_5gs_tracking_area_identity_t target;
memcpy(&target, tracking_area_identity, size);
@@ -2769,13 +3085,17 @@ int ogs_nas_5gs_encode_5gs_tracking_area_identity(ogs_pkbuf_t *pkbuf, ogs_nas_5g
* O TLV 9-114 */
int ogs_nas_5gs_decode_5gs_tracking_area_identity_list(ogs_nas_5gs_tracking_area_identity_list_t *tracking_area_identity_list, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_5gs_tracking_area_identity_list_t *source = (ogs_nas_5gs_tracking_area_identity_list_t *)pkbuf->data;
tracking_area_identity_list->length = source->length;
size = tracking_area_identity_list->length + sizeof(tracking_area_identity_list->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*tracking_area_identity_list) < size) return -1;
memcpy(tracking_area_identity_list, pkbuf->data - size, size);
@@ -2787,7 +3107,7 @@ int ogs_nas_5gs_decode_5gs_tracking_area_identity_list(ogs_nas_5gs_tracking_area
int ogs_nas_5gs_encode_5gs_tracking_area_identity_list(ogs_pkbuf_t *pkbuf, ogs_nas_5gs_tracking_area_identity_list_t *tracking_area_identity_list)
{
- uint16_t size = tracking_area_identity_list->length + sizeof(tracking_area_identity_list->length);
+ int size = tracking_area_identity_list->length + sizeof(tracking_area_identity_list->length);
ogs_nas_5gs_tracking_area_identity_list_t target;
memcpy(&target, tracking_area_identity_list, sizeof(ogs_nas_5gs_tracking_area_identity_list_t));
@@ -2804,13 +3124,17 @@ int ogs_nas_5gs_encode_5gs_tracking_area_identity_list(ogs_pkbuf_t *pkbuf, ogs_n
* O TLV 3 */
int ogs_nas_5gs_decode_5gs_update_type(ogs_nas_5gs_update_type_t *update_type, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_5gs_update_type_t *source = (ogs_nas_5gs_update_type_t *)pkbuf->data;
update_type->length = source->length;
size = update_type->length + sizeof(update_type->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*update_type) < size) return -1;
memcpy(update_type, pkbuf->data - size, size);
@@ -2822,7 +3146,7 @@ int ogs_nas_5gs_decode_5gs_update_type(ogs_nas_5gs_update_type_t *update_type, o
int ogs_nas_5gs_encode_5gs_update_type(ogs_pkbuf_t *pkbuf, ogs_nas_5gs_update_type_t *update_type)
{
- uint16_t size = update_type->length + sizeof(update_type->length);
+ int size = update_type->length + sizeof(update_type->length);
ogs_nas_5gs_update_type_t target;
memcpy(&target, update_type, sizeof(ogs_nas_5gs_update_type_t));
@@ -2839,13 +3163,17 @@ int ogs_nas_5gs_encode_5gs_update_type(ogs_pkbuf_t *pkbuf, ogs_nas_5gs_update_ty
* O TLV 3-15 */
int ogs_nas_5gs_decode_5gsm_capability(ogs_nas_5gsm_capability_t *gsm_capability, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_5gsm_capability_t *source = (ogs_nas_5gsm_capability_t *)pkbuf->data;
gsm_capability->length = source->length;
size = gsm_capability->length + sizeof(gsm_capability->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*gsm_capability) < size) return -1;
memcpy(gsm_capability, pkbuf->data - size, size);
@@ -2857,7 +3185,7 @@ int ogs_nas_5gs_decode_5gsm_capability(ogs_nas_5gsm_capability_t *gsm_capability
int ogs_nas_5gs_encode_5gsm_capability(ogs_pkbuf_t *pkbuf, ogs_nas_5gsm_capability_t *gsm_capability)
{
- uint16_t size = gsm_capability->length + sizeof(gsm_capability->length);
+ int size = gsm_capability->length + sizeof(gsm_capability->length);
ogs_nas_5gsm_capability_t target;
memcpy(&target, gsm_capability, sizeof(ogs_nas_5gsm_capability_t));
@@ -2874,13 +3202,17 @@ int ogs_nas_5gs_encode_5gsm_capability(ogs_pkbuf_t *pkbuf, ogs_nas_5gsm_capabili
* O TLV 7, 11 or 15 */
int ogs_nas_5gs_decode_pdu_address(ogs_nas_pdu_address_t *pdu_address, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_pdu_address_t *source = (ogs_nas_pdu_address_t *)pkbuf->data;
pdu_address->length = source->length;
size = pdu_address->length + sizeof(pdu_address->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*pdu_address) < size) return -1;
memcpy(pdu_address, pkbuf->data - size, size);
@@ -2892,7 +3224,7 @@ int ogs_nas_5gs_decode_pdu_address(ogs_nas_pdu_address_t *pdu_address, ogs_pkbuf
int ogs_nas_5gs_encode_pdu_address(ogs_pkbuf_t *pkbuf, ogs_nas_pdu_address_t *pdu_address)
{
- uint16_t size = pdu_address->length + sizeof(pdu_address->length);
+ int size = pdu_address->length + sizeof(pdu_address->length);
ogs_nas_pdu_address_t target;
memcpy(&target, pdu_address, sizeof(ogs_nas_pdu_address_t));
@@ -2909,9 +3241,13 @@ int ogs_nas_5gs_encode_pdu_address(ogs_pkbuf_t *pkbuf, ogs_nas_pdu_address_t *pd
* O TV 1 */
int ogs_nas_5gs_decode_pdu_session_type(ogs_nas_pdu_session_type_t *pdu_session_type, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_pdu_session_type_t);
+ int size = sizeof(ogs_nas_pdu_session_type_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pdu_session_type, pkbuf->data - size, size);
ogs_trace(" PDU_SESSION_TYPE - ");
@@ -2922,7 +3258,7 @@ int ogs_nas_5gs_decode_pdu_session_type(ogs_nas_pdu_session_type_t *pdu_session_
int ogs_nas_5gs_encode_pdu_session_type(ogs_pkbuf_t *pkbuf, ogs_nas_pdu_session_type_t *pdu_session_type)
{
- uint16_t size = sizeof(ogs_nas_pdu_session_type_t);
+ int size = sizeof(ogs_nas_pdu_session_type_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, pdu_session_type, size);
@@ -2937,13 +3273,17 @@ int ogs_nas_5gs_encode_pdu_session_type(ogs_pkbuf_t *pkbuf, ogs_nas_pdu_session_
* O TLV-E 6-65538 */
int ogs_nas_5gs_decode_qos_flow_descriptions(ogs_nas_qos_flow_descriptions_t *qos_flow_descriptions, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_qos_flow_descriptions_t *source = (ogs_nas_qos_flow_descriptions_t *)pkbuf->data;
qos_flow_descriptions->length = be16toh(source->length);
size = qos_flow_descriptions->length + sizeof(qos_flow_descriptions->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
qos_flow_descriptions->buffer = pkbuf->data - size + sizeof(qos_flow_descriptions->length);
ogs_trace(" QOS_FLOW_DESCRIPTIONS - ");
@@ -2954,8 +3294,8 @@ int ogs_nas_5gs_decode_qos_flow_descriptions(ogs_nas_qos_flow_descriptions_t *qo
int ogs_nas_5gs_encode_qos_flow_descriptions(ogs_pkbuf_t *pkbuf, ogs_nas_qos_flow_descriptions_t *qos_flow_descriptions)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(qos_flow_descriptions);
ogs_assert(qos_flow_descriptions->buffer);
@@ -2979,13 +3319,17 @@ int ogs_nas_5gs_encode_qos_flow_descriptions(ogs_pkbuf_t *pkbuf, ogs_nas_qos_flo
* M LV-E 6-65538 */
int ogs_nas_5gs_decode_qos_rules(ogs_nas_qos_rules_t *qos_rules, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_qos_rules_t *source = (ogs_nas_qos_rules_t *)pkbuf->data;
qos_rules->length = be16toh(source->length);
size = qos_rules->length + sizeof(qos_rules->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
qos_rules->buffer = pkbuf->data - size + sizeof(qos_rules->length);
ogs_trace(" QOS_RULES - ");
@@ -2996,8 +3340,8 @@ int ogs_nas_5gs_decode_qos_rules(ogs_nas_qos_rules_t *qos_rules, ogs_pkbuf_t *pk
int ogs_nas_5gs_encode_qos_rules(ogs_pkbuf_t *pkbuf, ogs_nas_qos_rules_t *qos_rules)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(qos_rules);
ogs_assert(qos_rules->buffer);
@@ -3021,13 +3365,17 @@ int ogs_nas_5gs_encode_qos_rules(ogs_pkbuf_t *pkbuf, ogs_nas_qos_rules_t *qos_ru
* M LV 7 */
int ogs_nas_5gs_decode_session_ambr(ogs_nas_session_ambr_t *session_ambr, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_session_ambr_t *source = (ogs_nas_session_ambr_t *)pkbuf->data;
session_ambr->length = source->length;
size = session_ambr->length + sizeof(session_ambr->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*session_ambr) < size) return -1;
memcpy(session_ambr, pkbuf->data - size, size);
@@ -3042,7 +3390,7 @@ int ogs_nas_5gs_decode_session_ambr(ogs_nas_session_ambr_t *session_ambr, ogs_pk
int ogs_nas_5gs_encode_session_ambr(ogs_pkbuf_t *pkbuf, ogs_nas_session_ambr_t *session_ambr)
{
- uint16_t size = session_ambr->length + sizeof(session_ambr->length);
+ int size = session_ambr->length + sizeof(session_ambr->length);
ogs_nas_session_ambr_t target;
memcpy(&target, session_ambr, sizeof(ogs_nas_session_ambr_t));
@@ -3062,13 +3410,17 @@ int ogs_nas_5gs_encode_session_ambr(ogs_pkbuf_t *pkbuf, ogs_nas_session_ambr_t *
* O TLV 3-255 */
int ogs_nas_5gs_decode_sm_pdu_dn_request_container(ogs_nas_sm_pdu_dn_request_container_t *sm_pdu_dn_request_container, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_sm_pdu_dn_request_container_t *source = (ogs_nas_sm_pdu_dn_request_container_t *)pkbuf->data;
sm_pdu_dn_request_container->length = source->length;
size = sm_pdu_dn_request_container->length + sizeof(sm_pdu_dn_request_container->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*sm_pdu_dn_request_container) < size) return -1;
memcpy(sm_pdu_dn_request_container, pkbuf->data - size, size);
@@ -3080,7 +3432,7 @@ int ogs_nas_5gs_decode_sm_pdu_dn_request_container(ogs_nas_sm_pdu_dn_request_con
int ogs_nas_5gs_encode_sm_pdu_dn_request_container(ogs_pkbuf_t *pkbuf, ogs_nas_sm_pdu_dn_request_container_t *sm_pdu_dn_request_container)
{
- uint16_t size = sm_pdu_dn_request_container->length + sizeof(sm_pdu_dn_request_container->length);
+ int size = sm_pdu_dn_request_container->length + sizeof(sm_pdu_dn_request_container->length);
ogs_nas_sm_pdu_dn_request_container_t target;
memcpy(&target, sm_pdu_dn_request_container, sizeof(ogs_nas_sm_pdu_dn_request_container_t));
@@ -3097,9 +3449,13 @@ int ogs_nas_5gs_encode_sm_pdu_dn_request_container(ogs_pkbuf_t *pkbuf, ogs_nas_s
* O TV 1 */
int ogs_nas_5gs_decode_ssc_mode(ogs_nas_ssc_mode_t *ssc_mode, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_ssc_mode_t);
+ int size = sizeof(ogs_nas_ssc_mode_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(ssc_mode, pkbuf->data - size, size);
ogs_trace(" SSC_MODE - ");
@@ -3110,7 +3466,7 @@ int ogs_nas_5gs_decode_ssc_mode(ogs_nas_ssc_mode_t *ssc_mode, ogs_pkbuf_t *pkbuf
int ogs_nas_5gs_encode_ssc_mode(ogs_pkbuf_t *pkbuf, ogs_nas_ssc_mode_t *ssc_mode)
{
- uint16_t size = sizeof(ogs_nas_ssc_mode_t);
+ int size = sizeof(ogs_nas_ssc_mode_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, ssc_mode, size);
@@ -3125,13 +3481,17 @@ int ogs_nas_5gs_encode_ssc_mode(ogs_pkbuf_t *pkbuf, ogs_nas_ssc_mode_t *ssc_mode
* O TLV 3 */
int ogs_nas_5gs_decode_re_attempt_indicator(ogs_nas_re_attempt_indicator_t *re_attempt_indicator, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_re_attempt_indicator_t *source = (ogs_nas_re_attempt_indicator_t *)pkbuf->data;
re_attempt_indicator->length = source->length;
size = re_attempt_indicator->length + sizeof(re_attempt_indicator->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*re_attempt_indicator) < size) return -1;
memcpy(re_attempt_indicator, pkbuf->data - size, size);
@@ -3143,7 +3503,7 @@ int ogs_nas_5gs_decode_re_attempt_indicator(ogs_nas_re_attempt_indicator_t *re_a
int ogs_nas_5gs_encode_re_attempt_indicator(ogs_pkbuf_t *pkbuf, ogs_nas_re_attempt_indicator_t *re_attempt_indicator)
{
- uint16_t size = re_attempt_indicator->length + sizeof(re_attempt_indicator->length);
+ int size = re_attempt_indicator->length + sizeof(re_attempt_indicator->length);
ogs_nas_re_attempt_indicator_t target;
memcpy(&target, re_attempt_indicator, sizeof(ogs_nas_re_attempt_indicator_t));
@@ -3160,13 +3520,17 @@ int ogs_nas_5gs_encode_re_attempt_indicator(ogs_pkbuf_t *pkbuf, ogs_nas_re_attem
* O TLV 3-15 */
int ogs_nas_5gs_decode_5gsm_network_feature_support(ogs_nas_5gsm_network_feature_support_t *gsm_network_feature_support, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_5gsm_network_feature_support_t *source = (ogs_nas_5gsm_network_feature_support_t *)pkbuf->data;
gsm_network_feature_support->length = source->length;
size = gsm_network_feature_support->length + sizeof(gsm_network_feature_support->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*gsm_network_feature_support) < size) return -1;
memcpy(gsm_network_feature_support, pkbuf->data - size, size);
@@ -3178,7 +3542,7 @@ int ogs_nas_5gs_decode_5gsm_network_feature_support(ogs_nas_5gsm_network_feature
int ogs_nas_5gs_encode_5gsm_network_feature_support(ogs_pkbuf_t *pkbuf, ogs_nas_5gsm_network_feature_support_t *gsm_network_feature_support)
{
- uint16_t size = gsm_network_feature_support->length + sizeof(gsm_network_feature_support->length);
+ int size = gsm_network_feature_support->length + sizeof(gsm_network_feature_support->length);
ogs_nas_5gsm_network_feature_support_t target;
memcpy(&target, gsm_network_feature_support, sizeof(ogs_nas_5gsm_network_feature_support_t));
@@ -3195,9 +3559,13 @@ int ogs_nas_5gs_encode_5gsm_network_feature_support(ogs_pkbuf_t *pkbuf, ogs_nas_
* O TV 2 */
int ogs_nas_5gs_decode_5gsm_cause(ogs_nas_5gsm_cause_t *gsm_cause, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_5gsm_cause_t);
+ int size = sizeof(ogs_nas_5gsm_cause_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(gsm_cause, pkbuf->data - size, size);
ogs_trace(" 5GSM_CAUSE - ");
@@ -3208,7 +3576,7 @@ int ogs_nas_5gs_decode_5gsm_cause(ogs_nas_5gsm_cause_t *gsm_cause, ogs_pkbuf_t *
int ogs_nas_5gs_encode_5gsm_cause(ogs_pkbuf_t *pkbuf, ogs_nas_5gsm_cause_t *gsm_cause)
{
- uint16_t size = sizeof(ogs_nas_5gsm_cause_t);
+ int size = sizeof(ogs_nas_5gsm_cause_t);
ogs_nas_5gsm_cause_t target;
memcpy(&target, gsm_cause, size);
@@ -3225,13 +3593,17 @@ int ogs_nas_5gs_encode_5gsm_cause(ogs_pkbuf_t *pkbuf, ogs_nas_5gsm_cause_t *gsm_
* O TLV 4 */
int ogs_nas_5gs_decode_serving_plmn_rate_control(ogs_nas_serving_plmn_rate_control_t *serving_plmn_rate_control, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_serving_plmn_rate_control_t *source = (ogs_nas_serving_plmn_rate_control_t *)pkbuf->data;
serving_plmn_rate_control->length = source->length;
size = serving_plmn_rate_control->length + sizeof(serving_plmn_rate_control->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*serving_plmn_rate_control) < size) return -1;
memcpy(serving_plmn_rate_control, pkbuf->data - size, size);
@@ -3243,7 +3615,7 @@ int ogs_nas_5gs_decode_serving_plmn_rate_control(ogs_nas_serving_plmn_rate_contr
int ogs_nas_5gs_encode_serving_plmn_rate_control(ogs_pkbuf_t *pkbuf, ogs_nas_serving_plmn_rate_control_t *serving_plmn_rate_control)
{
- uint16_t size = serving_plmn_rate_control->length + sizeof(serving_plmn_rate_control->length);
+ int size = serving_plmn_rate_control->length + sizeof(serving_plmn_rate_control->length);
ogs_nas_serving_plmn_rate_control_t target;
memcpy(&target, serving_plmn_rate_control, sizeof(ogs_nas_serving_plmn_rate_control_t));
@@ -3260,13 +3632,17 @@ int ogs_nas_5gs_encode_serving_plmn_rate_control(ogs_pkbuf_t *pkbuf, ogs_nas_ser
* O TLV 3 */
int ogs_nas_5gs_decode_5gsm_congestion_re_attempt_indicator(ogs_nas_5gsm_congestion_re_attempt_indicator_t *gsm_congestion_re_attempt_indicator, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_5gsm_congestion_re_attempt_indicator_t *source = (ogs_nas_5gsm_congestion_re_attempt_indicator_t *)pkbuf->data;
gsm_congestion_re_attempt_indicator->length = source->length;
size = gsm_congestion_re_attempt_indicator->length + sizeof(gsm_congestion_re_attempt_indicator->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*gsm_congestion_re_attempt_indicator) < size) return -1;
memcpy(gsm_congestion_re_attempt_indicator, pkbuf->data - size, size);
@@ -3278,7 +3654,7 @@ int ogs_nas_5gs_decode_5gsm_congestion_re_attempt_indicator(ogs_nas_5gsm_congest
int ogs_nas_5gs_encode_5gsm_congestion_re_attempt_indicator(ogs_pkbuf_t *pkbuf, ogs_nas_5gsm_congestion_re_attempt_indicator_t *gsm_congestion_re_attempt_indicator)
{
- uint16_t size = gsm_congestion_re_attempt_indicator->length + sizeof(gsm_congestion_re_attempt_indicator->length);
+ int size = gsm_congestion_re_attempt_indicator->length + sizeof(gsm_congestion_re_attempt_indicator->length);
ogs_nas_5gsm_congestion_re_attempt_indicator_t target;
memcpy(&target, gsm_congestion_re_attempt_indicator, sizeof(ogs_nas_5gsm_congestion_re_attempt_indicator_t));
@@ -3295,13 +3671,17 @@ int ogs_nas_5gs_encode_5gsm_congestion_re_attempt_indicator(ogs_pkbuf_t *pkbuf,
* O TLV-E 3-65538 */
int ogs_nas_5gs_decode_atsss_container(ogs_nas_atsss_container_t *atsss_container, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_atsss_container_t *source = (ogs_nas_atsss_container_t *)pkbuf->data;
atsss_container->length = be16toh(source->length);
size = atsss_container->length + sizeof(atsss_container->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
atsss_container->buffer = pkbuf->data - size + sizeof(atsss_container->length);
ogs_trace(" ATSSS_CONTAINER - ");
@@ -3312,8 +3692,8 @@ int ogs_nas_5gs_decode_atsss_container(ogs_nas_atsss_container_t *atsss_containe
int ogs_nas_5gs_encode_atsss_container(ogs_pkbuf_t *pkbuf, ogs_nas_atsss_container_t *atsss_container)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(atsss_container);
ogs_assert(atsss_container->buffer);
@@ -3337,9 +3717,13 @@ int ogs_nas_5gs_encode_atsss_container(ogs_pkbuf_t *pkbuf, ogs_nas_atsss_contain
* O TV 1 */
int ogs_nas_5gs_decode_control_plane_only_indication(ogs_nas_control_plane_only_indication_t *control_plane_only_indication, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_control_plane_only_indication_t);
+ int size = sizeof(ogs_nas_control_plane_only_indication_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(control_plane_only_indication, pkbuf->data - size, size);
ogs_trace(" CONTROL_PLANE_ONLY_INDICATION - ");
@@ -3350,7 +3734,7 @@ int ogs_nas_5gs_decode_control_plane_only_indication(ogs_nas_control_plane_only_
int ogs_nas_5gs_encode_control_plane_only_indication(ogs_pkbuf_t *pkbuf, ogs_nas_control_plane_only_indication_t *control_plane_only_indication)
{
- uint16_t size = sizeof(ogs_nas_control_plane_only_indication_t);
+ int size = sizeof(ogs_nas_control_plane_only_indication_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, control_plane_only_indication, size);
@@ -3365,13 +3749,17 @@ int ogs_nas_5gs_encode_control_plane_only_indication(ogs_pkbuf_t *pkbuf, ogs_nas
* O TLV 5-257 */
int ogs_nas_5gs_decode_header_compression_configuration(ogs_nas_header_compression_configuration_t *header_compression_configuration, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_header_compression_configuration_t *source = (ogs_nas_header_compression_configuration_t *)pkbuf->data;
header_compression_configuration->length = source->length;
size = header_compression_configuration->length + sizeof(header_compression_configuration->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*header_compression_configuration) < size) return -1;
memcpy(header_compression_configuration, pkbuf->data - size, size);
@@ -3385,7 +3773,7 @@ int ogs_nas_5gs_decode_header_compression_configuration(ogs_nas_header_compressi
int ogs_nas_5gs_encode_header_compression_configuration(ogs_pkbuf_t *pkbuf, ogs_nas_header_compression_configuration_t *header_compression_configuration)
{
- uint16_t size = header_compression_configuration->length + sizeof(header_compression_configuration->length);
+ int size = header_compression_configuration->length + sizeof(header_compression_configuration->length);
ogs_nas_header_compression_configuration_t target;
memcpy(&target, header_compression_configuration, sizeof(ogs_nas_header_compression_configuration_t));
@@ -3404,13 +3792,17 @@ int ogs_nas_5gs_encode_header_compression_configuration(ogs_pkbuf_t *pkbuf, ogs_
* O TLV 8 */
int ogs_nas_5gs_decode_ds_tt_ethernet_port_mac_address(ogs_nas_ds_tt_ethernet_port_mac_address_t *ds_tt_ethernet_port_mac_address, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_ds_tt_ethernet_port_mac_address_t *source = (ogs_nas_ds_tt_ethernet_port_mac_address_t *)pkbuf->data;
ds_tt_ethernet_port_mac_address->length = source->length;
size = ds_tt_ethernet_port_mac_address->length + sizeof(ds_tt_ethernet_port_mac_address->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*ds_tt_ethernet_port_mac_address) < size) return -1;
memcpy(ds_tt_ethernet_port_mac_address, pkbuf->data - size, size);
@@ -3422,7 +3814,7 @@ int ogs_nas_5gs_decode_ds_tt_ethernet_port_mac_address(ogs_nas_ds_tt_ethernet_po
int ogs_nas_5gs_encode_ds_tt_ethernet_port_mac_address(ogs_pkbuf_t *pkbuf, ogs_nas_ds_tt_ethernet_port_mac_address_t *ds_tt_ethernet_port_mac_address)
{
- uint16_t size = ds_tt_ethernet_port_mac_address->length + sizeof(ds_tt_ethernet_port_mac_address->length);
+ int size = ds_tt_ethernet_port_mac_address->length + sizeof(ds_tt_ethernet_port_mac_address->length);
ogs_nas_ds_tt_ethernet_port_mac_address_t target;
memcpy(&target, ds_tt_ethernet_port_mac_address, sizeof(ogs_nas_ds_tt_ethernet_port_mac_address_t));
@@ -3439,13 +3831,17 @@ int ogs_nas_5gs_encode_ds_tt_ethernet_port_mac_address(ogs_pkbuf_t *pkbuf, ogs_n
* O TLV 10 */
int ogs_nas_5gs_decode_ue_ds_tt_residence_time(ogs_nas_ue_ds_tt_residence_time_t *ue_ds_tt_residence_time, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_ue_ds_tt_residence_time_t *source = (ogs_nas_ue_ds_tt_residence_time_t *)pkbuf->data;
ue_ds_tt_residence_time->length = source->length;
size = ue_ds_tt_residence_time->length + sizeof(ue_ds_tt_residence_time->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*ue_ds_tt_residence_time) < size) return -1;
memcpy(ue_ds_tt_residence_time, pkbuf->data - size, size);
@@ -3457,7 +3853,7 @@ int ogs_nas_5gs_decode_ue_ds_tt_residence_time(ogs_nas_ue_ds_tt_residence_time_t
int ogs_nas_5gs_encode_ue_ds_tt_residence_time(ogs_pkbuf_t *pkbuf, ogs_nas_ue_ds_tt_residence_time_t *ue_ds_tt_residence_time)
{
- uint16_t size = ue_ds_tt_residence_time->length + sizeof(ue_ds_tt_residence_time->length);
+ int size = ue_ds_tt_residence_time->length + sizeof(ue_ds_tt_residence_time->length);
ogs_nas_ue_ds_tt_residence_time_t target;
memcpy(&target, ue_ds_tt_residence_time, sizeof(ogs_nas_ue_ds_tt_residence_time_t));
@@ -3474,13 +3870,17 @@ int ogs_nas_5gs_encode_ue_ds_tt_residence_time(ogs_pkbuf_t *pkbuf, ogs_nas_ue_ds
* O TLV-E 4-65538 */
int ogs_nas_5gs_decode_port_management_information_container(ogs_nas_port_management_information_container_t *port_management_information_container, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_port_management_information_container_t *source = (ogs_nas_port_management_information_container_t *)pkbuf->data;
port_management_information_container->length = be16toh(source->length);
size = port_management_information_container->length + sizeof(port_management_information_container->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
port_management_information_container->buffer = pkbuf->data - size + sizeof(port_management_information_container->length);
ogs_trace(" PORT_MANAGEMENT_INFORMATION_CONTAINER - ");
@@ -3491,8 +3891,8 @@ int ogs_nas_5gs_decode_port_management_information_container(ogs_nas_port_manage
int ogs_nas_5gs_encode_port_management_information_container(ogs_pkbuf_t *pkbuf, ogs_nas_port_management_information_container_t *port_management_information_container)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(port_management_information_container);
ogs_assert(port_management_information_container->buffer);
@@ -3516,9 +3916,13 @@ int ogs_nas_5gs_encode_port_management_information_container(ogs_pkbuf_t *pkbuf,
* O TV 1 */
int ogs_nas_5gs_decode_always_on_pdu_session_indication(ogs_nas_always_on_pdu_session_indication_t *always_on_pdu_session_indication, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_always_on_pdu_session_indication_t);
+ int size = sizeof(ogs_nas_always_on_pdu_session_indication_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(always_on_pdu_session_indication, pkbuf->data - size, size);
ogs_trace(" ALWAYS_ON_PDU_SESSION_INDICATION - ");
@@ -3529,7 +3933,7 @@ int ogs_nas_5gs_decode_always_on_pdu_session_indication(ogs_nas_always_on_pdu_se
int ogs_nas_5gs_encode_always_on_pdu_session_indication(ogs_pkbuf_t *pkbuf, ogs_nas_always_on_pdu_session_indication_t *always_on_pdu_session_indication)
{
- uint16_t size = sizeof(ogs_nas_always_on_pdu_session_indication_t);
+ int size = sizeof(ogs_nas_always_on_pdu_session_indication_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, always_on_pdu_session_indication, size);
@@ -3544,9 +3948,13 @@ int ogs_nas_5gs_encode_always_on_pdu_session_indication(ogs_pkbuf_t *pkbuf, ogs_
* O TV 1 */
int ogs_nas_5gs_decode_always_on_pdu_session_requested(ogs_nas_always_on_pdu_session_requested_t *always_on_pdu_session_requested, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_always_on_pdu_session_requested_t);
+ int size = sizeof(ogs_nas_always_on_pdu_session_requested_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(always_on_pdu_session_requested, pkbuf->data - size, size);
ogs_trace(" ALWAYS_ON_PDU_SESSION_REQUESTED - ");
@@ -3557,7 +3965,7 @@ int ogs_nas_5gs_decode_always_on_pdu_session_requested(ogs_nas_always_on_pdu_ses
int ogs_nas_5gs_encode_always_on_pdu_session_requested(ogs_pkbuf_t *pkbuf, ogs_nas_always_on_pdu_session_requested_t *always_on_pdu_session_requested)
{
- uint16_t size = sizeof(ogs_nas_always_on_pdu_session_requested_t);
+ int size = sizeof(ogs_nas_always_on_pdu_session_requested_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, always_on_pdu_session_requested, size);
@@ -3572,9 +3980,13 @@ int ogs_nas_5gs_encode_always_on_pdu_session_requested(ogs_pkbuf_t *pkbuf, ogs_n
* O TV 1 */
int ogs_nas_5gs_decode_allowed_ssc_mode(ogs_nas_allowed_ssc_mode_t *allowed_ssc_mode, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_allowed_ssc_mode_t);
+ int size = sizeof(ogs_nas_allowed_ssc_mode_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(allowed_ssc_mode, pkbuf->data - size, size);
ogs_trace(" ALLOWED_SSC_MODE - ");
@@ -3585,7 +3997,7 @@ int ogs_nas_5gs_decode_allowed_ssc_mode(ogs_nas_allowed_ssc_mode_t *allowed_ssc_
int ogs_nas_5gs_encode_allowed_ssc_mode(ogs_pkbuf_t *pkbuf, ogs_nas_allowed_ssc_mode_t *allowed_ssc_mode)
{
- uint16_t size = sizeof(ogs_nas_allowed_ssc_mode_t);
+ int size = sizeof(ogs_nas_allowed_ssc_mode_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, allowed_ssc_mode, size);
@@ -3600,13 +4012,17 @@ int ogs_nas_5gs_encode_allowed_ssc_mode(ogs_pkbuf_t *pkbuf, ogs_nas_allowed_ssc_
* O TLV-E 4-65538 */
int ogs_nas_5gs_decode_extended_protocol_configuration_options(ogs_nas_extended_protocol_configuration_options_t *extended_protocol_configuration_options, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_extended_protocol_configuration_options_t *source = (ogs_nas_extended_protocol_configuration_options_t *)pkbuf->data;
extended_protocol_configuration_options->length = be16toh(source->length);
size = extended_protocol_configuration_options->length + sizeof(extended_protocol_configuration_options->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
extended_protocol_configuration_options->buffer = pkbuf->data - size + sizeof(extended_protocol_configuration_options->length);
ogs_trace(" EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS - ");
@@ -3617,8 +4033,8 @@ int ogs_nas_5gs_decode_extended_protocol_configuration_options(ogs_nas_extended_
int ogs_nas_5gs_encode_extended_protocol_configuration_options(ogs_pkbuf_t *pkbuf, ogs_nas_extended_protocol_configuration_options_t *extended_protocol_configuration_options)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(extended_protocol_configuration_options);
ogs_assert(extended_protocol_configuration_options->buffer);
@@ -3642,9 +4058,13 @@ int ogs_nas_5gs_encode_extended_protocol_configuration_options(ogs_pkbuf_t *pkbu
* M V 2 */
int ogs_nas_5gs_decode_integrity_protection_maximum_data_rate(ogs_nas_integrity_protection_maximum_data_rate_t *integrity_protection_maximum_data_rate, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_integrity_protection_maximum_data_rate_t);
+ int size = sizeof(ogs_nas_integrity_protection_maximum_data_rate_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(integrity_protection_maximum_data_rate, pkbuf->data - size, size);
ogs_trace(" INTEGRITY_PROTECTION_MAXIMUM_DATA_RATE - ");
@@ -3655,7 +4075,7 @@ int ogs_nas_5gs_decode_integrity_protection_maximum_data_rate(ogs_nas_integrity_
int ogs_nas_5gs_encode_integrity_protection_maximum_data_rate(ogs_pkbuf_t *pkbuf, ogs_nas_integrity_protection_maximum_data_rate_t *integrity_protection_maximum_data_rate)
{
- uint16_t size = sizeof(ogs_nas_integrity_protection_maximum_data_rate_t);
+ int size = sizeof(ogs_nas_integrity_protection_maximum_data_rate_t);
ogs_nas_integrity_protection_maximum_data_rate_t target;
memcpy(&target, integrity_protection_maximum_data_rate, size);
@@ -3672,13 +4092,17 @@ int ogs_nas_5gs_encode_integrity_protection_maximum_data_rate(ogs_pkbuf_t *pkbuf
* O TLV-E 7-65538 */
int ogs_nas_5gs_decode_mapped_eps_bearer_contexts(ogs_nas_mapped_eps_bearer_contexts_t *mapped_eps_bearer_contexts, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_mapped_eps_bearer_contexts_t *source = (ogs_nas_mapped_eps_bearer_contexts_t *)pkbuf->data;
mapped_eps_bearer_contexts->length = be16toh(source->length);
size = mapped_eps_bearer_contexts->length + sizeof(mapped_eps_bearer_contexts->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
mapped_eps_bearer_contexts->buffer = pkbuf->data - size + sizeof(mapped_eps_bearer_contexts->length);
ogs_trace(" MAPPED_EPS_BEARER_CONTEXTS - ");
@@ -3689,8 +4113,8 @@ int ogs_nas_5gs_decode_mapped_eps_bearer_contexts(ogs_nas_mapped_eps_bearer_cont
int ogs_nas_5gs_encode_mapped_eps_bearer_contexts(ogs_pkbuf_t *pkbuf, ogs_nas_mapped_eps_bearer_contexts_t *mapped_eps_bearer_contexts)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(mapped_eps_bearer_contexts);
ogs_assert(mapped_eps_bearer_contexts->buffer);
@@ -3714,9 +4138,13 @@ int ogs_nas_5gs_encode_mapped_eps_bearer_contexts(ogs_pkbuf_t *pkbuf, ogs_nas_ma
* O TV 3 */
int ogs_nas_5gs_decode_maximum_number_of_supported_packet_filters(ogs_nas_maximum_number_of_supported_packet_filters_t *maximum_number_of_supported_packet_filters, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_maximum_number_of_supported_packet_filters_t);
+ int size = sizeof(ogs_nas_maximum_number_of_supported_packet_filters_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(maximum_number_of_supported_packet_filters, pkbuf->data - size, size);
ogs_trace(" MAXIMUM_NUMBER_OF_SUPPORTED_PACKET_FILTERS - ");
@@ -3727,7 +4155,7 @@ int ogs_nas_5gs_decode_maximum_number_of_supported_packet_filters(ogs_nas_maximu
int ogs_nas_5gs_encode_maximum_number_of_supported_packet_filters(ogs_pkbuf_t *pkbuf, ogs_nas_maximum_number_of_supported_packet_filters_t *maximum_number_of_supported_packet_filters)
{
- uint16_t size = sizeof(ogs_nas_maximum_number_of_supported_packet_filters_t);
+ int size = sizeof(ogs_nas_maximum_number_of_supported_packet_filters_t);
ogs_nas_maximum_number_of_supported_packet_filters_t target;
memcpy(&target, maximum_number_of_supported_packet_filters, size);
diff --git a/lib/nas/5gs/ies.h b/lib/nas/5gs/ies.h
index 405676f34..d9b39b2b4 100644
--- a/lib/nas/5gs/ies.h
+++ b/lib/nas/5gs/ies.h
@@ -28,7 +28,7 @@
/*******************************************************************************
* This file had been created by nas-message.py script v0.2.0
* Please do not modify this file but regenerate it via script.
- * Created on: 2021-05-30 21:57:39.454963 by acetcom
+ * Created on: 2021-06-21 14:15:53.779048 by acetcom
* from 24501-g41.docx
******************************************************************************/
diff --git a/lib/nas/5gs/message.h b/lib/nas/5gs/message.h
index d7d57e9d0..2cde5b1c0 100644
--- a/lib/nas/5gs/message.h
+++ b/lib/nas/5gs/message.h
@@ -28,7 +28,7 @@
/*******************************************************************************
* This file had been created by nas-message.py script v0.2.0
* Please do not modify this file but regenerate it via script.
- * Created on: 2021-05-30 21:57:39.466799 by acetcom
+ * Created on: 2021-06-21 14:15:53.787309 by acetcom
* from 24501-g41.docx
******************************************************************************/
diff --git a/lib/nas/5gs/support/README.md b/lib/nas/5gs/support/README.md
index 1a34152a9..7922d2fef 100644
--- a/lib/nas/5gs/support/README.md
+++ b/lib/nas/5gs/support/README.md
@@ -1,16 +1,12 @@
-* Install python-pip
-user@host ~/Documents/git/open5gs/lib/gtp/support$ \
- sudo apt-get install python-pip
-
* Install python-docx
-user@host ~/Documents/git/open5gs/lib/gtp/support$ \
- sudo pip install python-docx
+user@host ~/Documents/git/open5gs/lib/nas/5gs/support$ \
+ sudo pip3 install python-docx
* Change the format of standard specification
from 24301-d80.doc to 24301-d80.docx
using Microsoft Office 2007+
* Generate Message support files
-user@host ~/Documents/git/open5gs/lib/s1ap/support$ \
- python nas-message.py -f 24501-g41.docx -o ..
+user@host ~/Documents/git/open5gs/lib/nas/5gs/support$ \
+ python3 nas-message.py -f 24501-g41.docx -o ..
diff --git a/lib/nas/5gs/support/nas-message.py b/lib/nas/5gs/support/nas-message.py
index 35ba6e576..1f7b3f718 100644
--- a/lib/nas/5gs/support/nas-message.py
+++ b/lib/nas/5gs/support/nas-message.py
@@ -96,14 +96,14 @@ def output_header_to_file(f):
f.write(" ******************************************************************************/\n\n")
def usage():
- print "Python generating NAS Message encoder/decoder v%s" % (version)
- print "Usage: python nas-message.py [options]"
- print "Available options:"
- print "-d Enable script debug"
- print "-f [file] Input file to parse"
- print "-o [dir] Output files to given directory"
- print "-c [dir] Cache files to given directory"
- print "-h Print this help and return"
+ print("Python generating NAS Message encoder/decoder v%s" % (version))
+ print("Usage: python nas-message.py [options]")
+ print("Available options:")
+ print("-d Enable script debug")
+ print("-f [file] Input file to parse")
+ print("-o [dir] Output files to given directory")
+ print("-c [dir] Cache files to given directory")
+ print("-h Print this help and return")
def v_upper(v):
return re.sub('_TO_UE', '', re.sub('_FROM_UE', '', re.sub('\'', '_', re.sub('/', '_', re.sub('-', '_', re.sub(' ', '_', v)))).upper()))
@@ -115,13 +115,13 @@ def get_value(v):
return re.sub('5gs_', '', re.sub('5g_', '', re.sub('5gsm', 'gsm', re.sub('5gmm', 'gmm', re.sub('\'', '_', re.sub('/', '_', re.sub('-', '_', re.sub(' ', '_', v)))).lower()))))
def get_cells(cells):
- iei = cells[0].text.encode('ascii', 'ignore')
- value = re.sub("\s*$", "", re.sub("\s*\n*\s*\([^\)]*\)*", "", re.sub("'s", "", cells[1].text))).encode('ascii', 'ignore')
- type = re.sub("^NAS ", "", re.sub("'s", "", re.sub('\s*\n\s*[a-zA-Z0-9.]*', '', cells[2].text))).encode('ascii', 'ignore')
- reference = re.sub('[a-zA-Z0-9\'\-\s]*\n\s*', '', cells[2].text).encode('ascii', 'ignore')
- presence = cells[3].text.encode('ascii', 'ignore')
- format = cells[4].text.encode('ascii', 'ignore')
- length = cells[5].text.encode('ascii', 'ignore')
+ iei = cells[0].text
+ value = re.sub("\s*$", "", re.sub("\s*\n*\s*\([^\)]*\)*", "", re.sub("'s", "", cells[1].text)))
+ type = re.sub("^NAS ", "", re.sub("'s", "", re.sub('\s*\n\s*[a-zA-Z0-9.]*', '', cells[2].text)))
+ reference = re.sub('[a-zA-Z0-9\'\-\s]*\n\s*', '', cells[2].text)
+ presence = cells[3].text
+ format = cells[4].text
+ length = cells[5].text
# Spec errata - workaround
if (type == "Request type" and value == "Request type"):
@@ -264,8 +264,8 @@ for key in msg_list.keys():
d_info("[" + key + "]")
cachefile = cachedir + "nas-msg-" + msg_list[key]["type"] + ".py"
if os.path.isfile(cachefile) and os.access(cachefile, os.R_OK):
- execfile(cachefile)
- print "Read from " + cachefile
+ exec(open(cachefile).read())
+ print("Read from " + cachefile)
else:
document = Document(filename)
f = open(cachefile, 'w')
@@ -326,8 +326,8 @@ for (k, v) in sorted_msg_list:
d_info("[Type List]")
typefile = currentdir + "type-list.py"
if os.path.isfile(typefile) and os.access(typefile, os.R_OK):
- execfile(typefile)
- print "Read from " + typefile
+ exec(open(typefile).read())
+ print("Read from " + typefile)
tmp = [(k, v["reference"]) for k, v in type_list.items()]
sorted_type_list = sorted(tmp, key=lambda tup: tup[1])
@@ -373,7 +373,7 @@ f.write("""#include "ogs-nas-5gs.h"
int ogs_nas_5gs_encode_optional_type(ogs_pkbuf_t *pkbuf, uint8_t type)
{
- uint16_t size = sizeof(uint8_t);
+ int size = sizeof(uint8_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, &type, size);
@@ -389,8 +389,11 @@ for (k, v) in sorted_type_list:
if (type_list[k]["format"] == "TV" or type_list[k]["format"] == "T") and type_list[k]["length"] == "1":
f.write("int ogs_nas_5gs_decode_%s(ogs_nas_%s_t *%s, ogs_pkbuf_t *pkbuf)\n" % (v_lower(k), v_lower(k), get_value(k)))
f.write("{\n")
- f.write(" uint16_t size = sizeof(ogs_nas_%s_t);\n\n" % v_lower(k))
- f.write(" ogs_assert(ogs_pkbuf_pull(pkbuf, size));\n")
+ f.write(" int size = sizeof(ogs_nas_%s_t);\n\n" % v_lower(k))
+ f.write(" if (ogs_pkbuf_pull(pkbuf, size) == NULL) {\n")
+ f.write(" ogs_error(\"ogs_pkbuf_pull() failed [size:%d]\", (int)size);\n")
+ f.write(" return -1;\n")
+ f.write(" }\n\n")
f.write(" memcpy(%s, pkbuf->data - size, size);\n\n" % get_value(k))
f.write(" ogs_trace(\" %s - \");\n" % v_upper(k))
f.write(" ogs_log_hexdump(OGS_LOG_TRACE, pkbuf->data - size, size);\n\n");
@@ -398,7 +401,7 @@ for (k, v) in sorted_type_list:
f.write("}\n\n")
f.write("int ogs_nas_5gs_encode_%s(ogs_pkbuf_t *pkbuf, ogs_nas_%s_t *%s)\n" % (v_lower(k), v_lower(k), get_value(k)))
f.write("{\n")
- f.write(" uint16_t size = sizeof(ogs_nas_%s_t);\n\n" % v_lower(k))
+ f.write(" int size = sizeof(ogs_nas_%s_t);\n\n" % v_lower(k))
f.write(" ogs_assert(ogs_pkbuf_pull(pkbuf, size));\n")
f.write(" memcpy(pkbuf->data - size, %s, size);\n\n" % get_value(k))
f.write(" ogs_trace(\" %s - \");\n" % v_upper(k))
@@ -409,10 +412,13 @@ for (k, v) in sorted_type_list:
f.write("int ogs_nas_5gs_decode_%s(ogs_nas_%s_t *%s, ogs_pkbuf_t *pkbuf)\n" % (v_lower(k), v_lower(k), get_value(k)))
f.write("{\n")
if type_list[k]["length"] == "4":
- f.write(" uint16_t size = 3;\n\n")
+ f.write(" int size = 3;\n\n")
else:
- f.write(" uint16_t size = sizeof(ogs_nas_%s_t);\n\n" % v_lower(k))
- f.write(" if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;\n")
+ f.write(" int size = sizeof(ogs_nas_%s_t);\n\n" % v_lower(k))
+ f.write(" if (ogs_pkbuf_pull(pkbuf, size) == NULL) {\n")
+ f.write(" ogs_error(\"ogs_pkbuf_pull() failed [size:%d]\", (int)size);\n")
+ f.write(" return -1;\n")
+ f.write(" }\n\n")
f.write(" memcpy(%s, pkbuf->data - size, size);\n\n" % get_value(k))
if "decode" in type_list[k]:
f.write("%s" % type_list[k]["decode"])
@@ -423,9 +429,9 @@ for (k, v) in sorted_type_list:
f.write("int ogs_nas_5gs_encode_%s(ogs_pkbuf_t *pkbuf, ogs_nas_%s_t *%s)\n" % (v_lower(k), v_lower(k), get_value(k)))
f.write("{\n")
if type_list[k]["length"] == "4":
- f.write(" uint16_t size = 3;\n")
+ f.write(" int size = 3;\n")
else:
- f.write(" uint16_t size = sizeof(ogs_nas_%s_t);\n" % v_lower(k))
+ f.write(" int size = sizeof(ogs_nas_%s_t);\n" % v_lower(k))
f.write(" ogs_nas_%s_t target;\n\n" % v_lower(k))
f.write(" memcpy(&target, %s, size);\n" % get_value(k))
if "encode" in type_list[k]:
@@ -439,11 +445,14 @@ for (k, v) in sorted_type_list:
elif type_list[k]["format"] == "LV-E" or type_list[k]["format"] == "TLV-E":
f.write("int ogs_nas_5gs_decode_%s(ogs_nas_%s_t *%s, ogs_pkbuf_t *pkbuf)\n" % (v_lower(k), v_lower(k), get_value(k)))
f.write("{\n")
- f.write(" uint16_t size = 0;\n")
+ f.write(" int size = 0;\n")
f.write(" ogs_nas_%s_t *source = (ogs_nas_%s_t *)pkbuf->data;\n\n" % (v_lower(k), v_lower(k)))
f.write(" %s->length = be16toh(source->length);\n" % get_value(k))
f.write(" size = %s->length + sizeof(%s->length);\n\n" % (get_value(k), get_value(k)))
- f.write(" if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;\n")
+ f.write(" if (ogs_pkbuf_pull(pkbuf, size) == NULL) {\n")
+ f.write(" ogs_error(\"ogs_pkbuf_pull() failed [size:%d]\", (int)size);\n")
+ f.write(" return -1;\n")
+ f.write(" }\n\n")
f.write(" %s->buffer = pkbuf->data - size + sizeof(%s->length);\n\n" % (get_value(k), get_value(k)))
f.write(" ogs_trace(\" %s - \");\n" % v_upper(k))
f.write(" ogs_log_hexdump(OGS_LOG_TRACE, (void*)%s->buffer, %s->length);\n\n" % (get_value(k), get_value(k)));
@@ -451,8 +460,8 @@ for (k, v) in sorted_type_list:
f.write("}\n\n")
f.write("int ogs_nas_5gs_encode_%s(ogs_pkbuf_t *pkbuf, ogs_nas_%s_t *%s)\n" % (v_lower(k), v_lower(k), get_value(k)))
f.write("{\n")
- f.write(" uint16_t size = 0;\n")
- f.write(" uint16_t target;\n\n")
+ f.write(" int size = 0;\n")
+ f.write(" int target;\n\n")
f.write(" ogs_assert(%s);\n" % get_value(k))
f.write(" ogs_assert(%s->buffer);\n\n" % get_value(k))
f.write(" size = sizeof(%s->length);\n" % get_value(k))
@@ -469,11 +478,14 @@ for (k, v) in sorted_type_list:
else:
f.write("int ogs_nas_5gs_decode_%s(ogs_nas_%s_t *%s, ogs_pkbuf_t *pkbuf)\n" % (v_lower(k), v_lower(k), get_value(k)))
f.write("{\n")
- f.write(" uint16_t size = 0;\n")
+ f.write(" int size = 0;\n")
f.write(" ogs_nas_%s_t *source = (ogs_nas_%s_t *)pkbuf->data;\n\n" % (v_lower(k), v_lower(k)))
f.write(" %s->length = source->length;\n" % get_value(k))
f.write(" size = %s->length + sizeof(%s->length);\n\n" % (get_value(k), get_value(k)))
- f.write(" if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;\n")
+ f.write(" if (ogs_pkbuf_pull(pkbuf, size) == NULL) {\n")
+ f.write(" ogs_error(\"ogs_pkbuf_pull() failed [size:%d]\", (int)size);\n")
+ f.write(" return -1;\n")
+ f.write(" }\n\n")
f.write(" if (sizeof(*%s) < size) return -1;\n" % get_value(k))
f.write(" memcpy(%s, pkbuf->data - size, size);\n\n" % get_value(k))
if "decode" in type_list[k]:
@@ -484,7 +496,7 @@ for (k, v) in sorted_type_list:
f.write("}\n\n")
f.write("int ogs_nas_5gs_encode_%s(ogs_pkbuf_t *pkbuf, ogs_nas_%s_t *%s)\n" % (v_lower(k), v_lower(k), get_value(k)))
f.write("{\n")
- f.write(" uint16_t size = %s->length + sizeof(%s->length);\n" % (get_value(k), get_value(k)))
+ f.write(" int size = %s->length + sizeof(%s->length);\n" % (get_value(k), get_value(k)))
f.write(" ogs_nas_%s_t target;\n\n" % v_lower(k))
f.write(" memcpy(&target, %s, sizeof(ogs_nas_%s_t));\n" % (get_value(k), v_lower(k)))
if "encode" in type_list[k]:
@@ -663,7 +675,10 @@ for (k, v) in sorted_msg_list:
for ie in [ies for ies in msg_list[k]["ies"] if ies["presence"] == "M"]:
f.write(" size = ogs_nas_5gs_decode_%s(&%s->%s, pkbuf);\n" % (v_lower(ie["type"]), get_value(k), get_value(ie["value"])))
- f.write(" if (size < 0) return size;\n")
+ f.write(" if (size < 0) {\n")
+ f.write(" ogs_error(\"ogs_nas_5gs_decode_%s() failed\");\n" % v_lower(ie["type"]))
+ f.write(" return size;\n")
+ f.write(" }\n\n")
f.write(" decoded += size;\n\n")
optional_fields = False;
@@ -674,7 +689,10 @@ for (k, v) in sorted_msg_list:
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch(type) {
@@ -686,7 +704,10 @@ for (k, v) in sorted_msg_list:
f.write(" decoded--;\n")
f.write(" ogs_assert(ogs_pkbuf_push(pkbuf, 1));\n")
f.write(" size = ogs_nas_5gs_decode_%s(&%s->%s, pkbuf);\n" % (v_lower(ie["type"]), get_value(k), get_value(ie["value"])))
- f.write(" if (size < 0) return size;\n")
+ f.write(" if (size < 0) {\n")
+ f.write(" ogs_error(\"ogs_nas_5gs_decode_%s() failed\");\n" % v_lower(ie["type"]))
+ f.write(" return size;\n")
+ f.write(" }\n\n")
f.write(" %s->presencemask |= OGS_NAS_5GS_%s_%s_PRESENT;\n" % (get_value(k), v_upper(k), v_upper(ie["value"])))
f.write(" decoded += size;\n")
f.write(" break;\n")
@@ -707,7 +728,7 @@ for (k, v) in sorted_msg_list:
f.write("""int ogs_nas_5gmm_decode(ogs_nas_5gs_message_t *message, ogs_pkbuf_t *pkbuf)
{
int size = 0;
- uint16_t decoded = 0;
+ int decoded = 0;
ogs_assert(pkbuf);
ogs_assert(pkbuf->data);
@@ -716,7 +737,10 @@ f.write("""int ogs_nas_5gmm_decode(ogs_nas_5gs_message_t *message, ogs_pkbuf_t *
memset(message, 0, sizeof(ogs_nas_5gs_message_t));
size = sizeof(ogs_nas_5gmm_header_t);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return OGS_ERROR;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
memcpy(&message->gmm.h, pkbuf->data - size, size);
decoded += size;
@@ -729,7 +753,10 @@ for (k, v) in sorted_msg_list:
f.write(" case OGS_NAS_5GS_%s:\n" % v_upper(k))
if len(msg_list[k]["ies"]) != 0:
f.write(" size = ogs_nas_5gs_decode_%s(message, pkbuf);\n" % v_lower(k))
- f.write(" if (size < 0) return OGS_ERROR;\n")
+ f.write(" if (size < 0) {\n")
+ f.write(" ogs_error(\"ogs_nas_5gs_decode_%s() failed\");\n" % v_lower(k))
+ f.write(" return size;\n")
+ f.write(" }\n\n")
f.write(" decoded += size;\n")
f.write(" break;\n")
@@ -748,7 +775,7 @@ f.write(""" default:
f.write("""int ogs_nas_5gsm_decode(ogs_nas_5gs_message_t *message, ogs_pkbuf_t *pkbuf)
{
int size = 0;
- uint16_t decoded = 0;
+ int decoded = 0;
ogs_assert(pkbuf);
ogs_assert(pkbuf->data);
@@ -757,7 +784,10 @@ f.write("""int ogs_nas_5gsm_decode(ogs_nas_5gs_message_t *message, ogs_pkbuf_t *
memset(message, 0, sizeof(ogs_nas_5gs_message_t));
size = sizeof(ogs_nas_5gsm_header_t);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return OGS_ERROR;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
memcpy(&message->gsm.h, pkbuf->data - size, size);
decoded += size;
@@ -770,7 +800,10 @@ for (k, v) in sorted_msg_list:
f.write(" case OGS_NAS_5GS_%s:\n" % v_upper(k))
if len(msg_list[k]["ies"]) != 0:
f.write(" size = ogs_nas_5gs_decode_%s(message, pkbuf);\n" % v_lower(k))
- f.write(" if (size < 0) return OGS_ERROR;\n")
+ f.write(" if (size < 0) {\n")
+ f.write(" ogs_error(\"ogs_nas_5gs_decode_%s() failed\");\n" % v_lower(k))
+ f.write(" return size;\n")
+ f.write(" }\n\n")
f.write(" decoded += size;\n")
f.write(" break;\n")
diff --git a/lib/nas/eps/decoder.c b/lib/nas/eps/decoder.c
index c07182fda..2bf926bc0 100644
--- a/lib/nas/eps/decoder.c
+++ b/lib/nas/eps/decoder.c
@@ -28,7 +28,7 @@
/*******************************************************************************
* This file had been created by nas-message.py script v0.1.0
* Please do not modify this file but regenerate it via script.
- * Created on: 2021-05-30 21:57:00.074257 by acetcom
+ * Created on: 2021-06-21 14:44:53.381858 by acetcom
* from 24301-g40.docx
******************************************************************************/
@@ -92,19 +92,35 @@ int ogs_nas_eps_decode_attach_request(ogs_nas_eps_message_t *message, ogs_pkbuf_
ogs_trace("[NAS] Decode ATTACH_REQUEST\n");
size = ogs_nas_eps_decode_eps_attach_type(&attach_request->eps_attach_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_attach_type() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_eps_decode_eps_mobile_identity(&attach_request->eps_mobile_identity, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_mobile_identity() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_eps_decode_ue_network_capability(&attach_request->ue_network_capability, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ue_network_capability() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_eps_decode_esm_message_container(&attach_request->esm_message_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_esm_message_container() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -112,43 +128,70 @@ int ogs_nas_eps_decode_attach_request(ogs_nas_eps_message_t *message, ogs_pkbuf_
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_ATTACH_REQUEST_OLD_P_TMSI_SIGNATURE_TYPE:
size = ogs_nas_eps_decode_p_tmsi_signature(&attach_request->old_p_tmsi_signature, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_p_tmsi_signature() failed");
+ return size;
+ }
+
attach_request->presencemask |= OGS_NAS_EPS_ATTACH_REQUEST_OLD_P_TMSI_SIGNATURE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_REQUEST_ADDITIONAL_GUTI_TYPE:
size = ogs_nas_eps_decode_eps_mobile_identity(&attach_request->additional_guti, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_mobile_identity() failed");
+ return size;
+ }
+
attach_request->presencemask |= OGS_NAS_EPS_ATTACH_REQUEST_ADDITIONAL_GUTI_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_REQUEST_LAST_VISITED_REGISTERED_TAI_TYPE:
size = ogs_nas_eps_decode_tracking_area_identity(&attach_request->last_visited_registered_tai, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_tracking_area_identity() failed");
+ return size;
+ }
+
attach_request->presencemask |= OGS_NAS_EPS_ATTACH_REQUEST_LAST_VISITED_REGISTERED_TAI_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_REQUEST_DRX_PARAMETER_TYPE:
size = ogs_nas_eps_decode_drx_parameter(&attach_request->drx_parameter, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_drx_parameter() failed");
+ return size;
+ }
+
attach_request->presencemask |= OGS_NAS_EPS_ATTACH_REQUEST_DRX_PARAMETER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_REQUEST_MS_NETWORK_CAPABILITY_TYPE:
size = ogs_nas_eps_decode_ms_network_capability(&attach_request->ms_network_capability, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ms_network_capability() failed");
+ return size;
+ }
+
attach_request->presencemask |= OGS_NAS_EPS_ATTACH_REQUEST_MS_NETWORK_CAPABILITY_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_REQUEST_OLD_LOCATION_AREA_IDENTIFICATION_TYPE:
size = ogs_nas_eps_decode_location_area_identification(&attach_request->old_location_area_identification, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_location_area_identification() failed");
+ return size;
+ }
+
attach_request->presencemask |= OGS_NAS_EPS_ATTACH_REQUEST_OLD_LOCATION_AREA_IDENTIFICATION_PRESENT;
decoded += size;
break;
@@ -156,25 +199,41 @@ int ogs_nas_eps_decode_attach_request(ogs_nas_eps_message_t *message, ogs_pkbuf_
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_tmsi_status(&attach_request->tmsi_status, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_tmsi_status() failed");
+ return size;
+ }
+
attach_request->presencemask |= OGS_NAS_EPS_ATTACH_REQUEST_TMSI_STATUS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_REQUEST_MOBILE_STATION_CLASSMARK_2_TYPE:
size = ogs_nas_eps_decode_mobile_station_classmark_2(&attach_request->mobile_station_classmark_2, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_mobile_station_classmark_2() failed");
+ return size;
+ }
+
attach_request->presencemask |= OGS_NAS_EPS_ATTACH_REQUEST_MOBILE_STATION_CLASSMARK_2_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_REQUEST_MOBILE_STATION_CLASSMARK_3_TYPE:
size = ogs_nas_eps_decode_mobile_station_classmark_3(&attach_request->mobile_station_classmark_3, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_mobile_station_classmark_3() failed");
+ return size;
+ }
+
attach_request->presencemask |= OGS_NAS_EPS_ATTACH_REQUEST_MOBILE_STATION_CLASSMARK_3_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_REQUEST_SUPPORTED_CODECS_TYPE:
size = ogs_nas_eps_decode_supported_codec_list(&attach_request->supported_codecs, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_supported_codec_list() failed");
+ return size;
+ }
+
attach_request->presencemask |= OGS_NAS_EPS_ATTACH_REQUEST_SUPPORTED_CODECS_PRESENT;
decoded += size;
break;
@@ -182,13 +241,21 @@ int ogs_nas_eps_decode_attach_request(ogs_nas_eps_message_t *message, ogs_pkbuf_
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_additional_update_type(&attach_request->additional_update_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_additional_update_type() failed");
+ return size;
+ }
+
attach_request->presencemask |= OGS_NAS_EPS_ATTACH_REQUEST_ADDITIONAL_UPDATE_TYPE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_REQUEST_VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_TYPE:
size = ogs_nas_eps_decode_voice_domain_preference_and_ue_usage_setting(&attach_request->voice_domain_preference_and_ue_usage_setting, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_voice_domain_preference_and_ue_usage_setting() failed");
+ return size;
+ }
+
attach_request->presencemask |= OGS_NAS_EPS_ATTACH_REQUEST_VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_PRESENT;
decoded += size;
break;
@@ -196,7 +263,11 @@ int ogs_nas_eps_decode_attach_request(ogs_nas_eps_message_t *message, ogs_pkbuf_
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_device_properties(&attach_request->device_properties, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_device_properties() failed");
+ return size;
+ }
+
attach_request->presencemask |= OGS_NAS_EPS_ATTACH_REQUEST_DEVICE_PROPERTIES_PRESENT;
decoded += size;
break;
@@ -204,7 +275,11 @@ int ogs_nas_eps_decode_attach_request(ogs_nas_eps_message_t *message, ogs_pkbuf_
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_guti_type(&attach_request->old_guti_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_guti_type() failed");
+ return size;
+ }
+
attach_request->presencemask |= OGS_NAS_EPS_ATTACH_REQUEST_OLD_GUTI_TYPE_PRESENT;
decoded += size;
break;
@@ -212,55 +287,91 @@ int ogs_nas_eps_decode_attach_request(ogs_nas_eps_message_t *message, ogs_pkbuf_
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_ms_network_feature_support(&attach_request->ms_network_feature_support, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ms_network_feature_support() failed");
+ return size;
+ }
+
attach_request->presencemask |= OGS_NAS_EPS_ATTACH_REQUEST_MS_NETWORK_FEATURE_SUPPORT_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_REQUEST_TMSI_BASED_NRI_CONTAINER_TYPE:
size = ogs_nas_eps_decode_network_resource_identifier_container(&attach_request->tmsi_based_nri_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_network_resource_identifier_container() failed");
+ return size;
+ }
+
attach_request->presencemask |= OGS_NAS_EPS_ATTACH_REQUEST_TMSI_BASED_NRI_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_REQUEST_T3324_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer_2(&attach_request->t3324_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer_2() failed");
+ return size;
+ }
+
attach_request->presencemask |= OGS_NAS_EPS_ATTACH_REQUEST_T3324_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_REQUEST_T3412_EXTENDED_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer_3(&attach_request->t3412_extended_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer_3() failed");
+ return size;
+ }
+
attach_request->presencemask |= OGS_NAS_EPS_ATTACH_REQUEST_T3412_EXTENDED_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_REQUEST_EXTENDED_DRX_PARAMETERS_TYPE:
size = ogs_nas_eps_decode_extended_drx_parameters(&attach_request->extended_drx_parameters, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_drx_parameters() failed");
+ return size;
+ }
+
attach_request->presencemask |= OGS_NAS_EPS_ATTACH_REQUEST_EXTENDED_DRX_PARAMETERS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_REQUEST_UE_ADDITIONAL_SECURITY_CAPABILITY_TYPE:
size = ogs_nas_eps_decode_ue_additional_security_capability(&attach_request->ue_additional_security_capability, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ue_additional_security_capability() failed");
+ return size;
+ }
+
attach_request->presencemask |= OGS_NAS_EPS_ATTACH_REQUEST_UE_ADDITIONAL_SECURITY_CAPABILITY_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_REQUEST_UE_STATUS_TYPE:
size = ogs_nas_eps_decode_ue_status(&attach_request->ue_status, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ue_status() failed");
+ return size;
+ }
+
attach_request->presencemask |= OGS_NAS_EPS_ATTACH_REQUEST_UE_STATUS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_REQUEST_ADDITIONAL_INFORMATION_REQUESTED_TYPE:
size = ogs_nas_eps_decode_additional_information_requested(&attach_request->additional_information_requested, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_additional_information_requested() failed");
+ return size;
+ }
+
attach_request->presencemask |= OGS_NAS_EPS_ATTACH_REQUEST_ADDITIONAL_INFORMATION_REQUESTED_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_REQUEST_N1_UE_NETWORK_CAPABILITY_TYPE:
size = ogs_nas_eps_decode_n1_ue_network_capability(&attach_request->n1_ue_network_capability, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_n1_ue_network_capability() failed");
+ return size;
+ }
+
attach_request->presencemask |= OGS_NAS_EPS_ATTACH_REQUEST_N1_UE_NETWORK_CAPABILITY_PRESENT;
decoded += size;
break;
@@ -282,19 +393,35 @@ int ogs_nas_eps_decode_attach_accept(ogs_nas_eps_message_t *message, ogs_pkbuf_t
ogs_trace("[NAS] Decode ATTACH_ACCEPT\n");
size = ogs_nas_eps_decode_eps_attach_result(&attach_accept->eps_attach_result, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_attach_result() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_eps_decode_gprs_timer(&attach_accept->t3412_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_eps_decode_tracking_area_identity_list(&attach_accept->tai_list, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_tracking_area_identity_list() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_eps_decode_esm_message_container(&attach_accept->esm_message_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_esm_message_container() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -302,61 +429,100 @@ int ogs_nas_eps_decode_attach_accept(ogs_nas_eps_message_t *message, ogs_pkbuf_t
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_ATTACH_ACCEPT_GUTI_TYPE:
size = ogs_nas_eps_decode_eps_mobile_identity(&attach_accept->guti, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_mobile_identity() failed");
+ return size;
+ }
+
attach_accept->presencemask |= OGS_NAS_EPS_ATTACH_ACCEPT_GUTI_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_ACCEPT_LOCATION_AREA_IDENTIFICATION_TYPE:
size = ogs_nas_eps_decode_location_area_identification(&attach_accept->location_area_identification, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_location_area_identification() failed");
+ return size;
+ }
+
attach_accept->presencemask |= OGS_NAS_EPS_ATTACH_ACCEPT_LOCATION_AREA_IDENTIFICATION_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_ACCEPT_MS_IDENTITY_TYPE:
size = ogs_nas_eps_decode_mobile_identity(&attach_accept->ms_identity, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_mobile_identity() failed");
+ return size;
+ }
+
attach_accept->presencemask |= OGS_NAS_EPS_ATTACH_ACCEPT_MS_IDENTITY_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_ACCEPT_EMM_CAUSE_TYPE:
size = ogs_nas_eps_decode_emm_cause(&attach_accept->emm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_emm_cause() failed");
+ return size;
+ }
+
attach_accept->presencemask |= OGS_NAS_EPS_ATTACH_ACCEPT_EMM_CAUSE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_ACCEPT_T3402_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer(&attach_accept->t3402_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer() failed");
+ return size;
+ }
+
attach_accept->presencemask |= OGS_NAS_EPS_ATTACH_ACCEPT_T3402_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_ACCEPT_T3423_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer(&attach_accept->t3423_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer() failed");
+ return size;
+ }
+
attach_accept->presencemask |= OGS_NAS_EPS_ATTACH_ACCEPT_T3423_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_ACCEPT_EQUIVALENT_PLMNS_TYPE:
size = ogs_nas_eps_decode_plmn_list(&attach_accept->equivalent_plmns, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_plmn_list() failed");
+ return size;
+ }
+
attach_accept->presencemask |= OGS_NAS_EPS_ATTACH_ACCEPT_EQUIVALENT_PLMNS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_ACCEPT_EMERGENCY_NUMBER_LIST_TYPE:
size = ogs_nas_eps_decode_emergency_number_list(&attach_accept->emergency_number_list, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_emergency_number_list() failed");
+ return size;
+ }
+
attach_accept->presencemask |= OGS_NAS_EPS_ATTACH_ACCEPT_EMERGENCY_NUMBER_LIST_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_ACCEPT_EPS_NETWORK_FEATURE_SUPPORT_TYPE:
size = ogs_nas_eps_decode_eps_network_feature_support(&attach_accept->eps_network_feature_support, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_network_feature_support() failed");
+ return size;
+ }
+
attach_accept->presencemask |= OGS_NAS_EPS_ATTACH_ACCEPT_EPS_NETWORK_FEATURE_SUPPORT_PRESENT;
decoded += size;
break;
@@ -364,31 +530,51 @@ int ogs_nas_eps_decode_attach_accept(ogs_nas_eps_message_t *message, ogs_pkbuf_t
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_additional_update_result(&attach_accept->additional_update_result, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_additional_update_result() failed");
+ return size;
+ }
+
attach_accept->presencemask |= OGS_NAS_EPS_ATTACH_ACCEPT_ADDITIONAL_UPDATE_RESULT_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_ACCEPT_T3412_EXTENDED_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer_3(&attach_accept->t3412_extended_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer_3() failed");
+ return size;
+ }
+
attach_accept->presencemask |= OGS_NAS_EPS_ATTACH_ACCEPT_T3412_EXTENDED_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_ACCEPT_T3324_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer_2(&attach_accept->t3324_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer_2() failed");
+ return size;
+ }
+
attach_accept->presencemask |= OGS_NAS_EPS_ATTACH_ACCEPT_T3324_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_ACCEPT_EXTENDED_DRX_PARAMETERS_TYPE:
size = ogs_nas_eps_decode_extended_drx_parameters(&attach_accept->extended_drx_parameters, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_drx_parameters() failed");
+ return size;
+ }
+
attach_accept->presencemask |= OGS_NAS_EPS_ATTACH_ACCEPT_EXTENDED_DRX_PARAMETERS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_ACCEPT_DCN_ID_TYPE:
size = ogs_nas_eps_decode_dcn_id(&attach_accept->dcn_id, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_dcn_id() failed");
+ return size;
+ }
+
attach_accept->presencemask |= OGS_NAS_EPS_ATTACH_ACCEPT_DCN_ID_PRESENT;
decoded += size;
break;
@@ -396,7 +582,11 @@ int ogs_nas_eps_decode_attach_accept(ogs_nas_eps_message_t *message, ogs_pkbuf_t
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_sms_services_status(&attach_accept->sms_services_status, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_sms_services_status() failed");
+ return size;
+ }
+
attach_accept->presencemask |= OGS_NAS_EPS_ATTACH_ACCEPT_SMS_SERVICES_STATUS_PRESENT;
decoded += size;
break;
@@ -404,13 +594,21 @@ int ogs_nas_eps_decode_attach_accept(ogs_nas_eps_message_t *message, ogs_pkbuf_t
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_non__nw_provided_policies(&attach_accept->non__nw_provided_policies, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_non__nw_provided_policies() failed");
+ return size;
+ }
+
attach_accept->presencemask |= OGS_NAS_EPS_ATTACH_ACCEPT_NON__NW_PROVIDED_POLICIES_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_ACCEPT_T3448_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer_2(&attach_accept->t3448_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer_2() failed");
+ return size;
+ }
+
attach_accept->presencemask |= OGS_NAS_EPS_ATTACH_ACCEPT_T3448_VALUE_PRESENT;
decoded += size;
break;
@@ -418,31 +616,51 @@ int ogs_nas_eps_decode_attach_accept(ogs_nas_eps_message_t *message, ogs_pkbuf_t
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_network_policy(&attach_accept->network_policy, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_network_policy() failed");
+ return size;
+ }
+
attach_accept->presencemask |= OGS_NAS_EPS_ATTACH_ACCEPT_NETWORK_POLICY_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_ACCEPT_T3447_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer_3(&attach_accept->t3447_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer_3() failed");
+ return size;
+ }
+
attach_accept->presencemask |= OGS_NAS_EPS_ATTACH_ACCEPT_T3447_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_ACCEPT_EXTENDED_EMERGENCY_NUMBER_LIST_TYPE:
size = ogs_nas_eps_decode_extended_emergency_number_list(&attach_accept->extended_emergency_number_list, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_emergency_number_list() failed");
+ return size;
+ }
+
attach_accept->presencemask |= OGS_NAS_EPS_ATTACH_ACCEPT_EXTENDED_EMERGENCY_NUMBER_LIST_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_ACCEPT_CIPHERING_KEY_DATA_TYPE:
size = ogs_nas_eps_decode_ciphering_key_data(&attach_accept->ciphering_key_data, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ciphering_key_data() failed");
+ return size;
+ }
+
attach_accept->presencemask |= OGS_NAS_EPS_ATTACH_ACCEPT_CIPHERING_KEY_DATA_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_ACCEPT_UE_RADIO_CAPABILITY_ID_TYPE:
size = ogs_nas_eps_decode_ue_radio_capability_id(&attach_accept->ue_radio_capability_id, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ue_radio_capability_id() failed");
+ return size;
+ }
+
attach_accept->presencemask |= OGS_NAS_EPS_ATTACH_ACCEPT_UE_RADIO_CAPABILITY_ID_PRESENT;
decoded += size;
break;
@@ -450,7 +668,11 @@ int ogs_nas_eps_decode_attach_accept(ogs_nas_eps_message_t *message, ogs_pkbuf_t
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_ue_radio_capability_id_deletion_indication(&attach_accept->ue_radio_capability_id_deletion_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ue_radio_capability_id_deletion_indication() failed");
+ return size;
+ }
+
attach_accept->presencemask |= OGS_NAS_EPS_ATTACH_ACCEPT_UE_RADIO_CAPABILITY_ID_DELETION_INDICATION_PRESENT;
decoded += size;
break;
@@ -472,7 +694,11 @@ int ogs_nas_eps_decode_attach_complete(ogs_nas_eps_message_t *message, ogs_pkbuf
ogs_trace("[NAS] Decode ATTACH_COMPLETE\n");
size = ogs_nas_eps_decode_esm_message_container(&attach_complete->esm_message_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_esm_message_container() failed");
+ return size;
+ }
+
decoded += size;
return decoded;
@@ -487,7 +713,11 @@ int ogs_nas_eps_decode_attach_reject(ogs_nas_eps_message_t *message, ogs_pkbuf_t
ogs_trace("[NAS] Decode ATTACH_REJECT\n");
size = ogs_nas_eps_decode_emm_cause(&attach_reject->emm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_emm_cause() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -495,25 +725,40 @@ int ogs_nas_eps_decode_attach_reject(ogs_nas_eps_message_t *message, ogs_pkbuf_t
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_ATTACH_REJECT_ESM_MESSAGE_CONTAINER_TYPE:
size = ogs_nas_eps_decode_esm_message_container(&attach_reject->esm_message_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_esm_message_container() failed");
+ return size;
+ }
+
attach_reject->presencemask |= OGS_NAS_EPS_ATTACH_REJECT_ESM_MESSAGE_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_REJECT_T3346_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer_2(&attach_reject->t3346_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer_2() failed");
+ return size;
+ }
+
attach_reject->presencemask |= OGS_NAS_EPS_ATTACH_REJECT_T3346_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_REJECT_T3402_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer_2(&attach_reject->t3402_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer_2() failed");
+ return size;
+ }
+
attach_reject->presencemask |= OGS_NAS_EPS_ATTACH_REJECT_T3402_VALUE_PRESENT;
decoded += size;
break;
@@ -521,7 +766,11 @@ int ogs_nas_eps_decode_attach_reject(ogs_nas_eps_message_t *message, ogs_pkbuf_t
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_extended_emm_cause(&attach_reject->extended_emm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_emm_cause() failed");
+ return size;
+ }
+
attach_reject->presencemask |= OGS_NAS_EPS_ATTACH_REJECT_EXTENDED_EMM_CAUSE_PRESENT;
decoded += size;
break;
@@ -543,11 +792,19 @@ int ogs_nas_eps_decode_detach_request_from_ue(ogs_nas_eps_message_t *message, og
ogs_trace("[NAS] Decode DETACH_REQUEST\n");
size = ogs_nas_eps_decode_detach_type(&detach_request_from_ue->detach_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_detach_type() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_eps_decode_eps_mobile_identity(&detach_request_from_ue->eps_mobile_identity, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_mobile_identity() failed");
+ return size;
+ }
+
decoded += size;
return decoded;
@@ -562,7 +819,11 @@ int ogs_nas_eps_decode_detach_request_to_ue(ogs_nas_eps_message_t *message, ogs_
ogs_trace("[NAS] Decode DETACH_REQUEST\n");
size = ogs_nas_eps_decode_detach_type(&detach_request_to_ue->detach_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_detach_type() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -570,13 +831,20 @@ int ogs_nas_eps_decode_detach_request_to_ue(ogs_nas_eps_message_t *message, ogs_
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_DETACH_REQUEST_EMM_CAUSE_TYPE:
size = ogs_nas_eps_decode_emm_cause(&detach_request_to_ue->emm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_emm_cause() failed");
+ return size;
+ }
+
detach_request_to_ue->presencemask |= OGS_NAS_EPS_DETACH_REQUEST_EMM_CAUSE_PRESENT;
decoded += size;
break;
@@ -598,11 +866,19 @@ int ogs_nas_eps_decode_tracking_area_update_request(ogs_nas_eps_message_t *messa
ogs_trace("[NAS] Decode TRACKING_AREA_UPDATE_REQUEST\n");
size = ogs_nas_eps_decode_eps_update_type(&tracking_area_update_request->eps_update_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_update_type() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_eps_decode_eps_mobile_identity(&tracking_area_update_request->old_guti, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_mobile_identity() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -610,7 +886,10 @@ int ogs_nas_eps_decode_tracking_area_update_request(ogs_nas_eps_message_t *messa
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
@@ -618,7 +897,11 @@ int ogs_nas_eps_decode_tracking_area_update_request(ogs_nas_eps_message_t *messa
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_key_set_identifier(&tracking_area_update_request->non_current_native_nas_key_set_identifier, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_key_set_identifier() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_NON_CURRENT_NATIVE_NAS_KEY_SET_IDENTIFIER_PRESENT;
decoded += size;
break;
@@ -626,43 +909,71 @@ int ogs_nas_eps_decode_tracking_area_update_request(ogs_nas_eps_message_t *messa
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_ciphering_key_sequence_number(&tracking_area_update_request->gprs_ciphering_key_sequence_number, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ciphering_key_sequence_number() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_GPRS_CIPHERING_KEY_SEQUENCE_NUMBER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_OLD_P_TMSI_SIGNATURE_TYPE:
size = ogs_nas_eps_decode_p_tmsi_signature(&tracking_area_update_request->old_p_tmsi_signature, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_p_tmsi_signature() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_OLD_P_TMSI_SIGNATURE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_ADDITIONAL_GUTI_TYPE:
size = ogs_nas_eps_decode_eps_mobile_identity(&tracking_area_update_request->additional_guti, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_mobile_identity() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_ADDITIONAL_GUTI_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_NONCEUE_TYPE:
size = ogs_nas_eps_decode_nonce(&tracking_area_update_request->nonceue, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_nonce() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_NONCEUE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_UE_NETWORK_CAPABILITY_TYPE:
size = ogs_nas_eps_decode_ue_network_capability(&tracking_area_update_request->ue_network_capability, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ue_network_capability() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_UE_NETWORK_CAPABILITY_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_LAST_VISITED_REGISTERED_TAI_TYPE:
size = ogs_nas_eps_decode_tracking_area_identity(&tracking_area_update_request->last_visited_registered_tai, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_tracking_area_identity() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_LAST_VISITED_REGISTERED_TAI_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_DRX_PARAMETER_TYPE:
size = ogs_nas_eps_decode_drx_parameter(&tracking_area_update_request->drx_parameter, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_drx_parameter() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_DRX_PARAMETER_PRESENT;
decoded += size;
break;
@@ -670,25 +981,41 @@ int ogs_nas_eps_decode_tracking_area_update_request(ogs_nas_eps_message_t *messa
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_ue_radio_capability_information_update_needed(&tracking_area_update_request->ue_radio_capability_information_update_needed, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ue_radio_capability_information_update_needed() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_UE_RADIO_CAPABILITY_INFORMATION_UPDATE_NEEDED_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_EPS_BEARER_CONTEXT_STATUS_TYPE:
size = ogs_nas_eps_decode_eps_bearer_context_status(&tracking_area_update_request->eps_bearer_context_status, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_bearer_context_status() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_EPS_BEARER_CONTEXT_STATUS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_MS_NETWORK_CAPABILITY_TYPE:
size = ogs_nas_eps_decode_ms_network_capability(&tracking_area_update_request->ms_network_capability, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ms_network_capability() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_MS_NETWORK_CAPABILITY_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_OLD_LOCATION_AREA_IDENTIFICATION_TYPE:
size = ogs_nas_eps_decode_location_area_identification(&tracking_area_update_request->old_location_area_identification, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_location_area_identification() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_OLD_LOCATION_AREA_IDENTIFICATION_PRESENT;
decoded += size;
break;
@@ -696,25 +1023,41 @@ int ogs_nas_eps_decode_tracking_area_update_request(ogs_nas_eps_message_t *messa
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_tmsi_status(&tracking_area_update_request->tmsi_status, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_tmsi_status() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_TMSI_STATUS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_MOBILE_STATION_CLASSMARK_2_TYPE:
size = ogs_nas_eps_decode_mobile_station_classmark_2(&tracking_area_update_request->mobile_station_classmark_2, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_mobile_station_classmark_2() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_MOBILE_STATION_CLASSMARK_2_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_MOBILE_STATION_CLASSMARK_3_TYPE:
size = ogs_nas_eps_decode_mobile_station_classmark_3(&tracking_area_update_request->mobile_station_classmark_3, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_mobile_station_classmark_3() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_MOBILE_STATION_CLASSMARK_3_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_SUPPORTED_CODECS_TYPE:
size = ogs_nas_eps_decode_supported_codec_list(&tracking_area_update_request->supported_codecs, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_supported_codec_list() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_SUPPORTED_CODECS_PRESENT;
decoded += size;
break;
@@ -722,13 +1065,21 @@ int ogs_nas_eps_decode_tracking_area_update_request(ogs_nas_eps_message_t *messa
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_additional_update_type(&tracking_area_update_request->additional_update_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_additional_update_type() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_ADDITIONAL_UPDATE_TYPE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_TYPE:
size = ogs_nas_eps_decode_voice_domain_preference_and_ue_usage_setting(&tracking_area_update_request->voice_domain_preference_and_ue_usage_setting, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_voice_domain_preference_and_ue_usage_setting() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_PRESENT;
decoded += size;
break;
@@ -736,7 +1087,11 @@ int ogs_nas_eps_decode_tracking_area_update_request(ogs_nas_eps_message_t *messa
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_guti_type(&tracking_area_update_request->old_guti_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_guti_type() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_OLD_GUTI_TYPE_PRESENT;
decoded += size;
break;
@@ -744,7 +1099,11 @@ int ogs_nas_eps_decode_tracking_area_update_request(ogs_nas_eps_message_t *messa
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_device_properties(&tracking_area_update_request->device_properties, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_device_properties() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_DEVICE_PROPERTIES_PRESENT;
decoded += size;
break;
@@ -752,55 +1111,91 @@ int ogs_nas_eps_decode_tracking_area_update_request(ogs_nas_eps_message_t *messa
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_ms_network_feature_support(&tracking_area_update_request->ms_network_feature_support, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ms_network_feature_support() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_MS_NETWORK_FEATURE_SUPPORT_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_TMSI_BASED_NRI_CONTAINER_TYPE:
size = ogs_nas_eps_decode_network_resource_identifier_container(&tracking_area_update_request->tmsi_based_nri_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_network_resource_identifier_container() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_TMSI_BASED_NRI_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_T3324_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer_2(&tracking_area_update_request->t3324_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer_2() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_T3324_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_T3412_EXTENDED_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer_3(&tracking_area_update_request->t3412_extended_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer_3() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_T3412_EXTENDED_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_EXTENDED_DRX_PARAMETERS_TYPE:
size = ogs_nas_eps_decode_extended_drx_parameters(&tracking_area_update_request->extended_drx_parameters, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_drx_parameters() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_EXTENDED_DRX_PARAMETERS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_UE_ADDITIONAL_SECURITY_CAPABILITY_TYPE:
size = ogs_nas_eps_decode_ue_additional_security_capability(&tracking_area_update_request->ue_additional_security_capability, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ue_additional_security_capability() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_UE_ADDITIONAL_SECURITY_CAPABILITY_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_UE_STATUS_TYPE:
size = ogs_nas_eps_decode_ue_status(&tracking_area_update_request->ue_status, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ue_status() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_UE_STATUS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_ADDITIONAL_INFORMATION_REQUESTED_TYPE:
size = ogs_nas_eps_decode_additional_information_requested(&tracking_area_update_request->additional_information_requested, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_additional_information_requested() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_ADDITIONAL_INFORMATION_REQUESTED_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_N1_UE_NETWORK_CAPABILITY_TYPE:
size = ogs_nas_eps_decode_n1_ue_network_capability(&tracking_area_update_request->n1_ue_network_capability, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_n1_ue_network_capability() failed");
+ return size;
+ }
+
tracking_area_update_request->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST_N1_UE_NETWORK_CAPABILITY_PRESENT;
decoded += size;
break;
@@ -822,7 +1217,11 @@ int ogs_nas_eps_decode_tracking_area_update_accept(ogs_nas_eps_message_t *messag
ogs_trace("[NAS] Decode TRACKING_AREA_UPDATE_ACCEPT\n");
size = ogs_nas_eps_decode_eps_update_result(&tracking_area_update_accept->eps_update_result, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_update_result() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -830,79 +1229,130 @@ int ogs_nas_eps_decode_tracking_area_update_accept(ogs_nas_eps_message_t *messag
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_T3412_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer(&tracking_area_update_accept->t3412_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_T3412_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_GUTI_TYPE:
size = ogs_nas_eps_decode_eps_mobile_identity(&tracking_area_update_accept->guti, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_mobile_identity() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_GUTI_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_TAI_LIST_TYPE:
size = ogs_nas_eps_decode_tracking_area_identity_list(&tracking_area_update_accept->tai_list, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_tracking_area_identity_list() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_TAI_LIST_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_EPS_BEARER_CONTEXT_STATUS_TYPE:
size = ogs_nas_eps_decode_eps_bearer_context_status(&tracking_area_update_accept->eps_bearer_context_status, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_bearer_context_status() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_EPS_BEARER_CONTEXT_STATUS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_LOCATION_AREA_IDENTIFICATION_TYPE:
size = ogs_nas_eps_decode_location_area_identification(&tracking_area_update_accept->location_area_identification, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_location_area_identification() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_LOCATION_AREA_IDENTIFICATION_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_MS_IDENTITY_TYPE:
size = ogs_nas_eps_decode_mobile_identity(&tracking_area_update_accept->ms_identity, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_mobile_identity() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_MS_IDENTITY_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_EMM_CAUSE_TYPE:
size = ogs_nas_eps_decode_emm_cause(&tracking_area_update_accept->emm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_emm_cause() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_EMM_CAUSE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_T3402_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer(&tracking_area_update_accept->t3402_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_T3402_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_T3423_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer(&tracking_area_update_accept->t3423_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_T3423_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_EQUIVALENT_PLMNS_TYPE:
size = ogs_nas_eps_decode_plmn_list(&tracking_area_update_accept->equivalent_plmns, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_plmn_list() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_EQUIVALENT_PLMNS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_EMERGENCY_NUMBER_LIST_TYPE:
size = ogs_nas_eps_decode_emergency_number_list(&tracking_area_update_accept->emergency_number_list, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_emergency_number_list() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_EMERGENCY_NUMBER_LIST_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_EPS_NETWORK_FEATURE_SUPPORT_TYPE:
size = ogs_nas_eps_decode_eps_network_feature_support(&tracking_area_update_accept->eps_network_feature_support, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_network_feature_support() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_EPS_NETWORK_FEATURE_SUPPORT_PRESENT;
decoded += size;
break;
@@ -910,37 +1360,61 @@ int ogs_nas_eps_decode_tracking_area_update_accept(ogs_nas_eps_message_t *messag
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_additional_update_result(&tracking_area_update_accept->additional_update_result, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_additional_update_result() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_ADDITIONAL_UPDATE_RESULT_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_T3412_EXTENDED_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer_3(&tracking_area_update_accept->t3412_extended_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer_3() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_T3412_EXTENDED_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_T3324_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer_2(&tracking_area_update_accept->t3324_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer_2() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_T3324_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_EXTENDED_DRX_PARAMETERS_TYPE:
size = ogs_nas_eps_decode_extended_drx_parameters(&tracking_area_update_accept->extended_drx_parameters, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_drx_parameters() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_EXTENDED_DRX_PARAMETERS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_HEADER_COMPRESSION_CONFIGURATION_STATUS_TYPE:
size = ogs_nas_eps_decode_header_compression_configuration_status(&tracking_area_update_accept->header_compression_configuration_status, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_header_compression_configuration_status() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_HEADER_COMPRESSION_CONFIGURATION_STATUS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_DCN_ID_TYPE:
size = ogs_nas_eps_decode_dcn_id(&tracking_area_update_accept->dcn_id, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_dcn_id() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_DCN_ID_PRESENT;
decoded += size;
break;
@@ -948,7 +1422,11 @@ int ogs_nas_eps_decode_tracking_area_update_accept(ogs_nas_eps_message_t *messag
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_sms_services_status(&tracking_area_update_accept->sms_services_status, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_sms_services_status() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_SMS_SERVICES_STATUS_PRESENT;
decoded += size;
break;
@@ -956,13 +1434,21 @@ int ogs_nas_eps_decode_tracking_area_update_accept(ogs_nas_eps_message_t *messag
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_non__nw_provided_policies(&tracking_area_update_accept->non__nw_policies, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_non__nw_provided_policies() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_NON__NW_POLICIES_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_T3448_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer_2(&tracking_area_update_accept->t3448_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer_2() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_T3448_VALUE_PRESENT;
decoded += size;
break;
@@ -970,31 +1456,51 @@ int ogs_nas_eps_decode_tracking_area_update_accept(ogs_nas_eps_message_t *messag
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_network_policy(&tracking_area_update_accept->network_policy, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_network_policy() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_NETWORK_POLICY_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_T3447_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer_3(&tracking_area_update_accept->t3447_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer_3() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_T3447_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_EXTENDED_EMERGENCY_NUMBER_LIST_TYPE:
size = ogs_nas_eps_decode_extended_emergency_number_list(&tracking_area_update_accept->extended_emergency_number_list, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_emergency_number_list() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_EXTENDED_EMERGENCY_NUMBER_LIST_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_CIPHERING_KEY_DATA_TYPE:
size = ogs_nas_eps_decode_ciphering_key_data(&tracking_area_update_accept->ciphering_key_data, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ciphering_key_data() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_CIPHERING_KEY_DATA_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_UE_RADIO_CAPABILITY_ID_TYPE:
size = ogs_nas_eps_decode_ue_radio_capability_id(&tracking_area_update_accept->ue_radio_capability_id, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ue_radio_capability_id() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_UE_RADIO_CAPABILITY_ID_PRESENT;
decoded += size;
break;
@@ -1002,7 +1508,11 @@ int ogs_nas_eps_decode_tracking_area_update_accept(ogs_nas_eps_message_t *messag
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_ue_radio_capability_id_deletion_indication(&tracking_area_update_accept->ue_radio_capability_id_deletion_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ue_radio_capability_id_deletion_indication() failed");
+ return size;
+ }
+
tracking_area_update_accept->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT_UE_RADIO_CAPABILITY_ID_DELETION_INDICATION_PRESENT;
decoded += size;
break;
@@ -1024,7 +1534,11 @@ int ogs_nas_eps_decode_tracking_area_update_reject(ogs_nas_eps_message_t *messag
ogs_trace("[NAS] Decode TRACKING_AREA_UPDATE_REJECT\n");
size = ogs_nas_eps_decode_emm_cause(&tracking_area_update_reject->emm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_emm_cause() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -1032,13 +1546,20 @@ int ogs_nas_eps_decode_tracking_area_update_reject(ogs_nas_eps_message_t *messag
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REJECT_T3346_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer_2(&tracking_area_update_reject->t3346_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer_2() failed");
+ return size;
+ }
+
tracking_area_update_reject->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REJECT_T3346_VALUE_PRESENT;
decoded += size;
break;
@@ -1046,7 +1567,11 @@ int ogs_nas_eps_decode_tracking_area_update_reject(ogs_nas_eps_message_t *messag
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_extended_emm_cause(&tracking_area_update_reject->extended_emm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_emm_cause() failed");
+ return size;
+ }
+
tracking_area_update_reject->presencemask |= OGS_NAS_EPS_TRACKING_AREA_UPDATE_REJECT_EXTENDED_EMM_CAUSE_PRESENT;
decoded += size;
break;
@@ -1068,11 +1593,19 @@ int ogs_nas_eps_decode_extended_service_request(ogs_nas_eps_message_t *message,
ogs_trace("[NAS] Decode EXTENDED_SERVICE_REQUEST\n");
size = ogs_nas_eps_decode_service_type(&extended_service_request->service_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_service_type() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_eps_decode_mobile_identity(&extended_service_request->m_tmsi, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_mobile_identity() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -1080,7 +1613,10 @@ int ogs_nas_eps_decode_extended_service_request(ogs_nas_eps_message_t *message,
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
@@ -1088,13 +1624,21 @@ int ogs_nas_eps_decode_extended_service_request(ogs_nas_eps_message_t *message,
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_csfb_response(&extended_service_request->csfb_response, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_csfb_response() failed");
+ return size;
+ }
+
extended_service_request->presencemask |= OGS_NAS_EPS_EXTENDED_SERVICE_REQUEST_CSFB_RESPONSE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_EXTENDED_SERVICE_REQUEST_EPS_BEARER_CONTEXT_STATUS_TYPE:
size = ogs_nas_eps_decode_eps_bearer_context_status(&extended_service_request->eps_bearer_context_status, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_bearer_context_status() failed");
+ return size;
+ }
+
extended_service_request->presencemask |= OGS_NAS_EPS_EXTENDED_SERVICE_REQUEST_EPS_BEARER_CONTEXT_STATUS_PRESENT;
decoded += size;
break;
@@ -1102,7 +1646,11 @@ int ogs_nas_eps_decode_extended_service_request(ogs_nas_eps_message_t *message,
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_device_properties(&extended_service_request->device_properties, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_device_properties() failed");
+ return size;
+ }
+
extended_service_request->presencemask |= OGS_NAS_EPS_EXTENDED_SERVICE_REQUEST_DEVICE_PROPERTIES_PRESENT;
decoded += size;
break;
@@ -1124,11 +1672,19 @@ int ogs_nas_eps_decode_service_request(ogs_nas_eps_message_t *message, ogs_pkbuf
ogs_trace("[NAS] Decode SERVICE_REQUEST\n");
size = ogs_nas_eps_decode_ksi_and_sequence_number(&service_request->ksi_and_sequence_number, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ksi_and_sequence_number() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_eps_decode_short_mac(&service_request->message_authentication_code, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_short_mac() failed");
+ return size;
+ }
+
decoded += size;
return decoded;
@@ -1143,7 +1699,11 @@ int ogs_nas_eps_decode_service_reject(ogs_nas_eps_message_t *message, ogs_pkbuf_
ogs_trace("[NAS] Decode SERVICE_REJECT\n");
size = ogs_nas_eps_decode_emm_cause(&service_reject->emm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_emm_cause() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -1151,19 +1711,30 @@ int ogs_nas_eps_decode_service_reject(ogs_nas_eps_message_t *message, ogs_pkbuf_
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_SERVICE_REJECT_T3346_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer_2(&service_reject->t3346_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer_2() failed");
+ return size;
+ }
+
service_reject->presencemask |= OGS_NAS_EPS_SERVICE_REJECT_T3346_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_SERVICE_REJECT_T3448_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer_2(&service_reject->t3448_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer_2() failed");
+ return size;
+ }
+
service_reject->presencemask |= OGS_NAS_EPS_SERVICE_REJECT_T3448_VALUE_PRESENT;
decoded += size;
break;
@@ -1185,7 +1756,11 @@ int ogs_nas_eps_decode_guti_reallocation_command(ogs_nas_eps_message_t *message,
ogs_trace("[NAS] Decode GUTI_REALLOCATION_COMMAND\n");
size = ogs_nas_eps_decode_eps_mobile_identity(&guti_reallocation_command->guti, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_mobile_identity() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -1193,25 +1768,40 @@ int ogs_nas_eps_decode_guti_reallocation_command(ogs_nas_eps_message_t *message,
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_GUTI_REALLOCATION_COMMAND_TAI_LIST_TYPE:
size = ogs_nas_eps_decode_tracking_area_identity_list(&guti_reallocation_command->tai_list, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_tracking_area_identity_list() failed");
+ return size;
+ }
+
guti_reallocation_command->presencemask |= OGS_NAS_EPS_GUTI_REALLOCATION_COMMAND_TAI_LIST_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_GUTI_REALLOCATION_COMMAND_DCN_ID_TYPE:
size = ogs_nas_eps_decode_dcn_id(&guti_reallocation_command->dcn_id, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_dcn_id() failed");
+ return size;
+ }
+
guti_reallocation_command->presencemask |= OGS_NAS_EPS_GUTI_REALLOCATION_COMMAND_DCN_ID_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_GUTI_REALLOCATION_COMMAND_UE_RADIO_CAPABILITY_ID_TYPE:
size = ogs_nas_eps_decode_ue_radio_capability_id(&guti_reallocation_command->ue_radio_capability_id, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ue_radio_capability_id() failed");
+ return size;
+ }
+
guti_reallocation_command->presencemask |= OGS_NAS_EPS_GUTI_REALLOCATION_COMMAND_UE_RADIO_CAPABILITY_ID_PRESENT;
decoded += size;
break;
@@ -1219,7 +1809,11 @@ int ogs_nas_eps_decode_guti_reallocation_command(ogs_nas_eps_message_t *message,
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_ue_radio_capability_id_deletion_indication(&guti_reallocation_command->ue_radio_capability_id_deletion_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ue_radio_capability_id_deletion_indication() failed");
+ return size;
+ }
+
guti_reallocation_command->presencemask |= OGS_NAS_EPS_GUTI_REALLOCATION_COMMAND_UE_RADIO_CAPABILITY_ID_DELETION_INDICATION_PRESENT;
decoded += size;
break;
@@ -1241,15 +1835,27 @@ int ogs_nas_eps_decode_authentication_request(ogs_nas_eps_message_t *message, og
ogs_trace("[NAS] Decode AUTHENTICATION_REQUEST\n");
size = ogs_nas_eps_decode_key_set_identifier(&authentication_request->nas_key_set_identifierasme, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_key_set_identifier() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_eps_decode_authentication_parameter_rand(&authentication_request->authentication_parameter_rand, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_authentication_parameter_rand() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_eps_decode_authentication_parameter_autn(&authentication_request->authentication_parameter_autn, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_authentication_parameter_autn() failed");
+ return size;
+ }
+
decoded += size;
return decoded;
@@ -1264,7 +1870,11 @@ int ogs_nas_eps_decode_authentication_response(ogs_nas_eps_message_t *message, o
ogs_trace("[NAS] Decode AUTHENTICATION_RESPONSE\n");
size = ogs_nas_eps_decode_authentication_response_parameter(&authentication_response->authentication_response_parameter, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_authentication_response_parameter() failed");
+ return size;
+ }
+
decoded += size;
return decoded;
@@ -1279,7 +1889,11 @@ int ogs_nas_eps_decode_identity_request(ogs_nas_eps_message_t *message, ogs_pkbu
ogs_trace("[NAS] Decode IDENTITY_REQUEST\n");
size = ogs_nas_eps_decode_identity_type_2(&identity_request->identity_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_identity_type_2() failed");
+ return size;
+ }
+
decoded += size;
return decoded;
@@ -1294,7 +1908,11 @@ int ogs_nas_eps_decode_identity_response(ogs_nas_eps_message_t *message, ogs_pkb
ogs_trace("[NAS] Decode IDENTITY_RESPONSE\n");
size = ogs_nas_eps_decode_mobile_identity(&identity_response->mobile_identity, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_mobile_identity() failed");
+ return size;
+ }
+
decoded += size;
return decoded;
@@ -1309,7 +1927,11 @@ int ogs_nas_eps_decode_authentication_failure(ogs_nas_eps_message_t *message, og
ogs_trace("[NAS] Decode AUTHENTICATION_FAILURE\n");
size = ogs_nas_eps_decode_emm_cause(&authentication_failure->emm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_emm_cause() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -1317,13 +1939,20 @@ int ogs_nas_eps_decode_authentication_failure(ogs_nas_eps_message_t *message, og
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_AUTHENTICATION_FAILURE_AUTHENTICATION_FAILURE_PARAMETER_TYPE:
size = ogs_nas_eps_decode_authentication_failure_parameter(&authentication_failure->authentication_failure_parameter, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_authentication_failure_parameter() failed");
+ return size;
+ }
+
authentication_failure->presencemask |= OGS_NAS_EPS_AUTHENTICATION_FAILURE_AUTHENTICATION_FAILURE_PARAMETER_PRESENT;
decoded += size;
break;
@@ -1345,15 +1974,27 @@ int ogs_nas_eps_decode_security_mode_command(ogs_nas_eps_message_t *message, ogs
ogs_trace("[NAS] Decode SECURITY_MODE_COMMAND\n");
size = ogs_nas_eps_decode_security_algorithms(&security_mode_command->selected_nas_security_algorithms, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_security_algorithms() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_eps_decode_key_set_identifier(&security_mode_command->nas_key_set_identifier, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_key_set_identifier() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_eps_decode_ue_security_capability(&security_mode_command->replayed_ue_security_capabilities, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ue_security_capability() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -1361,7 +2002,10 @@ int ogs_nas_eps_decode_security_mode_command(ogs_nas_eps_message_t *message, ogs
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
@@ -1369,31 +2013,51 @@ int ogs_nas_eps_decode_security_mode_command(ogs_nas_eps_message_t *message, ogs
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_imeisv_request(&security_mode_command->imeisv_request, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_imeisv_request() failed");
+ return size;
+ }
+
security_mode_command->presencemask |= OGS_NAS_EPS_SECURITY_MODE_COMMAND_IMEISV_REQUEST_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_SECURITY_MODE_COMMAND_REPLAYED_NONCEUE_TYPE:
size = ogs_nas_eps_decode_nonce(&security_mode_command->replayed_nonceue, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_nonce() failed");
+ return size;
+ }
+
security_mode_command->presencemask |= OGS_NAS_EPS_SECURITY_MODE_COMMAND_REPLAYED_NONCEUE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_SECURITY_MODE_COMMAND_NONCEMME_TYPE:
size = ogs_nas_eps_decode_nonce(&security_mode_command->noncemme, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_nonce() failed");
+ return size;
+ }
+
security_mode_command->presencemask |= OGS_NAS_EPS_SECURITY_MODE_COMMAND_NONCEMME_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_SECURITY_MODE_COMMAND_HASHMME_TYPE:
size = ogs_nas_eps_decode_hashmme(&security_mode_command->hashmme, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_hashmme() failed");
+ return size;
+ }
+
security_mode_command->presencemask |= OGS_NAS_EPS_SECURITY_MODE_COMMAND_HASHMME_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_SECURITY_MODE_COMMAND_REPLAYED_UE_ADDITIONAL_SECURITY_CAPABILITY_TYPE:
size = ogs_nas_eps_decode_ue_additional_security_capability(&security_mode_command->replayed_ue_additional_security_capability, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ue_additional_security_capability() failed");
+ return size;
+ }
+
security_mode_command->presencemask |= OGS_NAS_EPS_SECURITY_MODE_COMMAND_REPLAYED_UE_ADDITIONAL_SECURITY_CAPABILITY_PRESENT;
decoded += size;
break;
@@ -1401,7 +2065,11 @@ int ogs_nas_eps_decode_security_mode_command(ogs_nas_eps_message_t *message, ogs
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_ue_radio_capability_id_request(&security_mode_command->ue_radio_capability_id_request, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ue_radio_capability_id_request() failed");
+ return size;
+ }
+
security_mode_command->presencemask |= OGS_NAS_EPS_SECURITY_MODE_COMMAND_UE_RADIO_CAPABILITY_ID_REQUEST_PRESENT;
decoded += size;
break;
@@ -1427,25 +2095,40 @@ int ogs_nas_eps_decode_security_mode_complete(ogs_nas_eps_message_t *message, og
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_SECURITY_MODE_COMPLETE_IMEISV_TYPE:
size = ogs_nas_eps_decode_mobile_identity(&security_mode_complete->imeisv, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_mobile_identity() failed");
+ return size;
+ }
+
security_mode_complete->presencemask |= OGS_NAS_EPS_SECURITY_MODE_COMPLETE_IMEISV_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_SECURITY_MODE_COMPLETE_REPLAYED_NAS_MESSAGE_CONTAINER_TYPE:
size = ogs_nas_eps_decode_replayed_nas_message_container(&security_mode_complete->replayed_nas_message_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_replayed_nas_message_container() failed");
+ return size;
+ }
+
security_mode_complete->presencemask |= OGS_NAS_EPS_SECURITY_MODE_COMPLETE_REPLAYED_NAS_MESSAGE_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_SECURITY_MODE_COMPLETE_UE_RADIO_CAPABILITY_ID_TYPE:
size = ogs_nas_eps_decode_ue_radio_capability_id(&security_mode_complete->ue_radio_capability_id, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ue_radio_capability_id() failed");
+ return size;
+ }
+
security_mode_complete->presencemask |= OGS_NAS_EPS_SECURITY_MODE_COMPLETE_UE_RADIO_CAPABILITY_ID_PRESENT;
decoded += size;
break;
@@ -1467,7 +2150,11 @@ int ogs_nas_eps_decode_security_mode_reject(ogs_nas_eps_message_t *message, ogs_
ogs_trace("[NAS] Decode SECURITY_MODE_REJECT\n");
size = ogs_nas_eps_decode_emm_cause(&security_mode_reject->emm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_emm_cause() failed");
+ return size;
+ }
+
decoded += size;
return decoded;
@@ -1482,7 +2169,11 @@ int ogs_nas_eps_decode_emm_status(ogs_nas_eps_message_t *message, ogs_pkbuf_t *p
ogs_trace("[NAS] Decode EMM_STATUS\n");
size = ogs_nas_eps_decode_emm_cause(&emm_status->emm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_emm_cause() failed");
+ return size;
+ }
+
decoded += size;
return decoded;
@@ -1501,37 +2192,60 @@ int ogs_nas_eps_decode_emm_information(ogs_nas_eps_message_t *message, ogs_pkbuf
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_EMM_INFORMATION_FULL_NAME_FOR_NETWORK_TYPE:
size = ogs_nas_eps_decode_network_name(&emm_information->full_name_for_network, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_network_name() failed");
+ return size;
+ }
+
emm_information->presencemask |= OGS_NAS_EPS_EMM_INFORMATION_FULL_NAME_FOR_NETWORK_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_EMM_INFORMATION_SHORT_NAME_FOR_NETWORK_TYPE:
size = ogs_nas_eps_decode_network_name(&emm_information->short_name_for_network, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_network_name() failed");
+ return size;
+ }
+
emm_information->presencemask |= OGS_NAS_EPS_EMM_INFORMATION_SHORT_NAME_FOR_NETWORK_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_EMM_INFORMATION_LOCAL_TIME_ZONE_TYPE:
size = ogs_nas_eps_decode_time_zone(&emm_information->local_time_zone, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_time_zone() failed");
+ return size;
+ }
+
emm_information->presencemask |= OGS_NAS_EPS_EMM_INFORMATION_LOCAL_TIME_ZONE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_EMM_INFORMATION_UNIVERSAL_TIME_AND_LOCAL_TIME_ZONE_TYPE:
size = ogs_nas_eps_decode_time_zone_and_time(&emm_information->universal_time_and_local_time_zone, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_time_zone_and_time() failed");
+ return size;
+ }
+
emm_information->presencemask |= OGS_NAS_EPS_EMM_INFORMATION_UNIVERSAL_TIME_AND_LOCAL_TIME_ZONE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_EMM_INFORMATION_NETWORK_DAYLIGHT_SAVING_TIME_TYPE:
size = ogs_nas_eps_decode_daylight_saving_time(&emm_information->network_daylight_saving_time, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_daylight_saving_time() failed");
+ return size;
+ }
+
emm_information->presencemask |= OGS_NAS_EPS_EMM_INFORMATION_NETWORK_DAYLIGHT_SAVING_TIME_PRESENT;
decoded += size;
break;
@@ -1553,7 +2267,11 @@ int ogs_nas_eps_decode_downlink_nas_transport(ogs_nas_eps_message_t *message, og
ogs_trace("[NAS] Decode DOWNLINK_NAS_TRANSPORT\n");
size = ogs_nas_eps_decode_eps_message_container(&downlink_nas_transport->nas_message_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_message_container() failed");
+ return size;
+ }
+
decoded += size;
return decoded;
@@ -1568,7 +2286,11 @@ int ogs_nas_eps_decode_uplink_nas_transport(ogs_nas_eps_message_t *message, ogs_
ogs_trace("[NAS] Decode UPLINK_NAS_TRANSPORT\n");
size = ogs_nas_eps_decode_eps_message_container(&uplink_nas_transport->nas_message_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_message_container() failed");
+ return size;
+ }
+
decoded += size;
return decoded;
@@ -1583,7 +2305,11 @@ int ogs_nas_eps_decode_cs_service_notification(ogs_nas_eps_message_t *message, o
ogs_trace("[NAS] Decode CS_SERVICE_NOTIFICATION\n");
size = ogs_nas_eps_decode_paging_identity(&cs_service_notification->paging_identity, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_paging_identity() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -1591,31 +2317,50 @@ int ogs_nas_eps_decode_cs_service_notification(ogs_nas_eps_message_t *message, o
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_CS_SERVICE_NOTIFICATION_CLI_TYPE:
size = ogs_nas_eps_decode_cli(&cs_service_notification->cli, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_cli() failed");
+ return size;
+ }
+
cs_service_notification->presencemask |= OGS_NAS_EPS_CS_SERVICE_NOTIFICATION_CLI_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_CS_SERVICE_NOTIFICATION_SS_CODE_TYPE:
size = ogs_nas_eps_decode_ss_code(&cs_service_notification->ss_code, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_ss_code() failed");
+ return size;
+ }
+
cs_service_notification->presencemask |= OGS_NAS_EPS_CS_SERVICE_NOTIFICATION_SS_CODE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_CS_SERVICE_NOTIFICATION_LCS_INDICATOR_TYPE:
size = ogs_nas_eps_decode_lcs_indicator(&cs_service_notification->lcs_indicator, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_lcs_indicator() failed");
+ return size;
+ }
+
cs_service_notification->presencemask |= OGS_NAS_EPS_CS_SERVICE_NOTIFICATION_LCS_INDICATOR_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_CS_SERVICE_NOTIFICATION_LCS_CLIENT_IDENTITY_TYPE:
size = ogs_nas_eps_decode_lcs_client_identity(&cs_service_notification->lcs_client_identity, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_lcs_client_identity() failed");
+ return size;
+ }
+
cs_service_notification->presencemask |= OGS_NAS_EPS_CS_SERVICE_NOTIFICATION_LCS_CLIENT_IDENTITY_PRESENT;
decoded += size;
break;
@@ -1637,11 +2382,19 @@ int ogs_nas_eps_decode_uplink_generic_nas_transport(ogs_nas_eps_message_t *messa
ogs_trace("[NAS] Decode UPLINK_GENERIC_NAS_TRANSPORT\n");
size = ogs_nas_eps_decode_generic_message_container_type(&uplink_generic_nas_transport->generic_message_container_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_generic_message_container_type() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_eps_decode_generic_message_container(&uplink_generic_nas_transport->generic_message_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_generic_message_container() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -1649,13 +2402,20 @@ int ogs_nas_eps_decode_uplink_generic_nas_transport(ogs_nas_eps_message_t *messa
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_UPLINK_GENERIC_NAS_TRANSPORT_ADDITIONAL_INFORMATION_TYPE:
size = ogs_nas_eps_decode_additional_information(&uplink_generic_nas_transport->additional_information, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_additional_information() failed");
+ return size;
+ }
+
uplink_generic_nas_transport->presencemask |= OGS_NAS_EPS_UPLINK_GENERIC_NAS_TRANSPORT_ADDITIONAL_INFORMATION_PRESENT;
decoded += size;
break;
@@ -1677,11 +2437,19 @@ int ogs_nas_eps_decode_downlink_generic_nas_transport(ogs_nas_eps_message_t *mes
ogs_trace("[NAS] Decode DOWNLINK_GENERIC_NAS_TRANSPORT\n");
size = ogs_nas_eps_decode_generic_message_container_type(&downlink_generic_nas_transport->generic_message_container_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_generic_message_container_type() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_eps_decode_generic_message_container(&downlink_generic_nas_transport->generic_message_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_generic_message_container() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -1689,13 +2457,20 @@ int ogs_nas_eps_decode_downlink_generic_nas_transport(ogs_nas_eps_message_t *mes
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_DOWNLINK_GENERIC_NAS_TRANSPORT_ADDITIONAL_INFORMATION_TYPE:
size = ogs_nas_eps_decode_additional_information(&downlink_generic_nas_transport->additional_information, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_additional_information() failed");
+ return size;
+ }
+
downlink_generic_nas_transport->presencemask |= OGS_NAS_EPS_DOWNLINK_GENERIC_NAS_TRANSPORT_ADDITIONAL_INFORMATION_PRESENT;
decoded += size;
break;
@@ -1717,15 +2492,27 @@ int ogs_nas_eps_decode_activate_default_eps_bearer_context_request(ogs_nas_eps_m
ogs_trace("[NAS] Decode ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST\n");
size = ogs_nas_eps_decode_eps_quality_of_service(&activate_default_eps_bearer_context_request->eps_qos, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_quality_of_service() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_eps_decode_access_point_name(&activate_default_eps_bearer_context_request->access_point_name, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_access_point_name() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_eps_decode_pdn_address(&activate_default_eps_bearer_context_request->pdn_address, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_pdn_address() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -1733,25 +2520,40 @@ int ogs_nas_eps_decode_activate_default_eps_bearer_context_request(ogs_nas_eps_m
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_TRANSACTION_IDENTIFIER_TYPE:
size = ogs_nas_eps_decode_transaction_identifier(&activate_default_eps_bearer_context_request->transaction_identifier, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_transaction_identifier() failed");
+ return size;
+ }
+
activate_default_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_TRANSACTION_IDENTIFIER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_QOS_TYPE:
size = ogs_nas_eps_decode_quality_of_service(&activate_default_eps_bearer_context_request->negotiated_qos, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_quality_of_service() failed");
+ return size;
+ }
+
activate_default_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_QOS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_TYPE:
size = ogs_nas_eps_decode_llc_service_access_point_identifier(&activate_default_eps_bearer_context_request->negotiated_llc_sapi, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_llc_service_access_point_identifier() failed");
+ return size;
+ }
+
activate_default_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_PRESENT;
decoded += size;
break;
@@ -1759,31 +2561,51 @@ int ogs_nas_eps_decode_activate_default_eps_bearer_context_request(ogs_nas_eps_m
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_radio_priority(&activate_default_eps_bearer_context_request->radio_priority, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_radio_priority() failed");
+ return size;
+ }
+
activate_default_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_RADIO_PRIORITY_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_TYPE:
size = ogs_nas_eps_decode_packet_flow_identifier(&activate_default_eps_bearer_context_request->packet_flow_identifier, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_packet_flow_identifier() failed");
+ return size;
+ }
+
activate_default_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_APN_AMBR_TYPE:
size = ogs_nas_eps_decode_apn_aggregate_maximum_bit_rate(&activate_default_eps_bearer_context_request->apn_ambr, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_apn_aggregate_maximum_bit_rate() failed");
+ return size;
+ }
+
activate_default_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_APN_AMBR_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_ESM_CAUSE_TYPE:
size = ogs_nas_eps_decode_esm_cause(&activate_default_eps_bearer_context_request->esm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_esm_cause() failed");
+ return size;
+ }
+
activate_default_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_ESM_CAUSE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_protocol_configuration_options(&activate_default_eps_bearer_context_request->protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_protocol_configuration_options() failed");
+ return size;
+ }
+
activate_default_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -1791,7 +2613,11 @@ int ogs_nas_eps_decode_activate_default_eps_bearer_context_request(ogs_nas_eps_m
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_connectivity_type(&activate_default_eps_bearer_context_request->connectivity_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_connectivity_type() failed");
+ return size;
+ }
+
activate_default_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_CONNECTIVITY_TYPE_PRESENT;
decoded += size;
break;
@@ -1799,19 +2625,31 @@ int ogs_nas_eps_decode_activate_default_eps_bearer_context_request(ogs_nas_eps_m
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_wlan_offload_acceptability(&activate_default_eps_bearer_context_request->wlan_offload_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_wlan_offload_acceptability() failed");
+ return size;
+ }
+
activate_default_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_TYPE:
size = ogs_nas_eps_decode_nbifom_container(&activate_default_eps_bearer_context_request->nbifom_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_nbifom_container() failed");
+ return size;
+ }
+
activate_default_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_HEADER_COMPRESSION_CONFIGURATION_TYPE:
size = ogs_nas_eps_decode_header_compression_configuration(&activate_default_eps_bearer_context_request->header_compression_configuration, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_header_compression_configuration() failed");
+ return size;
+ }
+
activate_default_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_HEADER_COMPRESSION_CONFIGURATION_PRESENT;
decoded += size;
break;
@@ -1819,25 +2657,41 @@ int ogs_nas_eps_decode_activate_default_eps_bearer_context_request(ogs_nas_eps_m
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_control_plane_only_indication(&activate_default_eps_bearer_context_request->control_plane_only_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_control_plane_only_indication() failed");
+ return size;
+ }
+
activate_default_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_CONTROL_PLANE_ONLY_INDICATION_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_extended_protocol_configuration_options(&activate_default_eps_bearer_context_request->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
activate_default_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_SERVING_PLMN_RATE_CONTROL_TYPE:
size = ogs_nas_eps_decode_serving_plmn_rate_control(&activate_default_eps_bearer_context_request->serving_plmn_rate_control, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_serving_plmn_rate_control() failed");
+ return size;
+ }
+
activate_default_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_SERVING_PLMN_RATE_CONTROL_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_APN_AMBR_TYPE:
size = ogs_nas_eps_decode_extended_apn_aggregate_maximum_bit_rate(&activate_default_eps_bearer_context_request->extended_apn_ambr, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_apn_aggregate_maximum_bit_rate() failed");
+ return size;
+ }
+
activate_default_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_APN_AMBR_PRESENT;
decoded += size;
break;
@@ -1863,19 +2717,30 @@ int ogs_nas_eps_decode_activate_default_eps_bearer_context_accept(ogs_nas_eps_me
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_protocol_configuration_options(&activate_default_eps_bearer_context_accept->protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_protocol_configuration_options() failed");
+ return size;
+ }
+
activate_default_eps_bearer_context_accept->presencemask |= OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_extended_protocol_configuration_options(&activate_default_eps_bearer_context_accept->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
activate_default_eps_bearer_context_accept->presencemask |= OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -1897,7 +2762,11 @@ int ogs_nas_eps_decode_activate_default_eps_bearer_context_reject(ogs_nas_eps_me
ogs_trace("[NAS] Decode ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT\n");
size = ogs_nas_eps_decode_esm_cause(&activate_default_eps_bearer_context_reject->esm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_esm_cause() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -1905,19 +2774,30 @@ int ogs_nas_eps_decode_activate_default_eps_bearer_context_reject(ogs_nas_eps_me
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_protocol_configuration_options(&activate_default_eps_bearer_context_reject->protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_protocol_configuration_options() failed");
+ return size;
+ }
+
activate_default_eps_bearer_context_reject->presencemask |= OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_extended_protocol_configuration_options(&activate_default_eps_bearer_context_reject->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
activate_default_eps_bearer_context_reject->presencemask |= OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -1939,15 +2819,27 @@ int ogs_nas_eps_decode_activate_dedicated_eps_bearer_context_request(ogs_nas_eps
ogs_trace("[NAS] Decode ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST\n");
size = ogs_nas_eps_decode_linked_eps_bearer_identity(&activate_dedicated_eps_bearer_context_request->linked_eps_bearer_identity, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_linked_eps_bearer_identity() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_eps_decode_eps_quality_of_service(&activate_dedicated_eps_bearer_context_request->eps_qos, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_quality_of_service() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_eps_decode_traffic_flow_template(&activate_dedicated_eps_bearer_context_request->tft, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_traffic_flow_template() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -1955,25 +2847,40 @@ int ogs_nas_eps_decode_activate_dedicated_eps_bearer_context_request(ogs_nas_eps
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_TRANSACTION_IDENTIFIER_TYPE:
size = ogs_nas_eps_decode_transaction_identifier(&activate_dedicated_eps_bearer_context_request->transaction_identifier, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_transaction_identifier() failed");
+ return size;
+ }
+
activate_dedicated_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_TRANSACTION_IDENTIFIER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_QOS_TYPE:
size = ogs_nas_eps_decode_quality_of_service(&activate_dedicated_eps_bearer_context_request->negotiated_qos, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_quality_of_service() failed");
+ return size;
+ }
+
activate_dedicated_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_QOS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_TYPE:
size = ogs_nas_eps_decode_llc_service_access_point_identifier(&activate_dedicated_eps_bearer_context_request->negotiated_llc_sapi, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_llc_service_access_point_identifier() failed");
+ return size;
+ }
+
activate_dedicated_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_PRESENT;
decoded += size;
break;
@@ -1981,19 +2888,31 @@ int ogs_nas_eps_decode_activate_dedicated_eps_bearer_context_request(ogs_nas_eps
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_radio_priority(&activate_dedicated_eps_bearer_context_request->radio_priority, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_radio_priority() failed");
+ return size;
+ }
+
activate_dedicated_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_RADIO_PRIORITY_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_TYPE:
size = ogs_nas_eps_decode_packet_flow_identifier(&activate_dedicated_eps_bearer_context_request->packet_flow_identifier, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_packet_flow_identifier() failed");
+ return size;
+ }
+
activate_dedicated_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_protocol_configuration_options(&activate_dedicated_eps_bearer_context_request->protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_protocol_configuration_options() failed");
+ return size;
+ }
+
activate_dedicated_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2001,25 +2920,41 @@ int ogs_nas_eps_decode_activate_dedicated_eps_bearer_context_request(ogs_nas_eps
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_wlan_offload_acceptability(&activate_dedicated_eps_bearer_context_request->wlan_offload_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_wlan_offload_acceptability() failed");
+ return size;
+ }
+
activate_dedicated_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_TYPE:
size = ogs_nas_eps_decode_nbifom_container(&activate_dedicated_eps_bearer_context_request->nbifom_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_nbifom_container() failed");
+ return size;
+ }
+
activate_dedicated_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_extended_protocol_configuration_options(&activate_dedicated_eps_bearer_context_request->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
activate_dedicated_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_EPS_QOS_TYPE:
size = ogs_nas_eps_decode_extended_quality_of_service(&activate_dedicated_eps_bearer_context_request->extended_eps_qos, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_quality_of_service() failed");
+ return size;
+ }
+
activate_dedicated_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_EPS_QOS_PRESENT;
decoded += size;
break;
@@ -2045,25 +2980,40 @@ int ogs_nas_eps_decode_activate_dedicated_eps_bearer_context_accept(ogs_nas_eps_
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_protocol_configuration_options(&activate_dedicated_eps_bearer_context_accept->protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_protocol_configuration_options() failed");
+ return size;
+ }
+
activate_dedicated_eps_bearer_context_accept->presencemask |= OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_NBIFOM_CONTAINER_TYPE:
size = ogs_nas_eps_decode_nbifom_container(&activate_dedicated_eps_bearer_context_accept->nbifom_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_nbifom_container() failed");
+ return size;
+ }
+
activate_dedicated_eps_bearer_context_accept->presencemask |= OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_NBIFOM_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_extended_protocol_configuration_options(&activate_dedicated_eps_bearer_context_accept->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
activate_dedicated_eps_bearer_context_accept->presencemask |= OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2085,7 +3035,11 @@ int ogs_nas_eps_decode_activate_dedicated_eps_bearer_context_reject(ogs_nas_eps_
ogs_trace("[NAS] Decode ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT\n");
size = ogs_nas_eps_decode_esm_cause(&activate_dedicated_eps_bearer_context_reject->esm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_esm_cause() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -2093,25 +3047,40 @@ int ogs_nas_eps_decode_activate_dedicated_eps_bearer_context_reject(ogs_nas_eps_
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_protocol_configuration_options(&activate_dedicated_eps_bearer_context_reject->protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_protocol_configuration_options() failed");
+ return size;
+ }
+
activate_dedicated_eps_bearer_context_reject->presencemask |= OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_NBIFOM_CONTAINER_TYPE:
size = ogs_nas_eps_decode_nbifom_container(&activate_dedicated_eps_bearer_context_reject->nbifom_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_nbifom_container() failed");
+ return size;
+ }
+
activate_dedicated_eps_bearer_context_reject->presencemask |= OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_NBIFOM_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_extended_protocol_configuration_options(&activate_dedicated_eps_bearer_context_reject->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
activate_dedicated_eps_bearer_context_reject->presencemask |= OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2137,31 +3106,50 @@ int ogs_nas_eps_decode_modify_eps_bearer_context_request(ogs_nas_eps_message_t *
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEW_EPS_QOS_TYPE:
size = ogs_nas_eps_decode_eps_quality_of_service(&modify_eps_bearer_context_request->new_eps_qos, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_quality_of_service() failed");
+ return size;
+ }
+
modify_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEW_EPS_QOS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_TFT_TYPE:
size = ogs_nas_eps_decode_traffic_flow_template(&modify_eps_bearer_context_request->tft, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_traffic_flow_template() failed");
+ return size;
+ }
+
modify_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_TFT_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEW_QOS_TYPE:
size = ogs_nas_eps_decode_quality_of_service(&modify_eps_bearer_context_request->new_qos, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_quality_of_service() failed");
+ return size;
+ }
+
modify_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEW_QOS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_TYPE:
size = ogs_nas_eps_decode_llc_service_access_point_identifier(&modify_eps_bearer_context_request->negotiated_llc_sapi, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_llc_service_access_point_identifier() failed");
+ return size;
+ }
+
modify_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_PRESENT;
decoded += size;
break;
@@ -2169,25 +3157,41 @@ int ogs_nas_eps_decode_modify_eps_bearer_context_request(ogs_nas_eps_message_t *
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_radio_priority(&modify_eps_bearer_context_request->radio_priority, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_radio_priority() failed");
+ return size;
+ }
+
modify_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_RADIO_PRIORITY_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_TYPE:
size = ogs_nas_eps_decode_packet_flow_identifier(&modify_eps_bearer_context_request->packet_flow_identifier, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_packet_flow_identifier() failed");
+ return size;
+ }
+
modify_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_APN_AMBR_TYPE:
size = ogs_nas_eps_decode_apn_aggregate_maximum_bit_rate(&modify_eps_bearer_context_request->apn_ambr, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_apn_aggregate_maximum_bit_rate() failed");
+ return size;
+ }
+
modify_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_APN_AMBR_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_protocol_configuration_options(&modify_eps_bearer_context_request->protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_protocol_configuration_options() failed");
+ return size;
+ }
+
modify_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2195,37 +3199,61 @@ int ogs_nas_eps_decode_modify_eps_bearer_context_request(ogs_nas_eps_message_t *
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_wlan_offload_acceptability(&modify_eps_bearer_context_request->wlan_offload_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_wlan_offload_acceptability() failed");
+ return size;
+ }
+
modify_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_TYPE:
size = ogs_nas_eps_decode_nbifom_container(&modify_eps_bearer_context_request->nbifom_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_nbifom_container() failed");
+ return size;
+ }
+
modify_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_HEADER_COMPRESSION_CONFIGURATION_TYPE:
size = ogs_nas_eps_decode_header_compression_configuration(&modify_eps_bearer_context_request->header_compression_configuration, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_header_compression_configuration() failed");
+ return size;
+ }
+
modify_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_HEADER_COMPRESSION_CONFIGURATION_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_extended_protocol_configuration_options(&modify_eps_bearer_context_request->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
modify_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_APN_AMBR_TYPE:
size = ogs_nas_eps_decode_extended_apn_aggregate_maximum_bit_rate(&modify_eps_bearer_context_request->extended_apn_ambr, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_apn_aggregate_maximum_bit_rate() failed");
+ return size;
+ }
+
modify_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_APN_AMBR_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_EPS_QOS_TYPE:
size = ogs_nas_eps_decode_extended_quality_of_service(&modify_eps_bearer_context_request->extended_eps_qos, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_quality_of_service() failed");
+ return size;
+ }
+
modify_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_EPS_QOS_PRESENT;
decoded += size;
break;
@@ -2251,25 +3279,40 @@ int ogs_nas_eps_decode_modify_eps_bearer_context_accept(ogs_nas_eps_message_t *m
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_protocol_configuration_options(&modify_eps_bearer_context_accept->protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_protocol_configuration_options() failed");
+ return size;
+ }
+
modify_eps_bearer_context_accept->presencemask |= OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_NBIFOM_CONTAINER_TYPE:
size = ogs_nas_eps_decode_nbifom_container(&modify_eps_bearer_context_accept->nbifom_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_nbifom_container() failed");
+ return size;
+ }
+
modify_eps_bearer_context_accept->presencemask |= OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_NBIFOM_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_extended_protocol_configuration_options(&modify_eps_bearer_context_accept->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
modify_eps_bearer_context_accept->presencemask |= OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2291,7 +3334,11 @@ int ogs_nas_eps_decode_modify_eps_bearer_context_reject(ogs_nas_eps_message_t *m
ogs_trace("[NAS] Decode MODIFY_EPS_BEARER_CONTEXT_REJECT\n");
size = ogs_nas_eps_decode_esm_cause(&modify_eps_bearer_context_reject->esm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_esm_cause() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -2299,25 +3346,40 @@ int ogs_nas_eps_decode_modify_eps_bearer_context_reject(ogs_nas_eps_message_t *m
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_protocol_configuration_options(&modify_eps_bearer_context_reject->protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_protocol_configuration_options() failed");
+ return size;
+ }
+
modify_eps_bearer_context_reject->presencemask |= OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REJECT_NBIFOM_CONTAINER_TYPE:
size = ogs_nas_eps_decode_nbifom_container(&modify_eps_bearer_context_reject->nbifom_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_nbifom_container() failed");
+ return size;
+ }
+
modify_eps_bearer_context_reject->presencemask |= OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REJECT_NBIFOM_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_extended_protocol_configuration_options(&modify_eps_bearer_context_reject->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
modify_eps_bearer_context_reject->presencemask |= OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2339,7 +3401,11 @@ int ogs_nas_eps_decode_deactivate_eps_bearer_context_request(ogs_nas_eps_message
ogs_trace("[NAS] Decode DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST\n");
size = ogs_nas_eps_decode_esm_cause(&deactivate_eps_bearer_context_request->esm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_esm_cause() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -2347,19 +3413,30 @@ int ogs_nas_eps_decode_deactivate_eps_bearer_context_request(ogs_nas_eps_message
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_protocol_configuration_options(&deactivate_eps_bearer_context_request->protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_protocol_configuration_options() failed");
+ return size;
+ }
+
deactivate_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_T3396_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer_3(&deactivate_eps_bearer_context_request->t3396_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer_3() failed");
+ return size;
+ }
+
deactivate_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_T3396_VALUE_PRESENT;
decoded += size;
break;
@@ -2367,19 +3444,31 @@ int ogs_nas_eps_decode_deactivate_eps_bearer_context_request(ogs_nas_eps_message
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_wlan_offload_acceptability(&deactivate_eps_bearer_context_request->wlan_offload_indication, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_wlan_offload_acceptability() failed");
+ return size;
+ }
+
deactivate_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_TYPE:
size = ogs_nas_eps_decode_nbifom_container(&deactivate_eps_bearer_context_request->nbifom_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_nbifom_container() failed");
+ return size;
+ }
+
deactivate_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_extended_protocol_configuration_options(&deactivate_eps_bearer_context_request->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
deactivate_eps_bearer_context_request->presencemask |= OGS_NAS_EPS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2405,19 +3494,30 @@ int ogs_nas_eps_decode_deactivate_eps_bearer_context_accept(ogs_nas_eps_message_
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_protocol_configuration_options(&deactivate_eps_bearer_context_accept->protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_protocol_configuration_options() failed");
+ return size;
+ }
+
deactivate_eps_bearer_context_accept->presencemask |= OGS_NAS_EPS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_extended_protocol_configuration_options(&deactivate_eps_bearer_context_accept->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
deactivate_eps_bearer_context_accept->presencemask |= OGS_NAS_EPS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2439,7 +3539,11 @@ int ogs_nas_eps_decode_pdn_connectivity_request(ogs_nas_eps_message_t *message,
ogs_trace("[NAS] Decode PDN_CONNECTIVITY_REQUEST\n");
size = ogs_nas_eps_decode_request_type(&pdn_connectivity_request->request_type, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_request_type() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -2447,7 +3551,10 @@ int ogs_nas_eps_decode_pdn_connectivity_request(ogs_nas_eps_message_t *message,
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
@@ -2455,19 +3562,31 @@ int ogs_nas_eps_decode_pdn_connectivity_request(ogs_nas_eps_message_t *message,
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_esm_information_transfer_flag(&pdn_connectivity_request->esm_information_transfer_flag, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_esm_information_transfer_flag() failed");
+ return size;
+ }
+
pdn_connectivity_request->presencemask |= OGS_NAS_EPS_PDN_CONNECTIVITY_REQUEST_ESM_INFORMATION_TRANSFER_FLAG_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_PDN_CONNECTIVITY_REQUEST_ACCESS_POINT_NAME_TYPE:
size = ogs_nas_eps_decode_access_point_name(&pdn_connectivity_request->access_point_name, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_access_point_name() failed");
+ return size;
+ }
+
pdn_connectivity_request->presencemask |= OGS_NAS_EPS_PDN_CONNECTIVITY_REQUEST_ACCESS_POINT_NAME_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_PDN_CONNECTIVITY_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_protocol_configuration_options(&pdn_connectivity_request->protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_protocol_configuration_options() failed");
+ return size;
+ }
+
pdn_connectivity_request->presencemask |= OGS_NAS_EPS_PDN_CONNECTIVITY_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2475,25 +3594,41 @@ int ogs_nas_eps_decode_pdn_connectivity_request(ogs_nas_eps_message_t *message,
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_device_properties(&pdn_connectivity_request->device_properties, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_device_properties() failed");
+ return size;
+ }
+
pdn_connectivity_request->presencemask |= OGS_NAS_EPS_PDN_CONNECTIVITY_REQUEST_DEVICE_PROPERTIES_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_PDN_CONNECTIVITY_REQUEST_NBIFOM_CONTAINER_TYPE:
size = ogs_nas_eps_decode_nbifom_container(&pdn_connectivity_request->nbifom_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_nbifom_container() failed");
+ return size;
+ }
+
pdn_connectivity_request->presencemask |= OGS_NAS_EPS_PDN_CONNECTIVITY_REQUEST_NBIFOM_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_PDN_CONNECTIVITY_REQUEST_HEADER_COMPRESSION_CONFIGURATION_TYPE:
size = ogs_nas_eps_decode_header_compression_configuration(&pdn_connectivity_request->header_compression_configuration, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_header_compression_configuration() failed");
+ return size;
+ }
+
pdn_connectivity_request->presencemask |= OGS_NAS_EPS_PDN_CONNECTIVITY_REQUEST_HEADER_COMPRESSION_CONFIGURATION_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_PDN_CONNECTIVITY_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_extended_protocol_configuration_options(&pdn_connectivity_request->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
pdn_connectivity_request->presencemask |= OGS_NAS_EPS_PDN_CONNECTIVITY_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2515,7 +3650,11 @@ int ogs_nas_eps_decode_pdn_connectivity_reject(ogs_nas_eps_message_t *message, o
ogs_trace("[NAS] Decode PDN_CONNECTIVITY_REJECT\n");
size = ogs_nas_eps_decode_esm_cause(&pdn_connectivity_reject->esm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_esm_cause() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -2523,37 +3662,60 @@ int ogs_nas_eps_decode_pdn_connectivity_reject(ogs_nas_eps_message_t *message, o
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_PDN_CONNECTIVITY_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_protocol_configuration_options(&pdn_connectivity_reject->protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_protocol_configuration_options() failed");
+ return size;
+ }
+
pdn_connectivity_reject->presencemask |= OGS_NAS_EPS_PDN_CONNECTIVITY_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_PDN_CONNECTIVITY_REJECT_BACK_OFF_TIMER_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer_3(&pdn_connectivity_reject->back_off_timer_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer_3() failed");
+ return size;
+ }
+
pdn_connectivity_reject->presencemask |= OGS_NAS_EPS_PDN_CONNECTIVITY_REJECT_BACK_OFF_TIMER_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_PDN_CONNECTIVITY_REJECT_RE_ATTEMPT_INDICATOR_TYPE:
size = ogs_nas_eps_decode_re_attempt_indicator(&pdn_connectivity_reject->re_attempt_indicator, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_re_attempt_indicator() failed");
+ return size;
+ }
+
pdn_connectivity_reject->presencemask |= OGS_NAS_EPS_PDN_CONNECTIVITY_REJECT_RE_ATTEMPT_INDICATOR_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_PDN_CONNECTIVITY_REJECT_NBIFOM_CONTAINER_TYPE:
size = ogs_nas_eps_decode_nbifom_container(&pdn_connectivity_reject->nbifom_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_nbifom_container() failed");
+ return size;
+ }
+
pdn_connectivity_reject->presencemask |= OGS_NAS_EPS_PDN_CONNECTIVITY_REJECT_NBIFOM_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_PDN_CONNECTIVITY_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_extended_protocol_configuration_options(&pdn_connectivity_reject->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
pdn_connectivity_reject->presencemask |= OGS_NAS_EPS_PDN_CONNECTIVITY_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2575,7 +3737,11 @@ int ogs_nas_eps_decode_pdn_disconnect_request(ogs_nas_eps_message_t *message, og
ogs_trace("[NAS] Decode PDN_DISCONNECT_REQUEST\n");
size = ogs_nas_eps_decode_linked_eps_bearer_identity(&pdn_disconnect_request->linked_eps_bearer_identity, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_linked_eps_bearer_identity() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -2583,19 +3749,30 @@ int ogs_nas_eps_decode_pdn_disconnect_request(ogs_nas_eps_message_t *message, og
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_PDN_DISCONNECT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_protocol_configuration_options(&pdn_disconnect_request->protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_protocol_configuration_options() failed");
+ return size;
+ }
+
pdn_disconnect_request->presencemask |= OGS_NAS_EPS_PDN_DISCONNECT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_PDN_DISCONNECT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_extended_protocol_configuration_options(&pdn_disconnect_request->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
pdn_disconnect_request->presencemask |= OGS_NAS_EPS_PDN_DISCONNECT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2617,7 +3794,11 @@ int ogs_nas_eps_decode_pdn_disconnect_reject(ogs_nas_eps_message_t *message, ogs
ogs_trace("[NAS] Decode PDN_DISCONNECT_REJECT\n");
size = ogs_nas_eps_decode_esm_cause(&pdn_disconnect_reject->esm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_esm_cause() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -2625,19 +3806,30 @@ int ogs_nas_eps_decode_pdn_disconnect_reject(ogs_nas_eps_message_t *message, ogs
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_PDN_DISCONNECT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_protocol_configuration_options(&pdn_disconnect_reject->protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_protocol_configuration_options() failed");
+ return size;
+ }
+
pdn_disconnect_reject->presencemask |= OGS_NAS_EPS_PDN_DISCONNECT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_PDN_DISCONNECT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_extended_protocol_configuration_options(&pdn_disconnect_reject->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
pdn_disconnect_reject->presencemask |= OGS_NAS_EPS_PDN_DISCONNECT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2659,15 +3851,27 @@ int ogs_nas_eps_decode_bearer_resource_allocation_request(ogs_nas_eps_message_t
ogs_trace("[NAS] Decode BEARER_RESOURCE_ALLOCATION_REQUEST\n");
size = ogs_nas_eps_decode_linked_eps_bearer_identity(&bearer_resource_allocation_request->linked_eps_bearer_identity, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_linked_eps_bearer_identity() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_eps_decode_traffic_flow_aggregate_description(&bearer_resource_allocation_request->traffic_flow_aggregate, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_traffic_flow_aggregate_description() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_eps_decode_eps_quality_of_service(&bearer_resource_allocation_request->required_traffic_flow_qos, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_quality_of_service() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -2675,13 +3879,20 @@ int ogs_nas_eps_decode_bearer_resource_allocation_request(ogs_nas_eps_message_t
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_BEARER_RESOURCE_ALLOCATION_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_protocol_configuration_options(&bearer_resource_allocation_request->protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_protocol_configuration_options() failed");
+ return size;
+ }
+
bearer_resource_allocation_request->presencemask |= OGS_NAS_EPS_BEARER_RESOURCE_ALLOCATION_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2689,25 +3900,41 @@ int ogs_nas_eps_decode_bearer_resource_allocation_request(ogs_nas_eps_message_t
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_device_properties(&bearer_resource_allocation_request->device_properties, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_device_properties() failed");
+ return size;
+ }
+
bearer_resource_allocation_request->presencemask |= OGS_NAS_EPS_BEARER_RESOURCE_ALLOCATION_REQUEST_DEVICE_PROPERTIES_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_BEARER_RESOURCE_ALLOCATION_REQUEST_NBIFOM_CONTAINER_TYPE:
size = ogs_nas_eps_decode_nbifom_container(&bearer_resource_allocation_request->nbifom_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_nbifom_container() failed");
+ return size;
+ }
+
bearer_resource_allocation_request->presencemask |= OGS_NAS_EPS_BEARER_RESOURCE_ALLOCATION_REQUEST_NBIFOM_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_BEARER_RESOURCE_ALLOCATION_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_extended_protocol_configuration_options(&bearer_resource_allocation_request->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
bearer_resource_allocation_request->presencemask |= OGS_NAS_EPS_BEARER_RESOURCE_ALLOCATION_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_BEARER_RESOURCE_ALLOCATION_REQUEST_EXTENDED_EPS_QOS_TYPE:
size = ogs_nas_eps_decode_extended_quality_of_service(&bearer_resource_allocation_request->extended_eps_qos, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_quality_of_service() failed");
+ return size;
+ }
+
bearer_resource_allocation_request->presencemask |= OGS_NAS_EPS_BEARER_RESOURCE_ALLOCATION_REQUEST_EXTENDED_EPS_QOS_PRESENT;
decoded += size;
break;
@@ -2729,7 +3956,11 @@ int ogs_nas_eps_decode_bearer_resource_allocation_reject(ogs_nas_eps_message_t *
ogs_trace("[NAS] Decode BEARER_RESOURCE_ALLOCATION_REJECT\n");
size = ogs_nas_eps_decode_esm_cause(&bearer_resource_allocation_reject->esm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_esm_cause() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -2737,37 +3968,60 @@ int ogs_nas_eps_decode_bearer_resource_allocation_reject(ogs_nas_eps_message_t *
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_BEARER_RESOURCE_ALLOCATION_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_protocol_configuration_options(&bearer_resource_allocation_reject->protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_protocol_configuration_options() failed");
+ return size;
+ }
+
bearer_resource_allocation_reject->presencemask |= OGS_NAS_EPS_BEARER_RESOURCE_ALLOCATION_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_BEARER_RESOURCE_ALLOCATION_REJECT_BACK_OFF_TIMER_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer_3(&bearer_resource_allocation_reject->back_off_timer_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer_3() failed");
+ return size;
+ }
+
bearer_resource_allocation_reject->presencemask |= OGS_NAS_EPS_BEARER_RESOURCE_ALLOCATION_REJECT_BACK_OFF_TIMER_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_BEARER_RESOURCE_ALLOCATION_REJECT_RE_ATTEMPT_INDICATOR_TYPE:
size = ogs_nas_eps_decode_re_attempt_indicator(&bearer_resource_allocation_reject->re_attempt_indicator, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_re_attempt_indicator() failed");
+ return size;
+ }
+
bearer_resource_allocation_reject->presencemask |= OGS_NAS_EPS_BEARER_RESOURCE_ALLOCATION_REJECT_RE_ATTEMPT_INDICATOR_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_BEARER_RESOURCE_ALLOCATION_REJECT_NBIFOM_CONTAINER_TYPE:
size = ogs_nas_eps_decode_nbifom_container(&bearer_resource_allocation_reject->nbifom_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_nbifom_container() failed");
+ return size;
+ }
+
bearer_resource_allocation_reject->presencemask |= OGS_NAS_EPS_BEARER_RESOURCE_ALLOCATION_REJECT_NBIFOM_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_BEARER_RESOURCE_ALLOCATION_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_extended_protocol_configuration_options(&bearer_resource_allocation_reject->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
bearer_resource_allocation_reject->presencemask |= OGS_NAS_EPS_BEARER_RESOURCE_ALLOCATION_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2789,11 +4043,19 @@ int ogs_nas_eps_decode_bearer_resource_modification_request(ogs_nas_eps_message_
ogs_trace("[NAS] Decode BEARER_RESOURCE_MODIFICATION_REQUEST\n");
size = ogs_nas_eps_decode_linked_eps_bearer_identity(&bearer_resource_modification_request->eps_bearer_identity_for_packet_filter, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_linked_eps_bearer_identity() failed");
+ return size;
+ }
+
decoded += size;
size = ogs_nas_eps_decode_traffic_flow_aggregate_description(&bearer_resource_modification_request->traffic_flow_aggregate, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_traffic_flow_aggregate_description() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -2801,25 +4063,40 @@ int ogs_nas_eps_decode_bearer_resource_modification_request(ogs_nas_eps_message_
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REQUEST_REQUIRED_TRAFFIC_FLOW_QOS_TYPE:
size = ogs_nas_eps_decode_eps_quality_of_service(&bearer_resource_modification_request->required_traffic_flow_qos, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_eps_quality_of_service() failed");
+ return size;
+ }
+
bearer_resource_modification_request->presencemask |= OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REQUEST_REQUIRED_TRAFFIC_FLOW_QOS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REQUEST_ESM_CAUSE_TYPE:
size = ogs_nas_eps_decode_esm_cause(&bearer_resource_modification_request->esm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_esm_cause() failed");
+ return size;
+ }
+
bearer_resource_modification_request->presencemask |= OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REQUEST_ESM_CAUSE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_protocol_configuration_options(&bearer_resource_modification_request->protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_protocol_configuration_options() failed");
+ return size;
+ }
+
bearer_resource_modification_request->presencemask |= OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2827,31 +4104,51 @@ int ogs_nas_eps_decode_bearer_resource_modification_request(ogs_nas_eps_message_
decoded--;
ogs_assert(ogs_pkbuf_push(pkbuf, 1));
size = ogs_nas_eps_decode_device_properties(&bearer_resource_modification_request->device_properties, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_device_properties() failed");
+ return size;
+ }
+
bearer_resource_modification_request->presencemask |= OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REQUEST_DEVICE_PROPERTIES_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REQUEST_NBIFOM_CONTAINER_TYPE:
size = ogs_nas_eps_decode_nbifom_container(&bearer_resource_modification_request->nbifom_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_nbifom_container() failed");
+ return size;
+ }
+
bearer_resource_modification_request->presencemask |= OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REQUEST_NBIFOM_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REQUEST_HEADER_COMPRESSION_CONFIGURATION_TYPE:
size = ogs_nas_eps_decode_header_compression_configuration(&bearer_resource_modification_request->header_compression_configuration, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_header_compression_configuration() failed");
+ return size;
+ }
+
bearer_resource_modification_request->presencemask |= OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REQUEST_HEADER_COMPRESSION_CONFIGURATION_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_extended_protocol_configuration_options(&bearer_resource_modification_request->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
bearer_resource_modification_request->presencemask |= OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REQUEST_EXTENDED_EPS_QOS_TYPE:
size = ogs_nas_eps_decode_extended_quality_of_service(&bearer_resource_modification_request->extended_eps_qos, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_quality_of_service() failed");
+ return size;
+ }
+
bearer_resource_modification_request->presencemask |= OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REQUEST_EXTENDED_EPS_QOS_PRESENT;
decoded += size;
break;
@@ -2873,7 +4170,11 @@ int ogs_nas_eps_decode_bearer_resource_modification_reject(ogs_nas_eps_message_t
ogs_trace("[NAS] Decode BEARER_RESOURCE_MODIFICATION_REJECT\n");
size = ogs_nas_eps_decode_esm_cause(&bearer_resource_modification_reject->esm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_esm_cause() failed");
+ return size;
+ }
+
decoded += size;
while (pkbuf->len > 0) {
@@ -2881,37 +4182,60 @@ int ogs_nas_eps_decode_bearer_resource_modification_reject(ogs_nas_eps_message_t
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_protocol_configuration_options(&bearer_resource_modification_reject->protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_protocol_configuration_options() failed");
+ return size;
+ }
+
bearer_resource_modification_reject->presencemask |= OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REJECT_BACK_OFF_TIMER_VALUE_TYPE:
size = ogs_nas_eps_decode_gprs_timer_3(&bearer_resource_modification_reject->back_off_timer_value, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_gprs_timer_3() failed");
+ return size;
+ }
+
bearer_resource_modification_reject->presencemask |= OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REJECT_BACK_OFF_TIMER_VALUE_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REJECT_RE_ATTEMPT_INDICATOR_TYPE:
size = ogs_nas_eps_decode_re_attempt_indicator(&bearer_resource_modification_reject->re_attempt_indicator, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_re_attempt_indicator() failed");
+ return size;
+ }
+
bearer_resource_modification_reject->presencemask |= OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REJECT_RE_ATTEMPT_INDICATOR_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REJECT_NBIFOM_CONTAINER_TYPE:
size = ogs_nas_eps_decode_nbifom_container(&bearer_resource_modification_reject->nbifom_container, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_nbifom_container() failed");
+ return size;
+ }
+
bearer_resource_modification_reject->presencemask |= OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REJECT_NBIFOM_CONTAINER_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_extended_protocol_configuration_options(&bearer_resource_modification_reject->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
bearer_resource_modification_reject->presencemask |= OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2937,25 +4261,40 @@ int ogs_nas_eps_decode_esm_information_response(ogs_nas_eps_message_t *message,
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
case OGS_NAS_EPS_ESM_INFORMATION_RESPONSE_ACCESS_POINT_NAME_TYPE:
size = ogs_nas_eps_decode_access_point_name(&esm_information_response->access_point_name, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_access_point_name() failed");
+ return size;
+ }
+
esm_information_response->presencemask |= OGS_NAS_EPS_ESM_INFORMATION_RESPONSE_ACCESS_POINT_NAME_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ESM_INFORMATION_RESPONSE_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_protocol_configuration_options(&esm_information_response->protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_protocol_configuration_options() failed");
+ return size;
+ }
+
esm_information_response->presencemask |= OGS_NAS_EPS_ESM_INFORMATION_RESPONSE_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
case OGS_NAS_EPS_ESM_INFORMATION_RESPONSE_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE:
size = ogs_nas_eps_decode_extended_protocol_configuration_options(&esm_information_response->extended_protocol_configuration_options, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_extended_protocol_configuration_options() failed");
+ return size;
+ }
+
esm_information_response->presencemask |= OGS_NAS_EPS_ESM_INFORMATION_RESPONSE_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
decoded += size;
break;
@@ -2977,7 +4316,11 @@ int ogs_nas_eps_decode_esm_status(ogs_nas_eps_message_t *message, ogs_pkbuf_t *p
ogs_trace("[NAS] Decode ESM_STATUS\n");
size = ogs_nas_eps_decode_esm_cause(&esm_status->esm_cause, pkbuf);
- if (size < 0) return size;
+ if (size < 0) {
+ ogs_error("ogs_nas_eps_decode_esm_cause() failed");
+ return size;
+ }
+
decoded += size;
return decoded;
@@ -2986,7 +4329,7 @@ int ogs_nas_eps_decode_esm_status(ogs_nas_eps_message_t *message, ogs_pkbuf_t *p
int ogs_nas_emm_decode(ogs_nas_eps_message_t *message, ogs_pkbuf_t *pkbuf)
{
int size = 0;
- uint16_t decoded = 0;
+ int decoded = 0;
ogs_assert(pkbuf);
ogs_assert(pkbuf->data);
@@ -2995,7 +4338,10 @@ int ogs_nas_emm_decode(ogs_nas_eps_message_t *message, ogs_pkbuf_t *pkbuf)
memset(message, 0, sizeof(ogs_nas_eps_message_t));
size = sizeof(ogs_nas_emm_header_t);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return OGS_ERROR;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
memcpy(&message->emm.h, pkbuf->data - size, size);
decoded += size;
@@ -3013,140 +4359,244 @@ int ogs_nas_emm_decode(ogs_nas_eps_message_t *message, ogs_pkbuf_t *pkbuf)
switch (message->emm.h.message_type) {
case OGS_NAS_EPS_ATTACH_REQUEST:
size = ogs_nas_eps_decode_attach_request(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_attach_request() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_ACCEPT:
size = ogs_nas_eps_decode_attach_accept(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_attach_accept() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_COMPLETE:
size = ogs_nas_eps_decode_attach_complete(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_attach_complete() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_ATTACH_REJECT:
size = ogs_nas_eps_decode_attach_reject(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_attach_reject() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_DETACH_REQUEST:
size = ogs_nas_eps_decode_detach_request_from_ue(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_detach_request_from_ue() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_DETACH_ACCEPT:
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST:
size = ogs_nas_eps_decode_tracking_area_update_request(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_tracking_area_update_request() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_ACCEPT:
size = ogs_nas_eps_decode_tracking_area_update_accept(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_tracking_area_update_accept() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_COMPLETE:
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REJECT:
size = ogs_nas_eps_decode_tracking_area_update_reject(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_tracking_area_update_reject() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_EXTENDED_SERVICE_REQUEST:
size = ogs_nas_eps_decode_extended_service_request(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_extended_service_request() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_SERVICE_REJECT:
size = ogs_nas_eps_decode_service_reject(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_service_reject() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_GUTI_REALLOCATION_COMMAND:
size = ogs_nas_eps_decode_guti_reallocation_command(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_guti_reallocation_command() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_GUTI_REALLOCATION_COMPLETE:
break;
case OGS_NAS_EPS_AUTHENTICATION_REQUEST:
size = ogs_nas_eps_decode_authentication_request(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_authentication_request() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_AUTHENTICATION_RESPONSE:
size = ogs_nas_eps_decode_authentication_response(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_authentication_response() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_AUTHENTICATION_REJECT:
break;
case OGS_NAS_EPS_IDENTITY_REQUEST:
size = ogs_nas_eps_decode_identity_request(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_identity_request() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_IDENTITY_RESPONSE:
size = ogs_nas_eps_decode_identity_response(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_identity_response() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_AUTHENTICATION_FAILURE:
size = ogs_nas_eps_decode_authentication_failure(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_authentication_failure() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_SECURITY_MODE_COMMAND:
size = ogs_nas_eps_decode_security_mode_command(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_security_mode_command() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_SECURITY_MODE_COMPLETE:
size = ogs_nas_eps_decode_security_mode_complete(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_security_mode_complete() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_SECURITY_MODE_REJECT:
size = ogs_nas_eps_decode_security_mode_reject(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_security_mode_reject() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_EMM_STATUS:
size = ogs_nas_eps_decode_emm_status(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_emm_status() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_EMM_INFORMATION:
size = ogs_nas_eps_decode_emm_information(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_emm_information() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_DOWNLINK_NAS_TRANSPORT:
size = ogs_nas_eps_decode_downlink_nas_transport(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_downlink_nas_transport() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_UPLINK_NAS_TRANSPORT:
size = ogs_nas_eps_decode_uplink_nas_transport(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_uplink_nas_transport() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_CS_SERVICE_NOTIFICATION:
size = ogs_nas_eps_decode_cs_service_notification(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_cs_service_notification() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_UPLINK_GENERIC_NAS_TRANSPORT:
size = ogs_nas_eps_decode_uplink_generic_nas_transport(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_uplink_generic_nas_transport() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_DOWNLINK_GENERIC_NAS_TRANSPORT:
size = ogs_nas_eps_decode_downlink_generic_nas_transport(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_downlink_generic_nas_transport() failed");
+ return size;
+ }
+
decoded += size;
break;
default:
@@ -3163,7 +4613,7 @@ out:
int ogs_nas_esm_decode(ogs_nas_eps_message_t *message, ogs_pkbuf_t *pkbuf)
{
int size = 0;
- uint16_t decoded = 0;
+ int decoded = 0;
ogs_assert(pkbuf);
ogs_assert(pkbuf->data);
@@ -3172,116 +4622,203 @@ int ogs_nas_esm_decode(ogs_nas_eps_message_t *message, ogs_pkbuf_t *pkbuf)
memset(message, 0, sizeof(ogs_nas_eps_message_t));
size = sizeof(ogs_nas_esm_header_t);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return OGS_ERROR;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
memcpy(&message->esm.h, pkbuf->data - size, size);
decoded += size;
switch (message->esm.h.message_type) {
case OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST:
size = ogs_nas_eps_decode_activate_default_eps_bearer_context_request(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_activate_default_eps_bearer_context_request() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT:
size = ogs_nas_eps_decode_activate_default_eps_bearer_context_accept(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_activate_default_eps_bearer_context_accept() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT:
size = ogs_nas_eps_decode_activate_default_eps_bearer_context_reject(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_activate_default_eps_bearer_context_reject() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST:
size = ogs_nas_eps_decode_activate_dedicated_eps_bearer_context_request(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_activate_dedicated_eps_bearer_context_request() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT:
size = ogs_nas_eps_decode_activate_dedicated_eps_bearer_context_accept(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_activate_dedicated_eps_bearer_context_accept() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT:
size = ogs_nas_eps_decode_activate_dedicated_eps_bearer_context_reject(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_activate_dedicated_eps_bearer_context_reject() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REQUEST:
size = ogs_nas_eps_decode_modify_eps_bearer_context_request(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_modify_eps_bearer_context_request() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT:
size = ogs_nas_eps_decode_modify_eps_bearer_context_accept(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_modify_eps_bearer_context_accept() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_REJECT:
size = ogs_nas_eps_decode_modify_eps_bearer_context_reject(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_modify_eps_bearer_context_reject() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST:
size = ogs_nas_eps_decode_deactivate_eps_bearer_context_request(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_deactivate_eps_bearer_context_request() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT:
size = ogs_nas_eps_decode_deactivate_eps_bearer_context_accept(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_deactivate_eps_bearer_context_accept() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_PDN_CONNECTIVITY_REQUEST:
size = ogs_nas_eps_decode_pdn_connectivity_request(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdn_connectivity_request() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_PDN_CONNECTIVITY_REJECT:
size = ogs_nas_eps_decode_pdn_connectivity_reject(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdn_connectivity_reject() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_PDN_DISCONNECT_REQUEST:
size = ogs_nas_eps_decode_pdn_disconnect_request(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdn_disconnect_request() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_PDN_DISCONNECT_REJECT:
size = ogs_nas_eps_decode_pdn_disconnect_reject(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_pdn_disconnect_reject() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_BEARER_RESOURCE_ALLOCATION_REQUEST:
size = ogs_nas_eps_decode_bearer_resource_allocation_request(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_bearer_resource_allocation_request() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_BEARER_RESOURCE_ALLOCATION_REJECT:
size = ogs_nas_eps_decode_bearer_resource_allocation_reject(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_bearer_resource_allocation_reject() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REQUEST:
size = ogs_nas_eps_decode_bearer_resource_modification_request(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_bearer_resource_modification_request() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REJECT:
size = ogs_nas_eps_decode_bearer_resource_modification_reject(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_bearer_resource_modification_reject() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_ESM_INFORMATION_REQUEST:
break;
case OGS_NAS_EPS_ESM_INFORMATION_RESPONSE:
size = ogs_nas_eps_decode_esm_information_response(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_esm_information_response() failed");
+ return size;
+ }
+
decoded += size;
break;
case OGS_NAS_EPS_ESM_STATUS:
size = ogs_nas_eps_decode_esm_status(message, pkbuf);
- if (size < 0) return OGS_ERROR;
+ if (size < 0) {
+ ogs_error("ogs_nas_5gs_decode_esm_status() failed");
+ return size;
+ }
+
decoded += size;
break;
default:
diff --git a/lib/nas/eps/encoder.c b/lib/nas/eps/encoder.c
index 40d02f127..17b342d13 100644
--- a/lib/nas/eps/encoder.c
+++ b/lib/nas/eps/encoder.c
@@ -28,7 +28,7 @@
/*******************************************************************************
* This file had been created by nas-message.py script v0.1.0
* Please do not modify this file but regenerate it via script.
- * Created on: 2021-05-30 21:57:00.085478 by acetcom
+ * Created on: 2021-06-21 14:44:53.390608 by acetcom
* from 24301-g40.docx
******************************************************************************/
diff --git a/lib/nas/eps/ies.c b/lib/nas/eps/ies.c
index 6657ba22c..8818f8a41 100644
--- a/lib/nas/eps/ies.c
+++ b/lib/nas/eps/ies.c
@@ -28,7 +28,7 @@
/*******************************************************************************
* This file had been created by nas-message.py script v0.1.0
* Please do not modify this file but regenerate it via script.
- * Created on: 2021-05-30 21:57:00.058358 by acetcom
+ * Created on: 2021-06-21 14:44:53.370878 by acetcom
* from 24301-g40.docx
******************************************************************************/
@@ -36,7 +36,7 @@
int ogs_nas_eps_encode_optional_type(ogs_pkbuf_t *pkbuf, uint8_t type)
{
- uint16_t size = sizeof(uint8_t);
+ int size = sizeof(uint8_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, &type, size);
@@ -47,13 +47,17 @@ int ogs_nas_eps_encode_optional_type(ogs_pkbuf_t *pkbuf, uint8_t type)
* O TLV 3-n */
int ogs_nas_eps_decode_additional_information(ogs_nas_additional_information_t *additional_information, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_additional_information_t *source = (ogs_nas_additional_information_t *)pkbuf->data;
additional_information->length = source->length;
size = additional_information->length + sizeof(additional_information->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*additional_information) < size) return -1;
memcpy(additional_information, pkbuf->data - size, size);
@@ -65,7 +69,7 @@ int ogs_nas_eps_decode_additional_information(ogs_nas_additional_information_t *
int ogs_nas_eps_encode_additional_information(ogs_pkbuf_t *pkbuf, ogs_nas_additional_information_t *additional_information)
{
- uint16_t size = additional_information->length + sizeof(additional_information->length);
+ int size = additional_information->length + sizeof(additional_information->length);
ogs_nas_additional_information_t target;
memcpy(&target, additional_information, sizeof(ogs_nas_additional_information_t));
@@ -82,9 +86,13 @@ int ogs_nas_eps_encode_additional_information(ogs_pkbuf_t *pkbuf, ogs_nas_additi
* O TV 1 */
int ogs_nas_eps_decode_device_properties(ogs_nas_device_properties_t *device_properties, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_device_properties_t);
+ int size = sizeof(ogs_nas_device_properties_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(device_properties, pkbuf->data - size, size);
ogs_trace(" DEVICE_PROPERTIES - ");
@@ -95,7 +103,7 @@ int ogs_nas_eps_decode_device_properties(ogs_nas_device_properties_t *device_pro
int ogs_nas_eps_encode_device_properties(ogs_pkbuf_t *pkbuf, ogs_nas_device_properties_t *device_properties)
{
- uint16_t size = sizeof(ogs_nas_device_properties_t);
+ int size = sizeof(ogs_nas_device_properties_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, device_properties, size);
@@ -110,13 +118,17 @@ int ogs_nas_eps_encode_device_properties(ogs_pkbuf_t *pkbuf, ogs_nas_device_prop
* O TLV 4 */
int ogs_nas_eps_decode_eps_bearer_context_status(ogs_nas_eps_bearer_context_status_t *eps_bearer_context_status, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_eps_bearer_context_status_t *source = (ogs_nas_eps_bearer_context_status_t *)pkbuf->data;
eps_bearer_context_status->length = source->length;
size = eps_bearer_context_status->length + sizeof(eps_bearer_context_status->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*eps_bearer_context_status) < size) return -1;
memcpy(eps_bearer_context_status, pkbuf->data - size, size);
@@ -128,7 +140,7 @@ int ogs_nas_eps_decode_eps_bearer_context_status(ogs_nas_eps_bearer_context_stat
int ogs_nas_eps_encode_eps_bearer_context_status(ogs_pkbuf_t *pkbuf, ogs_nas_eps_bearer_context_status_t *eps_bearer_context_status)
{
- uint16_t size = eps_bearer_context_status->length + sizeof(eps_bearer_context_status->length);
+ int size = eps_bearer_context_status->length + sizeof(eps_bearer_context_status->length);
ogs_nas_eps_bearer_context_status_t target;
memcpy(&target, eps_bearer_context_status, sizeof(ogs_nas_eps_bearer_context_status_t));
@@ -145,13 +157,17 @@ int ogs_nas_eps_encode_eps_bearer_context_status(ogs_pkbuf_t *pkbuf, ogs_nas_eps
* O TLV 5-n */
int ogs_nas_eps_decode_supported_codec_list(ogs_nas_supported_codec_list_t *supported_codec_list, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_supported_codec_list_t *source = (ogs_nas_supported_codec_list_t *)pkbuf->data;
supported_codec_list->length = source->length;
size = supported_codec_list->length + sizeof(supported_codec_list->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*supported_codec_list) < size) return -1;
memcpy(supported_codec_list, pkbuf->data - size, size);
@@ -163,7 +179,7 @@ int ogs_nas_eps_decode_supported_codec_list(ogs_nas_supported_codec_list_t *supp
int ogs_nas_eps_encode_supported_codec_list(ogs_pkbuf_t *pkbuf, ogs_nas_supported_codec_list_t *supported_codec_list)
{
- uint16_t size = supported_codec_list->length + sizeof(supported_codec_list->length);
+ int size = supported_codec_list->length + sizeof(supported_codec_list->length);
ogs_nas_supported_codec_list_t target;
memcpy(&target, supported_codec_list, sizeof(ogs_nas_supported_codec_list_t));
@@ -180,9 +196,13 @@ int ogs_nas_eps_encode_supported_codec_list(ogs_pkbuf_t *pkbuf, ogs_nas_supporte
* O TV 6 */
int ogs_nas_eps_decode_location_area_identification(ogs_nas_location_area_identification_t *location_area_identification, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_location_area_identification_t);
+ int size = sizeof(ogs_nas_location_area_identification_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(location_area_identification, pkbuf->data - size, size);
location_area_identification->lac = be16toh(location_area_identification->lac);
@@ -195,7 +215,7 @@ int ogs_nas_eps_decode_location_area_identification(ogs_nas_location_area_identi
int ogs_nas_eps_encode_location_area_identification(ogs_pkbuf_t *pkbuf, ogs_nas_location_area_identification_t *location_area_identification)
{
- uint16_t size = sizeof(ogs_nas_location_area_identification_t);
+ int size = sizeof(ogs_nas_location_area_identification_t);
ogs_nas_location_area_identification_t target;
memcpy(&target, location_area_identification, size);
@@ -214,13 +234,17 @@ int ogs_nas_eps_encode_location_area_identification(ogs_pkbuf_t *pkbuf, ogs_nas_
* O TLV 7-10 */
int ogs_nas_eps_decode_mobile_identity(ogs_nas_mobile_identity_t *mobile_identity, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_mobile_identity_t *source = (ogs_nas_mobile_identity_t *)pkbuf->data;
mobile_identity->length = source->length;
size = mobile_identity->length + sizeof(mobile_identity->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*mobile_identity) < size) return -1;
memcpy(mobile_identity, pkbuf->data - size, size);
@@ -236,7 +260,7 @@ int ogs_nas_eps_decode_mobile_identity(ogs_nas_mobile_identity_t *mobile_identit
int ogs_nas_eps_encode_mobile_identity(ogs_pkbuf_t *pkbuf, ogs_nas_mobile_identity_t *mobile_identity)
{
- uint16_t size = mobile_identity->length + sizeof(mobile_identity->length);
+ int size = mobile_identity->length + sizeof(mobile_identity->length);
ogs_nas_mobile_identity_t target;
memcpy(&target, mobile_identity, sizeof(ogs_nas_mobile_identity_t));
@@ -258,13 +282,17 @@ int ogs_nas_eps_encode_mobile_identity(ogs_pkbuf_t *pkbuf, ogs_nas_mobile_identi
* O TLV 5 */
int ogs_nas_eps_decode_mobile_station_classmark_2(ogs_nas_mobile_station_classmark_2_t *mobile_station_classmark_2, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_mobile_station_classmark_2_t *source = (ogs_nas_mobile_station_classmark_2_t *)pkbuf->data;
mobile_station_classmark_2->length = source->length;
size = mobile_station_classmark_2->length + sizeof(mobile_station_classmark_2->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*mobile_station_classmark_2) < size) return -1;
memcpy(mobile_station_classmark_2, pkbuf->data - size, size);
@@ -276,7 +304,7 @@ int ogs_nas_eps_decode_mobile_station_classmark_2(ogs_nas_mobile_station_classma
int ogs_nas_eps_encode_mobile_station_classmark_2(ogs_pkbuf_t *pkbuf, ogs_nas_mobile_station_classmark_2_t *mobile_station_classmark_2)
{
- uint16_t size = mobile_station_classmark_2->length + sizeof(mobile_station_classmark_2->length);
+ int size = mobile_station_classmark_2->length + sizeof(mobile_station_classmark_2->length);
ogs_nas_mobile_station_classmark_2_t target;
memcpy(&target, mobile_station_classmark_2, sizeof(ogs_nas_mobile_station_classmark_2_t));
@@ -293,13 +321,17 @@ int ogs_nas_eps_encode_mobile_station_classmark_2(ogs_pkbuf_t *pkbuf, ogs_nas_mo
* O TLV 2-34 */
int ogs_nas_eps_decode_mobile_station_classmark_3(ogs_nas_mobile_station_classmark_3_t *mobile_station_classmark_3, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_mobile_station_classmark_3_t *source = (ogs_nas_mobile_station_classmark_3_t *)pkbuf->data;
mobile_station_classmark_3->length = source->length;
size = mobile_station_classmark_3->length + sizeof(mobile_station_classmark_3->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*mobile_station_classmark_3) < size) return -1;
memcpy(mobile_station_classmark_3, pkbuf->data - size, size);
@@ -311,7 +343,7 @@ int ogs_nas_eps_decode_mobile_station_classmark_3(ogs_nas_mobile_station_classma
int ogs_nas_eps_encode_mobile_station_classmark_3(ogs_pkbuf_t *pkbuf, ogs_nas_mobile_station_classmark_3_t *mobile_station_classmark_3)
{
- uint16_t size = mobile_station_classmark_3->length + sizeof(mobile_station_classmark_3->length);
+ int size = mobile_station_classmark_3->length + sizeof(mobile_station_classmark_3->length);
ogs_nas_mobile_station_classmark_3_t target;
memcpy(&target, mobile_station_classmark_3, sizeof(ogs_nas_mobile_station_classmark_3_t));
@@ -328,13 +360,17 @@ int ogs_nas_eps_encode_mobile_station_classmark_3(ogs_pkbuf_t *pkbuf, ogs_nas_mo
* O TLV 5-47 */
int ogs_nas_eps_decode_plmn_list(ogs_nas_plmn_list_t *plmn_list, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_plmn_list_t *source = (ogs_nas_plmn_list_t *)pkbuf->data;
plmn_list->length = source->length;
size = plmn_list->length + sizeof(plmn_list->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*plmn_list) < size) return -1;
memcpy(plmn_list, pkbuf->data - size, size);
@@ -346,7 +382,7 @@ int ogs_nas_eps_decode_plmn_list(ogs_nas_plmn_list_t *plmn_list, ogs_pkbuf_t *pk
int ogs_nas_eps_encode_plmn_list(ogs_pkbuf_t *pkbuf, ogs_nas_plmn_list_t *plmn_list)
{
- uint16_t size = plmn_list->length + sizeof(plmn_list->length);
+ int size = plmn_list->length + sizeof(plmn_list->length);
ogs_nas_plmn_list_t target;
memcpy(&target, plmn_list, sizeof(ogs_nas_plmn_list_t));
@@ -363,9 +399,13 @@ int ogs_nas_eps_encode_plmn_list(ogs_pkbuf_t *pkbuf, ogs_nas_plmn_list_t *plmn_l
* O TV 1 */
int ogs_nas_eps_decode_additional_update_result(ogs_nas_additional_update_result_t *additional_update_result, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_additional_update_result_t);
+ int size = sizeof(ogs_nas_additional_update_result_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(additional_update_result, pkbuf->data - size, size);
ogs_trace(" ADDITIONAL_UPDATE_RESULT - ");
@@ -376,7 +416,7 @@ int ogs_nas_eps_decode_additional_update_result(ogs_nas_additional_update_result
int ogs_nas_eps_encode_additional_update_result(ogs_pkbuf_t *pkbuf, ogs_nas_additional_update_result_t *additional_update_result)
{
- uint16_t size = sizeof(ogs_nas_additional_update_result_t);
+ int size = sizeof(ogs_nas_additional_update_result_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, additional_update_result, size);
@@ -391,9 +431,13 @@ int ogs_nas_eps_encode_additional_update_result(ogs_pkbuf_t *pkbuf, ogs_nas_addi
* O TV 1 */
int ogs_nas_eps_decode_additional_update_type(ogs_nas_additional_update_type_t *additional_update_type, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_additional_update_type_t);
+ int size = sizeof(ogs_nas_additional_update_type_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(additional_update_type, pkbuf->data - size, size);
ogs_trace(" ADDITIONAL_UPDATE_TYPE - ");
@@ -404,7 +448,7 @@ int ogs_nas_eps_decode_additional_update_type(ogs_nas_additional_update_type_t *
int ogs_nas_eps_encode_additional_update_type(ogs_pkbuf_t *pkbuf, ogs_nas_additional_update_type_t *additional_update_type)
{
- uint16_t size = sizeof(ogs_nas_additional_update_type_t);
+ int size = sizeof(ogs_nas_additional_update_type_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, additional_update_type, size);
@@ -419,13 +463,17 @@ int ogs_nas_eps_encode_additional_update_type(ogs_pkbuf_t *pkbuf, ogs_nas_additi
* O TLV 16 */
int ogs_nas_eps_decode_authentication_failure_parameter(ogs_nas_authentication_failure_parameter_t *authentication_failure_parameter, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_authentication_failure_parameter_t *source = (ogs_nas_authentication_failure_parameter_t *)pkbuf->data;
authentication_failure_parameter->length = source->length;
size = authentication_failure_parameter->length + sizeof(authentication_failure_parameter->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*authentication_failure_parameter) < size) return -1;
memcpy(authentication_failure_parameter, pkbuf->data - size, size);
@@ -437,7 +485,7 @@ int ogs_nas_eps_decode_authentication_failure_parameter(ogs_nas_authentication_f
int ogs_nas_eps_encode_authentication_failure_parameter(ogs_pkbuf_t *pkbuf, ogs_nas_authentication_failure_parameter_t *authentication_failure_parameter)
{
- uint16_t size = authentication_failure_parameter->length + sizeof(authentication_failure_parameter->length);
+ int size = authentication_failure_parameter->length + sizeof(authentication_failure_parameter->length);
ogs_nas_authentication_failure_parameter_t target;
memcpy(&target, authentication_failure_parameter, sizeof(ogs_nas_authentication_failure_parameter_t));
@@ -454,9 +502,13 @@ int ogs_nas_eps_encode_authentication_failure_parameter(ogs_pkbuf_t *pkbuf, ogs_
* M V 1/2 */
int ogs_nas_eps_decode_eps_attach_result(ogs_nas_eps_attach_result_t *eps_attach_result, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_eps_attach_result_t);
+ int size = sizeof(ogs_nas_eps_attach_result_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(eps_attach_result, pkbuf->data - size, size);
ogs_trace(" EPS_ATTACH_RESULT - ");
@@ -467,7 +519,7 @@ int ogs_nas_eps_decode_eps_attach_result(ogs_nas_eps_attach_result_t *eps_attach
int ogs_nas_eps_encode_eps_attach_result(ogs_pkbuf_t *pkbuf, ogs_nas_eps_attach_result_t *eps_attach_result)
{
- uint16_t size = sizeof(ogs_nas_eps_attach_result_t);
+ int size = sizeof(ogs_nas_eps_attach_result_t);
ogs_nas_eps_attach_result_t target;
memcpy(&target, eps_attach_result, size);
@@ -484,9 +536,13 @@ int ogs_nas_eps_encode_eps_attach_result(ogs_pkbuf_t *pkbuf, ogs_nas_eps_attach_
* M V 1/2 */
int ogs_nas_eps_decode_eps_attach_type(ogs_nas_eps_attach_type_t *eps_attach_type, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_eps_attach_type_t);
+ int size = sizeof(ogs_nas_eps_attach_type_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(eps_attach_type, pkbuf->data - size, size);
ogs_trace(" EPS_ATTACH_TYPE - ");
@@ -497,7 +553,7 @@ int ogs_nas_eps_decode_eps_attach_type(ogs_nas_eps_attach_type_t *eps_attach_typ
int ogs_nas_eps_encode_eps_attach_type(ogs_pkbuf_t *pkbuf, ogs_nas_eps_attach_type_t *eps_attach_type)
{
- uint16_t size = sizeof(ogs_nas_eps_attach_type_t);
+ int size = sizeof(ogs_nas_eps_attach_type_t);
ogs_nas_eps_attach_type_t target;
memcpy(&target, eps_attach_type, size);
@@ -514,13 +570,17 @@ int ogs_nas_eps_encode_eps_attach_type(ogs_pkbuf_t *pkbuf, ogs_nas_eps_attach_ty
* M LV 5-12 */
int ogs_nas_eps_decode_eps_mobile_identity(ogs_nas_eps_mobile_identity_t *eps_mobile_identity, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_eps_mobile_identity_t *source = (ogs_nas_eps_mobile_identity_t *)pkbuf->data;
eps_mobile_identity->length = source->length;
size = eps_mobile_identity->length + sizeof(eps_mobile_identity->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*eps_mobile_identity) < size) return -1;
memcpy(eps_mobile_identity, pkbuf->data - size, size);
@@ -537,7 +597,7 @@ int ogs_nas_eps_decode_eps_mobile_identity(ogs_nas_eps_mobile_identity_t *eps_mo
int ogs_nas_eps_encode_eps_mobile_identity(ogs_pkbuf_t *pkbuf, ogs_nas_eps_mobile_identity_t *eps_mobile_identity)
{
- uint16_t size = eps_mobile_identity->length + sizeof(eps_mobile_identity->length);
+ int size = eps_mobile_identity->length + sizeof(eps_mobile_identity->length);
ogs_nas_eps_mobile_identity_t target;
memcpy(&target, eps_mobile_identity, sizeof(ogs_nas_eps_mobile_identity_t));
@@ -560,13 +620,17 @@ int ogs_nas_eps_encode_eps_mobile_identity(ogs_pkbuf_t *pkbuf, ogs_nas_eps_mobil
* O TLV 3-4 */
int ogs_nas_eps_decode_eps_network_feature_support(ogs_nas_eps_network_feature_support_t *eps_network_feature_support, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_eps_network_feature_support_t *source = (ogs_nas_eps_network_feature_support_t *)pkbuf->data;
eps_network_feature_support->length = source->length;
size = eps_network_feature_support->length + sizeof(eps_network_feature_support->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*eps_network_feature_support) < size) return -1;
memcpy(eps_network_feature_support, pkbuf->data - size, size);
@@ -578,7 +642,7 @@ int ogs_nas_eps_decode_eps_network_feature_support(ogs_nas_eps_network_feature_s
int ogs_nas_eps_encode_eps_network_feature_support(ogs_pkbuf_t *pkbuf, ogs_nas_eps_network_feature_support_t *eps_network_feature_support)
{
- uint16_t size = eps_network_feature_support->length + sizeof(eps_network_feature_support->length);
+ int size = eps_network_feature_support->length + sizeof(eps_network_feature_support->length);
ogs_nas_eps_network_feature_support_t target;
memcpy(&target, eps_network_feature_support, sizeof(ogs_nas_eps_network_feature_support_t));
@@ -595,9 +659,13 @@ int ogs_nas_eps_encode_eps_network_feature_support(ogs_pkbuf_t *pkbuf, ogs_nas_e
* M V 1/2 */
int ogs_nas_eps_decode_eps_update_result(ogs_nas_eps_update_result_t *eps_update_result, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_eps_update_result_t);
+ int size = sizeof(ogs_nas_eps_update_result_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(eps_update_result, pkbuf->data - size, size);
ogs_trace(" EPS_UPDATE_RESULT - ");
@@ -608,7 +676,7 @@ int ogs_nas_eps_decode_eps_update_result(ogs_nas_eps_update_result_t *eps_update
int ogs_nas_eps_encode_eps_update_result(ogs_pkbuf_t *pkbuf, ogs_nas_eps_update_result_t *eps_update_result)
{
- uint16_t size = sizeof(ogs_nas_eps_update_result_t);
+ int size = sizeof(ogs_nas_eps_update_result_t);
ogs_nas_eps_update_result_t target;
memcpy(&target, eps_update_result, size);
@@ -625,9 +693,13 @@ int ogs_nas_eps_encode_eps_update_result(ogs_pkbuf_t *pkbuf, ogs_nas_eps_update_
* M V 1/2 */
int ogs_nas_eps_decode_eps_update_type(ogs_nas_eps_update_type_t *eps_update_type, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_eps_update_type_t);
+ int size = sizeof(ogs_nas_eps_update_type_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(eps_update_type, pkbuf->data - size, size);
ogs_trace(" EPS_UPDATE_TYPE - ");
@@ -638,7 +710,7 @@ int ogs_nas_eps_decode_eps_update_type(ogs_nas_eps_update_type_t *eps_update_typ
int ogs_nas_eps_encode_eps_update_type(ogs_pkbuf_t *pkbuf, ogs_nas_eps_update_type_t *eps_update_type)
{
- uint16_t size = sizeof(ogs_nas_eps_update_type_t);
+ int size = sizeof(ogs_nas_eps_update_type_t);
ogs_nas_eps_update_type_t target;
memcpy(&target, eps_update_type, size);
@@ -655,13 +727,17 @@ int ogs_nas_eps_encode_eps_update_type(ogs_pkbuf_t *pkbuf, ogs_nas_eps_update_ty
* M LV-E 5-n */
int ogs_nas_eps_decode_esm_message_container(ogs_nas_esm_message_container_t *esm_message_container, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_esm_message_container_t *source = (ogs_nas_esm_message_container_t *)pkbuf->data;
esm_message_container->length = be16toh(source->length);
size = esm_message_container->length + sizeof(esm_message_container->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
esm_message_container->buffer = pkbuf->data - size + sizeof(esm_message_container->length);
ogs_trace(" ESM_MESSAGE_CONTAINER - ");
@@ -672,8 +748,8 @@ int ogs_nas_eps_decode_esm_message_container(ogs_nas_esm_message_container_t *es
int ogs_nas_eps_encode_esm_message_container(ogs_pkbuf_t *pkbuf, ogs_nas_esm_message_container_t *esm_message_container)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(esm_message_container);
ogs_assert(esm_message_container->buffer);
@@ -697,9 +773,13 @@ int ogs_nas_eps_encode_esm_message_container(ogs_pkbuf_t *pkbuf, ogs_nas_esm_mes
* M V 1 */
int ogs_nas_eps_decode_gprs_timer(ogs_nas_gprs_timer_t *gprs_timer, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_gprs_timer_t);
+ int size = sizeof(ogs_nas_gprs_timer_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(gprs_timer, pkbuf->data - size, size);
ogs_trace(" GPRS_TIMER - ");
@@ -710,7 +790,7 @@ int ogs_nas_eps_decode_gprs_timer(ogs_nas_gprs_timer_t *gprs_timer, ogs_pkbuf_t
int ogs_nas_eps_encode_gprs_timer(ogs_pkbuf_t *pkbuf, ogs_nas_gprs_timer_t *gprs_timer)
{
- uint16_t size = sizeof(ogs_nas_gprs_timer_t);
+ int size = sizeof(ogs_nas_gprs_timer_t);
ogs_nas_gprs_timer_t target;
memcpy(&target, gprs_timer, size);
@@ -727,13 +807,17 @@ int ogs_nas_eps_encode_gprs_timer(ogs_pkbuf_t *pkbuf, ogs_nas_gprs_timer_t *gprs
* O TLV 3 */
int ogs_nas_eps_decode_gprs_timer_2(ogs_nas_gprs_timer_2_t *gprs_timer_2, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_gprs_timer_2_t *source = (ogs_nas_gprs_timer_2_t *)pkbuf->data;
gprs_timer_2->length = source->length;
size = gprs_timer_2->length + sizeof(gprs_timer_2->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*gprs_timer_2) < size) return -1;
memcpy(gprs_timer_2, pkbuf->data - size, size);
@@ -745,7 +829,7 @@ int ogs_nas_eps_decode_gprs_timer_2(ogs_nas_gprs_timer_2_t *gprs_timer_2, ogs_pk
int ogs_nas_eps_encode_gprs_timer_2(ogs_pkbuf_t *pkbuf, ogs_nas_gprs_timer_2_t *gprs_timer_2)
{
- uint16_t size = gprs_timer_2->length + sizeof(gprs_timer_2->length);
+ int size = gprs_timer_2->length + sizeof(gprs_timer_2->length);
ogs_nas_gprs_timer_2_t target;
memcpy(&target, gprs_timer_2, sizeof(ogs_nas_gprs_timer_2_t));
@@ -762,13 +846,17 @@ int ogs_nas_eps_encode_gprs_timer_2(ogs_pkbuf_t *pkbuf, ogs_nas_gprs_timer_2_t *
* O TLV 3 */
int ogs_nas_eps_decode_gprs_timer_3(ogs_nas_gprs_timer_3_t *gprs_timer_3, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_gprs_timer_3_t *source = (ogs_nas_gprs_timer_3_t *)pkbuf->data;
gprs_timer_3->length = source->length;
size = gprs_timer_3->length + sizeof(gprs_timer_3->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*gprs_timer_3) < size) return -1;
memcpy(gprs_timer_3, pkbuf->data - size, size);
@@ -780,7 +868,7 @@ int ogs_nas_eps_decode_gprs_timer_3(ogs_nas_gprs_timer_3_t *gprs_timer_3, ogs_pk
int ogs_nas_eps_encode_gprs_timer_3(ogs_pkbuf_t *pkbuf, ogs_nas_gprs_timer_3_t *gprs_timer_3)
{
- uint16_t size = gprs_timer_3->length + sizeof(gprs_timer_3->length);
+ int size = gprs_timer_3->length + sizeof(gprs_timer_3->length);
ogs_nas_gprs_timer_3_t target;
memcpy(&target, gprs_timer_3, sizeof(ogs_nas_gprs_timer_3_t));
@@ -797,9 +885,13 @@ int ogs_nas_eps_encode_gprs_timer_3(ogs_pkbuf_t *pkbuf, ogs_nas_gprs_timer_3_t *
* M V 1/2 */
int ogs_nas_eps_decode_identity_type_2(ogs_nas_identity_type_2_t *identity_type_2, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_identity_type_2_t);
+ int size = sizeof(ogs_nas_identity_type_2_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(identity_type_2, pkbuf->data - size, size);
ogs_trace(" IDENTITY_TYPE_2 - ");
@@ -810,7 +902,7 @@ int ogs_nas_eps_decode_identity_type_2(ogs_nas_identity_type_2_t *identity_type_
int ogs_nas_eps_encode_identity_type_2(ogs_pkbuf_t *pkbuf, ogs_nas_identity_type_2_t *identity_type_2)
{
- uint16_t size = sizeof(ogs_nas_identity_type_2_t);
+ int size = sizeof(ogs_nas_identity_type_2_t);
ogs_nas_identity_type_2_t target;
memcpy(&target, identity_type_2, size);
@@ -827,9 +919,13 @@ int ogs_nas_eps_encode_identity_type_2(ogs_pkbuf_t *pkbuf, ogs_nas_identity_type
* O TV 1 */
int ogs_nas_eps_decode_imeisv_request(ogs_nas_imeisv_request_t *imeisv_request, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_imeisv_request_t);
+ int size = sizeof(ogs_nas_imeisv_request_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(imeisv_request, pkbuf->data - size, size);
ogs_trace(" IMEISV_REQUEST - ");
@@ -840,7 +936,7 @@ int ogs_nas_eps_decode_imeisv_request(ogs_nas_imeisv_request_t *imeisv_request,
int ogs_nas_eps_encode_imeisv_request(ogs_pkbuf_t *pkbuf, ogs_nas_imeisv_request_t *imeisv_request)
{
- uint16_t size = sizeof(ogs_nas_imeisv_request_t);
+ int size = sizeof(ogs_nas_imeisv_request_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, imeisv_request, size);
@@ -855,9 +951,13 @@ int ogs_nas_eps_encode_imeisv_request(ogs_pkbuf_t *pkbuf, ogs_nas_imeisv_request
* M V 1 */
int ogs_nas_eps_decode_ksi_and_sequence_number(ogs_nas_ksi_and_sequence_number_t *ksi_and_sequence_number, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_ksi_and_sequence_number_t);
+ int size = sizeof(ogs_nas_ksi_and_sequence_number_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(ksi_and_sequence_number, pkbuf->data - size, size);
ogs_trace(" KSI_AND_SEQUENCE_NUMBER - ");
@@ -868,7 +968,7 @@ int ogs_nas_eps_decode_ksi_and_sequence_number(ogs_nas_ksi_and_sequence_number_t
int ogs_nas_eps_encode_ksi_and_sequence_number(ogs_pkbuf_t *pkbuf, ogs_nas_ksi_and_sequence_number_t *ksi_and_sequence_number)
{
- uint16_t size = sizeof(ogs_nas_ksi_and_sequence_number_t);
+ int size = sizeof(ogs_nas_ksi_and_sequence_number_t);
ogs_nas_ksi_and_sequence_number_t target;
memcpy(&target, ksi_and_sequence_number, size);
@@ -885,13 +985,17 @@ int ogs_nas_eps_encode_ksi_and_sequence_number(ogs_pkbuf_t *pkbuf, ogs_nas_ksi_a
* M LV 17 */
int ogs_nas_eps_decode_authentication_parameter_autn(ogs_nas_authentication_parameter_autn_t *authentication_parameter_autn, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_authentication_parameter_autn_t *source = (ogs_nas_authentication_parameter_autn_t *)pkbuf->data;
authentication_parameter_autn->length = source->length;
size = authentication_parameter_autn->length + sizeof(authentication_parameter_autn->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*authentication_parameter_autn) < size) return -1;
memcpy(authentication_parameter_autn, pkbuf->data - size, size);
@@ -903,7 +1007,7 @@ int ogs_nas_eps_decode_authentication_parameter_autn(ogs_nas_authentication_para
int ogs_nas_eps_encode_authentication_parameter_autn(ogs_pkbuf_t *pkbuf, ogs_nas_authentication_parameter_autn_t *authentication_parameter_autn)
{
- uint16_t size = authentication_parameter_autn->length + sizeof(authentication_parameter_autn->length);
+ int size = authentication_parameter_autn->length + sizeof(authentication_parameter_autn->length);
ogs_nas_authentication_parameter_autn_t target;
memcpy(&target, authentication_parameter_autn, sizeof(ogs_nas_authentication_parameter_autn_t));
@@ -920,13 +1024,17 @@ int ogs_nas_eps_encode_authentication_parameter_autn(ogs_pkbuf_t *pkbuf, ogs_nas
* O TLV 4-10 */
int ogs_nas_eps_decode_ms_network_capability(ogs_nas_ms_network_capability_t *ms_network_capability, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_ms_network_capability_t *source = (ogs_nas_ms_network_capability_t *)pkbuf->data;
ms_network_capability->length = source->length;
size = ms_network_capability->length + sizeof(ms_network_capability->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*ms_network_capability) < size) return -1;
memcpy(ms_network_capability, pkbuf->data - size, size);
@@ -938,7 +1046,7 @@ int ogs_nas_eps_decode_ms_network_capability(ogs_nas_ms_network_capability_t *ms
int ogs_nas_eps_encode_ms_network_capability(ogs_pkbuf_t *pkbuf, ogs_nas_ms_network_capability_t *ms_network_capability)
{
- uint16_t size = ms_network_capability->length + sizeof(ms_network_capability->length);
+ int size = ms_network_capability->length + sizeof(ms_network_capability->length);
ogs_nas_ms_network_capability_t target;
memcpy(&target, ms_network_capability, sizeof(ogs_nas_ms_network_capability_t));
@@ -955,9 +1063,13 @@ int ogs_nas_eps_encode_ms_network_capability(ogs_pkbuf_t *pkbuf, ogs_nas_ms_netw
* O TV 1 */
int ogs_nas_eps_decode_ms_network_feature_support(ogs_nas_ms_network_feature_support_t *ms_network_feature_support, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_ms_network_feature_support_t);
+ int size = sizeof(ogs_nas_ms_network_feature_support_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(ms_network_feature_support, pkbuf->data - size, size);
ogs_trace(" MS_NETWORK_FEATURE_SUPPORT - ");
@@ -968,7 +1080,7 @@ int ogs_nas_eps_decode_ms_network_feature_support(ogs_nas_ms_network_feature_sup
int ogs_nas_eps_encode_ms_network_feature_support(ogs_pkbuf_t *pkbuf, ogs_nas_ms_network_feature_support_t *ms_network_feature_support)
{
- uint16_t size = sizeof(ogs_nas_ms_network_feature_support_t);
+ int size = sizeof(ogs_nas_ms_network_feature_support_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, ms_network_feature_support, size);
@@ -983,9 +1095,13 @@ int ogs_nas_eps_encode_ms_network_feature_support(ogs_pkbuf_t *pkbuf, ogs_nas_ms
* O TV 1 */
int ogs_nas_eps_decode_key_set_identifier(ogs_nas_key_set_identifier_t *key_set_identifier, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_key_set_identifier_t);
+ int size = sizeof(ogs_nas_key_set_identifier_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(key_set_identifier, pkbuf->data - size, size);
ogs_trace(" KEY_SET_IDENTIFIER - ");
@@ -996,7 +1112,7 @@ int ogs_nas_eps_decode_key_set_identifier(ogs_nas_key_set_identifier_t *key_set_
int ogs_nas_eps_encode_key_set_identifier(ogs_pkbuf_t *pkbuf, ogs_nas_key_set_identifier_t *key_set_identifier)
{
- uint16_t size = sizeof(ogs_nas_key_set_identifier_t);
+ int size = sizeof(ogs_nas_key_set_identifier_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, key_set_identifier, size);
@@ -1011,13 +1127,17 @@ int ogs_nas_eps_encode_key_set_identifier(ogs_pkbuf_t *pkbuf, ogs_nas_key_set_id
* M LV 3-252 */
int ogs_nas_eps_decode_eps_message_container(ogs_nas_eps_message_container_t *eps_message_container, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_eps_message_container_t *source = (ogs_nas_eps_message_container_t *)pkbuf->data;
eps_message_container->length = source->length;
size = eps_message_container->length + sizeof(eps_message_container->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*eps_message_container) < size) return -1;
memcpy(eps_message_container, pkbuf->data - size, size);
@@ -1029,7 +1149,7 @@ int ogs_nas_eps_decode_eps_message_container(ogs_nas_eps_message_container_t *ep
int ogs_nas_eps_encode_eps_message_container(ogs_pkbuf_t *pkbuf, ogs_nas_eps_message_container_t *eps_message_container)
{
- uint16_t size = eps_message_container->length + sizeof(eps_message_container->length);
+ int size = eps_message_container->length + sizeof(eps_message_container->length);
ogs_nas_eps_message_container_t target;
memcpy(&target, eps_message_container, sizeof(ogs_nas_eps_message_container_t));
@@ -1046,9 +1166,13 @@ int ogs_nas_eps_encode_eps_message_container(ogs_pkbuf_t *pkbuf, ogs_nas_eps_mes
* M V 1 */
int ogs_nas_eps_decode_security_algorithms(ogs_nas_security_algorithms_t *security_algorithms, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_security_algorithms_t);
+ int size = sizeof(ogs_nas_security_algorithms_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(security_algorithms, pkbuf->data - size, size);
ogs_trace(" SECURITY_ALGORITHMS - ");
@@ -1059,7 +1183,7 @@ int ogs_nas_eps_decode_security_algorithms(ogs_nas_security_algorithms_t *securi
int ogs_nas_eps_encode_security_algorithms(ogs_pkbuf_t *pkbuf, ogs_nas_security_algorithms_t *security_algorithms)
{
- uint16_t size = sizeof(ogs_nas_security_algorithms_t);
+ int size = sizeof(ogs_nas_security_algorithms_t);
ogs_nas_security_algorithms_t target;
memcpy(&target, security_algorithms, size);
@@ -1076,13 +1200,17 @@ int ogs_nas_eps_encode_security_algorithms(ogs_pkbuf_t *pkbuf, ogs_nas_security_
* O TLV 3-n */
int ogs_nas_eps_decode_network_name(ogs_nas_network_name_t *network_name, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_network_name_t *source = (ogs_nas_network_name_t *)pkbuf->data;
network_name->length = source->length;
size = network_name->length + sizeof(network_name->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*network_name) < size) return -1;
memcpy(network_name, pkbuf->data - size, size);
@@ -1094,7 +1222,7 @@ int ogs_nas_eps_decode_network_name(ogs_nas_network_name_t *network_name, ogs_pk
int ogs_nas_eps_encode_network_name(ogs_pkbuf_t *pkbuf, ogs_nas_network_name_t *network_name)
{
- uint16_t size = network_name->length + sizeof(network_name->length);
+ int size = network_name->length + sizeof(network_name->length);
ogs_nas_network_name_t target;
memcpy(&target, network_name, sizeof(ogs_nas_network_name_t));
@@ -1111,13 +1239,17 @@ int ogs_nas_eps_encode_network_name(ogs_pkbuf_t *pkbuf, ogs_nas_network_name_t *
* O TLV 4 */
int ogs_nas_eps_decode_network_resource_identifier_container(ogs_nas_network_resource_identifier_container_t *network_resource_identifier_container, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_network_resource_identifier_container_t *source = (ogs_nas_network_resource_identifier_container_t *)pkbuf->data;
network_resource_identifier_container->length = source->length;
size = network_resource_identifier_container->length + sizeof(network_resource_identifier_container->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*network_resource_identifier_container) < size) return -1;
memcpy(network_resource_identifier_container, pkbuf->data - size, size);
@@ -1129,7 +1261,7 @@ int ogs_nas_eps_decode_network_resource_identifier_container(ogs_nas_network_res
int ogs_nas_eps_encode_network_resource_identifier_container(ogs_pkbuf_t *pkbuf, ogs_nas_network_resource_identifier_container_t *network_resource_identifier_container)
{
- uint16_t size = network_resource_identifier_container->length + sizeof(network_resource_identifier_container->length);
+ int size = network_resource_identifier_container->length + sizeof(network_resource_identifier_container->length);
ogs_nas_network_resource_identifier_container_t target;
memcpy(&target, network_resource_identifier_container, sizeof(ogs_nas_network_resource_identifier_container_t));
@@ -1146,9 +1278,13 @@ int ogs_nas_eps_encode_network_resource_identifier_container(ogs_pkbuf_t *pkbuf,
* O TV 5 */
int ogs_nas_eps_decode_nonce(ogs_nas_nonce_t *nonce, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_nonce_t);
+ int size = sizeof(ogs_nas_nonce_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(nonce, pkbuf->data - size, size);
*nonce = be32toh(*nonce);
@@ -1161,7 +1297,7 @@ int ogs_nas_eps_decode_nonce(ogs_nas_nonce_t *nonce, ogs_pkbuf_t *pkbuf)
int ogs_nas_eps_encode_nonce(ogs_pkbuf_t *pkbuf, ogs_nas_nonce_t *nonce)
{
- uint16_t size = sizeof(ogs_nas_nonce_t);
+ int size = sizeof(ogs_nas_nonce_t);
ogs_nas_nonce_t target;
memcpy(&target, nonce, size);
@@ -1180,9 +1316,13 @@ int ogs_nas_eps_encode_nonce(ogs_pkbuf_t *pkbuf, ogs_nas_nonce_t *nonce)
* M V 1 */
int ogs_nas_eps_decode_paging_identity(ogs_nas_paging_identity_t *paging_identity, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_paging_identity_t);
+ int size = sizeof(ogs_nas_paging_identity_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(paging_identity, pkbuf->data - size, size);
ogs_trace(" PAGING_IDENTITY - ");
@@ -1193,7 +1333,7 @@ int ogs_nas_eps_decode_paging_identity(ogs_nas_paging_identity_t *paging_identit
int ogs_nas_eps_encode_paging_identity(ogs_pkbuf_t *pkbuf, ogs_nas_paging_identity_t *paging_identity)
{
- uint16_t size = sizeof(ogs_nas_paging_identity_t);
+ int size = sizeof(ogs_nas_paging_identity_t);
ogs_nas_paging_identity_t target;
memcpy(&target, paging_identity, size);
@@ -1210,9 +1350,13 @@ int ogs_nas_eps_encode_paging_identity(ogs_pkbuf_t *pkbuf, ogs_nas_paging_identi
* O TV 4 */
int ogs_nas_eps_decode_p_tmsi_signature(ogs_nas_p_tmsi_signature_t *p_tmsi_signature, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 3;
+ int size = 3;
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(p_tmsi_signature, pkbuf->data - size, size);
*p_tmsi_signature = htobe32(*p_tmsi_signature);
@@ -1225,7 +1369,7 @@ int ogs_nas_eps_decode_p_tmsi_signature(ogs_nas_p_tmsi_signature_t *p_tmsi_signa
int ogs_nas_eps_encode_p_tmsi_signature(ogs_pkbuf_t *pkbuf, ogs_nas_p_tmsi_signature_t *p_tmsi_signature)
{
- uint16_t size = 3;
+ int size = 3;
ogs_nas_p_tmsi_signature_t target;
memcpy(&target, p_tmsi_signature, size);
@@ -1244,9 +1388,13 @@ int ogs_nas_eps_encode_p_tmsi_signature(ogs_pkbuf_t *pkbuf, ogs_nas_p_tmsi_signa
* O TV 1 */
int ogs_nas_eps_decode_extended_emm_cause(ogs_nas_extended_emm_cause_t *extended_emm_cause, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_extended_emm_cause_t);
+ int size = sizeof(ogs_nas_extended_emm_cause_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(extended_emm_cause, pkbuf->data - size, size);
ogs_trace(" EXTENDED_EMM_CAUSE - ");
@@ -1257,7 +1405,7 @@ int ogs_nas_eps_decode_extended_emm_cause(ogs_nas_extended_emm_cause_t *extended
int ogs_nas_eps_encode_extended_emm_cause(ogs_pkbuf_t *pkbuf, ogs_nas_extended_emm_cause_t *extended_emm_cause)
{
- uint16_t size = sizeof(ogs_nas_extended_emm_cause_t);
+ int size = sizeof(ogs_nas_extended_emm_cause_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, extended_emm_cause, size);
@@ -1272,9 +1420,13 @@ int ogs_nas_eps_encode_extended_emm_cause(ogs_pkbuf_t *pkbuf, ogs_nas_extended_e
* M V 1/2 */
int ogs_nas_eps_decode_service_type(ogs_nas_service_type_t *service_type, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_service_type_t);
+ int size = sizeof(ogs_nas_service_type_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(service_type, pkbuf->data - size, size);
ogs_trace(" SERVICE_TYPE - ");
@@ -1285,7 +1437,7 @@ int ogs_nas_eps_decode_service_type(ogs_nas_service_type_t *service_type, ogs_pk
int ogs_nas_eps_encode_service_type(ogs_pkbuf_t *pkbuf, ogs_nas_service_type_t *service_type)
{
- uint16_t size = sizeof(ogs_nas_service_type_t);
+ int size = sizeof(ogs_nas_service_type_t);
ogs_nas_service_type_t target;
memcpy(&target, service_type, size);
@@ -1302,9 +1454,13 @@ int ogs_nas_eps_encode_service_type(ogs_pkbuf_t *pkbuf, ogs_nas_service_type_t *
* M V 2 */
int ogs_nas_eps_decode_short_mac(ogs_nas_short_mac_t *short_mac, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_short_mac_t);
+ int size = sizeof(ogs_nas_short_mac_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(short_mac, pkbuf->data - size, size);
*short_mac = be16toh(*short_mac);
@@ -1317,7 +1473,7 @@ int ogs_nas_eps_decode_short_mac(ogs_nas_short_mac_t *short_mac, ogs_pkbuf_t *pk
int ogs_nas_eps_encode_short_mac(ogs_pkbuf_t *pkbuf, ogs_nas_short_mac_t *short_mac)
{
- uint16_t size = sizeof(ogs_nas_short_mac_t);
+ int size = sizeof(ogs_nas_short_mac_t);
ogs_nas_short_mac_t target;
memcpy(&target, short_mac, size);
@@ -1336,9 +1492,13 @@ int ogs_nas_eps_encode_short_mac(ogs_pkbuf_t *pkbuf, ogs_nas_short_mac_t *short_
* O TV 2 */
int ogs_nas_eps_decode_time_zone(ogs_nas_time_zone_t *time_zone, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_time_zone_t);
+ int size = sizeof(ogs_nas_time_zone_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(time_zone, pkbuf->data - size, size);
ogs_trace(" TIME_ZONE - ");
@@ -1349,7 +1509,7 @@ int ogs_nas_eps_decode_time_zone(ogs_nas_time_zone_t *time_zone, ogs_pkbuf_t *pk
int ogs_nas_eps_encode_time_zone(ogs_pkbuf_t *pkbuf, ogs_nas_time_zone_t *time_zone)
{
- uint16_t size = sizeof(ogs_nas_time_zone_t);
+ int size = sizeof(ogs_nas_time_zone_t);
ogs_nas_time_zone_t target;
memcpy(&target, time_zone, size);
@@ -1366,9 +1526,13 @@ int ogs_nas_eps_encode_time_zone(ogs_pkbuf_t *pkbuf, ogs_nas_time_zone_t *time_z
* M V 16 */
int ogs_nas_eps_decode_authentication_parameter_rand(ogs_nas_authentication_parameter_rand_t *authentication_parameter_rand, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_authentication_parameter_rand_t);
+ int size = sizeof(ogs_nas_authentication_parameter_rand_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(authentication_parameter_rand, pkbuf->data - size, size);
ogs_trace(" AUTHENTICATION_PARAMETER_RAND - ");
@@ -1379,7 +1543,7 @@ int ogs_nas_eps_decode_authentication_parameter_rand(ogs_nas_authentication_para
int ogs_nas_eps_encode_authentication_parameter_rand(ogs_pkbuf_t *pkbuf, ogs_nas_authentication_parameter_rand_t *authentication_parameter_rand)
{
- uint16_t size = sizeof(ogs_nas_authentication_parameter_rand_t);
+ int size = sizeof(ogs_nas_authentication_parameter_rand_t);
ogs_nas_authentication_parameter_rand_t target;
memcpy(&target, authentication_parameter_rand, size);
@@ -1396,9 +1560,13 @@ int ogs_nas_eps_encode_authentication_parameter_rand(ogs_pkbuf_t *pkbuf, ogs_nas
* O TV 8 */
int ogs_nas_eps_decode_time_zone_and_time(ogs_nas_time_zone_and_time_t *time_zone_and_time, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_time_zone_and_time_t);
+ int size = sizeof(ogs_nas_time_zone_and_time_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(time_zone_and_time, pkbuf->data - size, size);
ogs_trace(" TIME_ZONE_AND_TIME - ");
@@ -1409,7 +1577,7 @@ int ogs_nas_eps_decode_time_zone_and_time(ogs_nas_time_zone_and_time_t *time_zon
int ogs_nas_eps_encode_time_zone_and_time(ogs_pkbuf_t *pkbuf, ogs_nas_time_zone_and_time_t *time_zone_and_time)
{
- uint16_t size = sizeof(ogs_nas_time_zone_and_time_t);
+ int size = sizeof(ogs_nas_time_zone_and_time_t);
ogs_nas_time_zone_and_time_t target;
memcpy(&target, time_zone_and_time, size);
@@ -1426,9 +1594,13 @@ int ogs_nas_eps_encode_time_zone_and_time(ogs_pkbuf_t *pkbuf, ogs_nas_time_zone_
* O TV 1 */
int ogs_nas_eps_decode_tmsi_status(ogs_nas_tmsi_status_t *tmsi_status, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_tmsi_status_t);
+ int size = sizeof(ogs_nas_tmsi_status_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(tmsi_status, pkbuf->data - size, size);
ogs_trace(" TMSI_STATUS - ");
@@ -1439,7 +1611,7 @@ int ogs_nas_eps_decode_tmsi_status(ogs_nas_tmsi_status_t *tmsi_status, ogs_pkbuf
int ogs_nas_eps_encode_tmsi_status(ogs_pkbuf_t *pkbuf, ogs_nas_tmsi_status_t *tmsi_status)
{
- uint16_t size = sizeof(ogs_nas_tmsi_status_t);
+ int size = sizeof(ogs_nas_tmsi_status_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, tmsi_status, size);
@@ -1454,9 +1626,13 @@ int ogs_nas_eps_encode_tmsi_status(ogs_pkbuf_t *pkbuf, ogs_nas_tmsi_status_t *tm
* O TV 6 */
int ogs_nas_eps_decode_tracking_area_identity(ogs_nas_tracking_area_identity_t *tracking_area_identity, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_tracking_area_identity_t);
+ int size = sizeof(ogs_nas_tracking_area_identity_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(tracking_area_identity, pkbuf->data - size, size);
tracking_area_identity->tac = be16toh(tracking_area_identity->tac);
@@ -1469,7 +1645,7 @@ int ogs_nas_eps_decode_tracking_area_identity(ogs_nas_tracking_area_identity_t *
int ogs_nas_eps_encode_tracking_area_identity(ogs_pkbuf_t *pkbuf, ogs_nas_tracking_area_identity_t *tracking_area_identity)
{
- uint16_t size = sizeof(ogs_nas_tracking_area_identity_t);
+ int size = sizeof(ogs_nas_tracking_area_identity_t);
ogs_nas_tracking_area_identity_t target;
memcpy(&target, tracking_area_identity, size);
@@ -1488,13 +1664,17 @@ int ogs_nas_eps_encode_tracking_area_identity(ogs_pkbuf_t *pkbuf, ogs_nas_tracki
* M LV 7-97 */
int ogs_nas_eps_decode_tracking_area_identity_list(ogs_nas_tracking_area_identity_list_t *tracking_area_identity_list, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_tracking_area_identity_list_t *source = (ogs_nas_tracking_area_identity_list_t *)pkbuf->data;
tracking_area_identity_list->length = source->length;
size = tracking_area_identity_list->length + sizeof(tracking_area_identity_list->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*tracking_area_identity_list) < size) return -1;
memcpy(tracking_area_identity_list, pkbuf->data - size, size);
@@ -1506,7 +1686,7 @@ int ogs_nas_eps_decode_tracking_area_identity_list(ogs_nas_tracking_area_identit
int ogs_nas_eps_encode_tracking_area_identity_list(ogs_pkbuf_t *pkbuf, ogs_nas_tracking_area_identity_list_t *tracking_area_identity_list)
{
- uint16_t size = tracking_area_identity_list->length + sizeof(tracking_area_identity_list->length);
+ int size = tracking_area_identity_list->length + sizeof(tracking_area_identity_list->length);
ogs_nas_tracking_area_identity_list_t target;
memcpy(&target, tracking_area_identity_list, sizeof(ogs_nas_tracking_area_identity_list_t));
@@ -1523,13 +1703,17 @@ int ogs_nas_eps_encode_tracking_area_identity_list(ogs_pkbuf_t *pkbuf, ogs_nas_t
* M LV 3-14 */
int ogs_nas_eps_decode_ue_network_capability(ogs_nas_ue_network_capability_t *ue_network_capability, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_ue_network_capability_t *source = (ogs_nas_ue_network_capability_t *)pkbuf->data;
ue_network_capability->length = source->length;
size = ue_network_capability->length + sizeof(ue_network_capability->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*ue_network_capability) < size) return -1;
memcpy(ue_network_capability, pkbuf->data - size, size);
@@ -1541,7 +1725,7 @@ int ogs_nas_eps_decode_ue_network_capability(ogs_nas_ue_network_capability_t *ue
int ogs_nas_eps_encode_ue_network_capability(ogs_pkbuf_t *pkbuf, ogs_nas_ue_network_capability_t *ue_network_capability)
{
- uint16_t size = ue_network_capability->length + sizeof(ue_network_capability->length);
+ int size = ue_network_capability->length + sizeof(ue_network_capability->length);
ogs_nas_ue_network_capability_t target;
memcpy(&target, ue_network_capability, sizeof(ogs_nas_ue_network_capability_t));
@@ -1558,9 +1742,13 @@ int ogs_nas_eps_encode_ue_network_capability(ogs_pkbuf_t *pkbuf, ogs_nas_ue_netw
* O TV 1 */
int ogs_nas_eps_decode_ue_radio_capability_information_update_needed(ogs_nas_ue_radio_capability_information_update_needed_t *ue_radio_capability_information_update_needed, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_ue_radio_capability_information_update_needed_t);
+ int size = sizeof(ogs_nas_ue_radio_capability_information_update_needed_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(ue_radio_capability_information_update_needed, pkbuf->data - size, size);
ogs_trace(" UE_RADIO_CAPABILITY_INFORMATION_UPDATE_NEEDED - ");
@@ -1571,7 +1759,7 @@ int ogs_nas_eps_decode_ue_radio_capability_information_update_needed(ogs_nas_ue_
int ogs_nas_eps_encode_ue_radio_capability_information_update_needed(ogs_pkbuf_t *pkbuf, ogs_nas_ue_radio_capability_information_update_needed_t *ue_radio_capability_information_update_needed)
{
- uint16_t size = sizeof(ogs_nas_ue_radio_capability_information_update_needed_t);
+ int size = sizeof(ogs_nas_ue_radio_capability_information_update_needed_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, ue_radio_capability_information_update_needed, size);
@@ -1586,13 +1774,17 @@ int ogs_nas_eps_encode_ue_radio_capability_information_update_needed(ogs_pkbuf_t
* M LV 3-6 */
int ogs_nas_eps_decode_ue_security_capability(ogs_nas_ue_security_capability_t *ue_security_capability, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_ue_security_capability_t *source = (ogs_nas_ue_security_capability_t *)pkbuf->data;
ue_security_capability->length = source->length;
size = ue_security_capability->length + sizeof(ue_security_capability->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*ue_security_capability) < size) return -1;
memcpy(ue_security_capability, pkbuf->data - size, size);
@@ -1604,7 +1796,7 @@ int ogs_nas_eps_decode_ue_security_capability(ogs_nas_ue_security_capability_t *
int ogs_nas_eps_encode_ue_security_capability(ogs_pkbuf_t *pkbuf, ogs_nas_ue_security_capability_t *ue_security_capability)
{
- uint16_t size = ue_security_capability->length + sizeof(ue_security_capability->length);
+ int size = ue_security_capability->length + sizeof(ue_security_capability->length);
ogs_nas_ue_security_capability_t target;
memcpy(&target, ue_security_capability, sizeof(ogs_nas_ue_security_capability_t));
@@ -1621,13 +1813,17 @@ int ogs_nas_eps_encode_ue_security_capability(ogs_pkbuf_t *pkbuf, ogs_nas_ue_sec
* O TLV 5-50 */
int ogs_nas_eps_decode_emergency_number_list(ogs_nas_emergency_number_list_t *emergency_number_list, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_emergency_number_list_t *source = (ogs_nas_emergency_number_list_t *)pkbuf->data;
emergency_number_list->length = source->length;
size = emergency_number_list->length + sizeof(emergency_number_list->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*emergency_number_list) < size) return -1;
memcpy(emergency_number_list, pkbuf->data - size, size);
@@ -1639,7 +1835,7 @@ int ogs_nas_eps_decode_emergency_number_list(ogs_nas_emergency_number_list_t *em
int ogs_nas_eps_encode_emergency_number_list(ogs_pkbuf_t *pkbuf, ogs_nas_emergency_number_list_t *emergency_number_list)
{
- uint16_t size = emergency_number_list->length + sizeof(emergency_number_list->length);
+ int size = emergency_number_list->length + sizeof(emergency_number_list->length);
ogs_nas_emergency_number_list_t target;
memcpy(&target, emergency_number_list, sizeof(ogs_nas_emergency_number_list_t));
@@ -1656,13 +1852,17 @@ int ogs_nas_eps_encode_emergency_number_list(ogs_pkbuf_t *pkbuf, ogs_nas_emergen
* O TLV-E 7-65538 */
int ogs_nas_eps_decode_extended_emergency_number_list(ogs_nas_extended_emergency_number_list_t *extended_emergency_number_list, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_extended_emergency_number_list_t *source = (ogs_nas_extended_emergency_number_list_t *)pkbuf->data;
extended_emergency_number_list->length = be16toh(source->length);
size = extended_emergency_number_list->length + sizeof(extended_emergency_number_list->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
extended_emergency_number_list->buffer = pkbuf->data - size + sizeof(extended_emergency_number_list->length);
ogs_trace(" EXTENDED_EMERGENCY_NUMBER_LIST - ");
@@ -1673,8 +1873,8 @@ int ogs_nas_eps_decode_extended_emergency_number_list(ogs_nas_extended_emergency
int ogs_nas_eps_encode_extended_emergency_number_list(ogs_pkbuf_t *pkbuf, ogs_nas_extended_emergency_number_list_t *extended_emergency_number_list)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(extended_emergency_number_list);
ogs_assert(extended_emergency_number_list->buffer);
@@ -1698,13 +1898,17 @@ int ogs_nas_eps_encode_extended_emergency_number_list(ogs_pkbuf_t *pkbuf, ogs_na
* O TLV 3-14 */
int ogs_nas_eps_decode_cli(ogs_nas_cli_t *cli, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_cli_t *source = (ogs_nas_cli_t *)pkbuf->data;
cli->length = source->length;
size = cli->length + sizeof(cli->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*cli) < size) return -1;
memcpy(cli, pkbuf->data - size, size);
@@ -1716,7 +1920,7 @@ int ogs_nas_eps_decode_cli(ogs_nas_cli_t *cli, ogs_pkbuf_t *pkbuf)
int ogs_nas_eps_encode_cli(ogs_pkbuf_t *pkbuf, ogs_nas_cli_t *cli)
{
- uint16_t size = cli->length + sizeof(cli->length);
+ int size = cli->length + sizeof(cli->length);
ogs_nas_cli_t target;
memcpy(&target, cli, sizeof(ogs_nas_cli_t));
@@ -1733,9 +1937,13 @@ int ogs_nas_eps_encode_cli(ogs_pkbuf_t *pkbuf, ogs_nas_cli_t *cli)
* O TV 2 */
int ogs_nas_eps_decode_ss_code(ogs_nas_ss_code_t *ss_code, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_ss_code_t);
+ int size = sizeof(ogs_nas_ss_code_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(ss_code, pkbuf->data - size, size);
ogs_trace(" SS_CODE - ");
@@ -1746,7 +1954,7 @@ int ogs_nas_eps_decode_ss_code(ogs_nas_ss_code_t *ss_code, ogs_pkbuf_t *pkbuf)
int ogs_nas_eps_encode_ss_code(ogs_pkbuf_t *pkbuf, ogs_nas_ss_code_t *ss_code)
{
- uint16_t size = sizeof(ogs_nas_ss_code_t);
+ int size = sizeof(ogs_nas_ss_code_t);
ogs_nas_ss_code_t target;
memcpy(&target, ss_code, size);
@@ -1763,13 +1971,17 @@ int ogs_nas_eps_encode_ss_code(ogs_pkbuf_t *pkbuf, ogs_nas_ss_code_t *ss_code)
* M LV 5-17 */
int ogs_nas_eps_decode_authentication_response_parameter(ogs_nas_authentication_response_parameter_t *authentication_response_parameter, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_authentication_response_parameter_t *source = (ogs_nas_authentication_response_parameter_t *)pkbuf->data;
authentication_response_parameter->length = source->length;
size = authentication_response_parameter->length + sizeof(authentication_response_parameter->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*authentication_response_parameter) < size) return -1;
memcpy(authentication_response_parameter, pkbuf->data - size, size);
@@ -1781,7 +1993,7 @@ int ogs_nas_eps_decode_authentication_response_parameter(ogs_nas_authentication_
int ogs_nas_eps_encode_authentication_response_parameter(ogs_pkbuf_t *pkbuf, ogs_nas_authentication_response_parameter_t *authentication_response_parameter)
{
- uint16_t size = authentication_response_parameter->length + sizeof(authentication_response_parameter->length);
+ int size = authentication_response_parameter->length + sizeof(authentication_response_parameter->length);
ogs_nas_authentication_response_parameter_t target;
memcpy(&target, authentication_response_parameter, sizeof(ogs_nas_authentication_response_parameter_t));
@@ -1798,9 +2010,13 @@ int ogs_nas_eps_encode_authentication_response_parameter(ogs_pkbuf_t *pkbuf, ogs
* O TV 2 */
int ogs_nas_eps_decode_lcs_indicator(ogs_nas_lcs_indicator_t *lcs_indicator, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_lcs_indicator_t);
+ int size = sizeof(ogs_nas_lcs_indicator_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(lcs_indicator, pkbuf->data - size, size);
ogs_trace(" LCS_INDICATOR - ");
@@ -1811,7 +2027,7 @@ int ogs_nas_eps_decode_lcs_indicator(ogs_nas_lcs_indicator_t *lcs_indicator, ogs
int ogs_nas_eps_encode_lcs_indicator(ogs_pkbuf_t *pkbuf, ogs_nas_lcs_indicator_t *lcs_indicator)
{
- uint16_t size = sizeof(ogs_nas_lcs_indicator_t);
+ int size = sizeof(ogs_nas_lcs_indicator_t);
ogs_nas_lcs_indicator_t target;
memcpy(&target, lcs_indicator, size);
@@ -1828,13 +2044,17 @@ int ogs_nas_eps_encode_lcs_indicator(ogs_pkbuf_t *pkbuf, ogs_nas_lcs_indicator_t
* O TLV 3-257 */
int ogs_nas_eps_decode_lcs_client_identity(ogs_nas_lcs_client_identity_t *lcs_client_identity, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_lcs_client_identity_t *source = (ogs_nas_lcs_client_identity_t *)pkbuf->data;
lcs_client_identity->length = source->length;
size = lcs_client_identity->length + sizeof(lcs_client_identity->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*lcs_client_identity) < size) return -1;
memcpy(lcs_client_identity, pkbuf->data - size, size);
@@ -1846,7 +2066,7 @@ int ogs_nas_eps_decode_lcs_client_identity(ogs_nas_lcs_client_identity_t *lcs_cl
int ogs_nas_eps_encode_lcs_client_identity(ogs_pkbuf_t *pkbuf, ogs_nas_lcs_client_identity_t *lcs_client_identity)
{
- uint16_t size = lcs_client_identity->length + sizeof(lcs_client_identity->length);
+ int size = lcs_client_identity->length + sizeof(lcs_client_identity->length);
ogs_nas_lcs_client_identity_t target;
memcpy(&target, lcs_client_identity, sizeof(ogs_nas_lcs_client_identity_t));
@@ -1863,9 +2083,13 @@ int ogs_nas_eps_encode_lcs_client_identity(ogs_pkbuf_t *pkbuf, ogs_nas_lcs_clien
* M V 1 */
int ogs_nas_eps_decode_generic_message_container_type(ogs_nas_generic_message_container_type_t *generic_message_container_type, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_generic_message_container_type_t);
+ int size = sizeof(ogs_nas_generic_message_container_type_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(generic_message_container_type, pkbuf->data - size, size);
ogs_trace(" GENERIC_MESSAGE_CONTAINER_TYPE - ");
@@ -1876,7 +2100,7 @@ int ogs_nas_eps_decode_generic_message_container_type(ogs_nas_generic_message_co
int ogs_nas_eps_encode_generic_message_container_type(ogs_pkbuf_t *pkbuf, ogs_nas_generic_message_container_type_t *generic_message_container_type)
{
- uint16_t size = sizeof(ogs_nas_generic_message_container_type_t);
+ int size = sizeof(ogs_nas_generic_message_container_type_t);
ogs_nas_generic_message_container_type_t target;
memcpy(&target, generic_message_container_type, size);
@@ -1893,13 +2117,17 @@ int ogs_nas_eps_encode_generic_message_container_type(ogs_pkbuf_t *pkbuf, ogs_na
* M LV-E 3-n */
int ogs_nas_eps_decode_generic_message_container(ogs_nas_generic_message_container_t *generic_message_container, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_generic_message_container_t *source = (ogs_nas_generic_message_container_t *)pkbuf->data;
generic_message_container->length = be16toh(source->length);
size = generic_message_container->length + sizeof(generic_message_container->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
generic_message_container->buffer = pkbuf->data - size + sizeof(generic_message_container->length);
ogs_trace(" GENERIC_MESSAGE_CONTAINER - ");
@@ -1910,8 +2138,8 @@ int ogs_nas_eps_decode_generic_message_container(ogs_nas_generic_message_contain
int ogs_nas_eps_encode_generic_message_container(ogs_pkbuf_t *pkbuf, ogs_nas_generic_message_container_t *generic_message_container)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(generic_message_container);
ogs_assert(generic_message_container->buffer);
@@ -1935,13 +2163,17 @@ int ogs_nas_eps_encode_generic_message_container(ogs_pkbuf_t *pkbuf, ogs_nas_gen
* O TLV 3 */
int ogs_nas_eps_decode_voice_domain_preference_and_ue_usage_setting(ogs_nas_voice_domain_preference_and_ue_usage_setting_t *voice_domain_preference_and_ue_usage_setting, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_voice_domain_preference_and_ue_usage_setting_t *source = (ogs_nas_voice_domain_preference_and_ue_usage_setting_t *)pkbuf->data;
voice_domain_preference_and_ue_usage_setting->length = source->length;
size = voice_domain_preference_and_ue_usage_setting->length + sizeof(voice_domain_preference_and_ue_usage_setting->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*voice_domain_preference_and_ue_usage_setting) < size) return -1;
memcpy(voice_domain_preference_and_ue_usage_setting, pkbuf->data - size, size);
@@ -1953,7 +2185,7 @@ int ogs_nas_eps_decode_voice_domain_preference_and_ue_usage_setting(ogs_nas_voic
int ogs_nas_eps_encode_voice_domain_preference_and_ue_usage_setting(ogs_pkbuf_t *pkbuf, ogs_nas_voice_domain_preference_and_ue_usage_setting_t *voice_domain_preference_and_ue_usage_setting)
{
- uint16_t size = voice_domain_preference_and_ue_usage_setting->length + sizeof(voice_domain_preference_and_ue_usage_setting->length);
+ int size = voice_domain_preference_and_ue_usage_setting->length + sizeof(voice_domain_preference_and_ue_usage_setting->length);
ogs_nas_voice_domain_preference_and_ue_usage_setting_t target;
memcpy(&target, voice_domain_preference_and_ue_usage_setting, sizeof(ogs_nas_voice_domain_preference_and_ue_usage_setting_t));
@@ -1970,9 +2202,13 @@ int ogs_nas_eps_encode_voice_domain_preference_and_ue_usage_setting(ogs_pkbuf_t
* O TV 1 */
int ogs_nas_eps_decode_guti_type(ogs_nas_guti_type_t *guti_type, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_guti_type_t);
+ int size = sizeof(ogs_nas_guti_type_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(guti_type, pkbuf->data - size, size);
ogs_trace(" GUTI_TYPE - ");
@@ -1983,7 +2219,7 @@ int ogs_nas_eps_decode_guti_type(ogs_nas_guti_type_t *guti_type, ogs_pkbuf_t *pk
int ogs_nas_eps_encode_guti_type(ogs_pkbuf_t *pkbuf, ogs_nas_guti_type_t *guti_type)
{
- uint16_t size = sizeof(ogs_nas_guti_type_t);
+ int size = sizeof(ogs_nas_guti_type_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, guti_type, size);
@@ -1998,13 +2234,17 @@ int ogs_nas_eps_encode_guti_type(ogs_pkbuf_t *pkbuf, ogs_nas_guti_type_t *guti_t
* O TLV 3 */
int ogs_nas_eps_decode_extended_drx_parameters(ogs_nas_extended_drx_parameters_t *extended_drx_parameters, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_extended_drx_parameters_t *source = (ogs_nas_extended_drx_parameters_t *)pkbuf->data;
extended_drx_parameters->length = source->length;
size = extended_drx_parameters->length + sizeof(extended_drx_parameters->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*extended_drx_parameters) < size) return -1;
memcpy(extended_drx_parameters, pkbuf->data - size, size);
@@ -2016,7 +2256,7 @@ int ogs_nas_eps_decode_extended_drx_parameters(ogs_nas_extended_drx_parameters_t
int ogs_nas_eps_encode_extended_drx_parameters(ogs_pkbuf_t *pkbuf, ogs_nas_extended_drx_parameters_t *extended_drx_parameters)
{
- uint16_t size = extended_drx_parameters->length + sizeof(extended_drx_parameters->length);
+ int size = extended_drx_parameters->length + sizeof(extended_drx_parameters->length);
ogs_nas_extended_drx_parameters_t target;
memcpy(&target, extended_drx_parameters, sizeof(ogs_nas_extended_drx_parameters_t));
@@ -2033,13 +2273,17 @@ int ogs_nas_eps_encode_extended_drx_parameters(ogs_pkbuf_t *pkbuf, ogs_nas_exten
* O TLV 4 */
int ogs_nas_eps_decode_dcn_id(ogs_nas_dcn_id_t *dcn_id, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_dcn_id_t *source = (ogs_nas_dcn_id_t *)pkbuf->data;
dcn_id->length = source->length;
size = dcn_id->length + sizeof(dcn_id->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*dcn_id) < size) return -1;
memcpy(dcn_id, pkbuf->data - size, size);
@@ -2051,7 +2295,7 @@ int ogs_nas_eps_decode_dcn_id(ogs_nas_dcn_id_t *dcn_id, ogs_pkbuf_t *pkbuf)
int ogs_nas_eps_encode_dcn_id(ogs_pkbuf_t *pkbuf, ogs_nas_dcn_id_t *dcn_id)
{
- uint16_t size = dcn_id->length + sizeof(dcn_id->length);
+ int size = dcn_id->length + sizeof(dcn_id->length);
ogs_nas_dcn_id_t target;
memcpy(&target, dcn_id, sizeof(ogs_nas_dcn_id_t));
@@ -2068,9 +2312,13 @@ int ogs_nas_eps_encode_dcn_id(ogs_pkbuf_t *pkbuf, ogs_nas_dcn_id_t *dcn_id)
* O TV 1 */
int ogs_nas_eps_decode_non__nw_provided_policies(ogs_nas_non__nw_provided_policies_t *non__nw_provided_policies, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_non__nw_provided_policies_t);
+ int size = sizeof(ogs_nas_non__nw_provided_policies_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(non__nw_provided_policies, pkbuf->data - size, size);
ogs_trace(" NON__NW_PROVIDED_POLICIES - ");
@@ -2081,7 +2329,7 @@ int ogs_nas_eps_decode_non__nw_provided_policies(ogs_nas_non__nw_provided_polici
int ogs_nas_eps_encode_non__nw_provided_policies(ogs_pkbuf_t *pkbuf, ogs_nas_non__nw_provided_policies_t *non__nw_provided_policies)
{
- uint16_t size = sizeof(ogs_nas_non__nw_provided_policies_t);
+ int size = sizeof(ogs_nas_non__nw_provided_policies_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, non__nw_provided_policies, size);
@@ -2096,9 +2344,13 @@ int ogs_nas_eps_encode_non__nw_provided_policies(ogs_pkbuf_t *pkbuf, ogs_nas_non
* O TV 1 */
int ogs_nas_eps_decode_sms_services_status(ogs_nas_sms_services_status_t *sms_services_status, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_sms_services_status_t);
+ int size = sizeof(ogs_nas_sms_services_status_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(sms_services_status, pkbuf->data - size, size);
ogs_trace(" SMS_SERVICES_STATUS - ");
@@ -2109,7 +2361,7 @@ int ogs_nas_eps_decode_sms_services_status(ogs_nas_sms_services_status_t *sms_se
int ogs_nas_eps_encode_sms_services_status(ogs_pkbuf_t *pkbuf, ogs_nas_sms_services_status_t *sms_services_status)
{
- uint16_t size = sizeof(ogs_nas_sms_services_status_t);
+ int size = sizeof(ogs_nas_sms_services_status_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, sms_services_status, size);
@@ -2124,9 +2376,13 @@ int ogs_nas_eps_encode_sms_services_status(ogs_pkbuf_t *pkbuf, ogs_nas_sms_servi
* O TV 1 */
int ogs_nas_eps_decode_ciphering_key_sequence_number(ogs_nas_ciphering_key_sequence_number_t *ciphering_key_sequence_number, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_ciphering_key_sequence_number_t);
+ int size = sizeof(ogs_nas_ciphering_key_sequence_number_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(ciphering_key_sequence_number, pkbuf->data - size, size);
ogs_trace(" CIPHERING_KEY_SEQUENCE_NUMBER - ");
@@ -2137,7 +2393,7 @@ int ogs_nas_eps_decode_ciphering_key_sequence_number(ogs_nas_ciphering_key_seque
int ogs_nas_eps_encode_ciphering_key_sequence_number(ogs_pkbuf_t *pkbuf, ogs_nas_ciphering_key_sequence_number_t *ciphering_key_sequence_number)
{
- uint16_t size = sizeof(ogs_nas_ciphering_key_sequence_number_t);
+ int size = sizeof(ogs_nas_ciphering_key_sequence_number_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, ciphering_key_sequence_number, size);
@@ -2152,9 +2408,13 @@ int ogs_nas_eps_encode_ciphering_key_sequence_number(ogs_pkbuf_t *pkbuf, ogs_nas
* O TV 1 */
int ogs_nas_eps_decode_csfb_response(ogs_nas_csfb_response_t *csfb_response, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_csfb_response_t);
+ int size = sizeof(ogs_nas_csfb_response_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(csfb_response, pkbuf->data - size, size);
ogs_trace(" CSFB_RESPONSE - ");
@@ -2165,7 +2425,7 @@ int ogs_nas_eps_decode_csfb_response(ogs_nas_csfb_response_t *csfb_response, ogs
int ogs_nas_eps_encode_csfb_response(ogs_pkbuf_t *pkbuf, ogs_nas_csfb_response_t *csfb_response)
{
- uint16_t size = sizeof(ogs_nas_csfb_response_t);
+ int size = sizeof(ogs_nas_csfb_response_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, csfb_response, size);
@@ -2180,13 +2440,17 @@ int ogs_nas_eps_encode_csfb_response(ogs_pkbuf_t *pkbuf, ogs_nas_csfb_response_t
* O TLV 10 */
int ogs_nas_eps_decode_hashmme(ogs_nas_hashmme_t *hashmme, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_hashmme_t *source = (ogs_nas_hashmme_t *)pkbuf->data;
hashmme->length = source->length;
size = hashmme->length + sizeof(hashmme->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*hashmme) < size) return -1;
memcpy(hashmme, pkbuf->data - size, size);
@@ -2198,7 +2462,7 @@ int ogs_nas_eps_decode_hashmme(ogs_nas_hashmme_t *hashmme, ogs_pkbuf_t *pkbuf)
int ogs_nas_eps_encode_hashmme(ogs_pkbuf_t *pkbuf, ogs_nas_hashmme_t *hashmme)
{
- uint16_t size = hashmme->length + sizeof(hashmme->length);
+ int size = hashmme->length + sizeof(hashmme->length);
ogs_nas_hashmme_t target;
memcpy(&target, hashmme, sizeof(ogs_nas_hashmme_t));
@@ -2215,13 +2479,17 @@ int ogs_nas_eps_encode_hashmme(ogs_pkbuf_t *pkbuf, ogs_nas_hashmme_t *hashmme)
* O TLV-E 3-n */
int ogs_nas_eps_decode_replayed_nas_message_container(ogs_nas_replayed_nas_message_container_t *replayed_nas_message_container, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_replayed_nas_message_container_t *source = (ogs_nas_replayed_nas_message_container_t *)pkbuf->data;
replayed_nas_message_container->length = be16toh(source->length);
size = replayed_nas_message_container->length + sizeof(replayed_nas_message_container->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
replayed_nas_message_container->buffer = pkbuf->data - size + sizeof(replayed_nas_message_container->length);
ogs_trace(" REPLAYED_NAS_MESSAGE_CONTAINER - ");
@@ -2232,8 +2500,8 @@ int ogs_nas_eps_decode_replayed_nas_message_container(ogs_nas_replayed_nas_messa
int ogs_nas_eps_encode_replayed_nas_message_container(ogs_pkbuf_t *pkbuf, ogs_nas_replayed_nas_message_container_t *replayed_nas_message_container)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(replayed_nas_message_container);
ogs_assert(replayed_nas_message_container->buffer);
@@ -2257,9 +2525,13 @@ int ogs_nas_eps_encode_replayed_nas_message_container(ogs_pkbuf_t *pkbuf, ogs_na
* O TV 1 */
int ogs_nas_eps_decode_network_policy(ogs_nas_network_policy_t *network_policy, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_network_policy_t);
+ int size = sizeof(ogs_nas_network_policy_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(network_policy, pkbuf->data - size, size);
ogs_trace(" NETWORK_POLICY - ");
@@ -2270,7 +2542,7 @@ int ogs_nas_eps_decode_network_policy(ogs_nas_network_policy_t *network_policy,
int ogs_nas_eps_encode_network_policy(ogs_pkbuf_t *pkbuf, ogs_nas_network_policy_t *network_policy)
{
- uint16_t size = sizeof(ogs_nas_network_policy_t);
+ int size = sizeof(ogs_nas_network_policy_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, network_policy, size);
@@ -2285,13 +2557,17 @@ int ogs_nas_eps_encode_network_policy(ogs_pkbuf_t *pkbuf, ogs_nas_network_policy
* O TLV 6 */
int ogs_nas_eps_decode_ue_additional_security_capability(ogs_nas_ue_additional_security_capability_t *ue_additional_security_capability, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_ue_additional_security_capability_t *source = (ogs_nas_ue_additional_security_capability_t *)pkbuf->data;
ue_additional_security_capability->length = source->length;
size = ue_additional_security_capability->length + sizeof(ue_additional_security_capability->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*ue_additional_security_capability) < size) return -1;
memcpy(ue_additional_security_capability, pkbuf->data - size, size);
@@ -2303,7 +2579,7 @@ int ogs_nas_eps_decode_ue_additional_security_capability(ogs_nas_ue_additional_s
int ogs_nas_eps_encode_ue_additional_security_capability(ogs_pkbuf_t *pkbuf, ogs_nas_ue_additional_security_capability_t *ue_additional_security_capability)
{
- uint16_t size = ue_additional_security_capability->length + sizeof(ue_additional_security_capability->length);
+ int size = ue_additional_security_capability->length + sizeof(ue_additional_security_capability->length);
ogs_nas_ue_additional_security_capability_t target;
memcpy(&target, ue_additional_security_capability, sizeof(ogs_nas_ue_additional_security_capability_t));
@@ -2320,13 +2596,17 @@ int ogs_nas_eps_encode_ue_additional_security_capability(ogs_pkbuf_t *pkbuf, ogs
* O TLV 3 */
int ogs_nas_eps_decode_ue_status(ogs_nas_ue_status_t *ue_status, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_ue_status_t *source = (ogs_nas_ue_status_t *)pkbuf->data;
ue_status->length = source->length;
size = ue_status->length + sizeof(ue_status->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*ue_status) < size) return -1;
memcpy(ue_status, pkbuf->data - size, size);
@@ -2338,7 +2618,7 @@ int ogs_nas_eps_decode_ue_status(ogs_nas_ue_status_t *ue_status, ogs_pkbuf_t *pk
int ogs_nas_eps_encode_ue_status(ogs_pkbuf_t *pkbuf, ogs_nas_ue_status_t *ue_status)
{
- uint16_t size = ue_status->length + sizeof(ue_status->length);
+ int size = ue_status->length + sizeof(ue_status->length);
ogs_nas_ue_status_t target;
memcpy(&target, ue_status, sizeof(ogs_nas_ue_status_t));
@@ -2355,9 +2635,13 @@ int ogs_nas_eps_encode_ue_status(ogs_pkbuf_t *pkbuf, ogs_nas_ue_status_t *ue_sta
* O TV 2 */
int ogs_nas_eps_decode_additional_information_requested(ogs_nas_additional_information_requested_t *additional_information_requested, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_additional_information_requested_t);
+ int size = sizeof(ogs_nas_additional_information_requested_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(additional_information_requested, pkbuf->data - size, size);
ogs_trace(" ADDITIONAL_INFORMATION_REQUESTED - ");
@@ -2368,7 +2652,7 @@ int ogs_nas_eps_decode_additional_information_requested(ogs_nas_additional_infor
int ogs_nas_eps_encode_additional_information_requested(ogs_pkbuf_t *pkbuf, ogs_nas_additional_information_requested_t *additional_information_requested)
{
- uint16_t size = sizeof(ogs_nas_additional_information_requested_t);
+ int size = sizeof(ogs_nas_additional_information_requested_t);
ogs_nas_additional_information_requested_t target;
memcpy(&target, additional_information_requested, size);
@@ -2385,13 +2669,17 @@ int ogs_nas_eps_encode_additional_information_requested(ogs_pkbuf_t *pkbuf, ogs_
* O TLV-E 35-2291 */
int ogs_nas_eps_decode_ciphering_key_data(ogs_nas_ciphering_key_data_t *ciphering_key_data, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_ciphering_key_data_t *source = (ogs_nas_ciphering_key_data_t *)pkbuf->data;
ciphering_key_data->length = be16toh(source->length);
size = ciphering_key_data->length + sizeof(ciphering_key_data->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
ciphering_key_data->buffer = pkbuf->data - size + sizeof(ciphering_key_data->length);
ogs_trace(" CIPHERING_KEY_DATA - ");
@@ -2402,8 +2690,8 @@ int ogs_nas_eps_decode_ciphering_key_data(ogs_nas_ciphering_key_data_t *cipherin
int ogs_nas_eps_encode_ciphering_key_data(ogs_pkbuf_t *pkbuf, ogs_nas_ciphering_key_data_t *ciphering_key_data)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(ciphering_key_data);
ogs_assert(ciphering_key_data->buffer);
@@ -2427,13 +2715,17 @@ int ogs_nas_eps_encode_ciphering_key_data(ogs_pkbuf_t *pkbuf, ogs_nas_ciphering_
* O TLV 3-15 */
int ogs_nas_eps_decode_n1_ue_network_capability(ogs_nas_n1_ue_network_capability_t *n1_ue_network_capability, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_n1_ue_network_capability_t *source = (ogs_nas_n1_ue_network_capability_t *)pkbuf->data;
n1_ue_network_capability->length = source->length;
size = n1_ue_network_capability->length + sizeof(n1_ue_network_capability->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*n1_ue_network_capability) < size) return -1;
memcpy(n1_ue_network_capability, pkbuf->data - size, size);
@@ -2445,7 +2737,7 @@ int ogs_nas_eps_decode_n1_ue_network_capability(ogs_nas_n1_ue_network_capability
int ogs_nas_eps_encode_n1_ue_network_capability(ogs_pkbuf_t *pkbuf, ogs_nas_n1_ue_network_capability_t *n1_ue_network_capability)
{
- uint16_t size = n1_ue_network_capability->length + sizeof(n1_ue_network_capability->length);
+ int size = n1_ue_network_capability->length + sizeof(n1_ue_network_capability->length);
ogs_nas_n1_ue_network_capability_t target;
memcpy(&target, n1_ue_network_capability, sizeof(ogs_nas_n1_ue_network_capability_t));
@@ -2462,9 +2754,13 @@ int ogs_nas_eps_encode_n1_ue_network_capability(ogs_pkbuf_t *pkbuf, ogs_nas_n1_u
* O TV 1 */
int ogs_nas_eps_decode_ue_radio_capability_id_request(ogs_nas_ue_radio_capability_id_request_t *ue_radio_capability_id_request, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_ue_radio_capability_id_request_t);
+ int size = sizeof(ogs_nas_ue_radio_capability_id_request_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(ue_radio_capability_id_request, pkbuf->data - size, size);
ogs_trace(" UE_RADIO_CAPABILITY_ID_REQUEST - ");
@@ -2475,7 +2771,7 @@ int ogs_nas_eps_decode_ue_radio_capability_id_request(ogs_nas_ue_radio_capabilit
int ogs_nas_eps_encode_ue_radio_capability_id_request(ogs_pkbuf_t *pkbuf, ogs_nas_ue_radio_capability_id_request_t *ue_radio_capability_id_request)
{
- uint16_t size = sizeof(ogs_nas_ue_radio_capability_id_request_t);
+ int size = sizeof(ogs_nas_ue_radio_capability_id_request_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, ue_radio_capability_id_request, size);
@@ -2490,13 +2786,17 @@ int ogs_nas_eps_encode_ue_radio_capability_id_request(ogs_pkbuf_t *pkbuf, ogs_na
* O TLV 3 */
int ogs_nas_eps_decode_daylight_saving_time(ogs_nas_daylight_saving_time_t *daylight_saving_time, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_daylight_saving_time_t *source = (ogs_nas_daylight_saving_time_t *)pkbuf->data;
daylight_saving_time->length = source->length;
size = daylight_saving_time->length + sizeof(daylight_saving_time->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*daylight_saving_time) < size) return -1;
memcpy(daylight_saving_time, pkbuf->data - size, size);
@@ -2508,7 +2808,7 @@ int ogs_nas_eps_decode_daylight_saving_time(ogs_nas_daylight_saving_time_t *dayl
int ogs_nas_eps_encode_daylight_saving_time(ogs_pkbuf_t *pkbuf, ogs_nas_daylight_saving_time_t *daylight_saving_time)
{
- uint16_t size = daylight_saving_time->length + sizeof(daylight_saving_time->length);
+ int size = daylight_saving_time->length + sizeof(daylight_saving_time->length);
ogs_nas_daylight_saving_time_t target;
memcpy(&target, daylight_saving_time, sizeof(ogs_nas_daylight_saving_time_t));
@@ -2525,13 +2825,17 @@ int ogs_nas_eps_encode_daylight_saving_time(ogs_pkbuf_t *pkbuf, ogs_nas_daylight
* O TLV 3-n */
int ogs_nas_eps_decode_ue_radio_capability_id(ogs_nas_ue_radio_capability_id_t *ue_radio_capability_id, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_ue_radio_capability_id_t *source = (ogs_nas_ue_radio_capability_id_t *)pkbuf->data;
ue_radio_capability_id->length = source->length;
size = ue_radio_capability_id->length + sizeof(ue_radio_capability_id->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*ue_radio_capability_id) < size) return -1;
memcpy(ue_radio_capability_id, pkbuf->data - size, size);
@@ -2543,7 +2847,7 @@ int ogs_nas_eps_decode_ue_radio_capability_id(ogs_nas_ue_radio_capability_id_t *
int ogs_nas_eps_encode_ue_radio_capability_id(ogs_pkbuf_t *pkbuf, ogs_nas_ue_radio_capability_id_t *ue_radio_capability_id)
{
- uint16_t size = ue_radio_capability_id->length + sizeof(ue_radio_capability_id->length);
+ int size = ue_radio_capability_id->length + sizeof(ue_radio_capability_id->length);
ogs_nas_ue_radio_capability_id_t target;
memcpy(&target, ue_radio_capability_id, sizeof(ogs_nas_ue_radio_capability_id_t));
@@ -2560,9 +2864,13 @@ int ogs_nas_eps_encode_ue_radio_capability_id(ogs_pkbuf_t *pkbuf, ogs_nas_ue_rad
* O TV 1 */
int ogs_nas_eps_decode_ue_radio_capability_id_deletion_indication(ogs_nas_ue_radio_capability_id_deletion_indication_t *ue_radio_capability_id_deletion_indication, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_ue_radio_capability_id_deletion_indication_t);
+ int size = sizeof(ogs_nas_ue_radio_capability_id_deletion_indication_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(ue_radio_capability_id_deletion_indication, pkbuf->data - size, size);
ogs_trace(" UE_RADIO_CAPABILITY_ID_DELETION_INDICATION - ");
@@ -2573,7 +2881,7 @@ int ogs_nas_eps_decode_ue_radio_capability_id_deletion_indication(ogs_nas_ue_rad
int ogs_nas_eps_encode_ue_radio_capability_id_deletion_indication(ogs_pkbuf_t *pkbuf, ogs_nas_ue_radio_capability_id_deletion_indication_t *ue_radio_capability_id_deletion_indication)
{
- uint16_t size = sizeof(ogs_nas_ue_radio_capability_id_deletion_indication_t);
+ int size = sizeof(ogs_nas_ue_radio_capability_id_deletion_indication_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, ue_radio_capability_id_deletion_indication, size);
@@ -2588,9 +2896,13 @@ int ogs_nas_eps_encode_ue_radio_capability_id_deletion_indication(ogs_pkbuf_t *p
* M V 1/2 */
int ogs_nas_eps_decode_detach_type(ogs_nas_detach_type_t *detach_type, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_detach_type_t);
+ int size = sizeof(ogs_nas_detach_type_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(detach_type, pkbuf->data - size, size);
ogs_trace(" DETACH_TYPE - ");
@@ -2601,7 +2913,7 @@ int ogs_nas_eps_decode_detach_type(ogs_nas_detach_type_t *detach_type, ogs_pkbuf
int ogs_nas_eps_encode_detach_type(ogs_pkbuf_t *pkbuf, ogs_nas_detach_type_t *detach_type)
{
- uint16_t size = sizeof(ogs_nas_detach_type_t);
+ int size = sizeof(ogs_nas_detach_type_t);
ogs_nas_detach_type_t target;
memcpy(&target, detach_type, size);
@@ -2618,9 +2930,13 @@ int ogs_nas_eps_encode_detach_type(ogs_pkbuf_t *pkbuf, ogs_nas_detach_type_t *de
* O TV 3 */
int ogs_nas_eps_decode_drx_parameter(ogs_nas_drx_parameter_t *drx_parameter, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_drx_parameter_t);
+ int size = sizeof(ogs_nas_drx_parameter_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(drx_parameter, pkbuf->data - size, size);
ogs_trace(" DRX_PARAMETER - ");
@@ -2631,7 +2947,7 @@ int ogs_nas_eps_decode_drx_parameter(ogs_nas_drx_parameter_t *drx_parameter, ogs
int ogs_nas_eps_encode_drx_parameter(ogs_pkbuf_t *pkbuf, ogs_nas_drx_parameter_t *drx_parameter)
{
- uint16_t size = sizeof(ogs_nas_drx_parameter_t);
+ int size = sizeof(ogs_nas_drx_parameter_t);
ogs_nas_drx_parameter_t target;
memcpy(&target, drx_parameter, size);
@@ -2648,9 +2964,13 @@ int ogs_nas_eps_encode_drx_parameter(ogs_pkbuf_t *pkbuf, ogs_nas_drx_parameter_t
* O TV 2 */
int ogs_nas_eps_decode_emm_cause(ogs_nas_emm_cause_t *emm_cause, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_emm_cause_t);
+ int size = sizeof(ogs_nas_emm_cause_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(emm_cause, pkbuf->data - size, size);
ogs_trace(" EMM_CAUSE - ");
@@ -2661,7 +2981,7 @@ int ogs_nas_eps_decode_emm_cause(ogs_nas_emm_cause_t *emm_cause, ogs_pkbuf_t *pk
int ogs_nas_eps_encode_emm_cause(ogs_pkbuf_t *pkbuf, ogs_nas_emm_cause_t *emm_cause)
{
- uint16_t size = sizeof(ogs_nas_emm_cause_t);
+ int size = sizeof(ogs_nas_emm_cause_t);
ogs_nas_emm_cause_t target;
memcpy(&target, emm_cause, size);
@@ -2678,13 +2998,17 @@ int ogs_nas_eps_encode_emm_cause(ogs_pkbuf_t *pkbuf, ogs_nas_emm_cause_t *emm_ca
* M LV 2-101 */
int ogs_nas_eps_decode_access_point_name(ogs_nas_access_point_name_t *access_point_name, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_access_point_name_t *source = (ogs_nas_access_point_name_t *)pkbuf->data;
access_point_name->length = source->length;
size = access_point_name->length + sizeof(access_point_name->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*access_point_name) < size) return -1;
memcpy(access_point_name, pkbuf->data - size, size);
@@ -2702,7 +3026,7 @@ int ogs_nas_eps_decode_access_point_name(ogs_nas_access_point_name_t *access_poi
int ogs_nas_eps_encode_access_point_name(ogs_pkbuf_t *pkbuf, ogs_nas_access_point_name_t *access_point_name)
{
- uint16_t size = access_point_name->length + sizeof(access_point_name->length);
+ int size = access_point_name->length + sizeof(access_point_name->length);
ogs_nas_access_point_name_t target;
memcpy(&target, access_point_name, sizeof(ogs_nas_access_point_name_t));
@@ -2722,13 +3046,17 @@ int ogs_nas_eps_encode_access_point_name(ogs_pkbuf_t *pkbuf, ogs_nas_access_poin
* O TLV 3-253 */
int ogs_nas_eps_decode_protocol_configuration_options(ogs_nas_protocol_configuration_options_t *protocol_configuration_options, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_protocol_configuration_options_t *source = (ogs_nas_protocol_configuration_options_t *)pkbuf->data;
protocol_configuration_options->length = source->length;
size = protocol_configuration_options->length + sizeof(protocol_configuration_options->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*protocol_configuration_options) < size) return -1;
memcpy(protocol_configuration_options, pkbuf->data - size, size);
@@ -2740,7 +3068,7 @@ int ogs_nas_eps_decode_protocol_configuration_options(ogs_nas_protocol_configura
int ogs_nas_eps_encode_protocol_configuration_options(ogs_pkbuf_t *pkbuf, ogs_nas_protocol_configuration_options_t *protocol_configuration_options)
{
- uint16_t size = protocol_configuration_options->length + sizeof(protocol_configuration_options->length);
+ int size = protocol_configuration_options->length + sizeof(protocol_configuration_options->length);
ogs_nas_protocol_configuration_options_t target;
memcpy(&target, protocol_configuration_options, sizeof(ogs_nas_protocol_configuration_options_t));
@@ -2757,13 +3085,17 @@ int ogs_nas_eps_encode_protocol_configuration_options(ogs_pkbuf_t *pkbuf, ogs_na
* O TLV 14-22 */
int ogs_nas_eps_decode_quality_of_service(ogs_nas_quality_of_service_t *quality_of_service, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_quality_of_service_t *source = (ogs_nas_quality_of_service_t *)pkbuf->data;
quality_of_service->length = source->length;
size = quality_of_service->length + sizeof(quality_of_service->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*quality_of_service) < size) return -1;
memcpy(quality_of_service, pkbuf->data - size, size);
@@ -2775,7 +3107,7 @@ int ogs_nas_eps_decode_quality_of_service(ogs_nas_quality_of_service_t *quality_
int ogs_nas_eps_encode_quality_of_service(ogs_pkbuf_t *pkbuf, ogs_nas_quality_of_service_t *quality_of_service)
{
- uint16_t size = quality_of_service->length + sizeof(quality_of_service->length);
+ int size = quality_of_service->length + sizeof(quality_of_service->length);
ogs_nas_quality_of_service_t target;
memcpy(&target, quality_of_service, sizeof(ogs_nas_quality_of_service_t));
@@ -2792,9 +3124,13 @@ int ogs_nas_eps_encode_quality_of_service(ogs_pkbuf_t *pkbuf, ogs_nas_quality_of
* O TV 1 */
int ogs_nas_eps_decode_radio_priority(ogs_nas_radio_priority_t *radio_priority, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_radio_priority_t);
+ int size = sizeof(ogs_nas_radio_priority_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(radio_priority, pkbuf->data - size, size);
ogs_trace(" RADIO_PRIORITY - ");
@@ -2805,7 +3141,7 @@ int ogs_nas_eps_decode_radio_priority(ogs_nas_radio_priority_t *radio_priority,
int ogs_nas_eps_encode_radio_priority(ogs_pkbuf_t *pkbuf, ogs_nas_radio_priority_t *radio_priority)
{
- uint16_t size = sizeof(ogs_nas_radio_priority_t);
+ int size = sizeof(ogs_nas_radio_priority_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, radio_priority, size);
@@ -2820,13 +3156,17 @@ int ogs_nas_eps_encode_radio_priority(ogs_pkbuf_t *pkbuf, ogs_nas_radio_priority
* O TLV 3 */
int ogs_nas_eps_decode_re_attempt_indicator(ogs_nas_re_attempt_indicator_t *re_attempt_indicator, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_re_attempt_indicator_t *source = (ogs_nas_re_attempt_indicator_t *)pkbuf->data;
re_attempt_indicator->length = source->length;
size = re_attempt_indicator->length + sizeof(re_attempt_indicator->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*re_attempt_indicator) < size) return -1;
memcpy(re_attempt_indicator, pkbuf->data - size, size);
@@ -2838,7 +3178,7 @@ int ogs_nas_eps_decode_re_attempt_indicator(ogs_nas_re_attempt_indicator_t *re_a
int ogs_nas_eps_encode_re_attempt_indicator(ogs_pkbuf_t *pkbuf, ogs_nas_re_attempt_indicator_t *re_attempt_indicator)
{
- uint16_t size = re_attempt_indicator->length + sizeof(re_attempt_indicator->length);
+ int size = re_attempt_indicator->length + sizeof(re_attempt_indicator->length);
ogs_nas_re_attempt_indicator_t target;
memcpy(&target, re_attempt_indicator, sizeof(ogs_nas_re_attempt_indicator_t));
@@ -2855,9 +3195,13 @@ int ogs_nas_eps_encode_re_attempt_indicator(ogs_pkbuf_t *pkbuf, ogs_nas_re_attem
* M V 1/2 */
int ogs_nas_eps_decode_request_type(ogs_nas_request_type_t *request_type, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_request_type_t);
+ int size = sizeof(ogs_nas_request_type_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(request_type, pkbuf->data - size, size);
ogs_trace(" REQUEST_TYPE - ");
@@ -2868,7 +3212,7 @@ int ogs_nas_eps_decode_request_type(ogs_nas_request_type_t *request_type, ogs_pk
int ogs_nas_eps_encode_request_type(ogs_pkbuf_t *pkbuf, ogs_nas_request_type_t *request_type)
{
- uint16_t size = sizeof(ogs_nas_request_type_t);
+ int size = sizeof(ogs_nas_request_type_t);
ogs_nas_request_type_t target;
memcpy(&target, request_type, size);
@@ -2885,13 +3229,17 @@ int ogs_nas_eps_encode_request_type(ogs_pkbuf_t *pkbuf, ogs_nas_request_type_t *
* M LV 2-256 */
int ogs_nas_eps_decode_traffic_flow_aggregate_description(ogs_nas_traffic_flow_aggregate_description_t *traffic_flow_aggregate_description, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_traffic_flow_aggregate_description_t *source = (ogs_nas_traffic_flow_aggregate_description_t *)pkbuf->data;
traffic_flow_aggregate_description->length = source->length;
size = traffic_flow_aggregate_description->length + sizeof(traffic_flow_aggregate_description->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*traffic_flow_aggregate_description) < size) return -1;
memcpy(traffic_flow_aggregate_description, pkbuf->data - size, size);
@@ -2903,7 +3251,7 @@ int ogs_nas_eps_decode_traffic_flow_aggregate_description(ogs_nas_traffic_flow_a
int ogs_nas_eps_encode_traffic_flow_aggregate_description(ogs_pkbuf_t *pkbuf, ogs_nas_traffic_flow_aggregate_description_t *traffic_flow_aggregate_description)
{
- uint16_t size = traffic_flow_aggregate_description->length + sizeof(traffic_flow_aggregate_description->length);
+ int size = traffic_flow_aggregate_description->length + sizeof(traffic_flow_aggregate_description->length);
ogs_nas_traffic_flow_aggregate_description_t target;
memcpy(&target, traffic_flow_aggregate_description, sizeof(ogs_nas_traffic_flow_aggregate_description_t));
@@ -2920,13 +3268,17 @@ int ogs_nas_eps_encode_traffic_flow_aggregate_description(ogs_pkbuf_t *pkbuf, og
* M LV 2-256 */
int ogs_nas_eps_decode_traffic_flow_template(ogs_nas_traffic_flow_template_t *traffic_flow_template, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_traffic_flow_template_t *source = (ogs_nas_traffic_flow_template_t *)pkbuf->data;
traffic_flow_template->length = source->length;
size = traffic_flow_template->length + sizeof(traffic_flow_template->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*traffic_flow_template) < size) return -1;
memcpy(traffic_flow_template, pkbuf->data - size, size);
@@ -2938,7 +3290,7 @@ int ogs_nas_eps_decode_traffic_flow_template(ogs_nas_traffic_flow_template_t *tr
int ogs_nas_eps_encode_traffic_flow_template(ogs_pkbuf_t *pkbuf, ogs_nas_traffic_flow_template_t *traffic_flow_template)
{
- uint16_t size = traffic_flow_template->length + sizeof(traffic_flow_template->length);
+ int size = traffic_flow_template->length + sizeof(traffic_flow_template->length);
ogs_nas_traffic_flow_template_t target;
memcpy(&target, traffic_flow_template, sizeof(ogs_nas_traffic_flow_template_t));
@@ -2955,13 +3307,17 @@ int ogs_nas_eps_encode_traffic_flow_template(ogs_pkbuf_t *pkbuf, ogs_nas_traffic
* O TLV 3-4 */
int ogs_nas_eps_decode_transaction_identifier(ogs_nas_transaction_identifier_t *transaction_identifier, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_transaction_identifier_t *source = (ogs_nas_transaction_identifier_t *)pkbuf->data;
transaction_identifier->length = source->length;
size = transaction_identifier->length + sizeof(transaction_identifier->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*transaction_identifier) < size) return -1;
memcpy(transaction_identifier, pkbuf->data - size, size);
@@ -2973,7 +3329,7 @@ int ogs_nas_eps_decode_transaction_identifier(ogs_nas_transaction_identifier_t *
int ogs_nas_eps_encode_transaction_identifier(ogs_pkbuf_t *pkbuf, ogs_nas_transaction_identifier_t *transaction_identifier)
{
- uint16_t size = transaction_identifier->length + sizeof(transaction_identifier->length);
+ int size = transaction_identifier->length + sizeof(transaction_identifier->length);
ogs_nas_transaction_identifier_t target;
memcpy(&target, transaction_identifier, sizeof(ogs_nas_transaction_identifier_t));
@@ -2990,9 +3346,13 @@ int ogs_nas_eps_encode_transaction_identifier(ogs_pkbuf_t *pkbuf, ogs_nas_transa
* O TV 1 */
int ogs_nas_eps_decode_wlan_offload_acceptability(ogs_nas_wlan_offload_acceptability_t *wlan_offload_acceptability, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_wlan_offload_acceptability_t);
+ int size = sizeof(ogs_nas_wlan_offload_acceptability_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(wlan_offload_acceptability, pkbuf->data - size, size);
ogs_trace(" WLAN_OFFLOAD_ACCEPTABILITY - ");
@@ -3003,7 +3363,7 @@ int ogs_nas_eps_decode_wlan_offload_acceptability(ogs_nas_wlan_offload_acceptabi
int ogs_nas_eps_encode_wlan_offload_acceptability(ogs_pkbuf_t *pkbuf, ogs_nas_wlan_offload_acceptability_t *wlan_offload_acceptability)
{
- uint16_t size = sizeof(ogs_nas_wlan_offload_acceptability_t);
+ int size = sizeof(ogs_nas_wlan_offload_acceptability_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, wlan_offload_acceptability, size);
@@ -3018,13 +3378,17 @@ int ogs_nas_eps_encode_wlan_offload_acceptability(ogs_pkbuf_t *pkbuf, ogs_nas_wl
* O TLV 3-257 */
int ogs_nas_eps_decode_nbifom_container(ogs_nas_nbifom_container_t *nbifom_container, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_nbifom_container_t *source = (ogs_nas_nbifom_container_t *)pkbuf->data;
nbifom_container->length = source->length;
size = nbifom_container->length + sizeof(nbifom_container->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*nbifom_container) < size) return -1;
memcpy(nbifom_container, pkbuf->data - size, size);
@@ -3036,7 +3400,7 @@ int ogs_nas_eps_decode_nbifom_container(ogs_nas_nbifom_container_t *nbifom_conta
int ogs_nas_eps_encode_nbifom_container(ogs_pkbuf_t *pkbuf, ogs_nas_nbifom_container_t *nbifom_container)
{
- uint16_t size = nbifom_container->length + sizeof(nbifom_container->length);
+ int size = nbifom_container->length + sizeof(nbifom_container->length);
ogs_nas_nbifom_container_t target;
memcpy(&target, nbifom_container, sizeof(ogs_nas_nbifom_container_t));
@@ -3053,13 +3417,17 @@ int ogs_nas_eps_encode_nbifom_container(ogs_pkbuf_t *pkbuf, ogs_nas_nbifom_conta
* O TLV 4-8 */
int ogs_nas_eps_decode_apn_aggregate_maximum_bit_rate(ogs_nas_apn_aggregate_maximum_bit_rate_t *apn_aggregate_maximum_bit_rate, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_apn_aggregate_maximum_bit_rate_t *source = (ogs_nas_apn_aggregate_maximum_bit_rate_t *)pkbuf->data;
apn_aggregate_maximum_bit_rate->length = source->length;
size = apn_aggregate_maximum_bit_rate->length + sizeof(apn_aggregate_maximum_bit_rate->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*apn_aggregate_maximum_bit_rate) < size) return -1;
memcpy(apn_aggregate_maximum_bit_rate, pkbuf->data - size, size);
@@ -3071,7 +3439,7 @@ int ogs_nas_eps_decode_apn_aggregate_maximum_bit_rate(ogs_nas_apn_aggregate_maxi
int ogs_nas_eps_encode_apn_aggregate_maximum_bit_rate(ogs_pkbuf_t *pkbuf, ogs_nas_apn_aggregate_maximum_bit_rate_t *apn_aggregate_maximum_bit_rate)
{
- uint16_t size = apn_aggregate_maximum_bit_rate->length + sizeof(apn_aggregate_maximum_bit_rate->length);
+ int size = apn_aggregate_maximum_bit_rate->length + sizeof(apn_aggregate_maximum_bit_rate->length);
ogs_nas_apn_aggregate_maximum_bit_rate_t target;
memcpy(&target, apn_aggregate_maximum_bit_rate, sizeof(ogs_nas_apn_aggregate_maximum_bit_rate_t));
@@ -3088,13 +3456,17 @@ int ogs_nas_eps_encode_apn_aggregate_maximum_bit_rate(ogs_pkbuf_t *pkbuf, ogs_na
* O TLV 5-257 */
int ogs_nas_eps_decode_header_compression_configuration(ogs_nas_header_compression_configuration_t *header_compression_configuration, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_header_compression_configuration_t *source = (ogs_nas_header_compression_configuration_t *)pkbuf->data;
header_compression_configuration->length = source->length;
size = header_compression_configuration->length + sizeof(header_compression_configuration->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*header_compression_configuration) < size) return -1;
memcpy(header_compression_configuration, pkbuf->data - size, size);
@@ -3108,7 +3480,7 @@ int ogs_nas_eps_decode_header_compression_configuration(ogs_nas_header_compressi
int ogs_nas_eps_encode_header_compression_configuration(ogs_pkbuf_t *pkbuf, ogs_nas_header_compression_configuration_t *header_compression_configuration)
{
- uint16_t size = header_compression_configuration->length + sizeof(header_compression_configuration->length);
+ int size = header_compression_configuration->length + sizeof(header_compression_configuration->length);
ogs_nas_header_compression_configuration_t target;
memcpy(&target, header_compression_configuration, sizeof(ogs_nas_header_compression_configuration_t));
@@ -3127,9 +3499,13 @@ int ogs_nas_eps_encode_header_compression_configuration(ogs_pkbuf_t *pkbuf, ogs_
* O TV 1 */
int ogs_nas_eps_decode_control_plane_only_indication(ogs_nas_control_plane_only_indication_t *control_plane_only_indication, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_control_plane_only_indication_t);
+ int size = sizeof(ogs_nas_control_plane_only_indication_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(control_plane_only_indication, pkbuf->data - size, size);
ogs_trace(" CONTROL_PLANE_ONLY_INDICATION - ");
@@ -3140,7 +3516,7 @@ int ogs_nas_eps_decode_control_plane_only_indication(ogs_nas_control_plane_only_
int ogs_nas_eps_encode_control_plane_only_indication(ogs_pkbuf_t *pkbuf, ogs_nas_control_plane_only_indication_t *control_plane_only_indication)
{
- uint16_t size = sizeof(ogs_nas_control_plane_only_indication_t);
+ int size = sizeof(ogs_nas_control_plane_only_indication_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, control_plane_only_indication, size);
@@ -3155,13 +3531,17 @@ int ogs_nas_eps_encode_control_plane_only_indication(ogs_pkbuf_t *pkbuf, ogs_nas
* O TLV-E 4-65538 */
int ogs_nas_eps_decode_extended_protocol_configuration_options(ogs_nas_extended_protocol_configuration_options_t *extended_protocol_configuration_options, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_extended_protocol_configuration_options_t *source = (ogs_nas_extended_protocol_configuration_options_t *)pkbuf->data;
extended_protocol_configuration_options->length = be16toh(source->length);
size = extended_protocol_configuration_options->length + sizeof(extended_protocol_configuration_options->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
extended_protocol_configuration_options->buffer = pkbuf->data - size + sizeof(extended_protocol_configuration_options->length);
ogs_trace(" EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS - ");
@@ -3172,8 +3552,8 @@ int ogs_nas_eps_decode_extended_protocol_configuration_options(ogs_nas_extended_
int ogs_nas_eps_encode_extended_protocol_configuration_options(ogs_pkbuf_t *pkbuf, ogs_nas_extended_protocol_configuration_options_t *extended_protocol_configuration_options)
{
- uint16_t size = 0;
- uint16_t target;
+ int size = 0;
+ int target;
ogs_assert(extended_protocol_configuration_options);
ogs_assert(extended_protocol_configuration_options->buffer);
@@ -3197,13 +3577,17 @@ int ogs_nas_eps_encode_extended_protocol_configuration_options(ogs_pkbuf_t *pkbu
* O TLV 4 */
int ogs_nas_eps_decode_header_compression_configuration_status(ogs_nas_header_compression_configuration_status_t *header_compression_configuration_status, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_header_compression_configuration_status_t *source = (ogs_nas_header_compression_configuration_status_t *)pkbuf->data;
header_compression_configuration_status->length = source->length;
size = header_compression_configuration_status->length + sizeof(header_compression_configuration_status->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*header_compression_configuration_status) < size) return -1;
memcpy(header_compression_configuration_status, pkbuf->data - size, size);
@@ -3215,7 +3599,7 @@ int ogs_nas_eps_decode_header_compression_configuration_status(ogs_nas_header_co
int ogs_nas_eps_encode_header_compression_configuration_status(ogs_pkbuf_t *pkbuf, ogs_nas_header_compression_configuration_status_t *header_compression_configuration_status)
{
- uint16_t size = header_compression_configuration_status->length + sizeof(header_compression_configuration_status->length);
+ int size = header_compression_configuration_status->length + sizeof(header_compression_configuration_status->length);
ogs_nas_header_compression_configuration_status_t target;
memcpy(&target, header_compression_configuration_status, sizeof(ogs_nas_header_compression_configuration_status_t));
@@ -3232,13 +3616,17 @@ int ogs_nas_eps_encode_header_compression_configuration_status(ogs_pkbuf_t *pkbu
* O TLV 4 */
int ogs_nas_eps_decode_serving_plmn_rate_control(ogs_nas_serving_plmn_rate_control_t *serving_plmn_rate_control, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_serving_plmn_rate_control_t *source = (ogs_nas_serving_plmn_rate_control_t *)pkbuf->data;
serving_plmn_rate_control->length = source->length;
size = serving_plmn_rate_control->length + sizeof(serving_plmn_rate_control->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*serving_plmn_rate_control) < size) return -1;
memcpy(serving_plmn_rate_control, pkbuf->data - size, size);
@@ -3250,7 +3638,7 @@ int ogs_nas_eps_decode_serving_plmn_rate_control(ogs_nas_serving_plmn_rate_contr
int ogs_nas_eps_encode_serving_plmn_rate_control(ogs_pkbuf_t *pkbuf, ogs_nas_serving_plmn_rate_control_t *serving_plmn_rate_control)
{
- uint16_t size = serving_plmn_rate_control->length + sizeof(serving_plmn_rate_control->length);
+ int size = serving_plmn_rate_control->length + sizeof(serving_plmn_rate_control->length);
ogs_nas_serving_plmn_rate_control_t target;
memcpy(&target, serving_plmn_rate_control, sizeof(ogs_nas_serving_plmn_rate_control_t));
@@ -3267,13 +3655,17 @@ int ogs_nas_eps_encode_serving_plmn_rate_control(ogs_pkbuf_t *pkbuf, ogs_nas_ser
* O TLV 8 */
int ogs_nas_eps_decode_extended_apn_aggregate_maximum_bit_rate(ogs_nas_extended_apn_aggregate_maximum_bit_rate_t *extended_apn_aggregate_maximum_bit_rate, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_extended_apn_aggregate_maximum_bit_rate_t *source = (ogs_nas_extended_apn_aggregate_maximum_bit_rate_t *)pkbuf->data;
extended_apn_aggregate_maximum_bit_rate->length = source->length;
size = extended_apn_aggregate_maximum_bit_rate->length + sizeof(extended_apn_aggregate_maximum_bit_rate->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*extended_apn_aggregate_maximum_bit_rate) < size) return -1;
memcpy(extended_apn_aggregate_maximum_bit_rate, pkbuf->data - size, size);
@@ -3285,7 +3677,7 @@ int ogs_nas_eps_decode_extended_apn_aggregate_maximum_bit_rate(ogs_nas_extended_
int ogs_nas_eps_encode_extended_apn_aggregate_maximum_bit_rate(ogs_pkbuf_t *pkbuf, ogs_nas_extended_apn_aggregate_maximum_bit_rate_t *extended_apn_aggregate_maximum_bit_rate)
{
- uint16_t size = extended_apn_aggregate_maximum_bit_rate->length + sizeof(extended_apn_aggregate_maximum_bit_rate->length);
+ int size = extended_apn_aggregate_maximum_bit_rate->length + sizeof(extended_apn_aggregate_maximum_bit_rate->length);
ogs_nas_extended_apn_aggregate_maximum_bit_rate_t target;
memcpy(&target, extended_apn_aggregate_maximum_bit_rate, sizeof(ogs_nas_extended_apn_aggregate_maximum_bit_rate_t));
@@ -3302,9 +3694,13 @@ int ogs_nas_eps_encode_extended_apn_aggregate_maximum_bit_rate(ogs_pkbuf_t *pkbu
* O TV 1 */
int ogs_nas_eps_decode_connectivity_type(ogs_nas_connectivity_type_t *connectivity_type, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_connectivity_type_t);
+ int size = sizeof(ogs_nas_connectivity_type_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(connectivity_type, pkbuf->data - size, size);
ogs_trace(" CONNECTIVITY_TYPE - ");
@@ -3315,7 +3711,7 @@ int ogs_nas_eps_decode_connectivity_type(ogs_nas_connectivity_type_t *connectivi
int ogs_nas_eps_encode_connectivity_type(ogs_pkbuf_t *pkbuf, ogs_nas_connectivity_type_t *connectivity_type)
{
- uint16_t size = sizeof(ogs_nas_connectivity_type_t);
+ int size = sizeof(ogs_nas_connectivity_type_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, connectivity_type, size);
@@ -3330,13 +3726,17 @@ int ogs_nas_eps_encode_connectivity_type(ogs_pkbuf_t *pkbuf, ogs_nas_connectivit
* M LV 2-14 */
int ogs_nas_eps_decode_eps_quality_of_service(ogs_nas_eps_quality_of_service_t *eps_quality_of_service, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_eps_quality_of_service_t *source = (ogs_nas_eps_quality_of_service_t *)pkbuf->data;
eps_quality_of_service->length = source->length;
size = eps_quality_of_service->length + sizeof(eps_quality_of_service->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*eps_quality_of_service) < size) return -1;
memcpy(eps_quality_of_service, pkbuf->data - size, size);
@@ -3348,7 +3748,7 @@ int ogs_nas_eps_decode_eps_quality_of_service(ogs_nas_eps_quality_of_service_t *
int ogs_nas_eps_encode_eps_quality_of_service(ogs_pkbuf_t *pkbuf, ogs_nas_eps_quality_of_service_t *eps_quality_of_service)
{
- uint16_t size = eps_quality_of_service->length + sizeof(eps_quality_of_service->length);
+ int size = eps_quality_of_service->length + sizeof(eps_quality_of_service->length);
ogs_nas_eps_quality_of_service_t target;
memcpy(&target, eps_quality_of_service, sizeof(ogs_nas_eps_quality_of_service_t));
@@ -3365,13 +3765,17 @@ int ogs_nas_eps_encode_eps_quality_of_service(ogs_pkbuf_t *pkbuf, ogs_nas_eps_qu
* O TLV 12 */
int ogs_nas_eps_decode_extended_quality_of_service(ogs_nas_extended_quality_of_service_t *extended_quality_of_service, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_extended_quality_of_service_t *source = (ogs_nas_extended_quality_of_service_t *)pkbuf->data;
extended_quality_of_service->length = source->length;
size = extended_quality_of_service->length + sizeof(extended_quality_of_service->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*extended_quality_of_service) < size) return -1;
memcpy(extended_quality_of_service, pkbuf->data - size, size);
@@ -3383,7 +3787,7 @@ int ogs_nas_eps_decode_extended_quality_of_service(ogs_nas_extended_quality_of_s
int ogs_nas_eps_encode_extended_quality_of_service(ogs_pkbuf_t *pkbuf, ogs_nas_extended_quality_of_service_t *extended_quality_of_service)
{
- uint16_t size = extended_quality_of_service->length + sizeof(extended_quality_of_service->length);
+ int size = extended_quality_of_service->length + sizeof(extended_quality_of_service->length);
ogs_nas_extended_quality_of_service_t target;
memcpy(&target, extended_quality_of_service, sizeof(ogs_nas_extended_quality_of_service_t));
@@ -3400,9 +3804,13 @@ int ogs_nas_eps_encode_extended_quality_of_service(ogs_pkbuf_t *pkbuf, ogs_nas_e
* O TV 2 */
int ogs_nas_eps_decode_esm_cause(ogs_nas_esm_cause_t *esm_cause, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_esm_cause_t);
+ int size = sizeof(ogs_nas_esm_cause_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(esm_cause, pkbuf->data - size, size);
ogs_trace(" ESM_CAUSE - ");
@@ -3413,7 +3821,7 @@ int ogs_nas_eps_decode_esm_cause(ogs_nas_esm_cause_t *esm_cause, ogs_pkbuf_t *pk
int ogs_nas_eps_encode_esm_cause(ogs_pkbuf_t *pkbuf, ogs_nas_esm_cause_t *esm_cause)
{
- uint16_t size = sizeof(ogs_nas_esm_cause_t);
+ int size = sizeof(ogs_nas_esm_cause_t);
ogs_nas_esm_cause_t target;
memcpy(&target, esm_cause, size);
@@ -3430,9 +3838,13 @@ int ogs_nas_eps_encode_esm_cause(ogs_pkbuf_t *pkbuf, ogs_nas_esm_cause_t *esm_ca
* O TV 1 */
int ogs_nas_eps_decode_esm_information_transfer_flag(ogs_nas_esm_information_transfer_flag_t *esm_information_transfer_flag, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_esm_information_transfer_flag_t);
+ int size = sizeof(ogs_nas_esm_information_transfer_flag_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(esm_information_transfer_flag, pkbuf->data - size, size);
ogs_trace(" ESM_INFORMATION_TRANSFER_FLAG - ");
@@ -3443,7 +3855,7 @@ int ogs_nas_eps_decode_esm_information_transfer_flag(ogs_nas_esm_information_tra
int ogs_nas_eps_encode_esm_information_transfer_flag(ogs_pkbuf_t *pkbuf, ogs_nas_esm_information_transfer_flag_t *esm_information_transfer_flag)
{
- uint16_t size = sizeof(ogs_nas_esm_information_transfer_flag_t);
+ int size = sizeof(ogs_nas_esm_information_transfer_flag_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, esm_information_transfer_flag, size);
@@ -3458,9 +3870,13 @@ int ogs_nas_eps_encode_esm_information_transfer_flag(ogs_pkbuf_t *pkbuf, ogs_nas
* M V 1/2 */
int ogs_nas_eps_decode_linked_eps_bearer_identity(ogs_nas_linked_eps_bearer_identity_t *linked_eps_bearer_identity, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_linked_eps_bearer_identity_t);
+ int size = sizeof(ogs_nas_linked_eps_bearer_identity_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(linked_eps_bearer_identity, pkbuf->data - size, size);
ogs_trace(" LINKED_EPS_BEARER_IDENTITY - ");
@@ -3471,7 +3887,7 @@ int ogs_nas_eps_decode_linked_eps_bearer_identity(ogs_nas_linked_eps_bearer_iden
int ogs_nas_eps_encode_linked_eps_bearer_identity(ogs_pkbuf_t *pkbuf, ogs_nas_linked_eps_bearer_identity_t *linked_eps_bearer_identity)
{
- uint16_t size = sizeof(ogs_nas_linked_eps_bearer_identity_t);
+ int size = sizeof(ogs_nas_linked_eps_bearer_identity_t);
ogs_nas_linked_eps_bearer_identity_t target;
memcpy(&target, linked_eps_bearer_identity, size);
@@ -3488,9 +3904,13 @@ int ogs_nas_eps_encode_linked_eps_bearer_identity(ogs_pkbuf_t *pkbuf, ogs_nas_li
* O TV 2 */
int ogs_nas_eps_decode_llc_service_access_point_identifier(ogs_nas_llc_service_access_point_identifier_t *llc_service_access_point_identifier, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = sizeof(ogs_nas_llc_service_access_point_identifier_t);
+ int size = sizeof(ogs_nas_llc_service_access_point_identifier_t);
+
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
memcpy(llc_service_access_point_identifier, pkbuf->data - size, size);
ogs_trace(" LLC_SERVICE_ACCESS_POINT_IDENTIFIER - ");
@@ -3501,7 +3921,7 @@ int ogs_nas_eps_decode_llc_service_access_point_identifier(ogs_nas_llc_service_a
int ogs_nas_eps_encode_llc_service_access_point_identifier(ogs_pkbuf_t *pkbuf, ogs_nas_llc_service_access_point_identifier_t *llc_service_access_point_identifier)
{
- uint16_t size = sizeof(ogs_nas_llc_service_access_point_identifier_t);
+ int size = sizeof(ogs_nas_llc_service_access_point_identifier_t);
ogs_nas_llc_service_access_point_identifier_t target;
memcpy(&target, llc_service_access_point_identifier, size);
@@ -3518,13 +3938,17 @@ int ogs_nas_eps_encode_llc_service_access_point_identifier(ogs_pkbuf_t *pkbuf, o
* O TLV 3 */
int ogs_nas_eps_decode_packet_flow_identifier(ogs_nas_packet_flow_identifier_t *packet_flow_identifier, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_packet_flow_identifier_t *source = (ogs_nas_packet_flow_identifier_t *)pkbuf->data;
packet_flow_identifier->length = source->length;
size = packet_flow_identifier->length + sizeof(packet_flow_identifier->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*packet_flow_identifier) < size) return -1;
memcpy(packet_flow_identifier, pkbuf->data - size, size);
@@ -3536,7 +3960,7 @@ int ogs_nas_eps_decode_packet_flow_identifier(ogs_nas_packet_flow_identifier_t *
int ogs_nas_eps_encode_packet_flow_identifier(ogs_pkbuf_t *pkbuf, ogs_nas_packet_flow_identifier_t *packet_flow_identifier)
{
- uint16_t size = packet_flow_identifier->length + sizeof(packet_flow_identifier->length);
+ int size = packet_flow_identifier->length + sizeof(packet_flow_identifier->length);
ogs_nas_packet_flow_identifier_t target;
memcpy(&target, packet_flow_identifier, sizeof(ogs_nas_packet_flow_identifier_t));
@@ -3553,13 +3977,17 @@ int ogs_nas_eps_encode_packet_flow_identifier(ogs_pkbuf_t *pkbuf, ogs_nas_packet
* M LV 6-14 */
int ogs_nas_eps_decode_pdn_address(ogs_nas_pdn_address_t *pdn_address, ogs_pkbuf_t *pkbuf)
{
- uint16_t size = 0;
+ int size = 0;
ogs_nas_pdn_address_t *source = (ogs_nas_pdn_address_t *)pkbuf->data;
pdn_address->length = source->length;
size = pdn_address->length + sizeof(pdn_address->length);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return -1;
+ }
+
if (sizeof(*pdn_address) < size) return -1;
memcpy(pdn_address, pkbuf->data - size, size);
@@ -3571,7 +3999,7 @@ int ogs_nas_eps_decode_pdn_address(ogs_nas_pdn_address_t *pdn_address, ogs_pkbuf
int ogs_nas_eps_encode_pdn_address(ogs_pkbuf_t *pkbuf, ogs_nas_pdn_address_t *pdn_address)
{
- uint16_t size = pdn_address->length + sizeof(pdn_address->length);
+ int size = pdn_address->length + sizeof(pdn_address->length);
ogs_nas_pdn_address_t target;
memcpy(&target, pdn_address, sizeof(ogs_nas_pdn_address_t));
diff --git a/lib/nas/eps/ies.h b/lib/nas/eps/ies.h
index 9a5d445ae..2e092fc3a 100644
--- a/lib/nas/eps/ies.h
+++ b/lib/nas/eps/ies.h
@@ -28,7 +28,7 @@
/*******************************************************************************
* This file had been created by nas-message.py script v0.1.0
* Please do not modify this file but regenerate it via script.
- * Created on: 2021-05-30 21:57:00.055906 by acetcom
+ * Created on: 2021-06-21 14:44:53.369156 by acetcom
* from 24301-g40.docx
******************************************************************************/
diff --git a/lib/nas/eps/message.h b/lib/nas/eps/message.h
index f058caa71..f7baf7342 100644
--- a/lib/nas/eps/message.h
+++ b/lib/nas/eps/message.h
@@ -28,7 +28,7 @@
/*******************************************************************************
* This file had been created by nas-message.py script v0.1.0
* Please do not modify this file but regenerate it via script.
- * Created on: 2021-05-30 21:57:00.065569 by acetcom
+ * Created on: 2021-06-21 14:44:53.375891 by acetcom
* from 24301-g40.docx
******************************************************************************/
diff --git a/lib/nas/eps/support/README.md b/lib/nas/eps/support/README.md
index b472a8988..18f5dd9ab 100644
--- a/lib/nas/eps/support/README.md
+++ b/lib/nas/eps/support/README.md
@@ -1,16 +1,12 @@
-* Install python-pip
-user@host ~/Documents/git/open5gs/lib/gtp/support$ \
- sudo apt-get install python-pip
-
* Install python-docx
-user@host ~/Documents/git/open5gs/lib/gtp/support$ \
- sudo pip install python-docx
+user@host ~/Documents/git/open5gs/lib/nas/eps/support$ \
+ sudo pip3 install python-docx
* Change the format of standard specification
from 24301-d80.doc to 24301-d80.docx
using Microsoft Office 2007+
* Generate Message support files
-user@host ~/Documents/git/open5gs/lib/s1ap/support$ \
- python nas-message.py -f 24301-g40.docx -o ..
+user@host ~/Documents/git/open5gs/lib/nas/eps/support$ \
+ python3 nas-message.py -f 24301-g40.docx -o ..
diff --git a/lib/nas/eps/support/nas-message.py b/lib/nas/eps/support/nas-message.py
index 00d16508d..4ea2fd724 100644
--- a/lib/nas/eps/support/nas-message.py
+++ b/lib/nas/eps/support/nas-message.py
@@ -96,14 +96,14 @@ def output_header_to_file(f):
f.write(" ******************************************************************************/\n\n")
def usage():
- print "Python generating NAS Message encoder/decoder v%s" % (version)
- print "Usage: python nas-message.py [options]"
- print "Available options:"
- print "-d Enable script debug"
- print "-f [file] Input file to parse"
- print "-o [dir] Output files to given directory"
- print "-c [dir] Cache files to given directory"
- print "-h Print this help and return"
+ print("Python generating NAS Message encoder/decoder v%s" % (version))
+ print("Usage: python nas-message.py [options]")
+ print("Available options:")
+ print("-d Enable script debug")
+ print("-f [file] Input file to parse")
+ print("-o [dir] Output files to given directory")
+ print("-c [dir] Cache files to given directory")
+ print("-h Print this help and return")
def v_upper(v):
return re.sub('_TO_UE', '', re.sub('_FROM_UE', '', re.sub('3GPP', '', re.sub('\'', '_', re.sub('/', '_', re.sub('-', '_', re.sub(' ', '_', v)))).upper())))
@@ -112,15 +112,15 @@ def v_lower(v):
return re.sub('3gpp', '', re.sub('\'', '_', re.sub('/', '_', re.sub('-', '_', re.sub(' ', '_', v)))).lower())
def get_cells(cells):
- iei = cells[0].text.encode('ascii', 'ignore')
- value = re.sub("\s*$", "", re.sub("\s*\n*\s*\([^\)]*\)*", "", re.sub("'s", "", cells[1].text))).encode('ascii', 'ignore')
- type = re.sub("^NAS ", "", re.sub("'s", "", re.sub('\s*\n\s*[a-zA-Z0-9.]*', '', cells[2].text))).encode('ascii', 'ignore')
+ iei = cells[0].text
+ value = re.sub("\s*$", "", re.sub("\s*\n*\s*\([^\)]*\)*", "", re.sub("'s", "", cells[1].text)))
+ type = re.sub("^NAS ", "", re.sub("'s", "", re.sub('\s*\n\s*[a-zA-Z0-9.]*', '', cells[2].text)))
if type == "message container":
type = "EPS message container"
- reference = re.sub('[a-zA-Z0-9\'\-\s]*\n\s*', '', cells[2].text).encode('ascii', 'ignore')
- presence = cells[3].text.encode('ascii', 'ignore')
- format = cells[4].text.encode('ascii', 'ignore')
- length = cells[5].text.encode('ascii', 'ignore')
+ reference = re.sub('[a-zA-Z0-9\'\-\s]*\n\s*', '', cells[2].text)
+ presence = cells[3].text
+ format = cells[4].text
+ length = cells[5].text
return { "iei" : iei, "value" : value, "type" : type, "reference" : reference, "presence" : presence, "format" : format, "length" : length }
@@ -278,8 +278,8 @@ for key in msg_list.keys():
d_info("[" + key + "]")
cachefile = cachedir + "nas-msg-" + msg_list[key]["type"] + ".py"
if os.path.isfile(cachefile) and os.access(cachefile, os.R_OK):
- execfile(cachefile)
- print "Read from " + cachefile
+ exec(open(cachefile).read())
+ print("Read from " + cachefile)
else:
document = Document(filename)
f = open(cachefile, 'w')
@@ -340,8 +340,8 @@ for (k, v) in sorted_msg_list:
d_info("[Type List]")
typefile = currentdir + "type-list.py"
if os.path.isfile(typefile) and os.access(typefile, os.R_OK):
- execfile(typefile)
- print "Read from " + typefile
+ exec(open(typefile).read())
+ print("Read from " + typefile)
tmp = [(k, v["reference"]) for k, v in type_list.items()]
sorted_type_list = sorted(tmp, key=lambda tup: tup[1])
@@ -387,7 +387,7 @@ f.write("""#include "ogs-nas-eps.h"
int ogs_nas_eps_encode_optional_type(ogs_pkbuf_t *pkbuf, uint8_t type)
{
- uint16_t size = sizeof(uint8_t);
+ int size = sizeof(uint8_t);
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(pkbuf->data - size, &type, size);
@@ -403,8 +403,11 @@ for (k, v) in sorted_type_list:
if (type_list[k]["format"] == "TV" or type_list[k]["format"] == "T") and type_list[k]["length"] == "1":
f.write("int ogs_nas_eps_decode_%s(ogs_nas_%s_t *%s, ogs_pkbuf_t *pkbuf)\n" % (v_lower(k), v_lower(k), v_lower(k)))
f.write("{\n")
- f.write(" uint16_t size = sizeof(ogs_nas_%s_t);\n\n" % v_lower(k))
- f.write(" ogs_assert(ogs_pkbuf_pull(pkbuf, size));\n")
+ f.write(" int size = sizeof(ogs_nas_%s_t);\n\n" % v_lower(k))
+ f.write(" if (ogs_pkbuf_pull(pkbuf, size) == NULL) {\n")
+ f.write(" ogs_error(\"ogs_pkbuf_pull() failed [size:%d]\", (int)size);\n")
+ f.write(" return -1;\n")
+ f.write(" }\n\n")
f.write(" memcpy(%s, pkbuf->data - size, size);\n\n" % v_lower(k))
f.write(" ogs_trace(\" %s - \");\n" % v_upper(k))
f.write(" ogs_log_hexdump(OGS_LOG_TRACE, pkbuf->data - size, size);\n\n");
@@ -412,7 +415,7 @@ for (k, v) in sorted_type_list:
f.write("}\n\n")
f.write("int ogs_nas_eps_encode_%s(ogs_pkbuf_t *pkbuf, ogs_nas_%s_t *%s)\n" % (v_lower(k), v_lower(k), v_lower(k)))
f.write("{\n")
- f.write(" uint16_t size = sizeof(ogs_nas_%s_t);\n\n" % v_lower(k))
+ f.write(" int size = sizeof(ogs_nas_%s_t);\n\n" % v_lower(k))
f.write(" ogs_assert(ogs_pkbuf_pull(pkbuf, size));\n")
f.write(" memcpy(pkbuf->data - size, %s, size);\n\n" % v_lower(k))
f.write(" ogs_trace(\" %s - \");\n" % v_upper(k))
@@ -423,10 +426,13 @@ for (k, v) in sorted_type_list:
f.write("int ogs_nas_eps_decode_%s(ogs_nas_%s_t *%s, ogs_pkbuf_t *pkbuf)\n" % (v_lower(k), v_lower(k), v_lower(k)))
f.write("{\n")
if type_list[k]["length"] == "4":
- f.write(" uint16_t size = 3;\n\n")
+ f.write(" int size = 3;\n\n")
else:
- f.write(" uint16_t size = sizeof(ogs_nas_%s_t);\n\n" % v_lower(k))
- f.write(" if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;\n")
+ f.write(" int size = sizeof(ogs_nas_%s_t);\n\n" % v_lower(k))
+ f.write(" if (ogs_pkbuf_pull(pkbuf, size) == NULL) {\n")
+ f.write(" ogs_error(\"ogs_pkbuf_pull() failed [size:%d]\", (int)size);\n")
+ f.write(" return -1;\n")
+ f.write(" }\n\n")
f.write(" memcpy(%s, pkbuf->data - size, size);\n\n" % v_lower(k))
if "decode" in type_list[k]:
f.write("%s" % type_list[k]["decode"])
@@ -437,9 +443,9 @@ for (k, v) in sorted_type_list:
f.write("int ogs_nas_eps_encode_%s(ogs_pkbuf_t *pkbuf, ogs_nas_%s_t *%s)\n" % (v_lower(k), v_lower(k), v_lower(k)))
f.write("{\n")
if type_list[k]["length"] == "4":
- f.write(" uint16_t size = 3;\n")
+ f.write(" int size = 3;\n")
else:
- f.write(" uint16_t size = sizeof(ogs_nas_%s_t);\n" % v_lower(k))
+ f.write(" int size = sizeof(ogs_nas_%s_t);\n" % v_lower(k))
f.write(" ogs_nas_%s_t target;\n\n" % v_lower(k))
f.write(" memcpy(&target, %s, size);\n" % v_lower(k))
if "encode" in type_list[k]:
@@ -453,11 +459,14 @@ for (k, v) in sorted_type_list:
elif type_list[k]["format"] == "LV-E" or type_list[k]["format"] == "TLV-E":
f.write("int ogs_nas_eps_decode_%s(ogs_nas_%s_t *%s, ogs_pkbuf_t *pkbuf)\n" % (v_lower(k), v_lower(k), v_lower(k)))
f.write("{\n")
- f.write(" uint16_t size = 0;\n")
+ f.write(" int size = 0;\n")
f.write(" ogs_nas_%s_t *source = (ogs_nas_%s_t *)pkbuf->data;\n\n" % (v_lower(k), v_lower(k)))
f.write(" %s->length = be16toh(source->length);\n" % v_lower(k))
f.write(" size = %s->length + sizeof(%s->length);\n\n" % (v_lower(k), v_lower(k)))
- f.write(" if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;\n")
+ f.write(" if (ogs_pkbuf_pull(pkbuf, size) == NULL) {\n")
+ f.write(" ogs_error(\"ogs_pkbuf_pull() failed [size:%d]\", (int)size);\n")
+ f.write(" return -1;\n")
+ f.write(" }\n\n")
f.write(" %s->buffer = pkbuf->data - size + sizeof(%s->length);\n\n" % (v_lower(k), v_lower(k)))
f.write(" ogs_trace(\" %s - \");\n" % v_upper(k))
f.write(" ogs_log_hexdump(OGS_LOG_TRACE, (void*)%s->buffer, %s->length);\n\n" % (v_lower(k), v_lower(k)));
@@ -465,8 +474,8 @@ for (k, v) in sorted_type_list:
f.write("}\n\n")
f.write("int ogs_nas_eps_encode_%s(ogs_pkbuf_t *pkbuf, ogs_nas_%s_t *%s)\n" % (v_lower(k), v_lower(k), v_lower(k)))
f.write("{\n")
- f.write(" uint16_t size = 0;\n")
- f.write(" uint16_t target;\n\n")
+ f.write(" int size = 0;\n")
+ f.write(" int target;\n\n")
f.write(" ogs_assert(%s);\n" % v_lower(k))
f.write(" ogs_assert(%s->buffer);\n\n" % v_lower(k))
f.write(" size = sizeof(%s->length);\n" % v_lower(k))
@@ -483,11 +492,14 @@ for (k, v) in sorted_type_list:
else:
f.write("int ogs_nas_eps_decode_%s(ogs_nas_%s_t *%s, ogs_pkbuf_t *pkbuf)\n" % (v_lower(k), v_lower(k), v_lower(k)))
f.write("{\n")
- f.write(" uint16_t size = 0;\n")
+ f.write(" int size = 0;\n")
f.write(" ogs_nas_%s_t *source = (ogs_nas_%s_t *)pkbuf->data;\n\n" % (v_lower(k), v_lower(k)))
f.write(" %s->length = source->length;\n" % v_lower(k))
f.write(" size = %s->length + sizeof(%s->length);\n\n" % (v_lower(k), v_lower(k)))
- f.write(" if (ogs_pkbuf_pull(pkbuf, size) == NULL) return -1;\n")
+ f.write(" if (ogs_pkbuf_pull(pkbuf, size) == NULL) {\n")
+ f.write(" ogs_error(\"ogs_pkbuf_pull() failed [size:%d]\", (int)size);\n")
+ f.write(" return -1;\n")
+ f.write(" }\n\n")
f.write(" if (sizeof(*%s) < size) return -1;\n" % v_lower(k))
f.write(" memcpy(%s, pkbuf->data - size, size);\n\n" % v_lower(k))
if "decode" in type_list[k]:
@@ -498,7 +510,7 @@ for (k, v) in sorted_type_list:
f.write("}\n\n")
f.write("int ogs_nas_eps_encode_%s(ogs_pkbuf_t *pkbuf, ogs_nas_%s_t *%s)\n" % (v_lower(k), v_lower(k), v_lower(k)))
f.write("{\n")
- f.write(" uint16_t size = %s->length + sizeof(%s->length);\n" % (v_lower(k), v_lower(k)))
+ f.write(" int size = %s->length + sizeof(%s->length);\n" % (v_lower(k), v_lower(k)))
f.write(" ogs_nas_%s_t target;\n\n" % v_lower(k))
f.write(" memcpy(&target, %s, sizeof(ogs_nas_%s_t));\n" % (v_lower(k), v_lower(k)))
if "encode" in type_list[k]:
@@ -677,7 +689,10 @@ for (k, v) in sorted_msg_list:
for ie in [ies for ies in msg_list[k]["ies"] if ies["presence"] == "M"]:
f.write(" size = ogs_nas_eps_decode_%s(&%s->%s, pkbuf);\n" % (v_lower(ie["type"]), v_lower(k), v_lower(ie["value"])))
- f.write(" if (size < 0) return size;\n")
+ f.write(" if (size < 0) {\n")
+ f.write(" ogs_error(\"ogs_nas_eps_decode_%s() failed\");\n" % v_lower(ie["type"]))
+ f.write(" return size;\n")
+ f.write(" }\n\n")
f.write(" decoded += size;\n\n")
optional_fields = False;
@@ -688,7 +703,10 @@ for (k, v) in sorted_msg_list:
uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer);
size = sizeof(uint8_t);
- ogs_assert(ogs_pkbuf_pull(pkbuf, size));
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
decoded += size;
switch (type) {
@@ -700,7 +718,10 @@ for (k, v) in sorted_msg_list:
f.write(" decoded--;\n")
f.write(" ogs_assert(ogs_pkbuf_push(pkbuf, 1));\n")
f.write(" size = ogs_nas_eps_decode_%s(&%s->%s, pkbuf);\n" % (v_lower(ie["type"]), v_lower(k), v_lower(ie["value"])))
- f.write(" if (size < 0) return size;\n")
+ f.write(" if (size < 0) {\n")
+ f.write(" ogs_error(\"ogs_nas_eps_decode_%s() failed\");\n" % v_lower(ie["type"]))
+ f.write(" return size;\n")
+ f.write(" }\n\n")
f.write(" %s->presencemask |= OGS_NAS_EPS_%s_%s_PRESENT;\n" % (v_lower(k), v_upper(k), v_upper(ie["value"])))
f.write(" decoded += size;\n")
f.write(" break;\n")
@@ -721,7 +742,7 @@ for (k, v) in sorted_msg_list:
f.write("""int ogs_nas_emm_decode(ogs_nas_eps_message_t *message, ogs_pkbuf_t *pkbuf)
{
int size = 0;
- uint16_t decoded = 0;
+ int decoded = 0;
ogs_assert(pkbuf);
ogs_assert(pkbuf->data);
@@ -730,7 +751,10 @@ f.write("""int ogs_nas_emm_decode(ogs_nas_eps_message_t *message, ogs_pkbuf_t *p
memset(message, 0, sizeof(ogs_nas_eps_message_t));
size = sizeof(ogs_nas_emm_header_t);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return OGS_ERROR;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
memcpy(&message->emm.h, pkbuf->data - size, size);
decoded += size;
@@ -754,7 +778,10 @@ for (k, v) in sorted_msg_list:
f.write(" case OGS_NAS_EPS_%s:\n" % v_upper(k))
if len(msg_list[k]["ies"]) != 0:
f.write(" size = ogs_nas_eps_decode_%s(message, pkbuf);\n" % v_lower(k))
- f.write(" if (size < 0) return OGS_ERROR;\n")
+ f.write(" if (size < 0) {\n")
+ f.write(" ogs_error(\"ogs_nas_5gs_decode_%s() failed\");\n" % v_lower(k))
+ f.write(" return size;\n")
+ f.write(" }\n\n")
f.write(" decoded += size;\n")
f.write(" break;\n")
@@ -774,7 +801,7 @@ out:
f.write("""int ogs_nas_esm_decode(ogs_nas_eps_message_t *message, ogs_pkbuf_t *pkbuf)
{
int size = 0;
- uint16_t decoded = 0;
+ int decoded = 0;
ogs_assert(pkbuf);
ogs_assert(pkbuf->data);
@@ -783,7 +810,10 @@ f.write("""int ogs_nas_esm_decode(ogs_nas_eps_message_t *message, ogs_pkbuf_t *p
memset(message, 0, sizeof(ogs_nas_eps_message_t));
size = sizeof(ogs_nas_esm_header_t);
- if (ogs_pkbuf_pull(pkbuf, size) == NULL) return OGS_ERROR;
+ if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
+ ogs_error("ogs_pkbuf_pull() failed [size:%d]", (int)size);
+ return OGS_ERROR;
+ }
memcpy(&message->esm.h, pkbuf->data - size, size);
decoded += size;
@@ -796,7 +826,10 @@ for (k, v) in sorted_msg_list:
f.write(" case OGS_NAS_EPS_%s:\n" % v_upper(k))
if len(msg_list[k]["ies"]) != 0:
f.write(" size = ogs_nas_eps_decode_%s(message, pkbuf);\n" % v_lower(k))
- f.write(" if (size < 0) return OGS_ERROR;\n")
+ f.write(" if (size < 0) {\n")
+ f.write(" ogs_error(\"ogs_nas_5gs_decode_%s() failed\");\n" % v_lower(k))
+ f.write(" return size;\n")
+ f.write(" }\n\n")
f.write(" decoded += size;\n")
f.write(" break;\n")
diff --git a/lib/pfcp/message.c b/lib/pfcp/message.c
index d1235f825..beeb680b5 100644
--- a/lib/pfcp/message.c
+++ b/lib/pfcp/message.c
@@ -20,7 +20,7 @@
/*******************************************************************************
* This file had been created by pfcp-tlv.py script v0.1.0
* Please do not modify this file but regenerate it via script.
- * Created on: 2020-08-28 21:50:38.885547 by acetcom
+ * Created on: 2021-06-15 10:58:38.385939 by acetcom
* from 29244-g10.docx
******************************************************************************/
diff --git a/lib/pfcp/message.h b/lib/pfcp/message.h
index bd9c4055a..fd3b60fdf 100644
--- a/lib/pfcp/message.h
+++ b/lib/pfcp/message.h
@@ -20,7 +20,7 @@
/*******************************************************************************
* This file had been created by pfcp-tlv.py script v0.1.0
* Please do not modify this file but regenerate it via script.
- * Created on: 2020-08-28 21:50:38.876204 by acetcom
+ * Created on: 2021-06-15 10:58:38.379862 by acetcom
* from 29244-g10.docx
******************************************************************************/
diff --git a/lib/pfcp/support/README.md b/lib/pfcp/support/README.md
index f3d51a1c6..6a27e20ce 100644
--- a/lib/pfcp/support/README.md
+++ b/lib/pfcp/support/README.md
@@ -1,11 +1,7 @@
-* Install python-pip
-user@host ~/Documents/git/open5gs/lib/gtp/support$ \
- sudo apt-get install python-pip
-
* Install python-docx
-user@host ~/Documents/git/open5gs/lib/gtp/support$ \
- sudo pip install python-docx
+user@host ~/Documents/git/open5gs/lib/pfcp/support$ \
+ sudo pip3 install python-docx
* Change the format of standard specification
from 29244-f40.doc to 29274-f40.docx
@@ -13,4 +9,4 @@ user@host ~/Documents/git/open5gs/lib/gtp/support$ \
* Generate TLV support files
user@host ~/Documents/git/open5gs/lib/pfcp/support$ \
- python pfcp-tlv.py -f 29244-g10.docx -o ..
+ python3 pfcp-tlv.py -f 29244-g10.docx -o ..
diff --git a/lib/pfcp/support/cache/tlv-msg-50.py b/lib/pfcp/support/cache/tlv-msg-50.py
index c5d73bc80..eaca0a162 100644
--- a/lib/pfcp/support/cache/tlv-msg-50.py
+++ b/lib/pfcp/support/cache/tlv-msg-50.py
@@ -1,9 +1,13 @@
ies = []
ies.append({ "ie_type" : "Node ID", "ie_value" : "Node ID", "presence" : "M", "tlv_more" : "0", "comment" : "This IE shall contain the unique identifier of the sending Node."})
ies.append({ "ie_type" : "F-SEID", "ie_value" : "CP F-SEID", "presence" : "M", "tlv_more" : "0", "comment" : "This IE shall contain the unique identifier allocated by the CP function identifying the session."})
+type_list["Create PDR"]["max_tlv_more"] = "7"
ies.append({ "ie_type" : "Create PDR", "ie_value" : "Create PDR", "presence" : "M", "tlv_more" : "7", "comment" : "This IE shall be present for at least one PDR to be associated to the PFCP session.Several IEs with the same IE type may be present to represent multiple PDRs.See Table 7.5.2.2-1."})
+type_list["Create FAR"]["max_tlv_more"] = "7"
ies.append({ "ie_type" : "Create FAR", "ie_value" : "Create FAR", "presence" : "M", "tlv_more" : "7", "comment" : "This IE shall be present for at least one FAR to be associated to the PFCP session.Several IEs with the same IE type may be present to represent multiple FARs.See Table 7.5.2.3-1."})
+type_list["Create URR"]["max_tlv_more"] = "1"
ies.append({ "ie_type" : "Create URR", "ie_value" : "Create URR", "presence" : "C", "tlv_more" : "1", "comment" : "This IE shall be present if a measurement action shall be applied to packets matching one or more PDR(s) of this PFCP session.Several IEs within the same IE type may be present to represent multiple URRs.See Table 7.5.2.4-1."})
+type_list["Create QER"]["max_tlv_more"] = "3"
ies.append({ "ie_type" : "Create QER", "ie_value" : "Create QER", "presence" : "C", "tlv_more" : "3", "comment" : "This IE shall be present if a QoS enforcement or QoS marking action shall be applied to packets matching one or more PDR(s) of this PFCP session.Several IEs within the same IE type may be present to represent multiple QERs.See Table 7.5.2.5-1."})
ies.append({ "ie_type" : "Create BAR", "ie_value" : "Create BAR", "presence" : "O", "tlv_more" : "0", "comment" : "When present, this IE shall contain the buffering instructions to be applied by the UP function to any FAR of this PFCP session set with the Apply Action requesting the packets to be buffered and with a BAR ID IE referring to this BAR. See table 7.5.2.6-1."})
ies.append({ "ie_type" : "Create Traffic Endpoint", "ie_value" : "Create Traffic Endpoint", "presence" : "C", "tlv_more" : "0", "comment" : "This IE may be present if the UP function has indicated support of PDI optimization.Several IEs within the same IE type may be present to represent multiple Traffic Endpoints.See Table 7.5.2.7-1."})
diff --git a/lib/pfcp/support/cache/tlv-msg-52.py b/lib/pfcp/support/cache/tlv-msg-52.py
index 08fda64ee..2988e6222 100644
--- a/lib/pfcp/support/cache/tlv-msg-52.py
+++ b/lib/pfcp/support/cache/tlv-msg-52.py
@@ -10,13 +10,9 @@ type_list["Remove QER"]["max_tlv_more"] = "3"
ies.append({ "ie_type" : "Remove QER", "ie_value" : "Remove QER", "presence" : "C", "tlv_more" : "3", "comment" : "When present, this IE shall contain the QER Rule which is requested to be removed. See Table 7.5.4-9-1.Several IEs within the same IE type may be present to represent a list of QERs to remove."})
ies.append({ "ie_type" : "Remove BAR", "ie_value" : "Remove BAR", "presence" : "C", "tlv_more" : "0", "comment" : "When present, this IE shall contain the BAR Rule which is requested to be removed. See Table 7.5.4.12-1."})
ies.append({ "ie_type" : "Remove Traffic Endpoint", "ie_value" : "Remove Traffic Endpoint", "presence" : "C", "tlv_more" : "0", "comment" : "When present, this IE shall contain the Traffic Endpoint ID identifying the traffic endpoint to be removed, if the UP function has indicated support of PDI optimization.All the PDRs that refer to the removed Traffic Endpoint shall be deleted.See Table 7.5.4.14-1."})
-type_list["Create PDR"]["max_tlv_more"] = "7"
ies.append({ "ie_type" : "Create PDR", "ie_value" : "Create PDR", "presence" : "C", "tlv_more" : "7", "comment" : "This IE shall be present if the CP function requests the UP function to create a new PDR.See Table 7.5.2.2-1.Several IEs within the same IE type may be present to represent a list of PDRs to create."})
-type_list["Create FAR"]["max_tlv_more"] = "7"
ies.append({ "ie_type" : "Create FAR", "ie_value" : "Create FAR", "presence" : "C", "tlv_more" : "7", "comment" : "This IE shall be present if the CP function requests the UP function to create a new FAR.See Table 7.5.2.3-1.Several IEs within the same IE type may be present to represent a list of FARs to create."})
-type_list["Create URR"]["max_tlv_more"] = "1"
ies.append({ "ie_type" : "Create URR", "ie_value" : "Create URR", "presence" : "C", "tlv_more" : "1", "comment" : "This IE shall be present if the CP function requests the UP function to create a new URR. See Table 7.5.2.4-1.Several IEs within the same IE type may be present to represent a list of URRs to create."})
-type_list["Create QER"]["max_tlv_more"] = "3"
ies.append({ "ie_type" : "Create QER", "ie_value" : "Create QER", "presence" : "C", "tlv_more" : "3", "comment" : "This IE shall be present if the CP function requests the UP function to create a new QER. See Table 7.5.2.5-1.Several IEs within the same IE type may be present to represent a list of QERs to create."})
ies.append({ "ie_type" : "Create BAR", "ie_value" : "Create BAR", "presence" : "C", "tlv_more" : "0", "comment" : "This IE shall be present if the CP function requests the UP function to create a new BAR.See Table 7.5.2.6-1."})
ies.append({ "ie_type" : "Create Traffic Endpoint", "ie_value" : "Create Traffic Endpoint", "presence" : "C", "tlv_more" : "0", "comment" : "When present this IE shall contain the information associated with the Traffic Endpoint to be created, if the UP function has indicated support of PDI optimization. See Table 7.5.2.7-1."})
diff --git a/lib/pfcp/support/pfcp-tlv.py b/lib/pfcp/support/pfcp-tlv.py
index 4efbc0748..a09178b98 100644
--- a/lib/pfcp/support/pfcp-tlv.py
+++ b/lib/pfcp/support/pfcp-tlv.py
@@ -80,14 +80,14 @@ def output_header_to_file(f):
f.write(" ******************************************************************************/\n\n")
def usage():
- print "Python generating TLV build/parser for PFCP v%s" % (version)
- print "Usage: python pfcp-tlv.py [options]"
- print "Available options:"
- print "-d Enable script debug"
- print "-f [file] Input file to parse"
- print "-o [dir] Output files to given directory"
- print "-c [dir] Cache files to given directory"
- print "-h Print this help and return"
+ print("Python generating TLV build/parser for PFCP v%s" % (version))
+ print("Usage: python pfcp-tlv.py [options]")
+ print("Available options:")
+ print("-d Enable script debug")
+ print("-f [file] Input file to parse")
+ print("-o [dir] Output files to given directory")
+ print("-c [dir] Cache files to given directory")
+ print("-h Print this help and return")
def v_upper(v):
return re.sub('3GPP', '', re.sub('\'', '_', re.sub('/', '_', re.sub('-', '_', re.sub(' ', '_', v)))).upper())
@@ -96,13 +96,13 @@ def v_lower(v):
return re.sub('3gpp', '', re.sub('\'', '_', re.sub('/', '_', re.sub('-', '_', re.sub(' ', '_', v)))).lower())
def get_cells(cells):
- note = cells[0].text.encode('ascii', 'ignore')
+ note = cells[0].text
if note.find('NOTE') != -1:
return None
- comment = cells[2].text.encode('ascii', 'ignore')
+ comment = cells[2].text.encode('ascii', 'ignore').decode('utf-8')
comment = re.sub('\n|\"|\'|\\\\', '', comment);
#print comment
- ie_type = re.sub('\s*$', '', re.sub('\'\s*\n*\s*\(NOTE.*\)*', '', cells[-1].text.encode('ascii', 'ignore')))
+ ie_type = re.sub('\s*$', '', re.sub('\'\s*\n*\s*\(NOTE.*\)*', '', cells[-1].text))
#if ie_type.find('Usage Report') != -1:
if ie_type == 'Usage Report':
@@ -136,8 +136,8 @@ def get_cells(cells):
if ie_type not in type_list.keys():
assert False, "Unknown IE type : [" \
+ cells[-1].text + "]" + "(" + ie_type + ")"
- presence = cells[1].text.encode('ascii', 'ignore')
- ie_value = re.sub('\s*\n*\s*\([^\)]*\)*', '', cells[0].text).encode('ascii', 'ignore')
+ presence = cells[1].text
+ ie_value = re.sub('\s*\n*\s*\([^\)]*\)*', '', cells[0].text)
if ie_value[len(ie_value)-1] == ' ':
ie_value = ie_value[:len(ie_value)-1]
@@ -200,8 +200,8 @@ else:
d_info("[Message List]")
cachefile = cachedir + 'tlv-msg-list.py'
if os.path.isfile(cachefile) and os.access(cachefile, os.R_OK):
- execfile(cachefile)
- print "Read from " + cachefile
+ exec(open(cachefile).read())
+ print("Read from " + cachefile)
else:
document = Document(filename)
f = open(cachefile, 'w')
@@ -218,8 +218,8 @@ else:
d_print("Table Index = %d\n" % i)
for row in msg_table.rows[2:-3]:
- key = row.cells[1].text.encode('ascii', 'ignore')
- type = row.cells[0].text.encode('ascii', 'ignore')
+ key = row.cells[1].text
+ type = row.cells[0].text
if type.isdigit() is False:
continue
if key.find('Reserved') != -1:
@@ -232,8 +232,8 @@ else:
d_info("[IE Type List]")
cachefile = cachedir + 'tlv-type-list.py'
if os.path.isfile(cachefile) and os.access(cachefile, os.R_OK):
- execfile(cachefile)
- print "Read from " + cachefile
+ exec(open(cachefile).read())
+ print("Read from " + cachefile)
else:
document = Document(filename)
f = open(cachefile, 'w')
@@ -250,14 +250,14 @@ else:
d_print("Table Index = %d\n" % i)
for row in ie_table.rows[1:-1]:
- key = row.cells[1].text.encode('ascii', 'ignore')
+ key = row.cells[1].text
if key.find('Reserved') != -1:
continue
key = re.sub('\(', '', key)
key = re.sub('\)', '', key)
key = re.sub('\s*$', '', key)
- type = row.cells[0].text.encode('ascii', 'ignore')
+ type = row.cells[0].text
type_list[key] = { "type": type , "max_tlv_more" : "0" }
write_file(f, "type_list[\"" + key + "\"] = { \"type\" : \"" + type)
write_file(f, "\", \"max_tlv_more\" : \"0\" }\n")
@@ -266,8 +266,8 @@ else:
d_info("[Group IE List]")
cachefile = cachedir + 'tlv-group-list.py'
if os.path.isfile(cachefile) and os.access(cachefile, os.R_OK):
- execfile(cachefile)
- print "Read from " + cachefile
+ exec(open(cachefile).read())
+ print("Read from " + cachefile)
else:
document = Document(filename)
f = open(cachefile, 'w')
@@ -298,8 +298,8 @@ else:
if len(re.findall('\d+', row.cells[num].text)) == 0:
continue;
- ie_type = re.findall('\d+', row.cells[num].text)[-1].encode('ascii', 'ignore')
- ie_name = re.sub('\s*IE Type.*', '', row.cells[num].text.encode('ascii', 'ignore'))
+ ie_type = re.findall('\d+', row.cells[num].text)[-1]
+ ie_name = re.sub('\s*IE Type.*', '', row.cells[num].text)
d_print("TYPE:%s NAME:%s\n" % (ie_type, ie_name))
@@ -366,8 +366,8 @@ for key in msg_list.keys():
d_info("[" + key + "]")
cachefile = cachedir + "tlv-msg-" + msg_list[key]["type"] + ".py"
if os.path.isfile(cachefile) and os.access(cachefile, os.R_OK):
- execfile(cachefile)
- print "Read from " + cachefile
+ exec(open(cachefile).read())
+ print("Read from " + cachefile)
else:
document = Document(filename)
f = open(cachefile, 'w')
diff --git a/lib/sbi/openapi/model/ue_authentication_ctx.c b/lib/sbi/custom/ue_authentication_ctx.c
similarity index 71%
rename from lib/sbi/openapi/model/ue_authentication_ctx.c
rename to lib/sbi/custom/ue_authentication_ctx.c
index 430894380..16e51189d 100644
--- a/lib/sbi/openapi/model/ue_authentication_ctx.c
+++ b/lib/sbi/custom/ue_authentication_ctx.c
@@ -7,9 +7,10 @@
OpenAPI_ue_authentication_ctx_t *OpenAPI_ue_authentication_ctx_create(
OpenAPI_auth_type_e auth_type,
OpenAPI_av5g_aka_t *_5g_auth_data,
+ char *eap_payload,
OpenAPI_list_t* _links,
char *serving_network_name
- )
+)
{
OpenAPI_ue_authentication_ctx_t *ue_authentication_ctx_local_var = OpenAPI_malloc(sizeof(OpenAPI_ue_authentication_ctx_t));
if (!ue_authentication_ctx_local_var) {
@@ -17,6 +18,7 @@ OpenAPI_ue_authentication_ctx_t *OpenAPI_ue_authentication_ctx_create(
}
ue_authentication_ctx_local_var->auth_type = auth_type;
ue_authentication_ctx_local_var->_5g_auth_data = _5g_auth_data;
+ ue_authentication_ctx_local_var->eap_payload = eap_payload;
ue_authentication_ctx_local_var->_links = _links;
ue_authentication_ctx_local_var->serving_network_name = serving_network_name;
@@ -29,14 +31,27 @@ void OpenAPI_ue_authentication_ctx_free(OpenAPI_ue_authentication_ctx_t *ue_auth
return;
}
OpenAPI_lnode_t *node;
- OpenAPI_av5g_aka_free(ue_authentication_ctx->_5g_auth_data);
- OpenAPI_list_for_each(ue_authentication_ctx->_links, node) {
- OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)node->data;
- OpenAPI_links_value_schema_free(localKeyValue->value);
- ogs_free(localKeyValue);
+ if (ue_authentication_ctx->_5g_auth_data) {
+ OpenAPI_av5g_aka_free(ue_authentication_ctx->_5g_auth_data);
+ ue_authentication_ctx->_5g_auth_data = NULL;
+ }
+ if (ue_authentication_ctx->eap_payload) {
+ ogs_free(ue_authentication_ctx->eap_payload);
+ ue_authentication_ctx->eap_payload = NULL;
+ }
+ if (ue_authentication_ctx->_links) {
+ OpenAPI_list_for_each(ue_authentication_ctx->_links, node) {
+ OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)node->data;
+ OpenAPI_links_value_schema_free(localKeyValue->value);
+ ogs_free(localKeyValue);
+ }
+ OpenAPI_list_free(ue_authentication_ctx->_links);
+ ue_authentication_ctx->_links = NULL;
+ }
+ if (ue_authentication_ctx->serving_network_name) {
+ ogs_free(ue_authentication_ctx->serving_network_name);
+ ue_authentication_ctx->serving_network_name = NULL;
}
- OpenAPI_list_free(ue_authentication_ctx->_links);
- ogs_free(ue_authentication_ctx->serving_network_name);
ogs_free(ue_authentication_ctx);
}
@@ -55,6 +70,7 @@ cJSON *OpenAPI_ue_authentication_ctx_convertToJSON(OpenAPI_ue_authentication_ctx
goto end;
}
+ if (ue_authentication_ctx->_5g_auth_data) {
cJSON *_5g_auth_data_local_JSON = OpenAPI_av5g_aka_convertToJSON(ue_authentication_ctx->_5g_auth_data);
if (_5g_auth_data_local_JSON == NULL) {
ogs_error("OpenAPI_ue_authentication_ctx_convertToJSON() failed [_5g_auth_data]");
@@ -65,31 +81,38 @@ cJSON *OpenAPI_ue_authentication_ctx_convertToJSON(OpenAPI_ue_authentication_ctx
ogs_error("OpenAPI_ue_authentication_ctx_convertToJSON() failed [_5g_auth_data]");
goto end;
}
+ }
+
+ if (ue_authentication_ctx->eap_payload) {
+ if (cJSON_AddStringToObject(item, "EapPayload", ue_authentication_ctx->eap_payload) == NULL) {
+ ogs_error("OpenAPI_ue_authentication_ctx_convertToJSON() failed [eap_payload]");
+ goto end;
+ }
+ }
cJSON *_links = cJSON_AddObjectToObject(item, "_links");
if (_links == NULL) {
ogs_error("OpenAPI_ue_authentication_ctx_convertToJSON() failed [_links]");
goto end;
}
- cJSON *localMapObject = _links;
OpenAPI_lnode_t *_links_node;
if (ue_authentication_ctx->_links) {
OpenAPI_list_for_each(ue_authentication_ctx->_links, _links_node) {
OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)_links_node->data;
- cJSON *itemLocal = OpenAPI_links_value_schema_convertToJSON(localKeyValue->value);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_ue_authentication_ctx_convertToJSON() failed [_links]");
- goto end;
- }
- cJSON_AddItemToObject(_links, localKeyValue->key, itemLocal);
- }
- }
-
- if (ue_authentication_ctx->serving_network_name) {
- if (cJSON_AddStringToObject(item, "servingNetworkName", ue_authentication_ctx->serving_network_name) == NULL) {
- ogs_error("OpenAPI_ue_authentication_ctx_convertToJSON() failed [serving_network_name]");
+ cJSON *itemLocal = OpenAPI_links_value_schema_convertToJSON(localKeyValue->value);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_ue_authentication_ctx_convertToJSON() failed [_links]");
goto end;
}
+ cJSON_AddItemToObject(_links, localKeyValue->key, itemLocal);
+ }
+ }
+
+ if (ue_authentication_ctx->serving_network_name) {
+ if (cJSON_AddStringToObject(item, "servingNetworkName", ue_authentication_ctx->serving_network_name) == NULL) {
+ ogs_error("OpenAPI_ue_authentication_ctx_convertToJSON() failed [serving_network_name]");
+ goto end;
+ }
}
end:
@@ -106,7 +129,7 @@ OpenAPI_ue_authentication_ctx_t *OpenAPI_ue_authentication_ctx_parseFromJSON(cJS
}
OpenAPI_auth_type_e auth_typeVariable;
-
+
if (!cJSON_IsString(auth_type)) {
ogs_error("OpenAPI_ue_authentication_ctx_parseFromJSON() failed [auth_type]");
goto end;
@@ -114,14 +137,20 @@ OpenAPI_ue_authentication_ctx_t *OpenAPI_ue_authentication_ctx_parseFromJSON(cJS
auth_typeVariable = OpenAPI_auth_type_FromString(auth_type->valuestring);
cJSON *_5g_auth_data = cJSON_GetObjectItemCaseSensitive(ue_authentication_ctxJSON, "5gAuthData");
- if (!_5g_auth_data) {
- ogs_error("OpenAPI_ue_authentication_ctx_parseFromJSON() failed [_5g_auth_data]");
- goto end;
- }
OpenAPI_av5g_aka_t *_5g_auth_data_local_nonprim = NULL;
-
+ if (_5g_auth_data) {
_5g_auth_data_local_nonprim = OpenAPI_av5g_aka_parseFromJSON(_5g_auth_data);
+}
+
+ cJSON *eap_payload = cJSON_GetObjectItemCaseSensitive(ue_authentication_ctxJSON, "EapPayload");
+
+ if (eap_payload) {
+ if (!cJSON_IsString(eap_payload)) {
+ ogs_error("OpenAPI_ue_authentication_ctx_parseFromJSON() failed [eap_payload]");
+ goto end;
+ }
+}
cJSON *_links = cJSON_GetObjectItemCaseSensitive(ue_authentication_ctxJSON, "_links");
if (!_links) {
@@ -130,7 +159,7 @@ OpenAPI_ue_authentication_ctx_t *OpenAPI_ue_authentication_ctx_parseFromJSON(cJS
}
OpenAPI_list_t *_linksList;
-
+
cJSON *_links_local_map;
if (!cJSON_IsObject(_links)) {
ogs_error("OpenAPI_ue_authentication_ctx_parseFromJSON() failed [_links]");
@@ -146,24 +175,25 @@ OpenAPI_ue_authentication_ctx_t *OpenAPI_ue_authentication_ctx_parseFromJSON(cJS
}
localMapKeyPair = OpenAPI_map_create(
localMapObject->string, OpenAPI_links_value_schema_parseFromJSON(localMapObject));
- OpenAPI_list_add(_linksList, localMapKeyPair);
+ OpenAPI_list_add(_linksList , localMapKeyPair);
}
cJSON *serving_network_name = cJSON_GetObjectItemCaseSensitive(ue_authentication_ctxJSON, "servingNetworkName");
- if (serving_network_name) {
- if (!cJSON_IsString(serving_network_name)) {
- ogs_error("OpenAPI_ue_authentication_ctx_parseFromJSON() failed [serving_network_name]");
- goto end;
- }
+ if (serving_network_name) {
+ if (!cJSON_IsString(serving_network_name)) {
+ ogs_error("OpenAPI_ue_authentication_ctx_parseFromJSON() failed [serving_network_name]");
+ goto end;
}
+}
ue_authentication_ctx_local_var = OpenAPI_ue_authentication_ctx_create (
auth_typeVariable,
- _5g_auth_data_local_nonprim,
+ _5g_auth_data ? _5g_auth_data_local_nonprim : NULL,
+ eap_payload ? ogs_strdup_or_assert(eap_payload->valuestring) : NULL,
_linksList,
serving_network_name ? ogs_strdup_or_assert(serving_network_name->valuestring) : NULL
- );
+ );
return ue_authentication_ctx_local_var;
end:
diff --git a/lib/sbi/openapi/model/ue_authentication_ctx.h b/lib/sbi/custom/ue_authentication_ctx.h
similarity index 65%
rename from lib/sbi/openapi/model/ue_authentication_ctx.h
rename to lib/sbi/custom/ue_authentication_ctx.h
index ccc9bd981..0cf796d0d 100644
--- a/lib/sbi/openapi/model/ue_authentication_ctx.h
+++ b/lib/sbi/custom/ue_authentication_ctx.h
@@ -1,20 +1,20 @@
/*
* ue_authentication_ctx.h
*
- *
+ *
*/
#ifndef _OpenAPI_ue_authentication_ctx_H_
#define _OpenAPI_ue_authentication_ctx_H_
#include
-#include "../external/cJSON.h"
-#include "../include/list.h"
-#include "../include/keyValuePair.h"
-#include "../include/binary.h"
-#include "auth_type.h"
-#include "av5g_aka.h"
-#include "links_value_schema.h"
+#include "../openapi/external/cJSON.h"
+#include "../openapi/include/list.h"
+#include "../openapi/include/keyValuePair.h"
+#include "../openapi/include/binary.h"
+#include "../openapi/model/auth_type.h"
+#include "../openapi/model/av5g_aka.h"
+#include "../openapi/model/links_value_schema.h"
#ifdef __cplusplus
extern "C" {
@@ -22,18 +22,20 @@ extern "C" {
typedef struct OpenAPI_ue_authentication_ctx_s OpenAPI_ue_authentication_ctx_t;
typedef struct OpenAPI_ue_authentication_ctx_s {
- OpenAPI_auth_type_e auth_type;
- struct OpenAPI_av5g_aka_s *_5g_auth_data;
- OpenAPI_list_t* _links;
- char *serving_network_name;
+ OpenAPI_auth_type_e auth_type; /* Non-Primitive Enum */
+ struct OpenAPI_av5g_aka_s *_5g_auth_data; /* Model */
+ char *eap_payload; /* String */
+ OpenAPI_list_t* _links; /* Map */
+ char *serving_network_name; /* String */
} OpenAPI_ue_authentication_ctx_t;
OpenAPI_ue_authentication_ctx_t *OpenAPI_ue_authentication_ctx_create(
OpenAPI_auth_type_e auth_type,
OpenAPI_av5g_aka_t *_5g_auth_data,
+ char *eap_payload,
OpenAPI_list_t* _links,
char *serving_network_name
- );
+);
void OpenAPI_ue_authentication_ctx_free(OpenAPI_ue_authentication_ctx_t *ue_authentication_ctx);
OpenAPI_ue_authentication_ctx_t *OpenAPI_ue_authentication_ctx_parseFromJSON(cJSON *ue_authentication_ctxJSON);
cJSON *OpenAPI_ue_authentication_ctx_convertToJSON(OpenAPI_ue_authentication_ctx_t *ue_authentication_ctx);
diff --git a/lib/sbi/meson.build b/lib/sbi/meson.build
index d10744d93..8554d6971 100644
--- a/lib/sbi/meson.build
+++ b/lib/sbi/meson.build
@@ -20,6 +20,7 @@ subdir('openapi')
libsbi_sources = files('''
contrib/multipart_parser.c
custom/links.c
+ custom/ue_authentication_ctx.c
yuarel.c
conv.c
diff --git a/lib/sbi/ogs-sbi.h b/lib/sbi/ogs-sbi.h
index 373e882ed..7af43b05a 100644
--- a/lib/sbi/ogs-sbi.h
+++ b/lib/sbi/ogs-sbi.h
@@ -39,7 +39,6 @@
#include "model/authentication_info_request.h"
#include "model/authentication_info_result.h"
#include "model/authentication_subscription.h"
-#include "model/ue_authentication_ctx.h"
#include "model/confirmation_data.h"
#include "model/confirmation_data_response.h"
#include "model/auth_event.h"
@@ -74,6 +73,7 @@
#include "model/sm_policy_notification.h"
#include "custom/links.h"
+#include "custom/ue_authentication_ctx.h"
#if defined(__GNUC__)
#pragma GCC diagnostic pop
diff --git a/lib/sbi/openapi/.openapi-generator-ignore b/lib/sbi/openapi/.openapi-generator-ignore
index a97049e51..7484ee590 100644
--- a/lib/sbi/openapi/.openapi-generator-ignore
+++ b/lib/sbi/openapi/.openapi-generator-ignore
@@ -1,15 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
-api/**
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
-include/apiClient.h
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
-src/apiClient.c
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
-unit-test/**
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
-README.md
-libcurl.licence
-uncrustify-rules.cfg
-CMakeLists.txt
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/lib/sbi/openapi/.openapi-generator/FILES b/lib/sbi/openapi/.openapi-generator/FILES
new file mode 100644
index 000000000..44110a457
--- /dev/null
+++ b/lib/sbi/openapi/.openapi-generator/FILES
@@ -0,0 +1,697 @@
+CMakeLists.txt
+README.md
+api/IndividualSubscriptionDocumentAPI.c
+api/IndividualSubscriptionDocumentAPI.h
+api/IndividualUeContextDocumentAPI.c
+api/IndividualUeContextDocumentAPI.h
+api/N1N2IndividualSubscriptionDocumentAPI.c
+api/N1N2IndividualSubscriptionDocumentAPI.h
+api/N1N2MessageCollectionDocumentAPI.c
+api/N1N2MessageCollectionDocumentAPI.h
+api/N1N2SubscriptionsCollectionForIndividualUEContextsDocumentAPI.c
+api/N1N2SubscriptionsCollectionForIndividualUEContextsDocumentAPI.h
+api/NonUEN2MessageNotificationIndividualSubscriptionDocumentAPI.c
+api/NonUEN2MessageNotificationIndividualSubscriptionDocumentAPI.h
+api/NonUEN2MessagesCollectionDocumentAPI.c
+api/NonUEN2MessagesCollectionDocumentAPI.h
+api/NonUEN2MessagesSubscriptionsCollectionDocumentAPI.c
+api/NonUEN2MessagesSubscriptionsCollectionDocumentAPI.h
+api/SubscriptionsCollectionDocumentAPI.c
+api/SubscriptionsCollectionDocumentAPI.h
+docs/IndividualSubscriptionDocumentAPI.md
+docs/IndividualUeContextDocumentAPI.md
+docs/N1N2IndividualSubscriptionDocumentAPI.md
+docs/N1N2MessageCollectionDocumentAPI.md
+docs/N1N2SubscriptionsCollectionForIndividualUEContextsDocumentAPI.md
+docs/NonUEN2MessageNotificationIndividualSubscriptionDocumentAPI.md
+docs/NonUEN2MessagesCollectionDocumentAPI.md
+docs/NonUEN2MessagesSubscriptionsCollectionDocumentAPI.md
+docs/SubscriptionsCollectionDocumentAPI.md
+docs/access_token_err.md
+docs/access_token_req.md
+docs/access_type.md
+docs/allowed_nssai.md
+docs/allowed_snssai.md
+docs/ambr.md
+docs/amf_event.md
+docs/amf_event_area.md
+docs/amf_event_mode.md
+docs/amf_event_subscription.md
+docs/amf_event_subscription_add_info.md
+docs/amf_event_trigger.md
+docs/amf_event_trigger_any_of.md
+docs/amf_event_type.md
+docs/amf_event_type_any_of.md
+docs/amf_status_change_notification.md
+docs/amf_status_change_subscription_data.md
+docs/amf_status_info.md
+docs/area.md
+docs/area_of_validity.md
+docs/area_scope.md
+docs/arp.md
+docs/assign_ebi_data.md
+docs/assign_ebi_error.md
+docs/assign_ebi_failed.md
+docs/assigned_ebi_data.md
+docs/auth_status.md
+docs/battery_indication.md
+docs/cag_data.md
+docs/cag_info.md
+docs/ce_mode_b_ind.md
+docs/ciphering_algorithm.md
+docs/cn_assisted_ran_para.md
+docs/collection_period_rmm_lte_mdt.md
+docs/collection_period_rmm_nr_mdt.md
+docs/configured_snssai.md
+docs/core_network_type.md
+docs/ddd_traffic_descriptor.md
+docs/ebi_arp_mapping.md
+docs/ec_restriction_data_wb.md
+docs/ecgi.md
+docs/eps_nas_ciphering_algorithm.md
+docs/eps_nas_integrity_algorithm.md
+docs/eps_nas_security_mode.md
+docs/eutra_location.md
+docs/expected_ue_behavior.md
+docs/ext_amf_event_subscription.md
+docs/global_ran_node_id.md
+docs/gnb_id.md
+docs/guami.md
+docs/hfc_node_id.md
+docs/immediate_mdt_conf.md
+docs/inline_object.md
+docs/inline_object_1.md
+docs/inline_object_2.md
+docs/inline_object_3.md
+docs/inline_object_4.md
+docs/integrity_algorithm.md
+docs/invalid_param.md
+docs/job_type.md
+docs/key_amf.md
+docs/key_amf_type.md
+docs/ladn_info.md
+docs/line_type.md
+docs/location_filter.md
+docs/location_filter_any_of.md
+docs/lte_m_ind.md
+docs/lte_v2x_auth.md
+docs/measurement_lte_for_mdt.md
+docs/measurement_nr_for_mdt.md
+docs/measurement_period_lte_mdt.md
+docs/mm_context.md
+docs/mo_exp_data_counter.md
+docs/n1_message_class.md
+docs/n1_message_container.md
+docs/n1_message_notification.md
+docs/n1_n2_message_transfer_cause.md
+docs/n1_n2_message_transfer_error.md
+docs/n1_n2_message_transfer_req_data.md
+docs/n1_n2_message_transfer_rsp_data.md
+docs/n1_n2_msg_txfr_err_detail.md
+docs/n1_n2_msg_txfr_failure_notification.md
+docs/n2_info_container.md
+docs/n2_info_content.md
+docs/n2_info_notification_rsp_data.md
+docs/n2_info_notify_reason.md
+docs/n2_information_class.md
+docs/n2_information_notification.md
+docs/n2_information_transfer_error.md
+docs/n2_information_transfer_req_data.md
+docs/n2_information_transfer_result.md
+docs/n2_information_transfer_rsp_data.md
+docs/n2_ran_information.md
+docs/n2_sm_information.md
+docs/n3ga_location.md
+docs/nas_security_mode.md
+docs/ncgi.md
+docs/nf_type.md
+docs/ng_ap_cause.md
+docs/ng_ksi.md
+docs/ng_ran_target_id.md
+docs/ngap_ie_type.md
+docs/non_ue_n2_info_subscription_create_data.md
+docs/non_ue_n2_info_subscription_created_data.md
+docs/npn_access_info.md
+docs/nr_location.md
+docs/nr_v2x_auth.md
+docs/nrppa_information.md
+docs/nsi_information.md
+docs/nssaa_status.md
+docs/nssai_mapping.md
+docs/pc5_flow_bit_rates.md
+docs/pc5_qo_s_para.md
+docs/pc5_qos_flow_item.md
+docs/pdu_session_context.md
+docs/periodic_communication_indicator.md
+docs/plmn_id.md
+docs/plmn_id_nid.md
+docs/policy_req_trigger.md
+docs/positioning_method_mdt.md
+docs/preemption_capability.md
+docs/preemption_vulnerability.md
+docs/presence_info.md
+docs/presence_state.md
+docs/problem_details.md
+docs/pws_error_data.md
+docs/pws_information.md
+docs/pws_response_data.md
+docs/rat_selector.md
+docs/rat_type.md
+docs/reachability_filter.md
+docs/reachability_filter_any_of.md
+docs/redirect_response.md
+docs/ref_to_binary_data.md
+docs/registration_context_container.md
+docs/report_amount_mdt.md
+docs/report_interval_mdt.md
+docs/report_interval_nr_mdt.md
+docs/reporting_trigger.md
+docs/restriction_type.md
+docs/sbi_binding_level.md
+docs/sc_type.md
+docs/scheduled_communication_time.md
+docs/scheduled_communication_type.md
+docs/seaf_data.md
+docs/sensor_measurement.md
+docs/service_area_restriction.md
+docs/small_data_rate_status.md
+docs/small_data_rate_status_info.md
+docs/smf_change_indication.md
+docs/smf_change_info.md
+docs/sms_support.md
+docs/snssai.md
+docs/stationary_indication.md
+docs/status_change.md
+docs/tac_info.md
+docs/tai.md
+docs/tnap_id.md
+docs/trace_data.md
+docs/trace_depth.md
+docs/traffic_descriptor.md
+docs/traffic_profile.md
+docs/transfer_reason.md
+docs/twap_id.md
+docs/ue_auth.md
+docs/ue_context.md
+docs/ue_context_cancel_relocate_data.md
+docs/ue_context_create_data.md
+docs/ue_context_create_error.md
+docs/ue_context_created_data.md
+docs/ue_context_release.md
+docs/ue_context_relocate_data.md
+docs/ue_context_relocated_data.md
+docs/ue_context_transfer_req_data.md
+docs/ue_context_transfer_rsp_data.md
+docs/ue_context_transfer_status.md
+docs/ue_differentiation_info.md
+docs/ue_n1_n2_info_subscription_create_data.md
+docs/ue_n1_n2_info_subscription_created_data.md
+docs/ue_reg_status_update_req_data.md
+docs/ue_reg_status_update_rsp_data.md
+docs/user_location.md
+docs/v2x_context.md
+docs/v2x_information.md
+external/cJSON.c
+external/cJSON.h
+external/cJSON.licence
+include/apiClient.h
+include/binary.h
+include/keyValuePair.h
+include/list.h
+libcurl.licence
+model/access_token_err.c
+model/access_token_err.h
+model/access_token_req.c
+model/access_token_req.h
+model/access_type.c
+model/access_type.h
+model/allowed_nssai.c
+model/allowed_nssai.h
+model/allowed_snssai.c
+model/allowed_snssai.h
+model/ambr.c
+model/ambr.h
+model/amf_event.c
+model/amf_event.h
+model/amf_event_area.c
+model/amf_event_area.h
+model/amf_event_mode.c
+model/amf_event_mode.h
+model/amf_event_subscription.c
+model/amf_event_subscription.h
+model/amf_event_subscription_add_info.c
+model/amf_event_subscription_add_info.h
+model/amf_event_trigger.c
+model/amf_event_trigger.h
+model/amf_event_trigger_any_of.c
+model/amf_event_trigger_any_of.h
+model/amf_event_type.c
+model/amf_event_type.h
+model/amf_event_type_any_of.c
+model/amf_event_type_any_of.h
+model/amf_status_change_notification.c
+model/amf_status_change_notification.h
+model/amf_status_change_subscription_data.c
+model/amf_status_change_subscription_data.h
+model/amf_status_info.c
+model/amf_status_info.h
+model/area.c
+model/area.h
+model/area_of_validity.c
+model/area_of_validity.h
+model/area_scope.c
+model/area_scope.h
+model/arp.c
+model/arp.h
+model/assign_ebi_data.c
+model/assign_ebi_data.h
+model/assign_ebi_error.c
+model/assign_ebi_error.h
+model/assign_ebi_failed.c
+model/assign_ebi_failed.h
+model/assigned_ebi_data.c
+model/assigned_ebi_data.h
+model/auth_status.c
+model/auth_status.h
+model/battery_indication.c
+model/battery_indication.h
+model/cag_data.c
+model/cag_data.h
+model/cag_info.c
+model/cag_info.h
+model/ce_mode_b_ind.c
+model/ce_mode_b_ind.h
+model/ciphering_algorithm.c
+model/ciphering_algorithm.h
+model/cn_assisted_ran_para.c
+model/cn_assisted_ran_para.h
+model/collection_period_rmm_lte_mdt.c
+model/collection_period_rmm_lte_mdt.h
+model/collection_period_rmm_nr_mdt.c
+model/collection_period_rmm_nr_mdt.h
+model/configured_snssai.c
+model/configured_snssai.h
+model/core_network_type.c
+model/core_network_type.h
+model/ddd_traffic_descriptor.c
+model/ddd_traffic_descriptor.h
+model/ebi_arp_mapping.c
+model/ebi_arp_mapping.h
+model/ec_restriction_data_wb.c
+model/ec_restriction_data_wb.h
+model/ecgi.c
+model/ecgi.h
+model/eps_nas_ciphering_algorithm.c
+model/eps_nas_ciphering_algorithm.h
+model/eps_nas_integrity_algorithm.c
+model/eps_nas_integrity_algorithm.h
+model/eps_nas_security_mode.c
+model/eps_nas_security_mode.h
+model/eutra_location.c
+model/eutra_location.h
+model/expected_ue_behavior.c
+model/expected_ue_behavior.h
+model/ext_amf_event_subscription.c
+model/ext_amf_event_subscription.h
+model/global_ran_node_id.c
+model/global_ran_node_id.h
+model/gnb_id.c
+model/gnb_id.h
+model/guami.c
+model/guami.h
+model/hfc_node_id.c
+model/hfc_node_id.h
+model/immediate_mdt_conf.c
+model/immediate_mdt_conf.h
+model/inline_object.c
+model/inline_object.h
+model/inline_object_1.c
+model/inline_object_1.h
+model/inline_object_2.c
+model/inline_object_2.h
+model/inline_object_3.c
+model/inline_object_3.h
+model/inline_object_4.c
+model/inline_object_4.h
+model/integrity_algorithm.c
+model/integrity_algorithm.h
+model/invalid_param.c
+model/invalid_param.h
+model/job_type.c
+model/job_type.h
+model/key_amf.c
+model/key_amf.h
+model/key_amf_type.c
+model/key_amf_type.h
+model/ladn_info.c
+model/ladn_info.h
+model/line_type.c
+model/line_type.h
+model/location_filter.c
+model/location_filter.h
+model/location_filter_any_of.c
+model/location_filter_any_of.h
+model/lte_m_ind.c
+model/lte_m_ind.h
+model/lte_v2x_auth.c
+model/lte_v2x_auth.h
+model/measurement_lte_for_mdt.c
+model/measurement_lte_for_mdt.h
+model/measurement_nr_for_mdt.c
+model/measurement_nr_for_mdt.h
+model/measurement_period_lte_mdt.c
+model/measurement_period_lte_mdt.h
+model/mm_context.c
+model/mm_context.h
+model/mo_exp_data_counter.c
+model/mo_exp_data_counter.h
+model/n1_message_class.c
+model/n1_message_class.h
+model/n1_message_container.c
+model/n1_message_container.h
+model/n1_message_notification.c
+model/n1_message_notification.h
+model/n1_n2_message_transfer_cause.c
+model/n1_n2_message_transfer_cause.h
+model/n1_n2_message_transfer_error.c
+model/n1_n2_message_transfer_error.h
+model/n1_n2_message_transfer_req_data.c
+model/n1_n2_message_transfer_req_data.h
+model/n1_n2_message_transfer_rsp_data.c
+model/n1_n2_message_transfer_rsp_data.h
+model/n1_n2_msg_txfr_err_detail.c
+model/n1_n2_msg_txfr_err_detail.h
+model/n1_n2_msg_txfr_failure_notification.c
+model/n1_n2_msg_txfr_failure_notification.h
+model/n2_info_container.c
+model/n2_info_container.h
+model/n2_info_content.c
+model/n2_info_content.h
+model/n2_info_notification_rsp_data.c
+model/n2_info_notification_rsp_data.h
+model/n2_info_notify_reason.c
+model/n2_info_notify_reason.h
+model/n2_information_class.c
+model/n2_information_class.h
+model/n2_information_notification.c
+model/n2_information_notification.h
+model/n2_information_transfer_error.c
+model/n2_information_transfer_error.h
+model/n2_information_transfer_req_data.c
+model/n2_information_transfer_req_data.h
+model/n2_information_transfer_result.c
+model/n2_information_transfer_result.h
+model/n2_information_transfer_rsp_data.c
+model/n2_information_transfer_rsp_data.h
+model/n2_ran_information.c
+model/n2_ran_information.h
+model/n2_sm_information.c
+model/n2_sm_information.h
+model/n3ga_location.c
+model/n3ga_location.h
+model/nas_security_mode.c
+model/nas_security_mode.h
+model/ncgi.c
+model/ncgi.h
+model/nf_type.c
+model/nf_type.h
+model/ng_ap_cause.c
+model/ng_ap_cause.h
+model/ng_ksi.c
+model/ng_ksi.h
+model/ng_ran_target_id.c
+model/ng_ran_target_id.h
+model/ngap_ie_type.c
+model/ngap_ie_type.h
+model/non_ue_n2_info_subscription_create_data.c
+model/non_ue_n2_info_subscription_create_data.h
+model/non_ue_n2_info_subscription_created_data.c
+model/non_ue_n2_info_subscription_created_data.h
+model/npn_access_info.c
+model/npn_access_info.h
+model/nr_location.c
+model/nr_location.h
+model/nr_v2x_auth.c
+model/nr_v2x_auth.h
+model/nrppa_information.c
+model/nrppa_information.h
+model/nsi_information.c
+model/nsi_information.h
+model/nssaa_status.c
+model/nssaa_status.h
+model/nssai_mapping.c
+model/nssai_mapping.h
+model/object.c
+model/object.h
+model/pc5_flow_bit_rates.c
+model/pc5_flow_bit_rates.h
+model/pc5_qo_s_para.c
+model/pc5_qo_s_para.h
+model/pc5_qos_flow_item.c
+model/pc5_qos_flow_item.h
+model/pdu_session_context.c
+model/pdu_session_context.h
+model/periodic_communication_indicator.c
+model/periodic_communication_indicator.h
+model/plmn_id.c
+model/plmn_id.h
+model/plmn_id_nid.c
+model/plmn_id_nid.h
+model/policy_req_trigger.c
+model/policy_req_trigger.h
+model/positioning_method_mdt.c
+model/positioning_method_mdt.h
+model/preemption_capability.c
+model/preemption_capability.h
+model/preemption_vulnerability.c
+model/preemption_vulnerability.h
+model/presence_info.c
+model/presence_info.h
+model/presence_state.c
+model/presence_state.h
+model/problem_details.c
+model/problem_details.h
+model/pws_error_data.c
+model/pws_error_data.h
+model/pws_information.c
+model/pws_information.h
+model/pws_response_data.c
+model/pws_response_data.h
+model/rat_selector.c
+model/rat_selector.h
+model/rat_type.c
+model/rat_type.h
+model/reachability_filter.c
+model/reachability_filter.h
+model/reachability_filter_any_of.c
+model/reachability_filter_any_of.h
+model/redirect_response.c
+model/redirect_response.h
+model/ref_to_binary_data.c
+model/ref_to_binary_data.h
+model/registration_context_container.c
+model/registration_context_container.h
+model/report_amount_mdt.c
+model/report_amount_mdt.h
+model/report_interval_mdt.c
+model/report_interval_mdt.h
+model/report_interval_nr_mdt.c
+model/report_interval_nr_mdt.h
+model/reporting_trigger.c
+model/reporting_trigger.h
+model/restriction_type.c
+model/restriction_type.h
+model/sbi_binding_level.c
+model/sbi_binding_level.h
+model/sc_type.c
+model/sc_type.h
+model/scheduled_communication_time.c
+model/scheduled_communication_time.h
+model/scheduled_communication_type.c
+model/scheduled_communication_type.h
+model/seaf_data.c
+model/seaf_data.h
+model/sensor_measurement.c
+model/sensor_measurement.h
+model/service_area_restriction.c
+model/service_area_restriction.h
+model/small_data_rate_status.c
+model/small_data_rate_status.h
+model/small_data_rate_status_info.c
+model/small_data_rate_status_info.h
+model/smf_change_indication.c
+model/smf_change_indication.h
+model/smf_change_info.c
+model/smf_change_info.h
+model/sms_support.c
+model/sms_support.h
+model/snssai.c
+model/snssai.h
+model/stationary_indication.c
+model/stationary_indication.h
+model/status_change.c
+model/status_change.h
+model/tac_info.c
+model/tac_info.h
+model/tai.c
+model/tai.h
+model/tnap_id.c
+model/tnap_id.h
+model/trace_data.c
+model/trace_data.h
+model/trace_depth.c
+model/trace_depth.h
+model/traffic_descriptor.c
+model/traffic_descriptor.h
+model/traffic_profile.c
+model/traffic_profile.h
+model/transfer_reason.c
+model/transfer_reason.h
+model/twap_id.c
+model/twap_id.h
+model/ue_auth.c
+model/ue_auth.h
+model/ue_context.c
+model/ue_context.h
+model/ue_context_cancel_relocate_data.c
+model/ue_context_cancel_relocate_data.h
+model/ue_context_create_data.c
+model/ue_context_create_data.h
+model/ue_context_create_error.c
+model/ue_context_create_error.h
+model/ue_context_created_data.c
+model/ue_context_created_data.h
+model/ue_context_release.c
+model/ue_context_release.h
+model/ue_context_relocate_data.c
+model/ue_context_relocate_data.h
+model/ue_context_relocated_data.c
+model/ue_context_relocated_data.h
+model/ue_context_transfer_req_data.c
+model/ue_context_transfer_req_data.h
+model/ue_context_transfer_rsp_data.c
+model/ue_context_transfer_rsp_data.h
+model/ue_context_transfer_status.c
+model/ue_context_transfer_status.h
+model/ue_differentiation_info.c
+model/ue_differentiation_info.h
+model/ue_n1_n2_info_subscription_create_data.c
+model/ue_n1_n2_info_subscription_create_data.h
+model/ue_n1_n2_info_subscription_created_data.c
+model/ue_n1_n2_info_subscription_created_data.h
+model/ue_reg_status_update_req_data.c
+model/ue_reg_status_update_req_data.h
+model/ue_reg_status_update_rsp_data.c
+model/ue_reg_status_update_rsp_data.h
+model/user_location.c
+model/user_location.h
+model/v2x_context.c
+model/v2x_context.h
+model/v2x_information.c
+model/v2x_information.h
+src/apiClient.c
+src/apiKey.c
+src/binary.c
+src/list.c
+uncrustify-rules.cfg
+unit-test/test_amf_event.c
+unit-test/test_amf_event_area.c
+unit-test/test_amf_event_mode.c
+unit-test/test_amf_event_subscription.c
+unit-test/test_amf_event_subscription_add_info.c
+unit-test/test_amf_event_trigger.c
+unit-test/test_amf_event_trigger_any_of.c
+unit-test/test_amf_event_type.c
+unit-test/test_amf_event_type_any_of.c
+unit-test/test_amf_status_change_notification.c
+unit-test/test_amf_status_change_subscription_data.c
+unit-test/test_amf_status_info.c
+unit-test/test_area_of_validity.c
+unit-test/test_assign_ebi_data.c
+unit-test/test_assign_ebi_error.c
+unit-test/test_assign_ebi_failed.c
+unit-test/test_assigned_ebi_data.c
+unit-test/test_auth_status.c
+unit-test/test_ce_mode_b_ind.c
+unit-test/test_ciphering_algorithm.c
+unit-test/test_eps_nas_ciphering_algorithm.c
+unit-test/test_eps_nas_integrity_algorithm.c
+unit-test/test_eps_nas_security_mode.c
+unit-test/test_expected_ue_behavior.c
+unit-test/test_ext_amf_event_subscription.c
+unit-test/test_immediate_mdt_conf.c
+unit-test/test_integrity_algorithm.c
+unit-test/test_key_amf.c
+unit-test/test_key_amf_type.c
+unit-test/test_ladn_info.c
+unit-test/test_location_filter.c
+unit-test/test_location_filter_any_of.c
+unit-test/test_lte_m_ind.c
+unit-test/test_mm_context.c
+unit-test/test_n1_message_container.c
+unit-test/test_n1_message_notification.c
+unit-test/test_n1_n2_message_transfer_cause.c
+unit-test/test_n1_n2_message_transfer_error.c
+unit-test/test_n1_n2_message_transfer_req_data.c
+unit-test/test_n1_n2_message_transfer_rsp_data.c
+unit-test/test_n1_n2_msg_txfr_err_detail.c
+unit-test/test_n1_n2_msg_txfr_failure_notification.c
+unit-test/test_n2_info_container.c
+unit-test/test_n2_info_content.c
+unit-test/test_n2_info_notification_rsp_data.c
+unit-test/test_n2_info_notify_reason.c
+unit-test/test_n2_information_notification.c
+unit-test/test_n2_information_transfer_error.c
+unit-test/test_n2_information_transfer_req_data.c
+unit-test/test_n2_information_transfer_result.c
+unit-test/test_n2_information_transfer_rsp_data.c
+unit-test/test_n2_ran_information.c
+unit-test/test_n2_sm_information.c
+unit-test/test_nas_security_mode.c
+unit-test/test_ng_ksi.c
+unit-test/test_ngap_ie_type.c
+unit-test/test_non_ue_n2_info_subscription_create_data.c
+unit-test/test_non_ue_n2_info_subscription_created_data.c
+unit-test/test_npn_access_info.c
+unit-test/test_nrppa_information.c
+unit-test/test_nssaa_status.c
+unit-test/test_nssai_mapping.c
+unit-test/test_pc5_flow_bit_rates.c
+unit-test/test_pc5_qo_s_para.c
+unit-test/test_pc5_qos_flow_item.c
+unit-test/test_pdu_session_context.c
+unit-test/test_periodic_communication_indicator.c
+unit-test/test_policy_req_trigger.c
+unit-test/test_pws_error_data.c
+unit-test/test_pws_information.c
+unit-test/test_pws_response_data.c
+unit-test/test_rat_selector.c
+unit-test/test_reachability_filter.c
+unit-test/test_reachability_filter_any_of.c
+unit-test/test_registration_context_container.c
+unit-test/test_sc_type.c
+unit-test/test_seaf_data.c
+unit-test/test_small_data_rate_status_info.c
+unit-test/test_smf_change_indication.c
+unit-test/test_smf_change_info.c
+unit-test/test_status_change.c
+unit-test/test_traffic_descriptor.c
+unit-test/test_transfer_reason.c
+unit-test/test_ue_context.c
+unit-test/test_ue_context_cancel_relocate_data.c
+unit-test/test_ue_context_create_data.c
+unit-test/test_ue_context_create_error.c
+unit-test/test_ue_context_created_data.c
+unit-test/test_ue_context_release.c
+unit-test/test_ue_context_relocate_data.c
+unit-test/test_ue_context_relocated_data.c
+unit-test/test_ue_context_transfer_req_data.c
+unit-test/test_ue_context_transfer_rsp_data.c
+unit-test/test_ue_context_transfer_status.c
+unit-test/test_ue_differentiation_info.c
+unit-test/test_ue_n1_n2_info_subscription_create_data.c
+unit-test/test_ue_n1_n2_info_subscription_created_data.c
+unit-test/test_ue_reg_status_update_req_data.c
+unit-test/test_ue_reg_status_update_rsp_data.c
+unit-test/test_v2x_context.c
+unit-test/test_v2x_information.c
diff --git a/lib/sbi/openapi/.openapi-generator/VERSION b/lib/sbi/openapi/.openapi-generator/VERSION
index b5d898602..3bff05917 100644
--- a/lib/sbi/openapi/.openapi-generator/VERSION
+++ b/lib/sbi/openapi/.openapi-generator/VERSION
@@ -1 +1 @@
-4.3.1-SNAPSHOT
\ No newline at end of file
+5.1.1
\ No newline at end of file
diff --git a/lib/sbi/openapi/.openapi-generator/templates/model-body.mustache b/lib/sbi/openapi/.openapi-generator/templates/model-body.mustache
deleted file mode 100644
index 72e457663..000000000
--- a/lib/sbi/openapi/.openapi-generator/templates/model-body.mustache
+++ /dev/null
@@ -1,814 +0,0 @@
-{{#models}}{{#model}}
-#include
-#include
-#include
-#include "{{classname}}.h"
-
-{{#isEnum}}
- char* OpenAPI_{{classname}}_ToString(OpenAPI_{{classVarName}}_e {{classname}})
- {
- const char *{{classname}}Array[] = { "NULL"{{#allowableValues}}{{#enumVars}}, "{{{value}}}"{{/enumVars}}{{/allowableValues}} };
- size_t sizeofArray = sizeof({{classname}}Array) / sizeof({{classname}}Array[0]);
- if ({{classname}} < sizeofArray)
- return (char *){{classname}}Array[{{classname}}];
- else
- return (char *)"Unknown";
- }
-
- OpenAPI_{{classVarName}}_e OpenAPI_{{classname}}_FromString(char* {{classname}})
- {
- int stringToReturn = 0;
- const char *{{classname}}Array[] = { "NULL"{{#allowableValues}}{{#enumVars}}, "{{{value}}}"{{/enumVars}}{{/allowableValues}} };
- size_t sizeofArray = sizeof({{classname}}Array) / sizeof({{classname}}Array[0]);
- while (stringToReturn < sizeofArray) {
- if (strcmp({{classname}}, {{classname}}Array[stringToReturn]) == 0) {
- return stringToReturn;
- }
- stringToReturn++;
- }
- return 0;
- }
-{{/isEnum}}
-{{^isEnum}}
-{{#vars}}
- {{^isContainer}}
- {{#isPrimitiveType}}
- {{#isEnum}}
- char *OpenAPI_{{name}}{{classname}}_ToString(OpenAPI_{{classVarName}}_{{name}}_e {{name}})
- {
- const char *{{name}}Array[] = { "NULL"{{#allowableValues}}{{#enumVars}}, "{{{value}}}"{{/enumVars}}{{/allowableValues}} };
- size_t sizeofArray = sizeof({{name}}Array) / sizeof({{name}}Array[0]);
- if ({{name}} < sizeofArray)
- return (char *){{name}}Array[{{name}}];
- else
- return (char *)"Unknown";
- }
-
- OpenAPI_{{classVarName}}_{{name}}_e OpenAPI_{{name}}{{classname}}_FromString(char* {{name}})
- {
- int stringToReturn = 0;
- const char *{{name}}Array[] = { "NULL"{{#allowableValues}}{{#enumVars}}, "{{{value}}}"{{/enumVars}}{{/allowableValues}} };
- size_t sizeofArray = sizeof({{name}}Array) / sizeof({{name}}Array[0]);
- while (stringToReturn < sizeofArray) {
- if (strcmp({{name}}, {{name}}Array[stringToReturn]) == 0) {
- return stringToReturn;
- }
- stringToReturn++;
- }
- return 0;
- }
- {{/isEnum}}
- {{/isPrimitiveType}}
- {{/isContainer}}
-{{/vars}}
-OpenAPI_{{classname}}_t *OpenAPI_{{classname}}_create(
-{{#vars}}
- {{^isContainer}}
- {{^isPrimitiveType}}
- {{#isEnum}}
- OpenAPI_{{datatype}}_e {{name}}{{#hasMore}},{{/hasMore}}
- {{/isEnum}}
- {{^isEnum}}
- {{#isModel}}
- OpenAPI_{{datatype}}_t *{{name}}{{#hasMore}},{{/hasMore}}
- {{/isModel}}
- {{#isUuid}}
- {{datatype}} *{{name}}{{#hasMore}},{{/hasMore}}
- {{/isUuid}}
- {{#isEmail}}
- {{datatype}} *{{name}}{{#hasMore}},{{/hasMore}}
- {{/isEmail}}
- {{#isFreeFormObject}}
- OpenAPI_{{datatype}}_t *{{name}}{{#hasMore}},{{/hasMore}}
- {{/isFreeFormObject}}
- {{/isEnum}}
- {{/isPrimitiveType}}
- {{#isPrimitiveType}}
- {{#isEnum}}
- OpenAPI_{{classVarName}}_{{name}}_e {{name}}{{#hasMore}},{{/hasMore}}
- {{/isEnum}}
- {{^isEnum}}
- {{#isNumeric}}
- {{datatype}} {{name}}{{#hasMore}},{{/hasMore}}
- {{/isNumeric}}
- {{#isBoolean}}
- {{datatype}} {{name}}{{#hasMore}},{{/hasMore}}
- {{/isBoolean}}
- {{#isString}}
- {{datatype}} *{{name}}{{#hasMore}},{{/hasMore}}
- {{/isString}}
- {{/isEnum}}
- {{#isByteArray}}
- {{datatype}} {{name}}{{#hasMore}},{{/hasMore}}
- {{/isByteArray}}
- {{#isBinary}}
- OpenAPI_{{datatype}} {{name}}{{#hasMore}},{{/hasMore}}
- {{/isBinary}}
- {{#isDate}}
- {{datatype}} *{{name}}{{#hasMore}},{{/hasMore}}
- {{/isDate}}
- {{#isDateTime}}
- {{datatype}} *{{name}}{{#hasMore}},{{/hasMore}}
- {{/isDateTime}}
- {{/isPrimitiveType}}
- {{/isContainer}}
- {{#isContainer}}
- {{#isListContainer}}
- OpenAPI_{{datatype}}_t *{{name}}{{#hasMore}},{{/hasMore}}
- {{/isListContainer}}
- {{#isMapContainer}}
- OpenAPI_{{datatype}} {{name}}{{#hasMore}},{{/hasMore}}
- {{/isMapContainer}}
- {{/isContainer}}
-{{/vars}})
-{
- OpenAPI_{{classname}}_t *{{classname}}_local_var = OpenAPI_malloc(sizeof(OpenAPI_{{classname}}_t));
- if (!{{classname}}_local_var) {
- return NULL;
- }
-{{#vars}}
- {{classname}}_local_var->{{{name}}} = {{{name}}};
-{{/vars}}
-
- return {{classname}}_local_var;
-}
-
-void OpenAPI_{{classname}}_free(OpenAPI_{{classname}}_t *{{classname}})
-{
- if (NULL == {{classname}}) {
- return ;
- }
- OpenAPI_lnode_t *node;
-{{#vars}}
- {{^isContainer}}
- {{^isPrimitiveType}}
- {{^isEnum}}
- {{#isModel}}
- OpenAPI_{{{complexType}}}_free({{{classname}}}->{{{name}}});
- {{/isModel}}
- {{#isUuid}}
- ogs_free({{{classname}}}->{{{name}}});
- {{/isUuid}}
- {{#isEmail}}
- ogs_free({{{classname}}}->{{{name}}});
- {{/isEmail}}
- {{#isFreeFormObject}}
- OpenAPI_object_free({{{classname}}}->{{{name}}});
- {{/isFreeFormObject}}
- {{/isEnum}}
- {{/isPrimitiveType}}
- {{#isPrimitiveType}}
- {{^isEnum}}
- {{#isString}}
- ogs_free({{{classname}}}->{{{name}}});
- {{/isString}}
- {{/isEnum}}
- {{#isBinary}}
- ogs_free({{{classname}}}->{{{name}}}->data);
- {{/isBinary}}
- {{#isDate}}
- ogs_free({{{classname}}}->{{{name}}});
- {{/isDate}}
- {{#isDateTime}}
- ogs_free({{{classname}}}->{{{name}}});
- {{/isDateTime}}
- {{/isPrimitiveType}}
- {{/isContainer}}
- {{#isContainer}}
- {{#isListContainer}}
- {{#isPrimitiveType}}
- {{^isEnum}}
- OpenAPI_list_for_each({{classname}}->{{name}}, node) {
- ogs_free(node->data);
- }
- {{/isEnum}}
- OpenAPI_list_free({{classname}}->{{name}});
- {{/isPrimitiveType}}
- {{^isPrimitiveType}}
- {{^isEnum}}
- OpenAPI_list_for_each({{classname}}->{{name}}, node) {
- OpenAPI_{{complexType}}_free(node->data);
- }
- {{/isEnum}}
- OpenAPI_list_free({{classname}}->{{name}});
- {{/isPrimitiveType}}
- {{/isListContainer}}
- {{#isMapContainer}}
- {{#isPrimitiveType}}
- OpenAPI_list_for_each({{classname}}->{{name}}, node) {
- OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)node->data;
- ogs_free(localKeyValue->value);
- ogs_free(localKeyValue);
- }
- OpenAPI_list_free({{classname}}->{{name}});
- {{/isPrimitiveType}}
- {{^isPrimitiveType}}
- OpenAPI_list_for_each({{classname}}->{{name}}, node) {
- OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)node->data;
- OpenAPI_{{complexType}}_free(localKeyValue->value);
- ogs_free(localKeyValue);
- }
- OpenAPI_list_free({{classname}}->{{name}});
- {{/isPrimitiveType}}
- {{/isMapContainer}}
- {{/isContainer}}
-{{/vars}}
- ogs_free({{classname}});
-}
-
-cJSON *OpenAPI_{{classname}}_convertToJSON(OpenAPI_{{classname}}_t *{{classname}})
-{
- cJSON *item = NULL;
-
- if ({{classname}} == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- return NULL;
- }
-
- item = cJSON_CreateObject();
-{{#vars}}
- {{^required}}
- if ({{{classname}}}->{{{name}}}) {
- {{/required}}
- {{^isContainer}}
- {{#isPrimitiveType}}
- {{#isEnum}}
- if (cJSON_AddStringToObject(item, "{{{baseName}}}", OpenAPI_{{{name}}}{{classname}}_ToString({{{classname}}}->{{{name}}})) == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isEnum}}
- {{^isEnum}}
- {{#isNumeric}}
- if (cJSON_AddNumberToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isNumeric}}
- {{#isBoolean}}
- if (cJSON_AddBoolToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isBoolean}}
- {{#isString}}
- if (cJSON_AddStringToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isString}}
- {{/isEnum}}
- {{#isByteArray}}
- if (cJSON_AddNumberToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isByteArray}}
- {{#isBinary}}
- char* encoded_str_{{{name}}} = OpenAPI_base64encode({{{classname}}}->{{{name}}}->data,{{{classname}}}->{{{name}}}->len);
- if (cJSON_AddStringToObject(item, "{{{baseName}}}", encoded_str_{{{name}}}) == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- ogs_free(encoded_str_{{{name}}});
- {{/isBinary}}
- {{#isDate}}
- if (cJSON_AddStringToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isDate}}
- {{#isDateTime}}
- if (cJSON_AddStringToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isDateTime}}
- {{/isPrimitiveType}}
- {{^isPrimitiveType}}
- {{#isEnum}}
- if (cJSON_AddStringToObject(item, "{{{baseName}}}", OpenAPI_{{{complexType}}}_ToString({{{classname}}}->{{{name}}})) == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isEnum}}
- {{^isEnum}}
- {{#isModel}}
- cJSON *{{{name}}}_local_JSON = OpenAPI_{{complexType}}{{#isFreeFormObject}}object{{/isFreeFormObject}}_convertToJSON({{{classname}}}->{{{name}}});
- if ({{{name}}}_local_JSON == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- cJSON_AddItemToObject(item, "{{{baseName}}}", {{{name}}}_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isModel}}
- {{#isUuid}}
- if (cJSON_AddStringToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isUuid}}
- {{#isEmail}}
- if (cJSON_AddStringToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isEmail}}
- {{#isFreeFormObject}}
- cJSON *{{{name}}}_object = OpenAPI_object_convertToJSON({{{classname}}}->{{{name}}});
- if ({{{name}}}_object == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- cJSON_AddItemToObject(item, "{{{baseName}}}", {{{name}}}_object);
- if (item->child == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isFreeFormObject}}
- {{/isEnum}}
- {{/isPrimitiveType}}
- {{/isContainer}}
- {{#isContainer}}
- {{#isListContainer}}
- {{#isPrimitiveType}}
- {{^isEnum}}
- cJSON *{{{name}}} = cJSON_AddArrayToObject(item, "{{{baseName}}}");
- if ({{{name}}} == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
-
- OpenAPI_lnode_t *{{{name}}}_node;
- OpenAPI_list_for_each({{{classname}}}->{{{name}}}, {{{name}}}_node) {
- {{#items}}
- {{#isString}}
- if (cJSON_AddStringToObject({{{name}}}, "", (char*){{{name}}}_node->data) == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isString}}
- {{#isBoolean}}
- if (cJSON_AddBoolToObject({{{name}}}, "", *(cJSON_bool *){{{name}}}_node->data) == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isBoolean}}
- {{#isNumeric}}
- if (cJSON_AddNumberToObject({{{name}}}, "", *(double *){{{name}}}_node->data) == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isNumeric}}
- {{/items}}
- }
- {{/isEnum}}
- {{/isPrimitiveType}}
- {{^isPrimitiveType}}
- {{^isEnum}}
- cJSON *{{{name}}}List = cJSON_AddArrayToObject(item, "{{{baseName}}}");
- if ({{{name}}}List == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
-
- OpenAPI_lnode_t *{{{name}}}_node;
- if ({{{classname}}}->{{{name}}}) {
- OpenAPI_list_for_each({{classname}}->{{{name}}}, {{{name}}}_node) {
- cJSON *itemLocal = OpenAPI_{{complexType}}_convertToJSON({{#isEnum}}{{#items}}(intptr_t){{/items}}{{/isEnum}}{{{name}}}_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- cJSON_AddItemToArray({{{name}}}List, itemLocal);
- }
- }
- {{/isEnum}}
- {{#isEnum}}
- cJSON *{{{name}}} = cJSON_AddArrayToObject(item, "{{{baseName}}}");
- if ({{{name}}} == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- OpenAPI_lnode_t *{{{name}}}_node;
- OpenAPI_list_for_each({{classname}}->{{{name}}}, {{{name}}}_node) {
- if (cJSON_AddStringToObject({{{name}}}, "", OpenAPI_{{{complexType}}}_ToString((intptr_t){{{name}}}_node->data)) == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- }
- {{/isEnum}}
- {{/isPrimitiveType}}
- {{/isListContainer}}
- {{#isMapContainer}}
- cJSON *{{{name}}} = cJSON_AddObjectToObject(item, "{{{baseName}}}");
- if ({{{name}}} == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- cJSON *localMapObject = {{{name}}};
- OpenAPI_lnode_t *{{{name}}}_node;
- if ({{{classname}}}->{{{name}}}) {
- OpenAPI_list_for_each({{{classname}}}->{{{name}}}, {{{name}}}_node) {
- OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*){{{name}}}_node->data;
- {{#isPrimitiveType}}
- {{#isString}}
- if (cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isString}}
- {{#isNumeric}}
- if (cJSON_AddNumberToObject(localMapObject, localKeyValue->key, *(double *)localKeyValue->value) == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isNumeric}}
- {{#isBoolean}}
- if (cJSON_AddBoolToObject(localMapObject, localKeyValue->key, *(cJSON_bool *)localKeyValue->value) == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isBoolean}}
- {{/isPrimitiveType}}
- {{^isPrimitiveType}}
- cJSON *itemLocal = OpenAPI_{{complexType}}_convertToJSON(localKeyValue->value);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
- goto end;
- }
- cJSON_AddItemToObject({{{name}}}, localKeyValue->key, itemLocal);
- {{/isPrimitiveType}}
- }
- }
- {{/isMapContainer}}
- {{/isContainer}}
- {{^required}}
- }
- {{/required}}
-
-{{/vars}}
-end:
- return item;
-}
-
-OpenAPI_{{classname}}_t *OpenAPI_{{classname}}_parseFromJSON(cJSON *{{classname}}JSON)
-{
- OpenAPI_{{classname}}_t *{{classname}}_local_var = NULL;
-{{#vars}}
- cJSON *{{{name}}} = cJSON_GetObjectItemCaseSensitive({{classname}}JSON, "{{{baseName}}}");
- {{#required}}
- if (!{{{name}}}) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/required}}
-
- {{^isContainer}}
- {{#isPrimitiveType}}
- {{#isEnum}}
- OpenAPI_{{classVarName}}_{{name}}_e {{name}}Variable;
- {{^required}}if ({{{name}}}) { {{/required}}
- if (!cJSON_IsString({{{name}}})) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
- {{name}}Variable = OpenAPI_{{name}}{{classname}}_FromString({{{name}}}->valuestring);
- {{/isEnum}}
- {{^isEnum}}
- {{#isNumeric}}
- {{^required}}if ({{{name}}}) { {{/required}}
- if (!cJSON_IsNumber({{{name}}})) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isNumeric}}
- {{#isBoolean}}
- {{^required}}if ({{{name}}}) { {{/required}}
- if (!cJSON_IsBool({{{name}}})) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isBoolean}}
- {{#isString}}
- {{^required}}if ({{{name}}}) { {{/required}}
- if (!cJSON_IsString({{{name}}})) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isString}}
- {{/isEnum}}
- {{#isByteArray}}
- {{^required}}if ({{{name}}}) { {{/required}}
- if (!cJSON_IsNumber({{{name}}})) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isByteArray}}
- {{#isBinary}}
- OpenAPI_binary_t* decoded_str_{{{name}}} = OpenAPI_malloc(sizeof(OpenAPI_binary_t));
- {{^required}}if ({{{name}}}) { {{/required}}
- if (!cJSON_IsString({{{name}}})) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
- decoded_str_{{{name}}}->data = OpenAPI_base64decode({{{name}}}->valuestring, strlen({{{name}}}->valuestring), &decoded_str_{{{name}}}->len);
- if (!decoded_str_{{{name}}}->data) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isBinary}}
- {{#isDate}}
- {{^required}}if ({{{name}}}) { {{/required}}
- if (!cJSON_IsString({{{name}}})) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isDate}}
- {{#isDateTime}}
- {{^required}}if ({{{name}}}) { {{/required}}
- if (!cJSON_IsString({{{name}}})) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isDateTime}}
- {{/isPrimitiveType}}
- {{^isPrimitiveType}}
- {{#isEnum}}
- OpenAPI_{{complexType}}_e {{name}}Variable;
- {{^required}}if ({{{name}}}) { {{/required}}
- if (!cJSON_IsString({{{name}}})) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
- {{name}}Variable = OpenAPI_{{complexType}}_FromString({{{name}}}->valuestring);
- {{/isEnum}}
- {{^isEnum}}
- {{#isModel}}
- {{^isFreeFormObject}}OpenAPI_{{complexType}}{{/isFreeFormObject}}{{#isFreeFormObject}}OpenAPI_object{{/isFreeFormObject}}_t *{{name}}_local_nonprim = NULL;
- {{^required}}if ({{{name}}}) { {{/required}}
- {{{name}}}_local_nonprim = OpenAPI_{{complexType}}{{#isFreeFormObject}}object{{/isFreeFormObject}}_parseFromJSON({{{name}}});
- {{/isModel}}
- {{#isUuid}}
- {{^required}}if ({{{name}}}) { {{/required}}
- if (!cJSON_IsString({{{name}}})) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isUuid}}
- {{#isEmail}}
- {{^required}}if ({{{name}}}) { {{/required}}
- if (!cJSON_IsString({{{name}}})) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
- {{/isEmail}}
- {{#isFreeFormObject}}
- OpenAPI_object_t *{{name}}_local_object = NULL;
- {{^required}}if ({{{name}}}) { {{/required}}
- {{{name}}}_local_object = OpenAPI_object_parseFromJSON({{{name}}});
- {{/isFreeFormObject}}
- {{/isEnum}}
- {{/isPrimitiveType}}
- {{/isContainer}}
- {{#isContainer}}
- {{#isListContainer}}
- {{#isPrimitiveType}}
- {{^isEnum}}
- OpenAPI_list_t *{{{name}}}List;
- {{^required}}if ({{{name}}}) { {{/required}}
- cJSON *{{{name}}}_local;
- if (!cJSON_IsArray({{{name}}})) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
- {{{name}}}List = OpenAPI_list_create();
-
- cJSON_ArrayForEach({{{name}}}_local, {{{name}}}) {
- {{#items}}
- {{#isString}}
- if (!cJSON_IsString({{{name}}}_local)) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
- OpenAPI_list_add({{{name}}}List , ogs_strdup_or_assert({{{name}}}_local->valuestring));
- {{/isString}}
- {{#isNumeric}}
- if (!cJSON_IsNumber({{{name}}}_local)) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
- OpenAPI_list_add({{{name}}}List , &{{{name}}}_local->valuedouble);
- {{/isNumeric}}
- {{#isBoolean}}
- if (!cJSON_IsBool({{{name}}}_local)) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
- OpenAPI_list_add({{{name}}}List , {{{name}}}_local->valueint);
- {{/isBoolean}}
- {{/items}}
- }
- {{/isEnum}}
- {{/isPrimitiveType}}
- {{^isPrimitiveType}}
- {{^isEnum}}
- OpenAPI_list_t *{{{name}}}List;
- {{^required}}if ({{{name}}}) { {{/required}}
- cJSON *{{{name}}}_local_nonprimitive;
- if (!cJSON_IsArray({{{name}}})){
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
-
- {{{name}}}List = OpenAPI_list_create();
-
- cJSON_ArrayForEach({{{name}}}_local_nonprimitive, {{{name}}} ) {
- if (!cJSON_IsObject({{{name}}}_local_nonprimitive)) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
- {{#isEnum}}{{#items}}{{datatypeWithEnum}}_e {{/items}}{{/isEnum}}{{^isEnum}}OpenAPI_{{complexType}}_t *{{/isEnum}}{{{name}}}Item = OpenAPI_{{complexType}}_parseFromJSON({{{name}}}_local_nonprimitive);
-
- OpenAPI_list_add({{{name}}}List, {{#isEnum}}{{#items}}(void *){{/items}}{{/isEnum}}{{{name}}}Item);
- }
- {{/isEnum}}
- {{#isEnum}}
- OpenAPI_list_t *{{{name}}}List;
- {{^required}}if ({{{name}}}) { {{/required}}
- cJSON *{{{name}}}_local_nonprimitive;
- if (!cJSON_IsArray({{{name}}})) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
-
- {{{name}}}List = OpenAPI_list_create();
-
- cJSON_ArrayForEach({{{name}}}_local_nonprimitive, {{{name}}} ) {
- if (!cJSON_IsString({{{name}}}_local_nonprimitive)){
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
-
- OpenAPI_list_add({{{name}}}List, (void *)OpenAPI_{{{complexType}}}_FromString({{{name}}}_local_nonprimitive->valuestring));
- }
- {{/isEnum}}
- {{/isPrimitiveType}}
- {{/isListContainer}}
- {{#isMapContainer}}
- OpenAPI_list_t *{{{name}}}List;
- {{^required}}if ({{{name}}}) { {{/required}}
- cJSON *{{{name}}}_local_map;
- if (!cJSON_IsObject({{{name}}})) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
- {{{name}}}List = OpenAPI_list_create();
- OpenAPI_map_t *localMapKeyPair = NULL;
- cJSON_ArrayForEach({{{name}}}_local_map, {{{name}}}) {
- cJSON *localMapObject = {{{name}}}_local_map;
- {{#isPrimitiveType}}
- {{#isString}}
- if (!cJSON_IsString(localMapObject)) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
- localMapKeyPair = OpenAPI_map_create(ogs_strdup_or_assert(localMapObject->string),ogs_strdup_or_assert(localMapObject->valuestring));
- {{/isString}}
- {{#isBoolean}}
- if (!cJSON_IsBool(localMapObject)) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
- localMapKeyPair = OpenAPI_map_create(ogs_strdup_or_assert(localMapObject->string), &localMapObject->valueint);
- {{/isBoolean}}
- {{#isNumeric}}
- if (!cJSON_IsNumber(localMapObject)) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
- localMapKeyPair = OpenAPI_map_create(ogs_strdup_or_assert(localMapObject->string),&localMapObject->valuedouble );
- {{/isNumeric}}
- {{/isPrimitiveType}}
- {{^isPrimitiveType}}
- if (!cJSON_IsObject({{{name}}}_local_map)) {
- ogs_error("OpenAPI_{{classname}}_parseFromJSON() failed [{{{name}}}]");
- goto end;
- }
- localMapKeyPair = OpenAPI_map_create(
- localMapObject->string, OpenAPI_{{complexType}}_parseFromJSON(localMapObject));
- {{/isPrimitiveType}}
- OpenAPI_list_add({{{name}}}List , localMapKeyPair);
- }
- {{/isMapContainer}}
- {{/isContainer}}
- {{^required}}
- }
- {{/required}}
-
-{{/vars}}
- {{classname}}_local_var = OpenAPI_{{classname}}_create (
-{{#vars}}
- {{^isContainer}}
- {{^isPrimitiveType}}
- {{#isEnum}}
- {{^required}}{{{name}}} ? {{/required}}{{{name}}}Variable{{^required}} : 0{{/required}}{{#hasMore}},{{/hasMore}}
- {{/isEnum}}
- {{^isEnum}}
- {{#isModel}}
- {{^required}}{{{name}}} ? {{/required}}{{{name}}}_local_nonprim{{^required}} : NULL{{/required}}{{#hasMore}},{{/hasMore}}
- {{/isModel}}
- {{#isUuid}}
- {{^required}}{{{name}}} ? {{/required}}ogs_strdup_or_assert({{{name}}}->valuestring){{^required}} : NULL{{/required}}{{#hasMore}},{{/hasMore}}
- {{/isUuid}}
- {{#isEmail}}
- {{^required}}{{{name}}} ? {{/required}}ogs_strdup_or_assert({{{name}}}->valuestring){{^required}} : NULL{{/required}}{{#hasMore}},{{/hasMore}}
- {{/isEmail}}
- {{#isFreeFormObject}}
- {{^required}}{{{name}}} ? {{/required}}{{{name}}}_local_object{{^required}} : NULL{{/required}}{{#hasMore}},{{/hasMore}}
- {{/isFreeFormObject}}
- {{/isEnum}}
- {{/isPrimitiveType}}
- {{#isPrimitiveType}}
- {{#isEnum}}
- {{^required}}{{{name}}} ? {{/required}}{{name}}Variable{{^required}} : 0{{/required}}{{#hasMore}},{{/hasMore}}
- {{/isEnum}}
- {{^isEnum}}
- {{#isNumeric}}
- {{^required}}{{{name}}} ? {{/required}}{{{name}}}->valuedouble{{^required}} : 0{{/required}}{{#hasMore}},{{/hasMore}}
- {{/isNumeric}}
- {{#isBoolean}}
- {{^required}}{{{name}}} ? {{/required}}{{{name}}}->valueint{{^required}} : 0{{/required}}{{#hasMore}},{{/hasMore}}
- {{/isBoolean}}
- {{#isString}}
- {{^required}}{{{name}}} ? {{/required}}ogs_strdup_or_assert({{{name}}}->valuestring){{^required}} : NULL{{/required}}{{#hasMore}},{{/hasMore}}
- {{/isString}}
- {{/isEnum}}
- {{#isByteArray}}
- {{^required}}{{{name}}} ? {{/required}}{{{name}}}->valueint{{^required}} : 0{{/required}}{{#hasMore}},{{/hasMore}}
- {{/isByteArray}}
- {{#isBinary}}
- {{^required}}{{{name}}} ? {{/required}}decoded_str_{{{name}}}{{^required}} : NULL{{/required}}{{#hasMore}},{{/hasMore}}
- {{/isBinary}}
- {{#isDate}}
- {{^required}}{{{name}}} ? {{/required}}ogs_strdup_or_assert({{{name}}}->valuestring){{^required}} : NULL{{/required}}{{#hasMore}},{{/hasMore}}
- {{/isDate}}
- {{#isDateTime}}
- {{^required}}{{{name}}} ? {{/required}}ogs_strdup_or_assert({{{name}}}->valuestring){{^required}} : NULL{{/required}}{{#hasMore}},{{/hasMore}}
- {{/isDateTime}}
- {{/isPrimitiveType}}
- {{/isContainer}}
- {{#isContainer}}
- {{#isListContainer}}
- {{^required}}{{{name}}} ? {{/required}}{{{name}}}List{{^required}} : NULL{{/required}}{{#hasMore}},{{/hasMore}}
- {{/isListContainer}}
- {{#isMapContainer}}
- {{^required}}{{{name}}} ? {{/required}}{{{name}}}List{{^required}} : NULL{{/required}}{{#hasMore}},{{/hasMore}}
- {{/isMapContainer}}
- {{/isContainer}}
-{{/vars}}
- );
-
- return {{classname}}_local_var;
-end:
- return NULL;
-}
-
-OpenAPI_{{classname}}_t *OpenAPI_{{classname}}_copy(OpenAPI_{{classname}}_t *dst, OpenAPI_{{classname}}_t *src)
-{
- cJSON *item = NULL;
- char *content = NULL;
-
- ogs_assert(src);
- item = OpenAPI_{{classname}}_convertToJSON(src);
- if (!item) {
- ogs_error("OpenAPI_{{classname}}_convertToJSON() failed");
- return NULL;
- }
-
- content = cJSON_Print(item);
- cJSON_Delete(item);
-
- if (!content) {
- ogs_error("cJSON_Print() failed");
- return NULL;
- }
-
- item = cJSON_Parse(content);
- ogs_free(content);
- if (!item) {
- ogs_error("cJSON_Parse() failed");
- return NULL;
- }
-
- OpenAPI_{{classname}}_free(dst);
- dst = OpenAPI_{{classname}}_parseFromJSON(item);
- cJSON_Delete(item);
-
- return dst;
-}
-{{/isEnum}}
-{{/model}}{{/models}}
diff --git a/lib/sbi/openapi/.openapi-generator/uncrustify-0.66.1.cfg b/lib/sbi/openapi/.openapi-generator/uncrustify-0.66.1.cfg
deleted file mode 100644
index 984d19ec0..000000000
--- a/lib/sbi/openapi/.openapi-generator/uncrustify-0.66.1.cfg
+++ /dev/null
@@ -1,2132 +0,0 @@
-# Uncrustify-0.66
-
-#
-# General options
-#
-
-# The type of line endings. Default=Auto.
-newlines = auto # auto/lf/crlf/cr
-
-# The original size of tabs in the input. Default=8.
-input_tab_size = 8 # unsigned number
-
-# The size of tabs in the output (only used if align_with_tabs=true). Default=8.
-output_tab_size = 8 # unsigned number
-
-# The ASCII value of the string escape char, usually 92 (\) or 94 (^). (Pawn).
-string_escape_char = 92 # unsigned number
-
-# Alternate string escape char for Pawn. Only works right before the quote char.
-string_escape_char2 = 0 # unsigned number
-
-# Replace tab characters found in string literals with the escape sequence \t instead.
-string_replace_tab_chars = false # false/true
-
-# Allow interpreting '>=' and '>>=' as part of a template in 'void f(list>=val);'.
-# If True, 'assert(x<0 && y>=3)' will be broken. Default=False
-# Improvements to template detection may make this option obsolete.
-tok_split_gte = false # false/true
-
-# Override the default ' *INDENT-OFF*' in comments for disabling processing of part of the file.
-disable_processing_cmt = "" # string
-
-# Override the default ' *INDENT-ON*' in comments for enabling processing of part of the file.
-enable_processing_cmt = "" # string
-
-# Enable parsing of digraphs. Default=False.
-enable_digraphs = false # false/true
-
-# Control what to do with the UTF-8 BOM (recommend 'remove').
-utf8_bom = ignore # ignore/add/remove/force
-
-# If the file contains bytes with values between 128 and 255, but is not UTF-8, then output as UTF-8.
-utf8_byte = false # false/true
-
-# Force the output encoding to UTF-8.
-utf8_force = false # false/true
-
-#
-# Spacing options
-#
-
-# Add or remove space around arithmetic operator '+', '-', '/', '*', etc
-# also '>>>' '<<' '>>' '%' '|'.
-sp_arith = ignore # ignore/add/remove/force
-
-# Add or remove space around arithmetic operator '+' and '-'. Overrides sp_arith
-sp_arith_additive = ignore # ignore/add/remove/force
-
-# Add or remove space around assignment operator '=', '+=', etc.
-sp_assign = ignore # ignore/add/remove/force
-
-# Add or remove space around '=' in C++11 lambda capture specifications. Overrides sp_assign.
-sp_cpp_lambda_assign = ignore # ignore/add/remove/force
-
-# Add or remove space after the capture specification in C++11 lambda.
-sp_cpp_lambda_paren = ignore # ignore/add/remove/force
-
-# Add or remove space around assignment operator '=' in a prototype.
-sp_assign_default = ignore # ignore/add/remove/force
-
-# Add or remove space before assignment operator '=', '+=', etc. Overrides sp_assign.
-sp_before_assign = ignore # ignore/add/remove/force
-
-# Add or remove space after assignment operator '=', '+=', etc. Overrides sp_assign.
-sp_after_assign = ignore # ignore/add/remove/force
-
-# Add or remove space in 'NS_ENUM ('.
-sp_enum_paren = ignore # ignore/add/remove/force
-
-# Add or remove space around assignment '=' in enum.
-sp_enum_assign = ignore # ignore/add/remove/force
-
-# Add or remove space before assignment '=' in enum. Overrides sp_enum_assign.
-sp_enum_before_assign = ignore # ignore/add/remove/force
-
-# Add or remove space after assignment '=' in enum. Overrides sp_enum_assign.
-sp_enum_after_assign = ignore # ignore/add/remove/force
-
-# Add or remove space around assignment ':' in enum.
-sp_enum_colon = ignore # ignore/add/remove/force
-
-# Add or remove space around preprocessor '##' concatenation operator. Default=Add.
-sp_pp_concat = add # ignore/add/remove/force
-
-# Add or remove space after preprocessor '#' stringify operator. Also affects the '#@' charizing operator.
-sp_pp_stringify = ignore # ignore/add/remove/force
-
-# Add or remove space before preprocessor '#' stringify operator as in '#define x(y) L#y'.
-sp_before_pp_stringify = ignore # ignore/add/remove/force
-
-# Add or remove space around boolean operators '&&' and '||'.
-sp_bool = ignore # ignore/add/remove/force
-
-# Add or remove space around compare operator '<', '>', '==', etc.
-sp_compare = ignore # ignore/add/remove/force
-
-# Add or remove space inside '(' and ')'.
-sp_inside_paren = ignore # ignore/add/remove/force
-
-# Add or remove space between nested parens: '((' vs ') )'.
-sp_paren_paren = ignore # ignore/add/remove/force
-
-# Add or remove space between back-to-back parens: ')(' vs ') ('.
-sp_cparen_oparen = ignore # ignore/add/remove/force
-
-# Whether to balance spaces inside nested parens.
-sp_balance_nested_parens = false # false/true
-
-# Add or remove space between ')' and '{'.
-sp_paren_brace = ignore # ignore/add/remove/force
-
-# Add or remove space before pointer star '*'.
-sp_before_ptr_star = ignore # ignore/add/remove/force
-
-# Add or remove space before pointer star '*' that isn't followed by a variable name
-# If set to 'ignore', sp_before_ptr_star is used instead.
-sp_before_unnamed_ptr_star = ignore # ignore/add/remove/force
-
-# Add or remove space between pointer stars '*'.
-sp_between_ptr_star = ignore # ignore/add/remove/force
-
-# Add or remove space after pointer star '*', if followed by a word.
-sp_after_ptr_star = ignore # ignore/add/remove/force
-
-# Add or remove space after pointer star '*', if followed by a qualifier.
-sp_after_ptr_star_qualifier = ignore # ignore/add/remove/force
-
-# Add or remove space after a pointer star '*', if followed by a func proto/def.
-sp_after_ptr_star_func = ignore # ignore/add/remove/force
-
-# Add or remove space after a pointer star '*', if followed by an open paren (function types).
-sp_ptr_star_paren = ignore # ignore/add/remove/force
-
-# Add or remove space before a pointer star '*', if followed by a func proto/def.
-sp_before_ptr_star_func = ignore # ignore/add/remove/force
-
-# Add or remove space before a reference sign '&'.
-sp_before_byref = ignore # ignore/add/remove/force
-
-# Add or remove space before a reference sign '&' that isn't followed by a variable name.
-# If set to 'ignore', sp_before_byref is used instead.
-sp_before_unnamed_byref = ignore # ignore/add/remove/force
-
-# Add or remove space after reference sign '&', if followed by a word.
-sp_after_byref = ignore # ignore/add/remove/force
-
-# Add or remove space after a reference sign '&', if followed by a func proto/def.
-sp_after_byref_func = ignore # ignore/add/remove/force
-
-# Add or remove space before a reference sign '&', if followed by a func proto/def.
-sp_before_byref_func = ignore # ignore/add/remove/force
-
-# Add or remove space between type and word. Default=Force.
-sp_after_type = force # ignore/add/remove/force
-
-# Add or remove space before the paren in the D constructs 'template Foo(' and 'class Foo('.
-sp_before_template_paren = ignore # ignore/add/remove/force
-
-# Add or remove space in 'template <' vs 'template<'.
-# If set to ignore, sp_before_angle is used.
-sp_template_angle = ignore # ignore/add/remove/force
-
-# Add or remove space before '<>'.
-sp_before_angle = ignore # ignore/add/remove/force
-
-# Add or remove space inside '<' and '>'.
-sp_inside_angle = ignore # ignore/add/remove/force
-
-# Add or remove space between '<>' and ':'.
-sp_angle_colon = ignore # ignore/add/remove/force
-
-# Add or remove space after '<>'.
-sp_after_angle = ignore # ignore/add/remove/force
-
-# Add or remove space between '<>' and '(' as found in 'new List(foo);'.
-sp_angle_paren = ignore # ignore/add/remove/force
-
-# Add or remove space between '<>' and '()' as found in 'new List();'.
-sp_angle_paren_empty = ignore # ignore/add/remove/force
-
-# Add or remove space between '<>' and a word as in 'List m;' or 'template static ...'.
-sp_angle_word = ignore # ignore/add/remove/force
-
-# Add or remove space between '>' and '>' in '>>' (template stuff C++/C# only). Default=Add.
-sp_angle_shift = add # ignore/add/remove/force
-
-# Permit removal of the space between '>>' in 'foo >' (C++11 only). Default=False.
-# sp_angle_shift cannot remove the space without this option.
-sp_permit_cpp11_shift = false # false/true
-
-# Add or remove space before '(' of 'if', 'for', 'switch', 'while', etc.
-sp_before_sparen = ignore # ignore/add/remove/force
-
-# Add or remove space inside if-condition '(' and ')'.
-sp_inside_sparen = ignore # ignore/add/remove/force
-
-# Add or remove space before if-condition ')'. Overrides sp_inside_sparen.
-sp_inside_sparen_close = ignore # ignore/add/remove/force
-
-# Add or remove space after if-condition '('. Overrides sp_inside_sparen.
-sp_inside_sparen_open = ignore # ignore/add/remove/force
-
-# Add or remove space after ')' of 'if', 'for', 'switch', and 'while', etc.
-sp_after_sparen = ignore # ignore/add/remove/force
-
-# Add or remove space between ')' and '{' of 'if', 'for', 'switch', and 'while', etc.
-sp_sparen_brace = ignore # ignore/add/remove/force
-
-# Add or remove space between 'invariant' and '(' in the D language.
-sp_invariant_paren = ignore # ignore/add/remove/force
-
-# Add or remove space after the ')' in 'invariant (C) c' in the D language.
-sp_after_invariant_paren = ignore # ignore/add/remove/force
-
-# Add or remove space before empty statement ';' on 'if', 'for' and 'while'.
-sp_special_semi = ignore # ignore/add/remove/force
-
-# Add or remove space before ';'. Default=Remove.
-sp_before_semi = remove # ignore/add/remove/force
-
-# Add or remove space before ';' in non-empty 'for' statements.
-sp_before_semi_for = ignore # ignore/add/remove/force
-
-# Add or remove space before a semicolon of an empty part of a for statement.
-sp_before_semi_for_empty = ignore # ignore/add/remove/force
-
-# Add or remove space after ';', except when followed by a comment. Default=Add.
-sp_after_semi = add # ignore/add/remove/force
-
-# Add or remove space after ';' in non-empty 'for' statements. Default=Force.
-sp_after_semi_for = force # ignore/add/remove/force
-
-# Add or remove space after the final semicolon of an empty part of a for statement: for ( ; ; ).
-sp_after_semi_for_empty = ignore # ignore/add/remove/force
-
-# Add or remove space before '[' (except '[]').
-sp_before_square = ignore # ignore/add/remove/force
-
-# Add or remove space before '[]'.
-sp_before_squares = ignore # ignore/add/remove/force
-
-# Add or remove space inside a non-empty '[' and ']'.
-sp_inside_square = ignore # ignore/add/remove/force
-
-# Add or remove space after ',', 'a,b' vs 'a, b'.
-sp_after_comma = ignore # ignore/add/remove/force
-
-# Add or remove space before ','. Default=Remove.
-sp_before_comma = remove # ignore/add/remove/force
-
-# Add or remove space between ',' and ']' in multidimensional array type 'int[,,]'. Only for C#.
-sp_after_mdatype_commas = ignore # ignore/add/remove/force
-
-# Add or remove space between '[' and ',' in multidimensional array type 'int[,,]'. Only for C#.
-sp_before_mdatype_commas = ignore # ignore/add/remove/force
-
-# Add or remove space between ',' in multidimensional array type 'int[,,]'. Only for C#.
-sp_between_mdatype_commas = ignore # ignore/add/remove/force
-
-# Add or remove space between an open paren and comma: '(,' vs '( ,'. Default=Force.
-sp_paren_comma = force # ignore/add/remove/force
-
-# Add or remove space before the variadic '...' when preceded by a non-punctuator.
-sp_before_ellipsis = ignore # ignore/add/remove/force
-
-# Add or remove space after class ':'.
-sp_after_class_colon = ignore # ignore/add/remove/force
-
-# Add or remove space before class ':'.
-sp_before_class_colon = ignore # ignore/add/remove/force
-
-# Add or remove space after class constructor ':'.
-sp_after_constr_colon = ignore # ignore/add/remove/force
-
-# Add or remove space before class constructor ':'.
-sp_before_constr_colon = ignore # ignore/add/remove/force
-
-# Add or remove space before case ':'. Default=Remove.
-sp_before_case_colon = remove # ignore/add/remove/force
-
-# Add or remove space between 'operator' and operator sign.
-sp_after_operator = ignore # ignore/add/remove/force
-
-# Add or remove space between the operator symbol and the open paren, as in 'operator ++('.
-sp_after_operator_sym = ignore # ignore/add/remove/force
-
-# Overrides sp_after_operator_sym when the operator has no arguments, as in 'operator *()'.
-sp_after_operator_sym_empty = ignore # ignore/add/remove/force
-
-# Add or remove space after C/D cast, i.e. 'cast(int)a' vs 'cast(int) a' or '(int)a' vs '(int) a'.
-sp_after_cast = ignore # ignore/add/remove/force
-
-# Add or remove spaces inside cast parens.
-sp_inside_paren_cast = ignore # ignore/add/remove/force
-
-# Add or remove space between the type and open paren in a C++ cast, i.e. 'int(exp)' vs 'int (exp)'.
-sp_cpp_cast_paren = ignore # ignore/add/remove/force
-
-# Add or remove space between 'sizeof' and '('.
-sp_sizeof_paren = ignore # ignore/add/remove/force
-
-# Add or remove space after the tag keyword (Pawn).
-sp_after_tag = ignore # ignore/add/remove/force
-
-# Add or remove space inside enum '{' and '}'.
-sp_inside_braces_enum = ignore # ignore/add/remove/force
-
-# Add or remove space inside struct/union '{' and '}'.
-sp_inside_braces_struct = ignore # ignore/add/remove/force
-
-# Add or remove space after open brace in an unnamed temporary direct-list-initialization.
-sp_after_type_brace_init_lst_open = ignore # ignore/add/remove/force
-
-# Add or remove space before close brace in an unnamed temporary direct-list-initialization.
-sp_before_type_brace_init_lst_close = ignore # ignore/add/remove/force
-
-# Add or remove space inside an unnamed temporary direct-list-initialization.
-sp_inside_type_brace_init_lst = ignore # ignore/add/remove/force
-
-# Add or remove space inside '{' and '}'.
-sp_inside_braces = ignore # ignore/add/remove/force
-
-# Add or remove space inside '{}'.
-sp_inside_braces_empty = ignore # ignore/add/remove/force
-
-# Add or remove space between return type and function name
-# A minimum of 1 is forced except for pointer return types.
-sp_type_func = ignore # ignore/add/remove/force
-
-# Add or remove space between type and open brace of an unnamed temporary direct-list-initialization.
-sp_type_brace_init_lst = ignore # ignore/add/remove/force
-
-# Add or remove space between function name and '(' on function declaration.
-sp_func_proto_paren = ignore # ignore/add/remove/force
-
-# Add or remove space between function name and '()' on function declaration without parameters.
-sp_func_proto_paren_empty = ignore # ignore/add/remove/force
-
-# Add or remove space between function name and '(' on function definition.
-sp_func_def_paren = ignore # ignore/add/remove/force
-
-# Add or remove space between function name and '()' on function definition without parameters.
-sp_func_def_paren_empty = ignore # ignore/add/remove/force
-
-# Add or remove space inside empty function '()'.
-sp_inside_fparens = ignore # ignore/add/remove/force
-
-# Add or remove space inside function '(' and ')'.
-sp_inside_fparen = ignore # ignore/add/remove/force
-
-# Add or remove space inside the first parens in the function type: 'void (*x)(...)'.
-sp_inside_tparen = ignore # ignore/add/remove/force
-
-# Add or remove between the parens in the function type: 'void (*x)(...)'.
-sp_after_tparen_close = ignore # ignore/add/remove/force
-
-# Add or remove space between ']' and '(' when part of a function call.
-sp_square_fparen = ignore # ignore/add/remove/force
-
-# Add or remove space between ')' and '{' of function.
-sp_fparen_brace = ignore # ignore/add/remove/force
-
-# Java: Add or remove space between ')' and '{{' of double brace initializer.
-sp_fparen_dbrace = ignore # ignore/add/remove/force
-
-# Add or remove space between function name and '(' on function calls.
-sp_func_call_paren = ignore # ignore/add/remove/force
-
-# Add or remove space between function name and '()' on function calls without parameters.
-# If set to 'ignore' (the default), sp_func_call_paren is used.
-sp_func_call_paren_empty = ignore # ignore/add/remove/force
-
-# Add or remove space between the user function name and '(' on function calls
-# You need to set a keyword to be a user function, like this: 'set func_call_user _' in the config file.
-sp_func_call_user_paren = ignore # ignore/add/remove/force
-
-# Add or remove space between a constructor/destructor and the open paren.
-sp_func_class_paren = ignore # ignore/add/remove/force
-
-# Add or remove space between a constructor without parameters or destructor and '()'.
-sp_func_class_paren_empty = ignore # ignore/add/remove/force
-
-# Add or remove space between 'return' and '('.
-sp_return_paren = ignore # ignore/add/remove/force
-
-# Add or remove space between '__attribute__' and '('.
-sp_attribute_paren = ignore # ignore/add/remove/force
-
-# Add or remove space between 'defined' and '(' in '#if defined (FOO)'.
-sp_defined_paren = ignore # ignore/add/remove/force
-
-# Add or remove space between 'throw' and '(' in 'throw (something)'.
-sp_throw_paren = ignore # ignore/add/remove/force
-
-# Add or remove space between 'throw' and anything other than '(' as in '@throw [...];'.
-sp_after_throw = ignore # ignore/add/remove/force
-
-# Add or remove space between 'catch' and '(' in 'catch (something) { }'
-# If set to ignore, sp_before_sparen is used.
-sp_catch_paren = ignore # ignore/add/remove/force
-
-# Add or remove space between 'version' and '(' in 'version (something) { }' (D language)
-# If set to ignore, sp_before_sparen is used.
-sp_version_paren = ignore # ignore/add/remove/force
-
-# Add or remove space between 'scope' and '(' in 'scope (something) { }' (D language)
-# If set to ignore, sp_before_sparen is used.
-sp_scope_paren = ignore # ignore/add/remove/force
-
-# Add or remove space between 'super' and '(' in 'super (something)'. Default=Remove.
-sp_super_paren = remove # ignore/add/remove/force
-
-# Add or remove space between 'this' and '(' in 'this (something)'. Default=Remove.
-sp_this_paren = remove # ignore/add/remove/force
-
-# Add or remove space between macro and value.
-sp_macro = ignore # ignore/add/remove/force
-
-# Add or remove space between macro function ')' and value.
-sp_macro_func = ignore # ignore/add/remove/force
-
-# Add or remove space between 'else' and '{' if on the same line.
-sp_else_brace = ignore # ignore/add/remove/force
-
-# Add or remove space between '}' and 'else' if on the same line.
-sp_brace_else = ignore # ignore/add/remove/force
-
-# Add or remove space between '}' and the name of a typedef on the same line.
-sp_brace_typedef = ignore # ignore/add/remove/force
-
-# Add or remove space between 'catch' and '{' if on the same line.
-sp_catch_brace = ignore # ignore/add/remove/force
-
-# Add or remove space between '}' and 'catch' if on the same line.
-sp_brace_catch = ignore # ignore/add/remove/force
-
-# Add or remove space between 'finally' and '{' if on the same line.
-sp_finally_brace = ignore # ignore/add/remove/force
-
-# Add or remove space between '}' and 'finally' if on the same line.
-sp_brace_finally = ignore # ignore/add/remove/force
-
-# Add or remove space between 'try' and '{' if on the same line.
-sp_try_brace = ignore # ignore/add/remove/force
-
-# Add or remove space between get/set and '{' if on the same line.
-sp_getset_brace = ignore # ignore/add/remove/force
-
-# Add or remove space between a variable and '{' for C++ uniform initialization. Default=Add.
-sp_word_brace = add # ignore/add/remove/force
-
-# Add or remove space between a variable and '{' for a namespace. Default=Add.
-sp_word_brace_ns = add # ignore/add/remove/force
-
-# Add or remove space before the '::' operator.
-sp_before_dc = ignore # ignore/add/remove/force
-
-# Add or remove space after the '::' operator.
-sp_after_dc = ignore # ignore/add/remove/force
-
-# Add or remove around the D named array initializer ':' operator.
-sp_d_array_colon = ignore # ignore/add/remove/force
-
-# Add or remove space after the '!' (not) operator. Default=Remove.
-sp_not = remove # ignore/add/remove/force
-
-# Add or remove space after the '~' (invert) operator. Default=Remove.
-sp_inv = remove # ignore/add/remove/force
-
-# Add or remove space after the '&' (address-of) operator. Default=Remove
-# This does not affect the spacing after a '&' that is part of a type.
-sp_addr = remove # ignore/add/remove/force
-
-# Add or remove space around the '.' or '->' operators. Default=Remove.
-sp_member = remove # ignore/add/remove/force
-
-# Add or remove space after the '*' (dereference) operator. Default=Remove
-# This does not affect the spacing after a '*' that is part of a type.
-sp_deref = remove # ignore/add/remove/force
-
-# Add or remove space after '+' or '-', as in 'x = -5' or 'y = +7'. Default=Remove.
-sp_sign = remove # ignore/add/remove/force
-
-# Add or remove space before or after '++' and '--', as in '(--x)' or 'y++;'. Default=Remove.
-sp_incdec = remove # ignore/add/remove/force
-
-# Add or remove space before a backslash-newline at the end of a line. Default=Add.
-sp_before_nl_cont = add # ignore/add/remove/force
-
-# Add or remove space after the scope '+' or '-', as in '-(void) foo;' or '+(int) bar;'.
-sp_after_oc_scope = ignore # ignore/add/remove/force
-
-# Add or remove space after the colon in message specs
-# '-(int) f:(int) x;' vs '-(int) f: (int) x;'.
-sp_after_oc_colon = ignore # ignore/add/remove/force
-
-# Add or remove space before the colon in message specs
-# '-(int) f: (int) x;' vs '-(int) f : (int) x;'.
-sp_before_oc_colon = ignore # ignore/add/remove/force
-
-# Add or remove space after the colon in immutable dictionary expression
-# 'NSDictionary *test = @{@"foo" :@"bar"};'.
-sp_after_oc_dict_colon = ignore # ignore/add/remove/force
-
-# Add or remove space before the colon in immutable dictionary expression
-# 'NSDictionary *test = @{@"foo" :@"bar"};'.
-sp_before_oc_dict_colon = ignore # ignore/add/remove/force
-
-# Add or remove space after the colon in message specs
-# '[object setValue:1];' vs '[object setValue: 1];'.
-sp_after_send_oc_colon = ignore # ignore/add/remove/force
-
-# Add or remove space before the colon in message specs
-# '[object setValue:1];' vs '[object setValue :1];'.
-sp_before_send_oc_colon = ignore # ignore/add/remove/force
-
-# Add or remove space after the (type) in message specs
-# '-(int)f: (int) x;' vs '-(int)f: (int)x;'.
-sp_after_oc_type = ignore # ignore/add/remove/force
-
-# Add or remove space after the first (type) in message specs
-# '-(int) f:(int)x;' vs '-(int)f:(int)x;'.
-sp_after_oc_return_type = ignore # ignore/add/remove/force
-
-# Add or remove space between '@selector' and '('
-# '@selector(msgName)' vs '@selector (msgName)'
-# Also applies to @protocol() constructs.
-sp_after_oc_at_sel = ignore # ignore/add/remove/force
-
-# Add or remove space between '@selector(x)' and the following word
-# '@selector(foo) a:' vs '@selector(foo)a:'.
-sp_after_oc_at_sel_parens = ignore # ignore/add/remove/force
-
-# Add or remove space inside '@selector' parens
-# '@selector(foo)' vs '@selector( foo )'
-# Also applies to @protocol() constructs.
-sp_inside_oc_at_sel_parens = ignore # ignore/add/remove/force
-
-# Add or remove space before a block pointer caret
-# '^int (int arg){...}' vs. ' ^int (int arg){...}'.
-sp_before_oc_block_caret = ignore # ignore/add/remove/force
-
-# Add or remove space after a block pointer caret
-# '^int (int arg){...}' vs. '^ int (int arg){...}'.
-sp_after_oc_block_caret = ignore # ignore/add/remove/force
-
-# Add or remove space between the receiver and selector in a message.
-# '[receiver selector ...]'.
-sp_after_oc_msg_receiver = ignore # ignore/add/remove/force
-
-# Add or remove space after @property.
-sp_after_oc_property = ignore # ignore/add/remove/force
-
-# Add or remove space around the ':' in 'b ? t : f'.
-sp_cond_colon = ignore # ignore/add/remove/force
-
-# Add or remove space before the ':' in 'b ? t : f'. Overrides sp_cond_colon.
-sp_cond_colon_before = ignore # ignore/add/remove/force
-
-# Add or remove space after the ':' in 'b ? t : f'. Overrides sp_cond_colon.
-sp_cond_colon_after = ignore # ignore/add/remove/force
-
-# Add or remove space around the '?' in 'b ? t : f'.
-sp_cond_question = ignore # ignore/add/remove/force
-
-# Add or remove space before the '?' in 'b ? t : f'. Overrides sp_cond_question.
-sp_cond_question_before = ignore # ignore/add/remove/force
-
-# Add or remove space after the '?' in 'b ? t : f'. Overrides sp_cond_question.
-sp_cond_question_after = ignore # ignore/add/remove/force
-
-# In the abbreviated ternary form (a ?: b), add/remove space between ? and :.'. Overrides all other sp_cond_* options.
-sp_cond_ternary_short = ignore # ignore/add/remove/force
-
-# Fix the spacing between 'case' and the label. Only 'ignore' and 'force' make sense here.
-sp_case_label = ignore # ignore/add/remove/force
-
-# Control the space around the D '..' operator.
-sp_range = ignore # ignore/add/remove/force
-
-# Control the spacing after ':' in 'for (TYPE VAR : EXPR)'. Only JAVA.
-sp_after_for_colon = ignore # ignore/add/remove/force
-
-# Control the spacing before ':' in 'for (TYPE VAR : EXPR)'. Only JAVA.
-sp_before_for_colon = ignore # ignore/add/remove/force
-
-# Control the spacing in 'extern (C)' (D).
-sp_extern_paren = ignore # ignore/add/remove/force
-
-# Control the space after the opening of a C++ comment '// A' vs '//A'.
-sp_cmt_cpp_start = ignore # ignore/add/remove/force
-
-# True: If space is added with sp_cmt_cpp_start, do it after doxygen sequences like '///', '///<', '//!' and '//!<'.
-sp_cmt_cpp_doxygen = false # false/true
-
-# True: If space is added with sp_cmt_cpp_start, do it after Qt translator or meta-data comments like '//:', '//=', and '//~'.
-sp_cmt_cpp_qttr = false # false/true
-
-# Controls the spaces between #else or #endif and a trailing comment.
-sp_endif_cmt = ignore # ignore/add/remove/force
-
-# Controls the spaces after 'new', 'delete' and 'delete[]'.
-sp_after_new = ignore # ignore/add/remove/force
-
-# Controls the spaces between new and '(' in 'new()'.
-sp_between_new_paren = ignore # ignore/add/remove/force
-
-# Controls the spaces between ')' and 'type' in 'new(foo) BAR'.
-sp_after_newop_paren = ignore # ignore/add/remove/force
-
-# Controls the spaces inside paren of the new operator: 'new(foo) BAR'.
-sp_inside_newop_paren = ignore # ignore/add/remove/force
-
-# Controls the space after open paren of the new operator: 'new(foo) BAR'.
-# Overrides sp_inside_newop_paren.
-sp_inside_newop_paren_open = ignore # ignore/add/remove/force
-
-# Controls the space before close paren of the new operator: 'new(foo) BAR'.
-# Overrides sp_inside_newop_paren.
-sp_inside_newop_paren_close = ignore # ignore/add/remove/force
-
-# Controls the spaces before a trailing or embedded comment.
-sp_before_tr_emb_cmt = ignore # ignore/add/remove/force
-
-# Number of spaces before a trailing or embedded comment.
-sp_num_before_tr_emb_cmt = 0 # unsigned number
-
-# Control space between a Java annotation and the open paren.
-sp_annotation_paren = ignore # ignore/add/remove/force
-
-# If True, vbrace tokens are dropped to the previous token and skipped.
-sp_skip_vbrace_tokens = false # false/true
-
-# If True, a is inserted after #define.
-force_tab_after_define = false # false/true
-
-#
-# Indenting
-#
-
-# The number of columns to indent per level.
-# Usually 2, 3, 4, or 8. Default=8.
-indent_columns = 4 # unsigned number
-
-# The continuation indent. If non-zero, this overrides the indent of '(' and '=' continuation indents.
-# For FreeBSD, this is set to 4. Negative value is absolute and not increased for each '(' level.
-indent_continue = 0 # number
-
-# The continuation indent for func_*_param if they are true.
-# If non-zero, this overrides the indent.
-indent_param = 0 # unsigned number
-
-# How to use tabs when indenting code
-# 0=spaces only
-# 1=indent with tabs to brace level, align with spaces (default)
-# 2=indent and align with tabs, using spaces when not on a tabstop
-indent_with_tabs = 0 # unsigned number
-
-# Comments that are not a brace level are indented with tabs on a tabstop.
-# Requires indent_with_tabs=2. If false, will use spaces.
-indent_cmt_with_tabs = false # false/true
-
-# Whether to indent strings broken by '\' so that they line up.
-indent_align_string = false # false/true
-
-# The number of spaces to indent multi-line XML strings.
-# Requires indent_align_string=True.
-indent_xml_string = 0 # unsigned number
-
-# Spaces to indent '{' from level.
-indent_brace = 0 # unsigned number
-
-# Whether braces are indented to the body level.
-indent_braces = false # false/true
-
-# Disabled indenting function braces if indent_braces is True.
-indent_braces_no_func = false # false/true
-
-# Disabled indenting class braces if indent_braces is True.
-indent_braces_no_class = false # false/true
-
-# Disabled indenting struct braces if indent_braces is True.
-indent_braces_no_struct = false # false/true
-
-# Indent based on the size of the brace parent, i.e. 'if' => 3 spaces, 'for' => 4 spaces, etc.
-indent_brace_parent = false # false/true
-
-# Indent based on the paren open instead of the brace open in '({\n', default is to indent by brace.
-indent_paren_open_brace = false # false/true
-
-# indent a C# delegate by another level, default is to not indent by another level.
-indent_cs_delegate_brace = false # false/true
-
-# Whether the 'namespace' body is indented.
-indent_namespace = false # false/true
-
-# Only indent one namespace and no sub-namespaces.
-# Requires indent_namespace=True.
-indent_namespace_single_indent = false # false/true
-
-# The number of spaces to indent a namespace block.
-indent_namespace_level = 0 # unsigned number
-
-# If the body of the namespace is longer than this number, it won't be indented.
-# Requires indent_namespace=True. Default=0 (no limit)
-indent_namespace_limit = 0 # unsigned number
-
-# Whether the 'extern "C"' body is indented.
-indent_extern = false # false/true
-
-# Whether the 'class' body is indented.
-indent_class = false # false/true
-
-# Whether to indent the stuff after a leading base class colon.
-indent_class_colon = false # false/true
-
-# Indent based on a class colon instead of the stuff after the colon.
-# Requires indent_class_colon=True. Default=False.
-indent_class_on_colon = false # false/true
-
-# Whether to indent the stuff after a leading class initializer colon.
-indent_constr_colon = false # false/true
-
-# Virtual indent from the ':' for member initializers. Default=2.
-indent_ctor_init_leading = 2 # unsigned number
-
-# Additional indent for constructor initializer list.
-# Negative values decrease indent down to the first column. Default=0.
-indent_ctor_init = 0 # number
-
-# False=treat 'else\nif' as 'else if' for indenting purposes
-# True=indent the 'if' one level.
-indent_else_if = false # false/true
-
-# Amount to indent variable declarations after a open brace. neg=relative, pos=absolute.
-indent_var_def_blk = 0 # number
-
-# Indent continued variable declarations instead of aligning.
-indent_var_def_cont = false # false/true
-
-# Indent continued shift expressions ('<<' and '>>') instead of aligning.
-# Turn align_left_shift off when enabling this.
-indent_shift = false # false/true
-
-# True: force indentation of function definition to start in column 1
-# False: use the default behavior.
-indent_func_def_force_col1 = false # false/true
-
-# True: indent continued function call parameters one indent level
-# False: align parameters under the open paren.
-indent_func_call_param = false # false/true
-
-# Same as indent_func_call_param, but for function defs.
-indent_func_def_param = false # false/true
-
-# Same as indent_func_call_param, but for function protos.
-indent_func_proto_param = false # false/true
-
-# Same as indent_func_call_param, but for class declarations.
-indent_func_class_param = false # false/true
-
-# Same as indent_func_call_param, but for class variable constructors.
-indent_func_ctor_var_param = false # false/true
-
-# Same as indent_func_call_param, but for templates.
-indent_template_param = false # false/true
-
-# Double the indent for indent_func_xxx_param options.
-# Use both values of the options indent_columns and indent_param.
-indent_func_param_double = false # false/true
-
-# Indentation column for standalone 'const' function decl/proto qualifier.
-indent_func_const = 0 # unsigned number
-
-# Indentation column for standalone 'throw' function decl/proto qualifier.
-indent_func_throw = 0 # unsigned number
-
-# The number of spaces to indent a continued '->' or '.'
-# Usually set to 0, 1, or indent_columns.
-indent_member = 0 # unsigned number
-
-# Spaces to indent single line ('//') comments on lines before code.
-indent_sing_line_comments = 0 # unsigned number
-
-# If set, will indent trailing single line ('//') comments relative
-# to the code instead of trying to keep the same absolute column.
-indent_relative_single_line_comments = false # false/true
-
-# Spaces to indent 'case' from 'switch'
-# Usually 0 or indent_columns.
-indent_switch_case = 0 # unsigned number
-
-# Whether to indent preproccesor statements inside of switch statements.
-indent_switch_pp = true # false/true
-
-# Spaces to shift the 'case' line, without affecting any other lines
-# Usually 0.
-indent_case_shift = 0 # unsigned number
-
-# Spaces to indent '{' from 'case'.
-# By default, the brace will appear under the 'c' in case.
-# Usually set to 0 or indent_columns.
-# negative value are OK.
-indent_case_brace = 0 # number
-
-# Whether to indent comments found in first column.
-indent_col1_comment = false # false/true
-
-# How to indent goto labels
-# >0: absolute column where 1 is the leftmost column
-# <=0: subtract from brace indent
-# Default=1
-indent_label = 1 # number
-
-# Same as indent_label, but for access specifiers that are followed by a colon. Default=1
-indent_access_spec = 1 # number
-
-# Indent the code after an access specifier by one level.
-# If set, this option forces 'indent_access_spec=0'.
-indent_access_spec_body = false # false/true
-
-# If an open paren is followed by a newline, indent the next line so that it lines up after the open paren (not recommended).
-indent_paren_nl = false # false/true
-
-# Controls the indent of a close paren after a newline.
-# 0: Indent to body level
-# 1: Align under the open paren
-# 2: Indent to the brace level
-indent_paren_close = 0 # unsigned number
-
-# Controls the indent of the open paren of a function definition, if on it's own line.If True, indents the open paren
-indent_paren_after_func_def = false # false/true
-
-# Controls the indent of the open paren of a function declaration, if on it's own line.If True, indents the open paren
-indent_paren_after_func_decl = false # false/true
-
-# Controls the indent of the open paren of a function call, if on it's own line.If True, indents the open paren
-indent_paren_after_func_call = false # false/true
-
-# Controls the indent of a comma when inside a paren.If True, aligns under the open paren.
-indent_comma_paren = false # false/true
-
-# Controls the indent of a BOOL operator when inside a paren.If True, aligns under the open paren.
-indent_bool_paren = false # false/true
-
-# If 'indent_bool_paren' is True, controls the indent of the first expression. If True, aligns the first expression to the following ones.
-indent_first_bool_expr = false # false/true
-
-# If an open square is followed by a newline, indent the next line so that it lines up after the open square (not recommended).
-indent_square_nl = false # false/true
-
-# Don't change the relative indent of ESQL/C 'EXEC SQL' bodies.
-indent_preserve_sql = false # false/true
-
-# Align continued statements at the '='. Default=True
-# If False or the '=' is followed by a newline, the next line is indent one tab.
-indent_align_assign = true # false/true
-
-# Indent OC blocks at brace level instead of usual rules.
-indent_oc_block = false # false/true
-
-# Indent OC blocks in a message relative to the parameter name.
-# 0=use indent_oc_block rules, 1+=spaces to indent
-indent_oc_block_msg = 0 # unsigned number
-
-# Minimum indent for subsequent parameters
-indent_oc_msg_colon = 0 # unsigned number
-
-# If True, prioritize aligning with initial colon (and stripping spaces from lines, if necessary).
-# Default=True.
-indent_oc_msg_prioritize_first_colon = true # false/true
-
-# If indent_oc_block_msg and this option are on, blocks will be indented the way that Xcode does by default (from keyword if the parameter is on its own line; otherwise, from the previous indentation level).
-indent_oc_block_msg_xcode_style = false # false/true
-
-# If indent_oc_block_msg and this option are on, blocks will be indented from where the brace is relative to a msg keyword.
-indent_oc_block_msg_from_keyword = false # false/true
-
-# If indent_oc_block_msg and this option are on, blocks will be indented from where the brace is relative to a msg colon.
-indent_oc_block_msg_from_colon = false # false/true
-
-# If indent_oc_block_msg and this option are on, blocks will be indented from where the block caret is.
-indent_oc_block_msg_from_caret = false # false/true
-
-# If indent_oc_block_msg and this option are on, blocks will be indented from where the brace is.
-indent_oc_block_msg_from_brace = false # false/true
-
-# When identing after virtual brace open and newline add further spaces to reach this min. indent.
-indent_min_vbrace_open = 0 # unsigned number
-
-# True: When identing after virtual brace open and newline add further spaces after regular indent to reach next tabstop.
-indent_vbrace_open_on_tabstop = false # false/true
-
-# If True, a brace followed by another token (not a newline) will indent all contained lines to match the token.Default=True.
-indent_token_after_brace = true # false/true
-
-# If True, cpp lambda body will be indentedDefault=False.
-indent_cpp_lambda_body = false # false/true
-
-# indent (or not) an using block if no braces are used. Only for C#.Default=True.
-indent_using_block = true # false/true
-
-# indent the continuation of ternary operator.
-# 0: (Default) off
-# 1: When the `if_false` is a continuation, indent it under `if_false`
-# 2: When the `:` is a continuation, indent it under `?`
-indent_ternary_operator = 0 # unsigned number
-
-# If true, ignore indent and align for asm blocks as they have their own indentation.
-indent_ignore_asm_block = false # false/true
-
-#
-# Newline adding and removing options
-#
-
-# Whether to collapse empty blocks between '{' and '}'.
-nl_collapse_empty_body = false # false/true
-
-# Don't split one-line braced assignments - 'foo_t f = { 1, 2 };'.
-nl_assign_leave_one_liners = false # false/true
-
-# Don't split one-line braced statements inside a class xx { } body.
-nl_class_leave_one_liners = false # false/true
-
-# Don't split one-line enums: 'enum foo { BAR = 15 };'
-nl_enum_leave_one_liners = false # false/true
-
-# Don't split one-line get or set functions.
-nl_getset_leave_one_liners = false # false/true
-
-# Don't split one-line function definitions - 'int foo() { return 0; }'.
-nl_func_leave_one_liners = false # false/true
-
-# Don't split one-line C++11 lambdas - '[]() { return 0; }'.
-nl_cpp_lambda_leave_one_liners = false # false/true
-
-# Don't split one-line if/else statements - 'if(a) b++;'.
-nl_if_leave_one_liners = false # false/true
-
-# Don't split one-line while statements - 'while(a) b++;'.
-nl_while_leave_one_liners = false # false/true
-
-# Don't split one-line OC messages.
-nl_oc_msg_leave_one_liner = false # false/true
-
-# Add or remove newline between Objective-C block signature and '{'.
-nl_oc_block_brace = ignore # ignore/add/remove/force
-
-# Add or remove newlines at the start of the file.
-nl_start_of_file = ignore # ignore/add/remove/force
-
-# The number of newlines at the start of the file (only used if nl_start_of_file is 'add' or 'force'.
-nl_start_of_file_min = 0 # unsigned number
-
-# Add or remove newline at the end of the file.
-nl_end_of_file = ignore # ignore/add/remove/force
-
-# The number of newlines at the end of the file (only used if nl_end_of_file is 'add' or 'force').
-nl_end_of_file_min = 0 # unsigned number
-
-# Add or remove newline between '=' and '{'.
-nl_assign_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline between '=' and '[' (D only).
-nl_assign_square = ignore # ignore/add/remove/force
-
-# Add or remove newline after '= [' (D only). Will also affect the newline before the ']'.
-nl_after_square_assign = ignore # ignore/add/remove/force
-
-# The number of blank lines after a block of variable definitions at the top of a function body
-# 0 = No change (default).
-nl_func_var_def_blk = 0 # unsigned number
-
-# The number of newlines before a block of typedefs
-# 0 = No change (default)
-# is overridden by the option 'nl_after_access_spec'.
-nl_typedef_blk_start = 0 # unsigned number
-
-# The number of newlines after a block of typedefs
-# 0 = No change (default).
-nl_typedef_blk_end = 0 # unsigned number
-
-# The maximum consecutive newlines within a block of typedefs
-# 0 = No change (default).
-nl_typedef_blk_in = 0 # unsigned number
-
-# The number of newlines before a block of variable definitions not at the top of a function body
-# 0 = No change (default)
-# is overridden by the option 'nl_after_access_spec'.
-nl_var_def_blk_start = 0 # unsigned number
-
-# The number of newlines after a block of variable definitions not at the top of a function body
-# 0 = No change (default).
-nl_var_def_blk_end = 0 # unsigned number
-
-# The maximum consecutive newlines within a block of variable definitions
-# 0 = No change (default).
-nl_var_def_blk_in = 0 # unsigned number
-
-# Add or remove newline between a function call's ')' and '{', as in:
-# list_for_each(item, &list) { }.
-nl_fcall_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'enum' and '{'.
-nl_enum_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'enum' and 'class'.
-nl_enum_class = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'enum class' and the identifier.
-nl_enum_class_identifier = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'enum class' type and ':'.
-nl_enum_identifier_colon = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'enum class identifier :' and 'type' and/or 'type'.
-nl_enum_colon_type = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'struct and '{'.
-nl_struct_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'union' and '{'.
-nl_union_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'if' and '{'.
-nl_if_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline between '}' and 'else'.
-nl_brace_else = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'else if' and '{'
-# If set to ignore, nl_if_brace is used instead.
-nl_elseif_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'else' and '{'.
-nl_else_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'else' and 'if'.
-nl_else_if = ignore # ignore/add/remove/force
-
-# Add or remove newline before 'if'/'else if' closing parenthesis.
-nl_before_if_closing_paren = ignore # ignore/add/remove/force
-
-# Add or remove newline between '}' and 'finally'.
-nl_brace_finally = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'finally' and '{'.
-nl_finally_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'try' and '{'.
-nl_try_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline between get/set and '{'.
-nl_getset_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'for' and '{'.
-nl_for_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'catch' and '{'.
-nl_catch_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline between '}' and 'catch'.
-nl_brace_catch = ignore # ignore/add/remove/force
-
-# Add or remove newline between '}' and ']'.
-nl_brace_square = ignore # ignore/add/remove/force
-
-# Add or remove newline between '}' and ')' in a function invocation.
-nl_brace_fparen = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'while' and '{'.
-nl_while_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'scope (x)' and '{' (D).
-nl_scope_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'unittest' and '{' (D).
-nl_unittest_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'version (x)' and '{' (D).
-nl_version_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'using' and '{'.
-nl_using_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline between two open or close braces.
-# Due to general newline/brace handling, REMOVE may not work.
-nl_brace_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'do' and '{'.
-nl_do_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline between '}' and 'while' of 'do' statement.
-nl_brace_while = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'switch' and '{'.
-nl_switch_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'synchronized' and '{'.
-nl_synchronized_brace = ignore # ignore/add/remove/force
-
-# Add a newline between ')' and '{' if the ')' is on a different line than the if/for/etc.
-# Overrides nl_for_brace, nl_if_brace, nl_switch_brace, nl_while_switch and nl_catch_brace.
-nl_multi_line_cond = false # false/true
-
-# Force a newline in a define after the macro name for multi-line defines.
-nl_multi_line_define = false # false/true
-
-# Whether to put a newline before 'case' statement, not after the first 'case'.
-nl_before_case = false # false/true
-
-# Add or remove newline between ')' and 'throw'.
-nl_before_throw = ignore # ignore/add/remove/force
-
-# Whether to put a newline after 'case' statement.
-nl_after_case = false # false/true
-
-# Add or remove a newline between a case ':' and '{'. Overrides nl_after_case.
-nl_case_colon_brace = ignore # ignore/add/remove/force
-
-# Newline between namespace and {.
-nl_namespace_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'template<>' and whatever follows.
-nl_template_class = ignore # ignore/add/remove/force
-
-# Add or remove newline between 'class' and '{'.
-nl_class_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline before/after each ',' in the base class list,
-# (tied to pos_class_comma).
-nl_class_init_args = ignore # ignore/add/remove/force
-
-# Add or remove newline after each ',' in the constructor member initialization.
-# Related to nl_constr_colon, pos_constr_colon and pos_constr_comma.
-nl_constr_init_args = ignore # ignore/add/remove/force
-
-# Add or remove newline before first element, after comma, and after last element in enum.
-nl_enum_own_lines = ignore # ignore/add/remove/force
-
-# Add or remove newline between return type and function name in a function definition.
-nl_func_type_name = ignore # ignore/add/remove/force
-
-# Add or remove newline between return type and function name inside a class {}
-# Uses nl_func_type_name or nl_func_proto_type_name if set to ignore.
-nl_func_type_name_class = ignore # ignore/add/remove/force
-
-# Add or remove newline between class specification and '::' in 'void A::f() { }'
-# Only appears in separate member implementation (does not appear with in-line implmementation).
-nl_func_class_scope = ignore # ignore/add/remove/force
-
-# Add or remove newline between function scope and name
-# Controls the newline after '::' in 'void A::f() { }'.
-nl_func_scope_name = ignore # ignore/add/remove/force
-
-# Add or remove newline between return type and function name in a prototype.
-nl_func_proto_type_name = ignore # ignore/add/remove/force
-
-# Add or remove newline between a function name and the opening '(' in the declaration.
-nl_func_paren = ignore # ignore/add/remove/force
-
-# Overrides nl_func_paren for functions with no parameters.
-nl_func_paren_empty = ignore # ignore/add/remove/force
-
-# Add or remove newline between a function name and the opening '(' in the definition.
-nl_func_def_paren = ignore # ignore/add/remove/force
-
-# Overrides nl_func_def_paren for functions with no parameters.
-nl_func_def_paren_empty = ignore # ignore/add/remove/force
-
-# Add or remove newline between a function name and the opening '(' in the call
-nl_func_call_paren = ignore # ignore/add/remove/force
-
-# Overrides nl_func_call_paren for functions with no parameters.
-nl_func_call_paren_empty = ignore # ignore/add/remove/force
-
-# Add or remove newline after '(' in a function declaration.
-nl_func_decl_start = ignore # ignore/add/remove/force
-
-# Add or remove newline after '(' in a function definition.
-nl_func_def_start = ignore # ignore/add/remove/force
-
-# Overrides nl_func_decl_start when there is only one parameter.
-nl_func_decl_start_single = ignore # ignore/add/remove/force
-
-# Overrides nl_func_def_start when there is only one parameter.
-nl_func_def_start_single = ignore # ignore/add/remove/force
-
-# Whether to add newline after '(' in a function declaration if '(' and ')' are in different lines.
-nl_func_decl_start_multi_line = false # false/true
-
-# Whether to add newline after '(' in a function definition if '(' and ')' are in different lines.
-nl_func_def_start_multi_line = false # false/true
-
-# Add or remove newline after each ',' in a function declaration.
-nl_func_decl_args = ignore # ignore/add/remove/force
-
-# Add or remove newline after each ',' in a function definition.
-nl_func_def_args = ignore # ignore/add/remove/force
-
-# Whether to add newline after each ',' in a function declaration if '(' and ')' are in different lines.
-nl_func_decl_args_multi_line = false # false/true
-
-# Whether to add newline after each ',' in a function definition if '(' and ')' are in different lines.
-nl_func_def_args_multi_line = false # false/true
-
-# Add or remove newline before the ')' in a function declaration.
-nl_func_decl_end = ignore # ignore/add/remove/force
-
-# Add or remove newline before the ')' in a function definition.
-nl_func_def_end = ignore # ignore/add/remove/force
-
-# Overrides nl_func_decl_end when there is only one parameter.
-nl_func_decl_end_single = ignore # ignore/add/remove/force
-
-# Overrides nl_func_def_end when there is only one parameter.
-nl_func_def_end_single = ignore # ignore/add/remove/force
-
-# Whether to add newline before ')' in a function declaration if '(' and ')' are in different lines.
-nl_func_decl_end_multi_line = false # false/true
-
-# Whether to add newline before ')' in a function definition if '(' and ')' are in different lines.
-nl_func_def_end_multi_line = false # false/true
-
-# Add or remove newline between '()' in a function declaration.
-nl_func_decl_empty = ignore # ignore/add/remove/force
-
-# Add or remove newline between '()' in a function definition.
-nl_func_def_empty = ignore # ignore/add/remove/force
-
-# Add or remove newline between '()' in a function call.
-nl_func_call_empty = ignore # ignore/add/remove/force
-
-# Whether to add newline after '(' in a function call if '(' and ')' are in different lines.
-nl_func_call_start_multi_line = false # false/true
-
-# Whether to add newline after each ',' in a function call if '(' and ')' are in different lines.
-nl_func_call_args_multi_line = false # false/true
-
-# Whether to add newline before ')' in a function call if '(' and ')' are in different lines.
-nl_func_call_end_multi_line = false # false/true
-
-# Whether to put each OC message parameter on a separate line
-# See nl_oc_msg_leave_one_liner.
-nl_oc_msg_args = false # false/true
-
-# Add or remove newline between function signature and '{'.
-nl_fdef_brace = ignore # ignore/add/remove/force
-
-# Add or remove newline between C++11 lambda signature and '{'.
-nl_cpp_ldef_brace = ignore # ignore/add/remove/force
-
-# Add or remove a newline between the return keyword and return expression.
-nl_return_expr = ignore # ignore/add/remove/force
-
-# Whether to put a newline after semicolons, except in 'for' statements.
-nl_after_semicolon = false # false/true
-
-# Java: Control the newline between the ')' and '{{' of the double brace initializer.
-nl_paren_dbrace_open = ignore # ignore/add/remove/force
-
-# Whether to put a newline after the type in an unnamed temporary direct-list-initialization.
-nl_type_brace_init_lst = ignore # ignore/add/remove/force
-
-# Whether to put a newline after open brace in an unnamed temporary direct-list-initialization.
-nl_type_brace_init_lst_open = ignore # ignore/add/remove/force
-
-# Whether to put a newline before close brace in an unnamed temporary direct-list-initialization.
-nl_type_brace_init_lst_close = ignore # ignore/add/remove/force
-
-# Whether to put a newline after brace open.
-# This also adds a newline before the matching brace close.
-nl_after_brace_open = false # false/true
-
-# If nl_after_brace_open and nl_after_brace_open_cmt are True, a newline is
-# placed between the open brace and a trailing single-line comment.
-nl_after_brace_open_cmt = false # false/true
-
-# Whether to put a newline after a virtual brace open with a non-empty body.
-# These occur in un-braced if/while/do/for statement bodies.
-nl_after_vbrace_open = false # false/true
-
-# Whether to put a newline after a virtual brace open with an empty body.
-# These occur in un-braced if/while/do/for statement bodies.
-nl_after_vbrace_open_empty = false # false/true
-
-# Whether to put a newline after a brace close.
-# Does not apply if followed by a necessary ';'.
-nl_after_brace_close = false # false/true
-
-# Whether to put a newline after a virtual brace close.
-# Would add a newline before return in: 'if (foo) a++; return;'.
-nl_after_vbrace_close = false # false/true
-
-# Control the newline between the close brace and 'b' in: 'struct { int a; } b;'
-# Affects enums, unions and structures. If set to ignore, uses nl_after_brace_close.
-nl_brace_struct_var = ignore # ignore/add/remove/force
-
-# Whether to alter newlines in '#define' macros.
-nl_define_macro = false # false/true
-
-# Whether to remove blanks after '#ifxx' and '#elxx', or before '#elxx' and '#endif'. Does not affect top-level #ifdefs.
-nl_squeeze_ifdef = false # false/true
-
-# Makes the nl_squeeze_ifdef option affect the top-level #ifdefs as well.
-nl_squeeze_ifdef_top_level = false # false/true
-
-# Add or remove blank line before 'if'.
-nl_before_if = ignore # ignore/add/remove/force
-
-# Add or remove blank line after 'if' statement.
-# Add/Force work only if the next token is not a closing brace.
-nl_after_if = ignore # ignore/add/remove/force
-
-# Add or remove blank line before 'for'.
-nl_before_for = ignore # ignore/add/remove/force
-
-# Add or remove blank line after 'for' statement.
-nl_after_for = ignore # ignore/add/remove/force
-
-# Add or remove blank line before 'while'.
-nl_before_while = ignore # ignore/add/remove/force
-
-# Add or remove blank line after 'while' statement.
-nl_after_while = ignore # ignore/add/remove/force
-
-# Add or remove blank line before 'switch'.
-nl_before_switch = ignore # ignore/add/remove/force
-
-# Add or remove blank line after 'switch' statement.
-nl_after_switch = ignore # ignore/add/remove/force
-
-# Add or remove blank line before 'synchronized'.
-nl_before_synchronized = ignore # ignore/add/remove/force
-
-# Add or remove blank line after 'synchronized' statement.
-nl_after_synchronized = ignore # ignore/add/remove/force
-
-# Add or remove blank line before 'do'.
-nl_before_do = ignore # ignore/add/remove/force
-
-# Add or remove blank line after 'do/while' statement.
-nl_after_do = ignore # ignore/add/remove/force
-
-# Whether to double-space commented-entries in struct/union/enum.
-nl_ds_struct_enum_cmt = false # false/true
-
-# force nl before } of a struct/union/enum
-# (lower priority than 'eat_blanks_before_close_brace').
-nl_ds_struct_enum_close_brace = false # false/true
-
-# Add or remove blank line before 'func_class_def'.
-nl_before_func_class_def = 0 # unsigned number
-
-# Add or remove blank line before 'func_class_proto'.
-nl_before_func_class_proto = 0 # unsigned number
-
-# Add or remove a newline before/after a class colon,
-# (tied to pos_class_colon).
-nl_class_colon = ignore # ignore/add/remove/force
-
-# Add or remove a newline around a class constructor colon.
-# Related to nl_constr_init_args, pos_constr_colon and pos_constr_comma.
-nl_constr_colon = ignore # ignore/add/remove/force
-
-# Change simple unbraced if statements into a one-liner
-# 'if(b)\n i++;' => 'if(b) i++;'.
-nl_create_if_one_liner = false # false/true
-
-# Change simple unbraced for statements into a one-liner
-# 'for (i=0;i<5;i++)\n foo(i);' => 'for (i=0;i<5;i++) foo(i);'.
-nl_create_for_one_liner = false # false/true
-
-# Change simple unbraced while statements into a one-liner
-# 'while (i<5)\n foo(i++);' => 'while (i<5) foo(i++);'.
-nl_create_while_one_liner = false # false/true
-
-# Change a one-liner if statement into simple unbraced if
-# 'if(b) i++;' => 'if(b)\n i++;'.
-nl_split_if_one_liner = false # false/true
-
-# Change a one-liner for statement into simple unbraced for
-# 'for (i=0;<5;i++) foo(i);' => 'for (i=0;<5;i++)\n foo(i);'.
-nl_split_for_one_liner = false # false/true
-
-# Change a one-liner while statement into simple unbraced while
-# 'while (i<5) foo(i++);' => 'while (i<5)\n foo(i++);'.
-nl_split_while_one_liner = false # false/true
-
-#
-# Blank line options
-#
-
-# The maximum consecutive newlines (3 = 2 blank lines).
-nl_max = 0 # unsigned number
-
-# The maximum consecutive newlines in function.
-nl_max_blank_in_func = 0 # unsigned number
-
-# The number of newlines after a function prototype, if followed by another function prototype.
-nl_after_func_proto = 0 # unsigned number
-
-# The number of newlines after a function prototype, if not followed by another function prototype.
-nl_after_func_proto_group = 0 # unsigned number
-
-# The number of newlines after a function class prototype, if followed by another function class prototype.
-nl_after_func_class_proto = 0 # unsigned number
-
-# The number of newlines after a function class prototype, if not followed by another function class prototype.
-nl_after_func_class_proto_group = 0 # unsigned number
-
-# The number of newlines before a multi-line function def body.
-nl_before_func_body_def = 0 # unsigned number
-
-# The number of newlines before a multi-line function prototype body.
-nl_before_func_body_proto = 0 # unsigned number
-
-# The number of newlines after '}' of a multi-line function body.
-nl_after_func_body = 0 # unsigned number
-
-# The number of newlines after '}' of a multi-line function body in a class declaration.
-nl_after_func_body_class = 0 # unsigned number
-
-# The number of newlines after '}' of a single line function body.
-nl_after_func_body_one_liner = 0 # unsigned number
-
-# The minimum number of newlines before a multi-line comment.
-# Doesn't apply if after a brace open or another multi-line comment.
-nl_before_block_comment = 0 # unsigned number
-
-# The minimum number of newlines before a single-line C comment.
-# Doesn't apply if after a brace open or other single-line C comments.
-nl_before_c_comment = 0 # unsigned number
-
-# The minimum number of newlines before a CPP comment.
-# Doesn't apply if after a brace open or other CPP comments.
-nl_before_cpp_comment = 0 # unsigned number
-
-# Whether to force a newline after a multi-line comment.
-nl_after_multiline_comment = false # false/true
-
-# Whether to force a newline after a label's colon.
-nl_after_label_colon = false # false/true
-
-# The number of newlines after '}' or ';' of a struct/enum/union definition.
-nl_after_struct = 0 # unsigned number
-
-# The number of newlines before a class definition.
-nl_before_class = 0 # unsigned number
-
-# The number of newlines after '}' or ';' of a class definition.
-nl_after_class = 0 # unsigned number
-
-# The number of newlines before a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label.
-# Will not change the newline count if after a brace open.
-# 0 = No change.
-nl_before_access_spec = 0 # unsigned number
-
-# The number of newlines after a 'private:', 'public:', 'protected:', 'signals:' or 'slots:' label.
-# 0 = No change.
-# Overrides 'nl_typedef_blk_start' and 'nl_var_def_blk_start'.
-nl_after_access_spec = 0 # unsigned number
-
-# The number of newlines between a function def and the function comment.
-# 0 = No change.
-nl_comment_func_def = 0 # unsigned number
-
-# The number of newlines after a try-catch-finally block that isn't followed by a brace close.
-# 0 = No change.
-nl_after_try_catch_finally = 0 # unsigned number
-
-# The number of newlines before and after a property, indexer or event decl.
-# 0 = No change.
-nl_around_cs_property = 0 # unsigned number
-
-# The number of newlines between the get/set/add/remove handlers in C#.
-# 0 = No change.
-nl_between_get_set = 0 # unsigned number
-
-# Add or remove newline between C# property and the '{'.
-nl_property_brace = ignore # ignore/add/remove/force
-
-# Whether to remove blank lines after '{'.
-eat_blanks_after_open_brace = false # false/true
-
-# Whether to remove blank lines before '}'.
-eat_blanks_before_close_brace = false # false/true
-
-# How aggressively to remove extra newlines not in preproc.
-# 0: No change
-# 1: Remove most newlines not handled by other config
-# 2: Remove all newlines and reformat completely by config
-nl_remove_extra_newlines = 0 # unsigned number
-
-# Whether to put a blank line before 'return' statements, unless after an open brace.
-nl_before_return = false # false/true
-
-# Whether to put a blank line after 'return' statements, unless followed by a close brace.
-nl_after_return = false # false/true
-
-# Whether to put a newline after a Java annotation statement.
-# Only affects annotations that are after a newline.
-nl_after_annotation = ignore # ignore/add/remove/force
-
-# Controls the newline between two annotations.
-nl_between_annotation = ignore # ignore/add/remove/force
-
-#
-# Positioning options
-#
-
-# The position of arithmetic operators in wrapped expressions.
-pos_arith = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
-
-# The position of assignment in wrapped expressions.
-# Do not affect '=' followed by '{'.
-pos_assign = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
-
-# The position of boolean operators in wrapped expressions.
-pos_bool = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
-
-# The position of comparison operators in wrapped expressions.
-pos_compare = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
-
-# The position of conditional (b ? t : f) operators in wrapped expressions.
-pos_conditional = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
-
-# The position of the comma in wrapped expressions.
-pos_comma = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
-
-# The position of the comma in enum entries.
-pos_enum_comma = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
-
-# The position of the comma in the base class list if there are more than one line,
-# (tied to nl_class_init_args).
-pos_class_comma = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
-
-# The position of the comma in the constructor initialization list.
-# Related to nl_constr_colon, nl_constr_init_args and pos_constr_colon.
-pos_constr_comma = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
-
-# The position of trailing/leading class colon, between class and base class list
-# (tied to nl_class_colon).
-pos_class_colon = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
-
-# The position of colons between constructor and member initialization,
-# (tied to nl_constr_colon).
-# Related to nl_constr_colon, nl_constr_init_args and pos_constr_comma.
-pos_constr_colon = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
-
-#
-# Line Splitting options
-#
-
-# Try to limit code width to N number of columns
-code_width = 0 # unsigned number
-
-# Whether to fully split long 'for' statements at semi-colons.
-ls_for_split_full = false # false/true
-
-# Whether to fully split long function protos/calls at commas.
-ls_func_split_full = false # false/true
-
-# Whether to split lines as close to code_width as possible and ignore some groupings.
-ls_code_width = false # false/true
-
-#
-# Code alignment (not left column spaces/tabs)
-#
-
-# Whether to keep non-indenting tabs.
-align_keep_tabs = false # false/true
-
-# Whether to use tabs for aligning.
-align_with_tabs = false # false/true
-
-# Whether to bump out to the next tab when aligning.
-align_on_tabstop = false # false/true
-
-# Whether to right-align numbers.
-align_number_right = false # false/true
-
-# Whether to keep whitespace not required for alignment.
-align_keep_extra_space = false # false/true
-
-# Align variable definitions in prototypes and functions.
-align_func_params = false # false/true
-
-# The span for aligning parameter definitions in function on parameter name (0=don't align).
-align_func_params_span = 0 # unsigned number
-
-# The threshold for aligning function parameter definitions (0=no limit).
-align_func_params_thresh = 0 # unsigned number
-
-# The gap for aligning function parameter definitions.
-align_func_params_gap = 0 # unsigned number
-
-# Align parameters in single-line functions that have the same name.
-# The function names must already be aligned with each other.
-align_same_func_call_params = false # false/true
-
-# The span for aligning variable definitions (0=don't align)
-align_var_def_span = 0 # unsigned number
-
-# How to align the star in variable definitions.
-# 0=Part of the type 'void * foo;'
-# 1=Part of the variable 'void *foo;'
-# 2=Dangling 'void *foo;'
-align_var_def_star_style = 0 # unsigned number
-
-# How to align the '&' in variable definitions.
-# 0=Part of the type
-# 1=Part of the variable
-# 2=Dangling
-align_var_def_amp_style = 0 # unsigned number
-
-# The threshold for aligning variable definitions (0=no limit)
-align_var_def_thresh = 0 # unsigned number
-
-# The gap for aligning variable definitions.
-align_var_def_gap = 0 # unsigned number
-
-# Whether to align the colon in struct bit fields.
-align_var_def_colon = false # false/true
-
-# align variable defs gap for bit colons.
-align_var_def_colon_gap = 0 # unsigned number
-
-# Whether to align any attribute after the variable name.
-align_var_def_attribute = false # false/true
-
-# Whether to align inline struct/enum/union variable definitions.
-align_var_def_inline = false # false/true
-
-# The span for aligning on '=' in assignments (0=don't align)
-align_assign_span = 0 # unsigned number
-
-# The threshold for aligning on '=' in assignments (0=no limit)
-align_assign_thresh = 0 # unsigned number
-
-# The span for aligning on '=' in enums (0=don't align)
-align_enum_equ_span = 0 # unsigned number
-
-# The threshold for aligning on '=' in enums (0=no limit)
-align_enum_equ_thresh = 0 # unsigned number
-
-# The span for aligning class (0=don't align)
-align_var_class_span = 0 # unsigned number
-
-# The threshold for aligning class member definitions (0=no limit).
-align_var_class_thresh = 0 # unsigned number
-
-# The gap for aligning class member definitions.
-align_var_class_gap = 0 # unsigned number
-
-# The span for aligning struct/union (0=don't align)
-align_var_struct_span = 0 # unsigned number
-
-# The threshold for aligning struct/union member definitions (0=no limit)
-align_var_struct_thresh = 0 # unsigned number
-
-# The gap for aligning struct/union member definitions.
-align_var_struct_gap = 0 # unsigned number
-
-# The span for aligning struct initializer values (0=don't align)
-align_struct_init_span = 0 # unsigned number
-
-# The minimum space between the type and the synonym of a typedef.
-align_typedef_gap = 0 # unsigned number
-
-# The span for aligning single-line typedefs (0=don't align).
-align_typedef_span = 0 # unsigned number
-
-# How to align typedef'd functions with other typedefs
-# 0: Don't mix them at all
-# 1: align the open paren with the types
-# 2: align the function type name with the other type names
-align_typedef_func = 0 # unsigned number
-
-# Controls the positioning of the '*' in typedefs. Just try it.
-# 0: Align on typedef type, ignore '*'
-# 1: The '*' is part of type name: typedef int *pint;
-# 2: The '*' is part of the type, but dangling: typedef int *pint;
-align_typedef_star_style = 0 # unsigned number
-
-# Controls the positioning of the '&' in typedefs. Just try it.
-# 0: Align on typedef type, ignore '&'
-# 1: The '&' is part of type name: typedef int &pint;
-# 2: The '&' is part of the type, but dangling: typedef int &pint;
-align_typedef_amp_style = 0 # unsigned number
-
-# The span for aligning comments that end lines (0=don't align)
-align_right_cmt_span = 0 # unsigned number
-
-# If aligning comments, mix with comments after '}' and #endif with less than 3 spaces before the comment.
-align_right_cmt_mix = false # false/true
-
-# If a trailing comment is more than this number of columns away from the text it follows,
-# it will qualify for being aligned. This has to be > 0 to do anything.
-align_right_cmt_gap = 0 # unsigned number
-
-# Align trailing comment at or beyond column N; 'pulls in' comments as a bonus side effect (0=ignore)
-align_right_cmt_at_col = 0 # unsigned number
-
-# The span for aligning function prototypes (0=don't align).
-align_func_proto_span = 0 # unsigned number
-
-# Minimum gap between the return type and the function name.
-align_func_proto_gap = 0 # unsigned number
-
-# Align function protos on the 'operator' keyword instead of what follows.
-align_on_operator = false # false/true
-
-# Whether to mix aligning prototype and variable declarations.
-# If True, align_var_def_XXX options are used instead of align_func_proto_XXX options.
-align_mix_var_proto = false # false/true
-
-# Align single-line functions with function prototypes, uses align_func_proto_span.
-align_single_line_func = false # false/true
-
-# Aligning the open brace of single-line functions.
-# Requires align_single_line_func=True, uses align_func_proto_span.
-align_single_line_brace = false # false/true
-
-# Gap for align_single_line_brace.
-align_single_line_brace_gap = 0 # unsigned number
-
-# The span for aligning ObjC msg spec (0=don't align)
-align_oc_msg_spec_span = 0 # unsigned number
-
-# Whether to align macros wrapped with a backslash and a newline.
-# This will not work right if the macro contains a multi-line comment.
-align_nl_cont = false # false/true
-
-# # Align macro functions and variables together.
-align_pp_define_together = false # false/true
-
-# The minimum space between label and value of a preprocessor define.
-align_pp_define_gap = 0 # unsigned number
-
-# The span for aligning on '#define' bodies (0=don't align, other=number of lines including comments between blocks)
-align_pp_define_span = 0 # unsigned number
-
-# Align lines that start with '<<' with previous '<<'. Default=True.
-align_left_shift = true # false/true
-
-# Align text after asm volatile () colons.
-align_asm_colon = false # false/true
-
-# Span for aligning parameters in an Obj-C message call on the ':' (0=don't align)
-align_oc_msg_colon_span = 0 # unsigned number
-
-# If True, always align with the first parameter, even if it is too short.
-align_oc_msg_colon_first = false # false/true
-
-# Aligning parameters in an Obj-C '+' or '-' declaration on the ':'.
-align_oc_decl_colon = false # false/true
-
-#
-# Comment modifications
-#
-
-# Try to wrap comments at cmt_width columns
-cmt_width = 0 # unsigned number
-
-# Set the comment reflow mode (Default=0)
-# 0: no reflowing (apart from the line wrapping due to cmt_width)
-# 1: no touching at all
-# 2: full reflow
-cmt_reflow_mode = 0 # unsigned number
-
-# Whether to convert all tabs to spaces in comments. Default is to leave tabs inside comments alone, unless used for indenting.
-cmt_convert_tab_to_spaces = false # false/true
-
-# If False, disable all multi-line comment changes, including cmt_width. keyword substitution and leading chars.
-# Default=True.
-cmt_indent_multi = true # false/true
-
-# Whether to group c-comments that look like they are in a block.
-cmt_c_group = false # false/true
-
-# Whether to put an empty '/*' on the first line of the combined c-comment.
-cmt_c_nl_start = false # false/true
-
-# Whether to put a newline before the closing '*/' of the combined c-comment.
-cmt_c_nl_end = false # false/true
-
-# Whether to group cpp-comments that look like they are in a block.
-cmt_cpp_group = false # false/true
-
-# Whether to put an empty '/*' on the first line of the combined cpp-comment.
-cmt_cpp_nl_start = false # false/true
-
-# Whether to put a newline before the closing '*/' of the combined cpp-comment.
-cmt_cpp_nl_end = false # false/true
-
-# Whether to change cpp-comments into c-comments.
-cmt_cpp_to_c = false # false/true
-
-# Whether to put a star on subsequent comment lines.
-cmt_star_cont = false # false/true
-
-# The number of spaces to insert at the start of subsequent comment lines.
-cmt_sp_before_star_cont = 0 # unsigned number
-
-# The number of spaces to insert after the star on subsequent comment lines.
-cmt_sp_after_star_cont = 0 # number
-
-# For multi-line comments with a '*' lead, remove leading spaces if the first and last lines of
-# the comment are the same length. Default=True.
-cmt_multi_check_last = true # false/true
-
-# For multi-line comments with a '*' lead, remove leading spaces if the first and last lines of
-# the comment are the same length AND if the length is bigger as the first_len minimum. Default=4
-cmt_multi_first_len_minimum = 4 # unsigned number
-
-# The filename that contains text to insert at the head of a file if the file doesn't start with a C/C++ comment.
-# Will substitute $(filename) with the current file's name.
-cmt_insert_file_header = "" # string
-
-# The filename that contains text to insert at the end of a file if the file doesn't end with a C/C++ comment.
-# Will substitute $(filename) with the current file's name.
-cmt_insert_file_footer = "" # string
-
-# The filename that contains text to insert before a function implementation if the function isn't preceded with a C/C++ comment.
-# Will substitute $(function) with the function name and $(javaparam) with the javadoc @param and @return stuff.
-# Will also substitute $(fclass) with the class name: void CFoo::Bar() { ... }.
-cmt_insert_func_header = "" # string
-
-# The filename that contains text to insert before a class if the class isn't preceded with a C/C++ comment.
-# Will substitute $(class) with the class name.
-cmt_insert_class_header = "" # string
-
-# The filename that contains text to insert before a Obj-C message specification if the method isn't preceded with a C/C++ comment.
-# Will substitute $(message) with the function name and $(javaparam) with the javadoc @param and @return stuff.
-cmt_insert_oc_msg_header = "" # string
-
-# If a preprocessor is encountered when stepping backwards from a function name, then
-# this option decides whether the comment should be inserted.
-# Affects cmt_insert_oc_msg_header, cmt_insert_func_header and cmt_insert_class_header.
-cmt_insert_before_preproc = false # false/true
-
-# If a function is declared inline to a class definition, then
-# this option decides whether the comment should be inserted.
-# Affects cmt_insert_func_header.
-cmt_insert_before_inlines = true # false/true
-
-# If the function is a constructor/destructor, then
-# this option decides whether the comment should be inserted.
-# Affects cmt_insert_func_header.
-cmt_insert_before_ctor_dtor = false # false/true
-
-#
-# Code modifying options (non-whitespace)
-#
-
-# Add or remove braces on single-line 'do' statement.
-mod_full_brace_do = ignore # ignore/add/remove/force
-
-# Add or remove braces on single-line 'for' statement.
-mod_full_brace_for = ignore # ignore/add/remove/force
-
-# Add or remove braces on single-line function definitions. (Pawn).
-mod_full_brace_function = ignore # ignore/add/remove/force
-
-# Add or remove braces on single-line 'if' statement. Will not remove the braces if they contain an 'else'.
-mod_full_brace_if = ignore # ignore/add/remove/force
-
-# Make all if/elseif/else statements in a chain be braced or not. Overrides mod_full_brace_if.
-# If any must be braced, they are all braced. If all can be unbraced, then the braces are removed.
-mod_full_brace_if_chain = false # false/true
-
-# Make all if/elseif/else statements with at least one 'else' or 'else if' fully braced.
-# If mod_full_brace_if_chain is used together with this option, all if-else chains will get braces,
-# and simple 'if' statements will lose them (if possible).
-mod_full_brace_if_chain_only = false # false/true
-
-# Don't remove braces around statements that span N newlines
-mod_full_brace_nl = 0 # unsigned number
-
-# Blocks removal of braces if the parenthesis of if/for/while/.. span multiple lines.
-mod_full_brace_nl_block_rem_mlcond = false # false/true
-
-# Add or remove braces on single-line 'while' statement.
-mod_full_brace_while = ignore # ignore/add/remove/force
-
-# Add or remove braces on single-line 'using ()' statement.
-mod_full_brace_using = ignore # ignore/add/remove/force
-
-# Add or remove unnecessary paren on 'return' statement.
-mod_paren_on_return = ignore # ignore/add/remove/force
-
-# Whether to change optional semicolons to real semicolons.
-mod_pawn_semicolon = false # false/true
-
-# Add parens on 'while' and 'if' statement around bools.
-mod_full_paren_if_bool = false # false/true
-
-# Whether to remove superfluous semicolons.
-mod_remove_extra_semicolon = false # false/true
-
-# If a function body exceeds the specified number of newlines and doesn't have a comment after
-# the close brace, a comment will be added.
-mod_add_long_function_closebrace_comment = 0 # unsigned number
-
-# If a namespace body exceeds the specified number of newlines and doesn't have a comment after
-# the close brace, a comment will be added.
-mod_add_long_namespace_closebrace_comment = 0 # unsigned number
-
-# If a class body exceeds the specified number of newlines and doesn't have a comment after
-# the close brace, a comment will be added.
-mod_add_long_class_closebrace_comment = 0 # unsigned number
-
-# If a switch body exceeds the specified number of newlines and doesn't have a comment after
-# the close brace, a comment will be added.
-mod_add_long_switch_closebrace_comment = 0 # unsigned number
-
-# If an #ifdef body exceeds the specified number of newlines and doesn't have a comment after
-# the #endif, a comment will be added.
-mod_add_long_ifdef_endif_comment = 0 # unsigned number
-
-# If an #ifdef or #else body exceeds the specified number of newlines and doesn't have a comment after
-# the #else, a comment will be added.
-mod_add_long_ifdef_else_comment = 0 # unsigned number
-
-# If True, will sort consecutive single-line 'import' statements [Java, D].
-mod_sort_import = false # false/true
-
-# If True, will sort consecutive single-line 'using' statements [C#].
-mod_sort_using = false # false/true
-
-# If True, will sort consecutive single-line '#include' statements [C/C++] and '#import' statements [Obj-C]
-# This is generally a bad idea, as it may break your code.
-mod_sort_include = false # false/true
-
-# If True, it will move a 'break' that appears after a fully braced 'case' before the close brace.
-mod_move_case_break = false # false/true
-
-# Will add or remove the braces around a fully braced case statement.
-# Will only remove the braces if there are no variable declarations in the block.
-mod_case_brace = ignore # ignore/add/remove/force
-
-# If True, it will remove a void 'return;' that appears as the last statement in a function.
-mod_remove_empty_return = false # false/true
-
-# If True, it will organize the properties (Obj-C).
-mod_sort_oc_properties = false # false/true
-
-# Determines weight of class property modifier (Obj-C).
-mod_sort_oc_property_class_weight = 0 # number
-
-# Determines weight of atomic, nonatomic (Obj-C).
-mod_sort_oc_property_thread_safe_weight = 0 # number
-
-# Determines weight of readwrite (Obj-C).
-mod_sort_oc_property_readwrite_weight = 0 # number
-
-# Determines weight of reference type (retain, copy, assign, weak, strong) (Obj-C).
-mod_sort_oc_property_reference_weight = 0 # number
-
-# Determines weight of getter type (getter=) (Obj-C).
-mod_sort_oc_property_getter_weight = 0 # number
-
-# Determines weight of setter type (setter=) (Obj-C).
-mod_sort_oc_property_setter_weight = 0 # number
-
-# Determines weight of nullability type (nullable, nonnull, null_unspecified, null_resettable) (Obj-C).
-mod_sort_oc_property_nullability_weight = 0 # number
-
-#
-# Preprocessor options
-#
-
-# Control indent of preprocessors inside #if blocks at brace level 0 (file-level).
-pp_indent = ignore # ignore/add/remove/force
-
-# Whether to indent #if/#else/#endif at the brace level (True) or from column 1 (False).
-pp_indent_at_level = false # false/true
-
-# Specifies the number of columns to indent preprocessors per level at brace level 0 (file-level).
-# If pp_indent_at_level=False, specifies the number of columns to indent preprocessors per level at brace level > 0 (function-level).
-# Default=1.
-pp_indent_count = 1 # unsigned number
-
-# Add or remove space after # based on pp_level of #if blocks.
-pp_space = ignore # ignore/add/remove/force
-
-# Sets the number of spaces added with pp_space.
-pp_space_count = 0 # unsigned number
-
-# The indent for #region and #endregion in C# and '#pragma region' in C/C++.
-pp_indent_region = 0 # number
-
-# Whether to indent the code between #region and #endregion.
-pp_region_indent_code = false # false/true
-
-# If pp_indent_at_level=True, sets the indent for #if, #else and #endif when not at file-level.
-# 0: indent preprocessors using output_tab_size.
-# >0: column at which all preprocessors will be indented.
-pp_indent_if = 0 # number
-
-# Control whether to indent the code between #if, #else and #endif.
-pp_if_indent_code = false # false/true
-
-# Whether to indent '#define' at the brace level (True) or from column 1 (false).
-pp_define_at_level = false # false/true
-
-# Whether to ignore the '#define' body while formatting.
-pp_ignore_define_body = false # false/true
-
-# Whether to indent case statements between #if, #else, and #endif.
-# Only applies to the indent of the preprocesser that the case statements directly inside of.
-pp_indent_case = true # false/true
-
-# Whether to indent whole function definitions between #if, #else, and #endif.
-# Only applies to the indent of the preprocesser that the function definition is directly inside of.
-pp_indent_func_def = true # false/true
-
-# Whether to indent extern C blocks between #if, #else, and #endif.
-# Only applies to the indent of the preprocesser that the extern block is directly inside of.
-pp_indent_extern = true # false/true
-
-# Whether to indent braces directly inside #if, #else, and #endif.
-# Only applies to the indent of the preprocesser that the braces are directly inside of.
-pp_indent_brace = true # false/true
-
-#
-# Sort includes options
-#
-
-# The regex for include category with priority 0.
-include_category_0 = "" # string
-
-# The regex for include category with priority 1.
-include_category_1 = "" # string
-
-# The regex for include category with priority 2.
-include_category_2 = "" # string
-
-#
-# Use or Do not Use options
-#
-
-# True: indent_func_call_param will be used (default)
-# False: indent_func_call_param will NOT be used.
-use_indent_func_call_param = true # false/true
-
-# The value of the indentation for a continuation line is calculate differently if the line is:
-# a declaration :your case with QString fileName ...
-# an assignment :your case with pSettings = new QSettings( ...
-# At the second case the option value might be used twice:
-# at the assignment
-# at the function call (if present)
-# To prevent the double use of the option value, use this option with the value 'True'.
-# True: indent_continue will be used only once
-# False: indent_continue will be used every time (default).
-use_indent_continue_only_once = false # false/true
-
-# SIGNAL/SLOT Qt macros have special formatting options. See options_for_QT.cpp for details.
-# Default=True.
-use_options_overriding_for_qt_macros = true # false/true
-
-#
-# Warn levels - 1: error, 2: warning (default), 3: note
-#
-
-# Warning is given if doing tab-to-\t replacement and we have found one in a C# verbatim string literal.
-warn_level_tabs_found_in_verbatim_string_literals = 2 # unsigned number
-
-# Meaning of the settings:
-# Ignore - do not do any changes
-# Add - makes sure there is 1 or more space/brace/newline/etc
-# Force - makes sure there is exactly 1 space/brace/newline/etc,
-# behaves like Add in some contexts
-# Remove - removes space/brace/newline/etc
-#
-#
-# - Token(s) can be treated as specific type(s) with the 'set' option:
-# `set tokenType tokenString [tokenString...]`
-#
-# Example:
-# `set BOOL __AND__ __OR__`
-#
-# tokenTypes are defined in src/token_enum.h, use them without the
-# 'CT_' prefix: 'CT_BOOL' -> 'BOOL'
-#
-#
-# - Token(s) can be treated as type(s) with the 'type' option.
-# `type tokenString [tokenString...]`
-#
-# Example:
-# `type int c_uint_8 Rectangle`
-#
-# This can also be achieved with `set TYPE int c_uint_8 Rectangle`
-#
-#
-# To embed whitespace in tokenStrings use the '\' escape character, or quote
-# the tokenStrings. These quotes are supported: "'`
-#
-#
-# - Support for the auto detection of languages through the file ending can be
-# added using the 'file_ext' command.
-# `file_ext langType langString [langString..]`
-#
-# Example:
-# `file_ext CPP .ch .cxx .cpp.in`
-#
-# langTypes are defined in uncrusify_types.h in the lang_flag_e enum, use
-# them without the 'LANG_' prefix: 'LANG_CPP' -> 'CPP'
-#
-#
-# - Custom macro-based indentation can be set up using 'macro-open',
-# 'macro-else' and 'macro-close'.
-# `(macro-open | macro-else | macro-close) tokenString`
-#
-# Example:
-# `macro-open BEGIN_TEMPLATE_MESSAGE_MAP`
-# `macro-open BEGIN_MESSAGE_MAP`
-# `macro-close END_MESSAGE_MAP`
-#
-## option(s) with 'not default' value: 0
-#
diff --git a/lib/sbi/openapi/external/cJSON.c b/lib/sbi/openapi/external/cJSON.c
index 7b67dfbe8..873ca2c25 100644
--- a/lib/sbi/openapi/external/cJSON.c
+++ b/lib/sbi/openapi/external/cJSON.c
@@ -1,24 +1,24 @@
/*
- Copyright (c) 2009-2017 Dave Gamble and cJSON contributors
+ Copyright (c) 2009-2017 Dave Gamble and cJSON contributors
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
- */
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+*/
/* cJSON */
/* JSON parser in C. */
@@ -299,29 +299,29 @@ static cJSON_bool parse_number(cJSON * const item, parse_buffer * const input_bu
{
switch (buffer_at_offset(input_buffer)[i])
{
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case '+':
- case '-':
- case 'e':
- case 'E':
- number_c_string[i] = buffer_at_offset(input_buffer)[i];
- break;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ case '+':
+ case '-':
+ case 'e':
+ case 'E':
+ number_c_string[i] = buffer_at_offset(input_buffer)[i];
+ break;
- case '.':
- number_c_string[i] = decimal_point;
- break;
+ case '.':
+ number_c_string[i] = decimal_point;
+ break;
- default:
- goto loop_end;
+ default:
+ goto loop_end;
}
}
loop_end:
@@ -776,39 +776,39 @@ static cJSON_bool parse_string(cJSON * const item, parse_buffer * const input_bu
switch (input_pointer[1])
{
- case 'b':
- *output_pointer++ = '\b';
- break;
- case 'f':
- *output_pointer++ = '\f';
- break;
- case 'n':
- *output_pointer++ = '\n';
- break;
- case 'r':
- *output_pointer++ = '\r';
- break;
- case 't':
- *output_pointer++ = '\t';
- break;
- case '\"':
- case '\\':
- case '/':
- *output_pointer++ = input_pointer[1];
- break;
+ case 'b':
+ *output_pointer++ = '\b';
+ break;
+ case 'f':
+ *output_pointer++ = '\f';
+ break;
+ case 'n':
+ *output_pointer++ = '\n';
+ break;
+ case 'r':
+ *output_pointer++ = '\r';
+ break;
+ case 't':
+ *output_pointer++ = '\t';
+ break;
+ case '\"':
+ case '\\':
+ case '/':
+ *output_pointer++ = input_pointer[1];
+ break;
- /* UTF-16 literal */
- case 'u':
- sequence_length = utf16_literal_to_utf8(input_pointer, input_end, &output_pointer);
- if (sequence_length == 0)
- {
- /* failed to convert UTF16-literal to UTF-8 */
+ /* UTF-16 literal */
+ case 'u':
+ sequence_length = utf16_literal_to_utf8(input_pointer, input_end, &output_pointer);
+ if (sequence_length == 0)
+ {
+ /* failed to convert UTF16-literal to UTF-8 */
+ goto fail;
+ }
+ break;
+
+ default:
goto fail;
- }
- break;
-
- default:
- goto fail;
}
input_pointer += sequence_length;
}
@@ -872,23 +872,23 @@ static cJSON_bool print_string_ptr(const unsigned char * const input, printbuffe
{
switch (*input_pointer)
{
- case '\"':
- case '\\':
- case '\b':
- case '\f':
- case '\n':
- case '\r':
- case '\t':
- /* one character escape sequence */
- escape_characters++;
- break;
- default:
- if (*input_pointer < 32)
- {
- /* UTF-16 escape sequence uXXXX */
- escape_characters += 5;
- }
- break;
+ case '\"':
+ case '\\':
+ case '\b':
+ case '\f':
+ case '\n':
+ case '\r':
+ case '\t':
+ /* one character escape sequence */
+ escape_characters++;
+ break;
+ default:
+ if (*input_pointer < 32)
+ {
+ /* UTF-16 escape sequence uXXXX */
+ escape_characters += 5;
+ }
+ break;
}
}
output_length = (size_t)(input_pointer - input) + escape_characters;
@@ -926,32 +926,32 @@ static cJSON_bool print_string_ptr(const unsigned char * const input, printbuffe
*output_pointer++ = '\\';
switch (*input_pointer)
{
- case '\\':
- *output_pointer = '\\';
- break;
- case '\"':
- *output_pointer = '\"';
- break;
- case '\b':
- *output_pointer = 'b';
- break;
- case '\f':
- *output_pointer = 'f';
- break;
- case '\n':
- *output_pointer = 'n';
- break;
- case '\r':
- *output_pointer = 'r';
- break;
- case '\t':
- *output_pointer = 't';
- break;
- default:
- /* escape and print as unicode codepoint */
- sprintf((char*)output_pointer, "u%04x", *input_pointer);
- output_pointer += 4;
- break;
+ case '\\':
+ *output_pointer = '\\';
+ break;
+ case '\"':
+ *output_pointer = '\"';
+ break;
+ case '\b':
+ *output_pointer = 'b';
+ break;
+ case '\f':
+ *output_pointer = 'f';
+ break;
+ case '\n':
+ *output_pointer = 'n';
+ break;
+ case '\r':
+ *output_pointer = 'r';
+ break;
+ case '\t':
+ *output_pointer = 't';
+ break;
+ default:
+ /* escape and print as unicode codepoint */
+ sprintf((char*)output_pointer, "u%04x", *input_pointer);
+ output_pointer += 4;
+ break;
}
}
}
@@ -985,7 +985,7 @@ static parse_buffer *buffer_skip_whitespace(parse_buffer * const buffer)
while (can_access_at_index(buffer, 0) && (buffer_at_offset(buffer)[0] <= 32))
{
- buffer->offset++;
+ buffer->offset++;
}
if (buffer->offset == buffer->length)
@@ -1291,65 +1291,65 @@ static cJSON_bool print_value(const cJSON * const item, printbuffer * const outp
switch ((item->type) & 0xFF)
{
- case cJSON_NULL:
- output = ensure(output_buffer, 5);
- if (output == NULL)
- {
- return false;
- }
- strcpy((char*)output, "null");
- return true;
+ case cJSON_NULL:
+ output = ensure(output_buffer, 5);
+ if (output == NULL)
+ {
+ return false;
+ }
+ strcpy((char*)output, "null");
+ return true;
- case cJSON_False:
- output = ensure(output_buffer, 6);
- if (output == NULL)
- {
- return false;
- }
- strcpy((char*)output, "false");
- return true;
+ case cJSON_False:
+ output = ensure(output_buffer, 6);
+ if (output == NULL)
+ {
+ return false;
+ }
+ strcpy((char*)output, "false");
+ return true;
- case cJSON_True:
- output = ensure(output_buffer, 5);
- if (output == NULL)
- {
- return false;
- }
- strcpy((char*)output, "true");
- return true;
+ case cJSON_True:
+ output = ensure(output_buffer, 5);
+ if (output == NULL)
+ {
+ return false;
+ }
+ strcpy((char*)output, "true");
+ return true;
- case cJSON_Number:
- return print_number(item, output_buffer);
+ case cJSON_Number:
+ return print_number(item, output_buffer);
- case cJSON_Raw:
- {
- size_t raw_length = 0;
- if (item->valuestring == NULL)
+ case cJSON_Raw:
{
- return false;
+ size_t raw_length = 0;
+ if (item->valuestring == NULL)
+ {
+ return false;
+ }
+
+ raw_length = strlen(item->valuestring) + sizeof("");
+ output = ensure(output_buffer, raw_length);
+ if (output == NULL)
+ {
+ return false;
+ }
+ memcpy(output, item->valuestring, raw_length);
+ return true;
}
- raw_length = strlen(item->valuestring) + sizeof("");
- output = ensure(output_buffer, raw_length);
- if (output == NULL)
- {
+ case cJSON_String:
+ return print_string(item, output_buffer);
+
+ case cJSON_Array:
+ return print_array(item, output_buffer);
+
+ case cJSON_Object:
+ return print_object(item, output_buffer);
+
+ default:
return false;
- }
- memcpy(output, item->valuestring, raw_length);
- return true;
- }
-
- case cJSON_String:
- return print_string(item, output_buffer);
-
- case cJSON_Array:
- return print_array(item, output_buffer);
-
- case cJSON_Object:
- return print_object(item, output_buffer);
-
- default:
- return false;
}
}
@@ -2504,7 +2504,7 @@ CJSON_PUBLIC(cJSON *) cJSON_CreateDoubleArray(const double *numbers, int count)
a = cJSON_CreateArray();
- for(i = 0; a && (i < (size_t)count); i++)
+ for(i = 0;a && (i < (size_t)count); i++)
{
n = cJSON_CreateNumber(numbers[i]);
if(!n)
@@ -2822,18 +2822,18 @@ CJSON_PUBLIC(cJSON_bool) cJSON_Compare(const cJSON * const a, const cJSON * cons
/* check if type is valid */
switch (a->type & 0xFF)
{
- case cJSON_False:
- case cJSON_True:
- case cJSON_NULL:
- case cJSON_Number:
- case cJSON_String:
- case cJSON_Raw:
- case cJSON_Array:
- case cJSON_Object:
- break;
+ case cJSON_False:
+ case cJSON_True:
+ case cJSON_NULL:
+ case cJSON_Number:
+ case cJSON_String:
+ case cJSON_Raw:
+ case cJSON_Array:
+ case cJSON_Object:
+ break;
- default:
- return false;
+ default:
+ return false;
}
/* identical objects are equal */
@@ -2844,96 +2844,96 @@ CJSON_PUBLIC(cJSON_bool) cJSON_Compare(const cJSON * const a, const cJSON * cons
switch (a->type & 0xFF)
{
- /* in these cases and equal type is enough */
- case cJSON_False:
- case cJSON_True:
- case cJSON_NULL:
- return true;
-
- case cJSON_Number:
- if (a->valuedouble == b->valuedouble)
- {
+ /* in these cases and equal type is enough */
+ case cJSON_False:
+ case cJSON_True:
+ case cJSON_NULL:
return true;
- }
- return false;
- case cJSON_String:
- case cJSON_Raw:
- if ((a->valuestring == NULL) || (b->valuestring == NULL))
- {
+ case cJSON_Number:
+ if (a->valuedouble == b->valuedouble)
+ {
+ return true;
+ }
return false;
- }
- if (strcmp(a->valuestring, b->valuestring) == 0)
+
+ case cJSON_String:
+ case cJSON_Raw:
+ if ((a->valuestring == NULL) || (b->valuestring == NULL))
+ {
+ return false;
+ }
+ if (strcmp(a->valuestring, b->valuestring) == 0)
+ {
+ return true;
+ }
+
+ return false;
+
+ case cJSON_Array:
{
+ cJSON *a_element = a->child;
+ cJSON *b_element = b->child;
+
+ for (; (a_element != NULL) && (b_element != NULL);)
+ {
+ if (!cJSON_Compare(a_element, b_element, case_sensitive))
+ {
+ return false;
+ }
+
+ a_element = a_element->next;
+ b_element = b_element->next;
+ }
+
+ /* one of the arrays is longer than the other */
+ if (a_element != b_element) {
+ return false;
+ }
+
return true;
}
- return false;
-
- case cJSON_Array:
- {
- cJSON *a_element = a->child;
- cJSON *b_element = b->child;
-
- for (; (a_element != NULL) && (b_element != NULL);)
+ case cJSON_Object:
{
- if (!cJSON_Compare(a_element, b_element, case_sensitive))
+ cJSON *a_element = NULL;
+ cJSON *b_element = NULL;
+ cJSON_ArrayForEach(a_element, a)
{
- return false;
+ /* TODO This has O(n^2) runtime, which is horrible! */
+ b_element = get_object_item(b, a_element->string, case_sensitive);
+ if (b_element == NULL)
+ {
+ return false;
+ }
+
+ if (!cJSON_Compare(a_element, b_element, case_sensitive))
+ {
+ return false;
+ }
}
- a_element = a_element->next;
- b_element = b_element->next;
+ /* doing this twice, once on a and b to prevent true comparison if a subset of b
+ * TODO: Do this the proper way, this is just a fix for now */
+ cJSON_ArrayForEach(b_element, b)
+ {
+ a_element = get_object_item(a, b_element->string, case_sensitive);
+ if (a_element == NULL)
+ {
+ return false;
+ }
+
+ if (!cJSON_Compare(b_element, a_element, case_sensitive))
+ {
+ return false;
+ }
+ }
+
+ return true;
}
- /* one of the arrays is longer than the other */
- if (a_element != b_element) {
+ default:
return false;
- }
-
- return true;
- }
-
- case cJSON_Object:
- {
- cJSON *a_element = NULL;
- cJSON *b_element = NULL;
- cJSON_ArrayForEach(a_element, a)
- {
- /* TODO This has O(n^2) runtime, which is horrible! */
- b_element = get_object_item(b, a_element->string, case_sensitive);
- if (b_element == NULL)
- {
- return false;
- }
-
- if (!cJSON_Compare(a_element, b_element, case_sensitive))
- {
- return false;
- }
- }
-
- /* doing this twice, once on a and b to prevent true comparison if a subset of b
- * TODO: Do this the proper way, this is just a fix for now */
- cJSON_ArrayForEach(b_element, b)
- {
- a_element = get_object_item(a, b_element->string, case_sensitive);
- if (a_element == NULL)
- {
- return false;
- }
-
- if (!cJSON_Compare(b_element, a_element, case_sensitive))
- {
- return false;
- }
- }
-
- return true;
- }
-
- default:
- return false;
}
}
diff --git a/lib/sbi/openapi/external/cJSON.h b/lib/sbi/openapi/external/cJSON.h
index b1592c640..6e0bde932 100644
--- a/lib/sbi/openapi/external/cJSON.h
+++ b/lib/sbi/openapi/external/cJSON.h
@@ -1,24 +1,24 @@
/*
- Copyright (c) 2009-2017 Dave Gamble and cJSON contributors
+ Copyright (c) 2009-2017 Dave Gamble and cJSON contributors
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
- */
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+*/
#ifndef cJSON__h
#define cJSON__h
@@ -74,8 +74,8 @@ typedef struct cJSON
typedef struct cJSON_Hooks
{
- void *(*malloc_fn)(size_t sz);
- void (*free_fn)(void *ptr);
+ void *(*malloc_fn)(size_t sz);
+ void (*free_fn)(void *ptr);
} cJSON_Hooks;
typedef int cJSON_bool;
@@ -87,21 +87,21 @@ typedef int cJSON_bool;
/* When compiling for windows, we specify a specific calling convention to avoid issues where we are being called from a project with a different default calling convention. For windows you have 2 define options:
- CJSON_HIDE_SYMBOLS - Define this in the case where you don't want to ever dllexport symbols
- CJSON_EXPORT_SYMBOLS - Define this on library build when you want to dllexport symbols (default)
- CJSON_IMPORT_SYMBOLS - Define this if you want to dllimport symbol
+CJSON_HIDE_SYMBOLS - Define this in the case where you don't want to ever dllexport symbols
+CJSON_EXPORT_SYMBOLS - Define this on library build when you want to dllexport symbols (default)
+CJSON_IMPORT_SYMBOLS - Define this if you want to dllimport symbol
- For *nix builds that support visibility attribute, you can define similar behavior by
+For *nix builds that support visibility attribute, you can define similar behavior by
- setting default visibility to hidden by adding
- -fvisibility=hidden (for gcc)
- or
- -xldscope=hidden (for sun cc)
- to CFLAGS
+setting default visibility to hidden by adding
+-fvisibility=hidden (for gcc)
+or
+-xldscope=hidden (for sun cc)
+to CFLAGS
- then using the CJSON_API_VISIBILITY flag to "export" the same symbols the way CJSON_EXPORT_SYMBOLS does
+then using the CJSON_API_VISIBILITY flag to "export" the same symbols the way CJSON_EXPORT_SYMBOLS does
- */
+*/
/* export symbols by default, this is necessary for copy pasting the C and header file */
#if !defined(CJSON_HIDE_SYMBOLS) && !defined(CJSON_IMPORT_SYMBOLS) && !defined(CJSON_EXPORT_SYMBOLS)
@@ -236,8 +236,8 @@ CJSON_PUBLIC(void) cJSON_ReplaceItemInObjectCaseSensitive(cJSON *object,const ch
/* Duplicate a cJSON item */
CJSON_PUBLIC(cJSON *) cJSON_Duplicate(const cJSON *item, cJSON_bool recurse);
/* Duplicate will create a new, identical cJSON item to the one you pass, in new memory that will
- need to be released. With recurse!=0, it will duplicate any children connected to the item.
- The item->next and ->prev pointers are always zero on return from Duplicate. */
+need to be released. With recurse!=0, it will duplicate any children connected to the item.
+The item->next and ->prev pointers are always zero on return from Duplicate. */
/* Recursively compare two cJSON items for equality. If either a or b is NULL or invalid, they will be considered unequal.
* case_sensitive determines if object keys are treated case sensitive (1) or case insensitive (0) */
CJSON_PUBLIC(cJSON_bool) cJSON_Compare(const cJSON * const a, const cJSON * const b, const cJSON_bool case_sensitive);
diff --git a/lib/sbi/openapi/include/binary.h b/lib/sbi/openapi/include/binary.h
index 55a06f3a1..5f8a2f4d5 100644
--- a/lib/sbi/openapi/include/binary.h
+++ b/lib/sbi/openapi/include/binary.h
@@ -15,10 +15,10 @@ typedef struct OpenAPI_binary_s {
OpenAPI_binary_t *OpenAPI_instantiate_binary_t(char *data, int len);
char *OpenAPI_base64encode(const void *b64_encode_this,
- int encode_this_many_bytes);
+ int encode_this_many_bytes);
char *OpenAPI_base64decode(const void *b64_decode_this,
- int decode_this_many_bytes, int *decoded_bytes);
+ int decode_this_many_bytes, int *decoded_bytes);
#ifdef __cplusplus
}
diff --git a/lib/sbi/openapi/include/list.h b/lib/sbi/openapi/include/list.h
index 82092be16..986693358 100644
--- a/lib/sbi/openapi/include/list.h
+++ b/lib/sbi/openapi/include/list.h
@@ -38,15 +38,18 @@ void OpenAPI_list_remove(
OpenAPI_list_t *list, OpenAPI_lnode_t *elementToRemove);
void OpenAPI_list_iterate_forward(OpenAPI_list_t *list,
- void (*operationToPerform)(OpenAPI_lnode_t*, void*),
- void *additionalDataNeededForCallbackFunction);
+ void (*operationToPerform)(OpenAPI_lnode_t*, void*),
+ void *additionalDataNeededForCallbackFunction);
void OpenAPI_list_iterate_backward(OpenAPI_list_t *list,
- void (*operationToPerform)(OpenAPI_lnode_t*, void*),
- void *additionalDataNeededForCallbackFunction);
+ void (*operationToPerform)(OpenAPI_lnode_t*, void*),
+ void *additionalDataNeededForCallbackFunction);
void OpenAPI_lnode_print(OpenAPI_lnode_t *listEntry, void *additionalData);
void OpenAPI_lnode_free(OpenAPI_lnode_t *listEntry, void *additionalData);
+char *OpenAPI_findStrInStrList(OpenAPI_list_t *strList, const char *str);
+void OpenAPI_clear_and_free_string_list(OpenAPI_list_t *list);
+
#ifdef __cplusplus
}
#endif
diff --git a/lib/sbi/openapi/meson.build b/lib/sbi/openapi/meson.build
index 6e31cd6a9..5d1cfedc6 100644
--- a/lib/sbi/openapi/meson.build
+++ b/lib/sbi/openapi/meson.build
@@ -21,16 +21,26 @@ libsbi_openapi_sources = files('''
src/binary.c
external/cJSON.c
+ model/acceptable_service_info.c
model/access_and_mobility_data.c
+ model/access_and_mobility_subscription_data_1.c
model/access_and_mobility_subscription_data.c
+ model/access_net_charging_identifier.c
model/access_network_id.c
+ model/access_right_status_any_of.c
model/access_right_status.c
+ model/access_tech_any_of.c
model/access_tech.c
+ model/access_token_err.c
+ model/access_token_req.c
model/access_type.c
+ model/access_type_rm.c
model/acc_net_charging_address.c
model/acc_net_ch_id.c
+ model/accumulated_usage.c
model/accu_usage_report.c
model/acknowledge_info.c
+ model/acs_info_1.c
model/acs_info.c
model/acs_info_rm.c
model/additional_access_info.c
@@ -38,11 +48,19 @@ libsbi_openapi_sources = files('''
model/additional_snssai_data.c
model/af_event.c
model/af_event_exposure_data.c
+ model/af_event_notification.c
+ model/af_event_subscription.c
model/af_external.c
+ model/af_notif_method.c
+ model/af_requested_data.c
+ model/af_routing_requirement.c
+ model/af_routing_requirement_rm.c
model/af_sig_protocol.c
+ model/allowed_mtc_provider_info.c
model/allowed_nssai.c
model/allowed_snssai.c
model/alternative_qos_profile.c
+ model/ambr_1.c
model/ambr.c
model/ambr_rm.c
model/amf3_gpp_access_registration.c
@@ -52,8 +70,11 @@ libsbi_openapi_sources = files('''
model/amf_event_area.c
model/amf_event.c
model/amf_event_mode.c
+ model/amf_event_subscription_add_info.c
model/amf_event_subscription.c
+ model/amf_event_trigger_any_of.c
model/amf_event_trigger.c
+ model/amf_event_type_any_of.c
model/amf_event_type.c
model/amf_info.c
model/amf_non3_gpp_access_registration.c
@@ -71,16 +92,25 @@ libsbi_openapi_sources = files('''
model/application_data_change_notif.c
model/application_data_subs.c
model/app_port_id.c
+ model/app_session_context.c
+ model/app_session_context_req_data.c
+ model/app_session_context_resp_data.c
+ model/app_session_context_update_data.c
+ model/app_session_context_update_data_patch.c
+ model/area_1.c
model/area.c
model/area_of_validity.c
model/area_scope.c
+ model/arp_1.c
model/arp.c
model/assign_ebi_data.c
model/assign_ebi_error.c
model/assign_ebi_failed.c
model/assigned_ebi_data.c
+ model/association_type_any_of.c
model/association_type.c
model/atom.c
+ model/atsss_capability_any_of.c
model/atsss_capability.c
model/ausf_info.c
model/authentication_info.c
@@ -94,9 +124,10 @@ libsbi_openapi_sources = files('''
model/authorized_default_qos.c
model/authorized_network_slice_info.c
model/auth_result.c
+ model/auth_status.c
model/auth_type.c
model/av5g_aka.c
- model/av5_g_he_aka.c
+ model/av5_ghe_aka.c
model/av_eap_aka_prime.c
model/av_eps_aka.c
model/av_ims_gba_eap_aka.c
@@ -105,23 +136,32 @@ libsbi_openapi_sources = files('''
model/battery_indication.c
model/battery_indication_rm.c
model/bdt_data.c
+ model/bdt_data_patch.c
model/bdt_policy_data.c
model/bdt_policy_data_patch.c
+ model/bdt_policy_status_any_of.c
+ model/bdt_policy_status.c
+ model/binding_level.c
+ model/binding_resp.c
+ model/bridge_management_container.c
model/bsf_info.c
model/cag_ack_data.c
+ model/cag_data_1.c
model/cag_data.c
+ model/cag_info_1.c
model/cag_info.c
model/candidate_for_replacement.c
model/cause.c
+ model/ce_mode_b_ind.c
model/change_item.c
model/change_type.c
model/charging_data.c
model/charging_information.c
model/chf_info.c
- model/chf_service_info.c
model/ciphering_algorithm.c
model/civic_address.c
model/cm_info.c
+ model/cm_state_any_of.c
model/cm_state.c
model/cn_assisted_ran_para.c
model/cnf.c
@@ -133,8 +173,6 @@ libsbi_openapi_sources = files('''
model/complex_query.c
model/condition_data.c
model/condition_event_type.c
- model/configuration_parameters_eutra.c
- model/configuration_parameters_nr.c
model/configured_snssai.c
model/confirmation_data.c
model/confirmation_data_response.c
@@ -145,6 +183,7 @@ libsbi_openapi_sources = files('''
model/credit_management_status.c
model/data_change_notify.c
model/data_filter.c
+ model/data_ind_any_of.c
model/data_ind.c
model/datalink_reporting_configuration.c
model/data_set_id.c
@@ -153,71 +192,101 @@ libsbi_openapi_sources = files('''
model/ddn_failure_sub_info.c
model/ddn_failure_subs.c
model/default_notification_subscription.c
+ model/default_unrelated_class_1.c
model/default_unrelated_class.c
model/deregistration_data.c
+ model/deregistration_info.c
model/deregistration_reason.c
model/dl_data_delivery_status.c
model/dnai_change_type.c
model/dnai_information.c
model/dnf.c
model/dnf_unit.c
+ model/dnn_configuration_1.c
model/dnn_configuration.c
model/dnn_info.c
model/dnn_route_selection_descriptor.c
model/dnn_selection_mode.c
model/dnn_smf_info_item.c
model/dnn_upf_info_item.c
+ model/domain_name_protocol_any_of.c
model/domain_name_protocol.c
+ model/downlink_data_notification_control.c
+ model/downlink_data_notification_control_rm.c
model/dynamic5_qi.c
model/eap_session.c
model/ebi_arp_mapping.c
+ model/ecgi_1.c
model/ecgi.c
model/ec_restriction.c
model/ec_restriction_data_wb.c
+ model/edrx_parameters_1.c
model/edrx_parameters.c
+ model/ee_group_profile_data.c
model/ee_profile_data.c
model/ee_subscription.c
model/ellipsoid_arc_all_of.c
model/ellipsoid_arc.c
+ model/emergency_info_1.c
model/emergency_info.c
model/enhanced_coverage_restriction_data.c
model/eps_bearer_info.c
model/eps_interworking_indication.c
model/eps_interworking_info.c
model/eps_iwk_pgw.c
+ model/eps_nas_ciphering_algorithm.c
+ model/eps_nas_integrity_algorithm.c
+ model/eps_nas_security_mode.c
model/eps_pdn_cnx_info.c
model/error_report.c
model/eth_flow_description.c
model/eutra_location.c
model/event_for_mdt.c
+ model/event_id_any_of.c
model/event_id.c
+ model/event_report_mode_any_of.c
model/event_report_mode.c
+ model/events_notification.c
+ model/events_subsc_put_data.c
+ model/events_subsc_req_data.c
+ model/events_subsc_req_data_rm.c
+ model/event_type_any_of.c
model/event_type.c
model/exemption_ind.c
model/expected_ue_behavior.c
model/expected_ue_behaviour.c
+ model/expected_ue_behaviour_data_1.c
model/expected_ue_behaviour_data.c
model/exposure_data_change_notification.c
model/exposure_data_subscription.c
+ model/ext_amf_event_subscription.c
+ model/extended_problem_details_all_of.c
+ model/extended_problem_details.c
+ model/external_client_type_any_of.c
model/external_client_type.c
model/external_unrelated_class.c
model/ext_problem_details.c
model/ext_snssai.c
model/failure_cause.c
model/failure_code.c
+ model/final_unit_action_any_of.c
model/final_unit_action.c
model/flow_direction.c
model/flow_info.c
model/flow_information.c
+ model/flows.c
model/flow_status.c
+ model/flow_usage.c
+ model/frame_route_info_1.c
model/frame_route_info.c
model/gad_shape.c
model/gbr_qos_flow_information.c
model/geographical_coordinates.c
model/geographic_area.c
+ model/global_ran_node_id_1.c
model/global_ran_node_id.c
model/gmlc_info.c
- model/g_nb_id.c
+ model/gnb_id.c
model/group_identifiers.c
model/guami.c
model/guami_list_cond.c
@@ -236,6 +305,7 @@ libsbi_openapi_sources = files('''
model/identity_data.c
model/identity_range.c
model/id_translation_result.c
+ model/immediate_mdt_conf.c
model/imsi_range.c
model/ims_vo_ps.c
model/indirect_data_forwarding_tunnel_info.c
@@ -247,12 +317,16 @@ libsbi_openapi_sources = files('''
model/inline_response_200.c
model/integrity_algorithm.c
model/interface_upf_info_item.c
+ model/inter_freq_target_info_1.c
model/inter_freq_target_info.c
model/internal_group_id_range.c
+ model/invalid_param_1.c
model/invalid_param.c
+ model/ip_address_1.c
model/ip_address.c
model/ip_end_point.c
model/ip_multicast_address_info.c
+ model/ip_reachability.c
model/ip_sm_gw_registration.c
model/iptv_config_data.c
model/iptv_config_data_patch.c
@@ -262,6 +336,7 @@ libsbi_openapi_sources = files('''
model/key_amf.c
model/key_amf_type.c
model/ladn_info.c
+ model/lcs_broadcast_assistance_types_data_1.c
model/lcs_broadcast_assistance_types_data.c
model/lcs_client_class.c
model/lcs_client_external.c
@@ -269,14 +344,18 @@ libsbi_openapi_sources = files('''
model/lcs_mo_data.c
model/lcs_mo_service_class.c
model/lcs_privacy.c
+ model/lcs_privacy_data_1.c
model/lcs_privacy_data.c
model/limit_id_to_monitoring_key.c
model/line_type.c
model/link.c
model/links_value_schema.c
model/lmf_info.c
+ model/location_accuracy_any_of.c
model/location_accuracy.c
+ model/location_area_1.c
model/location_area.c
+ model/location_filter_any_of.c
model/location_filter.c
model/location_info.c
model/location_privacy_ind.c
@@ -286,27 +365,39 @@ libsbi_openapi_sources = files('''
model/logging_interval_mdt.c
model/logging_interval_nr_mdt.c
model/loss_connectivity_cfg.c
+ model/lpi_1.c
model/lpi.c
+ model/lte_m_ind.c
+ model/lte_v2x_auth_1.c
model/lte_v2x_auth.c
model/ma_pdu_indication.c
model/mapping_of_snssai.c
model/ma_release_indication.c
model/max_integrity_protected_data_rate.c
model/mbsfn_area.c
+ model/mdt_configuration_1.c
model/mdt_configuration.c
model/mdt_user_consent.c
model/measurement_lte_for_mdt.c
model/measurement_nr_for_mdt.c
model/measurement_period_lte_mdt.c
+ model/media_component.c
+ model/media_component_resources_status.c
+ model/media_component_rm.c
+ model/media_sub_component.c
+ model/media_sub_component_rm.c
+ model/media_type.c
model/message_waiting_data.c
model/metering_method.c
model/mm_context.c
model/mme_capabilities.c
- model/model_5_g_vn_group_configuration.c
- model/model_5_g_vn_group_data.c
+ model/model_5_gvn_group_configuration.c
+ model/model_5_gvn_group_data.c
model/modification_notification.c
model/mo_exp_data_counter.c
model/monitoring_configuration.c
+ model/mtc_provider.c
+ model/multicast_access_control_any_of.c
model/multicast_access_control.c
model/n1_message_class.c
model/n1_message_container.c
@@ -335,11 +426,14 @@ libsbi_openapi_sources = files('''
model/n4_information.c
model/n4_message_type.c
model/nas_security_mode.c
+ model/ncgi_1.c
model/ncgi.c
model/nef_cond.c
model/nef_info.c
- model/network_area_info_2.c
+ model/net_loc_access_support.c
+ model/network_area_info_1.c
model/network_area_info.c
+ model/network_node_diameter_address_1.c
model/network_node_diameter_address.c
model/network_slice_cond.c
model/nf_group_cond.c
@@ -359,6 +453,7 @@ libsbi_openapi_sources = files('''
model/ngap_ie_type.c
model/ng_ksi.c
model/ng_ran_target_id.c
+ model/nidd_information_1.c
model/nidd_information.c
model/node_type.c
model/non_dynamic5_qi.c
@@ -367,33 +462,39 @@ libsbi_openapi_sources = files('''
model/notif_condition.c
model/notification_cause.c
model/notification_control.c
+ model/notification_control_indication.c
model/notification_data.c
model/notification_event_type.c
model/notification_item.c
model/notification_type.c
model/notify_item.c
+ model/npn_access_info.c
model/nrf_info.c
model/nr_location.c
model/nrppa_information.c
+ model/nr_v2x_auth_1.c
model/nr_v2x_auth.c
model/nsi_information.c
+ model/nssaa_status.c
+ model/nssai_1.c
model/nssai_ack_data.c
model/nssai.c
model/nssai_mapping.c
model/null_value.c
model/nwdaf_cond.c
+ model/nwdaf_event_any_of.c
model/nwdaf_event.c
model/nwdaf_info.c
model/object.c
model/odb_data.c
model/odb_packet_services.c
model/operation_mode.c
- model/operator_managed.c
model/operator_specific_data_container.c
model/options_response.c
+ model/out_of_credit_information.c
model/packet_filter_info.c
- model/parameter_over_pc5.c
- model/parameter_over_uu.c
+ model/parameter_combination.c
+ model/partial_record_method_any_of.c
model/partial_record_method.c
model/partial_success_report.c
model/patch_item.c
@@ -401,12 +502,15 @@ libsbi_openapi_sources = files('''
model/patch_result.c
model/pc5_flow_bit_rates.c
model/pc5_qos_flow_item.c
- model/pc5_qos_mapping.c
model/pc5_qo_s_para.c
model/pcc_rule.c
+ model/pcf_binding.c
+ model/pcf_binding_patch.c
model/pcf_info.c
model/pcscf_info.c
model/pcscf_restoration_notification.c
+ model/pcscf_restoration_request_data.c
+ model/pdu_session_1.c
model/pdu_session.c
model/pdu_session_context.c
model/pdu_session_continuity_ind.c
@@ -416,11 +520,16 @@ libsbi_openapi_sources = files('''
model/pdu_session_management_data.c
model/pdu_session_notify_item.c
model/pdu_session_rel_cause.c
+ model/pdu_session_status_any_of.c
model/pdu_session_status.c
model/pdu_session_status_cfg.c
+ model/pdu_session_tsn_bridge.c
model/pdu_session_type.c
+ model/pdu_session_types_1.c
model/pdu_session_types.c
model/pei_update_info.c
+ model/periodic_communication_indicator.c
+ model/periodicity_any_of.c
model/periodicity.c
model/pfd_change_notification.c
model/pfd_content.c
@@ -428,13 +537,16 @@ libsbi_openapi_sources = files('''
model/pfd_data_for_app.c
model/pfd_data_for_app_ext_all_of.c
model/pfd_data_for_app_ext.c
+ model/pgw_info_1.c
model/pgw_info.c
model/plmn_ec_info.c
+ model/plmn_id_1.c
model/plmn_id.c
+ model/plmn_id_nid_1.c
model/plmn_id_nid.c
+ model/plmn_operator_class_1.c
model/plmn_operator_class.c
model/plmn_range.c
- model/plmn_rat_served.c
model/plmn_route_selection_descriptor.c
model/plmn_snssai.c
model/point_all_of.c
@@ -454,27 +566,34 @@ libsbi_openapi_sources = files('''
model/policy_control_request_trigger.c
model/policy_data_change_notification.c
model/policy_data_subscription.c
+ model/policy_decision_failure_code.c
model/policy_req_trigger.c
model/policy_update.c
model/polygon_all_of.c
model/polygon.c
model/port_management_container.c
model/positioning_method_mdt.c
+ model/pp5g_vn_group_profile_data.c
model/pp_active_time.c
model/pp_data.c
model/pp_dl_packet_count_ext.c
model/pp_maximum_latency.c
model/pp_maximum_response_time.c
- model/pppp_to_pdb.c
+ model/pp_profile_data.c
model/pp_subs_reg_timer.c
model/preemption_capability.c
+ model/preemption_capability_rm.c
+ model/preemption_control_information.c
+ model/preemption_control_information_rm.c
model/preemption_vulnerability.c
+ model/preemption_vulnerability_rm.c
model/preferred_search.c
model/presence_info.c
model/presence_info_rm.c
model/presence_state.c
+ model/priority_sharing_indicator.c
model/privacy_check_related_action.c
- model/privacy_parameter.c
+ model/problem_details_1.c
model/problem_details_2.c
model/problem_details_add_info.c
model/problem_details.c
@@ -482,6 +601,7 @@ libsbi_openapi_sources = files('''
model/provisioned_data_sets.c
model/psa_indication.c
model/psa_information.c
+ model/ptw_parameters_1.c
model/ptw_parameters.c
model/pws_error_data.c
model/pws_information.c
@@ -495,22 +615,29 @@ libsbi_openapi_sources = files('''
model/qos_flow_profile.c
model/qos_flow_release_request_item.c
model/qos_flow_setup_item.c
+ model/qos_flow_tunnel.c
model/qos_flow_usage.c
model/qos_flow_usage_report.c
model/qos_monitoring_data.c
model/qos_monitoring_info.c
+ model/qos_monitoring_information.c
+ model/qos_monitoring_information_rm.c
model/qos_monitoring_report.c
model/qos_monitoring_req.c
model/qos_notification_control_info.c
model/qos_notif_type.c
model/qos_resource_type.c
- model/radio_parameter_not_served.c
model/ran_nas_rel_cause.c
model/rat_selector.c
model/rat_type.c
+ model/reachability_filter_any_of.c
+ model/reachability_filter.c
+ model/reachability_for_sms_configuration_any_of.c
model/reachability_for_sms_configuration.c
model/redirect_address_type.c
model/redirect_information.c
+ model/redirect_response.c
+ model/redundant_pdu_session_information.c
model/reflective_qo_s_attribute.c
model/ref_to_binary_data.c
model/registration_context_container.c
@@ -537,7 +664,10 @@ libsbi_openapi_sources = files('''
model/request_indication.c
model/request_trigger.c
model/request_type.c
+ model/required_access_info.c
+ model/reserv_priority.c
model/resource_item.c
+ model/resources_allocation_info.c
model/resource_status.c
model/restriction_type.c
model/resynchronization_info.c
@@ -546,16 +676,19 @@ libsbi_openapi_sources = files('''
model/rg_auth_ctx.c
model/rg_authentication_info.c
model/rm_info.c
+ model/rm_state_any_of.c
model/rm_state.c
model/roaming_charging_profile.c
model/roaming_indication.c
model/roaming_odb.c
model/route_information.c
model/route_to_location.c
+ model/rsn.c
model/rule_operation.c
model/rule_report.c
model/rule_status.c
model/sbi_binding_level.c
+ model/scheduled_communication_time_1.c
model/scheduled_communication_time.c
model/scheduled_communication_time_rm.c
model/scheduled_communication_type.c
@@ -564,6 +697,7 @@ libsbi_openapi_sources = files('''
model/scp_domain_info.c
model/scp_info.c
model/sc_type.c
+ model/sdm_subscription_1.c
model/sdm_subscription.c
model/sdm_subs_modification.c
model/sd_range.c
@@ -575,27 +709,27 @@ libsbi_openapi_sources = files('''
model/send_mo_data_req_data.c
model/sensor_measurement.c
model/sequence_number.c
- model/service_application_server_address.c
+ model/serv_auth_info.c
+ model/service_area_restriction_1.c
model/service_area_restriction.c
- model/service_id_to_frequency.c
- model/service_id_to_layer2_id.c
- model/service_id_to_pppr.c
+ model/service_info_status.c
model/service_name_cond.c
model/service_parameter_data.c
- model/service_to_pdu_session.c
- model/service_to_tx.c
+ model/service_parameter_data_patch.c
+ model/service_type_unrelated_class_1.c
model/service_type_unrelated_class.c
model/serving_nf_identity.c
+ model/session_management_subscription_data_1.c
model/session_management_subscription_data.c
model/session_rule.c
model/session_rule_failure_code.c
model/session_rule_report.c
model/shared_data.c
model/sign.c
+ model/sip_forking_indication.c
model/slice_info_for_pdu_session.c
model/slice_info_for_registration.c
model/slice_info_for_ue_configuration_update.c
- model/slrb_configurations.c
model/small_data_rate_status.c
model/small_data_rate_status_info.c
model/sm_context.c
@@ -617,7 +751,10 @@ libsbi_openapi_sources = files('''
model/smf_registration.c
model/smf_registration_info.c
model/smf_selection_data.c
+ model/smf_selection_subscription_data_1.c
model/smf_selection_subscription_data.c
+ model/smf_subscription_info.c
+ model/smf_subscription_item.c
model/sm_policy_association_release_cause.c
model/sm_policy_context_data.c
model/sm_policy_control.c
@@ -632,9 +769,12 @@ libsbi_openapi_sources = files('''
model/sm_policy_snssai_data_patch.c
model/sm_policy_update_context_data.c
model/smsc_data.c
+ model/smsf_info_1.c
model/smsf_info.c
model/smsf_registration.c
+ model/sms_management_subscription_data_1.c
model/sms_management_subscription_data.c
+ model/sms_subscription_data_1.c
model/sms_subscription_data.c
model/sms_support.c
model/snssai.c
@@ -644,12 +784,17 @@ libsbi_openapi_sources = files('''
model/snssai_smf_info_item.c
model/snssai_upf_info_item.c
model/sor_data.c
+ model/sor_info_1.c
model/sor_info.c
model/sor_update_indicator.c
model/sor_update_info.c
+ model/spatial_validity.c
+ model/spatial_validity_rm.c
model/sponsor_connectivity_data.c
+ model/sponsoring_status.c
model/sqn_scheme.c
model/ssc_mode.c
+ model/ssc_modes_1.c
model/ssc_modes.c
model/stationary_indication.c
model/stationary_indication_rm.c
@@ -662,26 +807,35 @@ libsbi_openapi_sources = files('''
model/steering_mode.c
model/steer_mode_value.c
model/stored_search_result.c
+ model/subscribed_default_qos_1.c
model/subscribed_default_qos.c
+ model/subscribed_event_any_of.c
model/subscribed_event.c
model/subscribed_snssai.c
model/subscription_data.c
+ model/subscription_data_sets_1.c
model/subscription_data_sets.c
model/subscription_data_subscr_cond.c
model/subscription_data_subscriptions.c
+ model/suggested_packet_num_dl_1.c
model/suggested_packet_num_dl.c
model/supi_range.c
+ model/supported_gad_shapes_any_of.c
model/supported_gad_shapes.c
model/tac_info.c
model/tac_range.c
+ model/tai_1.c
model/tai.c
model/tai_range.c
model/temporal_validity.c
+ model/termination_cause.c
+ model/termination_info.c
model/termination_notification.c
model/time_period.c
model/time_window.c
model/tnap_id.c
model/tngf_info.c
+ model/trace_data_1.c
model/trace_data.c
model/trace_data_response.c
model/trace_depth.c
@@ -701,12 +855,15 @@ libsbi_openapi_sources = files('''
model/transfer_reason.c
model/transport_protocol.c
model/trigger.c
+ model/trigger_category_any_of.c
model/trigger_category.c
model/trigger_request.c
+ model/trigger_type_any_of.c
model/trigger_type.c
model/tscai_input_container.c
model/tsn_bridge_info.c
- model/tsn_port_identifier.c
+ model/tsn_qos_container.c
+ model/tsn_qos_container_rm.c
model/tunnel_info.c
model/twap_id.c
model/twif_info.c
@@ -714,26 +871,34 @@ libsbi_openapi_sources = files('''
model/udr_info.c
model/udsf_info.c
model/ue_auth.c
- model/ue_authentication_ctx.c
model/ue_camping_rep.c
model/ue_context.c
+ model/ue_context_cancel_relocate_data.c
model/ue_context_create_data.c
model/ue_context_created_data.c
model/ue_context_create_error.c
+ model/ue_context_in_amf_data_1.c
model/ue_context_in_amf_data.c
+ model/ue_context_in_smf_data_1.c
model/ue_context_in_smf_data.c
+ model/ue_context_in_smsf_data_1.c
model/ue_context_in_smsf_data.c
model/ue_context_release.c
+ model/ue_context_relocate_data.c
+ model/ue_context_relocated_data.c
model/ue_context_transfer_req_data.c
model/ue_context_transfer_rsp_data.c
model/ue_context_transfer_status.c
+ model/ue_differentiation_info.c
model/ue_id.c
+ model/ue_identity_info.c
model/ue_initiated_resource_request.c
model/ue_n1_n2_info_subscription_create_data.c
model/ue_n1_n2_info_subscription_created_data.c
model/ue_policy_section.c
model/ue_policy_set.c
model/ue_policy_set_patch.c
+ model/ue_reachability_any_of.c
model/ue_reachability.c
model/ue_reg_status_update_req_data.c
model/ue_reg_status_update_rsp_data.c
@@ -741,6 +906,7 @@ libsbi_openapi_sources = files('''
model/ulcl_bp_information.c
model/unavailable_access_indication.c
model/uncertainty_ellipse.c
+ model/unrelated_class_1.c
model/unrelated_class.c
model/up_cnx_state.c
model/up_confidentiality.c
@@ -750,23 +916,30 @@ libsbi_openapi_sources = files('''
model/up_integrity.c
model/up_interface_type.c
model/up_path_chg_event.c
+ model/up_security_1.c
model/up_security.c
model/up_security_info.c
+ model/upu_data_1.c
model/upu_data_2.c
model/upu_data.c
+ model/upu_info_1.c
model/upu_info.c
model/uri_scheme.c
model/usage_mon_data.c
model/usage_mon_data_limit.c
model/usage_mon_data_scope.c
model/usage_monitoring_data.c
+ model/usage_mon_level_any_of.c
model/usage_mon_level.c
model/usage_threshold.c
+ model/usage_threshold_rm.c
model/user_identifier.c
model/user_location.c
model/v2x_context.c
- model/v2x_rat_type.c
+ model/v2x_information.c
+ model/v2x_subscription_data_1.c
model/v2x_subscription_data.c
+ model/valid_time_period_1.c
model/valid_time_period.c
model/vendor_specific_feature.c
model/vgmlc_address.c
@@ -777,65 +950,10 @@ libsbi_openapi_sources = files('''
model/vsmf_updated_data.c
model/vsmf_update_error.c
model/w_agf_info.c
+ model/wireline_area_1.c
model/wireline_area.c
+ model/wireline_service_area_restriction_1.c
model/wireline_service_area_restriction.c
-
- model/acceptable_service_info.c
- model/access_net_charging_identifier.c
- model/accumulated_usage.c
- model/af_event_notification.c
- model/af_event_subscription.c
- model/af_notif_method.c
- model/af_requested_data.c
- model/af_routing_requirement.c
- model/af_routing_requirement_rm.c
- model/app_session_context.c
- model/app_session_context_req_data.c
- model/app_session_context_resp_data.c
- model/app_session_context_update_data.c
- model/binding_level.c
- model/binding_resp.c
- model/events_notification.c
- model/events_subsc_req_data.c
- model/events_subsc_req_data_rm.c
- model/extended_problem_details.c
- model/extended_problem_details_all_of.c
- model/flow_usage.c
- model/flows.c
- model/media_component.c
- model/media_component_resources_status.c
- model/media_component_rm.c
- model/media_sub_component.c
- model/media_sub_component_rm.c
- model/media_type.c
- model/new_tsn_bridge.c
- model/out_of_credit_information.c
- model/parameter_combination.c
- model/pcf_binding.c
- model/pcf_binding_patch.c
- model/pcscf_restoration_request_data.c
- model/preemption_capability_rm.c
- model/preemption_control_information.c
- model/preemption_control_information_rm.c
- model/preemption_vulnerability_rm.c
- model/priority_sharing_indicator.c
- model/qos_monitoring_information.c
- model/qos_monitoring_information_rm.c
- model/required_access_info.c
- model/reserv_priority.c
- model/resources_allocation_info.c
- model/serv_auth_info.c
- model/service_info_status.c
- model/sip_forking_indication.c
- model/spatial_validity.c
- model/spatial_validity_rm.c
- model/sponsoring_status.c
- model/termination_cause.c
- model/termination_info.c
- model/tsn_qos_container.c
- model/tsn_qos_container_rm.c
- model/ue_identity_info.c
- model/usage_threshold_rm.c
'''.split())
libsbi_openapi_inc = include_directories('.')
diff --git a/lib/sbi/openapi/model/acc_net_ch_id.c b/lib/sbi/openapi/model/acc_net_ch_id.c
index 2d35fbfee..ec266eb01 100644
--- a/lib/sbi/openapi/model/acc_net_ch_id.c
+++ b/lib/sbi/openapi/model/acc_net_ch_id.c
@@ -8,7 +8,7 @@ OpenAPI_acc_net_ch_id_t *OpenAPI_acc_net_ch_id_create(
int acc_net_cha_id_value,
OpenAPI_list_t *ref_pcc_rule_ids,
int session_ch_scope
- )
+)
{
OpenAPI_acc_net_ch_id_t *acc_net_ch_id_local_var = OpenAPI_malloc(sizeof(OpenAPI_acc_net_ch_id_t));
if (!acc_net_ch_id_local_var) {
@@ -50,26 +50,26 @@ cJSON *OpenAPI_acc_net_ch_id_convertToJSON(OpenAPI_acc_net_ch_id_t *acc_net_ch_i
}
if (acc_net_ch_id->ref_pcc_rule_ids) {
- cJSON *ref_pcc_rule_ids = cJSON_AddArrayToObject(item, "refPccRuleIds");
- if (ref_pcc_rule_ids == NULL) {
- ogs_error("OpenAPI_acc_net_ch_id_convertToJSON() failed [ref_pcc_rule_ids]");
- goto end;
- }
+ cJSON *ref_pcc_rule_ids = cJSON_AddArrayToObject(item, "refPccRuleIds");
+ if (ref_pcc_rule_ids == NULL) {
+ ogs_error("OpenAPI_acc_net_ch_id_convertToJSON() failed [ref_pcc_rule_ids]");
+ goto end;
+ }
- OpenAPI_lnode_t *ref_pcc_rule_ids_node;
- OpenAPI_list_for_each(acc_net_ch_id->ref_pcc_rule_ids, ref_pcc_rule_ids_node) {
- if (cJSON_AddStringToObject(ref_pcc_rule_ids, "", (char*)ref_pcc_rule_ids_node->data) == NULL) {
- ogs_error("OpenAPI_acc_net_ch_id_convertToJSON() failed [ref_pcc_rule_ids]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *ref_pcc_rule_ids_node;
+ OpenAPI_list_for_each(acc_net_ch_id->ref_pcc_rule_ids, ref_pcc_rule_ids_node) {
+ if (cJSON_AddStringToObject(ref_pcc_rule_ids, "", (char*)ref_pcc_rule_ids_node->data) == NULL) {
+ ogs_error("OpenAPI_acc_net_ch_id_convertToJSON() failed [ref_pcc_rule_ids]");
+ goto end;
+ }
+ }
}
if (acc_net_ch_id->session_ch_scope) {
- if (cJSON_AddBoolToObject(item, "sessionChScope", acc_net_ch_id->session_ch_scope) == NULL) {
- ogs_error("OpenAPI_acc_net_ch_id_convertToJSON() failed [session_ch_scope]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "sessionChScope", acc_net_ch_id->session_ch_scope) == NULL) {
+ ogs_error("OpenAPI_acc_net_ch_id_convertToJSON() failed [session_ch_scope]");
+ goto end;
+ }
}
end:
@@ -85,7 +85,7 @@ OpenAPI_acc_net_ch_id_t *OpenAPI_acc_net_ch_id_parseFromJSON(cJSON *acc_net_ch_i
goto end;
}
-
+
if (!cJSON_IsNumber(acc_net_cha_id_value)) {
ogs_error("OpenAPI_acc_net_ch_id_parseFromJSON() failed [acc_net_cha_id_value]");
goto end;
@@ -94,37 +94,37 @@ OpenAPI_acc_net_ch_id_t *OpenAPI_acc_net_ch_id_parseFromJSON(cJSON *acc_net_ch_i
cJSON *ref_pcc_rule_ids = cJSON_GetObjectItemCaseSensitive(acc_net_ch_idJSON, "refPccRuleIds");
OpenAPI_list_t *ref_pcc_rule_idsList;
- if (ref_pcc_rule_ids) {
- cJSON *ref_pcc_rule_ids_local;
- if (!cJSON_IsArray(ref_pcc_rule_ids)) {
- ogs_error("OpenAPI_acc_net_ch_id_parseFromJSON() failed [ref_pcc_rule_ids]");
- goto end;
- }
- ref_pcc_rule_idsList = OpenAPI_list_create();
+ if (ref_pcc_rule_ids) {
+ cJSON *ref_pcc_rule_ids_local;
+ if (!cJSON_IsArray(ref_pcc_rule_ids)) {
+ ogs_error("OpenAPI_acc_net_ch_id_parseFromJSON() failed [ref_pcc_rule_ids]");
+ goto end;
+ }
+ ref_pcc_rule_idsList = OpenAPI_list_create();
- cJSON_ArrayForEach(ref_pcc_rule_ids_local, ref_pcc_rule_ids) {
- if (!cJSON_IsString(ref_pcc_rule_ids_local)) {
- ogs_error("OpenAPI_acc_net_ch_id_parseFromJSON() failed [ref_pcc_rule_ids]");
- goto end;
- }
- OpenAPI_list_add(ref_pcc_rule_idsList, ogs_strdup_or_assert(ref_pcc_rule_ids_local->valuestring));
- }
+ cJSON_ArrayForEach(ref_pcc_rule_ids_local, ref_pcc_rule_ids) {
+ if (!cJSON_IsString(ref_pcc_rule_ids_local)) {
+ ogs_error("OpenAPI_acc_net_ch_id_parseFromJSON() failed [ref_pcc_rule_ids]");
+ goto end;
+ }
+ OpenAPI_list_add(ref_pcc_rule_idsList , ogs_strdup_or_assert(ref_pcc_rule_ids_local->valuestring));
+ }
}
cJSON *session_ch_scope = cJSON_GetObjectItemCaseSensitive(acc_net_ch_idJSON, "sessionChScope");
- if (session_ch_scope) {
- if (!cJSON_IsBool(session_ch_scope)) {
- ogs_error("OpenAPI_acc_net_ch_id_parseFromJSON() failed [session_ch_scope]");
- goto end;
- }
+ if (session_ch_scope) {
+ if (!cJSON_IsBool(session_ch_scope)) {
+ ogs_error("OpenAPI_acc_net_ch_id_parseFromJSON() failed [session_ch_scope]");
+ goto end;
+ }
}
acc_net_ch_id_local_var = OpenAPI_acc_net_ch_id_create (
acc_net_cha_id_value->valuedouble,
ref_pcc_rule_ids ? ref_pcc_rule_idsList : NULL,
session_ch_scope ? session_ch_scope->valueint : 0
- );
+ );
return acc_net_ch_id_local_var;
end:
diff --git a/lib/sbi/openapi/model/acc_net_ch_id.h b/lib/sbi/openapi/model/acc_net_ch_id.h
index 7cb5693e0..08ceca4f0 100644
--- a/lib/sbi/openapi/model/acc_net_ch_id.h
+++ b/lib/sbi/openapi/model/acc_net_ch_id.h
@@ -1,7 +1,7 @@
/*
* acc_net_ch_id.h
*
- *
+ *
*/
#ifndef _OpenAPI_acc_net_ch_id_H_
@@ -28,7 +28,7 @@ OpenAPI_acc_net_ch_id_t *OpenAPI_acc_net_ch_id_create(
int acc_net_cha_id_value,
OpenAPI_list_t *ref_pcc_rule_ids,
int session_ch_scope
- );
+);
void OpenAPI_acc_net_ch_id_free(OpenAPI_acc_net_ch_id_t *acc_net_ch_id);
OpenAPI_acc_net_ch_id_t *OpenAPI_acc_net_ch_id_parseFromJSON(cJSON *acc_net_ch_idJSON);
cJSON *OpenAPI_acc_net_ch_id_convertToJSON(OpenAPI_acc_net_ch_id_t *acc_net_ch_id);
diff --git a/lib/sbi/openapi/model/acc_net_charging_address.c b/lib/sbi/openapi/model/acc_net_charging_address.c
index da7252f31..2dea91c16 100644
--- a/lib/sbi/openapi/model/acc_net_charging_address.c
+++ b/lib/sbi/openapi/model/acc_net_charging_address.c
@@ -7,7 +7,7 @@
OpenAPI_acc_net_charging_address_t *OpenAPI_acc_net_charging_address_create(
char *an_charg_ipv4_addr,
char *an_charg_ipv6_addr
- )
+)
{
OpenAPI_acc_net_charging_address_t *acc_net_charging_address_local_var = OpenAPI_malloc(sizeof(OpenAPI_acc_net_charging_address_t));
if (!acc_net_charging_address_local_var) {
@@ -41,17 +41,17 @@ cJSON *OpenAPI_acc_net_charging_address_convertToJSON(OpenAPI_acc_net_charging_a
item = cJSON_CreateObject();
if (acc_net_charging_address->an_charg_ipv4_addr) {
- if (cJSON_AddStringToObject(item, "anChargIpv4Addr", acc_net_charging_address->an_charg_ipv4_addr) == NULL) {
- ogs_error("OpenAPI_acc_net_charging_address_convertToJSON() failed [an_charg_ipv4_addr]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "anChargIpv4Addr", acc_net_charging_address->an_charg_ipv4_addr) == NULL) {
+ ogs_error("OpenAPI_acc_net_charging_address_convertToJSON() failed [an_charg_ipv4_addr]");
+ goto end;
+ }
}
if (acc_net_charging_address->an_charg_ipv6_addr) {
- if (cJSON_AddStringToObject(item, "anChargIpv6Addr", acc_net_charging_address->an_charg_ipv6_addr) == NULL) {
- ogs_error("OpenAPI_acc_net_charging_address_convertToJSON() failed [an_charg_ipv6_addr]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "anChargIpv6Addr", acc_net_charging_address->an_charg_ipv6_addr) == NULL) {
+ ogs_error("OpenAPI_acc_net_charging_address_convertToJSON() failed [an_charg_ipv6_addr]");
+ goto end;
+ }
}
end:
@@ -63,26 +63,26 @@ OpenAPI_acc_net_charging_address_t *OpenAPI_acc_net_charging_address_parseFromJS
OpenAPI_acc_net_charging_address_t *acc_net_charging_address_local_var = NULL;
cJSON *an_charg_ipv4_addr = cJSON_GetObjectItemCaseSensitive(acc_net_charging_addressJSON, "anChargIpv4Addr");
- if (an_charg_ipv4_addr) {
- if (!cJSON_IsString(an_charg_ipv4_addr)) {
- ogs_error("OpenAPI_acc_net_charging_address_parseFromJSON() failed [an_charg_ipv4_addr]");
- goto end;
- }
+ if (an_charg_ipv4_addr) {
+ if (!cJSON_IsString(an_charg_ipv4_addr)) {
+ ogs_error("OpenAPI_acc_net_charging_address_parseFromJSON() failed [an_charg_ipv4_addr]");
+ goto end;
+ }
}
cJSON *an_charg_ipv6_addr = cJSON_GetObjectItemCaseSensitive(acc_net_charging_addressJSON, "anChargIpv6Addr");
- if (an_charg_ipv6_addr) {
- if (!cJSON_IsString(an_charg_ipv6_addr)) {
- ogs_error("OpenAPI_acc_net_charging_address_parseFromJSON() failed [an_charg_ipv6_addr]");
- goto end;
- }
+ if (an_charg_ipv6_addr) {
+ if (!cJSON_IsString(an_charg_ipv6_addr)) {
+ ogs_error("OpenAPI_acc_net_charging_address_parseFromJSON() failed [an_charg_ipv6_addr]");
+ goto end;
+ }
}
acc_net_charging_address_local_var = OpenAPI_acc_net_charging_address_create (
an_charg_ipv4_addr ? ogs_strdup_or_assert(an_charg_ipv4_addr->valuestring) : NULL,
an_charg_ipv6_addr ? ogs_strdup_or_assert(an_charg_ipv6_addr->valuestring) : NULL
- );
+ );
return acc_net_charging_address_local_var;
end:
diff --git a/lib/sbi/openapi/model/acc_net_charging_address.h b/lib/sbi/openapi/model/acc_net_charging_address.h
index 2f26eec4d..e152df587 100644
--- a/lib/sbi/openapi/model/acc_net_charging_address.h
+++ b/lib/sbi/openapi/model/acc_net_charging_address.h
@@ -26,7 +26,7 @@ typedef struct OpenAPI_acc_net_charging_address_s {
OpenAPI_acc_net_charging_address_t *OpenAPI_acc_net_charging_address_create(
char *an_charg_ipv4_addr,
char *an_charg_ipv6_addr
- );
+);
void OpenAPI_acc_net_charging_address_free(OpenAPI_acc_net_charging_address_t *acc_net_charging_address);
OpenAPI_acc_net_charging_address_t *OpenAPI_acc_net_charging_address_parseFromJSON(cJSON *acc_net_charging_addressJSON);
cJSON *OpenAPI_acc_net_charging_address_convertToJSON(OpenAPI_acc_net_charging_address_t *acc_net_charging_address);
diff --git a/lib/sbi/openapi/model/acceptable_service_info.c b/lib/sbi/openapi/model/acceptable_service_info.c
index 798a10501..2d947573f 100644
--- a/lib/sbi/openapi/model/acceptable_service_info.c
+++ b/lib/sbi/openapi/model/acceptable_service_info.c
@@ -8,7 +8,7 @@ OpenAPI_acceptable_service_info_t *OpenAPI_acceptable_service_info_create(
OpenAPI_list_t* acc_bw_med_comps,
char *mar_bw_ul,
char *mar_bw_dl
- )
+)
{
OpenAPI_acceptable_service_info_t *acceptable_service_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_acceptable_service_info_t));
if (!acceptable_service_info_local_var) {
@@ -49,38 +49,38 @@ cJSON *OpenAPI_acceptable_service_info_convertToJSON(OpenAPI_acceptable_service_
item = cJSON_CreateObject();
if (acceptable_service_info->acc_bw_med_comps) {
- cJSON *acc_bw_med_comps = cJSON_AddObjectToObject(item, "accBwMedComps");
- if (acc_bw_med_comps == NULL) {
+ cJSON *acc_bw_med_comps = cJSON_AddObjectToObject(item, "accBwMedComps");
+ if (acc_bw_med_comps == NULL) {
+ ogs_error("OpenAPI_acceptable_service_info_convertToJSON() failed [acc_bw_med_comps]");
+ goto end;
+ }
+ cJSON *localMapObject = acc_bw_med_comps;
+ OpenAPI_lnode_t *acc_bw_med_comps_node;
+ if (acceptable_service_info->acc_bw_med_comps) {
+ OpenAPI_list_for_each(acceptable_service_info->acc_bw_med_comps, acc_bw_med_comps_node) {
+ OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)acc_bw_med_comps_node->data;
+ cJSON *itemLocal = OpenAPI_media_component_convertToJSON(localKeyValue->value);
+ if (itemLocal == NULL) {
ogs_error("OpenAPI_acceptable_service_info_convertToJSON() failed [acc_bw_med_comps]");
goto end;
}
- cJSON *localMapObject = acc_bw_med_comps;
- OpenAPI_lnode_t *acc_bw_med_comps_node;
- if (acceptable_service_info->acc_bw_med_comps) {
- OpenAPI_list_for_each(acceptable_service_info->acc_bw_med_comps, acc_bw_med_comps_node) {
- OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)acc_bw_med_comps_node->data;
- cJSON *itemLocal = OpenAPI_media_component_convertToJSON(localKeyValue->value);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_acceptable_service_info_convertToJSON() failed [acc_bw_med_comps]");
- goto end;
- }
- cJSON_AddItemToObject(acc_bw_med_comps, localKeyValue->key, itemLocal);
+ cJSON_AddItemToObject(acc_bw_med_comps, localKeyValue->key, itemLocal);
}
}
}
if (acceptable_service_info->mar_bw_ul) {
- if (cJSON_AddStringToObject(item, "marBwUl", acceptable_service_info->mar_bw_ul) == NULL) {
- ogs_error("OpenAPI_acceptable_service_info_convertToJSON() failed [mar_bw_ul]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "marBwUl", acceptable_service_info->mar_bw_ul) == NULL) {
+ ogs_error("OpenAPI_acceptable_service_info_convertToJSON() failed [mar_bw_ul]");
+ goto end;
+ }
}
if (acceptable_service_info->mar_bw_dl) {
- if (cJSON_AddStringToObject(item, "marBwDl", acceptable_service_info->mar_bw_dl) == NULL) {
- ogs_error("OpenAPI_acceptable_service_info_convertToJSON() failed [mar_bw_dl]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "marBwDl", acceptable_service_info->mar_bw_dl) == NULL) {
+ ogs_error("OpenAPI_acceptable_service_info_convertToJSON() failed [mar_bw_dl]");
+ goto end;
+ }
}
end:
@@ -93,49 +93,49 @@ OpenAPI_acceptable_service_info_t *OpenAPI_acceptable_service_info_parseFromJSON
cJSON *acc_bw_med_comps = cJSON_GetObjectItemCaseSensitive(acceptable_service_infoJSON, "accBwMedComps");
OpenAPI_list_t *acc_bw_med_compsList;
- if (acc_bw_med_comps) {
- cJSON *acc_bw_med_comps_local_map;
- if (!cJSON_IsObject(acc_bw_med_comps)) {
+ if (acc_bw_med_comps) {
+ cJSON *acc_bw_med_comps_local_map;
+ if (!cJSON_IsObject(acc_bw_med_comps)) {
+ ogs_error("OpenAPI_acceptable_service_info_parseFromJSON() failed [acc_bw_med_comps]");
+ goto end;
+ }
+ acc_bw_med_compsList = OpenAPI_list_create();
+ OpenAPI_map_t *localMapKeyPair = NULL;
+ cJSON_ArrayForEach(acc_bw_med_comps_local_map, acc_bw_med_comps) {
+ cJSON *localMapObject = acc_bw_med_comps_local_map;
+ if (!cJSON_IsObject(acc_bw_med_comps_local_map)) {
ogs_error("OpenAPI_acceptable_service_info_parseFromJSON() failed [acc_bw_med_comps]");
goto end;
}
- acc_bw_med_compsList = OpenAPI_list_create();
- OpenAPI_map_t *localMapKeyPair = NULL;
- cJSON_ArrayForEach(acc_bw_med_comps_local_map, acc_bw_med_comps) {
- cJSON *localMapObject = acc_bw_med_comps_local_map;
- if (!cJSON_IsObject(acc_bw_med_comps_local_map)) {
- ogs_error("OpenAPI_acceptable_service_info_parseFromJSON() failed [acc_bw_med_comps]");
- goto end;
- }
- localMapKeyPair = OpenAPI_map_create(
- localMapObject->string, OpenAPI_media_component_parseFromJSON(localMapObject));
- OpenAPI_list_add(acc_bw_med_compsList, localMapKeyPair);
- }
+ localMapKeyPair = OpenAPI_map_create(
+ localMapObject->string, OpenAPI_media_component_parseFromJSON(localMapObject));
+ OpenAPI_list_add(acc_bw_med_compsList , localMapKeyPair);
+ }
}
cJSON *mar_bw_ul = cJSON_GetObjectItemCaseSensitive(acceptable_service_infoJSON, "marBwUl");
- if (mar_bw_ul) {
- if (!cJSON_IsString(mar_bw_ul)) {
- ogs_error("OpenAPI_acceptable_service_info_parseFromJSON() failed [mar_bw_ul]");
- goto end;
- }
+ if (mar_bw_ul) {
+ if (!cJSON_IsString(mar_bw_ul)) {
+ ogs_error("OpenAPI_acceptable_service_info_parseFromJSON() failed [mar_bw_ul]");
+ goto end;
+ }
}
cJSON *mar_bw_dl = cJSON_GetObjectItemCaseSensitive(acceptable_service_infoJSON, "marBwDl");
- if (mar_bw_dl) {
- if (!cJSON_IsString(mar_bw_dl)) {
- ogs_error("OpenAPI_acceptable_service_info_parseFromJSON() failed [mar_bw_dl]");
- goto end;
- }
+ if (mar_bw_dl) {
+ if (!cJSON_IsString(mar_bw_dl)) {
+ ogs_error("OpenAPI_acceptable_service_info_parseFromJSON() failed [mar_bw_dl]");
+ goto end;
+ }
}
acceptable_service_info_local_var = OpenAPI_acceptable_service_info_create (
acc_bw_med_comps ? acc_bw_med_compsList : NULL,
mar_bw_ul ? ogs_strdup_or_assert(mar_bw_ul->valuestring) : NULL,
mar_bw_dl ? ogs_strdup_or_assert(mar_bw_dl->valuestring) : NULL
- );
+ );
return acceptable_service_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/acceptable_service_info.h b/lib/sbi/openapi/model/acceptable_service_info.h
index 87bf6a1a1..b5adaa513 100644
--- a/lib/sbi/openapi/model/acceptable_service_info.h
+++ b/lib/sbi/openapi/model/acceptable_service_info.h
@@ -29,7 +29,7 @@ OpenAPI_acceptable_service_info_t *OpenAPI_acceptable_service_info_create(
OpenAPI_list_t* acc_bw_med_comps,
char *mar_bw_ul,
char *mar_bw_dl
- );
+);
void OpenAPI_acceptable_service_info_free(OpenAPI_acceptable_service_info_t *acceptable_service_info);
OpenAPI_acceptable_service_info_t *OpenAPI_acceptable_service_info_parseFromJSON(cJSON *acceptable_service_infoJSON);
cJSON *OpenAPI_acceptable_service_info_convertToJSON(OpenAPI_acceptable_service_info_t *acceptable_service_info);
diff --git a/lib/sbi/openapi/model/access_and_mobility_data.c b/lib/sbi/openapi/model/access_and_mobility_data.c
index 340b08080..87c668126 100644
--- a/lib/sbi/openapi/model/access_and_mobility_data.c
+++ b/lib/sbi/openapi/model/access_and_mobility_data.c
@@ -20,11 +20,12 @@ OpenAPI_access_and_mobility_data_t *OpenAPI_access_and_mobility_data_create(
char *sms_over_nas_status_ts,
int roaming_status,
char *roaming_status_ts,
- OpenAPI_plmn_id_t *current_plmn,
+ OpenAPI_plmn_id_1_t *current_plmn,
char *current_plmn_ts,
OpenAPI_list_t *rat_type,
- char *rat_types_ts
- )
+ char *rat_types_ts,
+ char *supp_feat
+)
{
OpenAPI_access_and_mobility_data_t *access_and_mobility_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_access_and_mobility_data_t));
if (!access_and_mobility_data_local_var) {
@@ -49,6 +50,7 @@ OpenAPI_access_and_mobility_data_t *OpenAPI_access_and_mobility_data_create(
access_and_mobility_data_local_var->current_plmn_ts = current_plmn_ts;
access_and_mobility_data_local_var->rat_type = rat_type;
access_and_mobility_data_local_var->rat_types_ts = rat_types_ts;
+ access_and_mobility_data_local_var->supp_feat = supp_feat;
return access_and_mobility_data_local_var;
}
@@ -77,10 +79,11 @@ void OpenAPI_access_and_mobility_data_free(OpenAPI_access_and_mobility_data_t *a
ogs_free(access_and_mobility_data->reachability_status_ts);
ogs_free(access_and_mobility_data->sms_over_nas_status_ts);
ogs_free(access_and_mobility_data->roaming_status_ts);
- OpenAPI_plmn_id_free(access_and_mobility_data->current_plmn);
+ OpenAPI_plmn_id_1_free(access_and_mobility_data->current_plmn);
ogs_free(access_and_mobility_data->current_plmn_ts);
OpenAPI_list_free(access_and_mobility_data->rat_type);
ogs_free(access_and_mobility_data->rat_types_ts);
+ ogs_free(access_and_mobility_data->supp_feat);
ogs_free(access_and_mobility_data);
}
@@ -95,188 +98,195 @@ cJSON *OpenAPI_access_and_mobility_data_convertToJSON(OpenAPI_access_and_mobilit
item = cJSON_CreateObject();
if (access_and_mobility_data->location) {
- cJSON *location_local_JSON = OpenAPI_user_location_convertToJSON(access_and_mobility_data->location);
- if (location_local_JSON == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [location]");
- goto end;
- }
- cJSON_AddItemToObject(item, "location", location_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [location]");
- goto end;
- }
+ cJSON *location_local_JSON = OpenAPI_user_location_convertToJSON(access_and_mobility_data->location);
+ if (location_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [location]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "location", location_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [location]");
+ goto end;
+ }
}
if (access_and_mobility_data->location_ts) {
- if (cJSON_AddStringToObject(item, "locationTs", access_and_mobility_data->location_ts) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [location_ts]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "locationTs", access_and_mobility_data->location_ts) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [location_ts]");
+ goto end;
+ }
}
if (access_and_mobility_data->time_zone) {
- if (cJSON_AddStringToObject(item, "timeZone", access_and_mobility_data->time_zone) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [time_zone]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "timeZone", access_and_mobility_data->time_zone) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [time_zone]");
+ goto end;
+ }
}
if (access_and_mobility_data->time_zone_ts) {
- if (cJSON_AddStringToObject(item, "timeZoneTs", access_and_mobility_data->time_zone_ts) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [time_zone_ts]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "timeZoneTs", access_and_mobility_data->time_zone_ts) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [time_zone_ts]");
+ goto end;
+ }
}
if (access_and_mobility_data->access_type) {
- if (cJSON_AddStringToObject(item, "accessType", OpenAPI_access_type_ToString(access_and_mobility_data->access_type)) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [access_type]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "accessType", OpenAPI_access_type_ToString(access_and_mobility_data->access_type)) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [access_type]");
+ goto end;
+ }
}
if (access_and_mobility_data->reg_states) {
- cJSON *reg_statesList = cJSON_AddArrayToObject(item, "regStates");
- if (reg_statesList == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [reg_states]");
- goto end;
- }
+ cJSON *reg_statesList = cJSON_AddArrayToObject(item, "regStates");
+ if (reg_statesList == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [reg_states]");
+ goto end;
+ }
- OpenAPI_lnode_t *reg_states_node;
- if (access_and_mobility_data->reg_states) {
- OpenAPI_list_for_each(access_and_mobility_data->reg_states, reg_states_node) {
- cJSON *itemLocal = OpenAPI_rm_info_convertToJSON(reg_states_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [reg_states]");
- goto end;
- }
- cJSON_AddItemToArray(reg_statesList, itemLocal);
+ OpenAPI_lnode_t *reg_states_node;
+ if (access_and_mobility_data->reg_states) {
+ OpenAPI_list_for_each(access_and_mobility_data->reg_states, reg_states_node) {
+ cJSON *itemLocal = OpenAPI_rm_info_convertToJSON(reg_states_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [reg_states]");
+ goto end;
}
+ cJSON_AddItemToArray(reg_statesList, itemLocal);
}
}
+ }
if (access_and_mobility_data->reg_states_ts) {
- if (cJSON_AddStringToObject(item, "regStatesTs", access_and_mobility_data->reg_states_ts) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [reg_states_ts]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "regStatesTs", access_and_mobility_data->reg_states_ts) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [reg_states_ts]");
+ goto end;
+ }
}
if (access_and_mobility_data->conn_states) {
- cJSON *conn_statesList = cJSON_AddArrayToObject(item, "connStates");
- if (conn_statesList == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [conn_states]");
- goto end;
- }
+ cJSON *conn_statesList = cJSON_AddArrayToObject(item, "connStates");
+ if (conn_statesList == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [conn_states]");
+ goto end;
+ }
- OpenAPI_lnode_t *conn_states_node;
- if (access_and_mobility_data->conn_states) {
- OpenAPI_list_for_each(access_and_mobility_data->conn_states, conn_states_node) {
- cJSON *itemLocal = OpenAPI_cm_info_convertToJSON(conn_states_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [conn_states]");
- goto end;
- }
- cJSON_AddItemToArray(conn_statesList, itemLocal);
+ OpenAPI_lnode_t *conn_states_node;
+ if (access_and_mobility_data->conn_states) {
+ OpenAPI_list_for_each(access_and_mobility_data->conn_states, conn_states_node) {
+ cJSON *itemLocal = OpenAPI_cm_info_convertToJSON(conn_states_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [conn_states]");
+ goto end;
}
+ cJSON_AddItemToArray(conn_statesList, itemLocal);
}
}
+ }
if (access_and_mobility_data->conn_states_ts) {
- if (cJSON_AddStringToObject(item, "connStatesTs", access_and_mobility_data->conn_states_ts) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [conn_states_ts]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "connStatesTs", access_and_mobility_data->conn_states_ts) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [conn_states_ts]");
+ goto end;
+ }
}
if (access_and_mobility_data->reachability_status) {
- cJSON *reachability_status_local_JSON = OpenAPI_ue_reachability_convertToJSON(access_and_mobility_data->reachability_status);
- if (reachability_status_local_JSON == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [reachability_status]");
- goto end;
- }
- cJSON_AddItemToObject(item, "reachabilityStatus", reachability_status_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [reachability_status]");
- goto end;
- }
+ cJSON *reachability_status_local_JSON = OpenAPI_ue_reachability_convertToJSON(access_and_mobility_data->reachability_status);
+ if (reachability_status_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [reachability_status]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "reachabilityStatus", reachability_status_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [reachability_status]");
+ goto end;
+ }
}
if (access_and_mobility_data->reachability_status_ts) {
- if (cJSON_AddStringToObject(item, "reachabilityStatusTs", access_and_mobility_data->reachability_status_ts) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [reachability_status_ts]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "reachabilityStatusTs", access_and_mobility_data->reachability_status_ts) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [reachability_status_ts]");
+ goto end;
+ }
}
if (access_and_mobility_data->sms_over_nas_status) {
- if (cJSON_AddStringToObject(item, "smsOverNasStatus", OpenAPI_sms_support_ToString(access_and_mobility_data->sms_over_nas_status)) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [sms_over_nas_status]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "smsOverNasStatus", OpenAPI_sms_support_ToString(access_and_mobility_data->sms_over_nas_status)) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [sms_over_nas_status]");
+ goto end;
+ }
}
if (access_and_mobility_data->sms_over_nas_status_ts) {
- if (cJSON_AddStringToObject(item, "smsOverNasStatusTs", access_and_mobility_data->sms_over_nas_status_ts) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [sms_over_nas_status_ts]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "smsOverNasStatusTs", access_and_mobility_data->sms_over_nas_status_ts) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [sms_over_nas_status_ts]");
+ goto end;
+ }
}
if (access_and_mobility_data->roaming_status) {
- if (cJSON_AddBoolToObject(item, "roamingStatus", access_and_mobility_data->roaming_status) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [roaming_status]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "roamingStatus", access_and_mobility_data->roaming_status) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [roaming_status]");
+ goto end;
+ }
}
if (access_and_mobility_data->roaming_status_ts) {
- if (cJSON_AddStringToObject(item, "roamingStatusTs", access_and_mobility_data->roaming_status_ts) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [roaming_status_ts]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "roamingStatusTs", access_and_mobility_data->roaming_status_ts) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [roaming_status_ts]");
+ goto end;
+ }
}
if (access_and_mobility_data->current_plmn) {
- cJSON *current_plmn_local_JSON = OpenAPI_plmn_id_convertToJSON(access_and_mobility_data->current_plmn);
- if (current_plmn_local_JSON == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [current_plmn]");
- goto end;
- }
- cJSON_AddItemToObject(item, "currentPlmn", current_plmn_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [current_plmn]");
- goto end;
- }
+ cJSON *current_plmn_local_JSON = OpenAPI_plmn_id_1_convertToJSON(access_and_mobility_data->current_plmn);
+ if (current_plmn_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [current_plmn]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "currentPlmn", current_plmn_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [current_plmn]");
+ goto end;
+ }
}
if (access_and_mobility_data->current_plmn_ts) {
- if (cJSON_AddStringToObject(item, "currentPlmnTs", access_and_mobility_data->current_plmn_ts) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [current_plmn_ts]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "currentPlmnTs", access_and_mobility_data->current_plmn_ts) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [current_plmn_ts]");
+ goto end;
+ }
}
if (access_and_mobility_data->rat_type) {
- cJSON *rat_type = cJSON_AddArrayToObject(item, "ratType");
- if (rat_type == NULL) {
+ cJSON *rat_type = cJSON_AddArrayToObject(item, "ratType");
+ if (rat_type == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [rat_type]");
+ goto end;
+ }
+ OpenAPI_lnode_t *rat_type_node;
+ OpenAPI_list_for_each(access_and_mobility_data->rat_type, rat_type_node) {
+ if (cJSON_AddStringToObject(rat_type, "", OpenAPI_rat_type_ToString((intptr_t)rat_type_node->data)) == NULL) {
ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [rat_type]");
goto end;
}
- OpenAPI_lnode_t *rat_type_node;
- OpenAPI_list_for_each(access_and_mobility_data->rat_type, rat_type_node) {
- if (cJSON_AddStringToObject(rat_type, "", OpenAPI_rat_type_ToString((intptr_t)rat_type_node->data)) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [rat_type]");
- goto end;
- }
- }
+ }
}
if (access_and_mobility_data->rat_types_ts) {
- if (cJSON_AddStringToObject(item, "ratTypesTs", access_and_mobility_data->rat_types_ts) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [rat_types_ts]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "ratTypesTs", access_and_mobility_data->rat_types_ts) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [rat_types_ts]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_data->supp_feat) {
+ if (cJSON_AddStringToObject(item, "suppFeat", access_and_mobility_data->supp_feat) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [supp_feat]");
+ goto end;
+ }
}
end:
@@ -289,211 +299,220 @@ OpenAPI_access_and_mobility_data_t *OpenAPI_access_and_mobility_data_parseFromJS
cJSON *location = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "location");
OpenAPI_user_location_t *location_local_nonprim = NULL;
- if (location) {
- location_local_nonprim = OpenAPI_user_location_parseFromJSON(location);
+ if (location) {
+ location_local_nonprim = OpenAPI_user_location_parseFromJSON(location);
}
cJSON *location_ts = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "locationTs");
- if (location_ts) {
- if (!cJSON_IsString(location_ts)) {
- ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [location_ts]");
- goto end;
- }
+ if (location_ts) {
+ if (!cJSON_IsString(location_ts)) {
+ ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [location_ts]");
+ goto end;
+ }
}
cJSON *time_zone = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "timeZone");
- if (time_zone) {
- if (!cJSON_IsString(time_zone)) {
- ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [time_zone]");
- goto end;
- }
+ if (time_zone) {
+ if (!cJSON_IsString(time_zone)) {
+ ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [time_zone]");
+ goto end;
+ }
}
cJSON *time_zone_ts = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "timeZoneTs");
- if (time_zone_ts) {
- if (!cJSON_IsString(time_zone_ts)) {
- ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [time_zone_ts]");
- goto end;
- }
+ if (time_zone_ts) {
+ if (!cJSON_IsString(time_zone_ts)) {
+ ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [time_zone_ts]");
+ goto end;
+ }
}
cJSON *access_type = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "accessType");
OpenAPI_access_type_e access_typeVariable;
- if (access_type) {
- if (!cJSON_IsString(access_type)) {
- ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [access_type]");
- goto end;
- }
- access_typeVariable = OpenAPI_access_type_FromString(access_type->valuestring);
+ if (access_type) {
+ if (!cJSON_IsString(access_type)) {
+ ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [access_type]");
+ goto end;
+ }
+ access_typeVariable = OpenAPI_access_type_FromString(access_type->valuestring);
}
cJSON *reg_states = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "regStates");
OpenAPI_list_t *reg_statesList;
- if (reg_states) {
- cJSON *reg_states_local_nonprimitive;
- if (!cJSON_IsArray(reg_states)) {
+ if (reg_states) {
+ cJSON *reg_states_local_nonprimitive;
+ if (!cJSON_IsArray(reg_states)){
+ ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [reg_states]");
+ goto end;
+ }
+
+ reg_statesList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(reg_states_local_nonprimitive, reg_states ) {
+ if (!cJSON_IsObject(reg_states_local_nonprimitive)) {
ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [reg_states]");
goto end;
}
+ OpenAPI_rm_info_t *reg_statesItem = OpenAPI_rm_info_parseFromJSON(reg_states_local_nonprimitive);
- reg_statesList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(reg_states_local_nonprimitive, reg_states ) {
- if (!cJSON_IsObject(reg_states_local_nonprimitive)) {
- ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [reg_states]");
- goto end;
- }
- OpenAPI_rm_info_t *reg_statesItem = OpenAPI_rm_info_parseFromJSON(reg_states_local_nonprimitive);
-
- OpenAPI_list_add(reg_statesList, reg_statesItem);
- }
+ OpenAPI_list_add(reg_statesList, reg_statesItem);
+ }
}
cJSON *reg_states_ts = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "regStatesTs");
- if (reg_states_ts) {
- if (!cJSON_IsString(reg_states_ts)) {
- ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [reg_states_ts]");
- goto end;
- }
+ if (reg_states_ts) {
+ if (!cJSON_IsString(reg_states_ts)) {
+ ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [reg_states_ts]");
+ goto end;
+ }
}
cJSON *conn_states = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "connStates");
OpenAPI_list_t *conn_statesList;
- if (conn_states) {
- cJSON *conn_states_local_nonprimitive;
- if (!cJSON_IsArray(conn_states)) {
+ if (conn_states) {
+ cJSON *conn_states_local_nonprimitive;
+ if (!cJSON_IsArray(conn_states)){
+ ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [conn_states]");
+ goto end;
+ }
+
+ conn_statesList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(conn_states_local_nonprimitive, conn_states ) {
+ if (!cJSON_IsObject(conn_states_local_nonprimitive)) {
ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [conn_states]");
goto end;
}
+ OpenAPI_cm_info_t *conn_statesItem = OpenAPI_cm_info_parseFromJSON(conn_states_local_nonprimitive);
- conn_statesList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(conn_states_local_nonprimitive, conn_states ) {
- if (!cJSON_IsObject(conn_states_local_nonprimitive)) {
- ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [conn_states]");
- goto end;
- }
- OpenAPI_cm_info_t *conn_statesItem = OpenAPI_cm_info_parseFromJSON(conn_states_local_nonprimitive);
-
- OpenAPI_list_add(conn_statesList, conn_statesItem);
- }
+ OpenAPI_list_add(conn_statesList, conn_statesItem);
+ }
}
cJSON *conn_states_ts = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "connStatesTs");
- if (conn_states_ts) {
- if (!cJSON_IsString(conn_states_ts)) {
- ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [conn_states_ts]");
- goto end;
- }
+ if (conn_states_ts) {
+ if (!cJSON_IsString(conn_states_ts)) {
+ ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [conn_states_ts]");
+ goto end;
+ }
}
cJSON *reachability_status = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "reachabilityStatus");
OpenAPI_ue_reachability_t *reachability_status_local_nonprim = NULL;
- if (reachability_status) {
- reachability_status_local_nonprim = OpenAPI_ue_reachability_parseFromJSON(reachability_status);
+ if (reachability_status) {
+ reachability_status_local_nonprim = OpenAPI_ue_reachability_parseFromJSON(reachability_status);
}
cJSON *reachability_status_ts = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "reachabilityStatusTs");
- if (reachability_status_ts) {
- if (!cJSON_IsString(reachability_status_ts)) {
- ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [reachability_status_ts]");
- goto end;
- }
+ if (reachability_status_ts) {
+ if (!cJSON_IsString(reachability_status_ts)) {
+ ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [reachability_status_ts]");
+ goto end;
+ }
}
cJSON *sms_over_nas_status = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "smsOverNasStatus");
OpenAPI_sms_support_e sms_over_nas_statusVariable;
- if (sms_over_nas_status) {
- if (!cJSON_IsString(sms_over_nas_status)) {
- ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [sms_over_nas_status]");
- goto end;
- }
- sms_over_nas_statusVariable = OpenAPI_sms_support_FromString(sms_over_nas_status->valuestring);
+ if (sms_over_nas_status) {
+ if (!cJSON_IsString(sms_over_nas_status)) {
+ ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [sms_over_nas_status]");
+ goto end;
+ }
+ sms_over_nas_statusVariable = OpenAPI_sms_support_FromString(sms_over_nas_status->valuestring);
}
cJSON *sms_over_nas_status_ts = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "smsOverNasStatusTs");
- if (sms_over_nas_status_ts) {
- if (!cJSON_IsString(sms_over_nas_status_ts)) {
- ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [sms_over_nas_status_ts]");
- goto end;
- }
+ if (sms_over_nas_status_ts) {
+ if (!cJSON_IsString(sms_over_nas_status_ts)) {
+ ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [sms_over_nas_status_ts]");
+ goto end;
+ }
}
cJSON *roaming_status = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "roamingStatus");
- if (roaming_status) {
- if (!cJSON_IsBool(roaming_status)) {
- ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [roaming_status]");
- goto end;
- }
+ if (roaming_status) {
+ if (!cJSON_IsBool(roaming_status)) {
+ ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [roaming_status]");
+ goto end;
+ }
}
cJSON *roaming_status_ts = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "roamingStatusTs");
- if (roaming_status_ts) {
- if (!cJSON_IsString(roaming_status_ts)) {
- ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [roaming_status_ts]");
- goto end;
- }
+ if (roaming_status_ts) {
+ if (!cJSON_IsString(roaming_status_ts)) {
+ ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [roaming_status_ts]");
+ goto end;
+ }
}
cJSON *current_plmn = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "currentPlmn");
- OpenAPI_plmn_id_t *current_plmn_local_nonprim = NULL;
- if (current_plmn) {
- current_plmn_local_nonprim = OpenAPI_plmn_id_parseFromJSON(current_plmn);
+ OpenAPI_plmn_id_1_t *current_plmn_local_nonprim = NULL;
+ if (current_plmn) {
+ current_plmn_local_nonprim = OpenAPI_plmn_id_1_parseFromJSON(current_plmn);
}
cJSON *current_plmn_ts = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "currentPlmnTs");
- if (current_plmn_ts) {
- if (!cJSON_IsString(current_plmn_ts)) {
- ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [current_plmn_ts]");
- goto end;
- }
+ if (current_plmn_ts) {
+ if (!cJSON_IsString(current_plmn_ts)) {
+ ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [current_plmn_ts]");
+ goto end;
+ }
}
cJSON *rat_type = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "ratType");
OpenAPI_list_t *rat_typeList;
- if (rat_type) {
- cJSON *rat_type_local_nonprimitive;
- if (!cJSON_IsArray(rat_type)) {
+ if (rat_type) {
+ cJSON *rat_type_local_nonprimitive;
+ if (!cJSON_IsArray(rat_type)) {
+ ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [rat_type]");
+ goto end;
+ }
+
+ rat_typeList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(rat_type_local_nonprimitive, rat_type ) {
+ if (!cJSON_IsString(rat_type_local_nonprimitive)){
ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [rat_type]");
goto end;
}
- rat_typeList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(rat_type_local_nonprimitive, rat_type ) {
- if (!cJSON_IsString(rat_type_local_nonprimitive)) {
- ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [rat_type]");
- goto end;
- }
-
- OpenAPI_list_add(rat_typeList, (void *)OpenAPI_rat_type_FromString(rat_type_local_nonprimitive->valuestring));
- }
+ OpenAPI_list_add(rat_typeList, (void *)OpenAPI_rat_type_FromString(rat_type_local_nonprimitive->valuestring));
+ }
}
cJSON *rat_types_ts = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "ratTypesTs");
- if (rat_types_ts) {
- if (!cJSON_IsString(rat_types_ts)) {
- ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [rat_types_ts]");
- goto end;
- }
+ if (rat_types_ts) {
+ if (!cJSON_IsString(rat_types_ts)) {
+ ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [rat_types_ts]");
+ goto end;
+ }
+ }
+
+ cJSON *supp_feat = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "suppFeat");
+
+ if (supp_feat) {
+ if (!cJSON_IsString(supp_feat)) {
+ ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON() failed [supp_feat]");
+ goto end;
+ }
}
access_and_mobility_data_local_var = OpenAPI_access_and_mobility_data_create (
@@ -515,8 +534,9 @@ OpenAPI_access_and_mobility_data_t *OpenAPI_access_and_mobility_data_parseFromJS
current_plmn ? current_plmn_local_nonprim : NULL,
current_plmn_ts ? ogs_strdup_or_assert(current_plmn_ts->valuestring) : NULL,
rat_type ? rat_typeList : NULL,
- rat_types_ts ? ogs_strdup_or_assert(rat_types_ts->valuestring) : NULL
- );
+ rat_types_ts ? ogs_strdup_or_assert(rat_types_ts->valuestring) : NULL,
+ supp_feat ? ogs_strdup_or_assert(supp_feat->valuestring) : NULL
+ );
return access_and_mobility_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/access_and_mobility_data.h b/lib/sbi/openapi/model/access_and_mobility_data.h
index f8c027fa4..3e6505c67 100644
--- a/lib/sbi/openapi/model/access_and_mobility_data.h
+++ b/lib/sbi/openapi/model/access_and_mobility_data.h
@@ -1,7 +1,7 @@
/*
* access_and_mobility_data.h
*
- *
+ *
*/
#ifndef _OpenAPI_access_and_mobility_data_H_
@@ -14,7 +14,7 @@
#include "../include/binary.h"
#include "access_type.h"
#include "cm_info.h"
-#include "plmn_id.h"
+#include "plmn_id_1.h"
#include "rat_type.h"
#include "rm_info.h"
#include "sms_support.h"
@@ -42,10 +42,11 @@ typedef struct OpenAPI_access_and_mobility_data_s {
char *sms_over_nas_status_ts;
int roaming_status;
char *roaming_status_ts;
- struct OpenAPI_plmn_id_s *current_plmn;
+ struct OpenAPI_plmn_id_1_s *current_plmn;
char *current_plmn_ts;
OpenAPI_list_t *rat_type;
char *rat_types_ts;
+ char *supp_feat;
} OpenAPI_access_and_mobility_data_t;
OpenAPI_access_and_mobility_data_t *OpenAPI_access_and_mobility_data_create(
@@ -64,11 +65,12 @@ OpenAPI_access_and_mobility_data_t *OpenAPI_access_and_mobility_data_create(
char *sms_over_nas_status_ts,
int roaming_status,
char *roaming_status_ts,
- OpenAPI_plmn_id_t *current_plmn,
+ OpenAPI_plmn_id_1_t *current_plmn,
char *current_plmn_ts,
OpenAPI_list_t *rat_type,
- char *rat_types_ts
- );
+ char *rat_types_ts,
+ char *supp_feat
+);
void OpenAPI_access_and_mobility_data_free(OpenAPI_access_and_mobility_data_t *access_and_mobility_data);
OpenAPI_access_and_mobility_data_t *OpenAPI_access_and_mobility_data_parseFromJSON(cJSON *access_and_mobility_dataJSON);
cJSON *OpenAPI_access_and_mobility_data_convertToJSON(OpenAPI_access_and_mobility_data_t *access_and_mobility_data);
diff --git a/lib/sbi/openapi/model/access_and_mobility_subscription_data.c b/lib/sbi/openapi/model/access_and_mobility_subscription_data.c
index 96057a03e..1ca781cb3 100644
--- a/lib/sbi/openapi/model/access_and_mobility_subscription_data.c
+++ b/lib/sbi/openapi/model/access_and_mobility_subscription_data.c
@@ -33,13 +33,13 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub
int service_gap_time,
OpenAPI_mdt_user_consent_e mdt_user_consent,
OpenAPI_mdt_configuration_t *mdt_configuration,
- OpenAPI_trace_data_t *trace_data,
+ OpenAPI_trace_data_1_t *trace_data,
OpenAPI_cag_data_t *cag_data,
char *stn_sr,
char *c_msisdn,
- int nb_io_t_ue_priority,
+ int nb_io_tue_priority,
int nssai_inclusion_allowed,
- char rg_wireline_characteristics,
+ char *rg_wireline_characteristics,
OpenAPI_ec_restriction_data_wb_t *ec_restriction_data_wb,
int ec_restriction_data_nb,
OpenAPI_expected_ue_behaviour_data_t *expected_ue_behaviour_list,
@@ -50,7 +50,7 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub
int iab_operation_allowed,
OpenAPI_list_t *wireline_forbidden_areas,
OpenAPI_wireline_service_area_restriction_t *wireline_service_area_restriction
- )
+)
{
OpenAPI_access_and_mobility_subscription_data_t *access_and_mobility_subscription_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_access_and_mobility_subscription_data_t));
if (!access_and_mobility_subscription_data_local_var) {
@@ -88,7 +88,7 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub
access_and_mobility_subscription_data_local_var->cag_data = cag_data;
access_and_mobility_subscription_data_local_var->stn_sr = stn_sr;
access_and_mobility_subscription_data_local_var->c_msisdn = c_msisdn;
- access_and_mobility_subscription_data_local_var->nb_io_t_ue_priority = nb_io_t_ue_priority;
+ access_and_mobility_subscription_data_local_var->nb_io_tue_priority = nb_io_tue_priority;
access_and_mobility_subscription_data_local_var->nssai_inclusion_allowed = nssai_inclusion_allowed;
access_and_mobility_subscription_data_local_var->rg_wireline_characteristics = rg_wireline_characteristics;
access_and_mobility_subscription_data_local_var->ec_restriction_data_wb = ec_restriction_data_wb;
@@ -147,10 +147,11 @@ void OpenAPI_access_and_mobility_subscription_data_free(OpenAPI_access_and_mobil
}
OpenAPI_list_free(access_and_mobility_subscription_data->subscribed_dnn_list);
OpenAPI_mdt_configuration_free(access_and_mobility_subscription_data->mdt_configuration);
- OpenAPI_trace_data_free(access_and_mobility_subscription_data->trace_data);
+ OpenAPI_trace_data_1_free(access_and_mobility_subscription_data->trace_data);
OpenAPI_cag_data_free(access_and_mobility_subscription_data->cag_data);
ogs_free(access_and_mobility_subscription_data->stn_sr);
ogs_free(access_and_mobility_subscription_data->c_msisdn);
+ ogs_free(access_and_mobility_subscription_data->rg_wireline_characteristics);
OpenAPI_ec_restriction_data_wb_free(access_and_mobility_subscription_data->ec_restriction_data_wb);
OpenAPI_expected_ue_behaviour_data_free(access_and_mobility_subscription_data->expected_ue_behaviour_list);
OpenAPI_list_free(access_and_mobility_subscription_data->primary_rat_restrictions);
@@ -182,520 +183,520 @@ cJSON *OpenAPI_access_and_mobility_subscription_data_convertToJSON(OpenAPI_acces
item = cJSON_CreateObject();
if (access_and_mobility_subscription_data->supported_features) {
- if (cJSON_AddStringToObject(item, "supportedFeatures", access_and_mobility_subscription_data->supported_features) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [supported_features]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "supportedFeatures", access_and_mobility_subscription_data->supported_features) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [supported_features]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->gpsis) {
- cJSON *gpsis = cJSON_AddArrayToObject(item, "gpsis");
- if (gpsis == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [gpsis]");
- goto end;
- }
+ cJSON *gpsis = cJSON_AddArrayToObject(item, "gpsis");
+ if (gpsis == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [gpsis]");
+ goto end;
+ }
- OpenAPI_lnode_t *gpsis_node;
- OpenAPI_list_for_each(access_and_mobility_subscription_data->gpsis, gpsis_node) {
- if (cJSON_AddStringToObject(gpsis, "", (char*)gpsis_node->data) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [gpsis]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *gpsis_node;
+ OpenAPI_list_for_each(access_and_mobility_subscription_data->gpsis, gpsis_node) {
+ if (cJSON_AddStringToObject(gpsis, "", (char*)gpsis_node->data) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [gpsis]");
+ goto end;
+ }
+ }
}
if (access_and_mobility_subscription_data->internal_group_ids) {
- cJSON *internal_group_ids = cJSON_AddArrayToObject(item, "internalGroupIds");
- if (internal_group_ids == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [internal_group_ids]");
- goto end;
- }
+ cJSON *internal_group_ids = cJSON_AddArrayToObject(item, "internalGroupIds");
+ if (internal_group_ids == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [internal_group_ids]");
+ goto end;
+ }
- OpenAPI_lnode_t *internal_group_ids_node;
- OpenAPI_list_for_each(access_and_mobility_subscription_data->internal_group_ids, internal_group_ids_node) {
- if (cJSON_AddStringToObject(internal_group_ids, "", (char*)internal_group_ids_node->data) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [internal_group_ids]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *internal_group_ids_node;
+ OpenAPI_list_for_each(access_and_mobility_subscription_data->internal_group_ids, internal_group_ids_node) {
+ if (cJSON_AddStringToObject(internal_group_ids, "", (char*)internal_group_ids_node->data) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [internal_group_ids]");
+ goto end;
+ }
+ }
}
if (access_and_mobility_subscription_data->shared_vn_group_data_ids) {
- cJSON *shared_vn_group_data_ids = cJSON_AddObjectToObject(item, "sharedVnGroupDataIds");
- if (shared_vn_group_data_ids == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [shared_vn_group_data_ids]");
- goto end;
- }
- cJSON *localMapObject = shared_vn_group_data_ids;
- OpenAPI_lnode_t *shared_vn_group_data_ids_node;
- if (access_and_mobility_subscription_data->shared_vn_group_data_ids) {
- OpenAPI_list_for_each(access_and_mobility_subscription_data->shared_vn_group_data_ids, shared_vn_group_data_ids_node) {
- OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)shared_vn_group_data_ids_node->data;
+ cJSON *shared_vn_group_data_ids = cJSON_AddObjectToObject(item, "sharedVnGroupDataIds");
+ if (shared_vn_group_data_ids == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [shared_vn_group_data_ids]");
+ goto end;
+ }
+ cJSON *localMapObject = shared_vn_group_data_ids;
+ OpenAPI_lnode_t *shared_vn_group_data_ids_node;
+ if (access_and_mobility_subscription_data->shared_vn_group_data_ids) {
+ OpenAPI_list_for_each(access_and_mobility_subscription_data->shared_vn_group_data_ids, shared_vn_group_data_ids_node) {
+ OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)shared_vn_group_data_ids_node->data;
}
}
}
if (access_and_mobility_subscription_data->subscribed_ue_ambr) {
- cJSON *subscribed_ue_ambr_local_JSON = OpenAPI_ambr_rm_convertToJSON(access_and_mobility_subscription_data->subscribed_ue_ambr);
- if (subscribed_ue_ambr_local_JSON == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [subscribed_ue_ambr]");
- goto end;
- }
- cJSON_AddItemToObject(item, "subscribedUeAmbr", subscribed_ue_ambr_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [subscribed_ue_ambr]");
- goto end;
- }
+ cJSON *subscribed_ue_ambr_local_JSON = OpenAPI_ambr_rm_convertToJSON(access_and_mobility_subscription_data->subscribed_ue_ambr);
+ if (subscribed_ue_ambr_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [subscribed_ue_ambr]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "subscribedUeAmbr", subscribed_ue_ambr_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [subscribed_ue_ambr]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->nssai) {
- cJSON *nssai_local_JSON = OpenAPI_nssai_convertToJSON(access_and_mobility_subscription_data->nssai);
- if (nssai_local_JSON == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [nssai]");
- goto end;
- }
- cJSON_AddItemToObject(item, "nssai", nssai_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [nssai]");
- goto end;
- }
+ cJSON *nssai_local_JSON = OpenAPI_nssai_convertToJSON(access_and_mobility_subscription_data->nssai);
+ if (nssai_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [nssai]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "nssai", nssai_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [nssai]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->rat_restrictions) {
- cJSON *rat_restrictions = cJSON_AddArrayToObject(item, "ratRestrictions");
- if (rat_restrictions == NULL) {
+ cJSON *rat_restrictions = cJSON_AddArrayToObject(item, "ratRestrictions");
+ if (rat_restrictions == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [rat_restrictions]");
+ goto end;
+ }
+ OpenAPI_lnode_t *rat_restrictions_node;
+ OpenAPI_list_for_each(access_and_mobility_subscription_data->rat_restrictions, rat_restrictions_node) {
+ if (cJSON_AddStringToObject(rat_restrictions, "", OpenAPI_rat_type_ToString((intptr_t)rat_restrictions_node->data)) == NULL) {
ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [rat_restrictions]");
goto end;
}
- OpenAPI_lnode_t *rat_restrictions_node;
- OpenAPI_list_for_each(access_and_mobility_subscription_data->rat_restrictions, rat_restrictions_node) {
- if (cJSON_AddStringToObject(rat_restrictions, "", OpenAPI_rat_type_ToString((intptr_t)rat_restrictions_node->data)) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [rat_restrictions]");
- goto end;
- }
- }
+ }
}
if (access_and_mobility_subscription_data->forbidden_areas) {
- cJSON *forbidden_areasList = cJSON_AddArrayToObject(item, "forbiddenAreas");
- if (forbidden_areasList == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [forbidden_areas]");
- goto end;
- }
+ cJSON *forbidden_areasList = cJSON_AddArrayToObject(item, "forbiddenAreas");
+ if (forbidden_areasList == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [forbidden_areas]");
+ goto end;
+ }
- OpenAPI_lnode_t *forbidden_areas_node;
- if (access_and_mobility_subscription_data->forbidden_areas) {
- OpenAPI_list_for_each(access_and_mobility_subscription_data->forbidden_areas, forbidden_areas_node) {
- cJSON *itemLocal = OpenAPI_area_convertToJSON(forbidden_areas_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [forbidden_areas]");
- goto end;
- }
- cJSON_AddItemToArray(forbidden_areasList, itemLocal);
+ OpenAPI_lnode_t *forbidden_areas_node;
+ if (access_and_mobility_subscription_data->forbidden_areas) {
+ OpenAPI_list_for_each(access_and_mobility_subscription_data->forbidden_areas, forbidden_areas_node) {
+ cJSON *itemLocal = OpenAPI_area_convertToJSON(forbidden_areas_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [forbidden_areas]");
+ goto end;
}
+ cJSON_AddItemToArray(forbidden_areasList, itemLocal);
}
}
+ }
if (access_and_mobility_subscription_data->service_area_restriction) {
- cJSON *service_area_restriction_local_JSON = OpenAPI_service_area_restriction_convertToJSON(access_and_mobility_subscription_data->service_area_restriction);
- if (service_area_restriction_local_JSON == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [service_area_restriction]");
- goto end;
- }
- cJSON_AddItemToObject(item, "serviceAreaRestriction", service_area_restriction_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [service_area_restriction]");
- goto end;
- }
+ cJSON *service_area_restriction_local_JSON = OpenAPI_service_area_restriction_convertToJSON(access_and_mobility_subscription_data->service_area_restriction);
+ if (service_area_restriction_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [service_area_restriction]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "serviceAreaRestriction", service_area_restriction_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [service_area_restriction]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->core_network_type_restrictions) {
- cJSON *core_network_type_restrictions = cJSON_AddArrayToObject(item, "coreNetworkTypeRestrictions");
- if (core_network_type_restrictions == NULL) {
+ cJSON *core_network_type_restrictions = cJSON_AddArrayToObject(item, "coreNetworkTypeRestrictions");
+ if (core_network_type_restrictions == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [core_network_type_restrictions]");
+ goto end;
+ }
+ OpenAPI_lnode_t *core_network_type_restrictions_node;
+ OpenAPI_list_for_each(access_and_mobility_subscription_data->core_network_type_restrictions, core_network_type_restrictions_node) {
+ if (cJSON_AddStringToObject(core_network_type_restrictions, "", OpenAPI_core_network_type_ToString((intptr_t)core_network_type_restrictions_node->data)) == NULL) {
ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [core_network_type_restrictions]");
goto end;
}
- OpenAPI_lnode_t *core_network_type_restrictions_node;
- OpenAPI_list_for_each(access_and_mobility_subscription_data->core_network_type_restrictions, core_network_type_restrictions_node) {
- if (cJSON_AddStringToObject(core_network_type_restrictions, "", OpenAPI_core_network_type_ToString((intptr_t)core_network_type_restrictions_node->data)) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [core_network_type_restrictions]");
- goto end;
- }
- }
+ }
}
if (access_and_mobility_subscription_data->rfsp_index) {
- if (cJSON_AddNumberToObject(item, "rfspIndex", access_and_mobility_subscription_data->rfsp_index) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [rfsp_index]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "rfspIndex", access_and_mobility_subscription_data->rfsp_index) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [rfsp_index]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->subs_reg_timer) {
- if (cJSON_AddNumberToObject(item, "subsRegTimer", access_and_mobility_subscription_data->subs_reg_timer) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [subs_reg_timer]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "subsRegTimer", access_and_mobility_subscription_data->subs_reg_timer) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [subs_reg_timer]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->ue_usage_type) {
- if (cJSON_AddNumberToObject(item, "ueUsageType", access_and_mobility_subscription_data->ue_usage_type) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [ue_usage_type]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "ueUsageType", access_and_mobility_subscription_data->ue_usage_type) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [ue_usage_type]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->mps_priority) {
- if (cJSON_AddBoolToObject(item, "mpsPriority", access_and_mobility_subscription_data->mps_priority) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [mps_priority]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "mpsPriority", access_and_mobility_subscription_data->mps_priority) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [mps_priority]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->mcs_priority) {
- if (cJSON_AddBoolToObject(item, "mcsPriority", access_and_mobility_subscription_data->mcs_priority) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [mcs_priority]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "mcsPriority", access_and_mobility_subscription_data->mcs_priority) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [mcs_priority]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->active_time) {
- if (cJSON_AddNumberToObject(item, "activeTime", access_and_mobility_subscription_data->active_time) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [active_time]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "activeTime", access_and_mobility_subscription_data->active_time) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [active_time]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->sor_info) {
- cJSON *sor_info_local_JSON = OpenAPI_sor_info_convertToJSON(access_and_mobility_subscription_data->sor_info);
- if (sor_info_local_JSON == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [sor_info]");
- goto end;
- }
- cJSON_AddItemToObject(item, "sorInfo", sor_info_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [sor_info]");
- goto end;
- }
+ cJSON *sor_info_local_JSON = OpenAPI_sor_info_convertToJSON(access_and_mobility_subscription_data->sor_info);
+ if (sor_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [sor_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "sorInfo", sor_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [sor_info]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->sor_info_expect_ind) {
- if (cJSON_AddBoolToObject(item, "sorInfoExpectInd", access_and_mobility_subscription_data->sor_info_expect_ind) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [sor_info_expect_ind]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "sorInfoExpectInd", access_and_mobility_subscription_data->sor_info_expect_ind) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [sor_info_expect_ind]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->soraf_retrieval) {
- if (cJSON_AddBoolToObject(item, "sorafRetrieval", access_and_mobility_subscription_data->soraf_retrieval) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [soraf_retrieval]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "sorafRetrieval", access_and_mobility_subscription_data->soraf_retrieval) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [soraf_retrieval]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->sor_update_indicator_list) {
- cJSON *sor_update_indicator_list = cJSON_AddArrayToObject(item, "sorUpdateIndicatorList");
- if (sor_update_indicator_list == NULL) {
+ cJSON *sor_update_indicator_list = cJSON_AddArrayToObject(item, "sorUpdateIndicatorList");
+ if (sor_update_indicator_list == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [sor_update_indicator_list]");
+ goto end;
+ }
+ OpenAPI_lnode_t *sor_update_indicator_list_node;
+ OpenAPI_list_for_each(access_and_mobility_subscription_data->sor_update_indicator_list, sor_update_indicator_list_node) {
+ if (cJSON_AddStringToObject(sor_update_indicator_list, "", OpenAPI_sor_update_indicator_ToString((intptr_t)sor_update_indicator_list_node->data)) == NULL) {
ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [sor_update_indicator_list]");
goto end;
}
- OpenAPI_lnode_t *sor_update_indicator_list_node;
- OpenAPI_list_for_each(access_and_mobility_subscription_data->sor_update_indicator_list, sor_update_indicator_list_node) {
- if (cJSON_AddStringToObject(sor_update_indicator_list, "", OpenAPI_sor_update_indicator_ToString((intptr_t)sor_update_indicator_list_node->data)) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [sor_update_indicator_list]");
- goto end;
- }
- }
+ }
}
if (access_and_mobility_subscription_data->upu_info) {
- cJSON *upu_info_local_JSON = OpenAPI_upu_info_convertToJSON(access_and_mobility_subscription_data->upu_info);
- if (upu_info_local_JSON == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [upu_info]");
- goto end;
- }
- cJSON_AddItemToObject(item, "upuInfo", upu_info_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [upu_info]");
- goto end;
- }
+ cJSON *upu_info_local_JSON = OpenAPI_upu_info_convertToJSON(access_and_mobility_subscription_data->upu_info);
+ if (upu_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [upu_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "upuInfo", upu_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [upu_info]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->mico_allowed) {
- if (cJSON_AddBoolToObject(item, "micoAllowed", access_and_mobility_subscription_data->mico_allowed) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [mico_allowed]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "micoAllowed", access_and_mobility_subscription_data->mico_allowed) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [mico_allowed]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->shared_am_data_ids) {
- cJSON *shared_am_data_ids = cJSON_AddArrayToObject(item, "sharedAmDataIds");
- if (shared_am_data_ids == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [shared_am_data_ids]");
- goto end;
- }
+ cJSON *shared_am_data_ids = cJSON_AddArrayToObject(item, "sharedAmDataIds");
+ if (shared_am_data_ids == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [shared_am_data_ids]");
+ goto end;
+ }
- OpenAPI_lnode_t *shared_am_data_ids_node;
- OpenAPI_list_for_each(access_and_mobility_subscription_data->shared_am_data_ids, shared_am_data_ids_node) {
- if (cJSON_AddStringToObject(shared_am_data_ids, "", (char*)shared_am_data_ids_node->data) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [shared_am_data_ids]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *shared_am_data_ids_node;
+ OpenAPI_list_for_each(access_and_mobility_subscription_data->shared_am_data_ids, shared_am_data_ids_node) {
+ if (cJSON_AddStringToObject(shared_am_data_ids, "", (char*)shared_am_data_ids_node->data) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [shared_am_data_ids]");
+ goto end;
+ }
+ }
}
if (access_and_mobility_subscription_data->odb_packet_services) {
- if (cJSON_AddStringToObject(item, "odbPacketServices", OpenAPI_odb_packet_services_ToString(access_and_mobility_subscription_data->odb_packet_services)) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [odb_packet_services]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "odbPacketServices", OpenAPI_odb_packet_services_ToString(access_and_mobility_subscription_data->odb_packet_services)) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [odb_packet_services]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->subscribed_dnn_list) {
- cJSON *subscribed_dnn_list = cJSON_AddArrayToObject(item, "subscribedDnnList");
- if (subscribed_dnn_list == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [subscribed_dnn_list]");
- goto end;
- }
+ cJSON *subscribed_dnn_list = cJSON_AddArrayToObject(item, "subscribedDnnList");
+ if (subscribed_dnn_list == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [subscribed_dnn_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *subscribed_dnn_list_node;
- OpenAPI_list_for_each(access_and_mobility_subscription_data->subscribed_dnn_list, subscribed_dnn_list_node) {
- if (cJSON_AddStringToObject(subscribed_dnn_list, "", (char*)subscribed_dnn_list_node->data) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [subscribed_dnn_list]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *subscribed_dnn_list_node;
+ OpenAPI_list_for_each(access_and_mobility_subscription_data->subscribed_dnn_list, subscribed_dnn_list_node) {
+ if (cJSON_AddStringToObject(subscribed_dnn_list, "", (char*)subscribed_dnn_list_node->data) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [subscribed_dnn_list]");
+ goto end;
+ }
+ }
}
if (access_and_mobility_subscription_data->service_gap_time) {
- if (cJSON_AddNumberToObject(item, "serviceGapTime", access_and_mobility_subscription_data->service_gap_time) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [service_gap_time]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "serviceGapTime", access_and_mobility_subscription_data->service_gap_time) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [service_gap_time]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->mdt_user_consent) {
- if (cJSON_AddStringToObject(item, "mdtUserConsent", OpenAPI_mdt_user_consent_ToString(access_and_mobility_subscription_data->mdt_user_consent)) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [mdt_user_consent]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "mdtUserConsent", OpenAPI_mdt_user_consent_ToString(access_and_mobility_subscription_data->mdt_user_consent)) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [mdt_user_consent]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->mdt_configuration) {
- cJSON *mdt_configuration_local_JSON = OpenAPI_mdt_configuration_convertToJSON(access_and_mobility_subscription_data->mdt_configuration);
- if (mdt_configuration_local_JSON == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [mdt_configuration]");
- goto end;
- }
- cJSON_AddItemToObject(item, "mdtConfiguration", mdt_configuration_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [mdt_configuration]");
- goto end;
- }
+ cJSON *mdt_configuration_local_JSON = OpenAPI_mdt_configuration_convertToJSON(access_and_mobility_subscription_data->mdt_configuration);
+ if (mdt_configuration_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [mdt_configuration]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "mdtConfiguration", mdt_configuration_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [mdt_configuration]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->trace_data) {
- cJSON *trace_data_local_JSON = OpenAPI_trace_data_convertToJSON(access_and_mobility_subscription_data->trace_data);
- if (trace_data_local_JSON == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [trace_data]");
- goto end;
- }
- cJSON_AddItemToObject(item, "traceData", trace_data_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [trace_data]");
- goto end;
- }
+ cJSON *trace_data_local_JSON = OpenAPI_trace_data_1_convertToJSON(access_and_mobility_subscription_data->trace_data);
+ if (trace_data_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [trace_data]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "traceData", trace_data_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [trace_data]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->cag_data) {
- cJSON *cag_data_local_JSON = OpenAPI_cag_data_convertToJSON(access_and_mobility_subscription_data->cag_data);
- if (cag_data_local_JSON == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [cag_data]");
- goto end;
- }
- cJSON_AddItemToObject(item, "cagData", cag_data_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [cag_data]");
- goto end;
- }
+ cJSON *cag_data_local_JSON = OpenAPI_cag_data_convertToJSON(access_and_mobility_subscription_data->cag_data);
+ if (cag_data_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [cag_data]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "cagData", cag_data_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [cag_data]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->stn_sr) {
- if (cJSON_AddStringToObject(item, "stnSr", access_and_mobility_subscription_data->stn_sr) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [stn_sr]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "stnSr", access_and_mobility_subscription_data->stn_sr) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [stn_sr]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->c_msisdn) {
- if (cJSON_AddStringToObject(item, "cMsisdn", access_and_mobility_subscription_data->c_msisdn) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [c_msisdn]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "cMsisdn", access_and_mobility_subscription_data->c_msisdn) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [c_msisdn]");
+ goto end;
+ }
}
- if (access_and_mobility_subscription_data->nb_io_t_ue_priority) {
- if (cJSON_AddNumberToObject(item, "nbIoTUePriority", access_and_mobility_subscription_data->nb_io_t_ue_priority) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [nb_io_t_ue_priority]");
- goto end;
- }
+ if (access_and_mobility_subscription_data->nb_io_tue_priority) {
+ if (cJSON_AddNumberToObject(item, "nbIoTUePriority", access_and_mobility_subscription_data->nb_io_tue_priority) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [nb_io_tue_priority]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->nssai_inclusion_allowed) {
- if (cJSON_AddBoolToObject(item, "nssaiInclusionAllowed", access_and_mobility_subscription_data->nssai_inclusion_allowed) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [nssai_inclusion_allowed]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "nssaiInclusionAllowed", access_and_mobility_subscription_data->nssai_inclusion_allowed) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [nssai_inclusion_allowed]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->rg_wireline_characteristics) {
- if (cJSON_AddNumberToObject(item, "rgWirelineCharacteristics", access_and_mobility_subscription_data->rg_wireline_characteristics) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [rg_wireline_characteristics]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "rgWirelineCharacteristics", access_and_mobility_subscription_data->rg_wireline_characteristics) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [rg_wireline_characteristics]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->ec_restriction_data_wb) {
- cJSON *ec_restriction_data_wb_local_JSON = OpenAPI_ec_restriction_data_wb_convertToJSON(access_and_mobility_subscription_data->ec_restriction_data_wb);
- if (ec_restriction_data_wb_local_JSON == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [ec_restriction_data_wb]");
- goto end;
- }
- cJSON_AddItemToObject(item, "ecRestrictionDataWb", ec_restriction_data_wb_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [ec_restriction_data_wb]");
- goto end;
- }
+ cJSON *ec_restriction_data_wb_local_JSON = OpenAPI_ec_restriction_data_wb_convertToJSON(access_and_mobility_subscription_data->ec_restriction_data_wb);
+ if (ec_restriction_data_wb_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [ec_restriction_data_wb]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "ecRestrictionDataWb", ec_restriction_data_wb_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [ec_restriction_data_wb]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->ec_restriction_data_nb) {
- if (cJSON_AddBoolToObject(item, "ecRestrictionDataNb", access_and_mobility_subscription_data->ec_restriction_data_nb) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [ec_restriction_data_nb]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "ecRestrictionDataNb", access_and_mobility_subscription_data->ec_restriction_data_nb) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [ec_restriction_data_nb]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->expected_ue_behaviour_list) {
- cJSON *expected_ue_behaviour_list_local_JSON = OpenAPI_expected_ue_behaviour_data_convertToJSON(access_and_mobility_subscription_data->expected_ue_behaviour_list);
- if (expected_ue_behaviour_list_local_JSON == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [expected_ue_behaviour_list]");
- goto end;
- }
- cJSON_AddItemToObject(item, "expectedUeBehaviourList", expected_ue_behaviour_list_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [expected_ue_behaviour_list]");
- goto end;
- }
+ cJSON *expected_ue_behaviour_list_local_JSON = OpenAPI_expected_ue_behaviour_data_convertToJSON(access_and_mobility_subscription_data->expected_ue_behaviour_list);
+ if (expected_ue_behaviour_list_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [expected_ue_behaviour_list]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "expectedUeBehaviourList", expected_ue_behaviour_list_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [expected_ue_behaviour_list]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->primary_rat_restrictions) {
- cJSON *primary_rat_restrictions = cJSON_AddArrayToObject(item, "primaryRatRestrictions");
- if (primary_rat_restrictions == NULL) {
+ cJSON *primary_rat_restrictions = cJSON_AddArrayToObject(item, "primaryRatRestrictions");
+ if (primary_rat_restrictions == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [primary_rat_restrictions]");
+ goto end;
+ }
+ OpenAPI_lnode_t *primary_rat_restrictions_node;
+ OpenAPI_list_for_each(access_and_mobility_subscription_data->primary_rat_restrictions, primary_rat_restrictions_node) {
+ if (cJSON_AddStringToObject(primary_rat_restrictions, "", OpenAPI_rat_type_ToString((intptr_t)primary_rat_restrictions_node->data)) == NULL) {
ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [primary_rat_restrictions]");
goto end;
}
- OpenAPI_lnode_t *primary_rat_restrictions_node;
- OpenAPI_list_for_each(access_and_mobility_subscription_data->primary_rat_restrictions, primary_rat_restrictions_node) {
- if (cJSON_AddStringToObject(primary_rat_restrictions, "", OpenAPI_rat_type_ToString((intptr_t)primary_rat_restrictions_node->data)) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [primary_rat_restrictions]");
- goto end;
- }
- }
+ }
}
if (access_and_mobility_subscription_data->secondary_rat_restrictions) {
- cJSON *secondary_rat_restrictions = cJSON_AddArrayToObject(item, "secondaryRatRestrictions");
- if (secondary_rat_restrictions == NULL) {
+ cJSON *secondary_rat_restrictions = cJSON_AddArrayToObject(item, "secondaryRatRestrictions");
+ if (secondary_rat_restrictions == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [secondary_rat_restrictions]");
+ goto end;
+ }
+ OpenAPI_lnode_t *secondary_rat_restrictions_node;
+ OpenAPI_list_for_each(access_and_mobility_subscription_data->secondary_rat_restrictions, secondary_rat_restrictions_node) {
+ if (cJSON_AddStringToObject(secondary_rat_restrictions, "", OpenAPI_rat_type_ToString((intptr_t)secondary_rat_restrictions_node->data)) == NULL) {
ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [secondary_rat_restrictions]");
goto end;
}
- OpenAPI_lnode_t *secondary_rat_restrictions_node;
- OpenAPI_list_for_each(access_and_mobility_subscription_data->secondary_rat_restrictions, secondary_rat_restrictions_node) {
- if (cJSON_AddStringToObject(secondary_rat_restrictions, "", OpenAPI_rat_type_ToString((intptr_t)secondary_rat_restrictions_node->data)) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [secondary_rat_restrictions]");
- goto end;
- }
- }
+ }
}
if (access_and_mobility_subscription_data->edrx_parameters_list) {
- cJSON *edrx_parameters_listList = cJSON_AddArrayToObject(item, "edrxParametersList");
- if (edrx_parameters_listList == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [edrx_parameters_list]");
- goto end;
- }
+ cJSON *edrx_parameters_listList = cJSON_AddArrayToObject(item, "edrxParametersList");
+ if (edrx_parameters_listList == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [edrx_parameters_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *edrx_parameters_list_node;
- if (access_and_mobility_subscription_data->edrx_parameters_list) {
- OpenAPI_list_for_each(access_and_mobility_subscription_data->edrx_parameters_list, edrx_parameters_list_node) {
- cJSON *itemLocal = OpenAPI_edrx_parameters_convertToJSON(edrx_parameters_list_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [edrx_parameters_list]");
- goto end;
- }
- cJSON_AddItemToArray(edrx_parameters_listList, itemLocal);
+ OpenAPI_lnode_t *edrx_parameters_list_node;
+ if (access_and_mobility_subscription_data->edrx_parameters_list) {
+ OpenAPI_list_for_each(access_and_mobility_subscription_data->edrx_parameters_list, edrx_parameters_list_node) {
+ cJSON *itemLocal = OpenAPI_edrx_parameters_convertToJSON(edrx_parameters_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [edrx_parameters_list]");
+ goto end;
}
+ cJSON_AddItemToArray(edrx_parameters_listList, itemLocal);
}
}
+ }
if (access_and_mobility_subscription_data->ptw_parameters_list) {
- cJSON *ptw_parameters_listList = cJSON_AddArrayToObject(item, "ptwParametersList");
- if (ptw_parameters_listList == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [ptw_parameters_list]");
- goto end;
- }
+ cJSON *ptw_parameters_listList = cJSON_AddArrayToObject(item, "ptwParametersList");
+ if (ptw_parameters_listList == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [ptw_parameters_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *ptw_parameters_list_node;
- if (access_and_mobility_subscription_data->ptw_parameters_list) {
- OpenAPI_list_for_each(access_and_mobility_subscription_data->ptw_parameters_list, ptw_parameters_list_node) {
- cJSON *itemLocal = OpenAPI_ptw_parameters_convertToJSON(ptw_parameters_list_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [ptw_parameters_list]");
- goto end;
- }
- cJSON_AddItemToArray(ptw_parameters_listList, itemLocal);
+ OpenAPI_lnode_t *ptw_parameters_list_node;
+ if (access_and_mobility_subscription_data->ptw_parameters_list) {
+ OpenAPI_list_for_each(access_and_mobility_subscription_data->ptw_parameters_list, ptw_parameters_list_node) {
+ cJSON *itemLocal = OpenAPI_ptw_parameters_convertToJSON(ptw_parameters_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [ptw_parameters_list]");
+ goto end;
}
+ cJSON_AddItemToArray(ptw_parameters_listList, itemLocal);
}
}
+ }
if (access_and_mobility_subscription_data->iab_operation_allowed) {
- if (cJSON_AddBoolToObject(item, "iabOperationAllowed", access_and_mobility_subscription_data->iab_operation_allowed) == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [iab_operation_allowed]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "iabOperationAllowed", access_and_mobility_subscription_data->iab_operation_allowed) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [iab_operation_allowed]");
+ goto end;
+ }
}
if (access_and_mobility_subscription_data->wireline_forbidden_areas) {
- cJSON *wireline_forbidden_areasList = cJSON_AddArrayToObject(item, "wirelineForbiddenAreas");
- if (wireline_forbidden_areasList == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [wireline_forbidden_areas]");
- goto end;
- }
+ cJSON *wireline_forbidden_areasList = cJSON_AddArrayToObject(item, "wirelineForbiddenAreas");
+ if (wireline_forbidden_areasList == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [wireline_forbidden_areas]");
+ goto end;
+ }
- OpenAPI_lnode_t *wireline_forbidden_areas_node;
- if (access_and_mobility_subscription_data->wireline_forbidden_areas) {
- OpenAPI_list_for_each(access_and_mobility_subscription_data->wireline_forbidden_areas, wireline_forbidden_areas_node) {
- cJSON *itemLocal = OpenAPI_wireline_area_convertToJSON(wireline_forbidden_areas_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [wireline_forbidden_areas]");
- goto end;
- }
- cJSON_AddItemToArray(wireline_forbidden_areasList, itemLocal);
+ OpenAPI_lnode_t *wireline_forbidden_areas_node;
+ if (access_and_mobility_subscription_data->wireline_forbidden_areas) {
+ OpenAPI_list_for_each(access_and_mobility_subscription_data->wireline_forbidden_areas, wireline_forbidden_areas_node) {
+ cJSON *itemLocal = OpenAPI_wireline_area_convertToJSON(wireline_forbidden_areas_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [wireline_forbidden_areas]");
+ goto end;
}
+ cJSON_AddItemToArray(wireline_forbidden_areasList, itemLocal);
}
}
+ }
if (access_and_mobility_subscription_data->wireline_service_area_restriction) {
- cJSON *wireline_service_area_restriction_local_JSON = OpenAPI_wireline_service_area_restriction_convertToJSON(access_and_mobility_subscription_data->wireline_service_area_restriction);
- if (wireline_service_area_restriction_local_JSON == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [wireline_service_area_restriction]");
- goto end;
- }
- cJSON_AddItemToObject(item, "wirelineServiceAreaRestriction", wireline_service_area_restriction_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [wireline_service_area_restriction]");
- goto end;
- }
+ cJSON *wireline_service_area_restriction_local_JSON = OpenAPI_wireline_service_area_restriction_convertToJSON(access_and_mobility_subscription_data->wireline_service_area_restriction);
+ if (wireline_service_area_restriction_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [wireline_service_area_restriction]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "wirelineServiceAreaRestriction", wireline_service_area_restriction_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [wireline_service_area_restriction]");
+ goto end;
+ }
}
end:
@@ -707,562 +708,562 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub
OpenAPI_access_and_mobility_subscription_data_t *access_and_mobility_subscription_data_local_var = NULL;
cJSON *supported_features = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "supportedFeatures");
- if (supported_features) {
- if (!cJSON_IsString(supported_features)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [supported_features]");
- goto end;
- }
+ if (supported_features) {
+ if (!cJSON_IsString(supported_features)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [supported_features]");
+ goto end;
+ }
}
cJSON *gpsis = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "gpsis");
OpenAPI_list_t *gpsisList;
- if (gpsis) {
- cJSON *gpsis_local;
- if (!cJSON_IsArray(gpsis)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [gpsis]");
- goto end;
- }
- gpsisList = OpenAPI_list_create();
+ if (gpsis) {
+ cJSON *gpsis_local;
+ if (!cJSON_IsArray(gpsis)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [gpsis]");
+ goto end;
+ }
+ gpsisList = OpenAPI_list_create();
- cJSON_ArrayForEach(gpsis_local, gpsis) {
- if (!cJSON_IsString(gpsis_local)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [gpsis]");
- goto end;
- }
- OpenAPI_list_add(gpsisList, ogs_strdup_or_assert(gpsis_local->valuestring));
- }
+ cJSON_ArrayForEach(gpsis_local, gpsis) {
+ if (!cJSON_IsString(gpsis_local)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [gpsis]");
+ goto end;
+ }
+ OpenAPI_list_add(gpsisList , ogs_strdup_or_assert(gpsis_local->valuestring));
+ }
}
cJSON *internal_group_ids = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "internalGroupIds");
OpenAPI_list_t *internal_group_idsList;
- if (internal_group_ids) {
- cJSON *internal_group_ids_local;
- if (!cJSON_IsArray(internal_group_ids)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [internal_group_ids]");
- goto end;
- }
- internal_group_idsList = OpenAPI_list_create();
+ if (internal_group_ids) {
+ cJSON *internal_group_ids_local;
+ if (!cJSON_IsArray(internal_group_ids)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [internal_group_ids]");
+ goto end;
+ }
+ internal_group_idsList = OpenAPI_list_create();
- cJSON_ArrayForEach(internal_group_ids_local, internal_group_ids) {
- if (!cJSON_IsString(internal_group_ids_local)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [internal_group_ids]");
- goto end;
- }
- OpenAPI_list_add(internal_group_idsList, ogs_strdup_or_assert(internal_group_ids_local->valuestring));
- }
+ cJSON_ArrayForEach(internal_group_ids_local, internal_group_ids) {
+ if (!cJSON_IsString(internal_group_ids_local)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [internal_group_ids]");
+ goto end;
+ }
+ OpenAPI_list_add(internal_group_idsList , ogs_strdup_or_assert(internal_group_ids_local->valuestring));
+ }
}
cJSON *shared_vn_group_data_ids = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "sharedVnGroupDataIds");
OpenAPI_list_t *shared_vn_group_data_idsList;
- if (shared_vn_group_data_ids) {
- cJSON *shared_vn_group_data_ids_local_map;
- if (!cJSON_IsObject(shared_vn_group_data_ids)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [shared_vn_group_data_ids]");
- goto end;
- }
- shared_vn_group_data_idsList = OpenAPI_list_create();
- OpenAPI_map_t *localMapKeyPair = NULL;
- cJSON_ArrayForEach(shared_vn_group_data_ids_local_map, shared_vn_group_data_ids) {
- cJSON *localMapObject = shared_vn_group_data_ids_local_map;
- OpenAPI_list_add(shared_vn_group_data_idsList, localMapKeyPair);
- }
+ if (shared_vn_group_data_ids) {
+ cJSON *shared_vn_group_data_ids_local_map;
+ if (!cJSON_IsObject(shared_vn_group_data_ids)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [shared_vn_group_data_ids]");
+ goto end;
+ }
+ shared_vn_group_data_idsList = OpenAPI_list_create();
+ OpenAPI_map_t *localMapKeyPair = NULL;
+ cJSON_ArrayForEach(shared_vn_group_data_ids_local_map, shared_vn_group_data_ids) {
+ cJSON *localMapObject = shared_vn_group_data_ids_local_map;
+ OpenAPI_list_add(shared_vn_group_data_idsList , localMapKeyPair);
+ }
}
cJSON *subscribed_ue_ambr = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "subscribedUeAmbr");
OpenAPI_ambr_rm_t *subscribed_ue_ambr_local_nonprim = NULL;
- if (subscribed_ue_ambr) {
- subscribed_ue_ambr_local_nonprim = OpenAPI_ambr_rm_parseFromJSON(subscribed_ue_ambr);
+ if (subscribed_ue_ambr) {
+ subscribed_ue_ambr_local_nonprim = OpenAPI_ambr_rm_parseFromJSON(subscribed_ue_ambr);
}
cJSON *nssai = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "nssai");
OpenAPI_nssai_t *nssai_local_nonprim = NULL;
- if (nssai) {
- nssai_local_nonprim = OpenAPI_nssai_parseFromJSON(nssai);
+ if (nssai) {
+ nssai_local_nonprim = OpenAPI_nssai_parseFromJSON(nssai);
}
cJSON *rat_restrictions = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "ratRestrictions");
OpenAPI_list_t *rat_restrictionsList;
- if (rat_restrictions) {
- cJSON *rat_restrictions_local_nonprimitive;
- if (!cJSON_IsArray(rat_restrictions)) {
+ if (rat_restrictions) {
+ cJSON *rat_restrictions_local_nonprimitive;
+ if (!cJSON_IsArray(rat_restrictions)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [rat_restrictions]");
+ goto end;
+ }
+
+ rat_restrictionsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(rat_restrictions_local_nonprimitive, rat_restrictions ) {
+ if (!cJSON_IsString(rat_restrictions_local_nonprimitive)){
ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [rat_restrictions]");
goto end;
}
- rat_restrictionsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(rat_restrictions_local_nonprimitive, rat_restrictions ) {
- if (!cJSON_IsString(rat_restrictions_local_nonprimitive)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [rat_restrictions]");
- goto end;
- }
-
- OpenAPI_list_add(rat_restrictionsList, (void *)OpenAPI_rat_type_FromString(rat_restrictions_local_nonprimitive->valuestring));
- }
+ OpenAPI_list_add(rat_restrictionsList, (void *)OpenAPI_rat_type_FromString(rat_restrictions_local_nonprimitive->valuestring));
+ }
}
cJSON *forbidden_areas = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "forbiddenAreas");
OpenAPI_list_t *forbidden_areasList;
- if (forbidden_areas) {
- cJSON *forbidden_areas_local_nonprimitive;
- if (!cJSON_IsArray(forbidden_areas)) {
+ if (forbidden_areas) {
+ cJSON *forbidden_areas_local_nonprimitive;
+ if (!cJSON_IsArray(forbidden_areas)){
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [forbidden_areas]");
+ goto end;
+ }
+
+ forbidden_areasList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(forbidden_areas_local_nonprimitive, forbidden_areas ) {
+ if (!cJSON_IsObject(forbidden_areas_local_nonprimitive)) {
ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [forbidden_areas]");
goto end;
}
+ OpenAPI_area_t *forbidden_areasItem = OpenAPI_area_parseFromJSON(forbidden_areas_local_nonprimitive);
- forbidden_areasList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(forbidden_areas_local_nonprimitive, forbidden_areas ) {
- if (!cJSON_IsObject(forbidden_areas_local_nonprimitive)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [forbidden_areas]");
- goto end;
- }
- OpenAPI_area_t *forbidden_areasItem = OpenAPI_area_parseFromJSON(forbidden_areas_local_nonprimitive);
-
- OpenAPI_list_add(forbidden_areasList, forbidden_areasItem);
- }
+ OpenAPI_list_add(forbidden_areasList, forbidden_areasItem);
+ }
}
cJSON *service_area_restriction = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "serviceAreaRestriction");
OpenAPI_service_area_restriction_t *service_area_restriction_local_nonprim = NULL;
- if (service_area_restriction) {
- service_area_restriction_local_nonprim = OpenAPI_service_area_restriction_parseFromJSON(service_area_restriction);
+ if (service_area_restriction) {
+ service_area_restriction_local_nonprim = OpenAPI_service_area_restriction_parseFromJSON(service_area_restriction);
}
cJSON *core_network_type_restrictions = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "coreNetworkTypeRestrictions");
OpenAPI_list_t *core_network_type_restrictionsList;
- if (core_network_type_restrictions) {
- cJSON *core_network_type_restrictions_local_nonprimitive;
- if (!cJSON_IsArray(core_network_type_restrictions)) {
+ if (core_network_type_restrictions) {
+ cJSON *core_network_type_restrictions_local_nonprimitive;
+ if (!cJSON_IsArray(core_network_type_restrictions)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [core_network_type_restrictions]");
+ goto end;
+ }
+
+ core_network_type_restrictionsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(core_network_type_restrictions_local_nonprimitive, core_network_type_restrictions ) {
+ if (!cJSON_IsString(core_network_type_restrictions_local_nonprimitive)){
ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [core_network_type_restrictions]");
goto end;
}
- core_network_type_restrictionsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(core_network_type_restrictions_local_nonprimitive, core_network_type_restrictions ) {
- if (!cJSON_IsString(core_network_type_restrictions_local_nonprimitive)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [core_network_type_restrictions]");
- goto end;
- }
-
- OpenAPI_list_add(core_network_type_restrictionsList, (void *)OpenAPI_core_network_type_FromString(core_network_type_restrictions_local_nonprimitive->valuestring));
- }
+ OpenAPI_list_add(core_network_type_restrictionsList, (void *)OpenAPI_core_network_type_FromString(core_network_type_restrictions_local_nonprimitive->valuestring));
+ }
}
cJSON *rfsp_index = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "rfspIndex");
- if (rfsp_index) {
- if (!cJSON_IsNumber(rfsp_index)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [rfsp_index]");
- goto end;
- }
+ if (rfsp_index) {
+ if (!cJSON_IsNumber(rfsp_index)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [rfsp_index]");
+ goto end;
+ }
}
cJSON *subs_reg_timer = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "subsRegTimer");
- if (subs_reg_timer) {
- if (!cJSON_IsNumber(subs_reg_timer)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [subs_reg_timer]");
- goto end;
- }
+ if (subs_reg_timer) {
+ if (!cJSON_IsNumber(subs_reg_timer)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [subs_reg_timer]");
+ goto end;
+ }
}
cJSON *ue_usage_type = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "ueUsageType");
- if (ue_usage_type) {
- if (!cJSON_IsNumber(ue_usage_type)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [ue_usage_type]");
- goto end;
- }
+ if (ue_usage_type) {
+ if (!cJSON_IsNumber(ue_usage_type)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [ue_usage_type]");
+ goto end;
+ }
}
cJSON *mps_priority = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "mpsPriority");
- if (mps_priority) {
- if (!cJSON_IsBool(mps_priority)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [mps_priority]");
- goto end;
- }
+ if (mps_priority) {
+ if (!cJSON_IsBool(mps_priority)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [mps_priority]");
+ goto end;
+ }
}
cJSON *mcs_priority = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "mcsPriority");
- if (mcs_priority) {
- if (!cJSON_IsBool(mcs_priority)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [mcs_priority]");
- goto end;
- }
+ if (mcs_priority) {
+ if (!cJSON_IsBool(mcs_priority)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [mcs_priority]");
+ goto end;
+ }
}
cJSON *active_time = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "activeTime");
- if (active_time) {
- if (!cJSON_IsNumber(active_time)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [active_time]");
- goto end;
- }
+ if (active_time) {
+ if (!cJSON_IsNumber(active_time)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [active_time]");
+ goto end;
+ }
}
cJSON *sor_info = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "sorInfo");
OpenAPI_sor_info_t *sor_info_local_nonprim = NULL;
- if (sor_info) {
- sor_info_local_nonprim = OpenAPI_sor_info_parseFromJSON(sor_info);
+ if (sor_info) {
+ sor_info_local_nonprim = OpenAPI_sor_info_parseFromJSON(sor_info);
}
cJSON *sor_info_expect_ind = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "sorInfoExpectInd");
- if (sor_info_expect_ind) {
- if (!cJSON_IsBool(sor_info_expect_ind)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [sor_info_expect_ind]");
- goto end;
- }
+ if (sor_info_expect_ind) {
+ if (!cJSON_IsBool(sor_info_expect_ind)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [sor_info_expect_ind]");
+ goto end;
+ }
}
cJSON *soraf_retrieval = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "sorafRetrieval");
- if (soraf_retrieval) {
- if (!cJSON_IsBool(soraf_retrieval)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [soraf_retrieval]");
- goto end;
- }
+ if (soraf_retrieval) {
+ if (!cJSON_IsBool(soraf_retrieval)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [soraf_retrieval]");
+ goto end;
+ }
}
cJSON *sor_update_indicator_list = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "sorUpdateIndicatorList");
OpenAPI_list_t *sor_update_indicator_listList;
- if (sor_update_indicator_list) {
- cJSON *sor_update_indicator_list_local_nonprimitive;
- if (!cJSON_IsArray(sor_update_indicator_list)) {
+ if (sor_update_indicator_list) {
+ cJSON *sor_update_indicator_list_local_nonprimitive;
+ if (!cJSON_IsArray(sor_update_indicator_list)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [sor_update_indicator_list]");
+ goto end;
+ }
+
+ sor_update_indicator_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(sor_update_indicator_list_local_nonprimitive, sor_update_indicator_list ) {
+ if (!cJSON_IsString(sor_update_indicator_list_local_nonprimitive)){
ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [sor_update_indicator_list]");
goto end;
}
- sor_update_indicator_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(sor_update_indicator_list_local_nonprimitive, sor_update_indicator_list ) {
- if (!cJSON_IsString(sor_update_indicator_list_local_nonprimitive)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [sor_update_indicator_list]");
- goto end;
- }
-
- OpenAPI_list_add(sor_update_indicator_listList, (void *)OpenAPI_sor_update_indicator_FromString(sor_update_indicator_list_local_nonprimitive->valuestring));
- }
+ OpenAPI_list_add(sor_update_indicator_listList, (void *)OpenAPI_sor_update_indicator_FromString(sor_update_indicator_list_local_nonprimitive->valuestring));
+ }
}
cJSON *upu_info = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "upuInfo");
OpenAPI_upu_info_t *upu_info_local_nonprim = NULL;
- if (upu_info) {
- upu_info_local_nonprim = OpenAPI_upu_info_parseFromJSON(upu_info);
+ if (upu_info) {
+ upu_info_local_nonprim = OpenAPI_upu_info_parseFromJSON(upu_info);
}
cJSON *mico_allowed = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "micoAllowed");
- if (mico_allowed) {
- if (!cJSON_IsBool(mico_allowed)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [mico_allowed]");
- goto end;
- }
+ if (mico_allowed) {
+ if (!cJSON_IsBool(mico_allowed)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [mico_allowed]");
+ goto end;
+ }
}
cJSON *shared_am_data_ids = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "sharedAmDataIds");
OpenAPI_list_t *shared_am_data_idsList;
- if (shared_am_data_ids) {
- cJSON *shared_am_data_ids_local;
- if (!cJSON_IsArray(shared_am_data_ids)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [shared_am_data_ids]");
- goto end;
- }
- shared_am_data_idsList = OpenAPI_list_create();
+ if (shared_am_data_ids) {
+ cJSON *shared_am_data_ids_local;
+ if (!cJSON_IsArray(shared_am_data_ids)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [shared_am_data_ids]");
+ goto end;
+ }
+ shared_am_data_idsList = OpenAPI_list_create();
- cJSON_ArrayForEach(shared_am_data_ids_local, shared_am_data_ids) {
- if (!cJSON_IsString(shared_am_data_ids_local)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [shared_am_data_ids]");
- goto end;
- }
- OpenAPI_list_add(shared_am_data_idsList, ogs_strdup_or_assert(shared_am_data_ids_local->valuestring));
- }
+ cJSON_ArrayForEach(shared_am_data_ids_local, shared_am_data_ids) {
+ if (!cJSON_IsString(shared_am_data_ids_local)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [shared_am_data_ids]");
+ goto end;
+ }
+ OpenAPI_list_add(shared_am_data_idsList , ogs_strdup_or_assert(shared_am_data_ids_local->valuestring));
+ }
}
cJSON *odb_packet_services = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "odbPacketServices");
OpenAPI_odb_packet_services_e odb_packet_servicesVariable;
- if (odb_packet_services) {
- if (!cJSON_IsString(odb_packet_services)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [odb_packet_services]");
- goto end;
- }
- odb_packet_servicesVariable = OpenAPI_odb_packet_services_FromString(odb_packet_services->valuestring);
+ if (odb_packet_services) {
+ if (!cJSON_IsString(odb_packet_services)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [odb_packet_services]");
+ goto end;
+ }
+ odb_packet_servicesVariable = OpenAPI_odb_packet_services_FromString(odb_packet_services->valuestring);
}
cJSON *subscribed_dnn_list = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "subscribedDnnList");
OpenAPI_list_t *subscribed_dnn_listList;
- if (subscribed_dnn_list) {
- cJSON *subscribed_dnn_list_local;
- if (!cJSON_IsArray(subscribed_dnn_list)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [subscribed_dnn_list]");
- goto end;
- }
- subscribed_dnn_listList = OpenAPI_list_create();
+ if (subscribed_dnn_list) {
+ cJSON *subscribed_dnn_list_local;
+ if (!cJSON_IsArray(subscribed_dnn_list)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [subscribed_dnn_list]");
+ goto end;
+ }
+ subscribed_dnn_listList = OpenAPI_list_create();
- cJSON_ArrayForEach(subscribed_dnn_list_local, subscribed_dnn_list) {
- if (!cJSON_IsString(subscribed_dnn_list_local)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [subscribed_dnn_list]");
- goto end;
- }
- OpenAPI_list_add(subscribed_dnn_listList, ogs_strdup_or_assert(subscribed_dnn_list_local->valuestring));
- }
+ cJSON_ArrayForEach(subscribed_dnn_list_local, subscribed_dnn_list) {
+ if (!cJSON_IsString(subscribed_dnn_list_local)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [subscribed_dnn_list]");
+ goto end;
+ }
+ OpenAPI_list_add(subscribed_dnn_listList , ogs_strdup_or_assert(subscribed_dnn_list_local->valuestring));
+ }
}
cJSON *service_gap_time = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "serviceGapTime");
- if (service_gap_time) {
- if (!cJSON_IsNumber(service_gap_time)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [service_gap_time]");
- goto end;
- }
+ if (service_gap_time) {
+ if (!cJSON_IsNumber(service_gap_time)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [service_gap_time]");
+ goto end;
+ }
}
cJSON *mdt_user_consent = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "mdtUserConsent");
OpenAPI_mdt_user_consent_e mdt_user_consentVariable;
- if (mdt_user_consent) {
- if (!cJSON_IsString(mdt_user_consent)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [mdt_user_consent]");
- goto end;
- }
- mdt_user_consentVariable = OpenAPI_mdt_user_consent_FromString(mdt_user_consent->valuestring);
+ if (mdt_user_consent) {
+ if (!cJSON_IsString(mdt_user_consent)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [mdt_user_consent]");
+ goto end;
+ }
+ mdt_user_consentVariable = OpenAPI_mdt_user_consent_FromString(mdt_user_consent->valuestring);
}
cJSON *mdt_configuration = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "mdtConfiguration");
OpenAPI_mdt_configuration_t *mdt_configuration_local_nonprim = NULL;
- if (mdt_configuration) {
- mdt_configuration_local_nonprim = OpenAPI_mdt_configuration_parseFromJSON(mdt_configuration);
+ if (mdt_configuration) {
+ mdt_configuration_local_nonprim = OpenAPI_mdt_configuration_parseFromJSON(mdt_configuration);
}
cJSON *trace_data = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "traceData");
- OpenAPI_trace_data_t *trace_data_local_nonprim = NULL;
- if (trace_data) {
- trace_data_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_data);
+ OpenAPI_trace_data_1_t *trace_data_local_nonprim = NULL;
+ if (trace_data) {
+ trace_data_local_nonprim = OpenAPI_trace_data_1_parseFromJSON(trace_data);
}
cJSON *cag_data = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "cagData");
OpenAPI_cag_data_t *cag_data_local_nonprim = NULL;
- if (cag_data) {
- cag_data_local_nonprim = OpenAPI_cag_data_parseFromJSON(cag_data);
+ if (cag_data) {
+ cag_data_local_nonprim = OpenAPI_cag_data_parseFromJSON(cag_data);
}
cJSON *stn_sr = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "stnSr");
- if (stn_sr) {
- if (!cJSON_IsString(stn_sr)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [stn_sr]");
- goto end;
- }
+ if (stn_sr) {
+ if (!cJSON_IsString(stn_sr)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [stn_sr]");
+ goto end;
+ }
}
cJSON *c_msisdn = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "cMsisdn");
- if (c_msisdn) {
- if (!cJSON_IsString(c_msisdn)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [c_msisdn]");
- goto end;
- }
+ if (c_msisdn) {
+ if (!cJSON_IsString(c_msisdn)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [c_msisdn]");
+ goto end;
+ }
}
- cJSON *nb_io_t_ue_priority = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "nbIoTUePriority");
+ cJSON *nb_io_tue_priority = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "nbIoTUePriority");
- if (nb_io_t_ue_priority) {
- if (!cJSON_IsNumber(nb_io_t_ue_priority)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [nb_io_t_ue_priority]");
- goto end;
- }
+ if (nb_io_tue_priority) {
+ if (!cJSON_IsNumber(nb_io_tue_priority)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [nb_io_tue_priority]");
+ goto end;
+ }
}
cJSON *nssai_inclusion_allowed = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "nssaiInclusionAllowed");
- if (nssai_inclusion_allowed) {
- if (!cJSON_IsBool(nssai_inclusion_allowed)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [nssai_inclusion_allowed]");
- goto end;
- }
+ if (nssai_inclusion_allowed) {
+ if (!cJSON_IsBool(nssai_inclusion_allowed)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [nssai_inclusion_allowed]");
+ goto end;
+ }
}
cJSON *rg_wireline_characteristics = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "rgWirelineCharacteristics");
- if (rg_wireline_characteristics) {
- if (!cJSON_IsNumber(rg_wireline_characteristics)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [rg_wireline_characteristics]");
- goto end;
- }
+ if (rg_wireline_characteristics) {
+ if (!cJSON_IsString(rg_wireline_characteristics)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [rg_wireline_characteristics]");
+ goto end;
+ }
}
cJSON *ec_restriction_data_wb = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "ecRestrictionDataWb");
OpenAPI_ec_restriction_data_wb_t *ec_restriction_data_wb_local_nonprim = NULL;
- if (ec_restriction_data_wb) {
- ec_restriction_data_wb_local_nonprim = OpenAPI_ec_restriction_data_wb_parseFromJSON(ec_restriction_data_wb);
+ if (ec_restriction_data_wb) {
+ ec_restriction_data_wb_local_nonprim = OpenAPI_ec_restriction_data_wb_parseFromJSON(ec_restriction_data_wb);
}
cJSON *ec_restriction_data_nb = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "ecRestrictionDataNb");
- if (ec_restriction_data_nb) {
- if (!cJSON_IsBool(ec_restriction_data_nb)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [ec_restriction_data_nb]");
- goto end;
- }
+ if (ec_restriction_data_nb) {
+ if (!cJSON_IsBool(ec_restriction_data_nb)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [ec_restriction_data_nb]");
+ goto end;
+ }
}
cJSON *expected_ue_behaviour_list = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "expectedUeBehaviourList");
OpenAPI_expected_ue_behaviour_data_t *expected_ue_behaviour_list_local_nonprim = NULL;
- if (expected_ue_behaviour_list) {
- expected_ue_behaviour_list_local_nonprim = OpenAPI_expected_ue_behaviour_data_parseFromJSON(expected_ue_behaviour_list);
+ if (expected_ue_behaviour_list) {
+ expected_ue_behaviour_list_local_nonprim = OpenAPI_expected_ue_behaviour_data_parseFromJSON(expected_ue_behaviour_list);
}
cJSON *primary_rat_restrictions = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "primaryRatRestrictions");
OpenAPI_list_t *primary_rat_restrictionsList;
- if (primary_rat_restrictions) {
- cJSON *primary_rat_restrictions_local_nonprimitive;
- if (!cJSON_IsArray(primary_rat_restrictions)) {
+ if (primary_rat_restrictions) {
+ cJSON *primary_rat_restrictions_local_nonprimitive;
+ if (!cJSON_IsArray(primary_rat_restrictions)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [primary_rat_restrictions]");
+ goto end;
+ }
+
+ primary_rat_restrictionsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(primary_rat_restrictions_local_nonprimitive, primary_rat_restrictions ) {
+ if (!cJSON_IsString(primary_rat_restrictions_local_nonprimitive)){
ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [primary_rat_restrictions]");
goto end;
}
- primary_rat_restrictionsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(primary_rat_restrictions_local_nonprimitive, primary_rat_restrictions ) {
- if (!cJSON_IsString(primary_rat_restrictions_local_nonprimitive)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [primary_rat_restrictions]");
- goto end;
- }
-
- OpenAPI_list_add(primary_rat_restrictionsList, (void *)OpenAPI_rat_type_FromString(primary_rat_restrictions_local_nonprimitive->valuestring));
- }
+ OpenAPI_list_add(primary_rat_restrictionsList, (void *)OpenAPI_rat_type_FromString(primary_rat_restrictions_local_nonprimitive->valuestring));
+ }
}
cJSON *secondary_rat_restrictions = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "secondaryRatRestrictions");
OpenAPI_list_t *secondary_rat_restrictionsList;
- if (secondary_rat_restrictions) {
- cJSON *secondary_rat_restrictions_local_nonprimitive;
- if (!cJSON_IsArray(secondary_rat_restrictions)) {
+ if (secondary_rat_restrictions) {
+ cJSON *secondary_rat_restrictions_local_nonprimitive;
+ if (!cJSON_IsArray(secondary_rat_restrictions)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [secondary_rat_restrictions]");
+ goto end;
+ }
+
+ secondary_rat_restrictionsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(secondary_rat_restrictions_local_nonprimitive, secondary_rat_restrictions ) {
+ if (!cJSON_IsString(secondary_rat_restrictions_local_nonprimitive)){
ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [secondary_rat_restrictions]");
goto end;
}
- secondary_rat_restrictionsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(secondary_rat_restrictions_local_nonprimitive, secondary_rat_restrictions ) {
- if (!cJSON_IsString(secondary_rat_restrictions_local_nonprimitive)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [secondary_rat_restrictions]");
- goto end;
- }
-
- OpenAPI_list_add(secondary_rat_restrictionsList, (void *)OpenAPI_rat_type_FromString(secondary_rat_restrictions_local_nonprimitive->valuestring));
- }
+ OpenAPI_list_add(secondary_rat_restrictionsList, (void *)OpenAPI_rat_type_FromString(secondary_rat_restrictions_local_nonprimitive->valuestring));
+ }
}
cJSON *edrx_parameters_list = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "edrxParametersList");
OpenAPI_list_t *edrx_parameters_listList;
- if (edrx_parameters_list) {
- cJSON *edrx_parameters_list_local_nonprimitive;
- if (!cJSON_IsArray(edrx_parameters_list)) {
+ if (edrx_parameters_list) {
+ cJSON *edrx_parameters_list_local_nonprimitive;
+ if (!cJSON_IsArray(edrx_parameters_list)){
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [edrx_parameters_list]");
+ goto end;
+ }
+
+ edrx_parameters_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(edrx_parameters_list_local_nonprimitive, edrx_parameters_list ) {
+ if (!cJSON_IsObject(edrx_parameters_list_local_nonprimitive)) {
ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [edrx_parameters_list]");
goto end;
}
+ OpenAPI_edrx_parameters_t *edrx_parameters_listItem = OpenAPI_edrx_parameters_parseFromJSON(edrx_parameters_list_local_nonprimitive);
- edrx_parameters_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(edrx_parameters_list_local_nonprimitive, edrx_parameters_list ) {
- if (!cJSON_IsObject(edrx_parameters_list_local_nonprimitive)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [edrx_parameters_list]");
- goto end;
- }
- OpenAPI_edrx_parameters_t *edrx_parameters_listItem = OpenAPI_edrx_parameters_parseFromJSON(edrx_parameters_list_local_nonprimitive);
-
- OpenAPI_list_add(edrx_parameters_listList, edrx_parameters_listItem);
- }
+ OpenAPI_list_add(edrx_parameters_listList, edrx_parameters_listItem);
+ }
}
cJSON *ptw_parameters_list = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "ptwParametersList");
OpenAPI_list_t *ptw_parameters_listList;
- if (ptw_parameters_list) {
- cJSON *ptw_parameters_list_local_nonprimitive;
- if (!cJSON_IsArray(ptw_parameters_list)) {
+ if (ptw_parameters_list) {
+ cJSON *ptw_parameters_list_local_nonprimitive;
+ if (!cJSON_IsArray(ptw_parameters_list)){
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [ptw_parameters_list]");
+ goto end;
+ }
+
+ ptw_parameters_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(ptw_parameters_list_local_nonprimitive, ptw_parameters_list ) {
+ if (!cJSON_IsObject(ptw_parameters_list_local_nonprimitive)) {
ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [ptw_parameters_list]");
goto end;
}
+ OpenAPI_ptw_parameters_t *ptw_parameters_listItem = OpenAPI_ptw_parameters_parseFromJSON(ptw_parameters_list_local_nonprimitive);
- ptw_parameters_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(ptw_parameters_list_local_nonprimitive, ptw_parameters_list ) {
- if (!cJSON_IsObject(ptw_parameters_list_local_nonprimitive)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [ptw_parameters_list]");
- goto end;
- }
- OpenAPI_ptw_parameters_t *ptw_parameters_listItem = OpenAPI_ptw_parameters_parseFromJSON(ptw_parameters_list_local_nonprimitive);
-
- OpenAPI_list_add(ptw_parameters_listList, ptw_parameters_listItem);
- }
+ OpenAPI_list_add(ptw_parameters_listList, ptw_parameters_listItem);
+ }
}
cJSON *iab_operation_allowed = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "iabOperationAllowed");
- if (iab_operation_allowed) {
- if (!cJSON_IsBool(iab_operation_allowed)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [iab_operation_allowed]");
- goto end;
- }
+ if (iab_operation_allowed) {
+ if (!cJSON_IsBool(iab_operation_allowed)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [iab_operation_allowed]");
+ goto end;
+ }
}
cJSON *wireline_forbidden_areas = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "wirelineForbiddenAreas");
OpenAPI_list_t *wireline_forbidden_areasList;
- if (wireline_forbidden_areas) {
- cJSON *wireline_forbidden_areas_local_nonprimitive;
- if (!cJSON_IsArray(wireline_forbidden_areas)) {
+ if (wireline_forbidden_areas) {
+ cJSON *wireline_forbidden_areas_local_nonprimitive;
+ if (!cJSON_IsArray(wireline_forbidden_areas)){
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [wireline_forbidden_areas]");
+ goto end;
+ }
+
+ wireline_forbidden_areasList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(wireline_forbidden_areas_local_nonprimitive, wireline_forbidden_areas ) {
+ if (!cJSON_IsObject(wireline_forbidden_areas_local_nonprimitive)) {
ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [wireline_forbidden_areas]");
goto end;
}
+ OpenAPI_wireline_area_t *wireline_forbidden_areasItem = OpenAPI_wireline_area_parseFromJSON(wireline_forbidden_areas_local_nonprimitive);
- wireline_forbidden_areasList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(wireline_forbidden_areas_local_nonprimitive, wireline_forbidden_areas ) {
- if (!cJSON_IsObject(wireline_forbidden_areas_local_nonprimitive)) {
- ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed [wireline_forbidden_areas]");
- goto end;
- }
- OpenAPI_wireline_area_t *wireline_forbidden_areasItem = OpenAPI_wireline_area_parseFromJSON(wireline_forbidden_areas_local_nonprimitive);
-
- OpenAPI_list_add(wireline_forbidden_areasList, wireline_forbidden_areasItem);
- }
+ OpenAPI_list_add(wireline_forbidden_areasList, wireline_forbidden_areasItem);
+ }
}
cJSON *wireline_service_area_restriction = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "wirelineServiceAreaRestriction");
OpenAPI_wireline_service_area_restriction_t *wireline_service_area_restriction_local_nonprim = NULL;
- if (wireline_service_area_restriction) {
- wireline_service_area_restriction_local_nonprim = OpenAPI_wireline_service_area_restriction_parseFromJSON(wireline_service_area_restriction);
+ if (wireline_service_area_restriction) {
+ wireline_service_area_restriction_local_nonprim = OpenAPI_wireline_service_area_restriction_parseFromJSON(wireline_service_area_restriction);
}
access_and_mobility_subscription_data_local_var = OpenAPI_access_and_mobility_subscription_data_create (
@@ -1298,9 +1299,9 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub
cag_data ? cag_data_local_nonprim : NULL,
stn_sr ? ogs_strdup_or_assert(stn_sr->valuestring) : NULL,
c_msisdn ? ogs_strdup_or_assert(c_msisdn->valuestring) : NULL,
- nb_io_t_ue_priority ? nb_io_t_ue_priority->valuedouble : 0,
+ nb_io_tue_priority ? nb_io_tue_priority->valuedouble : 0,
nssai_inclusion_allowed ? nssai_inclusion_allowed->valueint : 0,
- rg_wireline_characteristics ? rg_wireline_characteristics->valueint : 0,
+ rg_wireline_characteristics ? ogs_strdup_or_assert(rg_wireline_characteristics->valuestring) : NULL,
ec_restriction_data_wb ? ec_restriction_data_wb_local_nonprim : NULL,
ec_restriction_data_nb ? ec_restriction_data_nb->valueint : 0,
expected_ue_behaviour_list ? expected_ue_behaviour_list_local_nonprim : NULL,
@@ -1311,7 +1312,7 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub
iab_operation_allowed ? iab_operation_allowed->valueint : 0,
wireline_forbidden_areas ? wireline_forbidden_areasList : NULL,
wireline_service_area_restriction ? wireline_service_area_restriction_local_nonprim : NULL
- );
+ );
return access_and_mobility_subscription_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/access_and_mobility_subscription_data.h b/lib/sbi/openapi/model/access_and_mobility_subscription_data.h
index ffbc733d0..f4ae6209f 100644
--- a/lib/sbi/openapi/model/access_and_mobility_subscription_data.h
+++ b/lib/sbi/openapi/model/access_and_mobility_subscription_data.h
@@ -1,7 +1,7 @@
/*
* access_and_mobility_subscription_data.h
*
- *
+ *
*/
#ifndef _OpenAPI_access_and_mobility_subscription_data_H_
@@ -28,7 +28,7 @@
#include "service_area_restriction.h"
#include "sor_info.h"
#include "sor_update_indicator.h"
-#include "trace_data.h"
+#include "trace_data_1.h"
#include "upu_info.h"
#include "wireline_area.h"
#include "wireline_service_area_restriction.h"
@@ -67,13 +67,13 @@ typedef struct OpenAPI_access_and_mobility_subscription_data_s {
int service_gap_time;
OpenAPI_mdt_user_consent_e mdt_user_consent;
struct OpenAPI_mdt_configuration_s *mdt_configuration;
- struct OpenAPI_trace_data_s *trace_data;
+ struct OpenAPI_trace_data_1_s *trace_data;
struct OpenAPI_cag_data_s *cag_data;
char *stn_sr;
char *c_msisdn;
- int nb_io_t_ue_priority;
+ int nb_io_tue_priority;
int nssai_inclusion_allowed;
- char rg_wireline_characteristics;
+ char *rg_wireline_characteristics;
struct OpenAPI_ec_restriction_data_wb_s *ec_restriction_data_wb;
int ec_restriction_data_nb;
struct OpenAPI_expected_ue_behaviour_data_s *expected_ue_behaviour_list;
@@ -115,13 +115,13 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub
int service_gap_time,
OpenAPI_mdt_user_consent_e mdt_user_consent,
OpenAPI_mdt_configuration_t *mdt_configuration,
- OpenAPI_trace_data_t *trace_data,
+ OpenAPI_trace_data_1_t *trace_data,
OpenAPI_cag_data_t *cag_data,
char *stn_sr,
char *c_msisdn,
- int nb_io_t_ue_priority,
+ int nb_io_tue_priority,
int nssai_inclusion_allowed,
- char rg_wireline_characteristics,
+ char *rg_wireline_characteristics,
OpenAPI_ec_restriction_data_wb_t *ec_restriction_data_wb,
int ec_restriction_data_nb,
OpenAPI_expected_ue_behaviour_data_t *expected_ue_behaviour_list,
@@ -132,7 +132,7 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub
int iab_operation_allowed,
OpenAPI_list_t *wireline_forbidden_areas,
OpenAPI_wireline_service_area_restriction_t *wireline_service_area_restriction
- );
+);
void OpenAPI_access_and_mobility_subscription_data_free(OpenAPI_access_and_mobility_subscription_data_t *access_and_mobility_subscription_data);
OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_subscription_data_parseFromJSON(cJSON *access_and_mobility_subscription_dataJSON);
cJSON *OpenAPI_access_and_mobility_subscription_data_convertToJSON(OpenAPI_access_and_mobility_subscription_data_t *access_and_mobility_subscription_data);
diff --git a/lib/sbi/openapi/model/access_and_mobility_subscription_data_1.c b/lib/sbi/openapi/model/access_and_mobility_subscription_data_1.c
new file mode 100644
index 000000000..dcdc043cf
--- /dev/null
+++ b/lib/sbi/openapi/model/access_and_mobility_subscription_data_1.c
@@ -0,0 +1,1355 @@
+
+#include
+#include
+#include
+#include "access_and_mobility_subscription_data_1.h"
+
+OpenAPI_access_and_mobility_subscription_data_1_t *OpenAPI_access_and_mobility_subscription_data_1_create(
+ char *supported_features,
+ OpenAPI_list_t *gpsis,
+ OpenAPI_list_t *internal_group_ids,
+ OpenAPI_list_t* shared_vn_group_data_ids,
+ OpenAPI_ambr_rm_t *subscribed_ue_ambr,
+ OpenAPI_nssai_1_t *nssai,
+ OpenAPI_list_t *rat_restrictions,
+ OpenAPI_list_t *forbidden_areas,
+ OpenAPI_service_area_restriction_1_t *service_area_restriction,
+ OpenAPI_list_t *core_network_type_restrictions,
+ int rfsp_index,
+ int subs_reg_timer,
+ int ue_usage_type,
+ int mps_priority,
+ int mcs_priority,
+ int active_time,
+ OpenAPI_sor_info_1_t *sor_info,
+ int sor_info_expect_ind,
+ int soraf_retrieval,
+ OpenAPI_list_t *sor_update_indicator_list,
+ OpenAPI_upu_info_1_t *upu_info,
+ int mico_allowed,
+ OpenAPI_list_t *shared_am_data_ids,
+ OpenAPI_odb_packet_services_e odb_packet_services,
+ OpenAPI_list_t *subscribed_dnn_list,
+ int service_gap_time,
+ OpenAPI_mdt_user_consent_e mdt_user_consent,
+ OpenAPI_mdt_configuration_1_t *mdt_configuration,
+ OpenAPI_trace_data_t *trace_data,
+ OpenAPI_cag_data_1_t *cag_data,
+ char *stn_sr,
+ char *c_msisdn,
+ int nb_io_tue_priority,
+ int nssai_inclusion_allowed,
+ char *rg_wireline_characteristics,
+ OpenAPI_ec_restriction_data_wb_t *ec_restriction_data_wb,
+ int ec_restriction_data_nb,
+ OpenAPI_expected_ue_behaviour_data_1_t *expected_ue_behaviour_list,
+ OpenAPI_list_t *primary_rat_restrictions,
+ OpenAPI_list_t *secondary_rat_restrictions,
+ OpenAPI_list_t *edrx_parameters_list,
+ OpenAPI_list_t *ptw_parameters_list,
+ int iab_operation_allowed,
+ OpenAPI_list_t *wireline_forbidden_areas,
+ OpenAPI_wireline_service_area_restriction_1_t *wireline_service_area_restriction
+)
+{
+ OpenAPI_access_and_mobility_subscription_data_1_t *access_and_mobility_subscription_data_1_local_var = OpenAPI_malloc(sizeof(OpenAPI_access_and_mobility_subscription_data_1_t));
+ if (!access_and_mobility_subscription_data_1_local_var) {
+ return NULL;
+ }
+ access_and_mobility_subscription_data_1_local_var->supported_features = supported_features;
+ access_and_mobility_subscription_data_1_local_var->gpsis = gpsis;
+ access_and_mobility_subscription_data_1_local_var->internal_group_ids = internal_group_ids;
+ access_and_mobility_subscription_data_1_local_var->shared_vn_group_data_ids = shared_vn_group_data_ids;
+ access_and_mobility_subscription_data_1_local_var->subscribed_ue_ambr = subscribed_ue_ambr;
+ access_and_mobility_subscription_data_1_local_var->nssai = nssai;
+ access_and_mobility_subscription_data_1_local_var->rat_restrictions = rat_restrictions;
+ access_and_mobility_subscription_data_1_local_var->forbidden_areas = forbidden_areas;
+ access_and_mobility_subscription_data_1_local_var->service_area_restriction = service_area_restriction;
+ access_and_mobility_subscription_data_1_local_var->core_network_type_restrictions = core_network_type_restrictions;
+ access_and_mobility_subscription_data_1_local_var->rfsp_index = rfsp_index;
+ access_and_mobility_subscription_data_1_local_var->subs_reg_timer = subs_reg_timer;
+ access_and_mobility_subscription_data_1_local_var->ue_usage_type = ue_usage_type;
+ access_and_mobility_subscription_data_1_local_var->mps_priority = mps_priority;
+ access_and_mobility_subscription_data_1_local_var->mcs_priority = mcs_priority;
+ access_and_mobility_subscription_data_1_local_var->active_time = active_time;
+ access_and_mobility_subscription_data_1_local_var->sor_info = sor_info;
+ access_and_mobility_subscription_data_1_local_var->sor_info_expect_ind = sor_info_expect_ind;
+ access_and_mobility_subscription_data_1_local_var->soraf_retrieval = soraf_retrieval;
+ access_and_mobility_subscription_data_1_local_var->sor_update_indicator_list = sor_update_indicator_list;
+ access_and_mobility_subscription_data_1_local_var->upu_info = upu_info;
+ access_and_mobility_subscription_data_1_local_var->mico_allowed = mico_allowed;
+ access_and_mobility_subscription_data_1_local_var->shared_am_data_ids = shared_am_data_ids;
+ access_and_mobility_subscription_data_1_local_var->odb_packet_services = odb_packet_services;
+ access_and_mobility_subscription_data_1_local_var->subscribed_dnn_list = subscribed_dnn_list;
+ access_and_mobility_subscription_data_1_local_var->service_gap_time = service_gap_time;
+ access_and_mobility_subscription_data_1_local_var->mdt_user_consent = mdt_user_consent;
+ access_and_mobility_subscription_data_1_local_var->mdt_configuration = mdt_configuration;
+ access_and_mobility_subscription_data_1_local_var->trace_data = trace_data;
+ access_and_mobility_subscription_data_1_local_var->cag_data = cag_data;
+ access_and_mobility_subscription_data_1_local_var->stn_sr = stn_sr;
+ access_and_mobility_subscription_data_1_local_var->c_msisdn = c_msisdn;
+ access_and_mobility_subscription_data_1_local_var->nb_io_tue_priority = nb_io_tue_priority;
+ access_and_mobility_subscription_data_1_local_var->nssai_inclusion_allowed = nssai_inclusion_allowed;
+ access_and_mobility_subscription_data_1_local_var->rg_wireline_characteristics = rg_wireline_characteristics;
+ access_and_mobility_subscription_data_1_local_var->ec_restriction_data_wb = ec_restriction_data_wb;
+ access_and_mobility_subscription_data_1_local_var->ec_restriction_data_nb = ec_restriction_data_nb;
+ access_and_mobility_subscription_data_1_local_var->expected_ue_behaviour_list = expected_ue_behaviour_list;
+ access_and_mobility_subscription_data_1_local_var->primary_rat_restrictions = primary_rat_restrictions;
+ access_and_mobility_subscription_data_1_local_var->secondary_rat_restrictions = secondary_rat_restrictions;
+ access_and_mobility_subscription_data_1_local_var->edrx_parameters_list = edrx_parameters_list;
+ access_and_mobility_subscription_data_1_local_var->ptw_parameters_list = ptw_parameters_list;
+ access_and_mobility_subscription_data_1_local_var->iab_operation_allowed = iab_operation_allowed;
+ access_and_mobility_subscription_data_1_local_var->wireline_forbidden_areas = wireline_forbidden_areas;
+ access_and_mobility_subscription_data_1_local_var->wireline_service_area_restriction = wireline_service_area_restriction;
+
+ return access_and_mobility_subscription_data_1_local_var;
+}
+
+void OpenAPI_access_and_mobility_subscription_data_1_free(OpenAPI_access_and_mobility_subscription_data_1_t *access_and_mobility_subscription_data_1)
+{
+ if (NULL == access_and_mobility_subscription_data_1) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ ogs_free(access_and_mobility_subscription_data_1->supported_features);
+ OpenAPI_list_for_each(access_and_mobility_subscription_data_1->gpsis, node) {
+ ogs_free(node->data);
+ }
+ OpenAPI_list_free(access_and_mobility_subscription_data_1->gpsis);
+ OpenAPI_list_for_each(access_and_mobility_subscription_data_1->internal_group_ids, node) {
+ ogs_free(node->data);
+ }
+ OpenAPI_list_free(access_and_mobility_subscription_data_1->internal_group_ids);
+ OpenAPI_list_for_each(access_and_mobility_subscription_data_1->shared_vn_group_data_ids, node) {
+ OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)node->data;
+ ogs_free(localKeyValue->value);
+ ogs_free(localKeyValue);
+ }
+ OpenAPI_list_free(access_and_mobility_subscription_data_1->shared_vn_group_data_ids);
+ OpenAPI_ambr_rm_free(access_and_mobility_subscription_data_1->subscribed_ue_ambr);
+ OpenAPI_nssai_1_free(access_and_mobility_subscription_data_1->nssai);
+ OpenAPI_list_free(access_and_mobility_subscription_data_1->rat_restrictions);
+ OpenAPI_list_for_each(access_and_mobility_subscription_data_1->forbidden_areas, node) {
+ OpenAPI_area_1_free(node->data);
+ }
+ OpenAPI_list_free(access_and_mobility_subscription_data_1->forbidden_areas);
+ OpenAPI_service_area_restriction_1_free(access_and_mobility_subscription_data_1->service_area_restriction);
+ OpenAPI_list_free(access_and_mobility_subscription_data_1->core_network_type_restrictions);
+ OpenAPI_sor_info_1_free(access_and_mobility_subscription_data_1->sor_info);
+ OpenAPI_list_free(access_and_mobility_subscription_data_1->sor_update_indicator_list);
+ OpenAPI_upu_info_1_free(access_and_mobility_subscription_data_1->upu_info);
+ OpenAPI_list_for_each(access_and_mobility_subscription_data_1->shared_am_data_ids, node) {
+ ogs_free(node->data);
+ }
+ OpenAPI_list_free(access_and_mobility_subscription_data_1->shared_am_data_ids);
+ OpenAPI_list_for_each(access_and_mobility_subscription_data_1->subscribed_dnn_list, node) {
+ ogs_free(node->data);
+ }
+ OpenAPI_list_free(access_and_mobility_subscription_data_1->subscribed_dnn_list);
+ OpenAPI_mdt_configuration_1_free(access_and_mobility_subscription_data_1->mdt_configuration);
+ OpenAPI_trace_data_free(access_and_mobility_subscription_data_1->trace_data);
+ OpenAPI_cag_data_1_free(access_and_mobility_subscription_data_1->cag_data);
+ ogs_free(access_and_mobility_subscription_data_1->stn_sr);
+ ogs_free(access_and_mobility_subscription_data_1->c_msisdn);
+ ogs_free(access_and_mobility_subscription_data_1->rg_wireline_characteristics);
+ OpenAPI_ec_restriction_data_wb_free(access_and_mobility_subscription_data_1->ec_restriction_data_wb);
+ OpenAPI_expected_ue_behaviour_data_1_free(access_and_mobility_subscription_data_1->expected_ue_behaviour_list);
+ OpenAPI_list_free(access_and_mobility_subscription_data_1->primary_rat_restrictions);
+ OpenAPI_list_free(access_and_mobility_subscription_data_1->secondary_rat_restrictions);
+ OpenAPI_list_for_each(access_and_mobility_subscription_data_1->edrx_parameters_list, node) {
+ OpenAPI_edrx_parameters_1_free(node->data);
+ }
+ OpenAPI_list_free(access_and_mobility_subscription_data_1->edrx_parameters_list);
+ OpenAPI_list_for_each(access_and_mobility_subscription_data_1->ptw_parameters_list, node) {
+ OpenAPI_ptw_parameters_1_free(node->data);
+ }
+ OpenAPI_list_free(access_and_mobility_subscription_data_1->ptw_parameters_list);
+ OpenAPI_list_for_each(access_and_mobility_subscription_data_1->wireline_forbidden_areas, node) {
+ OpenAPI_wireline_area_1_free(node->data);
+ }
+ OpenAPI_list_free(access_and_mobility_subscription_data_1->wireline_forbidden_areas);
+ OpenAPI_wireline_service_area_restriction_1_free(access_and_mobility_subscription_data_1->wireline_service_area_restriction);
+ ogs_free(access_and_mobility_subscription_data_1);
+}
+
+cJSON *OpenAPI_access_and_mobility_subscription_data_1_convertToJSON(OpenAPI_access_and_mobility_subscription_data_1_t *access_and_mobility_subscription_data_1)
+{
+ cJSON *item = NULL;
+
+ if (access_and_mobility_subscription_data_1 == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [AccessAndMobilitySubscriptionData_1]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (access_and_mobility_subscription_data_1->supported_features) {
+ if (cJSON_AddStringToObject(item, "supportedFeatures", access_and_mobility_subscription_data_1->supported_features) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [supported_features]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->gpsis) {
+ cJSON *gpsis = cJSON_AddArrayToObject(item, "gpsis");
+ if (gpsis == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [gpsis]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *gpsis_node;
+ OpenAPI_list_for_each(access_and_mobility_subscription_data_1->gpsis, gpsis_node) {
+ if (cJSON_AddStringToObject(gpsis, "", (char*)gpsis_node->data) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [gpsis]");
+ goto end;
+ }
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->internal_group_ids) {
+ cJSON *internal_group_ids = cJSON_AddArrayToObject(item, "internalGroupIds");
+ if (internal_group_ids == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [internal_group_ids]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *internal_group_ids_node;
+ OpenAPI_list_for_each(access_and_mobility_subscription_data_1->internal_group_ids, internal_group_ids_node) {
+ if (cJSON_AddStringToObject(internal_group_ids, "", (char*)internal_group_ids_node->data) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [internal_group_ids]");
+ goto end;
+ }
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->shared_vn_group_data_ids) {
+ cJSON *shared_vn_group_data_ids = cJSON_AddObjectToObject(item, "sharedVnGroupDataIds");
+ if (shared_vn_group_data_ids == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [shared_vn_group_data_ids]");
+ goto end;
+ }
+ cJSON *localMapObject = shared_vn_group_data_ids;
+ OpenAPI_lnode_t *shared_vn_group_data_ids_node;
+ if (access_and_mobility_subscription_data_1->shared_vn_group_data_ids) {
+ OpenAPI_list_for_each(access_and_mobility_subscription_data_1->shared_vn_group_data_ids, shared_vn_group_data_ids_node) {
+ OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)shared_vn_group_data_ids_node->data;
+ }
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->subscribed_ue_ambr) {
+ cJSON *subscribed_ue_ambr_local_JSON = OpenAPI_ambr_rm_convertToJSON(access_and_mobility_subscription_data_1->subscribed_ue_ambr);
+ if (subscribed_ue_ambr_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [subscribed_ue_ambr]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "subscribedUeAmbr", subscribed_ue_ambr_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [subscribed_ue_ambr]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->nssai) {
+ cJSON *nssai_local_JSON = OpenAPI_nssai_1_convertToJSON(access_and_mobility_subscription_data_1->nssai);
+ if (nssai_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [nssai]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "nssai", nssai_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [nssai]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->rat_restrictions) {
+ cJSON *rat_restrictions = cJSON_AddArrayToObject(item, "ratRestrictions");
+ if (rat_restrictions == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [rat_restrictions]");
+ goto end;
+ }
+ OpenAPI_lnode_t *rat_restrictions_node;
+ OpenAPI_list_for_each(access_and_mobility_subscription_data_1->rat_restrictions, rat_restrictions_node) {
+ if (cJSON_AddStringToObject(rat_restrictions, "", OpenAPI_rat_type_ToString((intptr_t)rat_restrictions_node->data)) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [rat_restrictions]");
+ goto end;
+ }
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->forbidden_areas) {
+ cJSON *forbidden_areasList = cJSON_AddArrayToObject(item, "forbiddenAreas");
+ if (forbidden_areasList == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [forbidden_areas]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *forbidden_areas_node;
+ if (access_and_mobility_subscription_data_1->forbidden_areas) {
+ OpenAPI_list_for_each(access_and_mobility_subscription_data_1->forbidden_areas, forbidden_areas_node) {
+ cJSON *itemLocal = OpenAPI_area_1_convertToJSON(forbidden_areas_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [forbidden_areas]");
+ goto end;
+ }
+ cJSON_AddItemToArray(forbidden_areasList, itemLocal);
+ }
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->service_area_restriction) {
+ cJSON *service_area_restriction_local_JSON = OpenAPI_service_area_restriction_1_convertToJSON(access_and_mobility_subscription_data_1->service_area_restriction);
+ if (service_area_restriction_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [service_area_restriction]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "serviceAreaRestriction", service_area_restriction_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [service_area_restriction]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->core_network_type_restrictions) {
+ cJSON *core_network_type_restrictions = cJSON_AddArrayToObject(item, "coreNetworkTypeRestrictions");
+ if (core_network_type_restrictions == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [core_network_type_restrictions]");
+ goto end;
+ }
+ OpenAPI_lnode_t *core_network_type_restrictions_node;
+ OpenAPI_list_for_each(access_and_mobility_subscription_data_1->core_network_type_restrictions, core_network_type_restrictions_node) {
+ if (cJSON_AddStringToObject(core_network_type_restrictions, "", OpenAPI_core_network_type_ToString((intptr_t)core_network_type_restrictions_node->data)) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [core_network_type_restrictions]");
+ goto end;
+ }
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->rfsp_index) {
+ if (cJSON_AddNumberToObject(item, "rfspIndex", access_and_mobility_subscription_data_1->rfsp_index) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [rfsp_index]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->subs_reg_timer) {
+ if (cJSON_AddNumberToObject(item, "subsRegTimer", access_and_mobility_subscription_data_1->subs_reg_timer) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [subs_reg_timer]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->ue_usage_type) {
+ if (cJSON_AddNumberToObject(item, "ueUsageType", access_and_mobility_subscription_data_1->ue_usage_type) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [ue_usage_type]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->mps_priority) {
+ if (cJSON_AddBoolToObject(item, "mpsPriority", access_and_mobility_subscription_data_1->mps_priority) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [mps_priority]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->mcs_priority) {
+ if (cJSON_AddBoolToObject(item, "mcsPriority", access_and_mobility_subscription_data_1->mcs_priority) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [mcs_priority]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->active_time) {
+ if (cJSON_AddNumberToObject(item, "activeTime", access_and_mobility_subscription_data_1->active_time) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [active_time]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->sor_info) {
+ cJSON *sor_info_local_JSON = OpenAPI_sor_info_1_convertToJSON(access_and_mobility_subscription_data_1->sor_info);
+ if (sor_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [sor_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "sorInfo", sor_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [sor_info]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->sor_info_expect_ind) {
+ if (cJSON_AddBoolToObject(item, "sorInfoExpectInd", access_and_mobility_subscription_data_1->sor_info_expect_ind) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [sor_info_expect_ind]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->soraf_retrieval) {
+ if (cJSON_AddBoolToObject(item, "sorafRetrieval", access_and_mobility_subscription_data_1->soraf_retrieval) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [soraf_retrieval]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->sor_update_indicator_list) {
+ cJSON *sor_update_indicator_list = cJSON_AddArrayToObject(item, "sorUpdateIndicatorList");
+ if (sor_update_indicator_list == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [sor_update_indicator_list]");
+ goto end;
+ }
+ OpenAPI_lnode_t *sor_update_indicator_list_node;
+ OpenAPI_list_for_each(access_and_mobility_subscription_data_1->sor_update_indicator_list, sor_update_indicator_list_node) {
+ if (cJSON_AddStringToObject(sor_update_indicator_list, "", OpenAPI_sor_update_indicator_ToString((intptr_t)sor_update_indicator_list_node->data)) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [sor_update_indicator_list]");
+ goto end;
+ }
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->upu_info) {
+ cJSON *upu_info_local_JSON = OpenAPI_upu_info_1_convertToJSON(access_and_mobility_subscription_data_1->upu_info);
+ if (upu_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [upu_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "upuInfo", upu_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [upu_info]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->mico_allowed) {
+ if (cJSON_AddBoolToObject(item, "micoAllowed", access_and_mobility_subscription_data_1->mico_allowed) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [mico_allowed]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->shared_am_data_ids) {
+ cJSON *shared_am_data_ids = cJSON_AddArrayToObject(item, "sharedAmDataIds");
+ if (shared_am_data_ids == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [shared_am_data_ids]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *shared_am_data_ids_node;
+ OpenAPI_list_for_each(access_and_mobility_subscription_data_1->shared_am_data_ids, shared_am_data_ids_node) {
+ if (cJSON_AddStringToObject(shared_am_data_ids, "", (char*)shared_am_data_ids_node->data) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [shared_am_data_ids]");
+ goto end;
+ }
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->odb_packet_services) {
+ if (cJSON_AddStringToObject(item, "odbPacketServices", OpenAPI_odb_packet_services_ToString(access_and_mobility_subscription_data_1->odb_packet_services)) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [odb_packet_services]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->subscribed_dnn_list) {
+ cJSON *subscribed_dnn_list = cJSON_AddArrayToObject(item, "subscribedDnnList");
+ if (subscribed_dnn_list == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [subscribed_dnn_list]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *subscribed_dnn_list_node;
+ OpenAPI_list_for_each(access_and_mobility_subscription_data_1->subscribed_dnn_list, subscribed_dnn_list_node) {
+ if (cJSON_AddStringToObject(subscribed_dnn_list, "", (char*)subscribed_dnn_list_node->data) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [subscribed_dnn_list]");
+ goto end;
+ }
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->service_gap_time) {
+ if (cJSON_AddNumberToObject(item, "serviceGapTime", access_and_mobility_subscription_data_1->service_gap_time) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [service_gap_time]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->mdt_user_consent) {
+ if (cJSON_AddStringToObject(item, "mdtUserConsent", OpenAPI_mdt_user_consent_ToString(access_and_mobility_subscription_data_1->mdt_user_consent)) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [mdt_user_consent]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->mdt_configuration) {
+ cJSON *mdt_configuration_local_JSON = OpenAPI_mdt_configuration_1_convertToJSON(access_and_mobility_subscription_data_1->mdt_configuration);
+ if (mdt_configuration_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [mdt_configuration]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "mdtConfiguration", mdt_configuration_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [mdt_configuration]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->trace_data) {
+ cJSON *trace_data_local_JSON = OpenAPI_trace_data_convertToJSON(access_and_mobility_subscription_data_1->trace_data);
+ if (trace_data_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [trace_data]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "traceData", trace_data_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [trace_data]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->cag_data) {
+ cJSON *cag_data_local_JSON = OpenAPI_cag_data_1_convertToJSON(access_and_mobility_subscription_data_1->cag_data);
+ if (cag_data_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [cag_data]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "cagData", cag_data_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [cag_data]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->stn_sr) {
+ if (cJSON_AddStringToObject(item, "stnSr", access_and_mobility_subscription_data_1->stn_sr) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [stn_sr]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->c_msisdn) {
+ if (cJSON_AddStringToObject(item, "cMsisdn", access_and_mobility_subscription_data_1->c_msisdn) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [c_msisdn]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->nb_io_tue_priority) {
+ if (cJSON_AddNumberToObject(item, "nbIoTUePriority", access_and_mobility_subscription_data_1->nb_io_tue_priority) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [nb_io_tue_priority]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->nssai_inclusion_allowed) {
+ if (cJSON_AddBoolToObject(item, "nssaiInclusionAllowed", access_and_mobility_subscription_data_1->nssai_inclusion_allowed) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [nssai_inclusion_allowed]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->rg_wireline_characteristics) {
+ if (cJSON_AddStringToObject(item, "rgWirelineCharacteristics", access_and_mobility_subscription_data_1->rg_wireline_characteristics) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [rg_wireline_characteristics]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->ec_restriction_data_wb) {
+ cJSON *ec_restriction_data_wb_local_JSON = OpenAPI_ec_restriction_data_wb_convertToJSON(access_and_mobility_subscription_data_1->ec_restriction_data_wb);
+ if (ec_restriction_data_wb_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [ec_restriction_data_wb]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "ecRestrictionDataWb", ec_restriction_data_wb_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [ec_restriction_data_wb]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->ec_restriction_data_nb) {
+ if (cJSON_AddBoolToObject(item, "ecRestrictionDataNb", access_and_mobility_subscription_data_1->ec_restriction_data_nb) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [ec_restriction_data_nb]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->expected_ue_behaviour_list) {
+ cJSON *expected_ue_behaviour_list_local_JSON = OpenAPI_expected_ue_behaviour_data_1_convertToJSON(access_and_mobility_subscription_data_1->expected_ue_behaviour_list);
+ if (expected_ue_behaviour_list_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [expected_ue_behaviour_list]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "expectedUeBehaviourList", expected_ue_behaviour_list_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [expected_ue_behaviour_list]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->primary_rat_restrictions) {
+ cJSON *primary_rat_restrictions = cJSON_AddArrayToObject(item, "primaryRatRestrictions");
+ if (primary_rat_restrictions == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [primary_rat_restrictions]");
+ goto end;
+ }
+ OpenAPI_lnode_t *primary_rat_restrictions_node;
+ OpenAPI_list_for_each(access_and_mobility_subscription_data_1->primary_rat_restrictions, primary_rat_restrictions_node) {
+ if (cJSON_AddStringToObject(primary_rat_restrictions, "", OpenAPI_rat_type_ToString((intptr_t)primary_rat_restrictions_node->data)) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [primary_rat_restrictions]");
+ goto end;
+ }
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->secondary_rat_restrictions) {
+ cJSON *secondary_rat_restrictions = cJSON_AddArrayToObject(item, "secondaryRatRestrictions");
+ if (secondary_rat_restrictions == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [secondary_rat_restrictions]");
+ goto end;
+ }
+ OpenAPI_lnode_t *secondary_rat_restrictions_node;
+ OpenAPI_list_for_each(access_and_mobility_subscription_data_1->secondary_rat_restrictions, secondary_rat_restrictions_node) {
+ if (cJSON_AddStringToObject(secondary_rat_restrictions, "", OpenAPI_rat_type_ToString((intptr_t)secondary_rat_restrictions_node->data)) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [secondary_rat_restrictions]");
+ goto end;
+ }
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->edrx_parameters_list) {
+ cJSON *edrx_parameters_listList = cJSON_AddArrayToObject(item, "edrxParametersList");
+ if (edrx_parameters_listList == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [edrx_parameters_list]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *edrx_parameters_list_node;
+ if (access_and_mobility_subscription_data_1->edrx_parameters_list) {
+ OpenAPI_list_for_each(access_and_mobility_subscription_data_1->edrx_parameters_list, edrx_parameters_list_node) {
+ cJSON *itemLocal = OpenAPI_edrx_parameters_1_convertToJSON(edrx_parameters_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [edrx_parameters_list]");
+ goto end;
+ }
+ cJSON_AddItemToArray(edrx_parameters_listList, itemLocal);
+ }
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->ptw_parameters_list) {
+ cJSON *ptw_parameters_listList = cJSON_AddArrayToObject(item, "ptwParametersList");
+ if (ptw_parameters_listList == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [ptw_parameters_list]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *ptw_parameters_list_node;
+ if (access_and_mobility_subscription_data_1->ptw_parameters_list) {
+ OpenAPI_list_for_each(access_and_mobility_subscription_data_1->ptw_parameters_list, ptw_parameters_list_node) {
+ cJSON *itemLocal = OpenAPI_ptw_parameters_1_convertToJSON(ptw_parameters_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [ptw_parameters_list]");
+ goto end;
+ }
+ cJSON_AddItemToArray(ptw_parameters_listList, itemLocal);
+ }
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->iab_operation_allowed) {
+ if (cJSON_AddBoolToObject(item, "iabOperationAllowed", access_and_mobility_subscription_data_1->iab_operation_allowed) == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [iab_operation_allowed]");
+ goto end;
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->wireline_forbidden_areas) {
+ cJSON *wireline_forbidden_areasList = cJSON_AddArrayToObject(item, "wirelineForbiddenAreas");
+ if (wireline_forbidden_areasList == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [wireline_forbidden_areas]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *wireline_forbidden_areas_node;
+ if (access_and_mobility_subscription_data_1->wireline_forbidden_areas) {
+ OpenAPI_list_for_each(access_and_mobility_subscription_data_1->wireline_forbidden_areas, wireline_forbidden_areas_node) {
+ cJSON *itemLocal = OpenAPI_wireline_area_1_convertToJSON(wireline_forbidden_areas_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [wireline_forbidden_areas]");
+ goto end;
+ }
+ cJSON_AddItemToArray(wireline_forbidden_areasList, itemLocal);
+ }
+ }
+ }
+
+ if (access_and_mobility_subscription_data_1->wireline_service_area_restriction) {
+ cJSON *wireline_service_area_restriction_local_JSON = OpenAPI_wireline_service_area_restriction_1_convertToJSON(access_and_mobility_subscription_data_1->wireline_service_area_restriction);
+ if (wireline_service_area_restriction_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [wireline_service_area_restriction]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "wirelineServiceAreaRestriction", wireline_service_area_restriction_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed [wireline_service_area_restriction]");
+ goto end;
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_access_and_mobility_subscription_data_1_t *OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON(cJSON *access_and_mobility_subscription_data_1JSON)
+{
+ OpenAPI_access_and_mobility_subscription_data_1_t *access_and_mobility_subscription_data_1_local_var = NULL;
+ cJSON *supported_features = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "supportedFeatures");
+
+ if (supported_features) {
+ if (!cJSON_IsString(supported_features)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [supported_features]");
+ goto end;
+ }
+ }
+
+ cJSON *gpsis = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "gpsis");
+
+ OpenAPI_list_t *gpsisList;
+ if (gpsis) {
+ cJSON *gpsis_local;
+ if (!cJSON_IsArray(gpsis)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [gpsis]");
+ goto end;
+ }
+ gpsisList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(gpsis_local, gpsis) {
+ if (!cJSON_IsString(gpsis_local)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [gpsis]");
+ goto end;
+ }
+ OpenAPI_list_add(gpsisList , ogs_strdup_or_assert(gpsis_local->valuestring));
+ }
+ }
+
+ cJSON *internal_group_ids = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "internalGroupIds");
+
+ OpenAPI_list_t *internal_group_idsList;
+ if (internal_group_ids) {
+ cJSON *internal_group_ids_local;
+ if (!cJSON_IsArray(internal_group_ids)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [internal_group_ids]");
+ goto end;
+ }
+ internal_group_idsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(internal_group_ids_local, internal_group_ids) {
+ if (!cJSON_IsString(internal_group_ids_local)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [internal_group_ids]");
+ goto end;
+ }
+ OpenAPI_list_add(internal_group_idsList , ogs_strdup_or_assert(internal_group_ids_local->valuestring));
+ }
+ }
+
+ cJSON *shared_vn_group_data_ids = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "sharedVnGroupDataIds");
+
+ OpenAPI_list_t *shared_vn_group_data_idsList;
+ if (shared_vn_group_data_ids) {
+ cJSON *shared_vn_group_data_ids_local_map;
+ if (!cJSON_IsObject(shared_vn_group_data_ids)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [shared_vn_group_data_ids]");
+ goto end;
+ }
+ shared_vn_group_data_idsList = OpenAPI_list_create();
+ OpenAPI_map_t *localMapKeyPair = NULL;
+ cJSON_ArrayForEach(shared_vn_group_data_ids_local_map, shared_vn_group_data_ids) {
+ cJSON *localMapObject = shared_vn_group_data_ids_local_map;
+ OpenAPI_list_add(shared_vn_group_data_idsList , localMapKeyPair);
+ }
+ }
+
+ cJSON *subscribed_ue_ambr = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "subscribedUeAmbr");
+
+ OpenAPI_ambr_rm_t *subscribed_ue_ambr_local_nonprim = NULL;
+ if (subscribed_ue_ambr) {
+ subscribed_ue_ambr_local_nonprim = OpenAPI_ambr_rm_parseFromJSON(subscribed_ue_ambr);
+ }
+
+ cJSON *nssai = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "nssai");
+
+ OpenAPI_nssai_1_t *nssai_local_nonprim = NULL;
+ if (nssai) {
+ nssai_local_nonprim = OpenAPI_nssai_1_parseFromJSON(nssai);
+ }
+
+ cJSON *rat_restrictions = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "ratRestrictions");
+
+ OpenAPI_list_t *rat_restrictionsList;
+ if (rat_restrictions) {
+ cJSON *rat_restrictions_local_nonprimitive;
+ if (!cJSON_IsArray(rat_restrictions)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [rat_restrictions]");
+ goto end;
+ }
+
+ rat_restrictionsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(rat_restrictions_local_nonprimitive, rat_restrictions ) {
+ if (!cJSON_IsString(rat_restrictions_local_nonprimitive)){
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [rat_restrictions]");
+ goto end;
+ }
+
+ OpenAPI_list_add(rat_restrictionsList, (void *)OpenAPI_rat_type_FromString(rat_restrictions_local_nonprimitive->valuestring));
+ }
+ }
+
+ cJSON *forbidden_areas = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "forbiddenAreas");
+
+ OpenAPI_list_t *forbidden_areasList;
+ if (forbidden_areas) {
+ cJSON *forbidden_areas_local_nonprimitive;
+ if (!cJSON_IsArray(forbidden_areas)){
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [forbidden_areas]");
+ goto end;
+ }
+
+ forbidden_areasList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(forbidden_areas_local_nonprimitive, forbidden_areas ) {
+ if (!cJSON_IsObject(forbidden_areas_local_nonprimitive)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [forbidden_areas]");
+ goto end;
+ }
+ OpenAPI_area_1_t *forbidden_areasItem = OpenAPI_area_1_parseFromJSON(forbidden_areas_local_nonprimitive);
+
+ OpenAPI_list_add(forbidden_areasList, forbidden_areasItem);
+ }
+ }
+
+ cJSON *service_area_restriction = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "serviceAreaRestriction");
+
+ OpenAPI_service_area_restriction_1_t *service_area_restriction_local_nonprim = NULL;
+ if (service_area_restriction) {
+ service_area_restriction_local_nonprim = OpenAPI_service_area_restriction_1_parseFromJSON(service_area_restriction);
+ }
+
+ cJSON *core_network_type_restrictions = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "coreNetworkTypeRestrictions");
+
+ OpenAPI_list_t *core_network_type_restrictionsList;
+ if (core_network_type_restrictions) {
+ cJSON *core_network_type_restrictions_local_nonprimitive;
+ if (!cJSON_IsArray(core_network_type_restrictions)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [core_network_type_restrictions]");
+ goto end;
+ }
+
+ core_network_type_restrictionsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(core_network_type_restrictions_local_nonprimitive, core_network_type_restrictions ) {
+ if (!cJSON_IsString(core_network_type_restrictions_local_nonprimitive)){
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [core_network_type_restrictions]");
+ goto end;
+ }
+
+ OpenAPI_list_add(core_network_type_restrictionsList, (void *)OpenAPI_core_network_type_FromString(core_network_type_restrictions_local_nonprimitive->valuestring));
+ }
+ }
+
+ cJSON *rfsp_index = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "rfspIndex");
+
+ if (rfsp_index) {
+ if (!cJSON_IsNumber(rfsp_index)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [rfsp_index]");
+ goto end;
+ }
+ }
+
+ cJSON *subs_reg_timer = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "subsRegTimer");
+
+ if (subs_reg_timer) {
+ if (!cJSON_IsNumber(subs_reg_timer)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [subs_reg_timer]");
+ goto end;
+ }
+ }
+
+ cJSON *ue_usage_type = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "ueUsageType");
+
+ if (ue_usage_type) {
+ if (!cJSON_IsNumber(ue_usage_type)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [ue_usage_type]");
+ goto end;
+ }
+ }
+
+ cJSON *mps_priority = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "mpsPriority");
+
+ if (mps_priority) {
+ if (!cJSON_IsBool(mps_priority)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [mps_priority]");
+ goto end;
+ }
+ }
+
+ cJSON *mcs_priority = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "mcsPriority");
+
+ if (mcs_priority) {
+ if (!cJSON_IsBool(mcs_priority)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [mcs_priority]");
+ goto end;
+ }
+ }
+
+ cJSON *active_time = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "activeTime");
+
+ if (active_time) {
+ if (!cJSON_IsNumber(active_time)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [active_time]");
+ goto end;
+ }
+ }
+
+ cJSON *sor_info = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "sorInfo");
+
+ OpenAPI_sor_info_1_t *sor_info_local_nonprim = NULL;
+ if (sor_info) {
+ sor_info_local_nonprim = OpenAPI_sor_info_1_parseFromJSON(sor_info);
+ }
+
+ cJSON *sor_info_expect_ind = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "sorInfoExpectInd");
+
+ if (sor_info_expect_ind) {
+ if (!cJSON_IsBool(sor_info_expect_ind)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [sor_info_expect_ind]");
+ goto end;
+ }
+ }
+
+ cJSON *soraf_retrieval = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "sorafRetrieval");
+
+ if (soraf_retrieval) {
+ if (!cJSON_IsBool(soraf_retrieval)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [soraf_retrieval]");
+ goto end;
+ }
+ }
+
+ cJSON *sor_update_indicator_list = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "sorUpdateIndicatorList");
+
+ OpenAPI_list_t *sor_update_indicator_listList;
+ if (sor_update_indicator_list) {
+ cJSON *sor_update_indicator_list_local_nonprimitive;
+ if (!cJSON_IsArray(sor_update_indicator_list)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [sor_update_indicator_list]");
+ goto end;
+ }
+
+ sor_update_indicator_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(sor_update_indicator_list_local_nonprimitive, sor_update_indicator_list ) {
+ if (!cJSON_IsString(sor_update_indicator_list_local_nonprimitive)){
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [sor_update_indicator_list]");
+ goto end;
+ }
+
+ OpenAPI_list_add(sor_update_indicator_listList, (void *)OpenAPI_sor_update_indicator_FromString(sor_update_indicator_list_local_nonprimitive->valuestring));
+ }
+ }
+
+ cJSON *upu_info = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "upuInfo");
+
+ OpenAPI_upu_info_1_t *upu_info_local_nonprim = NULL;
+ if (upu_info) {
+ upu_info_local_nonprim = OpenAPI_upu_info_1_parseFromJSON(upu_info);
+ }
+
+ cJSON *mico_allowed = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "micoAllowed");
+
+ if (mico_allowed) {
+ if (!cJSON_IsBool(mico_allowed)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [mico_allowed]");
+ goto end;
+ }
+ }
+
+ cJSON *shared_am_data_ids = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "sharedAmDataIds");
+
+ OpenAPI_list_t *shared_am_data_idsList;
+ if (shared_am_data_ids) {
+ cJSON *shared_am_data_ids_local;
+ if (!cJSON_IsArray(shared_am_data_ids)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [shared_am_data_ids]");
+ goto end;
+ }
+ shared_am_data_idsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(shared_am_data_ids_local, shared_am_data_ids) {
+ if (!cJSON_IsString(shared_am_data_ids_local)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [shared_am_data_ids]");
+ goto end;
+ }
+ OpenAPI_list_add(shared_am_data_idsList , ogs_strdup_or_assert(shared_am_data_ids_local->valuestring));
+ }
+ }
+
+ cJSON *odb_packet_services = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "odbPacketServices");
+
+ OpenAPI_odb_packet_services_e odb_packet_servicesVariable;
+ if (odb_packet_services) {
+ if (!cJSON_IsString(odb_packet_services)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [odb_packet_services]");
+ goto end;
+ }
+ odb_packet_servicesVariable = OpenAPI_odb_packet_services_FromString(odb_packet_services->valuestring);
+ }
+
+ cJSON *subscribed_dnn_list = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "subscribedDnnList");
+
+ OpenAPI_list_t *subscribed_dnn_listList;
+ if (subscribed_dnn_list) {
+ cJSON *subscribed_dnn_list_local;
+ if (!cJSON_IsArray(subscribed_dnn_list)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [subscribed_dnn_list]");
+ goto end;
+ }
+ subscribed_dnn_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(subscribed_dnn_list_local, subscribed_dnn_list) {
+ if (!cJSON_IsString(subscribed_dnn_list_local)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [subscribed_dnn_list]");
+ goto end;
+ }
+ OpenAPI_list_add(subscribed_dnn_listList , ogs_strdup_or_assert(subscribed_dnn_list_local->valuestring));
+ }
+ }
+
+ cJSON *service_gap_time = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "serviceGapTime");
+
+ if (service_gap_time) {
+ if (!cJSON_IsNumber(service_gap_time)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [service_gap_time]");
+ goto end;
+ }
+ }
+
+ cJSON *mdt_user_consent = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "mdtUserConsent");
+
+ OpenAPI_mdt_user_consent_e mdt_user_consentVariable;
+ if (mdt_user_consent) {
+ if (!cJSON_IsString(mdt_user_consent)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [mdt_user_consent]");
+ goto end;
+ }
+ mdt_user_consentVariable = OpenAPI_mdt_user_consent_FromString(mdt_user_consent->valuestring);
+ }
+
+ cJSON *mdt_configuration = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "mdtConfiguration");
+
+ OpenAPI_mdt_configuration_1_t *mdt_configuration_local_nonprim = NULL;
+ if (mdt_configuration) {
+ mdt_configuration_local_nonprim = OpenAPI_mdt_configuration_1_parseFromJSON(mdt_configuration);
+ }
+
+ cJSON *trace_data = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "traceData");
+
+ OpenAPI_trace_data_t *trace_data_local_nonprim = NULL;
+ if (trace_data) {
+ trace_data_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_data);
+ }
+
+ cJSON *cag_data = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "cagData");
+
+ OpenAPI_cag_data_1_t *cag_data_local_nonprim = NULL;
+ if (cag_data) {
+ cag_data_local_nonprim = OpenAPI_cag_data_1_parseFromJSON(cag_data);
+ }
+
+ cJSON *stn_sr = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "stnSr");
+
+ if (stn_sr) {
+ if (!cJSON_IsString(stn_sr)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [stn_sr]");
+ goto end;
+ }
+ }
+
+ cJSON *c_msisdn = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "cMsisdn");
+
+ if (c_msisdn) {
+ if (!cJSON_IsString(c_msisdn)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [c_msisdn]");
+ goto end;
+ }
+ }
+
+ cJSON *nb_io_tue_priority = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "nbIoTUePriority");
+
+ if (nb_io_tue_priority) {
+ if (!cJSON_IsNumber(nb_io_tue_priority)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [nb_io_tue_priority]");
+ goto end;
+ }
+ }
+
+ cJSON *nssai_inclusion_allowed = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "nssaiInclusionAllowed");
+
+ if (nssai_inclusion_allowed) {
+ if (!cJSON_IsBool(nssai_inclusion_allowed)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [nssai_inclusion_allowed]");
+ goto end;
+ }
+ }
+
+ cJSON *rg_wireline_characteristics = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "rgWirelineCharacteristics");
+
+ if (rg_wireline_characteristics) {
+ if (!cJSON_IsString(rg_wireline_characteristics)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [rg_wireline_characteristics]");
+ goto end;
+ }
+ }
+
+ cJSON *ec_restriction_data_wb = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "ecRestrictionDataWb");
+
+ OpenAPI_ec_restriction_data_wb_t *ec_restriction_data_wb_local_nonprim = NULL;
+ if (ec_restriction_data_wb) {
+ ec_restriction_data_wb_local_nonprim = OpenAPI_ec_restriction_data_wb_parseFromJSON(ec_restriction_data_wb);
+ }
+
+ cJSON *ec_restriction_data_nb = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "ecRestrictionDataNb");
+
+ if (ec_restriction_data_nb) {
+ if (!cJSON_IsBool(ec_restriction_data_nb)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [ec_restriction_data_nb]");
+ goto end;
+ }
+ }
+
+ cJSON *expected_ue_behaviour_list = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "expectedUeBehaviourList");
+
+ OpenAPI_expected_ue_behaviour_data_1_t *expected_ue_behaviour_list_local_nonprim = NULL;
+ if (expected_ue_behaviour_list) {
+ expected_ue_behaviour_list_local_nonprim = OpenAPI_expected_ue_behaviour_data_1_parseFromJSON(expected_ue_behaviour_list);
+ }
+
+ cJSON *primary_rat_restrictions = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "primaryRatRestrictions");
+
+ OpenAPI_list_t *primary_rat_restrictionsList;
+ if (primary_rat_restrictions) {
+ cJSON *primary_rat_restrictions_local_nonprimitive;
+ if (!cJSON_IsArray(primary_rat_restrictions)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [primary_rat_restrictions]");
+ goto end;
+ }
+
+ primary_rat_restrictionsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(primary_rat_restrictions_local_nonprimitive, primary_rat_restrictions ) {
+ if (!cJSON_IsString(primary_rat_restrictions_local_nonprimitive)){
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [primary_rat_restrictions]");
+ goto end;
+ }
+
+ OpenAPI_list_add(primary_rat_restrictionsList, (void *)OpenAPI_rat_type_FromString(primary_rat_restrictions_local_nonprimitive->valuestring));
+ }
+ }
+
+ cJSON *secondary_rat_restrictions = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "secondaryRatRestrictions");
+
+ OpenAPI_list_t *secondary_rat_restrictionsList;
+ if (secondary_rat_restrictions) {
+ cJSON *secondary_rat_restrictions_local_nonprimitive;
+ if (!cJSON_IsArray(secondary_rat_restrictions)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [secondary_rat_restrictions]");
+ goto end;
+ }
+
+ secondary_rat_restrictionsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(secondary_rat_restrictions_local_nonprimitive, secondary_rat_restrictions ) {
+ if (!cJSON_IsString(secondary_rat_restrictions_local_nonprimitive)){
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [secondary_rat_restrictions]");
+ goto end;
+ }
+
+ OpenAPI_list_add(secondary_rat_restrictionsList, (void *)OpenAPI_rat_type_FromString(secondary_rat_restrictions_local_nonprimitive->valuestring));
+ }
+ }
+
+ cJSON *edrx_parameters_list = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "edrxParametersList");
+
+ OpenAPI_list_t *edrx_parameters_listList;
+ if (edrx_parameters_list) {
+ cJSON *edrx_parameters_list_local_nonprimitive;
+ if (!cJSON_IsArray(edrx_parameters_list)){
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [edrx_parameters_list]");
+ goto end;
+ }
+
+ edrx_parameters_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(edrx_parameters_list_local_nonprimitive, edrx_parameters_list ) {
+ if (!cJSON_IsObject(edrx_parameters_list_local_nonprimitive)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [edrx_parameters_list]");
+ goto end;
+ }
+ OpenAPI_edrx_parameters_1_t *edrx_parameters_listItem = OpenAPI_edrx_parameters_1_parseFromJSON(edrx_parameters_list_local_nonprimitive);
+
+ OpenAPI_list_add(edrx_parameters_listList, edrx_parameters_listItem);
+ }
+ }
+
+ cJSON *ptw_parameters_list = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "ptwParametersList");
+
+ OpenAPI_list_t *ptw_parameters_listList;
+ if (ptw_parameters_list) {
+ cJSON *ptw_parameters_list_local_nonprimitive;
+ if (!cJSON_IsArray(ptw_parameters_list)){
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [ptw_parameters_list]");
+ goto end;
+ }
+
+ ptw_parameters_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(ptw_parameters_list_local_nonprimitive, ptw_parameters_list ) {
+ if (!cJSON_IsObject(ptw_parameters_list_local_nonprimitive)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [ptw_parameters_list]");
+ goto end;
+ }
+ OpenAPI_ptw_parameters_1_t *ptw_parameters_listItem = OpenAPI_ptw_parameters_1_parseFromJSON(ptw_parameters_list_local_nonprimitive);
+
+ OpenAPI_list_add(ptw_parameters_listList, ptw_parameters_listItem);
+ }
+ }
+
+ cJSON *iab_operation_allowed = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "iabOperationAllowed");
+
+ if (iab_operation_allowed) {
+ if (!cJSON_IsBool(iab_operation_allowed)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [iab_operation_allowed]");
+ goto end;
+ }
+ }
+
+ cJSON *wireline_forbidden_areas = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "wirelineForbiddenAreas");
+
+ OpenAPI_list_t *wireline_forbidden_areasList;
+ if (wireline_forbidden_areas) {
+ cJSON *wireline_forbidden_areas_local_nonprimitive;
+ if (!cJSON_IsArray(wireline_forbidden_areas)){
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [wireline_forbidden_areas]");
+ goto end;
+ }
+
+ wireline_forbidden_areasList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(wireline_forbidden_areas_local_nonprimitive, wireline_forbidden_areas ) {
+ if (!cJSON_IsObject(wireline_forbidden_areas_local_nonprimitive)) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON() failed [wireline_forbidden_areas]");
+ goto end;
+ }
+ OpenAPI_wireline_area_1_t *wireline_forbidden_areasItem = OpenAPI_wireline_area_1_parseFromJSON(wireline_forbidden_areas_local_nonprimitive);
+
+ OpenAPI_list_add(wireline_forbidden_areasList, wireline_forbidden_areasItem);
+ }
+ }
+
+ cJSON *wireline_service_area_restriction = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "wirelineServiceAreaRestriction");
+
+ OpenAPI_wireline_service_area_restriction_1_t *wireline_service_area_restriction_local_nonprim = NULL;
+ if (wireline_service_area_restriction) {
+ wireline_service_area_restriction_local_nonprim = OpenAPI_wireline_service_area_restriction_1_parseFromJSON(wireline_service_area_restriction);
+ }
+
+ access_and_mobility_subscription_data_1_local_var = OpenAPI_access_and_mobility_subscription_data_1_create (
+ supported_features ? ogs_strdup_or_assert(supported_features->valuestring) : NULL,
+ gpsis ? gpsisList : NULL,
+ internal_group_ids ? internal_group_idsList : NULL,
+ shared_vn_group_data_ids ? shared_vn_group_data_idsList : NULL,
+ subscribed_ue_ambr ? subscribed_ue_ambr_local_nonprim : NULL,
+ nssai ? nssai_local_nonprim : NULL,
+ rat_restrictions ? rat_restrictionsList : NULL,
+ forbidden_areas ? forbidden_areasList : NULL,
+ service_area_restriction ? service_area_restriction_local_nonprim : NULL,
+ core_network_type_restrictions ? core_network_type_restrictionsList : NULL,
+ rfsp_index ? rfsp_index->valuedouble : 0,
+ subs_reg_timer ? subs_reg_timer->valuedouble : 0,
+ ue_usage_type ? ue_usage_type->valuedouble : 0,
+ mps_priority ? mps_priority->valueint : 0,
+ mcs_priority ? mcs_priority->valueint : 0,
+ active_time ? active_time->valuedouble : 0,
+ sor_info ? sor_info_local_nonprim : NULL,
+ sor_info_expect_ind ? sor_info_expect_ind->valueint : 0,
+ soraf_retrieval ? soraf_retrieval->valueint : 0,
+ sor_update_indicator_list ? sor_update_indicator_listList : NULL,
+ upu_info ? upu_info_local_nonprim : NULL,
+ mico_allowed ? mico_allowed->valueint : 0,
+ shared_am_data_ids ? shared_am_data_idsList : NULL,
+ odb_packet_services ? odb_packet_servicesVariable : 0,
+ subscribed_dnn_list ? subscribed_dnn_listList : NULL,
+ service_gap_time ? service_gap_time->valuedouble : 0,
+ mdt_user_consent ? mdt_user_consentVariable : 0,
+ mdt_configuration ? mdt_configuration_local_nonprim : NULL,
+ trace_data ? trace_data_local_nonprim : NULL,
+ cag_data ? cag_data_local_nonprim : NULL,
+ stn_sr ? ogs_strdup_or_assert(stn_sr->valuestring) : NULL,
+ c_msisdn ? ogs_strdup_or_assert(c_msisdn->valuestring) : NULL,
+ nb_io_tue_priority ? nb_io_tue_priority->valuedouble : 0,
+ nssai_inclusion_allowed ? nssai_inclusion_allowed->valueint : 0,
+ rg_wireline_characteristics ? ogs_strdup_or_assert(rg_wireline_characteristics->valuestring) : NULL,
+ ec_restriction_data_wb ? ec_restriction_data_wb_local_nonprim : NULL,
+ ec_restriction_data_nb ? ec_restriction_data_nb->valueint : 0,
+ expected_ue_behaviour_list ? expected_ue_behaviour_list_local_nonprim : NULL,
+ primary_rat_restrictions ? primary_rat_restrictionsList : NULL,
+ secondary_rat_restrictions ? secondary_rat_restrictionsList : NULL,
+ edrx_parameters_list ? edrx_parameters_listList : NULL,
+ ptw_parameters_list ? ptw_parameters_listList : NULL,
+ iab_operation_allowed ? iab_operation_allowed->valueint : 0,
+ wireline_forbidden_areas ? wireline_forbidden_areasList : NULL,
+ wireline_service_area_restriction ? wireline_service_area_restriction_local_nonprim : NULL
+ );
+
+ return access_and_mobility_subscription_data_1_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_access_and_mobility_subscription_data_1_t *OpenAPI_access_and_mobility_subscription_data_1_copy(OpenAPI_access_and_mobility_subscription_data_1_t *dst, OpenAPI_access_and_mobility_subscription_data_1_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_access_and_mobility_subscription_data_1_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_access_and_mobility_subscription_data_1_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_access_and_mobility_subscription_data_1_free(dst);
+ dst = OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/access_and_mobility_subscription_data_1.h b/lib/sbi/openapi/model/access_and_mobility_subscription_data_1.h
new file mode 100644
index 000000000..bb5866208
--- /dev/null
+++ b/lib/sbi/openapi/model/access_and_mobility_subscription_data_1.h
@@ -0,0 +1,146 @@
+/*
+ * access_and_mobility_subscription_data_1.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_access_and_mobility_subscription_data_1_H_
+#define _OpenAPI_access_and_mobility_subscription_data_1_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+#include "ambr_rm.h"
+#include "area_1.h"
+#include "cag_data_1.h"
+#include "core_network_type.h"
+#include "ec_restriction_data_wb.h"
+#include "edrx_parameters_1.h"
+#include "expected_ue_behaviour_data_1.h"
+#include "mdt_configuration_1.h"
+#include "mdt_user_consent.h"
+#include "nssai_1.h"
+#include "odb_packet_services.h"
+#include "ptw_parameters_1.h"
+#include "rat_type.h"
+#include "service_area_restriction_1.h"
+#include "sor_info_1.h"
+#include "sor_update_indicator.h"
+#include "trace_data.h"
+#include "upu_info_1.h"
+#include "wireline_area_1.h"
+#include "wireline_service_area_restriction_1.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_access_and_mobility_subscription_data_1_s OpenAPI_access_and_mobility_subscription_data_1_t;
+typedef struct OpenAPI_access_and_mobility_subscription_data_1_s {
+ char *supported_features;
+ OpenAPI_list_t *gpsis;
+ OpenAPI_list_t *internal_group_ids;
+ OpenAPI_list_t* shared_vn_group_data_ids;
+ struct OpenAPI_ambr_rm_s *subscribed_ue_ambr;
+ struct OpenAPI_nssai_1_s *nssai;
+ OpenAPI_list_t *rat_restrictions;
+ OpenAPI_list_t *forbidden_areas;
+ struct OpenAPI_service_area_restriction_1_s *service_area_restriction;
+ OpenAPI_list_t *core_network_type_restrictions;
+ int rfsp_index;
+ int subs_reg_timer;
+ int ue_usage_type;
+ int mps_priority;
+ int mcs_priority;
+ int active_time;
+ struct OpenAPI_sor_info_1_s *sor_info;
+ int sor_info_expect_ind;
+ int soraf_retrieval;
+ OpenAPI_list_t *sor_update_indicator_list;
+ struct OpenAPI_upu_info_1_s *upu_info;
+ int mico_allowed;
+ OpenAPI_list_t *shared_am_data_ids;
+ OpenAPI_odb_packet_services_e odb_packet_services;
+ OpenAPI_list_t *subscribed_dnn_list;
+ int service_gap_time;
+ OpenAPI_mdt_user_consent_e mdt_user_consent;
+ struct OpenAPI_mdt_configuration_1_s *mdt_configuration;
+ struct OpenAPI_trace_data_s *trace_data;
+ struct OpenAPI_cag_data_1_s *cag_data;
+ char *stn_sr;
+ char *c_msisdn;
+ int nb_io_tue_priority;
+ int nssai_inclusion_allowed;
+ char *rg_wireline_characteristics;
+ struct OpenAPI_ec_restriction_data_wb_s *ec_restriction_data_wb;
+ int ec_restriction_data_nb;
+ struct OpenAPI_expected_ue_behaviour_data_1_s *expected_ue_behaviour_list;
+ OpenAPI_list_t *primary_rat_restrictions;
+ OpenAPI_list_t *secondary_rat_restrictions;
+ OpenAPI_list_t *edrx_parameters_list;
+ OpenAPI_list_t *ptw_parameters_list;
+ int iab_operation_allowed;
+ OpenAPI_list_t *wireline_forbidden_areas;
+ struct OpenAPI_wireline_service_area_restriction_1_s *wireline_service_area_restriction;
+} OpenAPI_access_and_mobility_subscription_data_1_t;
+
+OpenAPI_access_and_mobility_subscription_data_1_t *OpenAPI_access_and_mobility_subscription_data_1_create(
+ char *supported_features,
+ OpenAPI_list_t *gpsis,
+ OpenAPI_list_t *internal_group_ids,
+ OpenAPI_list_t* shared_vn_group_data_ids,
+ OpenAPI_ambr_rm_t *subscribed_ue_ambr,
+ OpenAPI_nssai_1_t *nssai,
+ OpenAPI_list_t *rat_restrictions,
+ OpenAPI_list_t *forbidden_areas,
+ OpenAPI_service_area_restriction_1_t *service_area_restriction,
+ OpenAPI_list_t *core_network_type_restrictions,
+ int rfsp_index,
+ int subs_reg_timer,
+ int ue_usage_type,
+ int mps_priority,
+ int mcs_priority,
+ int active_time,
+ OpenAPI_sor_info_1_t *sor_info,
+ int sor_info_expect_ind,
+ int soraf_retrieval,
+ OpenAPI_list_t *sor_update_indicator_list,
+ OpenAPI_upu_info_1_t *upu_info,
+ int mico_allowed,
+ OpenAPI_list_t *shared_am_data_ids,
+ OpenAPI_odb_packet_services_e odb_packet_services,
+ OpenAPI_list_t *subscribed_dnn_list,
+ int service_gap_time,
+ OpenAPI_mdt_user_consent_e mdt_user_consent,
+ OpenAPI_mdt_configuration_1_t *mdt_configuration,
+ OpenAPI_trace_data_t *trace_data,
+ OpenAPI_cag_data_1_t *cag_data,
+ char *stn_sr,
+ char *c_msisdn,
+ int nb_io_tue_priority,
+ int nssai_inclusion_allowed,
+ char *rg_wireline_characteristics,
+ OpenAPI_ec_restriction_data_wb_t *ec_restriction_data_wb,
+ int ec_restriction_data_nb,
+ OpenAPI_expected_ue_behaviour_data_1_t *expected_ue_behaviour_list,
+ OpenAPI_list_t *primary_rat_restrictions,
+ OpenAPI_list_t *secondary_rat_restrictions,
+ OpenAPI_list_t *edrx_parameters_list,
+ OpenAPI_list_t *ptw_parameters_list,
+ int iab_operation_allowed,
+ OpenAPI_list_t *wireline_forbidden_areas,
+ OpenAPI_wireline_service_area_restriction_1_t *wireline_service_area_restriction
+);
+void OpenAPI_access_and_mobility_subscription_data_1_free(OpenAPI_access_and_mobility_subscription_data_1_t *access_and_mobility_subscription_data_1);
+OpenAPI_access_and_mobility_subscription_data_1_t *OpenAPI_access_and_mobility_subscription_data_1_parseFromJSON(cJSON *access_and_mobility_subscription_data_1JSON);
+cJSON *OpenAPI_access_and_mobility_subscription_data_1_convertToJSON(OpenAPI_access_and_mobility_subscription_data_1_t *access_and_mobility_subscription_data_1);
+OpenAPI_access_and_mobility_subscription_data_1_t *OpenAPI_access_and_mobility_subscription_data_1_copy(OpenAPI_access_and_mobility_subscription_data_1_t *dst, OpenAPI_access_and_mobility_subscription_data_1_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_access_and_mobility_subscription_data_1_H_ */
+
diff --git a/lib/sbi/openapi/model/access_net_charging_identifier.c b/lib/sbi/openapi/model/access_net_charging_identifier.c
index b448403b2..c70d651eb 100644
--- a/lib/sbi/openapi/model/access_net_charging_identifier.c
+++ b/lib/sbi/openapi/model/access_net_charging_identifier.c
@@ -7,7 +7,7 @@
OpenAPI_access_net_charging_identifier_t *OpenAPI_access_net_charging_identifier_create(
int acc_net_cha_id_value,
OpenAPI_list_t *flows
- )
+)
{
OpenAPI_access_net_charging_identifier_t *access_net_charging_identifier_local_var = OpenAPI_malloc(sizeof(OpenAPI_access_net_charging_identifier_t));
if (!access_net_charging_identifier_local_var) {
@@ -48,24 +48,24 @@ cJSON *OpenAPI_access_net_charging_identifier_convertToJSON(OpenAPI_access_net_c
}
if (access_net_charging_identifier->flows) {
- cJSON *flowsList = cJSON_AddArrayToObject(item, "flows");
- if (flowsList == NULL) {
- ogs_error("OpenAPI_access_net_charging_identifier_convertToJSON() failed [flows]");
- goto end;
- }
+ cJSON *flowsList = cJSON_AddArrayToObject(item, "flows");
+ if (flowsList == NULL) {
+ ogs_error("OpenAPI_access_net_charging_identifier_convertToJSON() failed [flows]");
+ goto end;
+ }
- OpenAPI_lnode_t *flows_node;
- if (access_net_charging_identifier->flows) {
- OpenAPI_list_for_each(access_net_charging_identifier->flows, flows_node) {
- cJSON *itemLocal = OpenAPI_flows_convertToJSON(flows_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_access_net_charging_identifier_convertToJSON() failed [flows]");
- goto end;
- }
- cJSON_AddItemToArray(flowsList, itemLocal);
+ OpenAPI_lnode_t *flows_node;
+ if (access_net_charging_identifier->flows) {
+ OpenAPI_list_for_each(access_net_charging_identifier->flows, flows_node) {
+ cJSON *itemLocal = OpenAPI_flows_convertToJSON(flows_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_access_net_charging_identifier_convertToJSON() failed [flows]");
+ goto end;
}
+ cJSON_AddItemToArray(flowsList, itemLocal);
}
}
+ }
end:
return item;
@@ -80,7 +80,7 @@ OpenAPI_access_net_charging_identifier_t *OpenAPI_access_net_charging_identifier
goto end;
}
-
+
if (!cJSON_IsNumber(acc_net_cha_id_value)) {
ogs_error("OpenAPI_access_net_charging_identifier_parseFromJSON() failed [acc_net_cha_id_value]");
goto end;
@@ -89,30 +89,30 @@ OpenAPI_access_net_charging_identifier_t *OpenAPI_access_net_charging_identifier
cJSON *flows = cJSON_GetObjectItemCaseSensitive(access_net_charging_identifierJSON, "flows");
OpenAPI_list_t *flowsList;
- if (flows) {
- cJSON *flows_local_nonprimitive;
- if (!cJSON_IsArray(flows)) {
+ if (flows) {
+ cJSON *flows_local_nonprimitive;
+ if (!cJSON_IsArray(flows)){
+ ogs_error("OpenAPI_access_net_charging_identifier_parseFromJSON() failed [flows]");
+ goto end;
+ }
+
+ flowsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(flows_local_nonprimitive, flows ) {
+ if (!cJSON_IsObject(flows_local_nonprimitive)) {
ogs_error("OpenAPI_access_net_charging_identifier_parseFromJSON() failed [flows]");
goto end;
}
+ OpenAPI_flows_t *flowsItem = OpenAPI_flows_parseFromJSON(flows_local_nonprimitive);
- flowsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(flows_local_nonprimitive, flows ) {
- if (!cJSON_IsObject(flows_local_nonprimitive)) {
- ogs_error("OpenAPI_access_net_charging_identifier_parseFromJSON() failed [flows]");
- goto end;
- }
- OpenAPI_flows_t *flowsItem = OpenAPI_flows_parseFromJSON(flows_local_nonprimitive);
-
- OpenAPI_list_add(flowsList, flowsItem);
- }
+ OpenAPI_list_add(flowsList, flowsItem);
+ }
}
access_net_charging_identifier_local_var = OpenAPI_access_net_charging_identifier_create (
acc_net_cha_id_value->valuedouble,
flows ? flowsList : NULL
- );
+ );
return access_net_charging_identifier_local_var;
end:
diff --git a/lib/sbi/openapi/model/access_net_charging_identifier.h b/lib/sbi/openapi/model/access_net_charging_identifier.h
index 6797f71cd..23c6aceea 100644
--- a/lib/sbi/openapi/model/access_net_charging_identifier.h
+++ b/lib/sbi/openapi/model/access_net_charging_identifier.h
@@ -27,7 +27,7 @@ typedef struct OpenAPI_access_net_charging_identifier_s {
OpenAPI_access_net_charging_identifier_t *OpenAPI_access_net_charging_identifier_create(
int acc_net_cha_id_value,
OpenAPI_list_t *flows
- );
+);
void OpenAPI_access_net_charging_identifier_free(OpenAPI_access_net_charging_identifier_t *access_net_charging_identifier);
OpenAPI_access_net_charging_identifier_t *OpenAPI_access_net_charging_identifier_parseFromJSON(cJSON *access_net_charging_identifierJSON);
cJSON *OpenAPI_access_net_charging_identifier_convertToJSON(OpenAPI_access_net_charging_identifier_t *access_net_charging_identifier);
diff --git a/lib/sbi/openapi/model/access_network_id.h b/lib/sbi/openapi/model/access_network_id.h
index e17cd6aa2..655caaabe 100644
--- a/lib/sbi/openapi/model/access_network_id.h
+++ b/lib/sbi/openapi/model/access_network_id.h
@@ -1,7 +1,7 @@
/*
* access_network_id.h
*
- *
+ *
*/
#ifndef _OpenAPI_access_network_id_H_
diff --git a/lib/sbi/openapi/model/access_right_status.c b/lib/sbi/openapi/model/access_right_status.c
index 0768ac08f..c03475a23 100644
--- a/lib/sbi/openapi/model/access_right_status.c
+++ b/lib/sbi/openapi/model/access_right_status.c
@@ -5,7 +5,7 @@
#include "access_right_status.h"
OpenAPI_access_right_status_t *OpenAPI_access_right_status_create(
- )
+)
{
OpenAPI_access_right_status_t *access_right_status_local_var = OpenAPI_malloc(sizeof(OpenAPI_access_right_status_t));
if (!access_right_status_local_var) {
@@ -42,7 +42,7 @@ OpenAPI_access_right_status_t *OpenAPI_access_right_status_parseFromJSON(cJSON *
{
OpenAPI_access_right_status_t *access_right_status_local_var = NULL;
access_right_status_local_var = OpenAPI_access_right_status_create (
- );
+ );
return access_right_status_local_var;
end:
diff --git a/lib/sbi/openapi/model/access_right_status.h b/lib/sbi/openapi/model/access_right_status.h
index 8cdb4a78c..cf8797c7c 100644
--- a/lib/sbi/openapi/model/access_right_status.h
+++ b/lib/sbi/openapi/model/access_right_status.h
@@ -1,7 +1,7 @@
/*
* access_right_status.h
*
- * Possible values are - FULLY_ALLOWED: The User is fully allowed to access to the channel. - PREVIEW_ALLOWED: The User is preview allowed to access to the channel. - NO_ALLOWED: The User is not allowed to access to the channel.
+ * Possible values are - FULLY_ALLOWED: The User is fully allowed to access to the channel. - PREVIEW_ALLOWED: The User is preview allowed to access to the channel. - NO_ALLOWED: The User is not allowed to access to the channel.
*/
#ifndef _OpenAPI_access_right_status_H_
@@ -12,6 +12,7 @@
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
+#include "access_right_status_any_of.h"
#ifdef __cplusplus
extern "C" {
@@ -22,7 +23,7 @@ typedef struct OpenAPI_access_right_status_s {
} OpenAPI_access_right_status_t;
OpenAPI_access_right_status_t *OpenAPI_access_right_status_create(
- );
+);
void OpenAPI_access_right_status_free(OpenAPI_access_right_status_t *access_right_status);
OpenAPI_access_right_status_t *OpenAPI_access_right_status_parseFromJSON(cJSON *access_right_statusJSON);
cJSON *OpenAPI_access_right_status_convertToJSON(OpenAPI_access_right_status_t *access_right_status);
diff --git a/lib/sbi/openapi/model/access_right_status_any_of.c b/lib/sbi/openapi/model/access_right_status_any_of.c
new file mode 100644
index 000000000..acb9a7dcf
--- /dev/null
+++ b/lib/sbi/openapi/model/access_right_status_any_of.c
@@ -0,0 +1,30 @@
+
+#include
+#include
+#include
+#include "access_right_status_any_of.h"
+
+char* OpenAPI_access_right_status_any_of_ToString(OpenAPI_access_right_status_any_of_e access_right_status_any_of)
+{
+ const char *access_right_status_any_ofArray[] = { "NULL", "FULLY_ALLOWED", "PREVIEW_ALLOWED", "NO_ALLOWED" };
+ size_t sizeofArray = sizeof(access_right_status_any_ofArray) / sizeof(access_right_status_any_ofArray[0]);
+ if (access_right_status_any_of < sizeofArray)
+ return (char *)access_right_status_any_ofArray[access_right_status_any_of];
+ else
+ return (char *)"Unknown";
+}
+
+OpenAPI_access_right_status_any_of_e OpenAPI_access_right_status_any_of_FromString(char* access_right_status_any_of)
+{
+ int stringToReturn = 0;
+ const char *access_right_status_any_ofArray[] = { "NULL", "FULLY_ALLOWED", "PREVIEW_ALLOWED", "NO_ALLOWED" };
+ size_t sizeofArray = sizeof(access_right_status_any_ofArray) / sizeof(access_right_status_any_ofArray[0]);
+ while (stringToReturn < sizeofArray) {
+ if (strcmp(access_right_status_any_of, access_right_status_any_ofArray[stringToReturn]) == 0) {
+ return stringToReturn;
+ }
+ stringToReturn++;
+ }
+ return 0;
+}
+
diff --git a/lib/sbi/openapi/model/access_right_status_any_of.h b/lib/sbi/openapi/model/access_right_status_any_of.h
new file mode 100644
index 000000000..c57259a7e
--- /dev/null
+++ b/lib/sbi/openapi/model/access_right_status_any_of.h
@@ -0,0 +1,31 @@
+/*
+ * access_right_status_any_of.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_access_right_status_any_of_H_
+#define _OpenAPI_access_right_status_any_of_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum { OpenAPI_access_right_status_any_of_NULL = 0, OpenAPI_access_right_status_any_of_FULLY_ALLOWED, OpenAPI_access_right_status_any_of_PREVIEW_ALLOWED, OpenAPI_access_right_status_any_of_NO_ALLOWED } OpenAPI_access_right_status_any_of_e;
+
+char* OpenAPI_access_right_status_any_of_ToString(OpenAPI_access_right_status_any_of_e access_right_status_any_of);
+
+OpenAPI_access_right_status_any_of_e OpenAPI_access_right_status_any_of_FromString(char* access_right_status_any_of);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_access_right_status_any_of_H_ */
+
diff --git a/lib/sbi/openapi/model/access_tech.c b/lib/sbi/openapi/model/access_tech.c
index 6779fd15f..4673c9e3f 100644
--- a/lib/sbi/openapi/model/access_tech.c
+++ b/lib/sbi/openapi/model/access_tech.c
@@ -5,7 +5,7 @@
#include "access_tech.h"
OpenAPI_access_tech_t *OpenAPI_access_tech_create(
- )
+)
{
OpenAPI_access_tech_t *access_tech_local_var = OpenAPI_malloc(sizeof(OpenAPI_access_tech_t));
if (!access_tech_local_var) {
@@ -42,7 +42,7 @@ OpenAPI_access_tech_t *OpenAPI_access_tech_parseFromJSON(cJSON *access_techJSON)
{
OpenAPI_access_tech_t *access_tech_local_var = NULL;
access_tech_local_var = OpenAPI_access_tech_create (
- );
+ );
return access_tech_local_var;
end:
diff --git a/lib/sbi/openapi/model/access_tech.h b/lib/sbi/openapi/model/access_tech.h
index b3d94e46f..1da831158 100644
--- a/lib/sbi/openapi/model/access_tech.h
+++ b/lib/sbi/openapi/model/access_tech.h
@@ -1,7 +1,7 @@
/*
* access_tech.h
*
- *
+ *
*/
#ifndef _OpenAPI_access_tech_H_
@@ -12,6 +12,7 @@
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
+#include "access_tech_any_of.h"
#ifdef __cplusplus
extern "C" {
@@ -22,7 +23,7 @@ typedef struct OpenAPI_access_tech_s {
} OpenAPI_access_tech_t;
OpenAPI_access_tech_t *OpenAPI_access_tech_create(
- );
+);
void OpenAPI_access_tech_free(OpenAPI_access_tech_t *access_tech);
OpenAPI_access_tech_t *OpenAPI_access_tech_parseFromJSON(cJSON *access_techJSON);
cJSON *OpenAPI_access_tech_convertToJSON(OpenAPI_access_tech_t *access_tech);
diff --git a/lib/sbi/openapi/model/access_tech_any_of.c b/lib/sbi/openapi/model/access_tech_any_of.c
new file mode 100644
index 000000000..b59eb41a0
--- /dev/null
+++ b/lib/sbi/openapi/model/access_tech_any_of.c
@@ -0,0 +1,30 @@
+
+#include
+#include
+#include
+#include "access_tech_any_of.h"
+
+char* OpenAPI_access_tech_any_of_ToString(OpenAPI_access_tech_any_of_e access_tech_any_of)
+{
+ const char *access_tech_any_ofArray[] = { "NULL", "NR", "EUTRAN_IN_WBS1_MODE_AND_NBS1_MODE", "EUTRAN_IN_NBS1_MODE_ONLY", "EUTRAN_IN_WBS1_MODE_ONLY", "UTRAN", "GSM_AND_ECGSM_IoT", "GSM_WITHOUT_ECGSM_IoT", "ECGSM_IoT_ONLY", "CDMA_1xRTT", "CDMA_HRPD", "GSM_COMPACT" };
+ size_t sizeofArray = sizeof(access_tech_any_ofArray) / sizeof(access_tech_any_ofArray[0]);
+ if (access_tech_any_of < sizeofArray)
+ return (char *)access_tech_any_ofArray[access_tech_any_of];
+ else
+ return (char *)"Unknown";
+}
+
+OpenAPI_access_tech_any_of_e OpenAPI_access_tech_any_of_FromString(char* access_tech_any_of)
+{
+ int stringToReturn = 0;
+ const char *access_tech_any_ofArray[] = { "NULL", "NR", "EUTRAN_IN_WBS1_MODE_AND_NBS1_MODE", "EUTRAN_IN_NBS1_MODE_ONLY", "EUTRAN_IN_WBS1_MODE_ONLY", "UTRAN", "GSM_AND_ECGSM_IoT", "GSM_WITHOUT_ECGSM_IoT", "ECGSM_IoT_ONLY", "CDMA_1xRTT", "CDMA_HRPD", "GSM_COMPACT" };
+ size_t sizeofArray = sizeof(access_tech_any_ofArray) / sizeof(access_tech_any_ofArray[0]);
+ while (stringToReturn < sizeofArray) {
+ if (strcmp(access_tech_any_of, access_tech_any_ofArray[stringToReturn]) == 0) {
+ return stringToReturn;
+ }
+ stringToReturn++;
+ }
+ return 0;
+}
+
diff --git a/lib/sbi/openapi/model/access_tech_any_of.h b/lib/sbi/openapi/model/access_tech_any_of.h
new file mode 100644
index 000000000..26bce8ddf
--- /dev/null
+++ b/lib/sbi/openapi/model/access_tech_any_of.h
@@ -0,0 +1,31 @@
+/*
+ * access_tech_any_of.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_access_tech_any_of_H_
+#define _OpenAPI_access_tech_any_of_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum { OpenAPI_access_tech_any_of_NULL = 0, OpenAPI_access_tech_any_of_NR, OpenAPI_access_tech_any_of_EUTRAN_IN_WBS1_MODE_AND_NBS1_MODE, OpenAPI_access_tech_any_of_EUTRAN_IN_NBS1_MODE_ONLY, OpenAPI_access_tech_any_of_EUTRAN_IN_WBS1_MODE_ONLY, OpenAPI_access_tech_any_of_UTRAN, OpenAPI_access_tech_any_of_GSM_AND_ECGSM_IoT, OpenAPI_access_tech_any_of_GSM_WITHOUT_ECGSM_IoT, OpenAPI_access_tech_any_of_ECGSM_IoT_ONLY, OpenAPI_access_tech_any_of_CDMA_1xRTT, OpenAPI_access_tech_any_of_CDMA_HRPD, OpenAPI_access_tech_any_of_GSM_COMPACT } OpenAPI_access_tech_any_of_e;
+
+char* OpenAPI_access_tech_any_of_ToString(OpenAPI_access_tech_any_of_e access_tech_any_of);
+
+OpenAPI_access_tech_any_of_e OpenAPI_access_tech_any_of_FromString(char* access_tech_any_of);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_access_tech_any_of_H_ */
+
diff --git a/lib/sbi/openapi/model/access_token_err.c b/lib/sbi/openapi/model/access_token_err.c
new file mode 100644
index 000000000..79e23fd94
--- /dev/null
+++ b/lib/sbi/openapi/model/access_token_err.c
@@ -0,0 +1,170 @@
+
+#include
+#include
+#include
+#include "access_token_err.h"
+
+char *OpenAPI_erroraccess_token_err_ToString(OpenAPI_access_token_err_error_e error)
+{
+ const char *errorArray[] = { "NULL", "invalid_request", "invalid_client", "invalid_grant", "unauthorized_client", "unsupported_grant_type", "invalid_scope" };
+ size_t sizeofArray = sizeof(errorArray) / sizeof(errorArray[0]);
+ if (error < sizeofArray)
+ return (char *)errorArray[error];
+ else
+ return (char *)"Unknown";
+}
+
+OpenAPI_access_token_err_error_e OpenAPI_erroraccess_token_err_FromString(char* error)
+{
+ int stringToReturn = 0;
+ const char *errorArray[] = { "NULL", "invalid_request", "invalid_client", "invalid_grant", "unauthorized_client", "unsupported_grant_type", "invalid_scope" };
+ size_t sizeofArray = sizeof(errorArray) / sizeof(errorArray[0]);
+ while (stringToReturn < sizeofArray) {
+ if (strcmp(error, errorArray[stringToReturn]) == 0) {
+ return stringToReturn;
+ }
+ stringToReturn++;
+ }
+ return 0;
+}
+OpenAPI_access_token_err_t *OpenAPI_access_token_err_create(
+ OpenAPI_access_token_err_error_e error,
+ char *error_description,
+ char *error_uri
+)
+{
+ OpenAPI_access_token_err_t *access_token_err_local_var = OpenAPI_malloc(sizeof(OpenAPI_access_token_err_t));
+ if (!access_token_err_local_var) {
+ return NULL;
+ }
+ access_token_err_local_var->error = error;
+ access_token_err_local_var->error_description = error_description;
+ access_token_err_local_var->error_uri = error_uri;
+
+ return access_token_err_local_var;
+}
+
+void OpenAPI_access_token_err_free(OpenAPI_access_token_err_t *access_token_err)
+{
+ if (NULL == access_token_err) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ ogs_free(access_token_err->error_description);
+ ogs_free(access_token_err->error_uri);
+ ogs_free(access_token_err);
+}
+
+cJSON *OpenAPI_access_token_err_convertToJSON(OpenAPI_access_token_err_t *access_token_err)
+{
+ cJSON *item = NULL;
+
+ if (access_token_err == NULL) {
+ ogs_error("OpenAPI_access_token_err_convertToJSON() failed [AccessTokenErr]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (cJSON_AddStringToObject(item, "error", OpenAPI_erroraccess_token_err_ToString(access_token_err->error)) == NULL) {
+ ogs_error("OpenAPI_access_token_err_convertToJSON() failed [error]");
+ goto end;
+ }
+
+ if (access_token_err->error_description) {
+ if (cJSON_AddStringToObject(item, "error_description", access_token_err->error_description) == NULL) {
+ ogs_error("OpenAPI_access_token_err_convertToJSON() failed [error_description]");
+ goto end;
+ }
+ }
+
+ if (access_token_err->error_uri) {
+ if (cJSON_AddStringToObject(item, "error_uri", access_token_err->error_uri) == NULL) {
+ ogs_error("OpenAPI_access_token_err_convertToJSON() failed [error_uri]");
+ goto end;
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_access_token_err_t *OpenAPI_access_token_err_parseFromJSON(cJSON *access_token_errJSON)
+{
+ OpenAPI_access_token_err_t *access_token_err_local_var = NULL;
+ cJSON *error = cJSON_GetObjectItemCaseSensitive(access_token_errJSON, "error");
+ if (!error) {
+ ogs_error("OpenAPI_access_token_err_parseFromJSON() failed [error]");
+ goto end;
+ }
+
+ OpenAPI_access_token_err_error_e errorVariable;
+
+ if (!cJSON_IsString(error)) {
+ ogs_error("OpenAPI_access_token_err_parseFromJSON() failed [error]");
+ goto end;
+ }
+ errorVariable = OpenAPI_erroraccess_token_err_FromString(error->valuestring);
+
+ cJSON *error_description = cJSON_GetObjectItemCaseSensitive(access_token_errJSON, "error_description");
+
+ if (error_description) {
+ if (!cJSON_IsString(error_description)) {
+ ogs_error("OpenAPI_access_token_err_parseFromJSON() failed [error_description]");
+ goto end;
+ }
+ }
+
+ cJSON *error_uri = cJSON_GetObjectItemCaseSensitive(access_token_errJSON, "error_uri");
+
+ if (error_uri) {
+ if (!cJSON_IsString(error_uri)) {
+ ogs_error("OpenAPI_access_token_err_parseFromJSON() failed [error_uri]");
+ goto end;
+ }
+ }
+
+ access_token_err_local_var = OpenAPI_access_token_err_create (
+ errorVariable,
+ error_description ? ogs_strdup_or_assert(error_description->valuestring) : NULL,
+ error_uri ? ogs_strdup_or_assert(error_uri->valuestring) : NULL
+ );
+
+ return access_token_err_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_access_token_err_t *OpenAPI_access_token_err_copy(OpenAPI_access_token_err_t *dst, OpenAPI_access_token_err_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_access_token_err_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_access_token_err_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_access_token_err_free(dst);
+ dst = OpenAPI_access_token_err_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/access_token_err.h b/lib/sbi/openapi/model/access_token_err.h
new file mode 100644
index 000000000..d1db46277
--- /dev/null
+++ b/lib/sbi/openapi/model/access_token_err.h
@@ -0,0 +1,47 @@
+/*
+ * access_token_err.h
+ *
+ * Error returned in the access token response message
+ */
+
+#ifndef _OpenAPI_access_token_err_H_
+#define _OpenAPI_access_token_err_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_access_token_err_s OpenAPI_access_token_err_t;
+typedef enum { OpenAPI_access_token_err_ERROR_NULL = 0, OpenAPI_access_token_err_ERROR_invalid_request, OpenAPI_access_token_err_ERROR_invalid_client, OpenAPI_access_token_err_ERROR_invalid_grant, OpenAPI_access_token_err_ERROR_unauthorized_client, OpenAPI_access_token_err_ERROR_unsupported_grant_type, OpenAPI_access_token_err_ERROR_invalid_scope } OpenAPI_access_token_err_error_e;
+
+char* OpenAPI_access_token_err_error_ToString(OpenAPI_access_token_err_error_e error);
+
+OpenAPI_access_token_err_error_e OpenAPI_access_token_err_error_FromString(char* error);
+typedef struct OpenAPI_access_token_err_s {
+ OpenAPI_access_token_err_error_e error;
+ char *error_description;
+ char *error_uri;
+} OpenAPI_access_token_err_t;
+
+OpenAPI_access_token_err_t *OpenAPI_access_token_err_create(
+ OpenAPI_access_token_err_error_e error,
+ char *error_description,
+ char *error_uri
+);
+void OpenAPI_access_token_err_free(OpenAPI_access_token_err_t *access_token_err);
+OpenAPI_access_token_err_t *OpenAPI_access_token_err_parseFromJSON(cJSON *access_token_errJSON);
+cJSON *OpenAPI_access_token_err_convertToJSON(OpenAPI_access_token_err_t *access_token_err);
+OpenAPI_access_token_err_t *OpenAPI_access_token_err_copy(OpenAPI_access_token_err_t *dst, OpenAPI_access_token_err_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_access_token_err_H_ */
+
diff --git a/lib/sbi/openapi/model/access_token_req.c b/lib/sbi/openapi/model/access_token_req.c
new file mode 100644
index 000000000..dd9912395
--- /dev/null
+++ b/lib/sbi/openapi/model/access_token_req.c
@@ -0,0 +1,585 @@
+
+#include
+#include
+#include
+#include "access_token_req.h"
+
+char *OpenAPI_grant_typeaccess_token_req_ToString(OpenAPI_access_token_req_grant_type_e grant_type)
+{
+ const char *grant_typeArray[] = { "NULL", "client_credentials" };
+ size_t sizeofArray = sizeof(grant_typeArray) / sizeof(grant_typeArray[0]);
+ if (grant_type < sizeofArray)
+ return (char *)grant_typeArray[grant_type];
+ else
+ return (char *)"Unknown";
+}
+
+OpenAPI_access_token_req_grant_type_e OpenAPI_grant_typeaccess_token_req_FromString(char* grant_type)
+{
+ int stringToReturn = 0;
+ const char *grant_typeArray[] = { "NULL", "client_credentials" };
+ size_t sizeofArray = sizeof(grant_typeArray) / sizeof(grant_typeArray[0]);
+ while (stringToReturn < sizeofArray) {
+ if (strcmp(grant_type, grant_typeArray[stringToReturn]) == 0) {
+ return stringToReturn;
+ }
+ stringToReturn++;
+ }
+ return 0;
+}
+OpenAPI_access_token_req_t *OpenAPI_access_token_req_create(
+ OpenAPI_access_token_req_grant_type_e grant_type,
+ char *nf_instance_id,
+ OpenAPI_nf_type_e nf_type,
+ OpenAPI_nf_type_e target_nf_type,
+ char *scope,
+ char *target_nf_instance_id,
+ OpenAPI_plmn_id_t *requester_plmn,
+ OpenAPI_list_t *requester_plmn_list,
+ OpenAPI_list_t *requester_snssai_list,
+ char *requester_fqdn,
+ OpenAPI_list_t *requester_snpn_list,
+ OpenAPI_plmn_id_t *target_plmn,
+ OpenAPI_list_t *target_snssai_list,
+ OpenAPI_list_t *target_nsi_list,
+ char *target_nf_set_id,
+ char *target_nf_service_set_id
+)
+{
+ OpenAPI_access_token_req_t *access_token_req_local_var = OpenAPI_malloc(sizeof(OpenAPI_access_token_req_t));
+ if (!access_token_req_local_var) {
+ return NULL;
+ }
+ access_token_req_local_var->grant_type = grant_type;
+ access_token_req_local_var->nf_instance_id = nf_instance_id;
+ access_token_req_local_var->nf_type = nf_type;
+ access_token_req_local_var->target_nf_type = target_nf_type;
+ access_token_req_local_var->scope = scope;
+ access_token_req_local_var->target_nf_instance_id = target_nf_instance_id;
+ access_token_req_local_var->requester_plmn = requester_plmn;
+ access_token_req_local_var->requester_plmn_list = requester_plmn_list;
+ access_token_req_local_var->requester_snssai_list = requester_snssai_list;
+ access_token_req_local_var->requester_fqdn = requester_fqdn;
+ access_token_req_local_var->requester_snpn_list = requester_snpn_list;
+ access_token_req_local_var->target_plmn = target_plmn;
+ access_token_req_local_var->target_snssai_list = target_snssai_list;
+ access_token_req_local_var->target_nsi_list = target_nsi_list;
+ access_token_req_local_var->target_nf_set_id = target_nf_set_id;
+ access_token_req_local_var->target_nf_service_set_id = target_nf_service_set_id;
+
+ return access_token_req_local_var;
+}
+
+void OpenAPI_access_token_req_free(OpenAPI_access_token_req_t *access_token_req)
+{
+ if (NULL == access_token_req) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ ogs_free(access_token_req->nf_instance_id);
+ ogs_free(access_token_req->scope);
+ ogs_free(access_token_req->target_nf_instance_id);
+ OpenAPI_plmn_id_free(access_token_req->requester_plmn);
+ OpenAPI_list_for_each(access_token_req->requester_plmn_list, node) {
+ OpenAPI_plmn_id_free(node->data);
+ }
+ OpenAPI_list_free(access_token_req->requester_plmn_list);
+ OpenAPI_list_for_each(access_token_req->requester_snssai_list, node) {
+ OpenAPI_snssai_free(node->data);
+ }
+ OpenAPI_list_free(access_token_req->requester_snssai_list);
+ ogs_free(access_token_req->requester_fqdn);
+ OpenAPI_list_for_each(access_token_req->requester_snpn_list, node) {
+ OpenAPI_plmn_id_nid_free(node->data);
+ }
+ OpenAPI_list_free(access_token_req->requester_snpn_list);
+ OpenAPI_plmn_id_free(access_token_req->target_plmn);
+ OpenAPI_list_for_each(access_token_req->target_snssai_list, node) {
+ OpenAPI_snssai_free(node->data);
+ }
+ OpenAPI_list_free(access_token_req->target_snssai_list);
+ OpenAPI_list_for_each(access_token_req->target_nsi_list, node) {
+ ogs_free(node->data);
+ }
+ OpenAPI_list_free(access_token_req->target_nsi_list);
+ ogs_free(access_token_req->target_nf_set_id);
+ ogs_free(access_token_req->target_nf_service_set_id);
+ ogs_free(access_token_req);
+}
+
+cJSON *OpenAPI_access_token_req_convertToJSON(OpenAPI_access_token_req_t *access_token_req)
+{
+ cJSON *item = NULL;
+
+ if (access_token_req == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [AccessTokenReq]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (cJSON_AddStringToObject(item, "grant_type", OpenAPI_grant_typeaccess_token_req_ToString(access_token_req->grant_type)) == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [grant_type]");
+ goto end;
+ }
+
+ if (cJSON_AddStringToObject(item, "nfInstanceId", access_token_req->nf_instance_id) == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [nf_instance_id]");
+ goto end;
+ }
+
+ if (access_token_req->nf_type) {
+ if (cJSON_AddStringToObject(item, "nfType", OpenAPI_nf_type_ToString(access_token_req->nf_type)) == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [nf_type]");
+ goto end;
+ }
+ }
+
+ if (access_token_req->target_nf_type) {
+ if (cJSON_AddStringToObject(item, "targetNfType", OpenAPI_nf_type_ToString(access_token_req->target_nf_type)) == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [target_nf_type]");
+ goto end;
+ }
+ }
+
+ if (cJSON_AddStringToObject(item, "scope", access_token_req->scope) == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [scope]");
+ goto end;
+ }
+
+ if (access_token_req->target_nf_instance_id) {
+ if (cJSON_AddStringToObject(item, "targetNfInstanceId", access_token_req->target_nf_instance_id) == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [target_nf_instance_id]");
+ goto end;
+ }
+ }
+
+ if (access_token_req->requester_plmn) {
+ cJSON *requester_plmn_local_JSON = OpenAPI_plmn_id_convertToJSON(access_token_req->requester_plmn);
+ if (requester_plmn_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [requester_plmn]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "requesterPlmn", requester_plmn_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [requester_plmn]");
+ goto end;
+ }
+ }
+
+ if (access_token_req->requester_plmn_list) {
+ cJSON *requester_plmn_listList = cJSON_AddArrayToObject(item, "requesterPlmnList");
+ if (requester_plmn_listList == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [requester_plmn_list]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *requester_plmn_list_node;
+ if (access_token_req->requester_plmn_list) {
+ OpenAPI_list_for_each(access_token_req->requester_plmn_list, requester_plmn_list_node) {
+ cJSON *itemLocal = OpenAPI_plmn_id_convertToJSON(requester_plmn_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [requester_plmn_list]");
+ goto end;
+ }
+ cJSON_AddItemToArray(requester_plmn_listList, itemLocal);
+ }
+ }
+ }
+
+ if (access_token_req->requester_snssai_list) {
+ cJSON *requester_snssai_listList = cJSON_AddArrayToObject(item, "requesterSnssaiList");
+ if (requester_snssai_listList == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [requester_snssai_list]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *requester_snssai_list_node;
+ if (access_token_req->requester_snssai_list) {
+ OpenAPI_list_for_each(access_token_req->requester_snssai_list, requester_snssai_list_node) {
+ cJSON *itemLocal = OpenAPI_snssai_convertToJSON(requester_snssai_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [requester_snssai_list]");
+ goto end;
+ }
+ cJSON_AddItemToArray(requester_snssai_listList, itemLocal);
+ }
+ }
+ }
+
+ if (access_token_req->requester_fqdn) {
+ if (cJSON_AddStringToObject(item, "requesterFqdn", access_token_req->requester_fqdn) == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [requester_fqdn]");
+ goto end;
+ }
+ }
+
+ if (access_token_req->requester_snpn_list) {
+ cJSON *requester_snpn_listList = cJSON_AddArrayToObject(item, "requesterSnpnList");
+ if (requester_snpn_listList == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [requester_snpn_list]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *requester_snpn_list_node;
+ if (access_token_req->requester_snpn_list) {
+ OpenAPI_list_for_each(access_token_req->requester_snpn_list, requester_snpn_list_node) {
+ cJSON *itemLocal = OpenAPI_plmn_id_nid_convertToJSON(requester_snpn_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [requester_snpn_list]");
+ goto end;
+ }
+ cJSON_AddItemToArray(requester_snpn_listList, itemLocal);
+ }
+ }
+ }
+
+ if (access_token_req->target_plmn) {
+ cJSON *target_plmn_local_JSON = OpenAPI_plmn_id_convertToJSON(access_token_req->target_plmn);
+ if (target_plmn_local_JSON == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [target_plmn]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "targetPlmn", target_plmn_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [target_plmn]");
+ goto end;
+ }
+ }
+
+ if (access_token_req->target_snssai_list) {
+ cJSON *target_snssai_listList = cJSON_AddArrayToObject(item, "targetSnssaiList");
+ if (target_snssai_listList == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [target_snssai_list]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *target_snssai_list_node;
+ if (access_token_req->target_snssai_list) {
+ OpenAPI_list_for_each(access_token_req->target_snssai_list, target_snssai_list_node) {
+ cJSON *itemLocal = OpenAPI_snssai_convertToJSON(target_snssai_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [target_snssai_list]");
+ goto end;
+ }
+ cJSON_AddItemToArray(target_snssai_listList, itemLocal);
+ }
+ }
+ }
+
+ if (access_token_req->target_nsi_list) {
+ cJSON *target_nsi_list = cJSON_AddArrayToObject(item, "targetNsiList");
+ if (target_nsi_list == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [target_nsi_list]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *target_nsi_list_node;
+ OpenAPI_list_for_each(access_token_req->target_nsi_list, target_nsi_list_node) {
+ if (cJSON_AddStringToObject(target_nsi_list, "", (char*)target_nsi_list_node->data) == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [target_nsi_list]");
+ goto end;
+ }
+ }
+ }
+
+ if (access_token_req->target_nf_set_id) {
+ if (cJSON_AddStringToObject(item, "targetNfSetId", access_token_req->target_nf_set_id) == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [target_nf_set_id]");
+ goto end;
+ }
+ }
+
+ if (access_token_req->target_nf_service_set_id) {
+ if (cJSON_AddStringToObject(item, "targetNfServiceSetId", access_token_req->target_nf_service_set_id) == NULL) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed [target_nf_service_set_id]");
+ goto end;
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_access_token_req_t *OpenAPI_access_token_req_parseFromJSON(cJSON *access_token_reqJSON)
+{
+ OpenAPI_access_token_req_t *access_token_req_local_var = NULL;
+ cJSON *grant_type = cJSON_GetObjectItemCaseSensitive(access_token_reqJSON, "grant_type");
+ if (!grant_type) {
+ ogs_error("OpenAPI_access_token_req_parseFromJSON() failed [grant_type]");
+ goto end;
+ }
+
+ OpenAPI_access_token_req_grant_type_e grant_typeVariable;
+
+ if (!cJSON_IsString(grant_type)) {
+ ogs_error("OpenAPI_access_token_req_parseFromJSON() failed [grant_type]");
+ goto end;
+ }
+ grant_typeVariable = OpenAPI_grant_typeaccess_token_req_FromString(grant_type->valuestring);
+
+ cJSON *nf_instance_id = cJSON_GetObjectItemCaseSensitive(access_token_reqJSON, "nfInstanceId");
+ if (!nf_instance_id) {
+ ogs_error("OpenAPI_access_token_req_parseFromJSON() failed [nf_instance_id]");
+ goto end;
+ }
+
+
+ if (!cJSON_IsString(nf_instance_id)) {
+ ogs_error("OpenAPI_access_token_req_parseFromJSON() failed [nf_instance_id]");
+ goto end;
+ }
+
+ cJSON *nf_type = cJSON_GetObjectItemCaseSensitive(access_token_reqJSON, "nfType");
+
+ OpenAPI_nf_type_e nf_typeVariable;
+ if (nf_type) {
+ if (!cJSON_IsString(nf_type)) {
+ ogs_error("OpenAPI_access_token_req_parseFromJSON() failed [nf_type]");
+ goto end;
+ }
+ nf_typeVariable = OpenAPI_nf_type_FromString(nf_type->valuestring);
+ }
+
+ cJSON *target_nf_type = cJSON_GetObjectItemCaseSensitive(access_token_reqJSON, "targetNfType");
+
+ OpenAPI_nf_type_e target_nf_typeVariable;
+ if (target_nf_type) {
+ if (!cJSON_IsString(target_nf_type)) {
+ ogs_error("OpenAPI_access_token_req_parseFromJSON() failed [target_nf_type]");
+ goto end;
+ }
+ target_nf_typeVariable = OpenAPI_nf_type_FromString(target_nf_type->valuestring);
+ }
+
+ cJSON *scope = cJSON_GetObjectItemCaseSensitive(access_token_reqJSON, "scope");
+ if (!scope) {
+ ogs_error("OpenAPI_access_token_req_parseFromJSON() failed [scope]");
+ goto end;
+ }
+
+
+ if (!cJSON_IsString(scope)) {
+ ogs_error("OpenAPI_access_token_req_parseFromJSON() failed [scope]");
+ goto end;
+ }
+
+ cJSON *target_nf_instance_id = cJSON_GetObjectItemCaseSensitive(access_token_reqJSON, "targetNfInstanceId");
+
+ if (target_nf_instance_id) {
+ if (!cJSON_IsString(target_nf_instance_id)) {
+ ogs_error("OpenAPI_access_token_req_parseFromJSON() failed [target_nf_instance_id]");
+ goto end;
+ }
+ }
+
+ cJSON *requester_plmn = cJSON_GetObjectItemCaseSensitive(access_token_reqJSON, "requesterPlmn");
+
+ OpenAPI_plmn_id_t *requester_plmn_local_nonprim = NULL;
+ if (requester_plmn) {
+ requester_plmn_local_nonprim = OpenAPI_plmn_id_parseFromJSON(requester_plmn);
+ }
+
+ cJSON *requester_plmn_list = cJSON_GetObjectItemCaseSensitive(access_token_reqJSON, "requesterPlmnList");
+
+ OpenAPI_list_t *requester_plmn_listList;
+ if (requester_plmn_list) {
+ cJSON *requester_plmn_list_local_nonprimitive;
+ if (!cJSON_IsArray(requester_plmn_list)){
+ ogs_error("OpenAPI_access_token_req_parseFromJSON() failed [requester_plmn_list]");
+ goto end;
+ }
+
+ requester_plmn_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(requester_plmn_list_local_nonprimitive, requester_plmn_list ) {
+ if (!cJSON_IsObject(requester_plmn_list_local_nonprimitive)) {
+ ogs_error("OpenAPI_access_token_req_parseFromJSON() failed [requester_plmn_list]");
+ goto end;
+ }
+ OpenAPI_plmn_id_t *requester_plmn_listItem = OpenAPI_plmn_id_parseFromJSON(requester_plmn_list_local_nonprimitive);
+
+ OpenAPI_list_add(requester_plmn_listList, requester_plmn_listItem);
+ }
+ }
+
+ cJSON *requester_snssai_list = cJSON_GetObjectItemCaseSensitive(access_token_reqJSON, "requesterSnssaiList");
+
+ OpenAPI_list_t *requester_snssai_listList;
+ if (requester_snssai_list) {
+ cJSON *requester_snssai_list_local_nonprimitive;
+ if (!cJSON_IsArray(requester_snssai_list)){
+ ogs_error("OpenAPI_access_token_req_parseFromJSON() failed [requester_snssai_list]");
+ goto end;
+ }
+
+ requester_snssai_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(requester_snssai_list_local_nonprimitive, requester_snssai_list ) {
+ if (!cJSON_IsObject(requester_snssai_list_local_nonprimitive)) {
+ ogs_error("OpenAPI_access_token_req_parseFromJSON() failed [requester_snssai_list]");
+ goto end;
+ }
+ OpenAPI_snssai_t *requester_snssai_listItem = OpenAPI_snssai_parseFromJSON(requester_snssai_list_local_nonprimitive);
+
+ OpenAPI_list_add(requester_snssai_listList, requester_snssai_listItem);
+ }
+ }
+
+ cJSON *requester_fqdn = cJSON_GetObjectItemCaseSensitive(access_token_reqJSON, "requesterFqdn");
+
+ if (requester_fqdn) {
+ if (!cJSON_IsString(requester_fqdn)) {
+ ogs_error("OpenAPI_access_token_req_parseFromJSON() failed [requester_fqdn]");
+ goto end;
+ }
+ }
+
+ cJSON *requester_snpn_list = cJSON_GetObjectItemCaseSensitive(access_token_reqJSON, "requesterSnpnList");
+
+ OpenAPI_list_t *requester_snpn_listList;
+ if (requester_snpn_list) {
+ cJSON *requester_snpn_list_local_nonprimitive;
+ if (!cJSON_IsArray(requester_snpn_list)){
+ ogs_error("OpenAPI_access_token_req_parseFromJSON() failed [requester_snpn_list]");
+ goto end;
+ }
+
+ requester_snpn_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(requester_snpn_list_local_nonprimitive, requester_snpn_list ) {
+ if (!cJSON_IsObject(requester_snpn_list_local_nonprimitive)) {
+ ogs_error("OpenAPI_access_token_req_parseFromJSON() failed [requester_snpn_list]");
+ goto end;
+ }
+ OpenAPI_plmn_id_nid_t *requester_snpn_listItem = OpenAPI_plmn_id_nid_parseFromJSON(requester_snpn_list_local_nonprimitive);
+
+ OpenAPI_list_add(requester_snpn_listList, requester_snpn_listItem);
+ }
+ }
+
+ cJSON *target_plmn = cJSON_GetObjectItemCaseSensitive(access_token_reqJSON, "targetPlmn");
+
+ OpenAPI_plmn_id_t *target_plmn_local_nonprim = NULL;
+ if (target_plmn) {
+ target_plmn_local_nonprim = OpenAPI_plmn_id_parseFromJSON(target_plmn);
+ }
+
+ cJSON *target_snssai_list = cJSON_GetObjectItemCaseSensitive(access_token_reqJSON, "targetSnssaiList");
+
+ OpenAPI_list_t *target_snssai_listList;
+ if (target_snssai_list) {
+ cJSON *target_snssai_list_local_nonprimitive;
+ if (!cJSON_IsArray(target_snssai_list)){
+ ogs_error("OpenAPI_access_token_req_parseFromJSON() failed [target_snssai_list]");
+ goto end;
+ }
+
+ target_snssai_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(target_snssai_list_local_nonprimitive, target_snssai_list ) {
+ if (!cJSON_IsObject(target_snssai_list_local_nonprimitive)) {
+ ogs_error("OpenAPI_access_token_req_parseFromJSON() failed [target_snssai_list]");
+ goto end;
+ }
+ OpenAPI_snssai_t *target_snssai_listItem = OpenAPI_snssai_parseFromJSON(target_snssai_list_local_nonprimitive);
+
+ OpenAPI_list_add(target_snssai_listList, target_snssai_listItem);
+ }
+ }
+
+ cJSON *target_nsi_list = cJSON_GetObjectItemCaseSensitive(access_token_reqJSON, "targetNsiList");
+
+ OpenAPI_list_t *target_nsi_listList;
+ if (target_nsi_list) {
+ cJSON *target_nsi_list_local;
+ if (!cJSON_IsArray(target_nsi_list)) {
+ ogs_error("OpenAPI_access_token_req_parseFromJSON() failed [target_nsi_list]");
+ goto end;
+ }
+ target_nsi_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(target_nsi_list_local, target_nsi_list) {
+ if (!cJSON_IsString(target_nsi_list_local)) {
+ ogs_error("OpenAPI_access_token_req_parseFromJSON() failed [target_nsi_list]");
+ goto end;
+ }
+ OpenAPI_list_add(target_nsi_listList , ogs_strdup_or_assert(target_nsi_list_local->valuestring));
+ }
+ }
+
+ cJSON *target_nf_set_id = cJSON_GetObjectItemCaseSensitive(access_token_reqJSON, "targetNfSetId");
+
+ if (target_nf_set_id) {
+ if (!cJSON_IsString(target_nf_set_id)) {
+ ogs_error("OpenAPI_access_token_req_parseFromJSON() failed [target_nf_set_id]");
+ goto end;
+ }
+ }
+
+ cJSON *target_nf_service_set_id = cJSON_GetObjectItemCaseSensitive(access_token_reqJSON, "targetNfServiceSetId");
+
+ if (target_nf_service_set_id) {
+ if (!cJSON_IsString(target_nf_service_set_id)) {
+ ogs_error("OpenAPI_access_token_req_parseFromJSON() failed [target_nf_service_set_id]");
+ goto end;
+ }
+ }
+
+ access_token_req_local_var = OpenAPI_access_token_req_create (
+ grant_typeVariable,
+ ogs_strdup_or_assert(nf_instance_id->valuestring),
+ nf_type ? nf_typeVariable : 0,
+ target_nf_type ? target_nf_typeVariable : 0,
+ ogs_strdup_or_assert(scope->valuestring),
+ target_nf_instance_id ? ogs_strdup_or_assert(target_nf_instance_id->valuestring) : NULL,
+ requester_plmn ? requester_plmn_local_nonprim : NULL,
+ requester_plmn_list ? requester_plmn_listList : NULL,
+ requester_snssai_list ? requester_snssai_listList : NULL,
+ requester_fqdn ? ogs_strdup_or_assert(requester_fqdn->valuestring) : NULL,
+ requester_snpn_list ? requester_snpn_listList : NULL,
+ target_plmn ? target_plmn_local_nonprim : NULL,
+ target_snssai_list ? target_snssai_listList : NULL,
+ target_nsi_list ? target_nsi_listList : NULL,
+ target_nf_set_id ? ogs_strdup_or_assert(target_nf_set_id->valuestring) : NULL,
+ target_nf_service_set_id ? ogs_strdup_or_assert(target_nf_service_set_id->valuestring) : NULL
+ );
+
+ return access_token_req_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_access_token_req_t *OpenAPI_access_token_req_copy(OpenAPI_access_token_req_t *dst, OpenAPI_access_token_req_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_access_token_req_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_access_token_req_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_access_token_req_free(dst);
+ dst = OpenAPI_access_token_req_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/access_token_req.h b/lib/sbi/openapi/model/access_token_req.h
new file mode 100644
index 000000000..843908635
--- /dev/null
+++ b/lib/sbi/openapi/model/access_token_req.h
@@ -0,0 +1,77 @@
+/*
+ * access_token_req.h
+ *
+ * Contains information related to the access token request
+ */
+
+#ifndef _OpenAPI_access_token_req_H_
+#define _OpenAPI_access_token_req_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+#include "nf_type.h"
+#include "plmn_id.h"
+#include "plmn_id_nid.h"
+#include "snssai.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_access_token_req_s OpenAPI_access_token_req_t;
+typedef enum { OpenAPI_access_token_req_GRANTTYPE_NULL = 0, OpenAPI_access_token_req_GRANTTYPE_client_credentials } OpenAPI_access_token_req_grant_type_e;
+
+char* OpenAPI_access_token_req_grant_type_ToString(OpenAPI_access_token_req_grant_type_e grant_type);
+
+OpenAPI_access_token_req_grant_type_e OpenAPI_access_token_req_grant_type_FromString(char* grant_type);
+typedef struct OpenAPI_access_token_req_s {
+ OpenAPI_access_token_req_grant_type_e grant_type;
+ char *nf_instance_id;
+ OpenAPI_nf_type_e nf_type;
+ OpenAPI_nf_type_e target_nf_type;
+ char *scope;
+ char *target_nf_instance_id;
+ struct OpenAPI_plmn_id_s *requester_plmn;
+ OpenAPI_list_t *requester_plmn_list;
+ OpenAPI_list_t *requester_snssai_list;
+ char *requester_fqdn;
+ OpenAPI_list_t *requester_snpn_list;
+ struct OpenAPI_plmn_id_s *target_plmn;
+ OpenAPI_list_t *target_snssai_list;
+ OpenAPI_list_t *target_nsi_list;
+ char *target_nf_set_id;
+ char *target_nf_service_set_id;
+} OpenAPI_access_token_req_t;
+
+OpenAPI_access_token_req_t *OpenAPI_access_token_req_create(
+ OpenAPI_access_token_req_grant_type_e grant_type,
+ char *nf_instance_id,
+ OpenAPI_nf_type_e nf_type,
+ OpenAPI_nf_type_e target_nf_type,
+ char *scope,
+ char *target_nf_instance_id,
+ OpenAPI_plmn_id_t *requester_plmn,
+ OpenAPI_list_t *requester_plmn_list,
+ OpenAPI_list_t *requester_snssai_list,
+ char *requester_fqdn,
+ OpenAPI_list_t *requester_snpn_list,
+ OpenAPI_plmn_id_t *target_plmn,
+ OpenAPI_list_t *target_snssai_list,
+ OpenAPI_list_t *target_nsi_list,
+ char *target_nf_set_id,
+ char *target_nf_service_set_id
+);
+void OpenAPI_access_token_req_free(OpenAPI_access_token_req_t *access_token_req);
+OpenAPI_access_token_req_t *OpenAPI_access_token_req_parseFromJSON(cJSON *access_token_reqJSON);
+cJSON *OpenAPI_access_token_req_convertToJSON(OpenAPI_access_token_req_t *access_token_req);
+OpenAPI_access_token_req_t *OpenAPI_access_token_req_copy(OpenAPI_access_token_req_t *dst, OpenAPI_access_token_req_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_access_token_req_H_ */
+
diff --git a/lib/sbi/openapi/model/access_type.h b/lib/sbi/openapi/model/access_type.h
index 5658a778e..155ad4600 100644
--- a/lib/sbi/openapi/model/access_type.h
+++ b/lib/sbi/openapi/model/access_type.h
@@ -1,7 +1,7 @@
/*
* access_type.h
*
- *
+ *
*/
#ifndef _OpenAPI_access_type_H_
diff --git a/lib/sbi/openapi/model/access_type_rm.c b/lib/sbi/openapi/model/access_type_rm.c
new file mode 100644
index 000000000..fa665b3c6
--- /dev/null
+++ b/lib/sbi/openapi/model/access_type_rm.c
@@ -0,0 +1,85 @@
+
+#include
+#include
+#include
+#include "access_type_rm.h"
+
+OpenAPI_access_type_rm_t *OpenAPI_access_type_rm_create(
+)
+{
+ OpenAPI_access_type_rm_t *access_type_rm_local_var = OpenAPI_malloc(sizeof(OpenAPI_access_type_rm_t));
+ if (!access_type_rm_local_var) {
+ return NULL;
+ }
+
+ return access_type_rm_local_var;
+}
+
+void OpenAPI_access_type_rm_free(OpenAPI_access_type_rm_t *access_type_rm)
+{
+ if (NULL == access_type_rm) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ ogs_free(access_type_rm);
+}
+
+cJSON *OpenAPI_access_type_rm_convertToJSON(OpenAPI_access_type_rm_t *access_type_rm)
+{
+ cJSON *item = NULL;
+
+ if (access_type_rm == NULL) {
+ ogs_error("OpenAPI_access_type_rm_convertToJSON() failed [AccessTypeRm]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+end:
+ return item;
+}
+
+OpenAPI_access_type_rm_t *OpenAPI_access_type_rm_parseFromJSON(cJSON *access_type_rmJSON)
+{
+ OpenAPI_access_type_rm_t *access_type_rm_local_var = NULL;
+ access_type_rm_local_var = OpenAPI_access_type_rm_create (
+ );
+
+ return access_type_rm_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_access_type_rm_t *OpenAPI_access_type_rm_copy(OpenAPI_access_type_rm_t *dst, OpenAPI_access_type_rm_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_access_type_rm_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_access_type_rm_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_access_type_rm_free(dst);
+ dst = OpenAPI_access_type_rm_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/access_type_rm.h b/lib/sbi/openapi/model/access_type_rm.h
new file mode 100644
index 000000000..f98da46aa
--- /dev/null
+++ b/lib/sbi/openapi/model/access_type_rm.h
@@ -0,0 +1,38 @@
+/*
+ * access_type_rm.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_access_type_rm_H_
+#define _OpenAPI_access_type_rm_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+#include "access_type.h"
+#include "null_value.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_access_type_rm_s OpenAPI_access_type_rm_t;
+typedef struct OpenAPI_access_type_rm_s {
+} OpenAPI_access_type_rm_t;
+
+OpenAPI_access_type_rm_t *OpenAPI_access_type_rm_create(
+);
+void OpenAPI_access_type_rm_free(OpenAPI_access_type_rm_t *access_type_rm);
+OpenAPI_access_type_rm_t *OpenAPI_access_type_rm_parseFromJSON(cJSON *access_type_rmJSON);
+cJSON *OpenAPI_access_type_rm_convertToJSON(OpenAPI_access_type_rm_t *access_type_rm);
+OpenAPI_access_type_rm_t *OpenAPI_access_type_rm_copy(OpenAPI_access_type_rm_t *dst, OpenAPI_access_type_rm_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_access_type_rm_H_ */
+
diff --git a/lib/sbi/openapi/model/accu_usage_report.c b/lib/sbi/openapi/model/accu_usage_report.c
index 06c0e0b40..a998fdc39 100644
--- a/lib/sbi/openapi/model/accu_usage_report.c
+++ b/lib/sbi/openapi/model/accu_usage_report.c
@@ -14,7 +14,7 @@ OpenAPI_accu_usage_report_t *OpenAPI_accu_usage_report_create(
long next_vol_usage_uplink,
long next_vol_usage_downlink,
int next_time_usage
- )
+)
{
OpenAPI_accu_usage_report_t *accu_usage_report_local_var = OpenAPI_malloc(sizeof(OpenAPI_accu_usage_report_t));
if (!accu_usage_report_local_var) {
@@ -59,59 +59,59 @@ cJSON *OpenAPI_accu_usage_report_convertToJSON(OpenAPI_accu_usage_report_t *accu
}
if (accu_usage_report->vol_usage) {
- if (cJSON_AddNumberToObject(item, "volUsage", accu_usage_report->vol_usage) == NULL) {
- ogs_error("OpenAPI_accu_usage_report_convertToJSON() failed [vol_usage]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "volUsage", accu_usage_report->vol_usage) == NULL) {
+ ogs_error("OpenAPI_accu_usage_report_convertToJSON() failed [vol_usage]");
+ goto end;
+ }
}
if (accu_usage_report->vol_usage_uplink) {
- if (cJSON_AddNumberToObject(item, "volUsageUplink", accu_usage_report->vol_usage_uplink) == NULL) {
- ogs_error("OpenAPI_accu_usage_report_convertToJSON() failed [vol_usage_uplink]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "volUsageUplink", accu_usage_report->vol_usage_uplink) == NULL) {
+ ogs_error("OpenAPI_accu_usage_report_convertToJSON() failed [vol_usage_uplink]");
+ goto end;
+ }
}
if (accu_usage_report->vol_usage_downlink) {
- if (cJSON_AddNumberToObject(item, "volUsageDownlink", accu_usage_report->vol_usage_downlink) == NULL) {
- ogs_error("OpenAPI_accu_usage_report_convertToJSON() failed [vol_usage_downlink]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "volUsageDownlink", accu_usage_report->vol_usage_downlink) == NULL) {
+ ogs_error("OpenAPI_accu_usage_report_convertToJSON() failed [vol_usage_downlink]");
+ goto end;
+ }
}
if (accu_usage_report->time_usage) {
- if (cJSON_AddNumberToObject(item, "timeUsage", accu_usage_report->time_usage) == NULL) {
- ogs_error("OpenAPI_accu_usage_report_convertToJSON() failed [time_usage]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "timeUsage", accu_usage_report->time_usage) == NULL) {
+ ogs_error("OpenAPI_accu_usage_report_convertToJSON() failed [time_usage]");
+ goto end;
+ }
}
if (accu_usage_report->next_vol_usage) {
- if (cJSON_AddNumberToObject(item, "nextVolUsage", accu_usage_report->next_vol_usage) == NULL) {
- ogs_error("OpenAPI_accu_usage_report_convertToJSON() failed [next_vol_usage]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "nextVolUsage", accu_usage_report->next_vol_usage) == NULL) {
+ ogs_error("OpenAPI_accu_usage_report_convertToJSON() failed [next_vol_usage]");
+ goto end;
+ }
}
if (accu_usage_report->next_vol_usage_uplink) {
- if (cJSON_AddNumberToObject(item, "nextVolUsageUplink", accu_usage_report->next_vol_usage_uplink) == NULL) {
- ogs_error("OpenAPI_accu_usage_report_convertToJSON() failed [next_vol_usage_uplink]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "nextVolUsageUplink", accu_usage_report->next_vol_usage_uplink) == NULL) {
+ ogs_error("OpenAPI_accu_usage_report_convertToJSON() failed [next_vol_usage_uplink]");
+ goto end;
+ }
}
if (accu_usage_report->next_vol_usage_downlink) {
- if (cJSON_AddNumberToObject(item, "nextVolUsageDownlink", accu_usage_report->next_vol_usage_downlink) == NULL) {
- ogs_error("OpenAPI_accu_usage_report_convertToJSON() failed [next_vol_usage_downlink]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "nextVolUsageDownlink", accu_usage_report->next_vol_usage_downlink) == NULL) {
+ ogs_error("OpenAPI_accu_usage_report_convertToJSON() failed [next_vol_usage_downlink]");
+ goto end;
+ }
}
if (accu_usage_report->next_time_usage) {
- if (cJSON_AddNumberToObject(item, "nextTimeUsage", accu_usage_report->next_time_usage) == NULL) {
- ogs_error("OpenAPI_accu_usage_report_convertToJSON() failed [next_time_usage]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "nextTimeUsage", accu_usage_report->next_time_usage) == NULL) {
+ ogs_error("OpenAPI_accu_usage_report_convertToJSON() failed [next_time_usage]");
+ goto end;
+ }
}
end:
@@ -127,7 +127,7 @@ OpenAPI_accu_usage_report_t *OpenAPI_accu_usage_report_parseFromJSON(cJSON *accu
goto end;
}
-
+
if (!cJSON_IsString(ref_um_ids)) {
ogs_error("OpenAPI_accu_usage_report_parseFromJSON() failed [ref_um_ids]");
goto end;
@@ -135,74 +135,74 @@ OpenAPI_accu_usage_report_t *OpenAPI_accu_usage_report_parseFromJSON(cJSON *accu
cJSON *vol_usage = cJSON_GetObjectItemCaseSensitive(accu_usage_reportJSON, "volUsage");
- if (vol_usage) {
- if (!cJSON_IsNumber(vol_usage)) {
- ogs_error("OpenAPI_accu_usage_report_parseFromJSON() failed [vol_usage]");
- goto end;
- }
+ if (vol_usage) {
+ if (!cJSON_IsNumber(vol_usage)) {
+ ogs_error("OpenAPI_accu_usage_report_parseFromJSON() failed [vol_usage]");
+ goto end;
+ }
}
cJSON *vol_usage_uplink = cJSON_GetObjectItemCaseSensitive(accu_usage_reportJSON, "volUsageUplink");
- if (vol_usage_uplink) {
- if (!cJSON_IsNumber(vol_usage_uplink)) {
- ogs_error("OpenAPI_accu_usage_report_parseFromJSON() failed [vol_usage_uplink]");
- goto end;
- }
+ if (vol_usage_uplink) {
+ if (!cJSON_IsNumber(vol_usage_uplink)) {
+ ogs_error("OpenAPI_accu_usage_report_parseFromJSON() failed [vol_usage_uplink]");
+ goto end;
+ }
}
cJSON *vol_usage_downlink = cJSON_GetObjectItemCaseSensitive(accu_usage_reportJSON, "volUsageDownlink");
- if (vol_usage_downlink) {
- if (!cJSON_IsNumber(vol_usage_downlink)) {
- ogs_error("OpenAPI_accu_usage_report_parseFromJSON() failed [vol_usage_downlink]");
- goto end;
- }
+ if (vol_usage_downlink) {
+ if (!cJSON_IsNumber(vol_usage_downlink)) {
+ ogs_error("OpenAPI_accu_usage_report_parseFromJSON() failed [vol_usage_downlink]");
+ goto end;
+ }
}
cJSON *time_usage = cJSON_GetObjectItemCaseSensitive(accu_usage_reportJSON, "timeUsage");
- if (time_usage) {
- if (!cJSON_IsNumber(time_usage)) {
- ogs_error("OpenAPI_accu_usage_report_parseFromJSON() failed [time_usage]");
- goto end;
- }
+ if (time_usage) {
+ if (!cJSON_IsNumber(time_usage)) {
+ ogs_error("OpenAPI_accu_usage_report_parseFromJSON() failed [time_usage]");
+ goto end;
+ }
}
cJSON *next_vol_usage = cJSON_GetObjectItemCaseSensitive(accu_usage_reportJSON, "nextVolUsage");
- if (next_vol_usage) {
- if (!cJSON_IsNumber(next_vol_usage)) {
- ogs_error("OpenAPI_accu_usage_report_parseFromJSON() failed [next_vol_usage]");
- goto end;
- }
+ if (next_vol_usage) {
+ if (!cJSON_IsNumber(next_vol_usage)) {
+ ogs_error("OpenAPI_accu_usage_report_parseFromJSON() failed [next_vol_usage]");
+ goto end;
+ }
}
cJSON *next_vol_usage_uplink = cJSON_GetObjectItemCaseSensitive(accu_usage_reportJSON, "nextVolUsageUplink");
- if (next_vol_usage_uplink) {
- if (!cJSON_IsNumber(next_vol_usage_uplink)) {
- ogs_error("OpenAPI_accu_usage_report_parseFromJSON() failed [next_vol_usage_uplink]");
- goto end;
- }
+ if (next_vol_usage_uplink) {
+ if (!cJSON_IsNumber(next_vol_usage_uplink)) {
+ ogs_error("OpenAPI_accu_usage_report_parseFromJSON() failed [next_vol_usage_uplink]");
+ goto end;
+ }
}
cJSON *next_vol_usage_downlink = cJSON_GetObjectItemCaseSensitive(accu_usage_reportJSON, "nextVolUsageDownlink");
- if (next_vol_usage_downlink) {
- if (!cJSON_IsNumber(next_vol_usage_downlink)) {
- ogs_error("OpenAPI_accu_usage_report_parseFromJSON() failed [next_vol_usage_downlink]");
- goto end;
- }
+ if (next_vol_usage_downlink) {
+ if (!cJSON_IsNumber(next_vol_usage_downlink)) {
+ ogs_error("OpenAPI_accu_usage_report_parseFromJSON() failed [next_vol_usage_downlink]");
+ goto end;
+ }
}
cJSON *next_time_usage = cJSON_GetObjectItemCaseSensitive(accu_usage_reportJSON, "nextTimeUsage");
- if (next_time_usage) {
- if (!cJSON_IsNumber(next_time_usage)) {
- ogs_error("OpenAPI_accu_usage_report_parseFromJSON() failed [next_time_usage]");
- goto end;
- }
+ if (next_time_usage) {
+ if (!cJSON_IsNumber(next_time_usage)) {
+ ogs_error("OpenAPI_accu_usage_report_parseFromJSON() failed [next_time_usage]");
+ goto end;
+ }
}
accu_usage_report_local_var = OpenAPI_accu_usage_report_create (
@@ -215,7 +215,7 @@ OpenAPI_accu_usage_report_t *OpenAPI_accu_usage_report_parseFromJSON(cJSON *accu
next_vol_usage_uplink ? next_vol_usage_uplink->valuedouble : 0,
next_vol_usage_downlink ? next_vol_usage_downlink->valuedouble : 0,
next_time_usage ? next_time_usage->valuedouble : 0
- );
+ );
return accu_usage_report_local_var;
end:
diff --git a/lib/sbi/openapi/model/accu_usage_report.h b/lib/sbi/openapi/model/accu_usage_report.h
index c2dca6679..523a32740 100644
--- a/lib/sbi/openapi/model/accu_usage_report.h
+++ b/lib/sbi/openapi/model/accu_usage_report.h
@@ -1,7 +1,7 @@
/*
* accu_usage_report.h
*
- *
+ *
*/
#ifndef _OpenAPI_accu_usage_report_H_
@@ -40,7 +40,7 @@ OpenAPI_accu_usage_report_t *OpenAPI_accu_usage_report_create(
long next_vol_usage_uplink,
long next_vol_usage_downlink,
int next_time_usage
- );
+);
void OpenAPI_accu_usage_report_free(OpenAPI_accu_usage_report_t *accu_usage_report);
OpenAPI_accu_usage_report_t *OpenAPI_accu_usage_report_parseFromJSON(cJSON *accu_usage_reportJSON);
cJSON *OpenAPI_accu_usage_report_convertToJSON(OpenAPI_accu_usage_report_t *accu_usage_report);
diff --git a/lib/sbi/openapi/model/accumulated_usage.c b/lib/sbi/openapi/model/accumulated_usage.c
index 2682e7c6f..e4075d94c 100644
--- a/lib/sbi/openapi/model/accumulated_usage.c
+++ b/lib/sbi/openapi/model/accumulated_usage.c
@@ -9,7 +9,7 @@ OpenAPI_accumulated_usage_t *OpenAPI_accumulated_usage_create(
long total_volume,
long downlink_volume,
long uplink_volume
- )
+)
{
OpenAPI_accumulated_usage_t *accumulated_usage_local_var = OpenAPI_malloc(sizeof(OpenAPI_accumulated_usage_t));
if (!accumulated_usage_local_var) {
@@ -43,31 +43,31 @@ cJSON *OpenAPI_accumulated_usage_convertToJSON(OpenAPI_accumulated_usage_t *accu
item = cJSON_CreateObject();
if (accumulated_usage->duration) {
- if (cJSON_AddNumberToObject(item, "duration", accumulated_usage->duration) == NULL) {
- ogs_error("OpenAPI_accumulated_usage_convertToJSON() failed [duration]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "duration", accumulated_usage->duration) == NULL) {
+ ogs_error("OpenAPI_accumulated_usage_convertToJSON() failed [duration]");
+ goto end;
+ }
}
if (accumulated_usage->total_volume) {
- if (cJSON_AddNumberToObject(item, "totalVolume", accumulated_usage->total_volume) == NULL) {
- ogs_error("OpenAPI_accumulated_usage_convertToJSON() failed [total_volume]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "totalVolume", accumulated_usage->total_volume) == NULL) {
+ ogs_error("OpenAPI_accumulated_usage_convertToJSON() failed [total_volume]");
+ goto end;
+ }
}
if (accumulated_usage->downlink_volume) {
- if (cJSON_AddNumberToObject(item, "downlinkVolume", accumulated_usage->downlink_volume) == NULL) {
- ogs_error("OpenAPI_accumulated_usage_convertToJSON() failed [downlink_volume]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "downlinkVolume", accumulated_usage->downlink_volume) == NULL) {
+ ogs_error("OpenAPI_accumulated_usage_convertToJSON() failed [downlink_volume]");
+ goto end;
+ }
}
if (accumulated_usage->uplink_volume) {
- if (cJSON_AddNumberToObject(item, "uplinkVolume", accumulated_usage->uplink_volume) == NULL) {
- ogs_error("OpenAPI_accumulated_usage_convertToJSON() failed [uplink_volume]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "uplinkVolume", accumulated_usage->uplink_volume) == NULL) {
+ ogs_error("OpenAPI_accumulated_usage_convertToJSON() failed [uplink_volume]");
+ goto end;
+ }
}
end:
@@ -79,38 +79,38 @@ OpenAPI_accumulated_usage_t *OpenAPI_accumulated_usage_parseFromJSON(cJSON *accu
OpenAPI_accumulated_usage_t *accumulated_usage_local_var = NULL;
cJSON *duration = cJSON_GetObjectItemCaseSensitive(accumulated_usageJSON, "duration");
- if (duration) {
- if (!cJSON_IsNumber(duration)) {
- ogs_error("OpenAPI_accumulated_usage_parseFromJSON() failed [duration]");
- goto end;
- }
+ if (duration) {
+ if (!cJSON_IsNumber(duration)) {
+ ogs_error("OpenAPI_accumulated_usage_parseFromJSON() failed [duration]");
+ goto end;
+ }
}
cJSON *total_volume = cJSON_GetObjectItemCaseSensitive(accumulated_usageJSON, "totalVolume");
- if (total_volume) {
- if (!cJSON_IsNumber(total_volume)) {
- ogs_error("OpenAPI_accumulated_usage_parseFromJSON() failed [total_volume]");
- goto end;
- }
+ if (total_volume) {
+ if (!cJSON_IsNumber(total_volume)) {
+ ogs_error("OpenAPI_accumulated_usage_parseFromJSON() failed [total_volume]");
+ goto end;
+ }
}
cJSON *downlink_volume = cJSON_GetObjectItemCaseSensitive(accumulated_usageJSON, "downlinkVolume");
- if (downlink_volume) {
- if (!cJSON_IsNumber(downlink_volume)) {
- ogs_error("OpenAPI_accumulated_usage_parseFromJSON() failed [downlink_volume]");
- goto end;
- }
+ if (downlink_volume) {
+ if (!cJSON_IsNumber(downlink_volume)) {
+ ogs_error("OpenAPI_accumulated_usage_parseFromJSON() failed [downlink_volume]");
+ goto end;
+ }
}
cJSON *uplink_volume = cJSON_GetObjectItemCaseSensitive(accumulated_usageJSON, "uplinkVolume");
- if (uplink_volume) {
- if (!cJSON_IsNumber(uplink_volume)) {
- ogs_error("OpenAPI_accumulated_usage_parseFromJSON() failed [uplink_volume]");
- goto end;
- }
+ if (uplink_volume) {
+ if (!cJSON_IsNumber(uplink_volume)) {
+ ogs_error("OpenAPI_accumulated_usage_parseFromJSON() failed [uplink_volume]");
+ goto end;
+ }
}
accumulated_usage_local_var = OpenAPI_accumulated_usage_create (
@@ -118,7 +118,7 @@ OpenAPI_accumulated_usage_t *OpenAPI_accumulated_usage_parseFromJSON(cJSON *accu
total_volume ? total_volume->valuedouble : 0,
downlink_volume ? downlink_volume->valuedouble : 0,
uplink_volume ? uplink_volume->valuedouble : 0
- );
+ );
return accumulated_usage_local_var;
end:
diff --git a/lib/sbi/openapi/model/accumulated_usage.h b/lib/sbi/openapi/model/accumulated_usage.h
index cf009f0a4..dd2a8d622 100644
--- a/lib/sbi/openapi/model/accumulated_usage.h
+++ b/lib/sbi/openapi/model/accumulated_usage.h
@@ -1,7 +1,7 @@
/*
* accumulated_usage.h
*
- *
+ *
*/
#ifndef _OpenAPI_accumulated_usage_H_
@@ -30,7 +30,7 @@ OpenAPI_accumulated_usage_t *OpenAPI_accumulated_usage_create(
long total_volume,
long downlink_volume,
long uplink_volume
- );
+);
void OpenAPI_accumulated_usage_free(OpenAPI_accumulated_usage_t *accumulated_usage);
OpenAPI_accumulated_usage_t *OpenAPI_accumulated_usage_parseFromJSON(cJSON *accumulated_usageJSON);
cJSON *OpenAPI_accumulated_usage_convertToJSON(OpenAPI_accumulated_usage_t *accumulated_usage);
diff --git a/lib/sbi/openapi/model/acknowledge_info.c b/lib/sbi/openapi/model/acknowledge_info.c
index 7ec1f130d..c4b84387c 100644
--- a/lib/sbi/openapi/model/acknowledge_info.c
+++ b/lib/sbi/openapi/model/acknowledge_info.c
@@ -8,8 +8,9 @@ OpenAPI_acknowledge_info_t *OpenAPI_acknowledge_info_create(
char *sor_mac_iue,
char *upu_mac_iue,
char *secured_packet,
- char *provisioning_time
- )
+ char *provisioning_time,
+ int ue_not_reachable
+)
{
OpenAPI_acknowledge_info_t *acknowledge_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_acknowledge_info_t));
if (!acknowledge_info_local_var) {
@@ -19,6 +20,7 @@ OpenAPI_acknowledge_info_t *OpenAPI_acknowledge_info_create(
acknowledge_info_local_var->upu_mac_iue = upu_mac_iue;
acknowledge_info_local_var->secured_packet = secured_packet;
acknowledge_info_local_var->provisioning_time = provisioning_time;
+ acknowledge_info_local_var->ue_not_reachable = ue_not_reachable;
return acknowledge_info_local_var;
}
@@ -47,24 +49,24 @@ cJSON *OpenAPI_acknowledge_info_convertToJSON(OpenAPI_acknowledge_info_t *acknow
item = cJSON_CreateObject();
if (acknowledge_info->sor_mac_iue) {
- if (cJSON_AddStringToObject(item, "sorMacIue", acknowledge_info->sor_mac_iue) == NULL) {
- ogs_error("OpenAPI_acknowledge_info_convertToJSON() failed [sor_mac_iue]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "sorMacIue", acknowledge_info->sor_mac_iue) == NULL) {
+ ogs_error("OpenAPI_acknowledge_info_convertToJSON() failed [sor_mac_iue]");
+ goto end;
+ }
}
if (acknowledge_info->upu_mac_iue) {
- if (cJSON_AddStringToObject(item, "upuMacIue", acknowledge_info->upu_mac_iue) == NULL) {
- ogs_error("OpenAPI_acknowledge_info_convertToJSON() failed [upu_mac_iue]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "upuMacIue", acknowledge_info->upu_mac_iue) == NULL) {
+ ogs_error("OpenAPI_acknowledge_info_convertToJSON() failed [upu_mac_iue]");
+ goto end;
+ }
}
if (acknowledge_info->secured_packet) {
- if (cJSON_AddStringToObject(item, "securedPacket", acknowledge_info->secured_packet) == NULL) {
- ogs_error("OpenAPI_acknowledge_info_convertToJSON() failed [secured_packet]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "securedPacket", acknowledge_info->secured_packet) == NULL) {
+ ogs_error("OpenAPI_acknowledge_info_convertToJSON() failed [secured_packet]");
+ goto end;
+ }
}
if (cJSON_AddStringToObject(item, "provisioningTime", acknowledge_info->provisioning_time) == NULL) {
@@ -72,6 +74,13 @@ cJSON *OpenAPI_acknowledge_info_convertToJSON(OpenAPI_acknowledge_info_t *acknow
goto end;
}
+ if (acknowledge_info->ue_not_reachable) {
+ if (cJSON_AddBoolToObject(item, "ueNotReachable", acknowledge_info->ue_not_reachable) == NULL) {
+ ogs_error("OpenAPI_acknowledge_info_convertToJSON() failed [ue_not_reachable]");
+ goto end;
+ }
+ }
+
end:
return item;
}
@@ -81,29 +90,29 @@ OpenAPI_acknowledge_info_t *OpenAPI_acknowledge_info_parseFromJSON(cJSON *acknow
OpenAPI_acknowledge_info_t *acknowledge_info_local_var = NULL;
cJSON *sor_mac_iue = cJSON_GetObjectItemCaseSensitive(acknowledge_infoJSON, "sorMacIue");
- if (sor_mac_iue) {
- if (!cJSON_IsString(sor_mac_iue)) {
- ogs_error("OpenAPI_acknowledge_info_parseFromJSON() failed [sor_mac_iue]");
- goto end;
- }
+ if (sor_mac_iue) {
+ if (!cJSON_IsString(sor_mac_iue)) {
+ ogs_error("OpenAPI_acknowledge_info_parseFromJSON() failed [sor_mac_iue]");
+ goto end;
+ }
}
cJSON *upu_mac_iue = cJSON_GetObjectItemCaseSensitive(acknowledge_infoJSON, "upuMacIue");
- if (upu_mac_iue) {
- if (!cJSON_IsString(upu_mac_iue)) {
- ogs_error("OpenAPI_acknowledge_info_parseFromJSON() failed [upu_mac_iue]");
- goto end;
- }
+ if (upu_mac_iue) {
+ if (!cJSON_IsString(upu_mac_iue)) {
+ ogs_error("OpenAPI_acknowledge_info_parseFromJSON() failed [upu_mac_iue]");
+ goto end;
+ }
}
cJSON *secured_packet = cJSON_GetObjectItemCaseSensitive(acknowledge_infoJSON, "securedPacket");
- if (secured_packet) {
- if (!cJSON_IsString(secured_packet)) {
- ogs_error("OpenAPI_acknowledge_info_parseFromJSON() failed [secured_packet]");
- goto end;
- }
+ if (secured_packet) {
+ if (!cJSON_IsString(secured_packet)) {
+ ogs_error("OpenAPI_acknowledge_info_parseFromJSON() failed [secured_packet]");
+ goto end;
+ }
}
cJSON *provisioning_time = cJSON_GetObjectItemCaseSensitive(acknowledge_infoJSON, "provisioningTime");
@@ -112,18 +121,28 @@ OpenAPI_acknowledge_info_t *OpenAPI_acknowledge_info_parseFromJSON(cJSON *acknow
goto end;
}
-
+
if (!cJSON_IsString(provisioning_time)) {
ogs_error("OpenAPI_acknowledge_info_parseFromJSON() failed [provisioning_time]");
goto end;
}
+ cJSON *ue_not_reachable = cJSON_GetObjectItemCaseSensitive(acknowledge_infoJSON, "ueNotReachable");
+
+ if (ue_not_reachable) {
+ if (!cJSON_IsBool(ue_not_reachable)) {
+ ogs_error("OpenAPI_acknowledge_info_parseFromJSON() failed [ue_not_reachable]");
+ goto end;
+ }
+ }
+
acknowledge_info_local_var = OpenAPI_acknowledge_info_create (
sor_mac_iue ? ogs_strdup_or_assert(sor_mac_iue->valuestring) : NULL,
upu_mac_iue ? ogs_strdup_or_assert(upu_mac_iue->valuestring) : NULL,
secured_packet ? ogs_strdup_or_assert(secured_packet->valuestring) : NULL,
- ogs_strdup_or_assert(provisioning_time->valuestring)
- );
+ ogs_strdup_or_assert(provisioning_time->valuestring),
+ ue_not_reachable ? ue_not_reachable->valueint : 0
+ );
return acknowledge_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/acknowledge_info.h b/lib/sbi/openapi/model/acknowledge_info.h
index dc5e13ec6..0560f7e06 100644
--- a/lib/sbi/openapi/model/acknowledge_info.h
+++ b/lib/sbi/openapi/model/acknowledge_info.h
@@ -1,7 +1,7 @@
/*
* acknowledge_info.h
*
- *
+ *
*/
#ifndef _OpenAPI_acknowledge_info_H_
@@ -23,14 +23,16 @@ typedef struct OpenAPI_acknowledge_info_s {
char *upu_mac_iue;
char *secured_packet;
char *provisioning_time;
+ int ue_not_reachable;
} OpenAPI_acknowledge_info_t;
OpenAPI_acknowledge_info_t *OpenAPI_acknowledge_info_create(
char *sor_mac_iue,
char *upu_mac_iue,
char *secured_packet,
- char *provisioning_time
- );
+ char *provisioning_time,
+ int ue_not_reachable
+);
void OpenAPI_acknowledge_info_free(OpenAPI_acknowledge_info_t *acknowledge_info);
OpenAPI_acknowledge_info_t *OpenAPI_acknowledge_info_parseFromJSON(cJSON *acknowledge_infoJSON);
cJSON *OpenAPI_acknowledge_info_convertToJSON(OpenAPI_acknowledge_info_t *acknowledge_info);
diff --git a/lib/sbi/openapi/model/acs_info.c b/lib/sbi/openapi/model/acs_info.c
index d1ff1e2ec..997751cb4 100644
--- a/lib/sbi/openapi/model/acs_info.c
+++ b/lib/sbi/openapi/model/acs_info.c
@@ -8,7 +8,7 @@ OpenAPI_acs_info_t *OpenAPI_acs_info_create(
char *acs_url,
char *acs_ipv4_addr,
char *acs_ipv6_addr
- )
+)
{
OpenAPI_acs_info_t *acs_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_acs_info_t));
if (!acs_info_local_var) {
@@ -44,24 +44,24 @@ cJSON *OpenAPI_acs_info_convertToJSON(OpenAPI_acs_info_t *acs_info)
item = cJSON_CreateObject();
if (acs_info->acs_url) {
- if (cJSON_AddStringToObject(item, "acsUrl", acs_info->acs_url) == NULL) {
- ogs_error("OpenAPI_acs_info_convertToJSON() failed [acs_url]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "acsUrl", acs_info->acs_url) == NULL) {
+ ogs_error("OpenAPI_acs_info_convertToJSON() failed [acs_url]");
+ goto end;
+ }
}
if (acs_info->acs_ipv4_addr) {
- if (cJSON_AddStringToObject(item, "acsIpv4Addr", acs_info->acs_ipv4_addr) == NULL) {
- ogs_error("OpenAPI_acs_info_convertToJSON() failed [acs_ipv4_addr]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "acsIpv4Addr", acs_info->acs_ipv4_addr) == NULL) {
+ ogs_error("OpenAPI_acs_info_convertToJSON() failed [acs_ipv4_addr]");
+ goto end;
+ }
}
if (acs_info->acs_ipv6_addr) {
- if (cJSON_AddStringToObject(item, "acsIpv6Addr", acs_info->acs_ipv6_addr) == NULL) {
- ogs_error("OpenAPI_acs_info_convertToJSON() failed [acs_ipv6_addr]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "acsIpv6Addr", acs_info->acs_ipv6_addr) == NULL) {
+ ogs_error("OpenAPI_acs_info_convertToJSON() failed [acs_ipv6_addr]");
+ goto end;
+ }
}
end:
@@ -73,36 +73,36 @@ OpenAPI_acs_info_t *OpenAPI_acs_info_parseFromJSON(cJSON *acs_infoJSON)
OpenAPI_acs_info_t *acs_info_local_var = NULL;
cJSON *acs_url = cJSON_GetObjectItemCaseSensitive(acs_infoJSON, "acsUrl");
- if (acs_url) {
- if (!cJSON_IsString(acs_url)) {
- ogs_error("OpenAPI_acs_info_parseFromJSON() failed [acs_url]");
- goto end;
- }
+ if (acs_url) {
+ if (!cJSON_IsString(acs_url)) {
+ ogs_error("OpenAPI_acs_info_parseFromJSON() failed [acs_url]");
+ goto end;
+ }
}
cJSON *acs_ipv4_addr = cJSON_GetObjectItemCaseSensitive(acs_infoJSON, "acsIpv4Addr");
- if (acs_ipv4_addr) {
- if (!cJSON_IsString(acs_ipv4_addr)) {
- ogs_error("OpenAPI_acs_info_parseFromJSON() failed [acs_ipv4_addr]");
- goto end;
- }
+ if (acs_ipv4_addr) {
+ if (!cJSON_IsString(acs_ipv4_addr)) {
+ ogs_error("OpenAPI_acs_info_parseFromJSON() failed [acs_ipv4_addr]");
+ goto end;
+ }
}
cJSON *acs_ipv6_addr = cJSON_GetObjectItemCaseSensitive(acs_infoJSON, "acsIpv6Addr");
- if (acs_ipv6_addr) {
- if (!cJSON_IsString(acs_ipv6_addr)) {
- ogs_error("OpenAPI_acs_info_parseFromJSON() failed [acs_ipv6_addr]");
- goto end;
- }
+ if (acs_ipv6_addr) {
+ if (!cJSON_IsString(acs_ipv6_addr)) {
+ ogs_error("OpenAPI_acs_info_parseFromJSON() failed [acs_ipv6_addr]");
+ goto end;
+ }
}
acs_info_local_var = OpenAPI_acs_info_create (
acs_url ? ogs_strdup_or_assert(acs_url->valuestring) : NULL,
acs_ipv4_addr ? ogs_strdup_or_assert(acs_ipv4_addr->valuestring) : NULL,
acs_ipv6_addr ? ogs_strdup_or_assert(acs_ipv6_addr->valuestring) : NULL
- );
+ );
return acs_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/acs_info.h b/lib/sbi/openapi/model/acs_info.h
index 69de69915..5de9df37c 100644
--- a/lib/sbi/openapi/model/acs_info.h
+++ b/lib/sbi/openapi/model/acs_info.h
@@ -1,7 +1,7 @@
/*
* acs_info.h
*
- *
+ *
*/
#ifndef _OpenAPI_acs_info_H_
@@ -28,7 +28,7 @@ OpenAPI_acs_info_t *OpenAPI_acs_info_create(
char *acs_url,
char *acs_ipv4_addr,
char *acs_ipv6_addr
- );
+);
void OpenAPI_acs_info_free(OpenAPI_acs_info_t *acs_info);
OpenAPI_acs_info_t *OpenAPI_acs_info_parseFromJSON(cJSON *acs_infoJSON);
cJSON *OpenAPI_acs_info_convertToJSON(OpenAPI_acs_info_t *acs_info);
diff --git a/lib/sbi/openapi/model/acs_info_1.c b/lib/sbi/openapi/model/acs_info_1.c
new file mode 100644
index 000000000..a6203852b
--- /dev/null
+++ b/lib/sbi/openapi/model/acs_info_1.c
@@ -0,0 +1,145 @@
+
+#include
+#include
+#include
+#include "acs_info_1.h"
+
+OpenAPI_acs_info_1_t *OpenAPI_acs_info_1_create(
+ char *acs_url,
+ char *acs_ipv4_addr,
+ char *acs_ipv6_addr
+)
+{
+ OpenAPI_acs_info_1_t *acs_info_1_local_var = OpenAPI_malloc(sizeof(OpenAPI_acs_info_1_t));
+ if (!acs_info_1_local_var) {
+ return NULL;
+ }
+ acs_info_1_local_var->acs_url = acs_url;
+ acs_info_1_local_var->acs_ipv4_addr = acs_ipv4_addr;
+ acs_info_1_local_var->acs_ipv6_addr = acs_ipv6_addr;
+
+ return acs_info_1_local_var;
+}
+
+void OpenAPI_acs_info_1_free(OpenAPI_acs_info_1_t *acs_info_1)
+{
+ if (NULL == acs_info_1) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ ogs_free(acs_info_1->acs_url);
+ ogs_free(acs_info_1->acs_ipv4_addr);
+ ogs_free(acs_info_1->acs_ipv6_addr);
+ ogs_free(acs_info_1);
+}
+
+cJSON *OpenAPI_acs_info_1_convertToJSON(OpenAPI_acs_info_1_t *acs_info_1)
+{
+ cJSON *item = NULL;
+
+ if (acs_info_1 == NULL) {
+ ogs_error("OpenAPI_acs_info_1_convertToJSON() failed [AcsInfo_1]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (acs_info_1->acs_url) {
+ if (cJSON_AddStringToObject(item, "acsUrl", acs_info_1->acs_url) == NULL) {
+ ogs_error("OpenAPI_acs_info_1_convertToJSON() failed [acs_url]");
+ goto end;
+ }
+ }
+
+ if (acs_info_1->acs_ipv4_addr) {
+ if (cJSON_AddStringToObject(item, "acsIpv4Addr", acs_info_1->acs_ipv4_addr) == NULL) {
+ ogs_error("OpenAPI_acs_info_1_convertToJSON() failed [acs_ipv4_addr]");
+ goto end;
+ }
+ }
+
+ if (acs_info_1->acs_ipv6_addr) {
+ if (cJSON_AddStringToObject(item, "acsIpv6Addr", acs_info_1->acs_ipv6_addr) == NULL) {
+ ogs_error("OpenAPI_acs_info_1_convertToJSON() failed [acs_ipv6_addr]");
+ goto end;
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_acs_info_1_t *OpenAPI_acs_info_1_parseFromJSON(cJSON *acs_info_1JSON)
+{
+ OpenAPI_acs_info_1_t *acs_info_1_local_var = NULL;
+ cJSON *acs_url = cJSON_GetObjectItemCaseSensitive(acs_info_1JSON, "acsUrl");
+
+ if (acs_url) {
+ if (!cJSON_IsString(acs_url)) {
+ ogs_error("OpenAPI_acs_info_1_parseFromJSON() failed [acs_url]");
+ goto end;
+ }
+ }
+
+ cJSON *acs_ipv4_addr = cJSON_GetObjectItemCaseSensitive(acs_info_1JSON, "acsIpv4Addr");
+
+ if (acs_ipv4_addr) {
+ if (!cJSON_IsString(acs_ipv4_addr)) {
+ ogs_error("OpenAPI_acs_info_1_parseFromJSON() failed [acs_ipv4_addr]");
+ goto end;
+ }
+ }
+
+ cJSON *acs_ipv6_addr = cJSON_GetObjectItemCaseSensitive(acs_info_1JSON, "acsIpv6Addr");
+
+ if (acs_ipv6_addr) {
+ if (!cJSON_IsString(acs_ipv6_addr)) {
+ ogs_error("OpenAPI_acs_info_1_parseFromJSON() failed [acs_ipv6_addr]");
+ goto end;
+ }
+ }
+
+ acs_info_1_local_var = OpenAPI_acs_info_1_create (
+ acs_url ? ogs_strdup_or_assert(acs_url->valuestring) : NULL,
+ acs_ipv4_addr ? ogs_strdup_or_assert(acs_ipv4_addr->valuestring) : NULL,
+ acs_ipv6_addr ? ogs_strdup_or_assert(acs_ipv6_addr->valuestring) : NULL
+ );
+
+ return acs_info_1_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_acs_info_1_t *OpenAPI_acs_info_1_copy(OpenAPI_acs_info_1_t *dst, OpenAPI_acs_info_1_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_acs_info_1_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_acs_info_1_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_acs_info_1_free(dst);
+ dst = OpenAPI_acs_info_1_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/acs_info_1.h b/lib/sbi/openapi/model/acs_info_1.h
new file mode 100644
index 000000000..dba9bf16b
--- /dev/null
+++ b/lib/sbi/openapi/model/acs_info_1.h
@@ -0,0 +1,42 @@
+/*
+ * acs_info_1.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_acs_info_1_H_
+#define _OpenAPI_acs_info_1_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_acs_info_1_s OpenAPI_acs_info_1_t;
+typedef struct OpenAPI_acs_info_1_s {
+ char *acs_url;
+ char *acs_ipv4_addr;
+ char *acs_ipv6_addr;
+} OpenAPI_acs_info_1_t;
+
+OpenAPI_acs_info_1_t *OpenAPI_acs_info_1_create(
+ char *acs_url,
+ char *acs_ipv4_addr,
+ char *acs_ipv6_addr
+);
+void OpenAPI_acs_info_1_free(OpenAPI_acs_info_1_t *acs_info_1);
+OpenAPI_acs_info_1_t *OpenAPI_acs_info_1_parseFromJSON(cJSON *acs_info_1JSON);
+cJSON *OpenAPI_acs_info_1_convertToJSON(OpenAPI_acs_info_1_t *acs_info_1);
+OpenAPI_acs_info_1_t *OpenAPI_acs_info_1_copy(OpenAPI_acs_info_1_t *dst, OpenAPI_acs_info_1_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_acs_info_1_H_ */
+
diff --git a/lib/sbi/openapi/model/acs_info_rm.c b/lib/sbi/openapi/model/acs_info_rm.c
index 4cda2459b..2d72d71f1 100644
--- a/lib/sbi/openapi/model/acs_info_rm.c
+++ b/lib/sbi/openapi/model/acs_info_rm.c
@@ -8,7 +8,7 @@ OpenAPI_acs_info_rm_t *OpenAPI_acs_info_rm_create(
char *acs_url,
char *acs_ipv4_addr,
char *acs_ipv6_addr
- )
+)
{
OpenAPI_acs_info_rm_t *acs_info_rm_local_var = OpenAPI_malloc(sizeof(OpenAPI_acs_info_rm_t));
if (!acs_info_rm_local_var) {
@@ -44,24 +44,24 @@ cJSON *OpenAPI_acs_info_rm_convertToJSON(OpenAPI_acs_info_rm_t *acs_info_rm)
item = cJSON_CreateObject();
if (acs_info_rm->acs_url) {
- if (cJSON_AddStringToObject(item, "acsUrl", acs_info_rm->acs_url) == NULL) {
- ogs_error("OpenAPI_acs_info_rm_convertToJSON() failed [acs_url]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "acsUrl", acs_info_rm->acs_url) == NULL) {
+ ogs_error("OpenAPI_acs_info_rm_convertToJSON() failed [acs_url]");
+ goto end;
+ }
}
if (acs_info_rm->acs_ipv4_addr) {
- if (cJSON_AddStringToObject(item, "acsIpv4Addr", acs_info_rm->acs_ipv4_addr) == NULL) {
- ogs_error("OpenAPI_acs_info_rm_convertToJSON() failed [acs_ipv4_addr]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "acsIpv4Addr", acs_info_rm->acs_ipv4_addr) == NULL) {
+ ogs_error("OpenAPI_acs_info_rm_convertToJSON() failed [acs_ipv4_addr]");
+ goto end;
+ }
}
if (acs_info_rm->acs_ipv6_addr) {
- if (cJSON_AddStringToObject(item, "acsIpv6Addr", acs_info_rm->acs_ipv6_addr) == NULL) {
- ogs_error("OpenAPI_acs_info_rm_convertToJSON() failed [acs_ipv6_addr]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "acsIpv6Addr", acs_info_rm->acs_ipv6_addr) == NULL) {
+ ogs_error("OpenAPI_acs_info_rm_convertToJSON() failed [acs_ipv6_addr]");
+ goto end;
+ }
}
end:
@@ -73,36 +73,36 @@ OpenAPI_acs_info_rm_t *OpenAPI_acs_info_rm_parseFromJSON(cJSON *acs_info_rmJSON)
OpenAPI_acs_info_rm_t *acs_info_rm_local_var = NULL;
cJSON *acs_url = cJSON_GetObjectItemCaseSensitive(acs_info_rmJSON, "acsUrl");
- if (acs_url) {
- if (!cJSON_IsString(acs_url)) {
- ogs_error("OpenAPI_acs_info_rm_parseFromJSON() failed [acs_url]");
- goto end;
- }
+ if (acs_url) {
+ if (!cJSON_IsString(acs_url)) {
+ ogs_error("OpenAPI_acs_info_rm_parseFromJSON() failed [acs_url]");
+ goto end;
+ }
}
cJSON *acs_ipv4_addr = cJSON_GetObjectItemCaseSensitive(acs_info_rmJSON, "acsIpv4Addr");
- if (acs_ipv4_addr) {
- if (!cJSON_IsString(acs_ipv4_addr)) {
- ogs_error("OpenAPI_acs_info_rm_parseFromJSON() failed [acs_ipv4_addr]");
- goto end;
- }
+ if (acs_ipv4_addr) {
+ if (!cJSON_IsString(acs_ipv4_addr)) {
+ ogs_error("OpenAPI_acs_info_rm_parseFromJSON() failed [acs_ipv4_addr]");
+ goto end;
+ }
}
cJSON *acs_ipv6_addr = cJSON_GetObjectItemCaseSensitive(acs_info_rmJSON, "acsIpv6Addr");
- if (acs_ipv6_addr) {
- if (!cJSON_IsString(acs_ipv6_addr)) {
- ogs_error("OpenAPI_acs_info_rm_parseFromJSON() failed [acs_ipv6_addr]");
- goto end;
- }
+ if (acs_ipv6_addr) {
+ if (!cJSON_IsString(acs_ipv6_addr)) {
+ ogs_error("OpenAPI_acs_info_rm_parseFromJSON() failed [acs_ipv6_addr]");
+ goto end;
+ }
}
acs_info_rm_local_var = OpenAPI_acs_info_rm_create (
acs_url ? ogs_strdup_or_assert(acs_url->valuestring) : NULL,
acs_ipv4_addr ? ogs_strdup_or_assert(acs_ipv4_addr->valuestring) : NULL,
acs_ipv6_addr ? ogs_strdup_or_assert(acs_ipv6_addr->valuestring) : NULL
- );
+ );
return acs_info_rm_local_var;
end:
diff --git a/lib/sbi/openapi/model/acs_info_rm.h b/lib/sbi/openapi/model/acs_info_rm.h
index faee3c4a5..85ae7af94 100644
--- a/lib/sbi/openapi/model/acs_info_rm.h
+++ b/lib/sbi/openapi/model/acs_info_rm.h
@@ -1,7 +1,7 @@
/*
* acs_info_rm.h
*
- *
+ *
*/
#ifndef _OpenAPI_acs_info_rm_H_
@@ -30,7 +30,7 @@ OpenAPI_acs_info_rm_t *OpenAPI_acs_info_rm_create(
char *acs_url,
char *acs_ipv4_addr,
char *acs_ipv6_addr
- );
+);
void OpenAPI_acs_info_rm_free(OpenAPI_acs_info_rm_t *acs_info_rm);
OpenAPI_acs_info_rm_t *OpenAPI_acs_info_rm_parseFromJSON(cJSON *acs_info_rmJSON);
cJSON *OpenAPI_acs_info_rm_convertToJSON(OpenAPI_acs_info_rm_t *acs_info_rm);
diff --git a/lib/sbi/openapi/model/additional_access_info.c b/lib/sbi/openapi/model/additional_access_info.c
index 79aa48966..2b9a2b918 100644
--- a/lib/sbi/openapi/model/additional_access_info.c
+++ b/lib/sbi/openapi/model/additional_access_info.c
@@ -7,7 +7,7 @@
OpenAPI_additional_access_info_t *OpenAPI_additional_access_info_create(
OpenAPI_access_type_e access_type,
OpenAPI_rat_type_e rat_type
- )
+)
{
OpenAPI_additional_access_info_t *additional_access_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_additional_access_info_t));
if (!additional_access_info_local_var) {
@@ -44,10 +44,10 @@ cJSON *OpenAPI_additional_access_info_convertToJSON(OpenAPI_additional_access_in
}
if (additional_access_info->rat_type) {
- if (cJSON_AddStringToObject(item, "ratType", OpenAPI_rat_type_ToString(additional_access_info->rat_type)) == NULL) {
- ogs_error("OpenAPI_additional_access_info_convertToJSON() failed [rat_type]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "ratType", OpenAPI_rat_type_ToString(additional_access_info->rat_type)) == NULL) {
+ ogs_error("OpenAPI_additional_access_info_convertToJSON() failed [rat_type]");
+ goto end;
+ }
}
end:
@@ -64,7 +64,7 @@ OpenAPI_additional_access_info_t *OpenAPI_additional_access_info_parseFromJSON(c
}
OpenAPI_access_type_e access_typeVariable;
-
+
if (!cJSON_IsString(access_type)) {
ogs_error("OpenAPI_additional_access_info_parseFromJSON() failed [access_type]");
goto end;
@@ -74,18 +74,18 @@ OpenAPI_additional_access_info_t *OpenAPI_additional_access_info_parseFromJSON(c
cJSON *rat_type = cJSON_GetObjectItemCaseSensitive(additional_access_infoJSON, "ratType");
OpenAPI_rat_type_e rat_typeVariable;
- if (rat_type) {
- if (!cJSON_IsString(rat_type)) {
- ogs_error("OpenAPI_additional_access_info_parseFromJSON() failed [rat_type]");
- goto end;
- }
- rat_typeVariable = OpenAPI_rat_type_FromString(rat_type->valuestring);
+ if (rat_type) {
+ if (!cJSON_IsString(rat_type)) {
+ ogs_error("OpenAPI_additional_access_info_parseFromJSON() failed [rat_type]");
+ goto end;
+ }
+ rat_typeVariable = OpenAPI_rat_type_FromString(rat_type->valuestring);
}
additional_access_info_local_var = OpenAPI_additional_access_info_create (
access_typeVariable,
rat_type ? rat_typeVariable : 0
- );
+ );
return additional_access_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/additional_access_info.h b/lib/sbi/openapi/model/additional_access_info.h
index 7bc2610d4..582567f7d 100644
--- a/lib/sbi/openapi/model/additional_access_info.h
+++ b/lib/sbi/openapi/model/additional_access_info.h
@@ -1,7 +1,7 @@
/*
* additional_access_info.h
*
- *
+ *
*/
#ifndef _OpenAPI_additional_access_info_H_
@@ -28,7 +28,7 @@ typedef struct OpenAPI_additional_access_info_s {
OpenAPI_additional_access_info_t *OpenAPI_additional_access_info_create(
OpenAPI_access_type_e access_type,
OpenAPI_rat_type_e rat_type
- );
+);
void OpenAPI_additional_access_info_free(OpenAPI_additional_access_info_t *additional_access_info);
OpenAPI_additional_access_info_t *OpenAPI_additional_access_info_parseFromJSON(cJSON *additional_access_infoJSON);
cJSON *OpenAPI_additional_access_info_convertToJSON(OpenAPI_additional_access_info_t *additional_access_info);
diff --git a/lib/sbi/openapi/model/additional_qos_flow_info.h b/lib/sbi/openapi/model/additional_qos_flow_info.h
index 86c10ae9e..cc22aec76 100644
--- a/lib/sbi/openapi/model/additional_qos_flow_info.h
+++ b/lib/sbi/openapi/model/additional_qos_flow_info.h
@@ -1,7 +1,7 @@
/*
* additional_qos_flow_info.h
*
- *
+ *
*/
#ifndef _OpenAPI_additional_qos_flow_info_H_
diff --git a/lib/sbi/openapi/model/additional_snssai_data.c b/lib/sbi/openapi/model/additional_snssai_data.c
index 010287222..1c0cb1fd5 100644
--- a/lib/sbi/openapi/model/additional_snssai_data.c
+++ b/lib/sbi/openapi/model/additional_snssai_data.c
@@ -6,7 +6,7 @@
OpenAPI_additional_snssai_data_t *OpenAPI_additional_snssai_data_create(
int required_authn_authz
- )
+)
{
OpenAPI_additional_snssai_data_t *additional_snssai_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_additional_snssai_data_t));
if (!additional_snssai_data_local_var) {
@@ -37,10 +37,10 @@ cJSON *OpenAPI_additional_snssai_data_convertToJSON(OpenAPI_additional_snssai_da
item = cJSON_CreateObject();
if (additional_snssai_data->required_authn_authz) {
- if (cJSON_AddBoolToObject(item, "requiredAuthnAuthz", additional_snssai_data->required_authn_authz) == NULL) {
- ogs_error("OpenAPI_additional_snssai_data_convertToJSON() failed [required_authn_authz]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "requiredAuthnAuthz", additional_snssai_data->required_authn_authz) == NULL) {
+ ogs_error("OpenAPI_additional_snssai_data_convertToJSON() failed [required_authn_authz]");
+ goto end;
+ }
}
end:
@@ -52,16 +52,16 @@ OpenAPI_additional_snssai_data_t *OpenAPI_additional_snssai_data_parseFromJSON(c
OpenAPI_additional_snssai_data_t *additional_snssai_data_local_var = NULL;
cJSON *required_authn_authz = cJSON_GetObjectItemCaseSensitive(additional_snssai_dataJSON, "requiredAuthnAuthz");
- if (required_authn_authz) {
- if (!cJSON_IsBool(required_authn_authz)) {
- ogs_error("OpenAPI_additional_snssai_data_parseFromJSON() failed [required_authn_authz]");
- goto end;
- }
+ if (required_authn_authz) {
+ if (!cJSON_IsBool(required_authn_authz)) {
+ ogs_error("OpenAPI_additional_snssai_data_parseFromJSON() failed [required_authn_authz]");
+ goto end;
+ }
}
additional_snssai_data_local_var = OpenAPI_additional_snssai_data_create (
required_authn_authz ? required_authn_authz->valueint : 0
- );
+ );
return additional_snssai_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/additional_snssai_data.h b/lib/sbi/openapi/model/additional_snssai_data.h
index 77f31a688..3f4fd5bb7 100644
--- a/lib/sbi/openapi/model/additional_snssai_data.h
+++ b/lib/sbi/openapi/model/additional_snssai_data.h
@@ -1,7 +1,7 @@
/*
* additional_snssai_data.h
*
- *
+ *
*/
#ifndef _OpenAPI_additional_snssai_data_H_
@@ -24,7 +24,7 @@ typedef struct OpenAPI_additional_snssai_data_s {
OpenAPI_additional_snssai_data_t *OpenAPI_additional_snssai_data_create(
int required_authn_authz
- );
+);
void OpenAPI_additional_snssai_data_free(OpenAPI_additional_snssai_data_t *additional_snssai_data);
OpenAPI_additional_snssai_data_t *OpenAPI_additional_snssai_data_parseFromJSON(cJSON *additional_snssai_dataJSON);
cJSON *OpenAPI_additional_snssai_data_convertToJSON(OpenAPI_additional_snssai_data_t *additional_snssai_data);
diff --git a/lib/sbi/openapi/model/af_event.c b/lib/sbi/openapi/model/af_event.c
index e4343daea..124111e8d 100644
--- a/lib/sbi/openapi/model/af_event.c
+++ b/lib/sbi/openapi/model/af_event.c
@@ -4,82 +4,27 @@
#include
#include "af_event.h"
-OpenAPI_af_event_t *OpenAPI_af_event_create(
- )
+char* OpenAPI_af_event_ToString(OpenAPI_af_event_e af_event)
{
- OpenAPI_af_event_t *af_event_local_var = OpenAPI_malloc(sizeof(OpenAPI_af_event_t));
- if (!af_event_local_var) {
- return NULL;
- }
-
- return af_event_local_var;
+ const char *af_eventArray[] = { "NULL", "SVC_EXPERIENCE", "UE_MOBILITY", "UE_COMM", "EXCEPTIONS" };
+ size_t sizeofArray = sizeof(af_eventArray) / sizeof(af_eventArray[0]);
+ if (af_event < sizeofArray)
+ return (char *)af_eventArray[af_event];
+ else
+ return (char *)"Unknown";
}
-void OpenAPI_af_event_free(OpenAPI_af_event_t *af_event)
+OpenAPI_af_event_e OpenAPI_af_event_FromString(char* af_event)
{
- if (NULL == af_event) {
- return;
+ int stringToReturn = 0;
+ const char *af_eventArray[] = { "NULL", "SVC_EXPERIENCE", "UE_MOBILITY", "UE_COMM", "EXCEPTIONS" };
+ size_t sizeofArray = sizeof(af_eventArray) / sizeof(af_eventArray[0]);
+ while (stringToReturn < sizeofArray) {
+ if (strcmp(af_event, af_eventArray[stringToReturn]) == 0) {
+ return stringToReturn;
+ }
+ stringToReturn++;
}
- OpenAPI_lnode_t *node;
- ogs_free(af_event);
-}
-
-cJSON *OpenAPI_af_event_convertToJSON(OpenAPI_af_event_t *af_event)
-{
- cJSON *item = NULL;
-
- if (af_event == NULL) {
- ogs_error("OpenAPI_af_event_convertToJSON() failed [AfEvent]");
- return NULL;
- }
-
- item = cJSON_CreateObject();
-end:
- return item;
-}
-
-OpenAPI_af_event_t *OpenAPI_af_event_parseFromJSON(cJSON *af_eventJSON)
-{
- OpenAPI_af_event_t *af_event_local_var = NULL;
- af_event_local_var = OpenAPI_af_event_create (
- );
-
- return af_event_local_var;
-end:
- return NULL;
-}
-
-OpenAPI_af_event_t *OpenAPI_af_event_copy(OpenAPI_af_event_t *dst, OpenAPI_af_event_t *src)
-{
- cJSON *item = NULL;
- char *content = NULL;
-
- ogs_assert(src);
- item = OpenAPI_af_event_convertToJSON(src);
- if (!item) {
- ogs_error("OpenAPI_af_event_convertToJSON() failed");
- return NULL;
- }
-
- content = cJSON_Print(item);
- cJSON_Delete(item);
-
- if (!content) {
- ogs_error("cJSON_Print() failed");
- return NULL;
- }
-
- item = cJSON_Parse(content);
- ogs_free(content);
- if (!item) {
- ogs_error("cJSON_Parse() failed");
- return NULL;
- }
-
- OpenAPI_af_event_free(dst);
- dst = OpenAPI_af_event_parseFromJSON(item);
- cJSON_Delete(item);
-
- return dst;
+ return 0;
}
diff --git a/lib/sbi/openapi/model/af_event.h b/lib/sbi/openapi/model/af_event.h
index 9b89b632d..2279ba1ea 100644
--- a/lib/sbi/openapi/model/af_event.h
+++ b/lib/sbi/openapi/model/af_event.h
@@ -1,7 +1,7 @@
/*
* af_event.h
*
- *
+ *
*/
#ifndef _OpenAPI_af_event_H_
@@ -17,16 +17,11 @@
extern "C" {
#endif
-typedef struct OpenAPI_af_event_s OpenAPI_af_event_t;
-typedef struct OpenAPI_af_event_s {
-} OpenAPI_af_event_t;
+typedef enum { OpenAPI_af_event_NULL = 0, OpenAPI_af_event_SVC_EXPERIENCE, OpenAPI_af_event_UE_MOBILITY, OpenAPI_af_event_UE_COMM, OpenAPI_af_event_EXCEPTIONS } OpenAPI_af_event_e;
-OpenAPI_af_event_t *OpenAPI_af_event_create(
- );
-void OpenAPI_af_event_free(OpenAPI_af_event_t *af_event);
-OpenAPI_af_event_t *OpenAPI_af_event_parseFromJSON(cJSON *af_eventJSON);
-cJSON *OpenAPI_af_event_convertToJSON(OpenAPI_af_event_t *af_event);
-OpenAPI_af_event_t *OpenAPI_af_event_copy(OpenAPI_af_event_t *dst, OpenAPI_af_event_t *src);
+char* OpenAPI_af_event_ToString(OpenAPI_af_event_e af_event);
+
+OpenAPI_af_event_e OpenAPI_af_event_FromString(char* af_event);
#ifdef __cplusplus
}
diff --git a/lib/sbi/openapi/model/af_event_exposure_data.c b/lib/sbi/openapi/model/af_event_exposure_data.c
index e310fda95..fa6730fda 100644
--- a/lib/sbi/openapi/model/af_event_exposure_data.c
+++ b/lib/sbi/openapi/model/af_event_exposure_data.c
@@ -8,7 +8,7 @@ OpenAPI_af_event_exposure_data_t *OpenAPI_af_event_exposure_data_create(
OpenAPI_list_t *af_events,
OpenAPI_list_t *af_ids,
OpenAPI_list_t *app_ids
- )
+)
{
OpenAPI_af_event_exposure_data_t *af_event_exposure_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_af_event_exposure_data_t));
if (!af_event_exposure_data_local_var) {
@@ -27,9 +27,6 @@ void OpenAPI_af_event_exposure_data_free(OpenAPI_af_event_exposure_data_t *af_ev
return;
}
OpenAPI_lnode_t *node;
- OpenAPI_list_for_each(af_event_exposure_data->af_events, node) {
- OpenAPI_af_event_free(node->data);
- }
OpenAPI_list_free(af_event_exposure_data->af_events);
OpenAPI_list_for_each(af_event_exposure_data->af_ids, node) {
ogs_free(node->data);
@@ -52,54 +49,49 @@ cJSON *OpenAPI_af_event_exposure_data_convertToJSON(OpenAPI_af_event_exposure_da
}
item = cJSON_CreateObject();
- cJSON *af_eventsList = cJSON_AddArrayToObject(item, "afEvents");
- if (af_eventsList == NULL) {
+ cJSON *af_events = cJSON_AddArrayToObject(item, "afEvents");
+ if (af_events == NULL) {
ogs_error("OpenAPI_af_event_exposure_data_convertToJSON() failed [af_events]");
goto end;
}
-
OpenAPI_lnode_t *af_events_node;
- if (af_event_exposure_data->af_events) {
- OpenAPI_list_for_each(af_event_exposure_data->af_events, af_events_node) {
- cJSON *itemLocal = OpenAPI_af_event_convertToJSON(af_events_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_af_event_exposure_data_convertToJSON() failed [af_events]");
- goto end;
- }
- cJSON_AddItemToArray(af_eventsList, itemLocal);
+ OpenAPI_list_for_each(af_event_exposure_data->af_events, af_events_node) {
+ if (cJSON_AddStringToObject(af_events, "", OpenAPI_af_event_ToString((intptr_t)af_events_node->data)) == NULL) {
+ ogs_error("OpenAPI_af_event_exposure_data_convertToJSON() failed [af_events]");
+ goto end;
}
}
if (af_event_exposure_data->af_ids) {
- cJSON *af_ids = cJSON_AddArrayToObject(item, "afIds");
- if (af_ids == NULL) {
- ogs_error("OpenAPI_af_event_exposure_data_convertToJSON() failed [af_ids]");
- goto end;
- }
+ cJSON *af_ids = cJSON_AddArrayToObject(item, "afIds");
+ if (af_ids == NULL) {
+ ogs_error("OpenAPI_af_event_exposure_data_convertToJSON() failed [af_ids]");
+ goto end;
+ }
- OpenAPI_lnode_t *af_ids_node;
- OpenAPI_list_for_each(af_event_exposure_data->af_ids, af_ids_node) {
- if (cJSON_AddStringToObject(af_ids, "", (char*)af_ids_node->data) == NULL) {
- ogs_error("OpenAPI_af_event_exposure_data_convertToJSON() failed [af_ids]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *af_ids_node;
+ OpenAPI_list_for_each(af_event_exposure_data->af_ids, af_ids_node) {
+ if (cJSON_AddStringToObject(af_ids, "", (char*)af_ids_node->data) == NULL) {
+ ogs_error("OpenAPI_af_event_exposure_data_convertToJSON() failed [af_ids]");
+ goto end;
+ }
+ }
}
if (af_event_exposure_data->app_ids) {
- cJSON *app_ids = cJSON_AddArrayToObject(item, "appIds");
- if (app_ids == NULL) {
- ogs_error("OpenAPI_af_event_exposure_data_convertToJSON() failed [app_ids]");
- goto end;
- }
+ cJSON *app_ids = cJSON_AddArrayToObject(item, "appIds");
+ if (app_ids == NULL) {
+ ogs_error("OpenAPI_af_event_exposure_data_convertToJSON() failed [app_ids]");
+ goto end;
+ }
- OpenAPI_lnode_t *app_ids_node;
- OpenAPI_list_for_each(af_event_exposure_data->app_ids, app_ids_node) {
- if (cJSON_AddStringToObject(app_ids, "", (char*)app_ids_node->data) == NULL) {
- ogs_error("OpenAPI_af_event_exposure_data_convertToJSON() failed [app_ids]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *app_ids_node;
+ OpenAPI_list_for_each(af_event_exposure_data->app_ids, app_ids_node) {
+ if (cJSON_AddStringToObject(app_ids, "", (char*)app_ids_node->data) == NULL) {
+ ogs_error("OpenAPI_af_event_exposure_data_convertToJSON() failed [app_ids]");
+ goto end;
+ }
+ }
}
end:
@@ -116,7 +108,7 @@ OpenAPI_af_event_exposure_data_t *OpenAPI_af_event_exposure_data_parseFromJSON(c
}
OpenAPI_list_t *af_eventsList;
-
+
cJSON *af_events_local_nonprimitive;
if (!cJSON_IsArray(af_events)) {
ogs_error("OpenAPI_af_event_exposure_data_parseFromJSON() failed [af_events]");
@@ -126,60 +118,59 @@ OpenAPI_af_event_exposure_data_t *OpenAPI_af_event_exposure_data_parseFromJSON(c
af_eventsList = OpenAPI_list_create();
cJSON_ArrayForEach(af_events_local_nonprimitive, af_events ) {
- if (!cJSON_IsObject(af_events_local_nonprimitive)) {
+ if (!cJSON_IsString(af_events_local_nonprimitive)){
ogs_error("OpenAPI_af_event_exposure_data_parseFromJSON() failed [af_events]");
goto end;
}
- OpenAPI_af_event_t *af_eventsItem = OpenAPI_af_event_parseFromJSON(af_events_local_nonprimitive);
- OpenAPI_list_add(af_eventsList, af_eventsItem);
+ OpenAPI_list_add(af_eventsList, (void *)OpenAPI_af_event_FromString(af_events_local_nonprimitive->valuestring));
}
cJSON *af_ids = cJSON_GetObjectItemCaseSensitive(af_event_exposure_dataJSON, "afIds");
OpenAPI_list_t *af_idsList;
- if (af_ids) {
- cJSON *af_ids_local;
- if (!cJSON_IsArray(af_ids)) {
- ogs_error("OpenAPI_af_event_exposure_data_parseFromJSON() failed [af_ids]");
- goto end;
- }
- af_idsList = OpenAPI_list_create();
+ if (af_ids) {
+ cJSON *af_ids_local;
+ if (!cJSON_IsArray(af_ids)) {
+ ogs_error("OpenAPI_af_event_exposure_data_parseFromJSON() failed [af_ids]");
+ goto end;
+ }
+ af_idsList = OpenAPI_list_create();
- cJSON_ArrayForEach(af_ids_local, af_ids) {
- if (!cJSON_IsString(af_ids_local)) {
- ogs_error("OpenAPI_af_event_exposure_data_parseFromJSON() failed [af_ids]");
- goto end;
- }
- OpenAPI_list_add(af_idsList, ogs_strdup_or_assert(af_ids_local->valuestring));
- }
+ cJSON_ArrayForEach(af_ids_local, af_ids) {
+ if (!cJSON_IsString(af_ids_local)) {
+ ogs_error("OpenAPI_af_event_exposure_data_parseFromJSON() failed [af_ids]");
+ goto end;
+ }
+ OpenAPI_list_add(af_idsList , ogs_strdup_or_assert(af_ids_local->valuestring));
+ }
}
cJSON *app_ids = cJSON_GetObjectItemCaseSensitive(af_event_exposure_dataJSON, "appIds");
OpenAPI_list_t *app_idsList;
- if (app_ids) {
- cJSON *app_ids_local;
- if (!cJSON_IsArray(app_ids)) {
- ogs_error("OpenAPI_af_event_exposure_data_parseFromJSON() failed [app_ids]");
- goto end;
- }
- app_idsList = OpenAPI_list_create();
+ if (app_ids) {
+ cJSON *app_ids_local;
+ if (!cJSON_IsArray(app_ids)) {
+ ogs_error("OpenAPI_af_event_exposure_data_parseFromJSON() failed [app_ids]");
+ goto end;
+ }
+ app_idsList = OpenAPI_list_create();
- cJSON_ArrayForEach(app_ids_local, app_ids) {
- if (!cJSON_IsString(app_ids_local)) {
- ogs_error("OpenAPI_af_event_exposure_data_parseFromJSON() failed [app_ids]");
- goto end;
- }
- OpenAPI_list_add(app_idsList, ogs_strdup_or_assert(app_ids_local->valuestring));
- }
+ cJSON_ArrayForEach(app_ids_local, app_ids) {
+ if (!cJSON_IsString(app_ids_local)) {
+ ogs_error("OpenAPI_af_event_exposure_data_parseFromJSON() failed [app_ids]");
+ goto end;
+ }
+ OpenAPI_list_add(app_idsList , ogs_strdup_or_assert(app_ids_local->valuestring));
+ }
}
af_event_exposure_data_local_var = OpenAPI_af_event_exposure_data_create (
af_eventsList,
af_ids ? af_idsList : NULL,
app_ids ? app_idsList : NULL
- );
+ );
return af_event_exposure_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/af_event_exposure_data.h b/lib/sbi/openapi/model/af_event_exposure_data.h
index 1de8e2273..05a4612e4 100644
--- a/lib/sbi/openapi/model/af_event_exposure_data.h
+++ b/lib/sbi/openapi/model/af_event_exposure_data.h
@@ -29,7 +29,7 @@ OpenAPI_af_event_exposure_data_t *OpenAPI_af_event_exposure_data_create(
OpenAPI_list_t *af_events,
OpenAPI_list_t *af_ids,
OpenAPI_list_t *app_ids
- );
+);
void OpenAPI_af_event_exposure_data_free(OpenAPI_af_event_exposure_data_t *af_event_exposure_data);
OpenAPI_af_event_exposure_data_t *OpenAPI_af_event_exposure_data_parseFromJSON(cJSON *af_event_exposure_dataJSON);
cJSON *OpenAPI_af_event_exposure_data_convertToJSON(OpenAPI_af_event_exposure_data_t *af_event_exposure_data);
diff --git a/lib/sbi/openapi/model/af_event_notification.c b/lib/sbi/openapi/model/af_event_notification.c
index 73c1c9ac8..c8c5936c0 100644
--- a/lib/sbi/openapi/model/af_event_notification.c
+++ b/lib/sbi/openapi/model/af_event_notification.c
@@ -5,9 +5,9 @@
#include "af_event_notification.h"
OpenAPI_af_event_notification_t *OpenAPI_af_event_notification_create(
- OpenAPI_af_event_t *event,
+ OpenAPI_af_event_e event,
OpenAPI_list_t *flows
- )
+)
{
OpenAPI_af_event_notification_t *af_event_notification_local_var = OpenAPI_malloc(sizeof(OpenAPI_af_event_notification_t));
if (!af_event_notification_local_var) {
@@ -25,7 +25,6 @@ void OpenAPI_af_event_notification_free(OpenAPI_af_event_notification_t *af_even
return;
}
OpenAPI_lnode_t *node;
- OpenAPI_af_event_free(af_event_notification->event);
OpenAPI_list_for_each(af_event_notification->flows, node) {
OpenAPI_flows_free(node->data);
}
@@ -43,36 +42,30 @@ cJSON *OpenAPI_af_event_notification_convertToJSON(OpenAPI_af_event_notification
}
item = cJSON_CreateObject();
- cJSON *event_local_JSON = OpenAPI_af_event_convertToJSON(af_event_notification->event);
- if (event_local_JSON == NULL) {
- ogs_error("OpenAPI_af_event_notification_convertToJSON() failed [event]");
- goto end;
- }
- cJSON_AddItemToObject(item, "event", event_local_JSON);
- if (item->child == NULL) {
+ if (cJSON_AddStringToObject(item, "event", OpenAPI_af_event_ToString(af_event_notification->event)) == NULL) {
ogs_error("OpenAPI_af_event_notification_convertToJSON() failed [event]");
goto end;
}
if (af_event_notification->flows) {
- cJSON *flowsList = cJSON_AddArrayToObject(item, "flows");
- if (flowsList == NULL) {
- ogs_error("OpenAPI_af_event_notification_convertToJSON() failed [flows]");
- goto end;
- }
+ cJSON *flowsList = cJSON_AddArrayToObject(item, "flows");
+ if (flowsList == NULL) {
+ ogs_error("OpenAPI_af_event_notification_convertToJSON() failed [flows]");
+ goto end;
+ }
- OpenAPI_lnode_t *flows_node;
- if (af_event_notification->flows) {
- OpenAPI_list_for_each(af_event_notification->flows, flows_node) {
- cJSON *itemLocal = OpenAPI_flows_convertToJSON(flows_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_af_event_notification_convertToJSON() failed [flows]");
- goto end;
- }
- cJSON_AddItemToArray(flowsList, itemLocal);
+ OpenAPI_lnode_t *flows_node;
+ if (af_event_notification->flows) {
+ OpenAPI_list_for_each(af_event_notification->flows, flows_node) {
+ cJSON *itemLocal = OpenAPI_flows_convertToJSON(flows_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_af_event_notification_convertToJSON() failed [flows]");
+ goto end;
}
+ cJSON_AddItemToArray(flowsList, itemLocal);
}
}
+ }
end:
return item;
@@ -87,37 +80,41 @@ OpenAPI_af_event_notification_t *OpenAPI_af_event_notification_parseFromJSON(cJS
goto end;
}
- OpenAPI_af_event_t *event_local_nonprim = NULL;
-
- event_local_nonprim = OpenAPI_af_event_parseFromJSON(event);
+ OpenAPI_af_event_e eventVariable;
+
+ if (!cJSON_IsString(event)) {
+ ogs_error("OpenAPI_af_event_notification_parseFromJSON() failed [event]");
+ goto end;
+ }
+ eventVariable = OpenAPI_af_event_FromString(event->valuestring);
cJSON *flows = cJSON_GetObjectItemCaseSensitive(af_event_notificationJSON, "flows");
OpenAPI_list_t *flowsList;
- if (flows) {
- cJSON *flows_local_nonprimitive;
- if (!cJSON_IsArray(flows)) {
+ if (flows) {
+ cJSON *flows_local_nonprimitive;
+ if (!cJSON_IsArray(flows)){
+ ogs_error("OpenAPI_af_event_notification_parseFromJSON() failed [flows]");
+ goto end;
+ }
+
+ flowsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(flows_local_nonprimitive, flows ) {
+ if (!cJSON_IsObject(flows_local_nonprimitive)) {
ogs_error("OpenAPI_af_event_notification_parseFromJSON() failed [flows]");
goto end;
}
+ OpenAPI_flows_t *flowsItem = OpenAPI_flows_parseFromJSON(flows_local_nonprimitive);
- flowsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(flows_local_nonprimitive, flows ) {
- if (!cJSON_IsObject(flows_local_nonprimitive)) {
- ogs_error("OpenAPI_af_event_notification_parseFromJSON() failed [flows]");
- goto end;
- }
- OpenAPI_flows_t *flowsItem = OpenAPI_flows_parseFromJSON(flows_local_nonprimitive);
-
- OpenAPI_list_add(flowsList, flowsItem);
- }
+ OpenAPI_list_add(flowsList, flowsItem);
+ }
}
af_event_notification_local_var = OpenAPI_af_event_notification_create (
- event_local_nonprim,
+ eventVariable,
flows ? flowsList : NULL
- );
+ );
return af_event_notification_local_var;
end:
diff --git a/lib/sbi/openapi/model/af_event_notification.h b/lib/sbi/openapi/model/af_event_notification.h
index 766a7b2a1..0b2de0cc5 100644
--- a/lib/sbi/openapi/model/af_event_notification.h
+++ b/lib/sbi/openapi/model/af_event_notification.h
@@ -21,14 +21,14 @@ extern "C" {
typedef struct OpenAPI_af_event_notification_s OpenAPI_af_event_notification_t;
typedef struct OpenAPI_af_event_notification_s {
- struct OpenAPI_af_event_s *event;
+ OpenAPI_af_event_e event;
OpenAPI_list_t *flows;
} OpenAPI_af_event_notification_t;
OpenAPI_af_event_notification_t *OpenAPI_af_event_notification_create(
- OpenAPI_af_event_t *event,
+ OpenAPI_af_event_e event,
OpenAPI_list_t *flows
- );
+);
void OpenAPI_af_event_notification_free(OpenAPI_af_event_notification_t *af_event_notification);
OpenAPI_af_event_notification_t *OpenAPI_af_event_notification_parseFromJSON(cJSON *af_event_notificationJSON);
cJSON *OpenAPI_af_event_notification_convertToJSON(OpenAPI_af_event_notification_t *af_event_notification);
diff --git a/lib/sbi/openapi/model/af_event_subscription.c b/lib/sbi/openapi/model/af_event_subscription.c
index ed0a5fad5..c727b92cb 100644
--- a/lib/sbi/openapi/model/af_event_subscription.c
+++ b/lib/sbi/openapi/model/af_event_subscription.c
@@ -5,11 +5,11 @@
#include "af_event_subscription.h"
OpenAPI_af_event_subscription_t *OpenAPI_af_event_subscription_create(
- OpenAPI_af_event_t *event,
+ OpenAPI_af_event_e event,
OpenAPI_af_notif_method_e notif_method,
int rep_period,
int wait_time
- )
+)
{
OpenAPI_af_event_subscription_t *af_event_subscription_local_var = OpenAPI_malloc(sizeof(OpenAPI_af_event_subscription_t));
if (!af_event_subscription_local_var) {
@@ -29,7 +29,6 @@ void OpenAPI_af_event_subscription_free(OpenAPI_af_event_subscription_t *af_even
return;
}
OpenAPI_lnode_t *node;
- OpenAPI_af_event_free(af_event_subscription->event);
ogs_free(af_event_subscription);
}
@@ -43,36 +42,30 @@ cJSON *OpenAPI_af_event_subscription_convertToJSON(OpenAPI_af_event_subscription
}
item = cJSON_CreateObject();
- cJSON *event_local_JSON = OpenAPI_af_event_convertToJSON(af_event_subscription->event);
- if (event_local_JSON == NULL) {
- ogs_error("OpenAPI_af_event_subscription_convertToJSON() failed [event]");
- goto end;
- }
- cJSON_AddItemToObject(item, "event", event_local_JSON);
- if (item->child == NULL) {
+ if (cJSON_AddStringToObject(item, "event", OpenAPI_af_event_ToString(af_event_subscription->event)) == NULL) {
ogs_error("OpenAPI_af_event_subscription_convertToJSON() failed [event]");
goto end;
}
if (af_event_subscription->notif_method) {
- if (cJSON_AddStringToObject(item, "notifMethod", OpenAPI_af_notif_method_ToString(af_event_subscription->notif_method)) == NULL) {
- ogs_error("OpenAPI_af_event_subscription_convertToJSON() failed [notif_method]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "notifMethod", OpenAPI_af_notif_method_ToString(af_event_subscription->notif_method)) == NULL) {
+ ogs_error("OpenAPI_af_event_subscription_convertToJSON() failed [notif_method]");
+ goto end;
+ }
}
if (af_event_subscription->rep_period) {
- if (cJSON_AddNumberToObject(item, "repPeriod", af_event_subscription->rep_period) == NULL) {
- ogs_error("OpenAPI_af_event_subscription_convertToJSON() failed [rep_period]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "repPeriod", af_event_subscription->rep_period) == NULL) {
+ ogs_error("OpenAPI_af_event_subscription_convertToJSON() failed [rep_period]");
+ goto end;
+ }
}
if (af_event_subscription->wait_time) {
- if (cJSON_AddNumberToObject(item, "waitTime", af_event_subscription->wait_time) == NULL) {
- ogs_error("OpenAPI_af_event_subscription_convertToJSON() failed [wait_time]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "waitTime", af_event_subscription->wait_time) == NULL) {
+ ogs_error("OpenAPI_af_event_subscription_convertToJSON() failed [wait_time]");
+ goto end;
+ }
}
end:
@@ -88,45 +81,49 @@ OpenAPI_af_event_subscription_t *OpenAPI_af_event_subscription_parseFromJSON(cJS
goto end;
}
- OpenAPI_af_event_t *event_local_nonprim = NULL;
-
- event_local_nonprim = OpenAPI_af_event_parseFromJSON(event);
+ OpenAPI_af_event_e eventVariable;
+
+ if (!cJSON_IsString(event)) {
+ ogs_error("OpenAPI_af_event_subscription_parseFromJSON() failed [event]");
+ goto end;
+ }
+ eventVariable = OpenAPI_af_event_FromString(event->valuestring);
cJSON *notif_method = cJSON_GetObjectItemCaseSensitive(af_event_subscriptionJSON, "notifMethod");
OpenAPI_af_notif_method_e notif_methodVariable;
- if (notif_method) {
- if (!cJSON_IsString(notif_method)) {
- ogs_error("OpenAPI_af_event_subscription_parseFromJSON() failed [notif_method]");
- goto end;
- }
- notif_methodVariable = OpenAPI_af_notif_method_FromString(notif_method->valuestring);
+ if (notif_method) {
+ if (!cJSON_IsString(notif_method)) {
+ ogs_error("OpenAPI_af_event_subscription_parseFromJSON() failed [notif_method]");
+ goto end;
+ }
+ notif_methodVariable = OpenAPI_af_notif_method_FromString(notif_method->valuestring);
}
cJSON *rep_period = cJSON_GetObjectItemCaseSensitive(af_event_subscriptionJSON, "repPeriod");
- if (rep_period) {
- if (!cJSON_IsNumber(rep_period)) {
- ogs_error("OpenAPI_af_event_subscription_parseFromJSON() failed [rep_period]");
- goto end;
- }
+ if (rep_period) {
+ if (!cJSON_IsNumber(rep_period)) {
+ ogs_error("OpenAPI_af_event_subscription_parseFromJSON() failed [rep_period]");
+ goto end;
+ }
}
cJSON *wait_time = cJSON_GetObjectItemCaseSensitive(af_event_subscriptionJSON, "waitTime");
- if (wait_time) {
- if (!cJSON_IsNumber(wait_time)) {
- ogs_error("OpenAPI_af_event_subscription_parseFromJSON() failed [wait_time]");
- goto end;
- }
+ if (wait_time) {
+ if (!cJSON_IsNumber(wait_time)) {
+ ogs_error("OpenAPI_af_event_subscription_parseFromJSON() failed [wait_time]");
+ goto end;
+ }
}
af_event_subscription_local_var = OpenAPI_af_event_subscription_create (
- event_local_nonprim,
+ eventVariable,
notif_method ? notif_methodVariable : 0,
rep_period ? rep_period->valuedouble : 0,
wait_time ? wait_time->valuedouble : 0
- );
+ );
return af_event_subscription_local_var;
end:
diff --git a/lib/sbi/openapi/model/af_event_subscription.h b/lib/sbi/openapi/model/af_event_subscription.h
index 2ab857486..f750f4416 100644
--- a/lib/sbi/openapi/model/af_event_subscription.h
+++ b/lib/sbi/openapi/model/af_event_subscription.h
@@ -21,18 +21,18 @@ extern "C" {
typedef struct OpenAPI_af_event_subscription_s OpenAPI_af_event_subscription_t;
typedef struct OpenAPI_af_event_subscription_s {
- struct OpenAPI_af_event_s *event;
+ OpenAPI_af_event_e event;
OpenAPI_af_notif_method_e notif_method;
int rep_period;
int wait_time;
} OpenAPI_af_event_subscription_t;
OpenAPI_af_event_subscription_t *OpenAPI_af_event_subscription_create(
- OpenAPI_af_event_t *event,
+ OpenAPI_af_event_e event,
OpenAPI_af_notif_method_e notif_method,
int rep_period,
int wait_time
- );
+);
void OpenAPI_af_event_subscription_free(OpenAPI_af_event_subscription_t *af_event_subscription);
OpenAPI_af_event_subscription_t *OpenAPI_af_event_subscription_parseFromJSON(cJSON *af_event_subscriptionJSON);
cJSON *OpenAPI_af_event_subscription_convertToJSON(OpenAPI_af_event_subscription_t *af_event_subscription);
diff --git a/lib/sbi/openapi/model/af_external.c b/lib/sbi/openapi/model/af_external.c
index ccb86d193..30e17c0f9 100644
--- a/lib/sbi/openapi/model/af_external.c
+++ b/lib/sbi/openapi/model/af_external.c
@@ -9,7 +9,7 @@ OpenAPI_af_external_t *OpenAPI_af_external_create(
OpenAPI_list_t *allowed_geographic_area,
OpenAPI_privacy_check_related_action_e privacy_check_related_action,
OpenAPI_valid_time_period_t *valid_time_period
- )
+)
{
OpenAPI_af_external_t *af_external_local_var = OpenAPI_malloc(sizeof(OpenAPI_af_external_t));
if (!af_external_local_var) {
@@ -49,50 +49,50 @@ cJSON *OpenAPI_af_external_convertToJSON(OpenAPI_af_external_t *af_external)
item = cJSON_CreateObject();
if (af_external->af_id) {
- if (cJSON_AddStringToObject(item, "afId", af_external->af_id) == NULL) {
- ogs_error("OpenAPI_af_external_convertToJSON() failed [af_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "afId", af_external->af_id) == NULL) {
+ ogs_error("OpenAPI_af_external_convertToJSON() failed [af_id]");
+ goto end;
+ }
}
if (af_external->allowed_geographic_area) {
- cJSON *allowed_geographic_areaList = cJSON_AddArrayToObject(item, "allowedGeographicArea");
- if (allowed_geographic_areaList == NULL) {
- ogs_error("OpenAPI_af_external_convertToJSON() failed [allowed_geographic_area]");
- goto end;
- }
+ cJSON *allowed_geographic_areaList = cJSON_AddArrayToObject(item, "allowedGeographicArea");
+ if (allowed_geographic_areaList == NULL) {
+ ogs_error("OpenAPI_af_external_convertToJSON() failed [allowed_geographic_area]");
+ goto end;
+ }
- OpenAPI_lnode_t *allowed_geographic_area_node;
- if (af_external->allowed_geographic_area) {
- OpenAPI_list_for_each(af_external->allowed_geographic_area, allowed_geographic_area_node) {
- cJSON *itemLocal = OpenAPI_geographic_area_convertToJSON(allowed_geographic_area_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_af_external_convertToJSON() failed [allowed_geographic_area]");
- goto end;
- }
- cJSON_AddItemToArray(allowed_geographic_areaList, itemLocal);
+ OpenAPI_lnode_t *allowed_geographic_area_node;
+ if (af_external->allowed_geographic_area) {
+ OpenAPI_list_for_each(af_external->allowed_geographic_area, allowed_geographic_area_node) {
+ cJSON *itemLocal = OpenAPI_geographic_area_convertToJSON(allowed_geographic_area_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_af_external_convertToJSON() failed [allowed_geographic_area]");
+ goto end;
}
+ cJSON_AddItemToArray(allowed_geographic_areaList, itemLocal);
}
}
+ }
if (af_external->privacy_check_related_action) {
- if (cJSON_AddStringToObject(item, "privacyCheckRelatedAction", OpenAPI_privacy_check_related_action_ToString(af_external->privacy_check_related_action)) == NULL) {
- ogs_error("OpenAPI_af_external_convertToJSON() failed [privacy_check_related_action]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "privacyCheckRelatedAction", OpenAPI_privacy_check_related_action_ToString(af_external->privacy_check_related_action)) == NULL) {
+ ogs_error("OpenAPI_af_external_convertToJSON() failed [privacy_check_related_action]");
+ goto end;
+ }
}
if (af_external->valid_time_period) {
- cJSON *valid_time_period_local_JSON = OpenAPI_valid_time_period_convertToJSON(af_external->valid_time_period);
- if (valid_time_period_local_JSON == NULL) {
- ogs_error("OpenAPI_af_external_convertToJSON() failed [valid_time_period]");
- goto end;
- }
- cJSON_AddItemToObject(item, "validTimePeriod", valid_time_period_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_af_external_convertToJSON() failed [valid_time_period]");
- goto end;
- }
+ cJSON *valid_time_period_local_JSON = OpenAPI_valid_time_period_convertToJSON(af_external->valid_time_period);
+ if (valid_time_period_local_JSON == NULL) {
+ ogs_error("OpenAPI_af_external_convertToJSON() failed [valid_time_period]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "validTimePeriod", valid_time_period_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_af_external_convertToJSON() failed [valid_time_period]");
+ goto end;
+ }
}
end:
@@ -104,52 +104,52 @@ OpenAPI_af_external_t *OpenAPI_af_external_parseFromJSON(cJSON *af_externalJSON)
OpenAPI_af_external_t *af_external_local_var = NULL;
cJSON *af_id = cJSON_GetObjectItemCaseSensitive(af_externalJSON, "afId");
- if (af_id) {
- if (!cJSON_IsString(af_id)) {
- ogs_error("OpenAPI_af_external_parseFromJSON() failed [af_id]");
- goto end;
- }
+ if (af_id) {
+ if (!cJSON_IsString(af_id)) {
+ ogs_error("OpenAPI_af_external_parseFromJSON() failed [af_id]");
+ goto end;
+ }
}
cJSON *allowed_geographic_area = cJSON_GetObjectItemCaseSensitive(af_externalJSON, "allowedGeographicArea");
OpenAPI_list_t *allowed_geographic_areaList;
- if (allowed_geographic_area) {
- cJSON *allowed_geographic_area_local_nonprimitive;
- if (!cJSON_IsArray(allowed_geographic_area)) {
+ if (allowed_geographic_area) {
+ cJSON *allowed_geographic_area_local_nonprimitive;
+ if (!cJSON_IsArray(allowed_geographic_area)){
+ ogs_error("OpenAPI_af_external_parseFromJSON() failed [allowed_geographic_area]");
+ goto end;
+ }
+
+ allowed_geographic_areaList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(allowed_geographic_area_local_nonprimitive, allowed_geographic_area ) {
+ if (!cJSON_IsObject(allowed_geographic_area_local_nonprimitive)) {
ogs_error("OpenAPI_af_external_parseFromJSON() failed [allowed_geographic_area]");
goto end;
}
+ OpenAPI_geographic_area_t *allowed_geographic_areaItem = OpenAPI_geographic_area_parseFromJSON(allowed_geographic_area_local_nonprimitive);
- allowed_geographic_areaList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(allowed_geographic_area_local_nonprimitive, allowed_geographic_area ) {
- if (!cJSON_IsObject(allowed_geographic_area_local_nonprimitive)) {
- ogs_error("OpenAPI_af_external_parseFromJSON() failed [allowed_geographic_area]");
- goto end;
- }
- OpenAPI_geographic_area_t *allowed_geographic_areaItem = OpenAPI_geographic_area_parseFromJSON(allowed_geographic_area_local_nonprimitive);
-
- OpenAPI_list_add(allowed_geographic_areaList, allowed_geographic_areaItem);
- }
+ OpenAPI_list_add(allowed_geographic_areaList, allowed_geographic_areaItem);
+ }
}
cJSON *privacy_check_related_action = cJSON_GetObjectItemCaseSensitive(af_externalJSON, "privacyCheckRelatedAction");
OpenAPI_privacy_check_related_action_e privacy_check_related_actionVariable;
- if (privacy_check_related_action) {
- if (!cJSON_IsString(privacy_check_related_action)) {
- ogs_error("OpenAPI_af_external_parseFromJSON() failed [privacy_check_related_action]");
- goto end;
- }
- privacy_check_related_actionVariable = OpenAPI_privacy_check_related_action_FromString(privacy_check_related_action->valuestring);
+ if (privacy_check_related_action) {
+ if (!cJSON_IsString(privacy_check_related_action)) {
+ ogs_error("OpenAPI_af_external_parseFromJSON() failed [privacy_check_related_action]");
+ goto end;
+ }
+ privacy_check_related_actionVariable = OpenAPI_privacy_check_related_action_FromString(privacy_check_related_action->valuestring);
}
cJSON *valid_time_period = cJSON_GetObjectItemCaseSensitive(af_externalJSON, "validTimePeriod");
OpenAPI_valid_time_period_t *valid_time_period_local_nonprim = NULL;
- if (valid_time_period) {
- valid_time_period_local_nonprim = OpenAPI_valid_time_period_parseFromJSON(valid_time_period);
+ if (valid_time_period) {
+ valid_time_period_local_nonprim = OpenAPI_valid_time_period_parseFromJSON(valid_time_period);
}
af_external_local_var = OpenAPI_af_external_create (
@@ -157,7 +157,7 @@ OpenAPI_af_external_t *OpenAPI_af_external_parseFromJSON(cJSON *af_externalJSON)
allowed_geographic_area ? allowed_geographic_areaList : NULL,
privacy_check_related_action ? privacy_check_related_actionVariable : 0,
valid_time_period ? valid_time_period_local_nonprim : NULL
- );
+ );
return af_external_local_var;
end:
diff --git a/lib/sbi/openapi/model/af_external.h b/lib/sbi/openapi/model/af_external.h
index ece018f96..f1c1d5702 100644
--- a/lib/sbi/openapi/model/af_external.h
+++ b/lib/sbi/openapi/model/af_external.h
@@ -1,7 +1,7 @@
/*
* af_external.h
*
- *
+ *
*/
#ifndef _OpenAPI_af_external_H_
@@ -33,7 +33,7 @@ OpenAPI_af_external_t *OpenAPI_af_external_create(
OpenAPI_list_t *allowed_geographic_area,
OpenAPI_privacy_check_related_action_e privacy_check_related_action,
OpenAPI_valid_time_period_t *valid_time_period
- );
+);
void OpenAPI_af_external_free(OpenAPI_af_external_t *af_external);
OpenAPI_af_external_t *OpenAPI_af_external_parseFromJSON(cJSON *af_externalJSON);
cJSON *OpenAPI_af_external_convertToJSON(OpenAPI_af_external_t *af_external);
diff --git a/lib/sbi/openapi/model/af_notif_method.h b/lib/sbi/openapi/model/af_notif_method.h
index 27f288bcb..7cf1f441d 100644
--- a/lib/sbi/openapi/model/af_notif_method.h
+++ b/lib/sbi/openapi/model/af_notif_method.h
@@ -1,7 +1,7 @@
/*
* af_notif_method.h
*
- *
+ *
*/
#ifndef _OpenAPI_af_notif_method_H_
diff --git a/lib/sbi/openapi/model/af_requested_data.h b/lib/sbi/openapi/model/af_requested_data.h
index bd4f87bc9..d46f40b8f 100644
--- a/lib/sbi/openapi/model/af_requested_data.h
+++ b/lib/sbi/openapi/model/af_requested_data.h
@@ -1,7 +1,7 @@
/*
* af_requested_data.h
*
- *
+ *
*/
#ifndef _OpenAPI_af_requested_data_H_
diff --git a/lib/sbi/openapi/model/af_routing_requirement.c b/lib/sbi/openapi/model/af_routing_requirement.c
index cf7a180c2..7af5b8c9b 100644
--- a/lib/sbi/openapi/model/af_routing_requirement.c
+++ b/lib/sbi/openapi/model/af_routing_requirement.c
@@ -11,7 +11,7 @@ OpenAPI_af_routing_requirement_t *OpenAPI_af_routing_requirement_create(
OpenAPI_list_t *temp_vals,
OpenAPI_up_path_chg_event_t *up_path_chg_sub,
int addr_preser_ind
- )
+)
{
OpenAPI_af_routing_requirement_t *af_routing_requirement_local_var = OpenAPI_malloc(sizeof(OpenAPI_af_routing_requirement_t));
if (!af_routing_requirement_local_var) {
@@ -57,83 +57,83 @@ cJSON *OpenAPI_af_routing_requirement_convertToJSON(OpenAPI_af_routing_requireme
item = cJSON_CreateObject();
if (af_routing_requirement->app_reloc) {
- if (cJSON_AddBoolToObject(item, "appReloc", af_routing_requirement->app_reloc) == NULL) {
- ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [app_reloc]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "appReloc", af_routing_requirement->app_reloc) == NULL) {
+ ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [app_reloc]");
+ goto end;
+ }
}
if (af_routing_requirement->route_to_locs) {
- cJSON *route_to_locsList = cJSON_AddArrayToObject(item, "routeToLocs");
- if (route_to_locsList == NULL) {
- ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [route_to_locs]");
- goto end;
- }
+ cJSON *route_to_locsList = cJSON_AddArrayToObject(item, "routeToLocs");
+ if (route_to_locsList == NULL) {
+ ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [route_to_locs]");
+ goto end;
+ }
- OpenAPI_lnode_t *route_to_locs_node;
- if (af_routing_requirement->route_to_locs) {
- OpenAPI_list_for_each(af_routing_requirement->route_to_locs, route_to_locs_node) {
- cJSON *itemLocal = OpenAPI_route_to_location_convertToJSON(route_to_locs_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [route_to_locs]");
- goto end;
- }
- cJSON_AddItemToArray(route_to_locsList, itemLocal);
+ OpenAPI_lnode_t *route_to_locs_node;
+ if (af_routing_requirement->route_to_locs) {
+ OpenAPI_list_for_each(af_routing_requirement->route_to_locs, route_to_locs_node) {
+ cJSON *itemLocal = OpenAPI_route_to_location_convertToJSON(route_to_locs_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [route_to_locs]");
+ goto end;
}
+ cJSON_AddItemToArray(route_to_locsList, itemLocal);
}
}
+ }
if (af_routing_requirement->sp_val) {
- cJSON *sp_val_local_JSON = OpenAPI_spatial_validity_convertToJSON(af_routing_requirement->sp_val);
- if (sp_val_local_JSON == NULL) {
- ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [sp_val]");
- goto end;
- }
- cJSON_AddItemToObject(item, "spVal", sp_val_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [sp_val]");
- goto end;
- }
+ cJSON *sp_val_local_JSON = OpenAPI_spatial_validity_convertToJSON(af_routing_requirement->sp_val);
+ if (sp_val_local_JSON == NULL) {
+ ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [sp_val]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "spVal", sp_val_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [sp_val]");
+ goto end;
+ }
}
if (af_routing_requirement->temp_vals) {
- cJSON *temp_valsList = cJSON_AddArrayToObject(item, "tempVals");
- if (temp_valsList == NULL) {
- ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [temp_vals]");
- goto end;
- }
+ cJSON *temp_valsList = cJSON_AddArrayToObject(item, "tempVals");
+ if (temp_valsList == NULL) {
+ ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [temp_vals]");
+ goto end;
+ }
- OpenAPI_lnode_t *temp_vals_node;
- if (af_routing_requirement->temp_vals) {
- OpenAPI_list_for_each(af_routing_requirement->temp_vals, temp_vals_node) {
- cJSON *itemLocal = OpenAPI_temporal_validity_convertToJSON(temp_vals_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [temp_vals]");
- goto end;
- }
- cJSON_AddItemToArray(temp_valsList, itemLocal);
+ OpenAPI_lnode_t *temp_vals_node;
+ if (af_routing_requirement->temp_vals) {
+ OpenAPI_list_for_each(af_routing_requirement->temp_vals, temp_vals_node) {
+ cJSON *itemLocal = OpenAPI_temporal_validity_convertToJSON(temp_vals_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [temp_vals]");
+ goto end;
}
+ cJSON_AddItemToArray(temp_valsList, itemLocal);
}
}
+ }
if (af_routing_requirement->up_path_chg_sub) {
- cJSON *up_path_chg_sub_local_JSON = OpenAPI_up_path_chg_event_convertToJSON(af_routing_requirement->up_path_chg_sub);
- if (up_path_chg_sub_local_JSON == NULL) {
- ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [up_path_chg_sub]");
- goto end;
- }
- cJSON_AddItemToObject(item, "upPathChgSub", up_path_chg_sub_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [up_path_chg_sub]");
- goto end;
- }
+ cJSON *up_path_chg_sub_local_JSON = OpenAPI_up_path_chg_event_convertToJSON(af_routing_requirement->up_path_chg_sub);
+ if (up_path_chg_sub_local_JSON == NULL) {
+ ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [up_path_chg_sub]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "upPathChgSub", up_path_chg_sub_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [up_path_chg_sub]");
+ goto end;
+ }
}
if (af_routing_requirement->addr_preser_ind) {
- if (cJSON_AddBoolToObject(item, "addrPreserInd", af_routing_requirement->addr_preser_ind) == NULL) {
- ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [addr_preser_ind]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "addrPreserInd", af_routing_requirement->addr_preser_ind) == NULL) {
+ ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [addr_preser_ind]");
+ goto end;
+ }
}
end:
@@ -145,80 +145,80 @@ OpenAPI_af_routing_requirement_t *OpenAPI_af_routing_requirement_parseFromJSON(c
OpenAPI_af_routing_requirement_t *af_routing_requirement_local_var = NULL;
cJSON *app_reloc = cJSON_GetObjectItemCaseSensitive(af_routing_requirementJSON, "appReloc");
- if (app_reloc) {
- if (!cJSON_IsBool(app_reloc)) {
- ogs_error("OpenAPI_af_routing_requirement_parseFromJSON() failed [app_reloc]");
- goto end;
- }
+ if (app_reloc) {
+ if (!cJSON_IsBool(app_reloc)) {
+ ogs_error("OpenAPI_af_routing_requirement_parseFromJSON() failed [app_reloc]");
+ goto end;
+ }
}
cJSON *route_to_locs = cJSON_GetObjectItemCaseSensitive(af_routing_requirementJSON, "routeToLocs");
OpenAPI_list_t *route_to_locsList;
- if (route_to_locs) {
- cJSON *route_to_locs_local_nonprimitive;
- if (!cJSON_IsArray(route_to_locs)) {
+ if (route_to_locs) {
+ cJSON *route_to_locs_local_nonprimitive;
+ if (!cJSON_IsArray(route_to_locs)){
+ ogs_error("OpenAPI_af_routing_requirement_parseFromJSON() failed [route_to_locs]");
+ goto end;
+ }
+
+ route_to_locsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(route_to_locs_local_nonprimitive, route_to_locs ) {
+ if (!cJSON_IsObject(route_to_locs_local_nonprimitive)) {
ogs_error("OpenAPI_af_routing_requirement_parseFromJSON() failed [route_to_locs]");
goto end;
}
+ OpenAPI_route_to_location_t *route_to_locsItem = OpenAPI_route_to_location_parseFromJSON(route_to_locs_local_nonprimitive);
- route_to_locsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(route_to_locs_local_nonprimitive, route_to_locs ) {
- if (!cJSON_IsObject(route_to_locs_local_nonprimitive)) {
- ogs_error("OpenAPI_af_routing_requirement_parseFromJSON() failed [route_to_locs]");
- goto end;
- }
- OpenAPI_route_to_location_t *route_to_locsItem = OpenAPI_route_to_location_parseFromJSON(route_to_locs_local_nonprimitive);
-
- OpenAPI_list_add(route_to_locsList, route_to_locsItem);
- }
+ OpenAPI_list_add(route_to_locsList, route_to_locsItem);
+ }
}
cJSON *sp_val = cJSON_GetObjectItemCaseSensitive(af_routing_requirementJSON, "spVal");
OpenAPI_spatial_validity_t *sp_val_local_nonprim = NULL;
- if (sp_val) {
- sp_val_local_nonprim = OpenAPI_spatial_validity_parseFromJSON(sp_val);
+ if (sp_val) {
+ sp_val_local_nonprim = OpenAPI_spatial_validity_parseFromJSON(sp_val);
}
cJSON *temp_vals = cJSON_GetObjectItemCaseSensitive(af_routing_requirementJSON, "tempVals");
OpenAPI_list_t *temp_valsList;
- if (temp_vals) {
- cJSON *temp_vals_local_nonprimitive;
- if (!cJSON_IsArray(temp_vals)) {
+ if (temp_vals) {
+ cJSON *temp_vals_local_nonprimitive;
+ if (!cJSON_IsArray(temp_vals)){
+ ogs_error("OpenAPI_af_routing_requirement_parseFromJSON() failed [temp_vals]");
+ goto end;
+ }
+
+ temp_valsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(temp_vals_local_nonprimitive, temp_vals ) {
+ if (!cJSON_IsObject(temp_vals_local_nonprimitive)) {
ogs_error("OpenAPI_af_routing_requirement_parseFromJSON() failed [temp_vals]");
goto end;
}
+ OpenAPI_temporal_validity_t *temp_valsItem = OpenAPI_temporal_validity_parseFromJSON(temp_vals_local_nonprimitive);
- temp_valsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(temp_vals_local_nonprimitive, temp_vals ) {
- if (!cJSON_IsObject(temp_vals_local_nonprimitive)) {
- ogs_error("OpenAPI_af_routing_requirement_parseFromJSON() failed [temp_vals]");
- goto end;
- }
- OpenAPI_temporal_validity_t *temp_valsItem = OpenAPI_temporal_validity_parseFromJSON(temp_vals_local_nonprimitive);
-
- OpenAPI_list_add(temp_valsList, temp_valsItem);
- }
+ OpenAPI_list_add(temp_valsList, temp_valsItem);
+ }
}
cJSON *up_path_chg_sub = cJSON_GetObjectItemCaseSensitive(af_routing_requirementJSON, "upPathChgSub");
OpenAPI_up_path_chg_event_t *up_path_chg_sub_local_nonprim = NULL;
- if (up_path_chg_sub) {
- up_path_chg_sub_local_nonprim = OpenAPI_up_path_chg_event_parseFromJSON(up_path_chg_sub);
+ if (up_path_chg_sub) {
+ up_path_chg_sub_local_nonprim = OpenAPI_up_path_chg_event_parseFromJSON(up_path_chg_sub);
}
cJSON *addr_preser_ind = cJSON_GetObjectItemCaseSensitive(af_routing_requirementJSON, "addrPreserInd");
- if (addr_preser_ind) {
- if (!cJSON_IsBool(addr_preser_ind)) {
- ogs_error("OpenAPI_af_routing_requirement_parseFromJSON() failed [addr_preser_ind]");
- goto end;
- }
+ if (addr_preser_ind) {
+ if (!cJSON_IsBool(addr_preser_ind)) {
+ ogs_error("OpenAPI_af_routing_requirement_parseFromJSON() failed [addr_preser_ind]");
+ goto end;
+ }
}
af_routing_requirement_local_var = OpenAPI_af_routing_requirement_create (
@@ -228,7 +228,7 @@ OpenAPI_af_routing_requirement_t *OpenAPI_af_routing_requirement_parseFromJSON(c
temp_vals ? temp_valsList : NULL,
up_path_chg_sub ? up_path_chg_sub_local_nonprim : NULL,
addr_preser_ind ? addr_preser_ind->valueint : 0
- );
+ );
return af_routing_requirement_local_var;
end:
diff --git a/lib/sbi/openapi/model/af_routing_requirement.h b/lib/sbi/openapi/model/af_routing_requirement.h
index 8e973f0df..737b86f4a 100644
--- a/lib/sbi/openapi/model/af_routing_requirement.h
+++ b/lib/sbi/openapi/model/af_routing_requirement.h
@@ -38,7 +38,7 @@ OpenAPI_af_routing_requirement_t *OpenAPI_af_routing_requirement_create(
OpenAPI_list_t *temp_vals,
OpenAPI_up_path_chg_event_t *up_path_chg_sub,
int addr_preser_ind
- );
+);
void OpenAPI_af_routing_requirement_free(OpenAPI_af_routing_requirement_t *af_routing_requirement);
OpenAPI_af_routing_requirement_t *OpenAPI_af_routing_requirement_parseFromJSON(cJSON *af_routing_requirementJSON);
cJSON *OpenAPI_af_routing_requirement_convertToJSON(OpenAPI_af_routing_requirement_t *af_routing_requirement);
diff --git a/lib/sbi/openapi/model/af_routing_requirement_rm.c b/lib/sbi/openapi/model/af_routing_requirement_rm.c
index aa53ba261..f6917e1d8 100644
--- a/lib/sbi/openapi/model/af_routing_requirement_rm.c
+++ b/lib/sbi/openapi/model/af_routing_requirement_rm.c
@@ -11,7 +11,7 @@ OpenAPI_af_routing_requirement_rm_t *OpenAPI_af_routing_requirement_rm_create(
OpenAPI_list_t *temp_vals,
OpenAPI_up_path_chg_event_t *up_path_chg_sub,
int addr_preser_ind
- )
+)
{
OpenAPI_af_routing_requirement_rm_t *af_routing_requirement_rm_local_var = OpenAPI_malloc(sizeof(OpenAPI_af_routing_requirement_rm_t));
if (!af_routing_requirement_rm_local_var) {
@@ -57,83 +57,83 @@ cJSON *OpenAPI_af_routing_requirement_rm_convertToJSON(OpenAPI_af_routing_requir
item = cJSON_CreateObject();
if (af_routing_requirement_rm->app_reloc) {
- if (cJSON_AddBoolToObject(item, "appReloc", af_routing_requirement_rm->app_reloc) == NULL) {
- ogs_error("OpenAPI_af_routing_requirement_rm_convertToJSON() failed [app_reloc]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "appReloc", af_routing_requirement_rm->app_reloc) == NULL) {
+ ogs_error("OpenAPI_af_routing_requirement_rm_convertToJSON() failed [app_reloc]");
+ goto end;
+ }
}
if (af_routing_requirement_rm->route_to_locs) {
- cJSON *route_to_locsList = cJSON_AddArrayToObject(item, "routeToLocs");
- if (route_to_locsList == NULL) {
- ogs_error("OpenAPI_af_routing_requirement_rm_convertToJSON() failed [route_to_locs]");
- goto end;
- }
+ cJSON *route_to_locsList = cJSON_AddArrayToObject(item, "routeToLocs");
+ if (route_to_locsList == NULL) {
+ ogs_error("OpenAPI_af_routing_requirement_rm_convertToJSON() failed [route_to_locs]");
+ goto end;
+ }
- OpenAPI_lnode_t *route_to_locs_node;
- if (af_routing_requirement_rm->route_to_locs) {
- OpenAPI_list_for_each(af_routing_requirement_rm->route_to_locs, route_to_locs_node) {
- cJSON *itemLocal = OpenAPI_route_to_location_convertToJSON(route_to_locs_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_af_routing_requirement_rm_convertToJSON() failed [route_to_locs]");
- goto end;
- }
- cJSON_AddItemToArray(route_to_locsList, itemLocal);
+ OpenAPI_lnode_t *route_to_locs_node;
+ if (af_routing_requirement_rm->route_to_locs) {
+ OpenAPI_list_for_each(af_routing_requirement_rm->route_to_locs, route_to_locs_node) {
+ cJSON *itemLocal = OpenAPI_route_to_location_convertToJSON(route_to_locs_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_af_routing_requirement_rm_convertToJSON() failed [route_to_locs]");
+ goto end;
}
+ cJSON_AddItemToArray(route_to_locsList, itemLocal);
}
}
+ }
if (af_routing_requirement_rm->sp_val) {
- cJSON *sp_val_local_JSON = OpenAPI_spatial_validity_rm_convertToJSON(af_routing_requirement_rm->sp_val);
- if (sp_val_local_JSON == NULL) {
- ogs_error("OpenAPI_af_routing_requirement_rm_convertToJSON() failed [sp_val]");
- goto end;
- }
- cJSON_AddItemToObject(item, "spVal", sp_val_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_af_routing_requirement_rm_convertToJSON() failed [sp_val]");
- goto end;
- }
+ cJSON *sp_val_local_JSON = OpenAPI_spatial_validity_rm_convertToJSON(af_routing_requirement_rm->sp_val);
+ if (sp_val_local_JSON == NULL) {
+ ogs_error("OpenAPI_af_routing_requirement_rm_convertToJSON() failed [sp_val]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "spVal", sp_val_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_af_routing_requirement_rm_convertToJSON() failed [sp_val]");
+ goto end;
+ }
}
if (af_routing_requirement_rm->temp_vals) {
- cJSON *temp_valsList = cJSON_AddArrayToObject(item, "tempVals");
- if (temp_valsList == NULL) {
- ogs_error("OpenAPI_af_routing_requirement_rm_convertToJSON() failed [temp_vals]");
- goto end;
- }
+ cJSON *temp_valsList = cJSON_AddArrayToObject(item, "tempVals");
+ if (temp_valsList == NULL) {
+ ogs_error("OpenAPI_af_routing_requirement_rm_convertToJSON() failed [temp_vals]");
+ goto end;
+ }
- OpenAPI_lnode_t *temp_vals_node;
- if (af_routing_requirement_rm->temp_vals) {
- OpenAPI_list_for_each(af_routing_requirement_rm->temp_vals, temp_vals_node) {
- cJSON *itemLocal = OpenAPI_temporal_validity_convertToJSON(temp_vals_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_af_routing_requirement_rm_convertToJSON() failed [temp_vals]");
- goto end;
- }
- cJSON_AddItemToArray(temp_valsList, itemLocal);
+ OpenAPI_lnode_t *temp_vals_node;
+ if (af_routing_requirement_rm->temp_vals) {
+ OpenAPI_list_for_each(af_routing_requirement_rm->temp_vals, temp_vals_node) {
+ cJSON *itemLocal = OpenAPI_temporal_validity_convertToJSON(temp_vals_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_af_routing_requirement_rm_convertToJSON() failed [temp_vals]");
+ goto end;
}
+ cJSON_AddItemToArray(temp_valsList, itemLocal);
}
}
+ }
if (af_routing_requirement_rm->up_path_chg_sub) {
- cJSON *up_path_chg_sub_local_JSON = OpenAPI_up_path_chg_event_convertToJSON(af_routing_requirement_rm->up_path_chg_sub);
- if (up_path_chg_sub_local_JSON == NULL) {
- ogs_error("OpenAPI_af_routing_requirement_rm_convertToJSON() failed [up_path_chg_sub]");
- goto end;
- }
- cJSON_AddItemToObject(item, "upPathChgSub", up_path_chg_sub_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_af_routing_requirement_rm_convertToJSON() failed [up_path_chg_sub]");
- goto end;
- }
+ cJSON *up_path_chg_sub_local_JSON = OpenAPI_up_path_chg_event_convertToJSON(af_routing_requirement_rm->up_path_chg_sub);
+ if (up_path_chg_sub_local_JSON == NULL) {
+ ogs_error("OpenAPI_af_routing_requirement_rm_convertToJSON() failed [up_path_chg_sub]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "upPathChgSub", up_path_chg_sub_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_af_routing_requirement_rm_convertToJSON() failed [up_path_chg_sub]");
+ goto end;
+ }
}
if (af_routing_requirement_rm->addr_preser_ind) {
- if (cJSON_AddBoolToObject(item, "addrPreserInd", af_routing_requirement_rm->addr_preser_ind) == NULL) {
- ogs_error("OpenAPI_af_routing_requirement_rm_convertToJSON() failed [addr_preser_ind]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "addrPreserInd", af_routing_requirement_rm->addr_preser_ind) == NULL) {
+ ogs_error("OpenAPI_af_routing_requirement_rm_convertToJSON() failed [addr_preser_ind]");
+ goto end;
+ }
}
end:
@@ -145,80 +145,80 @@ OpenAPI_af_routing_requirement_rm_t *OpenAPI_af_routing_requirement_rm_parseFrom
OpenAPI_af_routing_requirement_rm_t *af_routing_requirement_rm_local_var = NULL;
cJSON *app_reloc = cJSON_GetObjectItemCaseSensitive(af_routing_requirement_rmJSON, "appReloc");
- if (app_reloc) {
- if (!cJSON_IsBool(app_reloc)) {
- ogs_error("OpenAPI_af_routing_requirement_rm_parseFromJSON() failed [app_reloc]");
- goto end;
- }
+ if (app_reloc) {
+ if (!cJSON_IsBool(app_reloc)) {
+ ogs_error("OpenAPI_af_routing_requirement_rm_parseFromJSON() failed [app_reloc]");
+ goto end;
+ }
}
cJSON *route_to_locs = cJSON_GetObjectItemCaseSensitive(af_routing_requirement_rmJSON, "routeToLocs");
OpenAPI_list_t *route_to_locsList;
- if (route_to_locs) {
- cJSON *route_to_locs_local_nonprimitive;
- if (!cJSON_IsArray(route_to_locs)) {
+ if (route_to_locs) {
+ cJSON *route_to_locs_local_nonprimitive;
+ if (!cJSON_IsArray(route_to_locs)){
+ ogs_error("OpenAPI_af_routing_requirement_rm_parseFromJSON() failed [route_to_locs]");
+ goto end;
+ }
+
+ route_to_locsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(route_to_locs_local_nonprimitive, route_to_locs ) {
+ if (!cJSON_IsObject(route_to_locs_local_nonprimitive)) {
ogs_error("OpenAPI_af_routing_requirement_rm_parseFromJSON() failed [route_to_locs]");
goto end;
}
+ OpenAPI_route_to_location_t *route_to_locsItem = OpenAPI_route_to_location_parseFromJSON(route_to_locs_local_nonprimitive);
- route_to_locsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(route_to_locs_local_nonprimitive, route_to_locs ) {
- if (!cJSON_IsObject(route_to_locs_local_nonprimitive)) {
- ogs_error("OpenAPI_af_routing_requirement_rm_parseFromJSON() failed [route_to_locs]");
- goto end;
- }
- OpenAPI_route_to_location_t *route_to_locsItem = OpenAPI_route_to_location_parseFromJSON(route_to_locs_local_nonprimitive);
-
- OpenAPI_list_add(route_to_locsList, route_to_locsItem);
- }
+ OpenAPI_list_add(route_to_locsList, route_to_locsItem);
+ }
}
cJSON *sp_val = cJSON_GetObjectItemCaseSensitive(af_routing_requirement_rmJSON, "spVal");
OpenAPI_spatial_validity_rm_t *sp_val_local_nonprim = NULL;
- if (sp_val) {
- sp_val_local_nonprim = OpenAPI_spatial_validity_rm_parseFromJSON(sp_val);
+ if (sp_val) {
+ sp_val_local_nonprim = OpenAPI_spatial_validity_rm_parseFromJSON(sp_val);
}
cJSON *temp_vals = cJSON_GetObjectItemCaseSensitive(af_routing_requirement_rmJSON, "tempVals");
OpenAPI_list_t *temp_valsList;
- if (temp_vals) {
- cJSON *temp_vals_local_nonprimitive;
- if (!cJSON_IsArray(temp_vals)) {
+ if (temp_vals) {
+ cJSON *temp_vals_local_nonprimitive;
+ if (!cJSON_IsArray(temp_vals)){
+ ogs_error("OpenAPI_af_routing_requirement_rm_parseFromJSON() failed [temp_vals]");
+ goto end;
+ }
+
+ temp_valsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(temp_vals_local_nonprimitive, temp_vals ) {
+ if (!cJSON_IsObject(temp_vals_local_nonprimitive)) {
ogs_error("OpenAPI_af_routing_requirement_rm_parseFromJSON() failed [temp_vals]");
goto end;
}
+ OpenAPI_temporal_validity_t *temp_valsItem = OpenAPI_temporal_validity_parseFromJSON(temp_vals_local_nonprimitive);
- temp_valsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(temp_vals_local_nonprimitive, temp_vals ) {
- if (!cJSON_IsObject(temp_vals_local_nonprimitive)) {
- ogs_error("OpenAPI_af_routing_requirement_rm_parseFromJSON() failed [temp_vals]");
- goto end;
- }
- OpenAPI_temporal_validity_t *temp_valsItem = OpenAPI_temporal_validity_parseFromJSON(temp_vals_local_nonprimitive);
-
- OpenAPI_list_add(temp_valsList, temp_valsItem);
- }
+ OpenAPI_list_add(temp_valsList, temp_valsItem);
+ }
}
cJSON *up_path_chg_sub = cJSON_GetObjectItemCaseSensitive(af_routing_requirement_rmJSON, "upPathChgSub");
OpenAPI_up_path_chg_event_t *up_path_chg_sub_local_nonprim = NULL;
- if (up_path_chg_sub) {
- up_path_chg_sub_local_nonprim = OpenAPI_up_path_chg_event_parseFromJSON(up_path_chg_sub);
+ if (up_path_chg_sub) {
+ up_path_chg_sub_local_nonprim = OpenAPI_up_path_chg_event_parseFromJSON(up_path_chg_sub);
}
cJSON *addr_preser_ind = cJSON_GetObjectItemCaseSensitive(af_routing_requirement_rmJSON, "addrPreserInd");
- if (addr_preser_ind) {
- if (!cJSON_IsBool(addr_preser_ind)) {
- ogs_error("OpenAPI_af_routing_requirement_rm_parseFromJSON() failed [addr_preser_ind]");
- goto end;
- }
+ if (addr_preser_ind) {
+ if (!cJSON_IsBool(addr_preser_ind)) {
+ ogs_error("OpenAPI_af_routing_requirement_rm_parseFromJSON() failed [addr_preser_ind]");
+ goto end;
+ }
}
af_routing_requirement_rm_local_var = OpenAPI_af_routing_requirement_rm_create (
@@ -228,7 +228,7 @@ OpenAPI_af_routing_requirement_rm_t *OpenAPI_af_routing_requirement_rm_parseFrom
temp_vals ? temp_valsList : NULL,
up_path_chg_sub ? up_path_chg_sub_local_nonprim : NULL,
addr_preser_ind ? addr_preser_ind->valueint : 0
- );
+ );
return af_routing_requirement_rm_local_var;
end:
diff --git a/lib/sbi/openapi/model/af_routing_requirement_rm.h b/lib/sbi/openapi/model/af_routing_requirement_rm.h
index 3b2f274d3..fc8b56f81 100644
--- a/lib/sbi/openapi/model/af_routing_requirement_rm.h
+++ b/lib/sbi/openapi/model/af_routing_requirement_rm.h
@@ -38,7 +38,7 @@ OpenAPI_af_routing_requirement_rm_t *OpenAPI_af_routing_requirement_rm_create(
OpenAPI_list_t *temp_vals,
OpenAPI_up_path_chg_event_t *up_path_chg_sub,
int addr_preser_ind
- );
+);
void OpenAPI_af_routing_requirement_rm_free(OpenAPI_af_routing_requirement_rm_t *af_routing_requirement_rm);
OpenAPI_af_routing_requirement_rm_t *OpenAPI_af_routing_requirement_rm_parseFromJSON(cJSON *af_routing_requirement_rmJSON);
cJSON *OpenAPI_af_routing_requirement_rm_convertToJSON(OpenAPI_af_routing_requirement_rm_t *af_routing_requirement_rm);
diff --git a/lib/sbi/openapi/model/af_sig_protocol.h b/lib/sbi/openapi/model/af_sig_protocol.h
index 6841e1c0e..555488bbc 100644
--- a/lib/sbi/openapi/model/af_sig_protocol.h
+++ b/lib/sbi/openapi/model/af_sig_protocol.h
@@ -1,7 +1,7 @@
/*
* af_sig_protocol.h
*
- *
+ *
*/
#ifndef _OpenAPI_af_sig_protocol_H_
diff --git a/lib/sbi/openapi/model/allowed_mtc_provider_info.c b/lib/sbi/openapi/model/allowed_mtc_provider_info.c
new file mode 100644
index 000000000..fbedd9165
--- /dev/null
+++ b/lib/sbi/openapi/model/allowed_mtc_provider_info.c
@@ -0,0 +1,125 @@
+
+#include
+#include
+#include
+#include "allowed_mtc_provider_info.h"
+
+OpenAPI_allowed_mtc_provider_info_t *OpenAPI_allowed_mtc_provider_info_create(
+ char *mtc_provider_information,
+ char *af_id
+)
+{
+ OpenAPI_allowed_mtc_provider_info_t *allowed_mtc_provider_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_allowed_mtc_provider_info_t));
+ if (!allowed_mtc_provider_info_local_var) {
+ return NULL;
+ }
+ allowed_mtc_provider_info_local_var->mtc_provider_information = mtc_provider_information;
+ allowed_mtc_provider_info_local_var->af_id = af_id;
+
+ return allowed_mtc_provider_info_local_var;
+}
+
+void OpenAPI_allowed_mtc_provider_info_free(OpenAPI_allowed_mtc_provider_info_t *allowed_mtc_provider_info)
+{
+ if (NULL == allowed_mtc_provider_info) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ ogs_free(allowed_mtc_provider_info->mtc_provider_information);
+ ogs_free(allowed_mtc_provider_info->af_id);
+ ogs_free(allowed_mtc_provider_info);
+}
+
+cJSON *OpenAPI_allowed_mtc_provider_info_convertToJSON(OpenAPI_allowed_mtc_provider_info_t *allowed_mtc_provider_info)
+{
+ cJSON *item = NULL;
+
+ if (allowed_mtc_provider_info == NULL) {
+ ogs_error("OpenAPI_allowed_mtc_provider_info_convertToJSON() failed [AllowedMtcProviderInfo]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (allowed_mtc_provider_info->mtc_provider_information) {
+ if (cJSON_AddStringToObject(item, "mtcProviderInformation", allowed_mtc_provider_info->mtc_provider_information) == NULL) {
+ ogs_error("OpenAPI_allowed_mtc_provider_info_convertToJSON() failed [mtc_provider_information]");
+ goto end;
+ }
+ }
+
+ if (allowed_mtc_provider_info->af_id) {
+ if (cJSON_AddStringToObject(item, "afId", allowed_mtc_provider_info->af_id) == NULL) {
+ ogs_error("OpenAPI_allowed_mtc_provider_info_convertToJSON() failed [af_id]");
+ goto end;
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_allowed_mtc_provider_info_t *OpenAPI_allowed_mtc_provider_info_parseFromJSON(cJSON *allowed_mtc_provider_infoJSON)
+{
+ OpenAPI_allowed_mtc_provider_info_t *allowed_mtc_provider_info_local_var = NULL;
+ cJSON *mtc_provider_information = cJSON_GetObjectItemCaseSensitive(allowed_mtc_provider_infoJSON, "mtcProviderInformation");
+
+ if (mtc_provider_information) {
+ if (!cJSON_IsString(mtc_provider_information)) {
+ ogs_error("OpenAPI_allowed_mtc_provider_info_parseFromJSON() failed [mtc_provider_information]");
+ goto end;
+ }
+ }
+
+ cJSON *af_id = cJSON_GetObjectItemCaseSensitive(allowed_mtc_provider_infoJSON, "afId");
+
+ if (af_id) {
+ if (!cJSON_IsString(af_id)) {
+ ogs_error("OpenAPI_allowed_mtc_provider_info_parseFromJSON() failed [af_id]");
+ goto end;
+ }
+ }
+
+ allowed_mtc_provider_info_local_var = OpenAPI_allowed_mtc_provider_info_create (
+ mtc_provider_information ? ogs_strdup_or_assert(mtc_provider_information->valuestring) : NULL,
+ af_id ? ogs_strdup_or_assert(af_id->valuestring) : NULL
+ );
+
+ return allowed_mtc_provider_info_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_allowed_mtc_provider_info_t *OpenAPI_allowed_mtc_provider_info_copy(OpenAPI_allowed_mtc_provider_info_t *dst, OpenAPI_allowed_mtc_provider_info_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_allowed_mtc_provider_info_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_allowed_mtc_provider_info_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_allowed_mtc_provider_info_free(dst);
+ dst = OpenAPI_allowed_mtc_provider_info_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/allowed_mtc_provider_info.h b/lib/sbi/openapi/model/allowed_mtc_provider_info.h
new file mode 100644
index 000000000..a30420962
--- /dev/null
+++ b/lib/sbi/openapi/model/allowed_mtc_provider_info.h
@@ -0,0 +1,40 @@
+/*
+ * allowed_mtc_provider_info.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_allowed_mtc_provider_info_H_
+#define _OpenAPI_allowed_mtc_provider_info_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_allowed_mtc_provider_info_s OpenAPI_allowed_mtc_provider_info_t;
+typedef struct OpenAPI_allowed_mtc_provider_info_s {
+ char *mtc_provider_information;
+ char *af_id;
+} OpenAPI_allowed_mtc_provider_info_t;
+
+OpenAPI_allowed_mtc_provider_info_t *OpenAPI_allowed_mtc_provider_info_create(
+ char *mtc_provider_information,
+ char *af_id
+);
+void OpenAPI_allowed_mtc_provider_info_free(OpenAPI_allowed_mtc_provider_info_t *allowed_mtc_provider_info);
+OpenAPI_allowed_mtc_provider_info_t *OpenAPI_allowed_mtc_provider_info_parseFromJSON(cJSON *allowed_mtc_provider_infoJSON);
+cJSON *OpenAPI_allowed_mtc_provider_info_convertToJSON(OpenAPI_allowed_mtc_provider_info_t *allowed_mtc_provider_info);
+OpenAPI_allowed_mtc_provider_info_t *OpenAPI_allowed_mtc_provider_info_copy(OpenAPI_allowed_mtc_provider_info_t *dst, OpenAPI_allowed_mtc_provider_info_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_allowed_mtc_provider_info_H_ */
+
diff --git a/lib/sbi/openapi/model/allowed_nssai.c b/lib/sbi/openapi/model/allowed_nssai.c
index a8a3d4f76..ec23f7775 100644
--- a/lib/sbi/openapi/model/allowed_nssai.c
+++ b/lib/sbi/openapi/model/allowed_nssai.c
@@ -7,7 +7,7 @@
OpenAPI_allowed_nssai_t *OpenAPI_allowed_nssai_create(
OpenAPI_list_t *allowed_snssai_list,
OpenAPI_access_type_e access_type
- )
+)
{
OpenAPI_allowed_nssai_t *allowed_nssai_local_var = OpenAPI_malloc(sizeof(OpenAPI_allowed_nssai_t));
if (!allowed_nssai_local_var) {
@@ -79,9 +79,9 @@ OpenAPI_allowed_nssai_t *OpenAPI_allowed_nssai_parseFromJSON(cJSON *allowed_nssa
}
OpenAPI_list_t *allowed_snssai_listList;
-
+
cJSON *allowed_snssai_list_local_nonprimitive;
- if (!cJSON_IsArray(allowed_snssai_list)) {
+ if (!cJSON_IsArray(allowed_snssai_list)){
ogs_error("OpenAPI_allowed_nssai_parseFromJSON() failed [allowed_snssai_list]");
goto end;
}
@@ -105,7 +105,7 @@ OpenAPI_allowed_nssai_t *OpenAPI_allowed_nssai_parseFromJSON(cJSON *allowed_nssa
}
OpenAPI_access_type_e access_typeVariable;
-
+
if (!cJSON_IsString(access_type)) {
ogs_error("OpenAPI_allowed_nssai_parseFromJSON() failed [access_type]");
goto end;
@@ -115,7 +115,7 @@ OpenAPI_allowed_nssai_t *OpenAPI_allowed_nssai_parseFromJSON(cJSON *allowed_nssa
allowed_nssai_local_var = OpenAPI_allowed_nssai_create (
allowed_snssai_listList,
access_typeVariable
- );
+ );
return allowed_nssai_local_var;
end:
diff --git a/lib/sbi/openapi/model/allowed_nssai.h b/lib/sbi/openapi/model/allowed_nssai.h
index 3dc27d645..e391ef069 100644
--- a/lib/sbi/openapi/model/allowed_nssai.h
+++ b/lib/sbi/openapi/model/allowed_nssai.h
@@ -1,7 +1,7 @@
/*
* allowed_nssai.h
*
- *
+ *
*/
#ifndef _OpenAPI_allowed_nssai_H_
@@ -28,7 +28,7 @@ typedef struct OpenAPI_allowed_nssai_s {
OpenAPI_allowed_nssai_t *OpenAPI_allowed_nssai_create(
OpenAPI_list_t *allowed_snssai_list,
OpenAPI_access_type_e access_type
- );
+);
void OpenAPI_allowed_nssai_free(OpenAPI_allowed_nssai_t *allowed_nssai);
OpenAPI_allowed_nssai_t *OpenAPI_allowed_nssai_parseFromJSON(cJSON *allowed_nssaiJSON);
cJSON *OpenAPI_allowed_nssai_convertToJSON(OpenAPI_allowed_nssai_t *allowed_nssai);
diff --git a/lib/sbi/openapi/model/allowed_snssai.c b/lib/sbi/openapi/model/allowed_snssai.c
index d42a4b7ca..97756edec 100644
--- a/lib/sbi/openapi/model/allowed_snssai.c
+++ b/lib/sbi/openapi/model/allowed_snssai.c
@@ -8,7 +8,7 @@ OpenAPI_allowed_snssai_t *OpenAPI_allowed_snssai_create(
OpenAPI_snssai_t *allowed_snssai,
OpenAPI_list_t *nsi_information_list,
OpenAPI_snssai_t *mapped_home_snssai
- )
+)
{
OpenAPI_allowed_snssai_t *allowed_snssai_local_var = OpenAPI_malloc(sizeof(OpenAPI_allowed_snssai_t));
if (!allowed_snssai_local_var) {
@@ -58,36 +58,36 @@ cJSON *OpenAPI_allowed_snssai_convertToJSON(OpenAPI_allowed_snssai_t *allowed_sn
}
if (allowed_snssai->nsi_information_list) {
- cJSON *nsi_information_listList = cJSON_AddArrayToObject(item, "nsiInformationList");
- if (nsi_information_listList == NULL) {
- ogs_error("OpenAPI_allowed_snssai_convertToJSON() failed [nsi_information_list]");
- goto end;
- }
+ cJSON *nsi_information_listList = cJSON_AddArrayToObject(item, "nsiInformationList");
+ if (nsi_information_listList == NULL) {
+ ogs_error("OpenAPI_allowed_snssai_convertToJSON() failed [nsi_information_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *nsi_information_list_node;
- if (allowed_snssai->nsi_information_list) {
- OpenAPI_list_for_each(allowed_snssai->nsi_information_list, nsi_information_list_node) {
- cJSON *itemLocal = OpenAPI_nsi_information_convertToJSON(nsi_information_list_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_allowed_snssai_convertToJSON() failed [nsi_information_list]");
- goto end;
- }
- cJSON_AddItemToArray(nsi_information_listList, itemLocal);
+ OpenAPI_lnode_t *nsi_information_list_node;
+ if (allowed_snssai->nsi_information_list) {
+ OpenAPI_list_for_each(allowed_snssai->nsi_information_list, nsi_information_list_node) {
+ cJSON *itemLocal = OpenAPI_nsi_information_convertToJSON(nsi_information_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_allowed_snssai_convertToJSON() failed [nsi_information_list]");
+ goto end;
}
+ cJSON_AddItemToArray(nsi_information_listList, itemLocal);
}
}
+ }
if (allowed_snssai->mapped_home_snssai) {
- cJSON *mapped_home_snssai_local_JSON = OpenAPI_snssai_convertToJSON(allowed_snssai->mapped_home_snssai);
- if (mapped_home_snssai_local_JSON == NULL) {
- ogs_error("OpenAPI_allowed_snssai_convertToJSON() failed [mapped_home_snssai]");
- goto end;
- }
- cJSON_AddItemToObject(item, "mappedHomeSnssai", mapped_home_snssai_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_allowed_snssai_convertToJSON() failed [mapped_home_snssai]");
- goto end;
- }
+ cJSON *mapped_home_snssai_local_JSON = OpenAPI_snssai_convertToJSON(allowed_snssai->mapped_home_snssai);
+ if (mapped_home_snssai_local_JSON == NULL) {
+ ogs_error("OpenAPI_allowed_snssai_convertToJSON() failed [mapped_home_snssai]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "mappedHomeSnssai", mapped_home_snssai_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_allowed_snssai_convertToJSON() failed [mapped_home_snssai]");
+ goto end;
+ }
}
end:
@@ -104,44 +104,44 @@ OpenAPI_allowed_snssai_t *OpenAPI_allowed_snssai_parseFromJSON(cJSON *allowed_sn
}
OpenAPI_snssai_t *allowed_snssai_local_nonprim = NULL;
-
+
allowed_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(allowed_snssai);
cJSON *nsi_information_list = cJSON_GetObjectItemCaseSensitive(allowed_snssaiJSON, "nsiInformationList");
OpenAPI_list_t *nsi_information_listList;
- if (nsi_information_list) {
- cJSON *nsi_information_list_local_nonprimitive;
- if (!cJSON_IsArray(nsi_information_list)) {
+ if (nsi_information_list) {
+ cJSON *nsi_information_list_local_nonprimitive;
+ if (!cJSON_IsArray(nsi_information_list)){
+ ogs_error("OpenAPI_allowed_snssai_parseFromJSON() failed [nsi_information_list]");
+ goto end;
+ }
+
+ nsi_information_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(nsi_information_list_local_nonprimitive, nsi_information_list ) {
+ if (!cJSON_IsObject(nsi_information_list_local_nonprimitive)) {
ogs_error("OpenAPI_allowed_snssai_parseFromJSON() failed [nsi_information_list]");
goto end;
}
+ OpenAPI_nsi_information_t *nsi_information_listItem = OpenAPI_nsi_information_parseFromJSON(nsi_information_list_local_nonprimitive);
- nsi_information_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(nsi_information_list_local_nonprimitive, nsi_information_list ) {
- if (!cJSON_IsObject(nsi_information_list_local_nonprimitive)) {
- ogs_error("OpenAPI_allowed_snssai_parseFromJSON() failed [nsi_information_list]");
- goto end;
- }
- OpenAPI_nsi_information_t *nsi_information_listItem = OpenAPI_nsi_information_parseFromJSON(nsi_information_list_local_nonprimitive);
-
- OpenAPI_list_add(nsi_information_listList, nsi_information_listItem);
- }
+ OpenAPI_list_add(nsi_information_listList, nsi_information_listItem);
+ }
}
cJSON *mapped_home_snssai = cJSON_GetObjectItemCaseSensitive(allowed_snssaiJSON, "mappedHomeSnssai");
OpenAPI_snssai_t *mapped_home_snssai_local_nonprim = NULL;
- if (mapped_home_snssai) {
- mapped_home_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(mapped_home_snssai);
+ if (mapped_home_snssai) {
+ mapped_home_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(mapped_home_snssai);
}
allowed_snssai_local_var = OpenAPI_allowed_snssai_create (
allowed_snssai_local_nonprim,
nsi_information_list ? nsi_information_listList : NULL,
mapped_home_snssai ? mapped_home_snssai_local_nonprim : NULL
- );
+ );
return allowed_snssai_local_var;
end:
diff --git a/lib/sbi/openapi/model/allowed_snssai.h b/lib/sbi/openapi/model/allowed_snssai.h
index 2b170138d..64b8d780d 100644
--- a/lib/sbi/openapi/model/allowed_snssai.h
+++ b/lib/sbi/openapi/model/allowed_snssai.h
@@ -1,7 +1,7 @@
/*
* allowed_snssai.h
*
- *
+ *
*/
#ifndef _OpenAPI_allowed_snssai_H_
@@ -30,7 +30,7 @@ OpenAPI_allowed_snssai_t *OpenAPI_allowed_snssai_create(
OpenAPI_snssai_t *allowed_snssai,
OpenAPI_list_t *nsi_information_list,
OpenAPI_snssai_t *mapped_home_snssai
- );
+);
void OpenAPI_allowed_snssai_free(OpenAPI_allowed_snssai_t *allowed_snssai);
OpenAPI_allowed_snssai_t *OpenAPI_allowed_snssai_parseFromJSON(cJSON *allowed_snssaiJSON);
cJSON *OpenAPI_allowed_snssai_convertToJSON(OpenAPI_allowed_snssai_t *allowed_snssai);
diff --git a/lib/sbi/openapi/model/alternative_qos_profile.c b/lib/sbi/openapi/model/alternative_qos_profile.c
index e7bd14f97..9b702b425 100644
--- a/lib/sbi/openapi/model/alternative_qos_profile.c
+++ b/lib/sbi/openapi/model/alternative_qos_profile.c
@@ -10,7 +10,7 @@ OpenAPI_alternative_qos_profile_t *OpenAPI_alternative_qos_profile_create(
char *gua_fbr_ul,
int packet_delay_budget,
char *packet_err_rate
- )
+)
{
OpenAPI_alternative_qos_profile_t *alternative_qos_profile_local_var = OpenAPI_malloc(sizeof(OpenAPI_alternative_qos_profile_t));
if (!alternative_qos_profile_local_var) {
@@ -53,31 +53,31 @@ cJSON *OpenAPI_alternative_qos_profile_convertToJSON(OpenAPI_alternative_qos_pro
}
if (alternative_qos_profile->gua_fbr_dl) {
- if (cJSON_AddStringToObject(item, "guaFbrDl", alternative_qos_profile->gua_fbr_dl) == NULL) {
- ogs_error("OpenAPI_alternative_qos_profile_convertToJSON() failed [gua_fbr_dl]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "guaFbrDl", alternative_qos_profile->gua_fbr_dl) == NULL) {
+ ogs_error("OpenAPI_alternative_qos_profile_convertToJSON() failed [gua_fbr_dl]");
+ goto end;
+ }
}
if (alternative_qos_profile->gua_fbr_ul) {
- if (cJSON_AddStringToObject(item, "guaFbrUl", alternative_qos_profile->gua_fbr_ul) == NULL) {
- ogs_error("OpenAPI_alternative_qos_profile_convertToJSON() failed [gua_fbr_ul]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "guaFbrUl", alternative_qos_profile->gua_fbr_ul) == NULL) {
+ ogs_error("OpenAPI_alternative_qos_profile_convertToJSON() failed [gua_fbr_ul]");
+ goto end;
+ }
}
if (alternative_qos_profile->packet_delay_budget) {
- if (cJSON_AddNumberToObject(item, "packetDelayBudget", alternative_qos_profile->packet_delay_budget) == NULL) {
- ogs_error("OpenAPI_alternative_qos_profile_convertToJSON() failed [packet_delay_budget]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "packetDelayBudget", alternative_qos_profile->packet_delay_budget) == NULL) {
+ ogs_error("OpenAPI_alternative_qos_profile_convertToJSON() failed [packet_delay_budget]");
+ goto end;
+ }
}
if (alternative_qos_profile->packet_err_rate) {
- if (cJSON_AddStringToObject(item, "packetErrRate", alternative_qos_profile->packet_err_rate) == NULL) {
- ogs_error("OpenAPI_alternative_qos_profile_convertToJSON() failed [packet_err_rate]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "packetErrRate", alternative_qos_profile->packet_err_rate) == NULL) {
+ ogs_error("OpenAPI_alternative_qos_profile_convertToJSON() failed [packet_err_rate]");
+ goto end;
+ }
}
end:
@@ -93,7 +93,7 @@ OpenAPI_alternative_qos_profile_t *OpenAPI_alternative_qos_profile_parseFromJSON
goto end;
}
-
+
if (!cJSON_IsNumber(index)) {
ogs_error("OpenAPI_alternative_qos_profile_parseFromJSON() failed [index]");
goto end;
@@ -101,38 +101,38 @@ OpenAPI_alternative_qos_profile_t *OpenAPI_alternative_qos_profile_parseFromJSON
cJSON *gua_fbr_dl = cJSON_GetObjectItemCaseSensitive(alternative_qos_profileJSON, "guaFbrDl");
- if (gua_fbr_dl) {
- if (!cJSON_IsString(gua_fbr_dl)) {
- ogs_error("OpenAPI_alternative_qos_profile_parseFromJSON() failed [gua_fbr_dl]");
- goto end;
- }
+ if (gua_fbr_dl) {
+ if (!cJSON_IsString(gua_fbr_dl)) {
+ ogs_error("OpenAPI_alternative_qos_profile_parseFromJSON() failed [gua_fbr_dl]");
+ goto end;
+ }
}
cJSON *gua_fbr_ul = cJSON_GetObjectItemCaseSensitive(alternative_qos_profileJSON, "guaFbrUl");
- if (gua_fbr_ul) {
- if (!cJSON_IsString(gua_fbr_ul)) {
- ogs_error("OpenAPI_alternative_qos_profile_parseFromJSON() failed [gua_fbr_ul]");
- goto end;
- }
+ if (gua_fbr_ul) {
+ if (!cJSON_IsString(gua_fbr_ul)) {
+ ogs_error("OpenAPI_alternative_qos_profile_parseFromJSON() failed [gua_fbr_ul]");
+ goto end;
+ }
}
cJSON *packet_delay_budget = cJSON_GetObjectItemCaseSensitive(alternative_qos_profileJSON, "packetDelayBudget");
- if (packet_delay_budget) {
- if (!cJSON_IsNumber(packet_delay_budget)) {
- ogs_error("OpenAPI_alternative_qos_profile_parseFromJSON() failed [packet_delay_budget]");
- goto end;
- }
+ if (packet_delay_budget) {
+ if (!cJSON_IsNumber(packet_delay_budget)) {
+ ogs_error("OpenAPI_alternative_qos_profile_parseFromJSON() failed [packet_delay_budget]");
+ goto end;
+ }
}
cJSON *packet_err_rate = cJSON_GetObjectItemCaseSensitive(alternative_qos_profileJSON, "packetErrRate");
- if (packet_err_rate) {
- if (!cJSON_IsString(packet_err_rate)) {
- ogs_error("OpenAPI_alternative_qos_profile_parseFromJSON() failed [packet_err_rate]");
- goto end;
- }
+ if (packet_err_rate) {
+ if (!cJSON_IsString(packet_err_rate)) {
+ ogs_error("OpenAPI_alternative_qos_profile_parseFromJSON() failed [packet_err_rate]");
+ goto end;
+ }
}
alternative_qos_profile_local_var = OpenAPI_alternative_qos_profile_create (
@@ -141,7 +141,7 @@ OpenAPI_alternative_qos_profile_t *OpenAPI_alternative_qos_profile_parseFromJSON
gua_fbr_ul ? ogs_strdup_or_assert(gua_fbr_ul->valuestring) : NULL,
packet_delay_budget ? packet_delay_budget->valuedouble : 0,
packet_err_rate ? ogs_strdup_or_assert(packet_err_rate->valuestring) : NULL
- );
+ );
return alternative_qos_profile_local_var;
end:
diff --git a/lib/sbi/openapi/model/alternative_qos_profile.h b/lib/sbi/openapi/model/alternative_qos_profile.h
index d347d58a0..e97546612 100644
--- a/lib/sbi/openapi/model/alternative_qos_profile.h
+++ b/lib/sbi/openapi/model/alternative_qos_profile.h
@@ -1,7 +1,7 @@
/*
* alternative_qos_profile.h
*
- *
+ *
*/
#ifndef _OpenAPI_alternative_qos_profile_H_
@@ -32,7 +32,7 @@ OpenAPI_alternative_qos_profile_t *OpenAPI_alternative_qos_profile_create(
char *gua_fbr_ul,
int packet_delay_budget,
char *packet_err_rate
- );
+);
void OpenAPI_alternative_qos_profile_free(OpenAPI_alternative_qos_profile_t *alternative_qos_profile);
OpenAPI_alternative_qos_profile_t *OpenAPI_alternative_qos_profile_parseFromJSON(cJSON *alternative_qos_profileJSON);
cJSON *OpenAPI_alternative_qos_profile_convertToJSON(OpenAPI_alternative_qos_profile_t *alternative_qos_profile);
diff --git a/lib/sbi/openapi/model/am_policy_data.c b/lib/sbi/openapi/model/am_policy_data.c
index a5dee2480..7746754ab 100644
--- a/lib/sbi/openapi/model/am_policy_data.c
+++ b/lib/sbi/openapi/model/am_policy_data.c
@@ -7,7 +7,7 @@
OpenAPI_am_policy_data_t *OpenAPI_am_policy_data_create(
OpenAPI_list_t* pra_infos,
OpenAPI_list_t *subsc_cats
- )
+)
{
OpenAPI_am_policy_data_t *am_policy_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_am_policy_data_t));
if (!am_policy_data_local_var) {
@@ -49,40 +49,40 @@ cJSON *OpenAPI_am_policy_data_convertToJSON(OpenAPI_am_policy_data_t *am_policy_
item = cJSON_CreateObject();
if (am_policy_data->pra_infos) {
- cJSON *pra_infos = cJSON_AddObjectToObject(item, "praInfos");
- if (pra_infos == NULL) {
+ cJSON *pra_infos = cJSON_AddObjectToObject(item, "praInfos");
+ if (pra_infos == NULL) {
+ ogs_error("OpenAPI_am_policy_data_convertToJSON() failed [pra_infos]");
+ goto end;
+ }
+ cJSON *localMapObject = pra_infos;
+ OpenAPI_lnode_t *pra_infos_node;
+ if (am_policy_data->pra_infos) {
+ OpenAPI_list_for_each(am_policy_data->pra_infos, pra_infos_node) {
+ OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)pra_infos_node->data;
+ cJSON *itemLocal = OpenAPI_presence_info_convertToJSON(localKeyValue->value);
+ if (itemLocal == NULL) {
ogs_error("OpenAPI_am_policy_data_convertToJSON() failed [pra_infos]");
goto end;
}
- cJSON *localMapObject = pra_infos;
- OpenAPI_lnode_t *pra_infos_node;
- if (am_policy_data->pra_infos) {
- OpenAPI_list_for_each(am_policy_data->pra_infos, pra_infos_node) {
- OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)pra_infos_node->data;
- cJSON *itemLocal = OpenAPI_presence_info_convertToJSON(localKeyValue->value);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_am_policy_data_convertToJSON() failed [pra_infos]");
- goto end;
- }
- cJSON_AddItemToObject(pra_infos, localKeyValue->key, itemLocal);
+ cJSON_AddItemToObject(pra_infos, localKeyValue->key, itemLocal);
}
}
}
if (am_policy_data->subsc_cats) {
- cJSON *subsc_cats = cJSON_AddArrayToObject(item, "subscCats");
- if (subsc_cats == NULL) {
- ogs_error("OpenAPI_am_policy_data_convertToJSON() failed [subsc_cats]");
- goto end;
- }
+ cJSON *subsc_cats = cJSON_AddArrayToObject(item, "subscCats");
+ if (subsc_cats == NULL) {
+ ogs_error("OpenAPI_am_policy_data_convertToJSON() failed [subsc_cats]");
+ goto end;
+ }
- OpenAPI_lnode_t *subsc_cats_node;
- OpenAPI_list_for_each(am_policy_data->subsc_cats, subsc_cats_node) {
- if (cJSON_AddStringToObject(subsc_cats, "", (char*)subsc_cats_node->data) == NULL) {
- ogs_error("OpenAPI_am_policy_data_convertToJSON() failed [subsc_cats]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *subsc_cats_node;
+ OpenAPI_list_for_each(am_policy_data->subsc_cats, subsc_cats_node) {
+ if (cJSON_AddStringToObject(subsc_cats, "", (char*)subsc_cats_node->data) == NULL) {
+ ogs_error("OpenAPI_am_policy_data_convertToJSON() failed [subsc_cats]");
+ goto end;
+ }
+ }
}
end:
@@ -95,50 +95,50 @@ OpenAPI_am_policy_data_t *OpenAPI_am_policy_data_parseFromJSON(cJSON *am_policy_
cJSON *pra_infos = cJSON_GetObjectItemCaseSensitive(am_policy_dataJSON, "praInfos");
OpenAPI_list_t *pra_infosList;
- if (pra_infos) {
- cJSON *pra_infos_local_map;
- if (!cJSON_IsObject(pra_infos)) {
+ if (pra_infos) {
+ cJSON *pra_infos_local_map;
+ if (!cJSON_IsObject(pra_infos)) {
+ ogs_error("OpenAPI_am_policy_data_parseFromJSON() failed [pra_infos]");
+ goto end;
+ }
+ pra_infosList = OpenAPI_list_create();
+ OpenAPI_map_t *localMapKeyPair = NULL;
+ cJSON_ArrayForEach(pra_infos_local_map, pra_infos) {
+ cJSON *localMapObject = pra_infos_local_map;
+ if (!cJSON_IsObject(pra_infos_local_map)) {
ogs_error("OpenAPI_am_policy_data_parseFromJSON() failed [pra_infos]");
goto end;
}
- pra_infosList = OpenAPI_list_create();
- OpenAPI_map_t *localMapKeyPair = NULL;
- cJSON_ArrayForEach(pra_infos_local_map, pra_infos) {
- cJSON *localMapObject = pra_infos_local_map;
- if (!cJSON_IsObject(pra_infos_local_map)) {
- ogs_error("OpenAPI_am_policy_data_parseFromJSON() failed [pra_infos]");
- goto end;
- }
- localMapKeyPair = OpenAPI_map_create(
- localMapObject->string, OpenAPI_presence_info_parseFromJSON(localMapObject));
- OpenAPI_list_add(pra_infosList, localMapKeyPair);
- }
+ localMapKeyPair = OpenAPI_map_create(
+ localMapObject->string, OpenAPI_presence_info_parseFromJSON(localMapObject));
+ OpenAPI_list_add(pra_infosList , localMapKeyPair);
+ }
}
cJSON *subsc_cats = cJSON_GetObjectItemCaseSensitive(am_policy_dataJSON, "subscCats");
OpenAPI_list_t *subsc_catsList;
- if (subsc_cats) {
- cJSON *subsc_cats_local;
- if (!cJSON_IsArray(subsc_cats)) {
- ogs_error("OpenAPI_am_policy_data_parseFromJSON() failed [subsc_cats]");
- goto end;
- }
- subsc_catsList = OpenAPI_list_create();
+ if (subsc_cats) {
+ cJSON *subsc_cats_local;
+ if (!cJSON_IsArray(subsc_cats)) {
+ ogs_error("OpenAPI_am_policy_data_parseFromJSON() failed [subsc_cats]");
+ goto end;
+ }
+ subsc_catsList = OpenAPI_list_create();
- cJSON_ArrayForEach(subsc_cats_local, subsc_cats) {
- if (!cJSON_IsString(subsc_cats_local)) {
- ogs_error("OpenAPI_am_policy_data_parseFromJSON() failed [subsc_cats]");
- goto end;
- }
- OpenAPI_list_add(subsc_catsList, ogs_strdup_or_assert(subsc_cats_local->valuestring));
- }
+ cJSON_ArrayForEach(subsc_cats_local, subsc_cats) {
+ if (!cJSON_IsString(subsc_cats_local)) {
+ ogs_error("OpenAPI_am_policy_data_parseFromJSON() failed [subsc_cats]");
+ goto end;
+ }
+ OpenAPI_list_add(subsc_catsList , ogs_strdup_or_assert(subsc_cats_local->valuestring));
+ }
}
am_policy_data_local_var = OpenAPI_am_policy_data_create (
pra_infos ? pra_infosList : NULL,
subsc_cats ? subsc_catsList : NULL
- );
+ );
return am_policy_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/am_policy_data.h b/lib/sbi/openapi/model/am_policy_data.h
index bd1955106..4bc3ba904 100644
--- a/lib/sbi/openapi/model/am_policy_data.h
+++ b/lib/sbi/openapi/model/am_policy_data.h
@@ -27,7 +27,7 @@ typedef struct OpenAPI_am_policy_data_s {
OpenAPI_am_policy_data_t *OpenAPI_am_policy_data_create(
OpenAPI_list_t* pra_infos,
OpenAPI_list_t *subsc_cats
- );
+);
void OpenAPI_am_policy_data_free(OpenAPI_am_policy_data_t *am_policy_data);
OpenAPI_am_policy_data_t *OpenAPI_am_policy_data_parseFromJSON(cJSON *am_policy_dataJSON);
cJSON *OpenAPI_am_policy_data_convertToJSON(OpenAPI_am_policy_data_t *am_policy_data);
diff --git a/lib/sbi/openapi/model/ambr.c b/lib/sbi/openapi/model/ambr.c
index 25f249d15..36a65eeb3 100644
--- a/lib/sbi/openapi/model/ambr.c
+++ b/lib/sbi/openapi/model/ambr.c
@@ -7,7 +7,7 @@
OpenAPI_ambr_t *OpenAPI_ambr_create(
char *uplink,
char *downlink
- )
+)
{
OpenAPI_ambr_t *ambr_local_var = OpenAPI_malloc(sizeof(OpenAPI_ambr_t));
if (!ambr_local_var) {
@@ -63,7 +63,7 @@ OpenAPI_ambr_t *OpenAPI_ambr_parseFromJSON(cJSON *ambrJSON)
goto end;
}
-
+
if (!cJSON_IsString(uplink)) {
ogs_error("OpenAPI_ambr_parseFromJSON() failed [uplink]");
goto end;
@@ -75,7 +75,7 @@ OpenAPI_ambr_t *OpenAPI_ambr_parseFromJSON(cJSON *ambrJSON)
goto end;
}
-
+
if (!cJSON_IsString(downlink)) {
ogs_error("OpenAPI_ambr_parseFromJSON() failed [downlink]");
goto end;
@@ -84,7 +84,7 @@ OpenAPI_ambr_t *OpenAPI_ambr_parseFromJSON(cJSON *ambrJSON)
ambr_local_var = OpenAPI_ambr_create (
ogs_strdup_or_assert(uplink->valuestring),
ogs_strdup_or_assert(downlink->valuestring)
- );
+ );
return ambr_local_var;
end:
diff --git a/lib/sbi/openapi/model/ambr.h b/lib/sbi/openapi/model/ambr.h
index a91a5ecd1..a6abf69f1 100644
--- a/lib/sbi/openapi/model/ambr.h
+++ b/lib/sbi/openapi/model/ambr.h
@@ -1,7 +1,7 @@
/*
* ambr.h
*
- *
+ *
*/
#ifndef _OpenAPI_ambr_H_
@@ -26,7 +26,7 @@ typedef struct OpenAPI_ambr_s {
OpenAPI_ambr_t *OpenAPI_ambr_create(
char *uplink,
char *downlink
- );
+);
void OpenAPI_ambr_free(OpenAPI_ambr_t *ambr);
OpenAPI_ambr_t *OpenAPI_ambr_parseFromJSON(cJSON *ambrJSON);
cJSON *OpenAPI_ambr_convertToJSON(OpenAPI_ambr_t *ambr);
diff --git a/lib/sbi/openapi/model/ambr_1.c b/lib/sbi/openapi/model/ambr_1.c
new file mode 100644
index 000000000..2938586d6
--- /dev/null
+++ b/lib/sbi/openapi/model/ambr_1.c
@@ -0,0 +1,127 @@
+
+#include
+#include
+#include
+#include "ambr_1.h"
+
+OpenAPI_ambr_1_t *OpenAPI_ambr_1_create(
+ char *uplink,
+ char *downlink
+)
+{
+ OpenAPI_ambr_1_t *ambr_1_local_var = OpenAPI_malloc(sizeof(OpenAPI_ambr_1_t));
+ if (!ambr_1_local_var) {
+ return NULL;
+ }
+ ambr_1_local_var->uplink = uplink;
+ ambr_1_local_var->downlink = downlink;
+
+ return ambr_1_local_var;
+}
+
+void OpenAPI_ambr_1_free(OpenAPI_ambr_1_t *ambr_1)
+{
+ if (NULL == ambr_1) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ ogs_free(ambr_1->uplink);
+ ogs_free(ambr_1->downlink);
+ ogs_free(ambr_1);
+}
+
+cJSON *OpenAPI_ambr_1_convertToJSON(OpenAPI_ambr_1_t *ambr_1)
+{
+ cJSON *item = NULL;
+
+ if (ambr_1 == NULL) {
+ ogs_error("OpenAPI_ambr_1_convertToJSON() failed [Ambr_1]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (cJSON_AddStringToObject(item, "uplink", ambr_1->uplink) == NULL) {
+ ogs_error("OpenAPI_ambr_1_convertToJSON() failed [uplink]");
+ goto end;
+ }
+
+ if (cJSON_AddStringToObject(item, "downlink", ambr_1->downlink) == NULL) {
+ ogs_error("OpenAPI_ambr_1_convertToJSON() failed [downlink]");
+ goto end;
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_ambr_1_t *OpenAPI_ambr_1_parseFromJSON(cJSON *ambr_1JSON)
+{
+ OpenAPI_ambr_1_t *ambr_1_local_var = NULL;
+ cJSON *uplink = cJSON_GetObjectItemCaseSensitive(ambr_1JSON, "uplink");
+ if (!uplink) {
+ ogs_error("OpenAPI_ambr_1_parseFromJSON() failed [uplink]");
+ goto end;
+ }
+
+
+ if (!cJSON_IsString(uplink)) {
+ ogs_error("OpenAPI_ambr_1_parseFromJSON() failed [uplink]");
+ goto end;
+ }
+
+ cJSON *downlink = cJSON_GetObjectItemCaseSensitive(ambr_1JSON, "downlink");
+ if (!downlink) {
+ ogs_error("OpenAPI_ambr_1_parseFromJSON() failed [downlink]");
+ goto end;
+ }
+
+
+ if (!cJSON_IsString(downlink)) {
+ ogs_error("OpenAPI_ambr_1_parseFromJSON() failed [downlink]");
+ goto end;
+ }
+
+ ambr_1_local_var = OpenAPI_ambr_1_create (
+ ogs_strdup_or_assert(uplink->valuestring),
+ ogs_strdup_or_assert(downlink->valuestring)
+ );
+
+ return ambr_1_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_ambr_1_t *OpenAPI_ambr_1_copy(OpenAPI_ambr_1_t *dst, OpenAPI_ambr_1_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_ambr_1_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_ambr_1_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_ambr_1_free(dst);
+ dst = OpenAPI_ambr_1_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/ambr_1.h b/lib/sbi/openapi/model/ambr_1.h
new file mode 100644
index 000000000..8d9395d99
--- /dev/null
+++ b/lib/sbi/openapi/model/ambr_1.h
@@ -0,0 +1,40 @@
+/*
+ * ambr_1.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_ambr_1_H_
+#define _OpenAPI_ambr_1_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_ambr_1_s OpenAPI_ambr_1_t;
+typedef struct OpenAPI_ambr_1_s {
+ char *uplink;
+ char *downlink;
+} OpenAPI_ambr_1_t;
+
+OpenAPI_ambr_1_t *OpenAPI_ambr_1_create(
+ char *uplink,
+ char *downlink
+);
+void OpenAPI_ambr_1_free(OpenAPI_ambr_1_t *ambr_1);
+OpenAPI_ambr_1_t *OpenAPI_ambr_1_parseFromJSON(cJSON *ambr_1JSON);
+cJSON *OpenAPI_ambr_1_convertToJSON(OpenAPI_ambr_1_t *ambr_1);
+OpenAPI_ambr_1_t *OpenAPI_ambr_1_copy(OpenAPI_ambr_1_t *dst, OpenAPI_ambr_1_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_ambr_1_H_ */
+
diff --git a/lib/sbi/openapi/model/ambr_rm.c b/lib/sbi/openapi/model/ambr_rm.c
index 54a22cba8..79fe05793 100644
--- a/lib/sbi/openapi/model/ambr_rm.c
+++ b/lib/sbi/openapi/model/ambr_rm.c
@@ -7,7 +7,7 @@
OpenAPI_ambr_rm_t *OpenAPI_ambr_rm_create(
char *uplink,
char *downlink
- )
+)
{
OpenAPI_ambr_rm_t *ambr_rm_local_var = OpenAPI_malloc(sizeof(OpenAPI_ambr_rm_t));
if (!ambr_rm_local_var) {
@@ -63,7 +63,7 @@ OpenAPI_ambr_rm_t *OpenAPI_ambr_rm_parseFromJSON(cJSON *ambr_rmJSON)
goto end;
}
-
+
if (!cJSON_IsString(uplink)) {
ogs_error("OpenAPI_ambr_rm_parseFromJSON() failed [uplink]");
goto end;
@@ -75,7 +75,7 @@ OpenAPI_ambr_rm_t *OpenAPI_ambr_rm_parseFromJSON(cJSON *ambr_rmJSON)
goto end;
}
-
+
if (!cJSON_IsString(downlink)) {
ogs_error("OpenAPI_ambr_rm_parseFromJSON() failed [downlink]");
goto end;
@@ -84,7 +84,7 @@ OpenAPI_ambr_rm_t *OpenAPI_ambr_rm_parseFromJSON(cJSON *ambr_rmJSON)
ambr_rm_local_var = OpenAPI_ambr_rm_create (
ogs_strdup_or_assert(uplink->valuestring),
ogs_strdup_or_assert(downlink->valuestring)
- );
+ );
return ambr_rm_local_var;
end:
diff --git a/lib/sbi/openapi/model/ambr_rm.h b/lib/sbi/openapi/model/ambr_rm.h
index 13b2d69b2..002cd57b0 100644
--- a/lib/sbi/openapi/model/ambr_rm.h
+++ b/lib/sbi/openapi/model/ambr_rm.h
@@ -1,7 +1,7 @@
/*
* ambr_rm.h
*
- *
+ *
*/
#ifndef _OpenAPI_ambr_rm_H_
@@ -28,7 +28,7 @@ typedef struct OpenAPI_ambr_rm_s {
OpenAPI_ambr_rm_t *OpenAPI_ambr_rm_create(
char *uplink,
char *downlink
- );
+);
void OpenAPI_ambr_rm_free(OpenAPI_ambr_rm_t *ambr_rm);
OpenAPI_ambr_rm_t *OpenAPI_ambr_rm_parseFromJSON(cJSON *ambr_rmJSON);
cJSON *OpenAPI_ambr_rm_convertToJSON(OpenAPI_ambr_rm_t *ambr_rm);
diff --git a/lib/sbi/openapi/model/amf3_gpp_access_registration.c b/lib/sbi/openapi/model/amf3_gpp_access_registration.c
index 7a73d9755..e3360b28b 100644
--- a/lib/sbi/openapi/model/amf3_gpp_access_registration.c
+++ b/lib/sbi/openapi/model/amf3_gpp_access_registration.c
@@ -26,8 +26,9 @@ OpenAPI_amf3_gpp_access_registration_t *OpenAPI_amf3_gpp_access_registration_cre
char *registration_time,
OpenAPI_vgmlc_address_t *vgmlc_address,
OpenAPI_context_info_t *context_info,
- int no_ee_subscription_ind
- )
+ int no_ee_subscription_ind,
+ char *supi
+)
{
OpenAPI_amf3_gpp_access_registration_t *amf3_gpp_access_registration_local_var = OpenAPI_malloc(sizeof(OpenAPI_amf3_gpp_access_registration_t));
if (!amf3_gpp_access_registration_local_var) {
@@ -55,6 +56,7 @@ OpenAPI_amf3_gpp_access_registration_t *OpenAPI_amf3_gpp_access_registration_cre
amf3_gpp_access_registration_local_var->vgmlc_address = vgmlc_address;
amf3_gpp_access_registration_local_var->context_info = context_info;
amf3_gpp_access_registration_local_var->no_ee_subscription_ind = no_ee_subscription_ind;
+ amf3_gpp_access_registration_local_var->supi = supi;
return amf3_gpp_access_registration_local_var;
}
@@ -82,6 +84,7 @@ void OpenAPI_amf3_gpp_access_registration_free(OpenAPI_amf3_gpp_access_registrat
ogs_free(amf3_gpp_access_registration->registration_time);
OpenAPI_vgmlc_address_free(amf3_gpp_access_registration->vgmlc_address);
OpenAPI_context_info_free(amf3_gpp_access_registration->context_info);
+ ogs_free(amf3_gpp_access_registration->supi);
ogs_free(amf3_gpp_access_registration);
}
@@ -101,31 +104,31 @@ cJSON *OpenAPI_amf3_gpp_access_registration_convertToJSON(OpenAPI_amf3_gpp_acces
}
if (amf3_gpp_access_registration->supported_features) {
- if (cJSON_AddStringToObject(item, "supportedFeatures", amf3_gpp_access_registration->supported_features) == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [supported_features]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "supportedFeatures", amf3_gpp_access_registration->supported_features) == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [supported_features]");
+ goto end;
+ }
}
if (amf3_gpp_access_registration->purge_flag) {
- if (cJSON_AddBoolToObject(item, "purgeFlag", amf3_gpp_access_registration->purge_flag) == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [purge_flag]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "purgeFlag", amf3_gpp_access_registration->purge_flag) == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [purge_flag]");
+ goto end;
+ }
}
if (amf3_gpp_access_registration->pei) {
- if (cJSON_AddStringToObject(item, "pei", amf3_gpp_access_registration->pei) == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [pei]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "pei", amf3_gpp_access_registration->pei) == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [pei]");
+ goto end;
+ }
}
if (amf3_gpp_access_registration->ims_vo_ps) {
- if (cJSON_AddStringToObject(item, "imsVoPs", OpenAPI_ims_vo_ps_ToString(amf3_gpp_access_registration->ims_vo_ps)) == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [ims_vo_ps]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "imsVoPs", OpenAPI_ims_vo_ps_ToString(amf3_gpp_access_registration->ims_vo_ps)) == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [ims_vo_ps]");
+ goto end;
+ }
}
if (cJSON_AddStringToObject(item, "deregCallbackUri", amf3_gpp_access_registration->dereg_callback_uri) == NULL) {
@@ -134,31 +137,31 @@ cJSON *OpenAPI_amf3_gpp_access_registration_convertToJSON(OpenAPI_amf3_gpp_acces
}
if (amf3_gpp_access_registration->amf_service_name_dereg) {
- if (cJSON_AddStringToObject(item, "amfServiceNameDereg", amf3_gpp_access_registration->amf_service_name_dereg) == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [amf_service_name_dereg]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "amfServiceNameDereg", amf3_gpp_access_registration->amf_service_name_dereg) == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [amf_service_name_dereg]");
+ goto end;
+ }
}
if (amf3_gpp_access_registration->pcscf_restoration_callback_uri) {
- if (cJSON_AddStringToObject(item, "pcscfRestorationCallbackUri", amf3_gpp_access_registration->pcscf_restoration_callback_uri) == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [pcscf_restoration_callback_uri]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "pcscfRestorationCallbackUri", amf3_gpp_access_registration->pcscf_restoration_callback_uri) == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [pcscf_restoration_callback_uri]");
+ goto end;
+ }
}
if (amf3_gpp_access_registration->amf_service_name_pcscf_rest) {
- if (cJSON_AddStringToObject(item, "amfServiceNamePcscfRest", amf3_gpp_access_registration->amf_service_name_pcscf_rest) == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [amf_service_name_pcscf_rest]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "amfServiceNamePcscfRest", amf3_gpp_access_registration->amf_service_name_pcscf_rest) == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [amf_service_name_pcscf_rest]");
+ goto end;
+ }
}
if (amf3_gpp_access_registration->initial_registration_ind) {
- if (cJSON_AddBoolToObject(item, "initialRegistrationInd", amf3_gpp_access_registration->initial_registration_ind) == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [initial_registration_ind]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "initialRegistrationInd", amf3_gpp_access_registration->initial_registration_ind) == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [initial_registration_ind]");
+ goto end;
+ }
}
cJSON *guami_local_JSON = OpenAPI_guami_convertToJSON(amf3_gpp_access_registration->guami);
@@ -173,30 +176,30 @@ cJSON *OpenAPI_amf3_gpp_access_registration_convertToJSON(OpenAPI_amf3_gpp_acces
}
if (amf3_gpp_access_registration->backup_amf_info) {
- cJSON *backup_amf_infoList = cJSON_AddArrayToObject(item, "backupAmfInfo");
- if (backup_amf_infoList == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [backup_amf_info]");
- goto end;
- }
+ cJSON *backup_amf_infoList = cJSON_AddArrayToObject(item, "backupAmfInfo");
+ if (backup_amf_infoList == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [backup_amf_info]");
+ goto end;
+ }
- OpenAPI_lnode_t *backup_amf_info_node;
- if (amf3_gpp_access_registration->backup_amf_info) {
- OpenAPI_list_for_each(amf3_gpp_access_registration->backup_amf_info, backup_amf_info_node) {
- cJSON *itemLocal = OpenAPI_backup_amf_info_convertToJSON(backup_amf_info_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [backup_amf_info]");
- goto end;
- }
- cJSON_AddItemToArray(backup_amf_infoList, itemLocal);
+ OpenAPI_lnode_t *backup_amf_info_node;
+ if (amf3_gpp_access_registration->backup_amf_info) {
+ OpenAPI_list_for_each(amf3_gpp_access_registration->backup_amf_info, backup_amf_info_node) {
+ cJSON *itemLocal = OpenAPI_backup_amf_info_convertToJSON(backup_amf_info_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [backup_amf_info]");
+ goto end;
}
+ cJSON_AddItemToArray(backup_amf_infoList, itemLocal);
}
}
+ }
if (amf3_gpp_access_registration->dr_flag) {
- if (cJSON_AddBoolToObject(item, "drFlag", amf3_gpp_access_registration->dr_flag) == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [dr_flag]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "drFlag", amf3_gpp_access_registration->dr_flag) == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [dr_flag]");
+ goto end;
+ }
}
if (cJSON_AddStringToObject(item, "ratType", OpenAPI_rat_type_ToString(amf3_gpp_access_registration->rat_type)) == NULL) {
@@ -205,77 +208,84 @@ cJSON *OpenAPI_amf3_gpp_access_registration_convertToJSON(OpenAPI_amf3_gpp_acces
}
if (amf3_gpp_access_registration->urrp_indicator) {
- if (cJSON_AddBoolToObject(item, "urrpIndicator", amf3_gpp_access_registration->urrp_indicator) == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [urrp_indicator]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "urrpIndicator", amf3_gpp_access_registration->urrp_indicator) == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [urrp_indicator]");
+ goto end;
+ }
}
if (amf3_gpp_access_registration->amf_ee_subscription_id) {
- if (cJSON_AddStringToObject(item, "amfEeSubscriptionId", amf3_gpp_access_registration->amf_ee_subscription_id) == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [amf_ee_subscription_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "amfEeSubscriptionId", amf3_gpp_access_registration->amf_ee_subscription_id) == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [amf_ee_subscription_id]");
+ goto end;
+ }
}
if (amf3_gpp_access_registration->eps_interworking_info) {
- cJSON *eps_interworking_info_local_JSON = OpenAPI_eps_interworking_info_convertToJSON(amf3_gpp_access_registration->eps_interworking_info);
- if (eps_interworking_info_local_JSON == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [eps_interworking_info]");
- goto end;
- }
- cJSON_AddItemToObject(item, "epsInterworkingInfo", eps_interworking_info_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [eps_interworking_info]");
- goto end;
- }
+ cJSON *eps_interworking_info_local_JSON = OpenAPI_eps_interworking_info_convertToJSON(amf3_gpp_access_registration->eps_interworking_info);
+ if (eps_interworking_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [eps_interworking_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "epsInterworkingInfo", eps_interworking_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [eps_interworking_info]");
+ goto end;
+ }
}
if (amf3_gpp_access_registration->ue_srvcc_capability) {
- if (cJSON_AddBoolToObject(item, "ueSrvccCapability", amf3_gpp_access_registration->ue_srvcc_capability) == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [ue_srvcc_capability]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "ueSrvccCapability", amf3_gpp_access_registration->ue_srvcc_capability) == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [ue_srvcc_capability]");
+ goto end;
+ }
}
if (amf3_gpp_access_registration->registration_time) {
- if (cJSON_AddStringToObject(item, "registrationTime", amf3_gpp_access_registration->registration_time) == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [registration_time]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "registrationTime", amf3_gpp_access_registration->registration_time) == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [registration_time]");
+ goto end;
+ }
}
if (amf3_gpp_access_registration->vgmlc_address) {
- cJSON *vgmlc_address_local_JSON = OpenAPI_vgmlc_address_convertToJSON(amf3_gpp_access_registration->vgmlc_address);
- if (vgmlc_address_local_JSON == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [vgmlc_address]");
- goto end;
- }
- cJSON_AddItemToObject(item, "vgmlcAddress", vgmlc_address_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [vgmlc_address]");
- goto end;
- }
+ cJSON *vgmlc_address_local_JSON = OpenAPI_vgmlc_address_convertToJSON(amf3_gpp_access_registration->vgmlc_address);
+ if (vgmlc_address_local_JSON == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [vgmlc_address]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "vgmlcAddress", vgmlc_address_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [vgmlc_address]");
+ goto end;
+ }
}
if (amf3_gpp_access_registration->context_info) {
- cJSON *context_info_local_JSON = OpenAPI_context_info_convertToJSON(amf3_gpp_access_registration->context_info);
- if (context_info_local_JSON == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [context_info]");
- goto end;
- }
- cJSON_AddItemToObject(item, "contextInfo", context_info_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [context_info]");
- goto end;
- }
+ cJSON *context_info_local_JSON = OpenAPI_context_info_convertToJSON(amf3_gpp_access_registration->context_info);
+ if (context_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [context_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "contextInfo", context_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [context_info]");
+ goto end;
+ }
}
if (amf3_gpp_access_registration->no_ee_subscription_ind) {
- if (cJSON_AddBoolToObject(item, "noEeSubscriptionInd", amf3_gpp_access_registration->no_ee_subscription_ind) == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [no_ee_subscription_ind]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "noEeSubscriptionInd", amf3_gpp_access_registration->no_ee_subscription_ind) == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [no_ee_subscription_ind]");
+ goto end;
+ }
+ }
+
+ if (amf3_gpp_access_registration->supi) {
+ if (cJSON_AddStringToObject(item, "supi", amf3_gpp_access_registration->supi) == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [supi]");
+ goto end;
+ }
}
end:
@@ -291,7 +301,7 @@ OpenAPI_amf3_gpp_access_registration_t *OpenAPI_amf3_gpp_access_registration_par
goto end;
}
-
+
if (!cJSON_IsString(amf_instance_id)) {
ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [amf_instance_id]");
goto end;
@@ -299,40 +309,40 @@ OpenAPI_amf3_gpp_access_registration_t *OpenAPI_amf3_gpp_access_registration_par
cJSON *supported_features = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "supportedFeatures");
- if (supported_features) {
- if (!cJSON_IsString(supported_features)) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [supported_features]");
- goto end;
- }
+ if (supported_features) {
+ if (!cJSON_IsString(supported_features)) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [supported_features]");
+ goto end;
+ }
}
cJSON *purge_flag = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "purgeFlag");
- if (purge_flag) {
- if (!cJSON_IsBool(purge_flag)) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [purge_flag]");
- goto end;
- }
+ if (purge_flag) {
+ if (!cJSON_IsBool(purge_flag)) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [purge_flag]");
+ goto end;
+ }
}
cJSON *pei = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "pei");
- if (pei) {
- if (!cJSON_IsString(pei)) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [pei]");
- goto end;
- }
+ if (pei) {
+ if (!cJSON_IsString(pei)) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [pei]");
+ goto end;
+ }
}
cJSON *ims_vo_ps = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "imsVoPs");
OpenAPI_ims_vo_ps_e ims_vo_psVariable;
- if (ims_vo_ps) {
- if (!cJSON_IsString(ims_vo_ps)) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [ims_vo_ps]");
- goto end;
- }
- ims_vo_psVariable = OpenAPI_ims_vo_ps_FromString(ims_vo_ps->valuestring);
+ if (ims_vo_ps) {
+ if (!cJSON_IsString(ims_vo_ps)) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [ims_vo_ps]");
+ goto end;
+ }
+ ims_vo_psVariable = OpenAPI_ims_vo_ps_FromString(ims_vo_ps->valuestring);
}
cJSON *dereg_callback_uri = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "deregCallbackUri");
@@ -341,7 +351,7 @@ OpenAPI_amf3_gpp_access_registration_t *OpenAPI_amf3_gpp_access_registration_par
goto end;
}
-
+
if (!cJSON_IsString(dereg_callback_uri)) {
ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [dereg_callback_uri]");
goto end;
@@ -349,38 +359,38 @@ OpenAPI_amf3_gpp_access_registration_t *OpenAPI_amf3_gpp_access_registration_par
cJSON *amf_service_name_dereg = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "amfServiceNameDereg");
- if (amf_service_name_dereg) {
- if (!cJSON_IsString(amf_service_name_dereg)) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [amf_service_name_dereg]");
- goto end;
- }
+ if (amf_service_name_dereg) {
+ if (!cJSON_IsString(amf_service_name_dereg)) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [amf_service_name_dereg]");
+ goto end;
+ }
}
cJSON *pcscf_restoration_callback_uri = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "pcscfRestorationCallbackUri");
- if (pcscf_restoration_callback_uri) {
- if (!cJSON_IsString(pcscf_restoration_callback_uri)) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [pcscf_restoration_callback_uri]");
- goto end;
- }
+ if (pcscf_restoration_callback_uri) {
+ if (!cJSON_IsString(pcscf_restoration_callback_uri)) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [pcscf_restoration_callback_uri]");
+ goto end;
+ }
}
cJSON *amf_service_name_pcscf_rest = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "amfServiceNamePcscfRest");
- if (amf_service_name_pcscf_rest) {
- if (!cJSON_IsString(amf_service_name_pcscf_rest)) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [amf_service_name_pcscf_rest]");
- goto end;
- }
+ if (amf_service_name_pcscf_rest) {
+ if (!cJSON_IsString(amf_service_name_pcscf_rest)) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [amf_service_name_pcscf_rest]");
+ goto end;
+ }
}
cJSON *initial_registration_ind = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "initialRegistrationInd");
- if (initial_registration_ind) {
- if (!cJSON_IsBool(initial_registration_ind)) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [initial_registration_ind]");
- goto end;
- }
+ if (initial_registration_ind) {
+ if (!cJSON_IsBool(initial_registration_ind)) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [initial_registration_ind]");
+ goto end;
+ }
}
cJSON *guami = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "guami");
@@ -390,39 +400,39 @@ OpenAPI_amf3_gpp_access_registration_t *OpenAPI_amf3_gpp_access_registration_par
}
OpenAPI_guami_t *guami_local_nonprim = NULL;
-
+
guami_local_nonprim = OpenAPI_guami_parseFromJSON(guami);
cJSON *backup_amf_info = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "backupAmfInfo");
OpenAPI_list_t *backup_amf_infoList;
- if (backup_amf_info) {
- cJSON *backup_amf_info_local_nonprimitive;
- if (!cJSON_IsArray(backup_amf_info)) {
+ if (backup_amf_info) {
+ cJSON *backup_amf_info_local_nonprimitive;
+ if (!cJSON_IsArray(backup_amf_info)){
+ ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [backup_amf_info]");
+ goto end;
+ }
+
+ backup_amf_infoList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(backup_amf_info_local_nonprimitive, backup_amf_info ) {
+ if (!cJSON_IsObject(backup_amf_info_local_nonprimitive)) {
ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [backup_amf_info]");
goto end;
}
+ OpenAPI_backup_amf_info_t *backup_amf_infoItem = OpenAPI_backup_amf_info_parseFromJSON(backup_amf_info_local_nonprimitive);
- backup_amf_infoList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(backup_amf_info_local_nonprimitive, backup_amf_info ) {
- if (!cJSON_IsObject(backup_amf_info_local_nonprimitive)) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [backup_amf_info]");
- goto end;
- }
- OpenAPI_backup_amf_info_t *backup_amf_infoItem = OpenAPI_backup_amf_info_parseFromJSON(backup_amf_info_local_nonprimitive);
-
- OpenAPI_list_add(backup_amf_infoList, backup_amf_infoItem);
- }
+ OpenAPI_list_add(backup_amf_infoList, backup_amf_infoItem);
+ }
}
cJSON *dr_flag = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "drFlag");
- if (dr_flag) {
- if (!cJSON_IsBool(dr_flag)) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [dr_flag]");
- goto end;
- }
+ if (dr_flag) {
+ if (!cJSON_IsBool(dr_flag)) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [dr_flag]");
+ goto end;
+ }
}
cJSON *rat_type = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "ratType");
@@ -432,7 +442,7 @@ OpenAPI_amf3_gpp_access_registration_t *OpenAPI_amf3_gpp_access_registration_par
}
OpenAPI_rat_type_e rat_typeVariable;
-
+
if (!cJSON_IsString(rat_type)) {
ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [rat_type]");
goto end;
@@ -441,68 +451,77 @@ OpenAPI_amf3_gpp_access_registration_t *OpenAPI_amf3_gpp_access_registration_par
cJSON *urrp_indicator = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "urrpIndicator");
- if (urrp_indicator) {
- if (!cJSON_IsBool(urrp_indicator)) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [urrp_indicator]");
- goto end;
- }
+ if (urrp_indicator) {
+ if (!cJSON_IsBool(urrp_indicator)) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [urrp_indicator]");
+ goto end;
+ }
}
cJSON *amf_ee_subscription_id = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "amfEeSubscriptionId");
- if (amf_ee_subscription_id) {
- if (!cJSON_IsString(amf_ee_subscription_id)) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [amf_ee_subscription_id]");
- goto end;
- }
+ if (amf_ee_subscription_id) {
+ if (!cJSON_IsString(amf_ee_subscription_id)) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [amf_ee_subscription_id]");
+ goto end;
+ }
}
cJSON *eps_interworking_info = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "epsInterworkingInfo");
OpenAPI_eps_interworking_info_t *eps_interworking_info_local_nonprim = NULL;
- if (eps_interworking_info) {
- eps_interworking_info_local_nonprim = OpenAPI_eps_interworking_info_parseFromJSON(eps_interworking_info);
+ if (eps_interworking_info) {
+ eps_interworking_info_local_nonprim = OpenAPI_eps_interworking_info_parseFromJSON(eps_interworking_info);
}
cJSON *ue_srvcc_capability = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "ueSrvccCapability");
- if (ue_srvcc_capability) {
- if (!cJSON_IsBool(ue_srvcc_capability)) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [ue_srvcc_capability]");
- goto end;
- }
+ if (ue_srvcc_capability) {
+ if (!cJSON_IsBool(ue_srvcc_capability)) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [ue_srvcc_capability]");
+ goto end;
+ }
}
cJSON *registration_time = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "registrationTime");
- if (registration_time) {
- if (!cJSON_IsString(registration_time)) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [registration_time]");
- goto end;
- }
+ if (registration_time) {
+ if (!cJSON_IsString(registration_time)) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [registration_time]");
+ goto end;
+ }
}
cJSON *vgmlc_address = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "vgmlcAddress");
OpenAPI_vgmlc_address_t *vgmlc_address_local_nonprim = NULL;
- if (vgmlc_address) {
- vgmlc_address_local_nonprim = OpenAPI_vgmlc_address_parseFromJSON(vgmlc_address);
+ if (vgmlc_address) {
+ vgmlc_address_local_nonprim = OpenAPI_vgmlc_address_parseFromJSON(vgmlc_address);
}
cJSON *context_info = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "contextInfo");
OpenAPI_context_info_t *context_info_local_nonprim = NULL;
- if (context_info) {
- context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info);
+ if (context_info) {
+ context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info);
}
cJSON *no_ee_subscription_ind = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "noEeSubscriptionInd");
- if (no_ee_subscription_ind) {
- if (!cJSON_IsBool(no_ee_subscription_ind)) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [no_ee_subscription_ind]");
- goto end;
- }
+ if (no_ee_subscription_ind) {
+ if (!cJSON_IsBool(no_ee_subscription_ind)) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [no_ee_subscription_ind]");
+ goto end;
+ }
+ }
+
+ cJSON *supi = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "supi");
+
+ if (supi) {
+ if (!cJSON_IsString(supi)) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [supi]");
+ goto end;
+ }
}
amf3_gpp_access_registration_local_var = OpenAPI_amf3_gpp_access_registration_create (
@@ -527,8 +546,9 @@ OpenAPI_amf3_gpp_access_registration_t *OpenAPI_amf3_gpp_access_registration_par
registration_time ? ogs_strdup_or_assert(registration_time->valuestring) : NULL,
vgmlc_address ? vgmlc_address_local_nonprim : NULL,
context_info ? context_info_local_nonprim : NULL,
- no_ee_subscription_ind ? no_ee_subscription_ind->valueint : 0
- );
+ no_ee_subscription_ind ? no_ee_subscription_ind->valueint : 0,
+ supi ? ogs_strdup_or_assert(supi->valuestring) : NULL
+ );
return amf3_gpp_access_registration_local_var;
end:
diff --git a/lib/sbi/openapi/model/amf3_gpp_access_registration.h b/lib/sbi/openapi/model/amf3_gpp_access_registration.h
index ef973d6d9..58e074f70 100644
--- a/lib/sbi/openapi/model/amf3_gpp_access_registration.h
+++ b/lib/sbi/openapi/model/amf3_gpp_access_registration.h
@@ -1,7 +1,7 @@
/*
* amf3_gpp_access_registration.h
*
- *
+ *
*/
#ifndef _OpenAPI_amf3_gpp_access_registration_H_
@@ -48,6 +48,7 @@ typedef struct OpenAPI_amf3_gpp_access_registration_s {
struct OpenAPI_vgmlc_address_s *vgmlc_address;
struct OpenAPI_context_info_s *context_info;
int no_ee_subscription_ind;
+ char *supi;
} OpenAPI_amf3_gpp_access_registration_t;
OpenAPI_amf3_gpp_access_registration_t *OpenAPI_amf3_gpp_access_registration_create(
@@ -72,8 +73,9 @@ OpenAPI_amf3_gpp_access_registration_t *OpenAPI_amf3_gpp_access_registration_cre
char *registration_time,
OpenAPI_vgmlc_address_t *vgmlc_address,
OpenAPI_context_info_t *context_info,
- int no_ee_subscription_ind
- );
+ int no_ee_subscription_ind,
+ char *supi
+);
void OpenAPI_amf3_gpp_access_registration_free(OpenAPI_amf3_gpp_access_registration_t *amf3_gpp_access_registration);
OpenAPI_amf3_gpp_access_registration_t *OpenAPI_amf3_gpp_access_registration_parseFromJSON(cJSON *amf3_gpp_access_registrationJSON);
cJSON *OpenAPI_amf3_gpp_access_registration_convertToJSON(OpenAPI_amf3_gpp_access_registration_t *amf3_gpp_access_registration);
diff --git a/lib/sbi/openapi/model/amf3_gpp_access_registration_modification.c b/lib/sbi/openapi/model/amf3_gpp_access_registration_modification.c
index 2b983d7a0..8d49fb12a 100644
--- a/lib/sbi/openapi/model/amf3_gpp_access_registration_modification.c
+++ b/lib/sbi/openapi/model/amf3_gpp_access_registration_modification.c
@@ -11,9 +11,8 @@ OpenAPI_amf3_gpp_access_registration_modification_t *OpenAPI_amf3_gpp_access_reg
OpenAPI_ims_vo_ps_e ims_vo_ps,
OpenAPI_list_t *backup_amf_info,
OpenAPI_eps_interworking_info_t *eps_interworking_info,
- int ue_srvcc_capability,
- int no_ee_subscription_ind
- )
+ int ue_srvcc_capability
+)
{
OpenAPI_amf3_gpp_access_registration_modification_t *amf3_gpp_access_registration_modification_local_var = OpenAPI_malloc(sizeof(OpenAPI_amf3_gpp_access_registration_modification_t));
if (!amf3_gpp_access_registration_modification_local_var) {
@@ -26,7 +25,6 @@ OpenAPI_amf3_gpp_access_registration_modification_t *OpenAPI_amf3_gpp_access_reg
amf3_gpp_access_registration_modification_local_var->backup_amf_info = backup_amf_info;
amf3_gpp_access_registration_modification_local_var->eps_interworking_info = eps_interworking_info;
amf3_gpp_access_registration_modification_local_var->ue_srvcc_capability = ue_srvcc_capability;
- amf3_gpp_access_registration_modification_local_var->no_ee_subscription_ind = no_ee_subscription_ind;
return amf3_gpp_access_registration_modification_local_var;
}
@@ -69,71 +67,64 @@ cJSON *OpenAPI_amf3_gpp_access_registration_modification_convertToJSON(OpenAPI_a
}
if (amf3_gpp_access_registration_modification->purge_flag) {
- if (cJSON_AddBoolToObject(item, "purgeFlag", amf3_gpp_access_registration_modification->purge_flag) == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_modification_convertToJSON() failed [purge_flag]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "purgeFlag", amf3_gpp_access_registration_modification->purge_flag) == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_modification_convertToJSON() failed [purge_flag]");
+ goto end;
+ }
}
if (amf3_gpp_access_registration_modification->pei) {
- if (cJSON_AddStringToObject(item, "pei", amf3_gpp_access_registration_modification->pei) == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_modification_convertToJSON() failed [pei]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "pei", amf3_gpp_access_registration_modification->pei) == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_modification_convertToJSON() failed [pei]");
+ goto end;
+ }
}
if (amf3_gpp_access_registration_modification->ims_vo_ps) {
- if (cJSON_AddStringToObject(item, "imsVoPs", OpenAPI_ims_vo_ps_ToString(amf3_gpp_access_registration_modification->ims_vo_ps)) == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_modification_convertToJSON() failed [ims_vo_ps]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "imsVoPs", OpenAPI_ims_vo_ps_ToString(amf3_gpp_access_registration_modification->ims_vo_ps)) == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_modification_convertToJSON() failed [ims_vo_ps]");
+ goto end;
+ }
}
if (amf3_gpp_access_registration_modification->backup_amf_info) {
- cJSON *backup_amf_infoList = cJSON_AddArrayToObject(item, "backupAmfInfo");
- if (backup_amf_infoList == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_modification_convertToJSON() failed [backup_amf_info]");
- goto end;
- }
+ cJSON *backup_amf_infoList = cJSON_AddArrayToObject(item, "backupAmfInfo");
+ if (backup_amf_infoList == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_modification_convertToJSON() failed [backup_amf_info]");
+ goto end;
+ }
- OpenAPI_lnode_t *backup_amf_info_node;
- if (amf3_gpp_access_registration_modification->backup_amf_info) {
- OpenAPI_list_for_each(amf3_gpp_access_registration_modification->backup_amf_info, backup_amf_info_node) {
- cJSON *itemLocal = OpenAPI_backup_amf_info_convertToJSON(backup_amf_info_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_modification_convertToJSON() failed [backup_amf_info]");
- goto end;
- }
- cJSON_AddItemToArray(backup_amf_infoList, itemLocal);
+ OpenAPI_lnode_t *backup_amf_info_node;
+ if (amf3_gpp_access_registration_modification->backup_amf_info) {
+ OpenAPI_list_for_each(amf3_gpp_access_registration_modification->backup_amf_info, backup_amf_info_node) {
+ cJSON *itemLocal = OpenAPI_backup_amf_info_convertToJSON(backup_amf_info_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_modification_convertToJSON() failed [backup_amf_info]");
+ goto end;
}
+ cJSON_AddItemToArray(backup_amf_infoList, itemLocal);
}
}
+ }
if (amf3_gpp_access_registration_modification->eps_interworking_info) {
- cJSON *eps_interworking_info_local_JSON = OpenAPI_eps_interworking_info_convertToJSON(amf3_gpp_access_registration_modification->eps_interworking_info);
- if (eps_interworking_info_local_JSON == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_modification_convertToJSON() failed [eps_interworking_info]");
- goto end;
- }
- cJSON_AddItemToObject(item, "epsInterworkingInfo", eps_interworking_info_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_modification_convertToJSON() failed [eps_interworking_info]");
- goto end;
- }
+ cJSON *eps_interworking_info_local_JSON = OpenAPI_eps_interworking_info_convertToJSON(amf3_gpp_access_registration_modification->eps_interworking_info);
+ if (eps_interworking_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_modification_convertToJSON() failed [eps_interworking_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "epsInterworkingInfo", eps_interworking_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_modification_convertToJSON() failed [eps_interworking_info]");
+ goto end;
+ }
}
if (amf3_gpp_access_registration_modification->ue_srvcc_capability) {
- if (cJSON_AddBoolToObject(item, "ueSrvccCapability", amf3_gpp_access_registration_modification->ue_srvcc_capability) == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_modification_convertToJSON() failed [ue_srvcc_capability]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "ueSrvccCapability", amf3_gpp_access_registration_modification->ue_srvcc_capability) == NULL) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_modification_convertToJSON() failed [ue_srvcc_capability]");
+ goto end;
}
-
- if (amf3_gpp_access_registration_modification->no_ee_subscription_ind) {
- if (cJSON_AddBoolToObject(item, "noEeSubscriptionInd", amf3_gpp_access_registration_modification->no_ee_subscription_ind) == NULL) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_modification_convertToJSON() failed [no_ee_subscription_ind]");
- goto end;
- }
}
end:
@@ -150,84 +141,75 @@ OpenAPI_amf3_gpp_access_registration_modification_t *OpenAPI_amf3_gpp_access_reg
}
OpenAPI_guami_t *guami_local_nonprim = NULL;
-
+
guami_local_nonprim = OpenAPI_guami_parseFromJSON(guami);
cJSON *purge_flag = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registration_modificationJSON, "purgeFlag");
- if (purge_flag) {
- if (!cJSON_IsBool(purge_flag)) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_modification_parseFromJSON() failed [purge_flag]");
- goto end;
- }
+ if (purge_flag) {
+ if (!cJSON_IsBool(purge_flag)) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_modification_parseFromJSON() failed [purge_flag]");
+ goto end;
+ }
}
cJSON *pei = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registration_modificationJSON, "pei");
- if (pei) {
- if (!cJSON_IsString(pei)) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_modification_parseFromJSON() failed [pei]");
- goto end;
- }
+ if (pei) {
+ if (!cJSON_IsString(pei)) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_modification_parseFromJSON() failed [pei]");
+ goto end;
+ }
}
cJSON *ims_vo_ps = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registration_modificationJSON, "imsVoPs");
OpenAPI_ims_vo_ps_e ims_vo_psVariable;
- if (ims_vo_ps) {
- if (!cJSON_IsString(ims_vo_ps)) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_modification_parseFromJSON() failed [ims_vo_ps]");
- goto end;
- }
- ims_vo_psVariable = OpenAPI_ims_vo_ps_FromString(ims_vo_ps->valuestring);
+ if (ims_vo_ps) {
+ if (!cJSON_IsString(ims_vo_ps)) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_modification_parseFromJSON() failed [ims_vo_ps]");
+ goto end;
+ }
+ ims_vo_psVariable = OpenAPI_ims_vo_ps_FromString(ims_vo_ps->valuestring);
}
cJSON *backup_amf_info = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registration_modificationJSON, "backupAmfInfo");
OpenAPI_list_t *backup_amf_infoList;
- if (backup_amf_info) {
- cJSON *backup_amf_info_local_nonprimitive;
- if (!cJSON_IsArray(backup_amf_info)) {
+ if (backup_amf_info) {
+ cJSON *backup_amf_info_local_nonprimitive;
+ if (!cJSON_IsArray(backup_amf_info)){
+ ogs_error("OpenAPI_amf3_gpp_access_registration_modification_parseFromJSON() failed [backup_amf_info]");
+ goto end;
+ }
+
+ backup_amf_infoList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(backup_amf_info_local_nonprimitive, backup_amf_info ) {
+ if (!cJSON_IsObject(backup_amf_info_local_nonprimitive)) {
ogs_error("OpenAPI_amf3_gpp_access_registration_modification_parseFromJSON() failed [backup_amf_info]");
goto end;
}
+ OpenAPI_backup_amf_info_t *backup_amf_infoItem = OpenAPI_backup_amf_info_parseFromJSON(backup_amf_info_local_nonprimitive);
- backup_amf_infoList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(backup_amf_info_local_nonprimitive, backup_amf_info ) {
- if (!cJSON_IsObject(backup_amf_info_local_nonprimitive)) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_modification_parseFromJSON() failed [backup_amf_info]");
- goto end;
- }
- OpenAPI_backup_amf_info_t *backup_amf_infoItem = OpenAPI_backup_amf_info_parseFromJSON(backup_amf_info_local_nonprimitive);
-
- OpenAPI_list_add(backup_amf_infoList, backup_amf_infoItem);
- }
+ OpenAPI_list_add(backup_amf_infoList, backup_amf_infoItem);
+ }
}
cJSON *eps_interworking_info = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registration_modificationJSON, "epsInterworkingInfo");
OpenAPI_eps_interworking_info_t *eps_interworking_info_local_nonprim = NULL;
- if (eps_interworking_info) {
- eps_interworking_info_local_nonprim = OpenAPI_eps_interworking_info_parseFromJSON(eps_interworking_info);
+ if (eps_interworking_info) {
+ eps_interworking_info_local_nonprim = OpenAPI_eps_interworking_info_parseFromJSON(eps_interworking_info);
}
cJSON *ue_srvcc_capability = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registration_modificationJSON, "ueSrvccCapability");
- if (ue_srvcc_capability) {
- if (!cJSON_IsBool(ue_srvcc_capability)) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_modification_parseFromJSON() failed [ue_srvcc_capability]");
- goto end;
- }
+ if (ue_srvcc_capability) {
+ if (!cJSON_IsBool(ue_srvcc_capability)) {
+ ogs_error("OpenAPI_amf3_gpp_access_registration_modification_parseFromJSON() failed [ue_srvcc_capability]");
+ goto end;
}
-
- cJSON *no_ee_subscription_ind = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registration_modificationJSON, "noEeSubscriptionInd");
-
- if (no_ee_subscription_ind) {
- if (!cJSON_IsBool(no_ee_subscription_ind)) {
- ogs_error("OpenAPI_amf3_gpp_access_registration_modification_parseFromJSON() failed [no_ee_subscription_ind]");
- goto end;
- }
}
amf3_gpp_access_registration_modification_local_var = OpenAPI_amf3_gpp_access_registration_modification_create (
@@ -237,9 +219,8 @@ OpenAPI_amf3_gpp_access_registration_modification_t *OpenAPI_amf3_gpp_access_reg
ims_vo_ps ? ims_vo_psVariable : 0,
backup_amf_info ? backup_amf_infoList : NULL,
eps_interworking_info ? eps_interworking_info_local_nonprim : NULL,
- ue_srvcc_capability ? ue_srvcc_capability->valueint : 0,
- no_ee_subscription_ind ? no_ee_subscription_ind->valueint : 0
- );
+ ue_srvcc_capability ? ue_srvcc_capability->valueint : 0
+ );
return amf3_gpp_access_registration_modification_local_var;
end:
diff --git a/lib/sbi/openapi/model/amf3_gpp_access_registration_modification.h b/lib/sbi/openapi/model/amf3_gpp_access_registration_modification.h
index 87382dd49..636146944 100644
--- a/lib/sbi/openapi/model/amf3_gpp_access_registration_modification.h
+++ b/lib/sbi/openapi/model/amf3_gpp_access_registration_modification.h
@@ -1,7 +1,7 @@
/*
* amf3_gpp_access_registration_modification.h
*
- *
+ *
*/
#ifndef _OpenAPI_amf3_gpp_access_registration_modification_H_
@@ -30,7 +30,6 @@ typedef struct OpenAPI_amf3_gpp_access_registration_modification_s {
OpenAPI_list_t *backup_amf_info;
struct OpenAPI_eps_interworking_info_s *eps_interworking_info;
int ue_srvcc_capability;
- int no_ee_subscription_ind;
} OpenAPI_amf3_gpp_access_registration_modification_t;
OpenAPI_amf3_gpp_access_registration_modification_t *OpenAPI_amf3_gpp_access_registration_modification_create(
@@ -40,9 +39,8 @@ OpenAPI_amf3_gpp_access_registration_modification_t *OpenAPI_amf3_gpp_access_reg
OpenAPI_ims_vo_ps_e ims_vo_ps,
OpenAPI_list_t *backup_amf_info,
OpenAPI_eps_interworking_info_t *eps_interworking_info,
- int ue_srvcc_capability,
- int no_ee_subscription_ind
- );
+ int ue_srvcc_capability
+);
void OpenAPI_amf3_gpp_access_registration_modification_free(OpenAPI_amf3_gpp_access_registration_modification_t *amf3_gpp_access_registration_modification);
OpenAPI_amf3_gpp_access_registration_modification_t *OpenAPI_amf3_gpp_access_registration_modification_parseFromJSON(cJSON *amf3_gpp_access_registration_modificationJSON);
cJSON *OpenAPI_amf3_gpp_access_registration_modification_convertToJSON(OpenAPI_amf3_gpp_access_registration_modification_t *amf3_gpp_access_registration_modification);
diff --git a/lib/sbi/openapi/model/amf_cond.c b/lib/sbi/openapi/model/amf_cond.c
index f579fd57f..99f8bc44f 100644
--- a/lib/sbi/openapi/model/amf_cond.c
+++ b/lib/sbi/openapi/model/amf_cond.c
@@ -7,7 +7,7 @@
OpenAPI_amf_cond_t *OpenAPI_amf_cond_create(
char *amf_set_id,
char *amf_region_id
- )
+)
{
OpenAPI_amf_cond_t *amf_cond_local_var = OpenAPI_malloc(sizeof(OpenAPI_amf_cond_t));
if (!amf_cond_local_var) {
@@ -41,17 +41,17 @@ cJSON *OpenAPI_amf_cond_convertToJSON(OpenAPI_amf_cond_t *amf_cond)
item = cJSON_CreateObject();
if (amf_cond->amf_set_id) {
- if (cJSON_AddStringToObject(item, "amfSetId", amf_cond->amf_set_id) == NULL) {
- ogs_error("OpenAPI_amf_cond_convertToJSON() failed [amf_set_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "amfSetId", amf_cond->amf_set_id) == NULL) {
+ ogs_error("OpenAPI_amf_cond_convertToJSON() failed [amf_set_id]");
+ goto end;
+ }
}
if (amf_cond->amf_region_id) {
- if (cJSON_AddStringToObject(item, "amfRegionId", amf_cond->amf_region_id) == NULL) {
- ogs_error("OpenAPI_amf_cond_convertToJSON() failed [amf_region_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "amfRegionId", amf_cond->amf_region_id) == NULL) {
+ ogs_error("OpenAPI_amf_cond_convertToJSON() failed [amf_region_id]");
+ goto end;
+ }
}
end:
@@ -63,26 +63,26 @@ OpenAPI_amf_cond_t *OpenAPI_amf_cond_parseFromJSON(cJSON *amf_condJSON)
OpenAPI_amf_cond_t *amf_cond_local_var = NULL;
cJSON *amf_set_id = cJSON_GetObjectItemCaseSensitive(amf_condJSON, "amfSetId");
- if (amf_set_id) {
- if (!cJSON_IsString(amf_set_id)) {
- ogs_error("OpenAPI_amf_cond_parseFromJSON() failed [amf_set_id]");
- goto end;
- }
+ if (amf_set_id) {
+ if (!cJSON_IsString(amf_set_id)) {
+ ogs_error("OpenAPI_amf_cond_parseFromJSON() failed [amf_set_id]");
+ goto end;
+ }
}
cJSON *amf_region_id = cJSON_GetObjectItemCaseSensitive(amf_condJSON, "amfRegionId");
- if (amf_region_id) {
- if (!cJSON_IsString(amf_region_id)) {
- ogs_error("OpenAPI_amf_cond_parseFromJSON() failed [amf_region_id]");
- goto end;
- }
+ if (amf_region_id) {
+ if (!cJSON_IsString(amf_region_id)) {
+ ogs_error("OpenAPI_amf_cond_parseFromJSON() failed [amf_region_id]");
+ goto end;
+ }
}
amf_cond_local_var = OpenAPI_amf_cond_create (
amf_set_id ? ogs_strdup_or_assert(amf_set_id->valuestring) : NULL,
amf_region_id ? ogs_strdup_or_assert(amf_region_id->valuestring) : NULL
- );
+ );
return amf_cond_local_var;
end:
diff --git a/lib/sbi/openapi/model/amf_cond.h b/lib/sbi/openapi/model/amf_cond.h
index 41d4dd4e5..f8a9494c9 100644
--- a/lib/sbi/openapi/model/amf_cond.h
+++ b/lib/sbi/openapi/model/amf_cond.h
@@ -26,7 +26,7 @@ typedef struct OpenAPI_amf_cond_s {
OpenAPI_amf_cond_t *OpenAPI_amf_cond_create(
char *amf_set_id,
char *amf_region_id
- );
+);
void OpenAPI_amf_cond_free(OpenAPI_amf_cond_t *amf_cond);
OpenAPI_amf_cond_t *OpenAPI_amf_cond_parseFromJSON(cJSON *amf_condJSON);
cJSON *OpenAPI_amf_cond_convertToJSON(OpenAPI_amf_cond_t *amf_cond);
diff --git a/lib/sbi/openapi/model/amf_dereg_info.c b/lib/sbi/openapi/model/amf_dereg_info.c
index 6c858836b..d203de3c2 100644
--- a/lib/sbi/openapi/model/amf_dereg_info.c
+++ b/lib/sbi/openapi/model/amf_dereg_info.c
@@ -6,7 +6,7 @@
OpenAPI_amf_dereg_info_t *OpenAPI_amf_dereg_info_create(
OpenAPI_deregistration_reason_e dereg_reason
- )
+)
{
OpenAPI_amf_dereg_info_t *amf_dereg_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_amf_dereg_info_t));
if (!amf_dereg_info_local_var) {
@@ -55,7 +55,7 @@ OpenAPI_amf_dereg_info_t *OpenAPI_amf_dereg_info_parseFromJSON(cJSON *amf_dereg_
}
OpenAPI_deregistration_reason_e dereg_reasonVariable;
-
+
if (!cJSON_IsString(dereg_reason)) {
ogs_error("OpenAPI_amf_dereg_info_parseFromJSON() failed [dereg_reason]");
goto end;
@@ -64,7 +64,7 @@ OpenAPI_amf_dereg_info_t *OpenAPI_amf_dereg_info_parseFromJSON(cJSON *amf_dereg_
amf_dereg_info_local_var = OpenAPI_amf_dereg_info_create (
dereg_reasonVariable
- );
+ );
return amf_dereg_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/amf_dereg_info.h b/lib/sbi/openapi/model/amf_dereg_info.h
index 1353ee7d8..e4e0499a9 100644
--- a/lib/sbi/openapi/model/amf_dereg_info.h
+++ b/lib/sbi/openapi/model/amf_dereg_info.h
@@ -1,7 +1,7 @@
/*
* amf_dereg_info.h
*
- *
+ *
*/
#ifndef _OpenAPI_amf_dereg_info_H_
@@ -25,7 +25,7 @@ typedef struct OpenAPI_amf_dereg_info_s {
OpenAPI_amf_dereg_info_t *OpenAPI_amf_dereg_info_create(
OpenAPI_deregistration_reason_e dereg_reason
- );
+);
void OpenAPI_amf_dereg_info_free(OpenAPI_amf_dereg_info_t *amf_dereg_info);
OpenAPI_amf_dereg_info_t *OpenAPI_amf_dereg_info_parseFromJSON(cJSON *amf_dereg_infoJSON);
cJSON *OpenAPI_amf_dereg_info_convertToJSON(OpenAPI_amf_dereg_info_t *amf_dereg_info);
diff --git a/lib/sbi/openapi/model/amf_event.c b/lib/sbi/openapi/model/amf_event.c
index 366ef9d20..45f8c93fc 100644
--- a/lib/sbi/openapi/model/amf_event.c
+++ b/lib/sbi/openapi/model/amf_event.c
@@ -10,8 +10,12 @@ OpenAPI_amf_event_t *OpenAPI_amf_event_create(
OpenAPI_list_t *area_list,
OpenAPI_list_t *location_filter_list,
int ref_id,
- OpenAPI_list_t *traffic_descriptor_list
- )
+ OpenAPI_list_t *traffic_descriptor_list,
+ int report_ue_reachable,
+ OpenAPI_reachability_filter_t *reachability_filter,
+ int max_reports,
+ int max_response_time
+)
{
OpenAPI_amf_event_t *amf_event_local_var = OpenAPI_malloc(sizeof(OpenAPI_amf_event_t));
if (!amf_event_local_var) {
@@ -23,6 +27,10 @@ OpenAPI_amf_event_t *OpenAPI_amf_event_create(
amf_event_local_var->location_filter_list = location_filter_list;
amf_event_local_var->ref_id = ref_id;
amf_event_local_var->traffic_descriptor_list = traffic_descriptor_list;
+ amf_event_local_var->report_ue_reachable = report_ue_reachable;
+ amf_event_local_var->reachability_filter = reachability_filter;
+ amf_event_local_var->max_reports = max_reports;
+ amf_event_local_var->max_response_time = max_response_time;
return amf_event_local_var;
}
@@ -46,6 +54,7 @@ void OpenAPI_amf_event_free(OpenAPI_amf_event_t *amf_event)
OpenAPI_traffic_descriptor_free(node->data);
}
OpenAPI_list_free(amf_event->traffic_descriptor_list);
+ OpenAPI_reachability_filter_free(amf_event->reachability_filter);
ogs_free(amf_event);
}
@@ -71,78 +80,112 @@ cJSON *OpenAPI_amf_event_convertToJSON(OpenAPI_amf_event_t *amf_event)
}
if (amf_event->immediate_flag) {
- if (cJSON_AddBoolToObject(item, "immediateFlag", amf_event->immediate_flag) == NULL) {
- ogs_error("OpenAPI_amf_event_convertToJSON() failed [immediate_flag]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "immediateFlag", amf_event->immediate_flag) == NULL) {
+ ogs_error("OpenAPI_amf_event_convertToJSON() failed [immediate_flag]");
+ goto end;
+ }
}
if (amf_event->area_list) {
- cJSON *area_listList = cJSON_AddArrayToObject(item, "areaList");
- if (area_listList == NULL) {
- ogs_error("OpenAPI_amf_event_convertToJSON() failed [area_list]");
- goto end;
- }
+ cJSON *area_listList = cJSON_AddArrayToObject(item, "areaList");
+ if (area_listList == NULL) {
+ ogs_error("OpenAPI_amf_event_convertToJSON() failed [area_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *area_list_node;
- if (amf_event->area_list) {
- OpenAPI_list_for_each(amf_event->area_list, area_list_node) {
- cJSON *itemLocal = OpenAPI_amf_event_area_convertToJSON(area_list_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_amf_event_convertToJSON() failed [area_list]");
- goto end;
- }
- cJSON_AddItemToArray(area_listList, itemLocal);
+ OpenAPI_lnode_t *area_list_node;
+ if (amf_event->area_list) {
+ OpenAPI_list_for_each(amf_event->area_list, area_list_node) {
+ cJSON *itemLocal = OpenAPI_amf_event_area_convertToJSON(area_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_amf_event_convertToJSON() failed [area_list]");
+ goto end;
}
+ cJSON_AddItemToArray(area_listList, itemLocal);
}
}
+ }
if (amf_event->location_filter_list) {
- cJSON *location_filter_listList = cJSON_AddArrayToObject(item, "locationFilterList");
- if (location_filter_listList == NULL) {
- ogs_error("OpenAPI_amf_event_convertToJSON() failed [location_filter_list]");
- goto end;
- }
+ cJSON *location_filter_listList = cJSON_AddArrayToObject(item, "locationFilterList");
+ if (location_filter_listList == NULL) {
+ ogs_error("OpenAPI_amf_event_convertToJSON() failed [location_filter_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *location_filter_list_node;
- if (amf_event->location_filter_list) {
- OpenAPI_list_for_each(amf_event->location_filter_list, location_filter_list_node) {
- cJSON *itemLocal = OpenAPI_location_filter_convertToJSON(location_filter_list_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_amf_event_convertToJSON() failed [location_filter_list]");
- goto end;
- }
- cJSON_AddItemToArray(location_filter_listList, itemLocal);
+ OpenAPI_lnode_t *location_filter_list_node;
+ if (amf_event->location_filter_list) {
+ OpenAPI_list_for_each(amf_event->location_filter_list, location_filter_list_node) {
+ cJSON *itemLocal = OpenAPI_location_filter_convertToJSON(location_filter_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_amf_event_convertToJSON() failed [location_filter_list]");
+ goto end;
}
+ cJSON_AddItemToArray(location_filter_listList, itemLocal);
}
}
+ }
if (amf_event->ref_id) {
- if (cJSON_AddNumberToObject(item, "refId", amf_event->ref_id) == NULL) {
- ogs_error("OpenAPI_amf_event_convertToJSON() failed [ref_id]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "refId", amf_event->ref_id) == NULL) {
+ ogs_error("OpenAPI_amf_event_convertToJSON() failed [ref_id]");
+ goto end;
+ }
}
if (amf_event->traffic_descriptor_list) {
- cJSON *traffic_descriptor_listList = cJSON_AddArrayToObject(item, "trafficDescriptorList");
- if (traffic_descriptor_listList == NULL) {
- ogs_error("OpenAPI_amf_event_convertToJSON() failed [traffic_descriptor_list]");
- goto end;
- }
+ cJSON *traffic_descriptor_listList = cJSON_AddArrayToObject(item, "trafficDescriptorList");
+ if (traffic_descriptor_listList == NULL) {
+ ogs_error("OpenAPI_amf_event_convertToJSON() failed [traffic_descriptor_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *traffic_descriptor_list_node;
- if (amf_event->traffic_descriptor_list) {
- OpenAPI_list_for_each(amf_event->traffic_descriptor_list, traffic_descriptor_list_node) {
- cJSON *itemLocal = OpenAPI_traffic_descriptor_convertToJSON(traffic_descriptor_list_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_amf_event_convertToJSON() failed [traffic_descriptor_list]");
- goto end;
- }
- cJSON_AddItemToArray(traffic_descriptor_listList, itemLocal);
+ OpenAPI_lnode_t *traffic_descriptor_list_node;
+ if (amf_event->traffic_descriptor_list) {
+ OpenAPI_list_for_each(amf_event->traffic_descriptor_list, traffic_descriptor_list_node) {
+ cJSON *itemLocal = OpenAPI_traffic_descriptor_convertToJSON(traffic_descriptor_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_amf_event_convertToJSON() failed [traffic_descriptor_list]");
+ goto end;
}
+ cJSON_AddItemToArray(traffic_descriptor_listList, itemLocal);
}
}
+ }
+
+ if (amf_event->report_ue_reachable) {
+ if (cJSON_AddBoolToObject(item, "reportUeReachable", amf_event->report_ue_reachable) == NULL) {
+ ogs_error("OpenAPI_amf_event_convertToJSON() failed [report_ue_reachable]");
+ goto end;
+ }
+ }
+
+ if (amf_event->reachability_filter) {
+ cJSON *reachability_filter_local_JSON = OpenAPI_reachability_filter_convertToJSON(amf_event->reachability_filter);
+ if (reachability_filter_local_JSON == NULL) {
+ ogs_error("OpenAPI_amf_event_convertToJSON() failed [reachability_filter]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "reachabilityFilter", reachability_filter_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_amf_event_convertToJSON() failed [reachability_filter]");
+ goto end;
+ }
+ }
+
+ if (amf_event->max_reports) {
+ if (cJSON_AddNumberToObject(item, "maxReports", amf_event->max_reports) == NULL) {
+ ogs_error("OpenAPI_amf_event_convertToJSON() failed [max_reports]");
+ goto end;
+ }
+ }
+
+ if (amf_event->max_response_time) {
+ if (cJSON_AddNumberToObject(item, "maxResponseTime", amf_event->max_response_time) == NULL) {
+ ogs_error("OpenAPI_amf_event_convertToJSON() failed [max_response_time]");
+ goto end;
+ }
+ }
end:
return item;
@@ -158,94 +201,128 @@ OpenAPI_amf_event_t *OpenAPI_amf_event_parseFromJSON(cJSON *amf_eventJSON)
}
OpenAPI_amf_event_type_t *type_local_nonprim = NULL;
-
+
type_local_nonprim = OpenAPI_amf_event_type_parseFromJSON(type);
cJSON *immediate_flag = cJSON_GetObjectItemCaseSensitive(amf_eventJSON, "immediateFlag");
- if (immediate_flag) {
- if (!cJSON_IsBool(immediate_flag)) {
- ogs_error("OpenAPI_amf_event_parseFromJSON() failed [immediate_flag]");
- goto end;
- }
+ if (immediate_flag) {
+ if (!cJSON_IsBool(immediate_flag)) {
+ ogs_error("OpenAPI_amf_event_parseFromJSON() failed [immediate_flag]");
+ goto end;
+ }
}
cJSON *area_list = cJSON_GetObjectItemCaseSensitive(amf_eventJSON, "areaList");
OpenAPI_list_t *area_listList;
- if (area_list) {
- cJSON *area_list_local_nonprimitive;
- if (!cJSON_IsArray(area_list)) {
+ if (area_list) {
+ cJSON *area_list_local_nonprimitive;
+ if (!cJSON_IsArray(area_list)){
+ ogs_error("OpenAPI_amf_event_parseFromJSON() failed [area_list]");
+ goto end;
+ }
+
+ area_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(area_list_local_nonprimitive, area_list ) {
+ if (!cJSON_IsObject(area_list_local_nonprimitive)) {
ogs_error("OpenAPI_amf_event_parseFromJSON() failed [area_list]");
goto end;
}
+ OpenAPI_amf_event_area_t *area_listItem = OpenAPI_amf_event_area_parseFromJSON(area_list_local_nonprimitive);
- area_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(area_list_local_nonprimitive, area_list ) {
- if (!cJSON_IsObject(area_list_local_nonprimitive)) {
- ogs_error("OpenAPI_amf_event_parseFromJSON() failed [area_list]");
- goto end;
- }
- OpenAPI_amf_event_area_t *area_listItem = OpenAPI_amf_event_area_parseFromJSON(area_list_local_nonprimitive);
-
- OpenAPI_list_add(area_listList, area_listItem);
- }
+ OpenAPI_list_add(area_listList, area_listItem);
+ }
}
cJSON *location_filter_list = cJSON_GetObjectItemCaseSensitive(amf_eventJSON, "locationFilterList");
OpenAPI_list_t *location_filter_listList;
- if (location_filter_list) {
- cJSON *location_filter_list_local_nonprimitive;
- if (!cJSON_IsArray(location_filter_list)) {
+ if (location_filter_list) {
+ cJSON *location_filter_list_local_nonprimitive;
+ if (!cJSON_IsArray(location_filter_list)){
+ ogs_error("OpenAPI_amf_event_parseFromJSON() failed [location_filter_list]");
+ goto end;
+ }
+
+ location_filter_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(location_filter_list_local_nonprimitive, location_filter_list ) {
+ if (!cJSON_IsObject(location_filter_list_local_nonprimitive)) {
ogs_error("OpenAPI_amf_event_parseFromJSON() failed [location_filter_list]");
goto end;
}
+ OpenAPI_location_filter_t *location_filter_listItem = OpenAPI_location_filter_parseFromJSON(location_filter_list_local_nonprimitive);
- location_filter_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(location_filter_list_local_nonprimitive, location_filter_list ) {
- if (!cJSON_IsObject(location_filter_list_local_nonprimitive)) {
- ogs_error("OpenAPI_amf_event_parseFromJSON() failed [location_filter_list]");
- goto end;
- }
- OpenAPI_location_filter_t *location_filter_listItem = OpenAPI_location_filter_parseFromJSON(location_filter_list_local_nonprimitive);
-
- OpenAPI_list_add(location_filter_listList, location_filter_listItem);
- }
+ OpenAPI_list_add(location_filter_listList, location_filter_listItem);
+ }
}
cJSON *ref_id = cJSON_GetObjectItemCaseSensitive(amf_eventJSON, "refId");
- if (ref_id) {
- if (!cJSON_IsNumber(ref_id)) {
- ogs_error("OpenAPI_amf_event_parseFromJSON() failed [ref_id]");
- goto end;
- }
+ if (ref_id) {
+ if (!cJSON_IsNumber(ref_id)) {
+ ogs_error("OpenAPI_amf_event_parseFromJSON() failed [ref_id]");
+ goto end;
+ }
}
cJSON *traffic_descriptor_list = cJSON_GetObjectItemCaseSensitive(amf_eventJSON, "trafficDescriptorList");
OpenAPI_list_t *traffic_descriptor_listList;
- if (traffic_descriptor_list) {
- cJSON *traffic_descriptor_list_local_nonprimitive;
- if (!cJSON_IsArray(traffic_descriptor_list)) {
+ if (traffic_descriptor_list) {
+ cJSON *traffic_descriptor_list_local_nonprimitive;
+ if (!cJSON_IsArray(traffic_descriptor_list)){
+ ogs_error("OpenAPI_amf_event_parseFromJSON() failed [traffic_descriptor_list]");
+ goto end;
+ }
+
+ traffic_descriptor_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(traffic_descriptor_list_local_nonprimitive, traffic_descriptor_list ) {
+ if (!cJSON_IsObject(traffic_descriptor_list_local_nonprimitive)) {
ogs_error("OpenAPI_amf_event_parseFromJSON() failed [traffic_descriptor_list]");
goto end;
}
+ OpenAPI_traffic_descriptor_t *traffic_descriptor_listItem = OpenAPI_traffic_descriptor_parseFromJSON(traffic_descriptor_list_local_nonprimitive);
- traffic_descriptor_listList = OpenAPI_list_create();
+ OpenAPI_list_add(traffic_descriptor_listList, traffic_descriptor_listItem);
+ }
+ }
- cJSON_ArrayForEach(traffic_descriptor_list_local_nonprimitive, traffic_descriptor_list ) {
- if (!cJSON_IsObject(traffic_descriptor_list_local_nonprimitive)) {
- ogs_error("OpenAPI_amf_event_parseFromJSON() failed [traffic_descriptor_list]");
- goto end;
- }
- OpenAPI_traffic_descriptor_t *traffic_descriptor_listItem = OpenAPI_traffic_descriptor_parseFromJSON(traffic_descriptor_list_local_nonprimitive);
+ cJSON *report_ue_reachable = cJSON_GetObjectItemCaseSensitive(amf_eventJSON, "reportUeReachable");
- OpenAPI_list_add(traffic_descriptor_listList, traffic_descriptor_listItem);
- }
+ if (report_ue_reachable) {
+ if (!cJSON_IsBool(report_ue_reachable)) {
+ ogs_error("OpenAPI_amf_event_parseFromJSON() failed [report_ue_reachable]");
+ goto end;
+ }
+ }
+
+ cJSON *reachability_filter = cJSON_GetObjectItemCaseSensitive(amf_eventJSON, "reachabilityFilter");
+
+ OpenAPI_reachability_filter_t *reachability_filter_local_nonprim = NULL;
+ if (reachability_filter) {
+ reachability_filter_local_nonprim = OpenAPI_reachability_filter_parseFromJSON(reachability_filter);
+ }
+
+ cJSON *max_reports = cJSON_GetObjectItemCaseSensitive(amf_eventJSON, "maxReports");
+
+ if (max_reports) {
+ if (!cJSON_IsNumber(max_reports)) {
+ ogs_error("OpenAPI_amf_event_parseFromJSON() failed [max_reports]");
+ goto end;
+ }
+ }
+
+ cJSON *max_response_time = cJSON_GetObjectItemCaseSensitive(amf_eventJSON, "maxResponseTime");
+
+ if (max_response_time) {
+ if (!cJSON_IsNumber(max_response_time)) {
+ ogs_error("OpenAPI_amf_event_parseFromJSON() failed [max_response_time]");
+ goto end;
+ }
}
amf_event_local_var = OpenAPI_amf_event_create (
@@ -254,8 +331,12 @@ OpenAPI_amf_event_t *OpenAPI_amf_event_parseFromJSON(cJSON *amf_eventJSON)
area_list ? area_listList : NULL,
location_filter_list ? location_filter_listList : NULL,
ref_id ? ref_id->valuedouble : 0,
- traffic_descriptor_list ? traffic_descriptor_listList : NULL
- );
+ traffic_descriptor_list ? traffic_descriptor_listList : NULL,
+ report_ue_reachable ? report_ue_reachable->valueint : 0,
+ reachability_filter ? reachability_filter_local_nonprim : NULL,
+ max_reports ? max_reports->valuedouble : 0,
+ max_response_time ? max_response_time->valuedouble : 0
+ );
return amf_event_local_var;
end:
diff --git a/lib/sbi/openapi/model/amf_event.h b/lib/sbi/openapi/model/amf_event.h
index 41c348e7e..837bb7d88 100644
--- a/lib/sbi/openapi/model/amf_event.h
+++ b/lib/sbi/openapi/model/amf_event.h
@@ -1,7 +1,7 @@
/*
* amf_event.h
*
- *
+ *
*/
#ifndef _OpenAPI_amf_event_H_
@@ -15,6 +15,7 @@
#include "amf_event_area.h"
#include "amf_event_type.h"
#include "location_filter.h"
+#include "reachability_filter.h"
#include "traffic_descriptor.h"
#ifdef __cplusplus
@@ -29,6 +30,10 @@ typedef struct OpenAPI_amf_event_s {
OpenAPI_list_t *location_filter_list;
int ref_id;
OpenAPI_list_t *traffic_descriptor_list;
+ int report_ue_reachable;
+ struct OpenAPI_reachability_filter_s *reachability_filter;
+ int max_reports;
+ int max_response_time;
} OpenAPI_amf_event_t;
OpenAPI_amf_event_t *OpenAPI_amf_event_create(
@@ -37,8 +42,12 @@ OpenAPI_amf_event_t *OpenAPI_amf_event_create(
OpenAPI_list_t *area_list,
OpenAPI_list_t *location_filter_list,
int ref_id,
- OpenAPI_list_t *traffic_descriptor_list
- );
+ OpenAPI_list_t *traffic_descriptor_list,
+ int report_ue_reachable,
+ OpenAPI_reachability_filter_t *reachability_filter,
+ int max_reports,
+ int max_response_time
+);
void OpenAPI_amf_event_free(OpenAPI_amf_event_t *amf_event);
OpenAPI_amf_event_t *OpenAPI_amf_event_parseFromJSON(cJSON *amf_eventJSON);
cJSON *OpenAPI_amf_event_convertToJSON(OpenAPI_amf_event_t *amf_event);
diff --git a/lib/sbi/openapi/model/amf_event_area.c b/lib/sbi/openapi/model/amf_event_area.c
index 15dddb8d9..bcc77c122 100644
--- a/lib/sbi/openapi/model/amf_event_area.c
+++ b/lib/sbi/openapi/model/amf_event_area.c
@@ -6,8 +6,10 @@
OpenAPI_amf_event_area_t *OpenAPI_amf_event_area_create(
OpenAPI_presence_info_t *presence_info,
- OpenAPI_ladn_info_t *ladn_info
- )
+ OpenAPI_ladn_info_t *ladn_info,
+ OpenAPI_snssai_t *s_nssai,
+ char *nsi_id
+)
{
OpenAPI_amf_event_area_t *amf_event_area_local_var = OpenAPI_malloc(sizeof(OpenAPI_amf_event_area_t));
if (!amf_event_area_local_var) {
@@ -15,6 +17,8 @@ OpenAPI_amf_event_area_t *OpenAPI_amf_event_area_create(
}
amf_event_area_local_var->presence_info = presence_info;
amf_event_area_local_var->ladn_info = ladn_info;
+ amf_event_area_local_var->s_nssai = s_nssai;
+ amf_event_area_local_var->nsi_id = nsi_id;
return amf_event_area_local_var;
}
@@ -27,6 +31,8 @@ void OpenAPI_amf_event_area_free(OpenAPI_amf_event_area_t *amf_event_area)
OpenAPI_lnode_t *node;
OpenAPI_presence_info_free(amf_event_area->presence_info);
OpenAPI_ladn_info_free(amf_event_area->ladn_info);
+ OpenAPI_snssai_free(amf_event_area->s_nssai);
+ ogs_free(amf_event_area->nsi_id);
ogs_free(amf_event_area);
}
@@ -41,29 +47,49 @@ cJSON *OpenAPI_amf_event_area_convertToJSON(OpenAPI_amf_event_area_t *amf_event_
item = cJSON_CreateObject();
if (amf_event_area->presence_info) {
- cJSON *presence_info_local_JSON = OpenAPI_presence_info_convertToJSON(amf_event_area->presence_info);
- if (presence_info_local_JSON == NULL) {
- ogs_error("OpenAPI_amf_event_area_convertToJSON() failed [presence_info]");
- goto end;
- }
- cJSON_AddItemToObject(item, "presenceInfo", presence_info_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_amf_event_area_convertToJSON() failed [presence_info]");
- goto end;
- }
+ cJSON *presence_info_local_JSON = OpenAPI_presence_info_convertToJSON(amf_event_area->presence_info);
+ if (presence_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_amf_event_area_convertToJSON() failed [presence_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "presenceInfo", presence_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_amf_event_area_convertToJSON() failed [presence_info]");
+ goto end;
+ }
}
if (amf_event_area->ladn_info) {
- cJSON *ladn_info_local_JSON = OpenAPI_ladn_info_convertToJSON(amf_event_area->ladn_info);
- if (ladn_info_local_JSON == NULL) {
- ogs_error("OpenAPI_amf_event_area_convertToJSON() failed [ladn_info]");
- goto end;
- }
- cJSON_AddItemToObject(item, "ladnInfo", ladn_info_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_amf_event_area_convertToJSON() failed [ladn_info]");
- goto end;
- }
+ cJSON *ladn_info_local_JSON = OpenAPI_ladn_info_convertToJSON(amf_event_area->ladn_info);
+ if (ladn_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_amf_event_area_convertToJSON() failed [ladn_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "ladnInfo", ladn_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_amf_event_area_convertToJSON() failed [ladn_info]");
+ goto end;
+ }
+ }
+
+ if (amf_event_area->s_nssai) {
+ cJSON *s_nssai_local_JSON = OpenAPI_snssai_convertToJSON(amf_event_area->s_nssai);
+ if (s_nssai_local_JSON == NULL) {
+ ogs_error("OpenAPI_amf_event_area_convertToJSON() failed [s_nssai]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "sNssai", s_nssai_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_amf_event_area_convertToJSON() failed [s_nssai]");
+ goto end;
+ }
+ }
+
+ if (amf_event_area->nsi_id) {
+ if (cJSON_AddStringToObject(item, "nsiId", amf_event_area->nsi_id) == NULL) {
+ ogs_error("OpenAPI_amf_event_area_convertToJSON() failed [nsi_id]");
+ goto end;
+ }
}
end:
@@ -76,21 +102,39 @@ OpenAPI_amf_event_area_t *OpenAPI_amf_event_area_parseFromJSON(cJSON *amf_event_
cJSON *presence_info = cJSON_GetObjectItemCaseSensitive(amf_event_areaJSON, "presenceInfo");
OpenAPI_presence_info_t *presence_info_local_nonprim = NULL;
- if (presence_info) {
- presence_info_local_nonprim = OpenAPI_presence_info_parseFromJSON(presence_info);
+ if (presence_info) {
+ presence_info_local_nonprim = OpenAPI_presence_info_parseFromJSON(presence_info);
}
cJSON *ladn_info = cJSON_GetObjectItemCaseSensitive(amf_event_areaJSON, "ladnInfo");
OpenAPI_ladn_info_t *ladn_info_local_nonprim = NULL;
- if (ladn_info) {
- ladn_info_local_nonprim = OpenAPI_ladn_info_parseFromJSON(ladn_info);
+ if (ladn_info) {
+ ladn_info_local_nonprim = OpenAPI_ladn_info_parseFromJSON(ladn_info);
+ }
+
+ cJSON *s_nssai = cJSON_GetObjectItemCaseSensitive(amf_event_areaJSON, "sNssai");
+
+ OpenAPI_snssai_t *s_nssai_local_nonprim = NULL;
+ if (s_nssai) {
+ s_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(s_nssai);
+ }
+
+ cJSON *nsi_id = cJSON_GetObjectItemCaseSensitive(amf_event_areaJSON, "nsiId");
+
+ if (nsi_id) {
+ if (!cJSON_IsString(nsi_id)) {
+ ogs_error("OpenAPI_amf_event_area_parseFromJSON() failed [nsi_id]");
+ goto end;
+ }
}
amf_event_area_local_var = OpenAPI_amf_event_area_create (
presence_info ? presence_info_local_nonprim : NULL,
- ladn_info ? ladn_info_local_nonprim : NULL
- );
+ ladn_info ? ladn_info_local_nonprim : NULL,
+ s_nssai ? s_nssai_local_nonprim : NULL,
+ nsi_id ? ogs_strdup_or_assert(nsi_id->valuestring) : NULL
+ );
return amf_event_area_local_var;
end:
diff --git a/lib/sbi/openapi/model/amf_event_area.h b/lib/sbi/openapi/model/amf_event_area.h
index 485ba80d8..b159ebba1 100644
--- a/lib/sbi/openapi/model/amf_event_area.h
+++ b/lib/sbi/openapi/model/amf_event_area.h
@@ -1,7 +1,7 @@
/*
* amf_event_area.h
*
- *
+ *
*/
#ifndef _OpenAPI_amf_event_area_H_
@@ -14,6 +14,7 @@
#include "../include/binary.h"
#include "ladn_info.h"
#include "presence_info.h"
+#include "snssai.h"
#ifdef __cplusplus
extern "C" {
@@ -23,12 +24,16 @@ typedef struct OpenAPI_amf_event_area_s OpenAPI_amf_event_area_t;
typedef struct OpenAPI_amf_event_area_s {
struct OpenAPI_presence_info_s *presence_info;
struct OpenAPI_ladn_info_s *ladn_info;
+ struct OpenAPI_snssai_s *s_nssai;
+ char *nsi_id;
} OpenAPI_amf_event_area_t;
OpenAPI_amf_event_area_t *OpenAPI_amf_event_area_create(
OpenAPI_presence_info_t *presence_info,
- OpenAPI_ladn_info_t *ladn_info
- );
+ OpenAPI_ladn_info_t *ladn_info,
+ OpenAPI_snssai_t *s_nssai,
+ char *nsi_id
+);
void OpenAPI_amf_event_area_free(OpenAPI_amf_event_area_t *amf_event_area);
OpenAPI_amf_event_area_t *OpenAPI_amf_event_area_parseFromJSON(cJSON *amf_event_areaJSON);
cJSON *OpenAPI_amf_event_area_convertToJSON(OpenAPI_amf_event_area_t *amf_event_area);
diff --git a/lib/sbi/openapi/model/amf_event_mode.c b/lib/sbi/openapi/model/amf_event_mode.c
index 1f3d0d6f1..9141c50f1 100644
--- a/lib/sbi/openapi/model/amf_event_mode.c
+++ b/lib/sbi/openapi/model/amf_event_mode.c
@@ -7,8 +7,10 @@
OpenAPI_amf_event_mode_t *OpenAPI_amf_event_mode_create(
OpenAPI_amf_event_trigger_t *trigger,
int max_reports,
- char *expiry
- )
+ char *expiry,
+ int rep_period,
+ int samp_ratio
+)
{
OpenAPI_amf_event_mode_t *amf_event_mode_local_var = OpenAPI_malloc(sizeof(OpenAPI_amf_event_mode_t));
if (!amf_event_mode_local_var) {
@@ -17,6 +19,8 @@ OpenAPI_amf_event_mode_t *OpenAPI_amf_event_mode_create(
amf_event_mode_local_var->trigger = trigger;
amf_event_mode_local_var->max_reports = max_reports;
amf_event_mode_local_var->expiry = expiry;
+ amf_event_mode_local_var->rep_period = rep_period;
+ amf_event_mode_local_var->samp_ratio = samp_ratio;
return amf_event_mode_local_var;
}
@@ -54,17 +58,31 @@ cJSON *OpenAPI_amf_event_mode_convertToJSON(OpenAPI_amf_event_mode_t *amf_event_
}
if (amf_event_mode->max_reports) {
- if (cJSON_AddNumberToObject(item, "maxReports", amf_event_mode->max_reports) == NULL) {
- ogs_error("OpenAPI_amf_event_mode_convertToJSON() failed [max_reports]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "maxReports", amf_event_mode->max_reports) == NULL) {
+ ogs_error("OpenAPI_amf_event_mode_convertToJSON() failed [max_reports]");
+ goto end;
+ }
}
if (amf_event_mode->expiry) {
- if (cJSON_AddStringToObject(item, "expiry", amf_event_mode->expiry) == NULL) {
- ogs_error("OpenAPI_amf_event_mode_convertToJSON() failed [expiry]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "expiry", amf_event_mode->expiry) == NULL) {
+ ogs_error("OpenAPI_amf_event_mode_convertToJSON() failed [expiry]");
+ goto end;
+ }
+ }
+
+ if (amf_event_mode->rep_period) {
+ if (cJSON_AddNumberToObject(item, "repPeriod", amf_event_mode->rep_period) == NULL) {
+ ogs_error("OpenAPI_amf_event_mode_convertToJSON() failed [rep_period]");
+ goto end;
+ }
+ }
+
+ if (amf_event_mode->samp_ratio) {
+ if (cJSON_AddNumberToObject(item, "sampRatio", amf_event_mode->samp_ratio) == NULL) {
+ ogs_error("OpenAPI_amf_event_mode_convertToJSON() failed [samp_ratio]");
+ goto end;
+ }
}
end:
@@ -81,32 +99,52 @@ OpenAPI_amf_event_mode_t *OpenAPI_amf_event_mode_parseFromJSON(cJSON *amf_event_
}
OpenAPI_amf_event_trigger_t *trigger_local_nonprim = NULL;
-
+
trigger_local_nonprim = OpenAPI_amf_event_trigger_parseFromJSON(trigger);
cJSON *max_reports = cJSON_GetObjectItemCaseSensitive(amf_event_modeJSON, "maxReports");
- if (max_reports) {
- if (!cJSON_IsNumber(max_reports)) {
- ogs_error("OpenAPI_amf_event_mode_parseFromJSON() failed [max_reports]");
- goto end;
- }
+ if (max_reports) {
+ if (!cJSON_IsNumber(max_reports)) {
+ ogs_error("OpenAPI_amf_event_mode_parseFromJSON() failed [max_reports]");
+ goto end;
+ }
}
cJSON *expiry = cJSON_GetObjectItemCaseSensitive(amf_event_modeJSON, "expiry");
- if (expiry) {
- if (!cJSON_IsString(expiry)) {
- ogs_error("OpenAPI_amf_event_mode_parseFromJSON() failed [expiry]");
- goto end;
- }
+ if (expiry) {
+ if (!cJSON_IsString(expiry)) {
+ ogs_error("OpenAPI_amf_event_mode_parseFromJSON() failed [expiry]");
+ goto end;
+ }
+ }
+
+ cJSON *rep_period = cJSON_GetObjectItemCaseSensitive(amf_event_modeJSON, "repPeriod");
+
+ if (rep_period) {
+ if (!cJSON_IsNumber(rep_period)) {
+ ogs_error("OpenAPI_amf_event_mode_parseFromJSON() failed [rep_period]");
+ goto end;
+ }
+ }
+
+ cJSON *samp_ratio = cJSON_GetObjectItemCaseSensitive(amf_event_modeJSON, "sampRatio");
+
+ if (samp_ratio) {
+ if (!cJSON_IsNumber(samp_ratio)) {
+ ogs_error("OpenAPI_amf_event_mode_parseFromJSON() failed [samp_ratio]");
+ goto end;
+ }
}
amf_event_mode_local_var = OpenAPI_amf_event_mode_create (
trigger_local_nonprim,
max_reports ? max_reports->valuedouble : 0,
- expiry ? ogs_strdup_or_assert(expiry->valuestring) : NULL
- );
+ expiry ? ogs_strdup_or_assert(expiry->valuestring) : NULL,
+ rep_period ? rep_period->valuedouble : 0,
+ samp_ratio ? samp_ratio->valuedouble : 0
+ );
return amf_event_mode_local_var;
end:
diff --git a/lib/sbi/openapi/model/amf_event_mode.h b/lib/sbi/openapi/model/amf_event_mode.h
index e0ce9268d..a8e3d3f35 100644
--- a/lib/sbi/openapi/model/amf_event_mode.h
+++ b/lib/sbi/openapi/model/amf_event_mode.h
@@ -1,7 +1,7 @@
/*
* amf_event_mode.h
*
- *
+ *
*/
#ifndef _OpenAPI_amf_event_mode_H_
@@ -23,13 +23,17 @@ typedef struct OpenAPI_amf_event_mode_s {
struct OpenAPI_amf_event_trigger_s *trigger;
int max_reports;
char *expiry;
+ int rep_period;
+ int samp_ratio;
} OpenAPI_amf_event_mode_t;
OpenAPI_amf_event_mode_t *OpenAPI_amf_event_mode_create(
OpenAPI_amf_event_trigger_t *trigger,
int max_reports,
- char *expiry
- );
+ char *expiry,
+ int rep_period,
+ int samp_ratio
+);
void OpenAPI_amf_event_mode_free(OpenAPI_amf_event_mode_t *amf_event_mode);
OpenAPI_amf_event_mode_t *OpenAPI_amf_event_mode_parseFromJSON(cJSON *amf_event_modeJSON);
cJSON *OpenAPI_amf_event_mode_convertToJSON(OpenAPI_amf_event_mode_t *amf_event_mode);
diff --git a/lib/sbi/openapi/model/amf_event_subscription.c b/lib/sbi/openapi/model/amf_event_subscription.c
index bb1c59fa1..cd705e280 100644
--- a/lib/sbi/openapi/model/amf_event_subscription.c
+++ b/lib/sbi/openapi/model/amf_event_subscription.c
@@ -16,8 +16,9 @@ OpenAPI_amf_event_subscription_t *OpenAPI_amf_event_subscription_create(
char *gpsi,
char *pei,
int any_ue,
- OpenAPI_amf_event_mode_t *options
- )
+ OpenAPI_amf_event_mode_t *options,
+ OpenAPI_nf_type_e source_nf_type
+)
{
OpenAPI_amf_event_subscription_t *amf_event_subscription_local_var = OpenAPI_malloc(sizeof(OpenAPI_amf_event_subscription_t));
if (!amf_event_subscription_local_var) {
@@ -35,6 +36,7 @@ OpenAPI_amf_event_subscription_t *OpenAPI_amf_event_subscription_create(
amf_event_subscription_local_var->pei = pei;
amf_event_subscription_local_var->any_ue = any_ue;
amf_event_subscription_local_var->options = options;
+ amf_event_subscription_local_var->source_nf_type = source_nf_type;
return amf_event_subscription_local_var;
}
@@ -106,65 +108,72 @@ cJSON *OpenAPI_amf_event_subscription_convertToJSON(OpenAPI_amf_event_subscripti
}
if (amf_event_subscription->subs_change_notify_uri) {
- if (cJSON_AddStringToObject(item, "subsChangeNotifyUri", amf_event_subscription->subs_change_notify_uri) == NULL) {
- ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [subs_change_notify_uri]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "subsChangeNotifyUri", amf_event_subscription->subs_change_notify_uri) == NULL) {
+ ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [subs_change_notify_uri]");
+ goto end;
+ }
}
if (amf_event_subscription->subs_change_notify_correlation_id) {
- if (cJSON_AddStringToObject(item, "subsChangeNotifyCorrelationId", amf_event_subscription->subs_change_notify_correlation_id) == NULL) {
- ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [subs_change_notify_correlation_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "subsChangeNotifyCorrelationId", amf_event_subscription->subs_change_notify_correlation_id) == NULL) {
+ ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [subs_change_notify_correlation_id]");
+ goto end;
+ }
}
if (amf_event_subscription->supi) {
- if (cJSON_AddStringToObject(item, "supi", amf_event_subscription->supi) == NULL) {
- ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [supi]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "supi", amf_event_subscription->supi) == NULL) {
+ ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [supi]");
+ goto end;
+ }
}
if (amf_event_subscription->group_id) {
- if (cJSON_AddStringToObject(item, "groupId", amf_event_subscription->group_id) == NULL) {
- ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [group_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "groupId", amf_event_subscription->group_id) == NULL) {
+ ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [group_id]");
+ goto end;
+ }
}
if (amf_event_subscription->gpsi) {
- if (cJSON_AddStringToObject(item, "gpsi", amf_event_subscription->gpsi) == NULL) {
- ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [gpsi]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "gpsi", amf_event_subscription->gpsi) == NULL) {
+ ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [gpsi]");
+ goto end;
+ }
}
if (amf_event_subscription->pei) {
- if (cJSON_AddStringToObject(item, "pei", amf_event_subscription->pei) == NULL) {
- ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [pei]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "pei", amf_event_subscription->pei) == NULL) {
+ ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [pei]");
+ goto end;
+ }
}
if (amf_event_subscription->any_ue) {
- if (cJSON_AddBoolToObject(item, "anyUE", amf_event_subscription->any_ue) == NULL) {
- ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [any_ue]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "anyUE", amf_event_subscription->any_ue) == NULL) {
+ ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [any_ue]");
+ goto end;
+ }
}
if (amf_event_subscription->options) {
- cJSON *options_local_JSON = OpenAPI_amf_event_mode_convertToJSON(amf_event_subscription->options);
- if (options_local_JSON == NULL) {
- ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [options]");
- goto end;
- }
- cJSON_AddItemToObject(item, "options", options_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [options]");
- goto end;
- }
+ cJSON *options_local_JSON = OpenAPI_amf_event_mode_convertToJSON(amf_event_subscription->options);
+ if (options_local_JSON == NULL) {
+ ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [options]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "options", options_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [options]");
+ goto end;
+ }
+ }
+
+ if (amf_event_subscription->source_nf_type) {
+ if (cJSON_AddStringToObject(item, "sourceNfType", OpenAPI_nf_type_ToString(amf_event_subscription->source_nf_type)) == NULL) {
+ ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [source_nf_type]");
+ goto end;
+ }
}
end:
@@ -181,9 +190,9 @@ OpenAPI_amf_event_subscription_t *OpenAPI_amf_event_subscription_parseFromJSON(c
}
OpenAPI_list_t *event_listList;
-
+
cJSON *event_list_local_nonprimitive;
- if (!cJSON_IsArray(event_list)) {
+ if (!cJSON_IsArray(event_list)){
ogs_error("OpenAPI_amf_event_subscription_parseFromJSON() failed [event_list]");
goto end;
}
@@ -206,7 +215,7 @@ OpenAPI_amf_event_subscription_t *OpenAPI_amf_event_subscription_parseFromJSON(c
goto end;
}
-
+
if (!cJSON_IsString(event_notify_uri)) {
ogs_error("OpenAPI_amf_event_subscription_parseFromJSON() failed [event_notify_uri]");
goto end;
@@ -218,7 +227,7 @@ OpenAPI_amf_event_subscription_t *OpenAPI_amf_event_subscription_parseFromJSON(c
goto end;
}
-
+
if (!cJSON_IsString(notify_correlation_id)) {
ogs_error("OpenAPI_amf_event_subscription_parseFromJSON() failed [notify_correlation_id]");
goto end;
@@ -230,7 +239,7 @@ OpenAPI_amf_event_subscription_t *OpenAPI_amf_event_subscription_parseFromJSON(c
goto end;
}
-
+
if (!cJSON_IsString(nf_id)) {
ogs_error("OpenAPI_amf_event_subscription_parseFromJSON() failed [nf_id]");
goto end;
@@ -238,72 +247,83 @@ OpenAPI_amf_event_subscription_t *OpenAPI_amf_event_subscription_parseFromJSON(c
cJSON *subs_change_notify_uri = cJSON_GetObjectItemCaseSensitive(amf_event_subscriptionJSON, "subsChangeNotifyUri");
- if (subs_change_notify_uri) {
- if (!cJSON_IsString(subs_change_notify_uri)) {
- ogs_error("OpenAPI_amf_event_subscription_parseFromJSON() failed [subs_change_notify_uri]");
- goto end;
- }
+ if (subs_change_notify_uri) {
+ if (!cJSON_IsString(subs_change_notify_uri)) {
+ ogs_error("OpenAPI_amf_event_subscription_parseFromJSON() failed [subs_change_notify_uri]");
+ goto end;
+ }
}
cJSON *subs_change_notify_correlation_id = cJSON_GetObjectItemCaseSensitive(amf_event_subscriptionJSON, "subsChangeNotifyCorrelationId");
- if (subs_change_notify_correlation_id) {
- if (!cJSON_IsString(subs_change_notify_correlation_id)) {
- ogs_error("OpenAPI_amf_event_subscription_parseFromJSON() failed [subs_change_notify_correlation_id]");
- goto end;
- }
+ if (subs_change_notify_correlation_id) {
+ if (!cJSON_IsString(subs_change_notify_correlation_id)) {
+ ogs_error("OpenAPI_amf_event_subscription_parseFromJSON() failed [subs_change_notify_correlation_id]");
+ goto end;
+ }
}
cJSON *supi = cJSON_GetObjectItemCaseSensitive(amf_event_subscriptionJSON, "supi");
- if (supi) {
- if (!cJSON_IsString(supi)) {
- ogs_error("OpenAPI_amf_event_subscription_parseFromJSON() failed [supi]");
- goto end;
- }
+ if (supi) {
+ if (!cJSON_IsString(supi)) {
+ ogs_error("OpenAPI_amf_event_subscription_parseFromJSON() failed [supi]");
+ goto end;
+ }
}
cJSON *group_id = cJSON_GetObjectItemCaseSensitive(amf_event_subscriptionJSON, "groupId");
- if (group_id) {
- if (!cJSON_IsString(group_id)) {
- ogs_error("OpenAPI_amf_event_subscription_parseFromJSON() failed [group_id]");
- goto end;
- }
+ if (group_id) {
+ if (!cJSON_IsString(group_id)) {
+ ogs_error("OpenAPI_amf_event_subscription_parseFromJSON() failed [group_id]");
+ goto end;
+ }
}
cJSON *gpsi = cJSON_GetObjectItemCaseSensitive(amf_event_subscriptionJSON, "gpsi");
- if (gpsi) {
- if (!cJSON_IsString(gpsi)) {
- ogs_error("OpenAPI_amf_event_subscription_parseFromJSON() failed [gpsi]");
- goto end;
- }
+ if (gpsi) {
+ if (!cJSON_IsString(gpsi)) {
+ ogs_error("OpenAPI_amf_event_subscription_parseFromJSON() failed [gpsi]");
+ goto end;
+ }
}
cJSON *pei = cJSON_GetObjectItemCaseSensitive(amf_event_subscriptionJSON, "pei");
- if (pei) {
- if (!cJSON_IsString(pei)) {
- ogs_error("OpenAPI_amf_event_subscription_parseFromJSON() failed [pei]");
- goto end;
- }
+ if (pei) {
+ if (!cJSON_IsString(pei)) {
+ ogs_error("OpenAPI_amf_event_subscription_parseFromJSON() failed [pei]");
+ goto end;
+ }
}
cJSON *any_ue = cJSON_GetObjectItemCaseSensitive(amf_event_subscriptionJSON, "anyUE");
- if (any_ue) {
- if (!cJSON_IsBool(any_ue)) {
- ogs_error("OpenAPI_amf_event_subscription_parseFromJSON() failed [any_ue]");
- goto end;
- }
+ if (any_ue) {
+ if (!cJSON_IsBool(any_ue)) {
+ ogs_error("OpenAPI_amf_event_subscription_parseFromJSON() failed [any_ue]");
+ goto end;
+ }
}
cJSON *options = cJSON_GetObjectItemCaseSensitive(amf_event_subscriptionJSON, "options");
OpenAPI_amf_event_mode_t *options_local_nonprim = NULL;
- if (options) {
- options_local_nonprim = OpenAPI_amf_event_mode_parseFromJSON(options);
+ if (options) {
+ options_local_nonprim = OpenAPI_amf_event_mode_parseFromJSON(options);
+ }
+
+ cJSON *source_nf_type = cJSON_GetObjectItemCaseSensitive(amf_event_subscriptionJSON, "sourceNfType");
+
+ OpenAPI_nf_type_e source_nf_typeVariable;
+ if (source_nf_type) {
+ if (!cJSON_IsString(source_nf_type)) {
+ ogs_error("OpenAPI_amf_event_subscription_parseFromJSON() failed [source_nf_type]");
+ goto end;
+ }
+ source_nf_typeVariable = OpenAPI_nf_type_FromString(source_nf_type->valuestring);
}
amf_event_subscription_local_var = OpenAPI_amf_event_subscription_create (
@@ -318,8 +338,9 @@ OpenAPI_amf_event_subscription_t *OpenAPI_amf_event_subscription_parseFromJSON(c
gpsi ? ogs_strdup_or_assert(gpsi->valuestring) : NULL,
pei ? ogs_strdup_or_assert(pei->valuestring) : NULL,
any_ue ? any_ue->valueint : 0,
- options ? options_local_nonprim : NULL
- );
+ options ? options_local_nonprim : NULL,
+ source_nf_type ? source_nf_typeVariable : 0
+ );
return amf_event_subscription_local_var;
end:
diff --git a/lib/sbi/openapi/model/amf_event_subscription.h b/lib/sbi/openapi/model/amf_event_subscription.h
index 3a1949348..ac2753b28 100644
--- a/lib/sbi/openapi/model/amf_event_subscription.h
+++ b/lib/sbi/openapi/model/amf_event_subscription.h
@@ -1,7 +1,7 @@
/*
* amf_event_subscription.h
*
- *
+ *
*/
#ifndef _OpenAPI_amf_event_subscription_H_
@@ -14,6 +14,7 @@
#include "../include/binary.h"
#include "amf_event.h"
#include "amf_event_mode.h"
+#include "nf_type.h"
#ifdef __cplusplus
extern "C" {
@@ -33,6 +34,7 @@ typedef struct OpenAPI_amf_event_subscription_s {
char *pei;
int any_ue;
struct OpenAPI_amf_event_mode_s *options;
+ OpenAPI_nf_type_e source_nf_type;
} OpenAPI_amf_event_subscription_t;
OpenAPI_amf_event_subscription_t *OpenAPI_amf_event_subscription_create(
@@ -47,8 +49,9 @@ OpenAPI_amf_event_subscription_t *OpenAPI_amf_event_subscription_create(
char *gpsi,
char *pei,
int any_ue,
- OpenAPI_amf_event_mode_t *options
- );
+ OpenAPI_amf_event_mode_t *options,
+ OpenAPI_nf_type_e source_nf_type
+);
void OpenAPI_amf_event_subscription_free(OpenAPI_amf_event_subscription_t *amf_event_subscription);
OpenAPI_amf_event_subscription_t *OpenAPI_amf_event_subscription_parseFromJSON(cJSON *amf_event_subscriptionJSON);
cJSON *OpenAPI_amf_event_subscription_convertToJSON(OpenAPI_amf_event_subscription_t *amf_event_subscription);
diff --git a/lib/sbi/openapi/model/amf_event_subscription_add_info.c b/lib/sbi/openapi/model/amf_event_subscription_add_info.c
new file mode 100644
index 000000000..c14a4af21
--- /dev/null
+++ b/lib/sbi/openapi/model/amf_event_subscription_add_info.c
@@ -0,0 +1,149 @@
+
+#include
+#include
+#include
+#include "amf_event_subscription_add_info.h"
+
+OpenAPI_amf_event_subscription_add_info_t *OpenAPI_amf_event_subscription_add_info_create(
+ OpenAPI_list_t *binding_info,
+ OpenAPI_nf_type_e subscribing_nf_type
+)
+{
+ OpenAPI_amf_event_subscription_add_info_t *amf_event_subscription_add_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_amf_event_subscription_add_info_t));
+ if (!amf_event_subscription_add_info_local_var) {
+ return NULL;
+ }
+ amf_event_subscription_add_info_local_var->binding_info = binding_info;
+ amf_event_subscription_add_info_local_var->subscribing_nf_type = subscribing_nf_type;
+
+ return amf_event_subscription_add_info_local_var;
+}
+
+void OpenAPI_amf_event_subscription_add_info_free(OpenAPI_amf_event_subscription_add_info_t *amf_event_subscription_add_info)
+{
+ if (NULL == amf_event_subscription_add_info) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ OpenAPI_list_for_each(amf_event_subscription_add_info->binding_info, node) {
+ ogs_free(node->data);
+ }
+ OpenAPI_list_free(amf_event_subscription_add_info->binding_info);
+ ogs_free(amf_event_subscription_add_info);
+}
+
+cJSON *OpenAPI_amf_event_subscription_add_info_convertToJSON(OpenAPI_amf_event_subscription_add_info_t *amf_event_subscription_add_info)
+{
+ cJSON *item = NULL;
+
+ if (amf_event_subscription_add_info == NULL) {
+ ogs_error("OpenAPI_amf_event_subscription_add_info_convertToJSON() failed [AmfEventSubscriptionAddInfo]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (amf_event_subscription_add_info->binding_info) {
+ cJSON *binding_info = cJSON_AddArrayToObject(item, "bindingInfo");
+ if (binding_info == NULL) {
+ ogs_error("OpenAPI_amf_event_subscription_add_info_convertToJSON() failed [binding_info]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *binding_info_node;
+ OpenAPI_list_for_each(amf_event_subscription_add_info->binding_info, binding_info_node) {
+ if (cJSON_AddStringToObject(binding_info, "", (char*)binding_info_node->data) == NULL) {
+ ogs_error("OpenAPI_amf_event_subscription_add_info_convertToJSON() failed [binding_info]");
+ goto end;
+ }
+ }
+ }
+
+ if (amf_event_subscription_add_info->subscribing_nf_type) {
+ if (cJSON_AddStringToObject(item, "subscribingNfType", OpenAPI_nf_type_ToString(amf_event_subscription_add_info->subscribing_nf_type)) == NULL) {
+ ogs_error("OpenAPI_amf_event_subscription_add_info_convertToJSON() failed [subscribing_nf_type]");
+ goto end;
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_amf_event_subscription_add_info_t *OpenAPI_amf_event_subscription_add_info_parseFromJSON(cJSON *amf_event_subscription_add_infoJSON)
+{
+ OpenAPI_amf_event_subscription_add_info_t *amf_event_subscription_add_info_local_var = NULL;
+ cJSON *binding_info = cJSON_GetObjectItemCaseSensitive(amf_event_subscription_add_infoJSON, "bindingInfo");
+
+ OpenAPI_list_t *binding_infoList;
+ if (binding_info) {
+ cJSON *binding_info_local;
+ if (!cJSON_IsArray(binding_info)) {
+ ogs_error("OpenAPI_amf_event_subscription_add_info_parseFromJSON() failed [binding_info]");
+ goto end;
+ }
+ binding_infoList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(binding_info_local, binding_info) {
+ if (!cJSON_IsString(binding_info_local)) {
+ ogs_error("OpenAPI_amf_event_subscription_add_info_parseFromJSON() failed [binding_info]");
+ goto end;
+ }
+ OpenAPI_list_add(binding_infoList , ogs_strdup_or_assert(binding_info_local->valuestring));
+ }
+ }
+
+ cJSON *subscribing_nf_type = cJSON_GetObjectItemCaseSensitive(amf_event_subscription_add_infoJSON, "subscribingNfType");
+
+ OpenAPI_nf_type_e subscribing_nf_typeVariable;
+ if (subscribing_nf_type) {
+ if (!cJSON_IsString(subscribing_nf_type)) {
+ ogs_error("OpenAPI_amf_event_subscription_add_info_parseFromJSON() failed [subscribing_nf_type]");
+ goto end;
+ }
+ subscribing_nf_typeVariable = OpenAPI_nf_type_FromString(subscribing_nf_type->valuestring);
+ }
+
+ amf_event_subscription_add_info_local_var = OpenAPI_amf_event_subscription_add_info_create (
+ binding_info ? binding_infoList : NULL,
+ subscribing_nf_type ? subscribing_nf_typeVariable : 0
+ );
+
+ return amf_event_subscription_add_info_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_amf_event_subscription_add_info_t *OpenAPI_amf_event_subscription_add_info_copy(OpenAPI_amf_event_subscription_add_info_t *dst, OpenAPI_amf_event_subscription_add_info_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_amf_event_subscription_add_info_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_amf_event_subscription_add_info_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_amf_event_subscription_add_info_free(dst);
+ dst = OpenAPI_amf_event_subscription_add_info_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/amf_event_subscription_add_info.h b/lib/sbi/openapi/model/amf_event_subscription_add_info.h
new file mode 100644
index 000000000..93751988d
--- /dev/null
+++ b/lib/sbi/openapi/model/amf_event_subscription_add_info.h
@@ -0,0 +1,41 @@
+/*
+ * amf_event_subscription_add_info.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_amf_event_subscription_add_info_H_
+#define _OpenAPI_amf_event_subscription_add_info_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+#include "nf_type.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_amf_event_subscription_add_info_s OpenAPI_amf_event_subscription_add_info_t;
+typedef struct OpenAPI_amf_event_subscription_add_info_s {
+ OpenAPI_list_t *binding_info;
+ OpenAPI_nf_type_e subscribing_nf_type;
+} OpenAPI_amf_event_subscription_add_info_t;
+
+OpenAPI_amf_event_subscription_add_info_t *OpenAPI_amf_event_subscription_add_info_create(
+ OpenAPI_list_t *binding_info,
+ OpenAPI_nf_type_e subscribing_nf_type
+);
+void OpenAPI_amf_event_subscription_add_info_free(OpenAPI_amf_event_subscription_add_info_t *amf_event_subscription_add_info);
+OpenAPI_amf_event_subscription_add_info_t *OpenAPI_amf_event_subscription_add_info_parseFromJSON(cJSON *amf_event_subscription_add_infoJSON);
+cJSON *OpenAPI_amf_event_subscription_add_info_convertToJSON(OpenAPI_amf_event_subscription_add_info_t *amf_event_subscription_add_info);
+OpenAPI_amf_event_subscription_add_info_t *OpenAPI_amf_event_subscription_add_info_copy(OpenAPI_amf_event_subscription_add_info_t *dst, OpenAPI_amf_event_subscription_add_info_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_amf_event_subscription_add_info_H_ */
+
diff --git a/lib/sbi/openapi/model/amf_event_trigger.c b/lib/sbi/openapi/model/amf_event_trigger.c
index 5102dd668..13a45e63b 100644
--- a/lib/sbi/openapi/model/amf_event_trigger.c
+++ b/lib/sbi/openapi/model/amf_event_trigger.c
@@ -5,7 +5,7 @@
#include "amf_event_trigger.h"
OpenAPI_amf_event_trigger_t *OpenAPI_amf_event_trigger_create(
- )
+)
{
OpenAPI_amf_event_trigger_t *amf_event_trigger_local_var = OpenAPI_malloc(sizeof(OpenAPI_amf_event_trigger_t));
if (!amf_event_trigger_local_var) {
@@ -42,7 +42,7 @@ OpenAPI_amf_event_trigger_t *OpenAPI_amf_event_trigger_parseFromJSON(cJSON *amf_
{
OpenAPI_amf_event_trigger_t *amf_event_trigger_local_var = NULL;
amf_event_trigger_local_var = OpenAPI_amf_event_trigger_create (
- );
+ );
return amf_event_trigger_local_var;
end:
diff --git a/lib/sbi/openapi/model/amf_event_trigger.h b/lib/sbi/openapi/model/amf_event_trigger.h
index 3131fda17..e10740dc7 100644
--- a/lib/sbi/openapi/model/amf_event_trigger.h
+++ b/lib/sbi/openapi/model/amf_event_trigger.h
@@ -1,7 +1,7 @@
/*
* amf_event_trigger.h
*
- *
+ *
*/
#ifndef _OpenAPI_amf_event_trigger_H_
@@ -12,6 +12,7 @@
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
+#include "amf_event_trigger_any_of.h"
#ifdef __cplusplus
extern "C" {
@@ -22,7 +23,7 @@ typedef struct OpenAPI_amf_event_trigger_s {
} OpenAPI_amf_event_trigger_t;
OpenAPI_amf_event_trigger_t *OpenAPI_amf_event_trigger_create(
- );
+);
void OpenAPI_amf_event_trigger_free(OpenAPI_amf_event_trigger_t *amf_event_trigger);
OpenAPI_amf_event_trigger_t *OpenAPI_amf_event_trigger_parseFromJSON(cJSON *amf_event_triggerJSON);
cJSON *OpenAPI_amf_event_trigger_convertToJSON(OpenAPI_amf_event_trigger_t *amf_event_trigger);
diff --git a/lib/sbi/openapi/model/amf_event_trigger_any_of.c b/lib/sbi/openapi/model/amf_event_trigger_any_of.c
new file mode 100644
index 000000000..6312c1761
--- /dev/null
+++ b/lib/sbi/openapi/model/amf_event_trigger_any_of.c
@@ -0,0 +1,30 @@
+
+#include
+#include
+#include
+#include "amf_event_trigger_any_of.h"
+
+char* OpenAPI_amf_event_trigger_any_of_ToString(OpenAPI_amf_event_trigger_any_of_e amf_event_trigger_any_of)
+{
+ const char *amf_event_trigger_any_ofArray[] = { "NULL", "ONE_TIME", "CONTINUOUS", "PERIODIC" };
+ size_t sizeofArray = sizeof(amf_event_trigger_any_ofArray) / sizeof(amf_event_trigger_any_ofArray[0]);
+ if (amf_event_trigger_any_of < sizeofArray)
+ return (char *)amf_event_trigger_any_ofArray[amf_event_trigger_any_of];
+ else
+ return (char *)"Unknown";
+}
+
+OpenAPI_amf_event_trigger_any_of_e OpenAPI_amf_event_trigger_any_of_FromString(char* amf_event_trigger_any_of)
+{
+ int stringToReturn = 0;
+ const char *amf_event_trigger_any_ofArray[] = { "NULL", "ONE_TIME", "CONTINUOUS", "PERIODIC" };
+ size_t sizeofArray = sizeof(amf_event_trigger_any_ofArray) / sizeof(amf_event_trigger_any_ofArray[0]);
+ while (stringToReturn < sizeofArray) {
+ if (strcmp(amf_event_trigger_any_of, amf_event_trigger_any_ofArray[stringToReturn]) == 0) {
+ return stringToReturn;
+ }
+ stringToReturn++;
+ }
+ return 0;
+}
+
diff --git a/lib/sbi/openapi/model/amf_event_trigger_any_of.h b/lib/sbi/openapi/model/amf_event_trigger_any_of.h
new file mode 100644
index 000000000..dca4dc095
--- /dev/null
+++ b/lib/sbi/openapi/model/amf_event_trigger_any_of.h
@@ -0,0 +1,31 @@
+/*
+ * amf_event_trigger_any_of.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_amf_event_trigger_any_of_H_
+#define _OpenAPI_amf_event_trigger_any_of_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum { OpenAPI_amf_event_trigger_any_of_NULL = 0, OpenAPI_amf_event_trigger_any_of_ONE_TIME, OpenAPI_amf_event_trigger_any_of_CONTINUOUS, OpenAPI_amf_event_trigger_any_of_PERIODIC } OpenAPI_amf_event_trigger_any_of_e;
+
+char* OpenAPI_amf_event_trigger_any_of_ToString(OpenAPI_amf_event_trigger_any_of_e amf_event_trigger_any_of);
+
+OpenAPI_amf_event_trigger_any_of_e OpenAPI_amf_event_trigger_any_of_FromString(char* amf_event_trigger_any_of);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_amf_event_trigger_any_of_H_ */
+
diff --git a/lib/sbi/openapi/model/amf_event_type.c b/lib/sbi/openapi/model/amf_event_type.c
index 6eca30c62..5f3d10282 100644
--- a/lib/sbi/openapi/model/amf_event_type.c
+++ b/lib/sbi/openapi/model/amf_event_type.c
@@ -5,7 +5,7 @@
#include "amf_event_type.h"
OpenAPI_amf_event_type_t *OpenAPI_amf_event_type_create(
- )
+)
{
OpenAPI_amf_event_type_t *amf_event_type_local_var = OpenAPI_malloc(sizeof(OpenAPI_amf_event_type_t));
if (!amf_event_type_local_var) {
@@ -42,7 +42,7 @@ OpenAPI_amf_event_type_t *OpenAPI_amf_event_type_parseFromJSON(cJSON *amf_event_
{
OpenAPI_amf_event_type_t *amf_event_type_local_var = NULL;
amf_event_type_local_var = OpenAPI_amf_event_type_create (
- );
+ );
return amf_event_type_local_var;
end:
diff --git a/lib/sbi/openapi/model/amf_event_type.h b/lib/sbi/openapi/model/amf_event_type.h
index 90c682b32..8f07c148d 100644
--- a/lib/sbi/openapi/model/amf_event_type.h
+++ b/lib/sbi/openapi/model/amf_event_type.h
@@ -1,7 +1,7 @@
/*
* amf_event_type.h
*
- *
+ *
*/
#ifndef _OpenAPI_amf_event_type_H_
@@ -12,6 +12,7 @@
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
+#include "amf_event_type_any_of.h"
#ifdef __cplusplus
extern "C" {
@@ -22,7 +23,7 @@ typedef struct OpenAPI_amf_event_type_s {
} OpenAPI_amf_event_type_t;
OpenAPI_amf_event_type_t *OpenAPI_amf_event_type_create(
- );
+);
void OpenAPI_amf_event_type_free(OpenAPI_amf_event_type_t *amf_event_type);
OpenAPI_amf_event_type_t *OpenAPI_amf_event_type_parseFromJSON(cJSON *amf_event_typeJSON);
cJSON *OpenAPI_amf_event_type_convertToJSON(OpenAPI_amf_event_type_t *amf_event_type);
diff --git a/lib/sbi/openapi/model/amf_event_type_any_of.c b/lib/sbi/openapi/model/amf_event_type_any_of.c
new file mode 100644
index 000000000..737552a00
--- /dev/null
+++ b/lib/sbi/openapi/model/amf_event_type_any_of.c
@@ -0,0 +1,30 @@
+
+#include
+#include
+#include
+#include "amf_event_type_any_of.h"
+
+char* OpenAPI_amf_event_type_any_of_ToString(OpenAPI_amf_event_type_any_of_e amf_event_type_any_of)
+{
+ const char *amf_event_type_any_ofArray[] = { "NULL", "LOCATION_REPORT", "PRESENCE_IN_AOI_REPORT", "TIMEZONE_REPORT", "ACCESS_TYPE_REPORT", "REGISTRATION_STATE_REPORT", "CONNECTIVITY_STATE_REPORT", "REACHABILITY_REPORT", "COMMUNICATION_FAILURE_REPORT", "UES_IN_AREA_REPORT", "SUBSCRIPTION_ID_CHANGE", "SUBSCRIPTION_ID_ADDITION", "LOSS_OF_CONNECTIVITY", "_5GS_USER_STATE_REPORT", "AVAILABILITY_AFTER_DDN_FAILURE", "TYPE_ALLOCATION_CODE_REPORT", "FREQUENT_MOBILITY_REGISTRATION_REPORT" };
+ size_t sizeofArray = sizeof(amf_event_type_any_ofArray) / sizeof(amf_event_type_any_ofArray[0]);
+ if (amf_event_type_any_of < sizeofArray)
+ return (char *)amf_event_type_any_ofArray[amf_event_type_any_of];
+ else
+ return (char *)"Unknown";
+}
+
+OpenAPI_amf_event_type_any_of_e OpenAPI_amf_event_type_any_of_FromString(char* amf_event_type_any_of)
+{
+ int stringToReturn = 0;
+ const char *amf_event_type_any_ofArray[] = { "NULL", "LOCATION_REPORT", "PRESENCE_IN_AOI_REPORT", "TIMEZONE_REPORT", "ACCESS_TYPE_REPORT", "REGISTRATION_STATE_REPORT", "CONNECTIVITY_STATE_REPORT", "REACHABILITY_REPORT", "COMMUNICATION_FAILURE_REPORT", "UES_IN_AREA_REPORT", "SUBSCRIPTION_ID_CHANGE", "SUBSCRIPTION_ID_ADDITION", "LOSS_OF_CONNECTIVITY", "_5GS_USER_STATE_REPORT", "AVAILABILITY_AFTER_DDN_FAILURE", "TYPE_ALLOCATION_CODE_REPORT", "FREQUENT_MOBILITY_REGISTRATION_REPORT" };
+ size_t sizeofArray = sizeof(amf_event_type_any_ofArray) / sizeof(amf_event_type_any_ofArray[0]);
+ while (stringToReturn < sizeofArray) {
+ if (strcmp(amf_event_type_any_of, amf_event_type_any_ofArray[stringToReturn]) == 0) {
+ return stringToReturn;
+ }
+ stringToReturn++;
+ }
+ return 0;
+}
+
diff --git a/lib/sbi/openapi/model/amf_event_type_any_of.h b/lib/sbi/openapi/model/amf_event_type_any_of.h
new file mode 100644
index 000000000..e3942cb6b
--- /dev/null
+++ b/lib/sbi/openapi/model/amf_event_type_any_of.h
@@ -0,0 +1,31 @@
+/*
+ * amf_event_type_any_of.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_amf_event_type_any_of_H_
+#define _OpenAPI_amf_event_type_any_of_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum { OpenAPI_amf_event_type_any_of_NULL = 0, OpenAPI_amf_event_type_any_of_LOCATION_REPORT, OpenAPI_amf_event_type_any_of_PRESENCE_IN_AOI_REPORT, OpenAPI_amf_event_type_any_of_TIMEZONE_REPORT, OpenAPI_amf_event_type_any_of_ACCESS_TYPE_REPORT, OpenAPI_amf_event_type_any_of_REGISTRATION_STATE_REPORT, OpenAPI_amf_event_type_any_of_CONNECTIVITY_STATE_REPORT, OpenAPI_amf_event_type_any_of_REACHABILITY_REPORT, OpenAPI_amf_event_type_any_of_COMMUNICATION_FAILURE_REPORT, OpenAPI_amf_event_type_any_of_UES_IN_AREA_REPORT, OpenAPI_amf_event_type_any_of_SUBSCRIPTION_ID_CHANGE, OpenAPI_amf_event_type_any_of_SUBSCRIPTION_ID_ADDITION, OpenAPI_amf_event_type_any_of_LOSS_OF_CONNECTIVITY, OpenAPI_amf_event_type_any_of__5GS_USER_STATE_REPORT, OpenAPI_amf_event_type_any_of_AVAILABILITY_AFTER_DDN_FAILURE, OpenAPI_amf_event_type_any_of_TYPE_ALLOCATION_CODE_REPORT, OpenAPI_amf_event_type_any_of_FREQUENT_MOBILITY_REGISTRATION_REPORT } OpenAPI_amf_event_type_any_of_e;
+
+char* OpenAPI_amf_event_type_any_of_ToString(OpenAPI_amf_event_type_any_of_e amf_event_type_any_of);
+
+OpenAPI_amf_event_type_any_of_e OpenAPI_amf_event_type_any_of_FromString(char* amf_event_type_any_of);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_amf_event_type_any_of_H_ */
+
diff --git a/lib/sbi/openapi/model/amf_info.c b/lib/sbi/openapi/model/amf_info.c
index e4911bbcb..b96cd040a 100644
--- a/lib/sbi/openapi/model/amf_info.c
+++ b/lib/sbi/openapi/model/amf_info.c
@@ -13,7 +13,7 @@ OpenAPI_amf_info_t *OpenAPI_amf_info_create(
OpenAPI_list_t *backup_info_amf_failure,
OpenAPI_list_t *backup_info_amf_removal,
OpenAPI_n2_interface_amf_info_t *n2_interface_amf_info
- )
+)
{
OpenAPI_amf_info_t *amf_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_amf_info_t));
if (!amf_info_local_var) {
@@ -102,96 +102,96 @@ cJSON *OpenAPI_amf_info_convertToJSON(OpenAPI_amf_info_t *amf_info)
}
if (amf_info->tai_list) {
- cJSON *tai_listList = cJSON_AddArrayToObject(item, "taiList");
- if (tai_listList == NULL) {
- ogs_error("OpenAPI_amf_info_convertToJSON() failed [tai_list]");
- goto end;
- }
+ cJSON *tai_listList = cJSON_AddArrayToObject(item, "taiList");
+ if (tai_listList == NULL) {
+ ogs_error("OpenAPI_amf_info_convertToJSON() failed [tai_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *tai_list_node;
- if (amf_info->tai_list) {
- OpenAPI_list_for_each(amf_info->tai_list, tai_list_node) {
- cJSON *itemLocal = OpenAPI_tai_convertToJSON(tai_list_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_amf_info_convertToJSON() failed [tai_list]");
- goto end;
- }
- cJSON_AddItemToArray(tai_listList, itemLocal);
+ OpenAPI_lnode_t *tai_list_node;
+ if (amf_info->tai_list) {
+ OpenAPI_list_for_each(amf_info->tai_list, tai_list_node) {
+ cJSON *itemLocal = OpenAPI_tai_convertToJSON(tai_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_amf_info_convertToJSON() failed [tai_list]");
+ goto end;
}
+ cJSON_AddItemToArray(tai_listList, itemLocal);
}
}
+ }
if (amf_info->tai_range_list) {
- cJSON *tai_range_listList = cJSON_AddArrayToObject(item, "taiRangeList");
- if (tai_range_listList == NULL) {
- ogs_error("OpenAPI_amf_info_convertToJSON() failed [tai_range_list]");
- goto end;
- }
+ cJSON *tai_range_listList = cJSON_AddArrayToObject(item, "taiRangeList");
+ if (tai_range_listList == NULL) {
+ ogs_error("OpenAPI_amf_info_convertToJSON() failed [tai_range_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *tai_range_list_node;
- if (amf_info->tai_range_list) {
- OpenAPI_list_for_each(amf_info->tai_range_list, tai_range_list_node) {
- cJSON *itemLocal = OpenAPI_tai_range_convertToJSON(tai_range_list_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_amf_info_convertToJSON() failed [tai_range_list]");
- goto end;
- }
- cJSON_AddItemToArray(tai_range_listList, itemLocal);
+ OpenAPI_lnode_t *tai_range_list_node;
+ if (amf_info->tai_range_list) {
+ OpenAPI_list_for_each(amf_info->tai_range_list, tai_range_list_node) {
+ cJSON *itemLocal = OpenAPI_tai_range_convertToJSON(tai_range_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_amf_info_convertToJSON() failed [tai_range_list]");
+ goto end;
}
+ cJSON_AddItemToArray(tai_range_listList, itemLocal);
}
}
+ }
if (amf_info->backup_info_amf_failure) {
- cJSON *backup_info_amf_failureList = cJSON_AddArrayToObject(item, "backupInfoAmfFailure");
- if (backup_info_amf_failureList == NULL) {
- ogs_error("OpenAPI_amf_info_convertToJSON() failed [backup_info_amf_failure]");
- goto end;
- }
+ cJSON *backup_info_amf_failureList = cJSON_AddArrayToObject(item, "backupInfoAmfFailure");
+ if (backup_info_amf_failureList == NULL) {
+ ogs_error("OpenAPI_amf_info_convertToJSON() failed [backup_info_amf_failure]");
+ goto end;
+ }
- OpenAPI_lnode_t *backup_info_amf_failure_node;
- if (amf_info->backup_info_amf_failure) {
- OpenAPI_list_for_each(amf_info->backup_info_amf_failure, backup_info_amf_failure_node) {
- cJSON *itemLocal = OpenAPI_guami_convertToJSON(backup_info_amf_failure_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_amf_info_convertToJSON() failed [backup_info_amf_failure]");
- goto end;
- }
- cJSON_AddItemToArray(backup_info_amf_failureList, itemLocal);
+ OpenAPI_lnode_t *backup_info_amf_failure_node;
+ if (amf_info->backup_info_amf_failure) {
+ OpenAPI_list_for_each(amf_info->backup_info_amf_failure, backup_info_amf_failure_node) {
+ cJSON *itemLocal = OpenAPI_guami_convertToJSON(backup_info_amf_failure_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_amf_info_convertToJSON() failed [backup_info_amf_failure]");
+ goto end;
}
+ cJSON_AddItemToArray(backup_info_amf_failureList, itemLocal);
}
}
+ }
if (amf_info->backup_info_amf_removal) {
- cJSON *backup_info_amf_removalList = cJSON_AddArrayToObject(item, "backupInfoAmfRemoval");
- if (backup_info_amf_removalList == NULL) {
- ogs_error("OpenAPI_amf_info_convertToJSON() failed [backup_info_amf_removal]");
- goto end;
- }
+ cJSON *backup_info_amf_removalList = cJSON_AddArrayToObject(item, "backupInfoAmfRemoval");
+ if (backup_info_amf_removalList == NULL) {
+ ogs_error("OpenAPI_amf_info_convertToJSON() failed [backup_info_amf_removal]");
+ goto end;
+ }
- OpenAPI_lnode_t *backup_info_amf_removal_node;
- if (amf_info->backup_info_amf_removal) {
- OpenAPI_list_for_each(amf_info->backup_info_amf_removal, backup_info_amf_removal_node) {
- cJSON *itemLocal = OpenAPI_guami_convertToJSON(backup_info_amf_removal_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_amf_info_convertToJSON() failed [backup_info_amf_removal]");
- goto end;
- }
- cJSON_AddItemToArray(backup_info_amf_removalList, itemLocal);
+ OpenAPI_lnode_t *backup_info_amf_removal_node;
+ if (amf_info->backup_info_amf_removal) {
+ OpenAPI_list_for_each(amf_info->backup_info_amf_removal, backup_info_amf_removal_node) {
+ cJSON *itemLocal = OpenAPI_guami_convertToJSON(backup_info_amf_removal_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_amf_info_convertToJSON() failed [backup_info_amf_removal]");
+ goto end;
}
+ cJSON_AddItemToArray(backup_info_amf_removalList, itemLocal);
}
}
+ }
if (amf_info->n2_interface_amf_info) {
- cJSON *n2_interface_amf_info_local_JSON = OpenAPI_n2_interface_amf_info_convertToJSON(amf_info->n2_interface_amf_info);
- if (n2_interface_amf_info_local_JSON == NULL) {
- ogs_error("OpenAPI_amf_info_convertToJSON() failed [n2_interface_amf_info]");
- goto end;
- }
- cJSON_AddItemToObject(item, "n2InterfaceAmfInfo", n2_interface_amf_info_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_amf_info_convertToJSON() failed [n2_interface_amf_info]");
- goto end;
- }
+ cJSON *n2_interface_amf_info_local_JSON = OpenAPI_n2_interface_amf_info_convertToJSON(amf_info->n2_interface_amf_info);
+ if (n2_interface_amf_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_amf_info_convertToJSON() failed [n2_interface_amf_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "n2InterfaceAmfInfo", n2_interface_amf_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_amf_info_convertToJSON() failed [n2_interface_amf_info]");
+ goto end;
+ }
}
end:
@@ -207,7 +207,7 @@ OpenAPI_amf_info_t *OpenAPI_amf_info_parseFromJSON(cJSON *amf_infoJSON)
goto end;
}
-
+
if (!cJSON_IsString(amf_set_id)) {
ogs_error("OpenAPI_amf_info_parseFromJSON() failed [amf_set_id]");
goto end;
@@ -219,7 +219,7 @@ OpenAPI_amf_info_t *OpenAPI_amf_info_parseFromJSON(cJSON *amf_infoJSON)
goto end;
}
-
+
if (!cJSON_IsString(amf_region_id)) {
ogs_error("OpenAPI_amf_info_parseFromJSON() failed [amf_region_id]");
goto end;
@@ -232,9 +232,9 @@ OpenAPI_amf_info_t *OpenAPI_amf_info_parseFromJSON(cJSON *amf_infoJSON)
}
OpenAPI_list_t *guami_listList;
-
+
cJSON *guami_list_local_nonprimitive;
- if (!cJSON_IsArray(guami_list)) {
+ if (!cJSON_IsArray(guami_list)){
ogs_error("OpenAPI_amf_info_parseFromJSON() failed [guami_list]");
goto end;
}
@@ -254,100 +254,100 @@ OpenAPI_amf_info_t *OpenAPI_amf_info_parseFromJSON(cJSON *amf_infoJSON)
cJSON *tai_list = cJSON_GetObjectItemCaseSensitive(amf_infoJSON, "taiList");
OpenAPI_list_t *tai_listList;
- if (tai_list) {
- cJSON *tai_list_local_nonprimitive;
- if (!cJSON_IsArray(tai_list)) {
+ if (tai_list) {
+ cJSON *tai_list_local_nonprimitive;
+ if (!cJSON_IsArray(tai_list)){
+ ogs_error("OpenAPI_amf_info_parseFromJSON() failed [tai_list]");
+ goto end;
+ }
+
+ tai_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(tai_list_local_nonprimitive, tai_list ) {
+ if (!cJSON_IsObject(tai_list_local_nonprimitive)) {
ogs_error("OpenAPI_amf_info_parseFromJSON() failed [tai_list]");
goto end;
}
+ OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local_nonprimitive);
- tai_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(tai_list_local_nonprimitive, tai_list ) {
- if (!cJSON_IsObject(tai_list_local_nonprimitive)) {
- ogs_error("OpenAPI_amf_info_parseFromJSON() failed [tai_list]");
- goto end;
- }
- OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local_nonprimitive);
-
- OpenAPI_list_add(tai_listList, tai_listItem);
- }
+ OpenAPI_list_add(tai_listList, tai_listItem);
+ }
}
cJSON *tai_range_list = cJSON_GetObjectItemCaseSensitive(amf_infoJSON, "taiRangeList");
OpenAPI_list_t *tai_range_listList;
- if (tai_range_list) {
- cJSON *tai_range_list_local_nonprimitive;
- if (!cJSON_IsArray(tai_range_list)) {
+ if (tai_range_list) {
+ cJSON *tai_range_list_local_nonprimitive;
+ if (!cJSON_IsArray(tai_range_list)){
+ ogs_error("OpenAPI_amf_info_parseFromJSON() failed [tai_range_list]");
+ goto end;
+ }
+
+ tai_range_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(tai_range_list_local_nonprimitive, tai_range_list ) {
+ if (!cJSON_IsObject(tai_range_list_local_nonprimitive)) {
ogs_error("OpenAPI_amf_info_parseFromJSON() failed [tai_range_list]");
goto end;
}
+ OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local_nonprimitive);
- tai_range_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(tai_range_list_local_nonprimitive, tai_range_list ) {
- if (!cJSON_IsObject(tai_range_list_local_nonprimitive)) {
- ogs_error("OpenAPI_amf_info_parseFromJSON() failed [tai_range_list]");
- goto end;
- }
- OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local_nonprimitive);
-
- OpenAPI_list_add(tai_range_listList, tai_range_listItem);
- }
+ OpenAPI_list_add(tai_range_listList, tai_range_listItem);
+ }
}
cJSON *backup_info_amf_failure = cJSON_GetObjectItemCaseSensitive(amf_infoJSON, "backupInfoAmfFailure");
OpenAPI_list_t *backup_info_amf_failureList;
- if (backup_info_amf_failure) {
- cJSON *backup_info_amf_failure_local_nonprimitive;
- if (!cJSON_IsArray(backup_info_amf_failure)) {
+ if (backup_info_amf_failure) {
+ cJSON *backup_info_amf_failure_local_nonprimitive;
+ if (!cJSON_IsArray(backup_info_amf_failure)){
+ ogs_error("OpenAPI_amf_info_parseFromJSON() failed [backup_info_amf_failure]");
+ goto end;
+ }
+
+ backup_info_amf_failureList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(backup_info_amf_failure_local_nonprimitive, backup_info_amf_failure ) {
+ if (!cJSON_IsObject(backup_info_amf_failure_local_nonprimitive)) {
ogs_error("OpenAPI_amf_info_parseFromJSON() failed [backup_info_amf_failure]");
goto end;
}
+ OpenAPI_guami_t *backup_info_amf_failureItem = OpenAPI_guami_parseFromJSON(backup_info_amf_failure_local_nonprimitive);
- backup_info_amf_failureList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(backup_info_amf_failure_local_nonprimitive, backup_info_amf_failure ) {
- if (!cJSON_IsObject(backup_info_amf_failure_local_nonprimitive)) {
- ogs_error("OpenAPI_amf_info_parseFromJSON() failed [backup_info_amf_failure]");
- goto end;
- }
- OpenAPI_guami_t *backup_info_amf_failureItem = OpenAPI_guami_parseFromJSON(backup_info_amf_failure_local_nonprimitive);
-
- OpenAPI_list_add(backup_info_amf_failureList, backup_info_amf_failureItem);
- }
+ OpenAPI_list_add(backup_info_amf_failureList, backup_info_amf_failureItem);
+ }
}
cJSON *backup_info_amf_removal = cJSON_GetObjectItemCaseSensitive(amf_infoJSON, "backupInfoAmfRemoval");
OpenAPI_list_t *backup_info_amf_removalList;
- if (backup_info_amf_removal) {
- cJSON *backup_info_amf_removal_local_nonprimitive;
- if (!cJSON_IsArray(backup_info_amf_removal)) {
+ if (backup_info_amf_removal) {
+ cJSON *backup_info_amf_removal_local_nonprimitive;
+ if (!cJSON_IsArray(backup_info_amf_removal)){
+ ogs_error("OpenAPI_amf_info_parseFromJSON() failed [backup_info_amf_removal]");
+ goto end;
+ }
+
+ backup_info_amf_removalList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(backup_info_amf_removal_local_nonprimitive, backup_info_amf_removal ) {
+ if (!cJSON_IsObject(backup_info_amf_removal_local_nonprimitive)) {
ogs_error("OpenAPI_amf_info_parseFromJSON() failed [backup_info_amf_removal]");
goto end;
}
+ OpenAPI_guami_t *backup_info_amf_removalItem = OpenAPI_guami_parseFromJSON(backup_info_amf_removal_local_nonprimitive);
- backup_info_amf_removalList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(backup_info_amf_removal_local_nonprimitive, backup_info_amf_removal ) {
- if (!cJSON_IsObject(backup_info_amf_removal_local_nonprimitive)) {
- ogs_error("OpenAPI_amf_info_parseFromJSON() failed [backup_info_amf_removal]");
- goto end;
- }
- OpenAPI_guami_t *backup_info_amf_removalItem = OpenAPI_guami_parseFromJSON(backup_info_amf_removal_local_nonprimitive);
-
- OpenAPI_list_add(backup_info_amf_removalList, backup_info_amf_removalItem);
- }
+ OpenAPI_list_add(backup_info_amf_removalList, backup_info_amf_removalItem);
+ }
}
cJSON *n2_interface_amf_info = cJSON_GetObjectItemCaseSensitive(amf_infoJSON, "n2InterfaceAmfInfo");
OpenAPI_n2_interface_amf_info_t *n2_interface_amf_info_local_nonprim = NULL;
- if (n2_interface_amf_info) {
- n2_interface_amf_info_local_nonprim = OpenAPI_n2_interface_amf_info_parseFromJSON(n2_interface_amf_info);
+ if (n2_interface_amf_info) {
+ n2_interface_amf_info_local_nonprim = OpenAPI_n2_interface_amf_info_parseFromJSON(n2_interface_amf_info);
}
amf_info_local_var = OpenAPI_amf_info_create (
@@ -359,7 +359,7 @@ OpenAPI_amf_info_t *OpenAPI_amf_info_parseFromJSON(cJSON *amf_infoJSON)
backup_info_amf_failure ? backup_info_amf_failureList : NULL,
backup_info_amf_removal ? backup_info_amf_removalList : NULL,
n2_interface_amf_info ? n2_interface_amf_info_local_nonprim : NULL
- );
+ );
return amf_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/amf_info.h b/lib/sbi/openapi/model/amf_info.h
index ce382f3de..aa7800839 100644
--- a/lib/sbi/openapi/model/amf_info.h
+++ b/lib/sbi/openapi/model/amf_info.h
@@ -42,7 +42,7 @@ OpenAPI_amf_info_t *OpenAPI_amf_info_create(
OpenAPI_list_t *backup_info_amf_failure,
OpenAPI_list_t *backup_info_amf_removal,
OpenAPI_n2_interface_amf_info_t *n2_interface_amf_info
- );
+);
void OpenAPI_amf_info_free(OpenAPI_amf_info_t *amf_info);
OpenAPI_amf_info_t *OpenAPI_amf_info_parseFromJSON(cJSON *amf_infoJSON);
cJSON *OpenAPI_amf_info_convertToJSON(OpenAPI_amf_info_t *amf_info);
diff --git a/lib/sbi/openapi/model/amf_non3_gpp_access_registration.c b/lib/sbi/openapi/model/amf_non3_gpp_access_registration.c
index a4e11a859..bfcf016f3 100644
--- a/lib/sbi/openapi/model/amf_non3_gpp_access_registration.c
+++ b/lib/sbi/openapi/model/amf_non3_gpp_access_registration.c
@@ -21,8 +21,10 @@ OpenAPI_amf_non3_gpp_access_registration_t *OpenAPI_amf_non3_gpp_access_registra
char *amf_ee_subscription_id,
char *registration_time,
OpenAPI_vgmlc_address_t *vgmlc_address,
- OpenAPI_context_info_t *context_info
- )
+ OpenAPI_context_info_t *context_info,
+ int no_ee_subscription_ind,
+ char *supi
+)
{
OpenAPI_amf_non3_gpp_access_registration_t *amf_non3_gpp_access_registration_local_var = OpenAPI_malloc(sizeof(OpenAPI_amf_non3_gpp_access_registration_t));
if (!amf_non3_gpp_access_registration_local_var) {
@@ -45,6 +47,8 @@ OpenAPI_amf_non3_gpp_access_registration_t *OpenAPI_amf_non3_gpp_access_registra
amf_non3_gpp_access_registration_local_var->registration_time = registration_time;
amf_non3_gpp_access_registration_local_var->vgmlc_address = vgmlc_address;
amf_non3_gpp_access_registration_local_var->context_info = context_info;
+ amf_non3_gpp_access_registration_local_var->no_ee_subscription_ind = no_ee_subscription_ind;
+ amf_non3_gpp_access_registration_local_var->supi = supi;
return amf_non3_gpp_access_registration_local_var;
}
@@ -71,6 +75,7 @@ void OpenAPI_amf_non3_gpp_access_registration_free(OpenAPI_amf_non3_gpp_access_r
ogs_free(amf_non3_gpp_access_registration->registration_time);
OpenAPI_vgmlc_address_free(amf_non3_gpp_access_registration->vgmlc_address);
OpenAPI_context_info_free(amf_non3_gpp_access_registration->context_info);
+ ogs_free(amf_non3_gpp_access_registration->supi);
ogs_free(amf_non3_gpp_access_registration);
}
@@ -90,24 +95,24 @@ cJSON *OpenAPI_amf_non3_gpp_access_registration_convertToJSON(OpenAPI_amf_non3_g
}
if (amf_non3_gpp_access_registration->supported_features) {
- if (cJSON_AddStringToObject(item, "supportedFeatures", amf_non3_gpp_access_registration->supported_features) == NULL) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [supported_features]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "supportedFeatures", amf_non3_gpp_access_registration->supported_features) == NULL) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [supported_features]");
+ goto end;
+ }
}
if (amf_non3_gpp_access_registration->purge_flag) {
- if (cJSON_AddBoolToObject(item, "purgeFlag", amf_non3_gpp_access_registration->purge_flag) == NULL) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [purge_flag]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "purgeFlag", amf_non3_gpp_access_registration->purge_flag) == NULL) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [purge_flag]");
+ goto end;
+ }
}
if (amf_non3_gpp_access_registration->pei) {
- if (cJSON_AddStringToObject(item, "pei", amf_non3_gpp_access_registration->pei) == NULL) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [pei]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "pei", amf_non3_gpp_access_registration->pei) == NULL) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [pei]");
+ goto end;
+ }
}
if (cJSON_AddStringToObject(item, "imsVoPs", OpenAPI_ims_vo_ps_ToString(amf_non3_gpp_access_registration->ims_vo_ps)) == NULL) {
@@ -121,24 +126,24 @@ cJSON *OpenAPI_amf_non3_gpp_access_registration_convertToJSON(OpenAPI_amf_non3_g
}
if (amf_non3_gpp_access_registration->amf_service_name_dereg) {
- if (cJSON_AddStringToObject(item, "amfServiceNameDereg", amf_non3_gpp_access_registration->amf_service_name_dereg) == NULL) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [amf_service_name_dereg]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "amfServiceNameDereg", amf_non3_gpp_access_registration->amf_service_name_dereg) == NULL) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [amf_service_name_dereg]");
+ goto end;
+ }
}
if (amf_non3_gpp_access_registration->pcscf_restoration_callback_uri) {
- if (cJSON_AddStringToObject(item, "pcscfRestorationCallbackUri", amf_non3_gpp_access_registration->pcscf_restoration_callback_uri) == NULL) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [pcscf_restoration_callback_uri]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "pcscfRestorationCallbackUri", amf_non3_gpp_access_registration->pcscf_restoration_callback_uri) == NULL) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [pcscf_restoration_callback_uri]");
+ goto end;
+ }
}
if (amf_non3_gpp_access_registration->amf_service_name_pcscf_rest) {
- if (cJSON_AddStringToObject(item, "amfServiceNamePcscfRest", amf_non3_gpp_access_registration->amf_service_name_pcscf_rest) == NULL) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [amf_service_name_pcscf_rest]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "amfServiceNamePcscfRest", amf_non3_gpp_access_registration->amf_service_name_pcscf_rest) == NULL) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [amf_service_name_pcscf_rest]");
+ goto end;
+ }
}
cJSON *guami_local_JSON = OpenAPI_guami_convertToJSON(amf_non3_gpp_access_registration->guami);
@@ -153,24 +158,24 @@ cJSON *OpenAPI_amf_non3_gpp_access_registration_convertToJSON(OpenAPI_amf_non3_g
}
if (amf_non3_gpp_access_registration->backup_amf_info) {
- cJSON *backup_amf_infoList = cJSON_AddArrayToObject(item, "backupAmfInfo");
- if (backup_amf_infoList == NULL) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [backup_amf_info]");
- goto end;
- }
+ cJSON *backup_amf_infoList = cJSON_AddArrayToObject(item, "backupAmfInfo");
+ if (backup_amf_infoList == NULL) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [backup_amf_info]");
+ goto end;
+ }
- OpenAPI_lnode_t *backup_amf_info_node;
- if (amf_non3_gpp_access_registration->backup_amf_info) {
- OpenAPI_list_for_each(amf_non3_gpp_access_registration->backup_amf_info, backup_amf_info_node) {
- cJSON *itemLocal = OpenAPI_backup_amf_info_convertToJSON(backup_amf_info_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [backup_amf_info]");
- goto end;
- }
- cJSON_AddItemToArray(backup_amf_infoList, itemLocal);
+ OpenAPI_lnode_t *backup_amf_info_node;
+ if (amf_non3_gpp_access_registration->backup_amf_info) {
+ OpenAPI_list_for_each(amf_non3_gpp_access_registration->backup_amf_info, backup_amf_info_node) {
+ cJSON *itemLocal = OpenAPI_backup_amf_info_convertToJSON(backup_amf_info_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [backup_amf_info]");
+ goto end;
}
+ cJSON_AddItemToArray(backup_amf_infoList, itemLocal);
}
}
+ }
if (cJSON_AddStringToObject(item, "ratType", OpenAPI_rat_type_ToString(amf_non3_gpp_access_registration->rat_type)) == NULL) {
ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [rat_type]");
@@ -178,50 +183,64 @@ cJSON *OpenAPI_amf_non3_gpp_access_registration_convertToJSON(OpenAPI_amf_non3_g
}
if (amf_non3_gpp_access_registration->urrp_indicator) {
- if (cJSON_AddBoolToObject(item, "urrpIndicator", amf_non3_gpp_access_registration->urrp_indicator) == NULL) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [urrp_indicator]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "urrpIndicator", amf_non3_gpp_access_registration->urrp_indicator) == NULL) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [urrp_indicator]");
+ goto end;
+ }
}
if (amf_non3_gpp_access_registration->amf_ee_subscription_id) {
- if (cJSON_AddStringToObject(item, "amfEeSubscriptionId", amf_non3_gpp_access_registration->amf_ee_subscription_id) == NULL) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [amf_ee_subscription_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "amfEeSubscriptionId", amf_non3_gpp_access_registration->amf_ee_subscription_id) == NULL) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [amf_ee_subscription_id]");
+ goto end;
+ }
}
if (amf_non3_gpp_access_registration->registration_time) {
- if (cJSON_AddStringToObject(item, "registrationTime", amf_non3_gpp_access_registration->registration_time) == NULL) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [registration_time]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "registrationTime", amf_non3_gpp_access_registration->registration_time) == NULL) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [registration_time]");
+ goto end;
+ }
}
if (amf_non3_gpp_access_registration->vgmlc_address) {
- cJSON *vgmlc_address_local_JSON = OpenAPI_vgmlc_address_convertToJSON(amf_non3_gpp_access_registration->vgmlc_address);
- if (vgmlc_address_local_JSON == NULL) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [vgmlc_address]");
- goto end;
- }
- cJSON_AddItemToObject(item, "vgmlcAddress", vgmlc_address_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [vgmlc_address]");
- goto end;
- }
+ cJSON *vgmlc_address_local_JSON = OpenAPI_vgmlc_address_convertToJSON(amf_non3_gpp_access_registration->vgmlc_address);
+ if (vgmlc_address_local_JSON == NULL) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [vgmlc_address]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "vgmlcAddress", vgmlc_address_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [vgmlc_address]");
+ goto end;
+ }
}
if (amf_non3_gpp_access_registration->context_info) {
- cJSON *context_info_local_JSON = OpenAPI_context_info_convertToJSON(amf_non3_gpp_access_registration->context_info);
- if (context_info_local_JSON == NULL) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [context_info]");
- goto end;
- }
- cJSON_AddItemToObject(item, "contextInfo", context_info_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [context_info]");
- goto end;
- }
+ cJSON *context_info_local_JSON = OpenAPI_context_info_convertToJSON(amf_non3_gpp_access_registration->context_info);
+ if (context_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [context_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "contextInfo", context_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [context_info]");
+ goto end;
+ }
+ }
+
+ if (amf_non3_gpp_access_registration->no_ee_subscription_ind) {
+ if (cJSON_AddBoolToObject(item, "noEeSubscriptionInd", amf_non3_gpp_access_registration->no_ee_subscription_ind) == NULL) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [no_ee_subscription_ind]");
+ goto end;
+ }
+ }
+
+ if (amf_non3_gpp_access_registration->supi) {
+ if (cJSON_AddStringToObject(item, "supi", amf_non3_gpp_access_registration->supi) == NULL) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [supi]");
+ goto end;
+ }
}
end:
@@ -237,7 +256,7 @@ OpenAPI_amf_non3_gpp_access_registration_t *OpenAPI_amf_non3_gpp_access_registra
goto end;
}
-
+
if (!cJSON_IsString(amf_instance_id)) {
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [amf_instance_id]");
goto end;
@@ -245,29 +264,29 @@ OpenAPI_amf_non3_gpp_access_registration_t *OpenAPI_amf_non3_gpp_access_registra
cJSON *supported_features = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "supportedFeatures");
- if (supported_features) {
- if (!cJSON_IsString(supported_features)) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [supported_features]");
- goto end;
- }
+ if (supported_features) {
+ if (!cJSON_IsString(supported_features)) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [supported_features]");
+ goto end;
+ }
}
cJSON *purge_flag = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "purgeFlag");
- if (purge_flag) {
- if (!cJSON_IsBool(purge_flag)) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [purge_flag]");
- goto end;
- }
+ if (purge_flag) {
+ if (!cJSON_IsBool(purge_flag)) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [purge_flag]");
+ goto end;
+ }
}
cJSON *pei = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "pei");
- if (pei) {
- if (!cJSON_IsString(pei)) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [pei]");
- goto end;
- }
+ if (pei) {
+ if (!cJSON_IsString(pei)) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [pei]");
+ goto end;
+ }
}
cJSON *ims_vo_ps = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "imsVoPs");
@@ -277,7 +296,7 @@ OpenAPI_amf_non3_gpp_access_registration_t *OpenAPI_amf_non3_gpp_access_registra
}
OpenAPI_ims_vo_ps_e ims_vo_psVariable;
-
+
if (!cJSON_IsString(ims_vo_ps)) {
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [ims_vo_ps]");
goto end;
@@ -290,7 +309,7 @@ OpenAPI_amf_non3_gpp_access_registration_t *OpenAPI_amf_non3_gpp_access_registra
goto end;
}
-
+
if (!cJSON_IsString(dereg_callback_uri)) {
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [dereg_callback_uri]");
goto end;
@@ -298,29 +317,29 @@ OpenAPI_amf_non3_gpp_access_registration_t *OpenAPI_amf_non3_gpp_access_registra
cJSON *amf_service_name_dereg = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "amfServiceNameDereg");
- if (amf_service_name_dereg) {
- if (!cJSON_IsString(amf_service_name_dereg)) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [amf_service_name_dereg]");
- goto end;
- }
+ if (amf_service_name_dereg) {
+ if (!cJSON_IsString(amf_service_name_dereg)) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [amf_service_name_dereg]");
+ goto end;
+ }
}
cJSON *pcscf_restoration_callback_uri = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "pcscfRestorationCallbackUri");
- if (pcscf_restoration_callback_uri) {
- if (!cJSON_IsString(pcscf_restoration_callback_uri)) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [pcscf_restoration_callback_uri]");
- goto end;
- }
+ if (pcscf_restoration_callback_uri) {
+ if (!cJSON_IsString(pcscf_restoration_callback_uri)) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [pcscf_restoration_callback_uri]");
+ goto end;
+ }
}
cJSON *amf_service_name_pcscf_rest = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "amfServiceNamePcscfRest");
- if (amf_service_name_pcscf_rest) {
- if (!cJSON_IsString(amf_service_name_pcscf_rest)) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [amf_service_name_pcscf_rest]");
- goto end;
- }
+ if (amf_service_name_pcscf_rest) {
+ if (!cJSON_IsString(amf_service_name_pcscf_rest)) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [amf_service_name_pcscf_rest]");
+ goto end;
+ }
}
cJSON *guami = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "guami");
@@ -330,30 +349,30 @@ OpenAPI_amf_non3_gpp_access_registration_t *OpenAPI_amf_non3_gpp_access_registra
}
OpenAPI_guami_t *guami_local_nonprim = NULL;
-
+
guami_local_nonprim = OpenAPI_guami_parseFromJSON(guami);
cJSON *backup_amf_info = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "backupAmfInfo");
OpenAPI_list_t *backup_amf_infoList;
- if (backup_amf_info) {
- cJSON *backup_amf_info_local_nonprimitive;
- if (!cJSON_IsArray(backup_amf_info)) {
+ if (backup_amf_info) {
+ cJSON *backup_amf_info_local_nonprimitive;
+ if (!cJSON_IsArray(backup_amf_info)){
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [backup_amf_info]");
+ goto end;
+ }
+
+ backup_amf_infoList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(backup_amf_info_local_nonprimitive, backup_amf_info ) {
+ if (!cJSON_IsObject(backup_amf_info_local_nonprimitive)) {
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [backup_amf_info]");
goto end;
}
+ OpenAPI_backup_amf_info_t *backup_amf_infoItem = OpenAPI_backup_amf_info_parseFromJSON(backup_amf_info_local_nonprimitive);
- backup_amf_infoList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(backup_amf_info_local_nonprimitive, backup_amf_info ) {
- if (!cJSON_IsObject(backup_amf_info_local_nonprimitive)) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [backup_amf_info]");
- goto end;
- }
- OpenAPI_backup_amf_info_t *backup_amf_infoItem = OpenAPI_backup_amf_info_parseFromJSON(backup_amf_info_local_nonprimitive);
-
- OpenAPI_list_add(backup_amf_infoList, backup_amf_infoItem);
- }
+ OpenAPI_list_add(backup_amf_infoList, backup_amf_infoItem);
+ }
}
cJSON *rat_type = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "ratType");
@@ -363,7 +382,7 @@ OpenAPI_amf_non3_gpp_access_registration_t *OpenAPI_amf_non3_gpp_access_registra
}
OpenAPI_rat_type_e rat_typeVariable;
-
+
if (!cJSON_IsString(rat_type)) {
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [rat_type]");
goto end;
@@ -372,43 +391,61 @@ OpenAPI_amf_non3_gpp_access_registration_t *OpenAPI_amf_non3_gpp_access_registra
cJSON *urrp_indicator = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "urrpIndicator");
- if (urrp_indicator) {
- if (!cJSON_IsBool(urrp_indicator)) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [urrp_indicator]");
- goto end;
- }
+ if (urrp_indicator) {
+ if (!cJSON_IsBool(urrp_indicator)) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [urrp_indicator]");
+ goto end;
+ }
}
cJSON *amf_ee_subscription_id = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "amfEeSubscriptionId");
- if (amf_ee_subscription_id) {
- if (!cJSON_IsString(amf_ee_subscription_id)) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [amf_ee_subscription_id]");
- goto end;
- }
+ if (amf_ee_subscription_id) {
+ if (!cJSON_IsString(amf_ee_subscription_id)) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [amf_ee_subscription_id]");
+ goto end;
+ }
}
cJSON *registration_time = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "registrationTime");
- if (registration_time) {
- if (!cJSON_IsString(registration_time)) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [registration_time]");
- goto end;
- }
+ if (registration_time) {
+ if (!cJSON_IsString(registration_time)) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [registration_time]");
+ goto end;
+ }
}
cJSON *vgmlc_address = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "vgmlcAddress");
OpenAPI_vgmlc_address_t *vgmlc_address_local_nonprim = NULL;
- if (vgmlc_address) {
- vgmlc_address_local_nonprim = OpenAPI_vgmlc_address_parseFromJSON(vgmlc_address);
+ if (vgmlc_address) {
+ vgmlc_address_local_nonprim = OpenAPI_vgmlc_address_parseFromJSON(vgmlc_address);
}
cJSON *context_info = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "contextInfo");
OpenAPI_context_info_t *context_info_local_nonprim = NULL;
- if (context_info) {
- context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info);
+ if (context_info) {
+ context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info);
+ }
+
+ cJSON *no_ee_subscription_ind = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "noEeSubscriptionInd");
+
+ if (no_ee_subscription_ind) {
+ if (!cJSON_IsBool(no_ee_subscription_ind)) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [no_ee_subscription_ind]");
+ goto end;
+ }
+ }
+
+ cJSON *supi = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "supi");
+
+ if (supi) {
+ if (!cJSON_IsString(supi)) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [supi]");
+ goto end;
+ }
}
amf_non3_gpp_access_registration_local_var = OpenAPI_amf_non3_gpp_access_registration_create (
@@ -428,8 +465,10 @@ OpenAPI_amf_non3_gpp_access_registration_t *OpenAPI_amf_non3_gpp_access_registra
amf_ee_subscription_id ? ogs_strdup_or_assert(amf_ee_subscription_id->valuestring) : NULL,
registration_time ? ogs_strdup_or_assert(registration_time->valuestring) : NULL,
vgmlc_address ? vgmlc_address_local_nonprim : NULL,
- context_info ? context_info_local_nonprim : NULL
- );
+ context_info ? context_info_local_nonprim : NULL,
+ no_ee_subscription_ind ? no_ee_subscription_ind->valueint : 0,
+ supi ? ogs_strdup_or_assert(supi->valuestring) : NULL
+ );
return amf_non3_gpp_access_registration_local_var;
end:
diff --git a/lib/sbi/openapi/model/amf_non3_gpp_access_registration.h b/lib/sbi/openapi/model/amf_non3_gpp_access_registration.h
index 805a3afd1..f16f85a84 100644
--- a/lib/sbi/openapi/model/amf_non3_gpp_access_registration.h
+++ b/lib/sbi/openapi/model/amf_non3_gpp_access_registration.h
@@ -1,7 +1,7 @@
/*
* amf_non3_gpp_access_registration.h
*
- *
+ *
*/
#ifndef _OpenAPI_amf_non3_gpp_access_registration_H_
@@ -42,6 +42,8 @@ typedef struct OpenAPI_amf_non3_gpp_access_registration_s {
char *registration_time;
struct OpenAPI_vgmlc_address_s *vgmlc_address;
struct OpenAPI_context_info_s *context_info;
+ int no_ee_subscription_ind;
+ char *supi;
} OpenAPI_amf_non3_gpp_access_registration_t;
OpenAPI_amf_non3_gpp_access_registration_t *OpenAPI_amf_non3_gpp_access_registration_create(
@@ -61,8 +63,10 @@ OpenAPI_amf_non3_gpp_access_registration_t *OpenAPI_amf_non3_gpp_access_registra
char *amf_ee_subscription_id,
char *registration_time,
OpenAPI_vgmlc_address_t *vgmlc_address,
- OpenAPI_context_info_t *context_info
- );
+ OpenAPI_context_info_t *context_info,
+ int no_ee_subscription_ind,
+ char *supi
+);
void OpenAPI_amf_non3_gpp_access_registration_free(OpenAPI_amf_non3_gpp_access_registration_t *amf_non3_gpp_access_registration);
OpenAPI_amf_non3_gpp_access_registration_t *OpenAPI_amf_non3_gpp_access_registration_parseFromJSON(cJSON *amf_non3_gpp_access_registrationJSON);
cJSON *OpenAPI_amf_non3_gpp_access_registration_convertToJSON(OpenAPI_amf_non3_gpp_access_registration_t *amf_non3_gpp_access_registration);
diff --git a/lib/sbi/openapi/model/amf_non3_gpp_access_registration_modification.c b/lib/sbi/openapi/model/amf_non3_gpp_access_registration_modification.c
index 3d4428f70..d9190887a 100644
--- a/lib/sbi/openapi/model/amf_non3_gpp_access_registration_modification.c
+++ b/lib/sbi/openapi/model/amf_non3_gpp_access_registration_modification.c
@@ -10,7 +10,7 @@ OpenAPI_amf_non3_gpp_access_registration_modification_t *OpenAPI_amf_non3_gpp_ac
char *pei,
OpenAPI_ims_vo_ps_e ims_vo_ps,
OpenAPI_list_t *backup_amf_info
- )
+)
{
OpenAPI_amf_non3_gpp_access_registration_modification_t *amf_non3_gpp_access_registration_modification_local_var = OpenAPI_malloc(sizeof(OpenAPI_amf_non3_gpp_access_registration_modification_t));
if (!amf_non3_gpp_access_registration_modification_local_var) {
@@ -62,45 +62,45 @@ cJSON *OpenAPI_amf_non3_gpp_access_registration_modification_convertToJSON(OpenA
}
if (amf_non3_gpp_access_registration_modification->purge_flag) {
- if (cJSON_AddBoolToObject(item, "purgeFlag", amf_non3_gpp_access_registration_modification->purge_flag) == NULL) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_modification_convertToJSON() failed [purge_flag]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "purgeFlag", amf_non3_gpp_access_registration_modification->purge_flag) == NULL) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_modification_convertToJSON() failed [purge_flag]");
+ goto end;
+ }
}
if (amf_non3_gpp_access_registration_modification->pei) {
- if (cJSON_AddStringToObject(item, "pei", amf_non3_gpp_access_registration_modification->pei) == NULL) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_modification_convertToJSON() failed [pei]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "pei", amf_non3_gpp_access_registration_modification->pei) == NULL) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_modification_convertToJSON() failed [pei]");
+ goto end;
+ }
}
if (amf_non3_gpp_access_registration_modification->ims_vo_ps) {
- if (cJSON_AddStringToObject(item, "imsVoPs", OpenAPI_ims_vo_ps_ToString(amf_non3_gpp_access_registration_modification->ims_vo_ps)) == NULL) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_modification_convertToJSON() failed [ims_vo_ps]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "imsVoPs", OpenAPI_ims_vo_ps_ToString(amf_non3_gpp_access_registration_modification->ims_vo_ps)) == NULL) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_modification_convertToJSON() failed [ims_vo_ps]");
+ goto end;
+ }
}
if (amf_non3_gpp_access_registration_modification->backup_amf_info) {
- cJSON *backup_amf_infoList = cJSON_AddArrayToObject(item, "backupAmfInfo");
- if (backup_amf_infoList == NULL) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_modification_convertToJSON() failed [backup_amf_info]");
- goto end;
- }
+ cJSON *backup_amf_infoList = cJSON_AddArrayToObject(item, "backupAmfInfo");
+ if (backup_amf_infoList == NULL) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_modification_convertToJSON() failed [backup_amf_info]");
+ goto end;
+ }
- OpenAPI_lnode_t *backup_amf_info_node;
- if (amf_non3_gpp_access_registration_modification->backup_amf_info) {
- OpenAPI_list_for_each(amf_non3_gpp_access_registration_modification->backup_amf_info, backup_amf_info_node) {
- cJSON *itemLocal = OpenAPI_backup_amf_info_convertToJSON(backup_amf_info_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_modification_convertToJSON() failed [backup_amf_info]");
- goto end;
- }
- cJSON_AddItemToArray(backup_amf_infoList, itemLocal);
+ OpenAPI_lnode_t *backup_amf_info_node;
+ if (amf_non3_gpp_access_registration_modification->backup_amf_info) {
+ OpenAPI_list_for_each(amf_non3_gpp_access_registration_modification->backup_amf_info, backup_amf_info_node) {
+ cJSON *itemLocal = OpenAPI_backup_amf_info_convertToJSON(backup_amf_info_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_modification_convertToJSON() failed [backup_amf_info]");
+ goto end;
}
+ cJSON_AddItemToArray(backup_amf_infoList, itemLocal);
}
}
+ }
end:
return item;
@@ -116,59 +116,59 @@ OpenAPI_amf_non3_gpp_access_registration_modification_t *OpenAPI_amf_non3_gpp_ac
}
OpenAPI_guami_t *guami_local_nonprim = NULL;
-
+
guami_local_nonprim = OpenAPI_guami_parseFromJSON(guami);
cJSON *purge_flag = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registration_modificationJSON, "purgeFlag");
- if (purge_flag) {
- if (!cJSON_IsBool(purge_flag)) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_modification_parseFromJSON() failed [purge_flag]");
- goto end;
- }
+ if (purge_flag) {
+ if (!cJSON_IsBool(purge_flag)) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_modification_parseFromJSON() failed [purge_flag]");
+ goto end;
+ }
}
cJSON *pei = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registration_modificationJSON, "pei");
- if (pei) {
- if (!cJSON_IsString(pei)) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_modification_parseFromJSON() failed [pei]");
- goto end;
- }
+ if (pei) {
+ if (!cJSON_IsString(pei)) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_modification_parseFromJSON() failed [pei]");
+ goto end;
+ }
}
cJSON *ims_vo_ps = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registration_modificationJSON, "imsVoPs");
OpenAPI_ims_vo_ps_e ims_vo_psVariable;
- if (ims_vo_ps) {
- if (!cJSON_IsString(ims_vo_ps)) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_modification_parseFromJSON() failed [ims_vo_ps]");
- goto end;
- }
- ims_vo_psVariable = OpenAPI_ims_vo_ps_FromString(ims_vo_ps->valuestring);
+ if (ims_vo_ps) {
+ if (!cJSON_IsString(ims_vo_ps)) {
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_modification_parseFromJSON() failed [ims_vo_ps]");
+ goto end;
+ }
+ ims_vo_psVariable = OpenAPI_ims_vo_ps_FromString(ims_vo_ps->valuestring);
}
cJSON *backup_amf_info = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registration_modificationJSON, "backupAmfInfo");
OpenAPI_list_t *backup_amf_infoList;
- if (backup_amf_info) {
- cJSON *backup_amf_info_local_nonprimitive;
- if (!cJSON_IsArray(backup_amf_info)) {
+ if (backup_amf_info) {
+ cJSON *backup_amf_info_local_nonprimitive;
+ if (!cJSON_IsArray(backup_amf_info)){
+ ogs_error("OpenAPI_amf_non3_gpp_access_registration_modification_parseFromJSON() failed [backup_amf_info]");
+ goto end;
+ }
+
+ backup_amf_infoList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(backup_amf_info_local_nonprimitive, backup_amf_info ) {
+ if (!cJSON_IsObject(backup_amf_info_local_nonprimitive)) {
ogs_error("OpenAPI_amf_non3_gpp_access_registration_modification_parseFromJSON() failed [backup_amf_info]");
goto end;
}
+ OpenAPI_backup_amf_info_t *backup_amf_infoItem = OpenAPI_backup_amf_info_parseFromJSON(backup_amf_info_local_nonprimitive);
- backup_amf_infoList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(backup_amf_info_local_nonprimitive, backup_amf_info ) {
- if (!cJSON_IsObject(backup_amf_info_local_nonprimitive)) {
- ogs_error("OpenAPI_amf_non3_gpp_access_registration_modification_parseFromJSON() failed [backup_amf_info]");
- goto end;
- }
- OpenAPI_backup_amf_info_t *backup_amf_infoItem = OpenAPI_backup_amf_info_parseFromJSON(backup_amf_info_local_nonprimitive);
-
- OpenAPI_list_add(backup_amf_infoList, backup_amf_infoItem);
- }
+ OpenAPI_list_add(backup_amf_infoList, backup_amf_infoItem);
+ }
}
amf_non3_gpp_access_registration_modification_local_var = OpenAPI_amf_non3_gpp_access_registration_modification_create (
@@ -177,7 +177,7 @@ OpenAPI_amf_non3_gpp_access_registration_modification_t *OpenAPI_amf_non3_gpp_ac
pei ? ogs_strdup_or_assert(pei->valuestring) : NULL,
ims_vo_ps ? ims_vo_psVariable : 0,
backup_amf_info ? backup_amf_infoList : NULL
- );
+ );
return amf_non3_gpp_access_registration_modification_local_var;
end:
diff --git a/lib/sbi/openapi/model/amf_non3_gpp_access_registration_modification.h b/lib/sbi/openapi/model/amf_non3_gpp_access_registration_modification.h
index 8c2a27523..2897c058b 100644
--- a/lib/sbi/openapi/model/amf_non3_gpp_access_registration_modification.h
+++ b/lib/sbi/openapi/model/amf_non3_gpp_access_registration_modification.h
@@ -1,7 +1,7 @@
/*
* amf_non3_gpp_access_registration_modification.h
*
- *
+ *
*/
#ifndef _OpenAPI_amf_non3_gpp_access_registration_modification_H_
@@ -35,7 +35,7 @@ OpenAPI_amf_non3_gpp_access_registration_modification_t *OpenAPI_amf_non3_gpp_ac
char *pei,
OpenAPI_ims_vo_ps_e ims_vo_ps,
OpenAPI_list_t *backup_amf_info
- );
+);
void OpenAPI_amf_non3_gpp_access_registration_modification_free(OpenAPI_amf_non3_gpp_access_registration_modification_t *amf_non3_gpp_access_registration_modification);
OpenAPI_amf_non3_gpp_access_registration_modification_t *OpenAPI_amf_non3_gpp_access_registration_modification_parseFromJSON(cJSON *amf_non3_gpp_access_registration_modificationJSON);
cJSON *OpenAPI_amf_non3_gpp_access_registration_modification_convertToJSON(OpenAPI_amf_non3_gpp_access_registration_modification_t *amf_non3_gpp_access_registration_modification);
diff --git a/lib/sbi/openapi/model/amf_status_change_notification.c b/lib/sbi/openapi/model/amf_status_change_notification.c
index 806348b2b..2ebc32c89 100644
--- a/lib/sbi/openapi/model/amf_status_change_notification.c
+++ b/lib/sbi/openapi/model/amf_status_change_notification.c
@@ -6,7 +6,7 @@
OpenAPI_amf_status_change_notification_t *OpenAPI_amf_status_change_notification_create(
OpenAPI_list_t *amf_status_info_list
- )
+)
{
OpenAPI_amf_status_change_notification_t *amf_status_change_notification_local_var = OpenAPI_malloc(sizeof(OpenAPI_amf_status_change_notification_t));
if (!amf_status_change_notification_local_var) {
@@ -72,9 +72,9 @@ OpenAPI_amf_status_change_notification_t *OpenAPI_amf_status_change_notification
}
OpenAPI_list_t *amf_status_info_listList;
-
+
cJSON *amf_status_info_list_local_nonprimitive;
- if (!cJSON_IsArray(amf_status_info_list)) {
+ if (!cJSON_IsArray(amf_status_info_list)){
ogs_error("OpenAPI_amf_status_change_notification_parseFromJSON() failed [amf_status_info_list]");
goto end;
}
@@ -93,7 +93,7 @@ OpenAPI_amf_status_change_notification_t *OpenAPI_amf_status_change_notification
amf_status_change_notification_local_var = OpenAPI_amf_status_change_notification_create (
amf_status_info_listList
- );
+ );
return amf_status_change_notification_local_var;
end:
diff --git a/lib/sbi/openapi/model/amf_status_change_notification.h b/lib/sbi/openapi/model/amf_status_change_notification.h
index 2877b1fa8..bf08e3650 100644
--- a/lib/sbi/openapi/model/amf_status_change_notification.h
+++ b/lib/sbi/openapi/model/amf_status_change_notification.h
@@ -1,7 +1,7 @@
/*
* amf_status_change_notification.h
*
- *
+ *
*/
#ifndef _OpenAPI_amf_status_change_notification_H_
@@ -25,7 +25,7 @@ typedef struct OpenAPI_amf_status_change_notification_s {
OpenAPI_amf_status_change_notification_t *OpenAPI_amf_status_change_notification_create(
OpenAPI_list_t *amf_status_info_list
- );
+);
void OpenAPI_amf_status_change_notification_free(OpenAPI_amf_status_change_notification_t *amf_status_change_notification);
OpenAPI_amf_status_change_notification_t *OpenAPI_amf_status_change_notification_parseFromJSON(cJSON *amf_status_change_notificationJSON);
cJSON *OpenAPI_amf_status_change_notification_convertToJSON(OpenAPI_amf_status_change_notification_t *amf_status_change_notification);
diff --git a/lib/sbi/openapi/model/amf_status_change_subscription_data.c b/lib/sbi/openapi/model/amf_status_change_subscription_data.c
index 67cf1cac6..0d8c5f0b4 100644
--- a/lib/sbi/openapi/model/amf_status_change_subscription_data.c
+++ b/lib/sbi/openapi/model/amf_status_change_subscription_data.c
@@ -7,7 +7,7 @@
OpenAPI_amf_status_change_subscription_data_t *OpenAPI_amf_status_change_subscription_data_create(
char *amf_status_uri,
OpenAPI_list_t *guami_list
- )
+)
{
OpenAPI_amf_status_change_subscription_data_t *amf_status_change_subscription_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_amf_status_change_subscription_data_t));
if (!amf_status_change_subscription_data_local_var) {
@@ -49,24 +49,24 @@ cJSON *OpenAPI_amf_status_change_subscription_data_convertToJSON(OpenAPI_amf_sta
}
if (amf_status_change_subscription_data->guami_list) {
- cJSON *guami_listList = cJSON_AddArrayToObject(item, "guamiList");
- if (guami_listList == NULL) {
- ogs_error("OpenAPI_amf_status_change_subscription_data_convertToJSON() failed [guami_list]");
- goto end;
- }
+ cJSON *guami_listList = cJSON_AddArrayToObject(item, "guamiList");
+ if (guami_listList == NULL) {
+ ogs_error("OpenAPI_amf_status_change_subscription_data_convertToJSON() failed [guami_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *guami_list_node;
- if (amf_status_change_subscription_data->guami_list) {
- OpenAPI_list_for_each(amf_status_change_subscription_data->guami_list, guami_list_node) {
- cJSON *itemLocal = OpenAPI_guami_convertToJSON(guami_list_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_amf_status_change_subscription_data_convertToJSON() failed [guami_list]");
- goto end;
- }
- cJSON_AddItemToArray(guami_listList, itemLocal);
+ OpenAPI_lnode_t *guami_list_node;
+ if (amf_status_change_subscription_data->guami_list) {
+ OpenAPI_list_for_each(amf_status_change_subscription_data->guami_list, guami_list_node) {
+ cJSON *itemLocal = OpenAPI_guami_convertToJSON(guami_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_amf_status_change_subscription_data_convertToJSON() failed [guami_list]");
+ goto end;
}
+ cJSON_AddItemToArray(guami_listList, itemLocal);
}
}
+ }
end:
return item;
@@ -81,7 +81,7 @@ OpenAPI_amf_status_change_subscription_data_t *OpenAPI_amf_status_change_subscri
goto end;
}
-
+
if (!cJSON_IsString(amf_status_uri)) {
ogs_error("OpenAPI_amf_status_change_subscription_data_parseFromJSON() failed [amf_status_uri]");
goto end;
@@ -90,30 +90,30 @@ OpenAPI_amf_status_change_subscription_data_t *OpenAPI_amf_status_change_subscri
cJSON *guami_list = cJSON_GetObjectItemCaseSensitive(amf_status_change_subscription_dataJSON, "guamiList");
OpenAPI_list_t *guami_listList;
- if (guami_list) {
- cJSON *guami_list_local_nonprimitive;
- if (!cJSON_IsArray(guami_list)) {
+ if (guami_list) {
+ cJSON *guami_list_local_nonprimitive;
+ if (!cJSON_IsArray(guami_list)){
+ ogs_error("OpenAPI_amf_status_change_subscription_data_parseFromJSON() failed [guami_list]");
+ goto end;
+ }
+
+ guami_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(guami_list_local_nonprimitive, guami_list ) {
+ if (!cJSON_IsObject(guami_list_local_nonprimitive)) {
ogs_error("OpenAPI_amf_status_change_subscription_data_parseFromJSON() failed [guami_list]");
goto end;
}
+ OpenAPI_guami_t *guami_listItem = OpenAPI_guami_parseFromJSON(guami_list_local_nonprimitive);
- guami_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(guami_list_local_nonprimitive, guami_list ) {
- if (!cJSON_IsObject(guami_list_local_nonprimitive)) {
- ogs_error("OpenAPI_amf_status_change_subscription_data_parseFromJSON() failed [guami_list]");
- goto end;
- }
- OpenAPI_guami_t *guami_listItem = OpenAPI_guami_parseFromJSON(guami_list_local_nonprimitive);
-
- OpenAPI_list_add(guami_listList, guami_listItem);
- }
+ OpenAPI_list_add(guami_listList, guami_listItem);
+ }
}
amf_status_change_subscription_data_local_var = OpenAPI_amf_status_change_subscription_data_create (
ogs_strdup_or_assert(amf_status_uri->valuestring),
guami_list ? guami_listList : NULL
- );
+ );
return amf_status_change_subscription_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/amf_status_change_subscription_data.h b/lib/sbi/openapi/model/amf_status_change_subscription_data.h
index 4ebce198d..de9276e01 100644
--- a/lib/sbi/openapi/model/amf_status_change_subscription_data.h
+++ b/lib/sbi/openapi/model/amf_status_change_subscription_data.h
@@ -1,7 +1,7 @@
/*
* amf_status_change_subscription_data.h
*
- *
+ *
*/
#ifndef _OpenAPI_amf_status_change_subscription_data_H_
@@ -27,7 +27,7 @@ typedef struct OpenAPI_amf_status_change_subscription_data_s {
OpenAPI_amf_status_change_subscription_data_t *OpenAPI_amf_status_change_subscription_data_create(
char *amf_status_uri,
OpenAPI_list_t *guami_list
- );
+);
void OpenAPI_amf_status_change_subscription_data_free(OpenAPI_amf_status_change_subscription_data_t *amf_status_change_subscription_data);
OpenAPI_amf_status_change_subscription_data_t *OpenAPI_amf_status_change_subscription_data_parseFromJSON(cJSON *amf_status_change_subscription_dataJSON);
cJSON *OpenAPI_amf_status_change_subscription_data_convertToJSON(OpenAPI_amf_status_change_subscription_data_t *amf_status_change_subscription_data);
diff --git a/lib/sbi/openapi/model/amf_status_info.c b/lib/sbi/openapi/model/amf_status_info.c
index 6ea991c9a..1289945f8 100644
--- a/lib/sbi/openapi/model/amf_status_info.c
+++ b/lib/sbi/openapi/model/amf_status_info.c
@@ -9,7 +9,7 @@ OpenAPI_amf_status_info_t *OpenAPI_amf_status_info_create(
OpenAPI_status_change_e status_change,
char *target_amf_removal,
char *target_amf_failure
- )
+)
{
OpenAPI_amf_status_info_t *amf_status_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_amf_status_info_t));
if (!amf_status_info_local_var) {
@@ -72,17 +72,17 @@ cJSON *OpenAPI_amf_status_info_convertToJSON(OpenAPI_amf_status_info_t *amf_stat
}
if (amf_status_info->target_amf_removal) {
- if (cJSON_AddStringToObject(item, "targetAmfRemoval", amf_status_info->target_amf_removal) == NULL) {
- ogs_error("OpenAPI_amf_status_info_convertToJSON() failed [target_amf_removal]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "targetAmfRemoval", amf_status_info->target_amf_removal) == NULL) {
+ ogs_error("OpenAPI_amf_status_info_convertToJSON() failed [target_amf_removal]");
+ goto end;
+ }
}
if (amf_status_info->target_amf_failure) {
- if (cJSON_AddStringToObject(item, "targetAmfFailure", amf_status_info->target_amf_failure) == NULL) {
- ogs_error("OpenAPI_amf_status_info_convertToJSON() failed [target_amf_failure]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "targetAmfFailure", amf_status_info->target_amf_failure) == NULL) {
+ ogs_error("OpenAPI_amf_status_info_convertToJSON() failed [target_amf_failure]");
+ goto end;
+ }
}
end:
@@ -99,9 +99,9 @@ OpenAPI_amf_status_info_t *OpenAPI_amf_status_info_parseFromJSON(cJSON *amf_stat
}
OpenAPI_list_t *guami_listList;
-
+
cJSON *guami_list_local_nonprimitive;
- if (!cJSON_IsArray(guami_list)) {
+ if (!cJSON_IsArray(guami_list)){
ogs_error("OpenAPI_amf_status_info_parseFromJSON() failed [guami_list]");
goto end;
}
@@ -125,7 +125,7 @@ OpenAPI_amf_status_info_t *OpenAPI_amf_status_info_parseFromJSON(cJSON *amf_stat
}
OpenAPI_status_change_e status_changeVariable;
-
+
if (!cJSON_IsString(status_change)) {
ogs_error("OpenAPI_amf_status_info_parseFromJSON() failed [status_change]");
goto end;
@@ -134,20 +134,20 @@ OpenAPI_amf_status_info_t *OpenAPI_amf_status_info_parseFromJSON(cJSON *amf_stat
cJSON *target_amf_removal = cJSON_GetObjectItemCaseSensitive(amf_status_infoJSON, "targetAmfRemoval");
- if (target_amf_removal) {
- if (!cJSON_IsString(target_amf_removal)) {
- ogs_error("OpenAPI_amf_status_info_parseFromJSON() failed [target_amf_removal]");
- goto end;
- }
+ if (target_amf_removal) {
+ if (!cJSON_IsString(target_amf_removal)) {
+ ogs_error("OpenAPI_amf_status_info_parseFromJSON() failed [target_amf_removal]");
+ goto end;
+ }
}
cJSON *target_amf_failure = cJSON_GetObjectItemCaseSensitive(amf_status_infoJSON, "targetAmfFailure");
- if (target_amf_failure) {
- if (!cJSON_IsString(target_amf_failure)) {
- ogs_error("OpenAPI_amf_status_info_parseFromJSON() failed [target_amf_failure]");
- goto end;
- }
+ if (target_amf_failure) {
+ if (!cJSON_IsString(target_amf_failure)) {
+ ogs_error("OpenAPI_amf_status_info_parseFromJSON() failed [target_amf_failure]");
+ goto end;
+ }
}
amf_status_info_local_var = OpenAPI_amf_status_info_create (
@@ -155,7 +155,7 @@ OpenAPI_amf_status_info_t *OpenAPI_amf_status_info_parseFromJSON(cJSON *amf_stat
status_changeVariable,
target_amf_removal ? ogs_strdup_or_assert(target_amf_removal->valuestring) : NULL,
target_amf_failure ? ogs_strdup_or_assert(target_amf_failure->valuestring) : NULL
- );
+ );
return amf_status_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/amf_status_info.h b/lib/sbi/openapi/model/amf_status_info.h
index fdb6cfeee..ee5957c49 100644
--- a/lib/sbi/openapi/model/amf_status_info.h
+++ b/lib/sbi/openapi/model/amf_status_info.h
@@ -1,7 +1,7 @@
/*
* amf_status_info.h
*
- *
+ *
*/
#ifndef _OpenAPI_amf_status_info_H_
@@ -32,7 +32,7 @@ OpenAPI_amf_status_info_t *OpenAPI_amf_status_info_create(
OpenAPI_status_change_e status_change,
char *target_amf_removal,
char *target_amf_failure
- );
+);
void OpenAPI_amf_status_info_free(OpenAPI_amf_status_info_t *amf_status_info);
OpenAPI_amf_status_info_t *OpenAPI_amf_status_info_parseFromJSON(cJSON *amf_status_infoJSON);
cJSON *OpenAPI_amf_status_info_convertToJSON(OpenAPI_amf_status_info_t *amf_status_info);
diff --git a/lib/sbi/openapi/model/amf_subscription_info.c b/lib/sbi/openapi/model/amf_subscription_info.c
index e5463cac9..a0977799e 100644
--- a/lib/sbi/openapi/model/amf_subscription_info.c
+++ b/lib/sbi/openapi/model/amf_subscription_info.c
@@ -8,7 +8,7 @@ OpenAPI_amf_subscription_info_t *OpenAPI_amf_subscription_info_create(
char *amf_instance_id,
char *subscription_id,
char *subs_change_notify_correlation_id
- )
+)
{
OpenAPI_amf_subscription_info_t *amf_subscription_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_amf_subscription_info_t));
if (!amf_subscription_info_local_var) {
@@ -54,10 +54,10 @@ cJSON *OpenAPI_amf_subscription_info_convertToJSON(OpenAPI_amf_subscription_info
}
if (amf_subscription_info->subs_change_notify_correlation_id) {
- if (cJSON_AddStringToObject(item, "subsChangeNotifyCorrelationId", amf_subscription_info->subs_change_notify_correlation_id) == NULL) {
- ogs_error("OpenAPI_amf_subscription_info_convertToJSON() failed [subs_change_notify_correlation_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "subsChangeNotifyCorrelationId", amf_subscription_info->subs_change_notify_correlation_id) == NULL) {
+ ogs_error("OpenAPI_amf_subscription_info_convertToJSON() failed [subs_change_notify_correlation_id]");
+ goto end;
+ }
}
end:
@@ -73,7 +73,7 @@ OpenAPI_amf_subscription_info_t *OpenAPI_amf_subscription_info_parseFromJSON(cJS
goto end;
}
-
+
if (!cJSON_IsString(amf_instance_id)) {
ogs_error("OpenAPI_amf_subscription_info_parseFromJSON() failed [amf_instance_id]");
goto end;
@@ -85,7 +85,7 @@ OpenAPI_amf_subscription_info_t *OpenAPI_amf_subscription_info_parseFromJSON(cJS
goto end;
}
-
+
if (!cJSON_IsString(subscription_id)) {
ogs_error("OpenAPI_amf_subscription_info_parseFromJSON() failed [subscription_id]");
goto end;
@@ -93,18 +93,18 @@ OpenAPI_amf_subscription_info_t *OpenAPI_amf_subscription_info_parseFromJSON(cJS
cJSON *subs_change_notify_correlation_id = cJSON_GetObjectItemCaseSensitive(amf_subscription_infoJSON, "subsChangeNotifyCorrelationId");
- if (subs_change_notify_correlation_id) {
- if (!cJSON_IsString(subs_change_notify_correlation_id)) {
- ogs_error("OpenAPI_amf_subscription_info_parseFromJSON() failed [subs_change_notify_correlation_id]");
- goto end;
- }
+ if (subs_change_notify_correlation_id) {
+ if (!cJSON_IsString(subs_change_notify_correlation_id)) {
+ ogs_error("OpenAPI_amf_subscription_info_parseFromJSON() failed [subs_change_notify_correlation_id]");
+ goto end;
+ }
}
amf_subscription_info_local_var = OpenAPI_amf_subscription_info_create (
ogs_strdup_or_assert(amf_instance_id->valuestring),
ogs_strdup_or_assert(subscription_id->valuestring),
subs_change_notify_correlation_id ? ogs_strdup_or_assert(subs_change_notify_correlation_id->valuestring) : NULL
- );
+ );
return amf_subscription_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/amf_subscription_info.h b/lib/sbi/openapi/model/amf_subscription_info.h
index 894c6cffd..00222c8e7 100644
--- a/lib/sbi/openapi/model/amf_subscription_info.h
+++ b/lib/sbi/openapi/model/amf_subscription_info.h
@@ -1,7 +1,7 @@
/*
* amf_subscription_info.h
*
- *
+ *
*/
#ifndef _OpenAPI_amf_subscription_info_H_
@@ -28,7 +28,7 @@ OpenAPI_amf_subscription_info_t *OpenAPI_amf_subscription_info_create(
char *amf_instance_id,
char *subscription_id,
char *subs_change_notify_correlation_id
- );
+);
void OpenAPI_amf_subscription_info_free(OpenAPI_amf_subscription_info_t *amf_subscription_info);
OpenAPI_amf_subscription_info_t *OpenAPI_amf_subscription_info_parseFromJSON(cJSON *amf_subscription_infoJSON);
cJSON *OpenAPI_amf_subscription_info_convertToJSON(OpenAPI_amf_subscription_info_t *amf_subscription_info);
diff --git a/lib/sbi/openapi/model/an_gw_address.c b/lib/sbi/openapi/model/an_gw_address.c
index ee61898d6..3043fbe6b 100644
--- a/lib/sbi/openapi/model/an_gw_address.c
+++ b/lib/sbi/openapi/model/an_gw_address.c
@@ -7,7 +7,7 @@
OpenAPI_an_gw_address_t *OpenAPI_an_gw_address_create(
char *an_gw_ipv4_addr,
char *an_gw_ipv6_addr
- )
+)
{
OpenAPI_an_gw_address_t *an_gw_address_local_var = OpenAPI_malloc(sizeof(OpenAPI_an_gw_address_t));
if (!an_gw_address_local_var) {
@@ -41,17 +41,17 @@ cJSON *OpenAPI_an_gw_address_convertToJSON(OpenAPI_an_gw_address_t *an_gw_addres
item = cJSON_CreateObject();
if (an_gw_address->an_gw_ipv4_addr) {
- if (cJSON_AddStringToObject(item, "anGwIpv4Addr", an_gw_address->an_gw_ipv4_addr) == NULL) {
- ogs_error("OpenAPI_an_gw_address_convertToJSON() failed [an_gw_ipv4_addr]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "anGwIpv4Addr", an_gw_address->an_gw_ipv4_addr) == NULL) {
+ ogs_error("OpenAPI_an_gw_address_convertToJSON() failed [an_gw_ipv4_addr]");
+ goto end;
+ }
}
if (an_gw_address->an_gw_ipv6_addr) {
- if (cJSON_AddStringToObject(item, "anGwIpv6Addr", an_gw_address->an_gw_ipv6_addr) == NULL) {
- ogs_error("OpenAPI_an_gw_address_convertToJSON() failed [an_gw_ipv6_addr]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "anGwIpv6Addr", an_gw_address->an_gw_ipv6_addr) == NULL) {
+ ogs_error("OpenAPI_an_gw_address_convertToJSON() failed [an_gw_ipv6_addr]");
+ goto end;
+ }
}
end:
@@ -63,26 +63,26 @@ OpenAPI_an_gw_address_t *OpenAPI_an_gw_address_parseFromJSON(cJSON *an_gw_addres
OpenAPI_an_gw_address_t *an_gw_address_local_var = NULL;
cJSON *an_gw_ipv4_addr = cJSON_GetObjectItemCaseSensitive(an_gw_addressJSON, "anGwIpv4Addr");
- if (an_gw_ipv4_addr) {
- if (!cJSON_IsString(an_gw_ipv4_addr)) {
- ogs_error("OpenAPI_an_gw_address_parseFromJSON() failed [an_gw_ipv4_addr]");
- goto end;
- }
+ if (an_gw_ipv4_addr) {
+ if (!cJSON_IsString(an_gw_ipv4_addr)) {
+ ogs_error("OpenAPI_an_gw_address_parseFromJSON() failed [an_gw_ipv4_addr]");
+ goto end;
+ }
}
cJSON *an_gw_ipv6_addr = cJSON_GetObjectItemCaseSensitive(an_gw_addressJSON, "anGwIpv6Addr");
- if (an_gw_ipv6_addr) {
- if (!cJSON_IsString(an_gw_ipv6_addr)) {
- ogs_error("OpenAPI_an_gw_address_parseFromJSON() failed [an_gw_ipv6_addr]");
- goto end;
- }
+ if (an_gw_ipv6_addr) {
+ if (!cJSON_IsString(an_gw_ipv6_addr)) {
+ ogs_error("OpenAPI_an_gw_address_parseFromJSON() failed [an_gw_ipv6_addr]");
+ goto end;
+ }
}
an_gw_address_local_var = OpenAPI_an_gw_address_create (
an_gw_ipv4_addr ? ogs_strdup_or_assert(an_gw_ipv4_addr->valuestring) : NULL,
an_gw_ipv6_addr ? ogs_strdup_or_assert(an_gw_ipv6_addr->valuestring) : NULL
- );
+ );
return an_gw_address_local_var;
end:
diff --git a/lib/sbi/openapi/model/an_gw_address.h b/lib/sbi/openapi/model/an_gw_address.h
index fe557e787..ca44645dc 100644
--- a/lib/sbi/openapi/model/an_gw_address.h
+++ b/lib/sbi/openapi/model/an_gw_address.h
@@ -26,7 +26,7 @@ typedef struct OpenAPI_an_gw_address_s {
OpenAPI_an_gw_address_t *OpenAPI_an_gw_address_create(
char *an_gw_ipv4_addr,
char *an_gw_ipv6_addr
- );
+);
void OpenAPI_an_gw_address_free(OpenAPI_an_gw_address_t *an_gw_address);
OpenAPI_an_gw_address_t *OpenAPI_an_gw_address_parseFromJSON(cJSON *an_gw_addressJSON);
cJSON *OpenAPI_an_gw_address_convertToJSON(OpenAPI_an_gw_address_t *an_gw_address);
diff --git a/lib/sbi/openapi/model/an_node_type.h b/lib/sbi/openapi/model/an_node_type.h
index 674c9fcff..a823e06a4 100644
--- a/lib/sbi/openapi/model/an_node_type.h
+++ b/lib/sbi/openapi/model/an_node_type.h
@@ -1,7 +1,7 @@
/*
* an_node_type.h
*
- *
+ *
*/
#ifndef _OpenAPI_an_node_type_H_
diff --git a/lib/sbi/openapi/model/apn_rate_status.c b/lib/sbi/openapi/model/apn_rate_status.c
index 8bdb87608..f9f8fd125 100644
--- a/lib/sbi/openapi/model/apn_rate_status.c
+++ b/lib/sbi/openapi/model/apn_rate_status.c
@@ -10,7 +10,7 @@ OpenAPI_apn_rate_status_t *OpenAPI_apn_rate_status_create(
char *validity_time,
int remain_ex_reports_ul,
int remain_ex_reports_dl
- )
+)
{
OpenAPI_apn_rate_status_t *apn_rate_status_local_var = OpenAPI_malloc(sizeof(OpenAPI_apn_rate_status_t));
if (!apn_rate_status_local_var) {
@@ -46,38 +46,38 @@ cJSON *OpenAPI_apn_rate_status_convertToJSON(OpenAPI_apn_rate_status_t *apn_rate
item = cJSON_CreateObject();
if (apn_rate_status->remain_packets_ul) {
- if (cJSON_AddNumberToObject(item, "remainPacketsUl", apn_rate_status->remain_packets_ul) == NULL) {
- ogs_error("OpenAPI_apn_rate_status_convertToJSON() failed [remain_packets_ul]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "remainPacketsUl", apn_rate_status->remain_packets_ul) == NULL) {
+ ogs_error("OpenAPI_apn_rate_status_convertToJSON() failed [remain_packets_ul]");
+ goto end;
+ }
}
if (apn_rate_status->remain_packets_dl) {
- if (cJSON_AddNumberToObject(item, "remainPacketsDl", apn_rate_status->remain_packets_dl) == NULL) {
- ogs_error("OpenAPI_apn_rate_status_convertToJSON() failed [remain_packets_dl]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "remainPacketsDl", apn_rate_status->remain_packets_dl) == NULL) {
+ ogs_error("OpenAPI_apn_rate_status_convertToJSON() failed [remain_packets_dl]");
+ goto end;
+ }
}
if (apn_rate_status->validity_time) {
- if (cJSON_AddStringToObject(item, "validityTime", apn_rate_status->validity_time) == NULL) {
- ogs_error("OpenAPI_apn_rate_status_convertToJSON() failed [validity_time]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "validityTime", apn_rate_status->validity_time) == NULL) {
+ ogs_error("OpenAPI_apn_rate_status_convertToJSON() failed [validity_time]");
+ goto end;
+ }
}
if (apn_rate_status->remain_ex_reports_ul) {
- if (cJSON_AddNumberToObject(item, "remainExReportsUl", apn_rate_status->remain_ex_reports_ul) == NULL) {
- ogs_error("OpenAPI_apn_rate_status_convertToJSON() failed [remain_ex_reports_ul]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "remainExReportsUl", apn_rate_status->remain_ex_reports_ul) == NULL) {
+ ogs_error("OpenAPI_apn_rate_status_convertToJSON() failed [remain_ex_reports_ul]");
+ goto end;
+ }
}
if (apn_rate_status->remain_ex_reports_dl) {
- if (cJSON_AddNumberToObject(item, "remainExReportsDl", apn_rate_status->remain_ex_reports_dl) == NULL) {
- ogs_error("OpenAPI_apn_rate_status_convertToJSON() failed [remain_ex_reports_dl]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "remainExReportsDl", apn_rate_status->remain_ex_reports_dl) == NULL) {
+ ogs_error("OpenAPI_apn_rate_status_convertToJSON() failed [remain_ex_reports_dl]");
+ goto end;
+ }
}
end:
@@ -89,47 +89,47 @@ OpenAPI_apn_rate_status_t *OpenAPI_apn_rate_status_parseFromJSON(cJSON *apn_rate
OpenAPI_apn_rate_status_t *apn_rate_status_local_var = NULL;
cJSON *remain_packets_ul = cJSON_GetObjectItemCaseSensitive(apn_rate_statusJSON, "remainPacketsUl");
- if (remain_packets_ul) {
- if (!cJSON_IsNumber(remain_packets_ul)) {
- ogs_error("OpenAPI_apn_rate_status_parseFromJSON() failed [remain_packets_ul]");
- goto end;
- }
+ if (remain_packets_ul) {
+ if (!cJSON_IsNumber(remain_packets_ul)) {
+ ogs_error("OpenAPI_apn_rate_status_parseFromJSON() failed [remain_packets_ul]");
+ goto end;
+ }
}
cJSON *remain_packets_dl = cJSON_GetObjectItemCaseSensitive(apn_rate_statusJSON, "remainPacketsDl");
- if (remain_packets_dl) {
- if (!cJSON_IsNumber(remain_packets_dl)) {
- ogs_error("OpenAPI_apn_rate_status_parseFromJSON() failed [remain_packets_dl]");
- goto end;
- }
+ if (remain_packets_dl) {
+ if (!cJSON_IsNumber(remain_packets_dl)) {
+ ogs_error("OpenAPI_apn_rate_status_parseFromJSON() failed [remain_packets_dl]");
+ goto end;
+ }
}
cJSON *validity_time = cJSON_GetObjectItemCaseSensitive(apn_rate_statusJSON, "validityTime");
- if (validity_time) {
- if (!cJSON_IsString(validity_time)) {
- ogs_error("OpenAPI_apn_rate_status_parseFromJSON() failed [validity_time]");
- goto end;
- }
+ if (validity_time) {
+ if (!cJSON_IsString(validity_time)) {
+ ogs_error("OpenAPI_apn_rate_status_parseFromJSON() failed [validity_time]");
+ goto end;
+ }
}
cJSON *remain_ex_reports_ul = cJSON_GetObjectItemCaseSensitive(apn_rate_statusJSON, "remainExReportsUl");
- if (remain_ex_reports_ul) {
- if (!cJSON_IsNumber(remain_ex_reports_ul)) {
- ogs_error("OpenAPI_apn_rate_status_parseFromJSON() failed [remain_ex_reports_ul]");
- goto end;
- }
+ if (remain_ex_reports_ul) {
+ if (!cJSON_IsNumber(remain_ex_reports_ul)) {
+ ogs_error("OpenAPI_apn_rate_status_parseFromJSON() failed [remain_ex_reports_ul]");
+ goto end;
+ }
}
cJSON *remain_ex_reports_dl = cJSON_GetObjectItemCaseSensitive(apn_rate_statusJSON, "remainExReportsDl");
- if (remain_ex_reports_dl) {
- if (!cJSON_IsNumber(remain_ex_reports_dl)) {
- ogs_error("OpenAPI_apn_rate_status_parseFromJSON() failed [remain_ex_reports_dl]");
- goto end;
- }
+ if (remain_ex_reports_dl) {
+ if (!cJSON_IsNumber(remain_ex_reports_dl)) {
+ ogs_error("OpenAPI_apn_rate_status_parseFromJSON() failed [remain_ex_reports_dl]");
+ goto end;
+ }
}
apn_rate_status_local_var = OpenAPI_apn_rate_status_create (
@@ -138,7 +138,7 @@ OpenAPI_apn_rate_status_t *OpenAPI_apn_rate_status_parseFromJSON(cJSON *apn_rate
validity_time ? ogs_strdup_or_assert(validity_time->valuestring) : NULL,
remain_ex_reports_ul ? remain_ex_reports_ul->valuedouble : 0,
remain_ex_reports_dl ? remain_ex_reports_dl->valuedouble : 0
- );
+ );
return apn_rate_status_local_var;
end:
diff --git a/lib/sbi/openapi/model/apn_rate_status.h b/lib/sbi/openapi/model/apn_rate_status.h
index 9aefec58e..af5b6f4cc 100644
--- a/lib/sbi/openapi/model/apn_rate_status.h
+++ b/lib/sbi/openapi/model/apn_rate_status.h
@@ -1,7 +1,7 @@
/*
* apn_rate_status.h
*
- *
+ *
*/
#ifndef _OpenAPI_apn_rate_status_H_
@@ -32,7 +32,7 @@ OpenAPI_apn_rate_status_t *OpenAPI_apn_rate_status_create(
char *validity_time,
int remain_ex_reports_ul,
int remain_ex_reports_dl
- );
+);
void OpenAPI_apn_rate_status_free(OpenAPI_apn_rate_status_t *apn_rate_status);
OpenAPI_apn_rate_status_t *OpenAPI_apn_rate_status_parseFromJSON(cJSON *apn_rate_statusJSON);
cJSON *OpenAPI_apn_rate_status_convertToJSON(OpenAPI_apn_rate_status_t *apn_rate_status);
diff --git a/lib/sbi/openapi/model/app_descriptor.c b/lib/sbi/openapi/model/app_descriptor.c
index 5cb20b19f..0526e48b6 100644
--- a/lib/sbi/openapi/model/app_descriptor.c
+++ b/lib/sbi/openapi/model/app_descriptor.c
@@ -7,7 +7,7 @@
OpenAPI_app_descriptor_t *OpenAPI_app_descriptor_create(
char *os_id,
char *app_id
- )
+)
{
OpenAPI_app_descriptor_t *app_descriptor_local_var = OpenAPI_malloc(sizeof(OpenAPI_app_descriptor_t));
if (!app_descriptor_local_var) {
@@ -41,17 +41,17 @@ cJSON *OpenAPI_app_descriptor_convertToJSON(OpenAPI_app_descriptor_t *app_descri
item = cJSON_CreateObject();
if (app_descriptor->os_id) {
- if (cJSON_AddStringToObject(item, "osId", app_descriptor->os_id) == NULL) {
- ogs_error("OpenAPI_app_descriptor_convertToJSON() failed [os_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "osId", app_descriptor->os_id) == NULL) {
+ ogs_error("OpenAPI_app_descriptor_convertToJSON() failed [os_id]");
+ goto end;
+ }
}
if (app_descriptor->app_id) {
- if (cJSON_AddStringToObject(item, "appId", app_descriptor->app_id) == NULL) {
- ogs_error("OpenAPI_app_descriptor_convertToJSON() failed [app_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "appId", app_descriptor->app_id) == NULL) {
+ ogs_error("OpenAPI_app_descriptor_convertToJSON() failed [app_id]");
+ goto end;
+ }
}
end:
@@ -63,26 +63,26 @@ OpenAPI_app_descriptor_t *OpenAPI_app_descriptor_parseFromJSON(cJSON *app_descri
OpenAPI_app_descriptor_t *app_descriptor_local_var = NULL;
cJSON *os_id = cJSON_GetObjectItemCaseSensitive(app_descriptorJSON, "osId");
- if (os_id) {
- if (!cJSON_IsString(os_id)) {
- ogs_error("OpenAPI_app_descriptor_parseFromJSON() failed [os_id]");
- goto end;
- }
+ if (os_id) {
+ if (!cJSON_IsString(os_id)) {
+ ogs_error("OpenAPI_app_descriptor_parseFromJSON() failed [os_id]");
+ goto end;
+ }
}
cJSON *app_id = cJSON_GetObjectItemCaseSensitive(app_descriptorJSON, "appId");
- if (app_id) {
- if (!cJSON_IsString(app_id)) {
- ogs_error("OpenAPI_app_descriptor_parseFromJSON() failed [app_id]");
- goto end;
- }
+ if (app_id) {
+ if (!cJSON_IsString(app_id)) {
+ ogs_error("OpenAPI_app_descriptor_parseFromJSON() failed [app_id]");
+ goto end;
+ }
}
app_descriptor_local_var = OpenAPI_app_descriptor_create (
os_id ? ogs_strdup_or_assert(os_id->valuestring) : NULL,
app_id ? ogs_strdup_or_assert(app_id->valuestring) : NULL
- );
+ );
return app_descriptor_local_var;
end:
diff --git a/lib/sbi/openapi/model/app_descriptor.h b/lib/sbi/openapi/model/app_descriptor.h
index d7fb87c06..d263f34ff 100644
--- a/lib/sbi/openapi/model/app_descriptor.h
+++ b/lib/sbi/openapi/model/app_descriptor.h
@@ -1,7 +1,7 @@
/*
* app_descriptor.h
*
- *
+ *
*/
#ifndef _OpenAPI_app_descriptor_H_
@@ -26,7 +26,7 @@ typedef struct OpenAPI_app_descriptor_s {
OpenAPI_app_descriptor_t *OpenAPI_app_descriptor_create(
char *os_id,
char *app_id
- );
+);
void OpenAPI_app_descriptor_free(OpenAPI_app_descriptor_t *app_descriptor);
OpenAPI_app_descriptor_t *OpenAPI_app_descriptor_parseFromJSON(cJSON *app_descriptorJSON);
cJSON *OpenAPI_app_descriptor_convertToJSON(OpenAPI_app_descriptor_t *app_descriptor);
diff --git a/lib/sbi/openapi/model/app_detection_info.c b/lib/sbi/openapi/model/app_detection_info.c
index 483c68eee..20c544e40 100644
--- a/lib/sbi/openapi/model/app_detection_info.c
+++ b/lib/sbi/openapi/model/app_detection_info.c
@@ -8,7 +8,7 @@ OpenAPI_app_detection_info_t *OpenAPI_app_detection_info_create(
char *app_id,
char *instance_id,
OpenAPI_list_t *sdf_descriptions
- )
+)
{
OpenAPI_app_detection_info_t *app_detection_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_app_detection_info_t));
if (!app_detection_info_local_var) {
@@ -52,31 +52,31 @@ cJSON *OpenAPI_app_detection_info_convertToJSON(OpenAPI_app_detection_info_t *ap
}
if (app_detection_info->instance_id) {
- if (cJSON_AddStringToObject(item, "instanceId", app_detection_info->instance_id) == NULL) {
- ogs_error("OpenAPI_app_detection_info_convertToJSON() failed [instance_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "instanceId", app_detection_info->instance_id) == NULL) {
+ ogs_error("OpenAPI_app_detection_info_convertToJSON() failed [instance_id]");
+ goto end;
+ }
}
if (app_detection_info->sdf_descriptions) {
- cJSON *sdf_descriptionsList = cJSON_AddArrayToObject(item, "sdfDescriptions");
- if (sdf_descriptionsList == NULL) {
- ogs_error("OpenAPI_app_detection_info_convertToJSON() failed [sdf_descriptions]");
- goto end;
- }
+ cJSON *sdf_descriptionsList = cJSON_AddArrayToObject(item, "sdfDescriptions");
+ if (sdf_descriptionsList == NULL) {
+ ogs_error("OpenAPI_app_detection_info_convertToJSON() failed [sdf_descriptions]");
+ goto end;
+ }
- OpenAPI_lnode_t *sdf_descriptions_node;
- if (app_detection_info->sdf_descriptions) {
- OpenAPI_list_for_each(app_detection_info->sdf_descriptions, sdf_descriptions_node) {
- cJSON *itemLocal = OpenAPI_flow_information_convertToJSON(sdf_descriptions_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_app_detection_info_convertToJSON() failed [sdf_descriptions]");
- goto end;
- }
- cJSON_AddItemToArray(sdf_descriptionsList, itemLocal);
+ OpenAPI_lnode_t *sdf_descriptions_node;
+ if (app_detection_info->sdf_descriptions) {
+ OpenAPI_list_for_each(app_detection_info->sdf_descriptions, sdf_descriptions_node) {
+ cJSON *itemLocal = OpenAPI_flow_information_convertToJSON(sdf_descriptions_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_app_detection_info_convertToJSON() failed [sdf_descriptions]");
+ goto end;
}
+ cJSON_AddItemToArray(sdf_descriptionsList, itemLocal);
}
}
+ }
end:
return item;
@@ -91,7 +91,7 @@ OpenAPI_app_detection_info_t *OpenAPI_app_detection_info_parseFromJSON(cJSON *ap
goto end;
}
-
+
if (!cJSON_IsString(app_id)) {
ogs_error("OpenAPI_app_detection_info_parseFromJSON() failed [app_id]");
goto end;
@@ -99,41 +99,41 @@ OpenAPI_app_detection_info_t *OpenAPI_app_detection_info_parseFromJSON(cJSON *ap
cJSON *instance_id = cJSON_GetObjectItemCaseSensitive(app_detection_infoJSON, "instanceId");
- if (instance_id) {
- if (!cJSON_IsString(instance_id)) {
- ogs_error("OpenAPI_app_detection_info_parseFromJSON() failed [instance_id]");
- goto end;
- }
+ if (instance_id) {
+ if (!cJSON_IsString(instance_id)) {
+ ogs_error("OpenAPI_app_detection_info_parseFromJSON() failed [instance_id]");
+ goto end;
+ }
}
cJSON *sdf_descriptions = cJSON_GetObjectItemCaseSensitive(app_detection_infoJSON, "sdfDescriptions");
OpenAPI_list_t *sdf_descriptionsList;
- if (sdf_descriptions) {
- cJSON *sdf_descriptions_local_nonprimitive;
- if (!cJSON_IsArray(sdf_descriptions)) {
+ if (sdf_descriptions) {
+ cJSON *sdf_descriptions_local_nonprimitive;
+ if (!cJSON_IsArray(sdf_descriptions)){
+ ogs_error("OpenAPI_app_detection_info_parseFromJSON() failed [sdf_descriptions]");
+ goto end;
+ }
+
+ sdf_descriptionsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(sdf_descriptions_local_nonprimitive, sdf_descriptions ) {
+ if (!cJSON_IsObject(sdf_descriptions_local_nonprimitive)) {
ogs_error("OpenAPI_app_detection_info_parseFromJSON() failed [sdf_descriptions]");
goto end;
}
+ OpenAPI_flow_information_t *sdf_descriptionsItem = OpenAPI_flow_information_parseFromJSON(sdf_descriptions_local_nonprimitive);
- sdf_descriptionsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(sdf_descriptions_local_nonprimitive, sdf_descriptions ) {
- if (!cJSON_IsObject(sdf_descriptions_local_nonprimitive)) {
- ogs_error("OpenAPI_app_detection_info_parseFromJSON() failed [sdf_descriptions]");
- goto end;
- }
- OpenAPI_flow_information_t *sdf_descriptionsItem = OpenAPI_flow_information_parseFromJSON(sdf_descriptions_local_nonprimitive);
-
- OpenAPI_list_add(sdf_descriptionsList, sdf_descriptionsItem);
- }
+ OpenAPI_list_add(sdf_descriptionsList, sdf_descriptionsItem);
+ }
}
app_detection_info_local_var = OpenAPI_app_detection_info_create (
ogs_strdup_or_assert(app_id->valuestring),
instance_id ? ogs_strdup_or_assert(instance_id->valuestring) : NULL,
sdf_descriptions ? sdf_descriptionsList : NULL
- );
+ );
return app_detection_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/app_detection_info.h b/lib/sbi/openapi/model/app_detection_info.h
index e0911706f..07a6b8bda 100644
--- a/lib/sbi/openapi/model/app_detection_info.h
+++ b/lib/sbi/openapi/model/app_detection_info.h
@@ -1,7 +1,7 @@
/*
* app_detection_info.h
*
- *
+ *
*/
#ifndef _OpenAPI_app_detection_info_H_
@@ -29,7 +29,7 @@ OpenAPI_app_detection_info_t *OpenAPI_app_detection_info_create(
char *app_id,
char *instance_id,
OpenAPI_list_t *sdf_descriptions
- );
+);
void OpenAPI_app_detection_info_free(OpenAPI_app_detection_info_t *app_detection_info);
OpenAPI_app_detection_info_t *OpenAPI_app_detection_info_parseFromJSON(cJSON *app_detection_infoJSON);
cJSON *OpenAPI_app_detection_info_convertToJSON(OpenAPI_app_detection_info_t *app_detection_info);
diff --git a/lib/sbi/openapi/model/app_port_id.c b/lib/sbi/openapi/model/app_port_id.c
index e284d67a3..e0cac86b3 100644
--- a/lib/sbi/openapi/model/app_port_id.c
+++ b/lib/sbi/openapi/model/app_port_id.c
@@ -7,7 +7,7 @@
OpenAPI_app_port_id_t *OpenAPI_app_port_id_create(
int destination_port,
int originator_port
- )
+)
{
OpenAPI_app_port_id_t *app_port_id_local_var = OpenAPI_malloc(sizeof(OpenAPI_app_port_id_t));
if (!app_port_id_local_var) {
@@ -39,17 +39,17 @@ cJSON *OpenAPI_app_port_id_convertToJSON(OpenAPI_app_port_id_t *app_port_id)
item = cJSON_CreateObject();
if (app_port_id->destination_port) {
- if (cJSON_AddNumberToObject(item, "destinationPort", app_port_id->destination_port) == NULL) {
- ogs_error("OpenAPI_app_port_id_convertToJSON() failed [destination_port]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "destinationPort", app_port_id->destination_port) == NULL) {
+ ogs_error("OpenAPI_app_port_id_convertToJSON() failed [destination_port]");
+ goto end;
+ }
}
if (app_port_id->originator_port) {
- if (cJSON_AddNumberToObject(item, "originatorPort", app_port_id->originator_port) == NULL) {
- ogs_error("OpenAPI_app_port_id_convertToJSON() failed [originator_port]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "originatorPort", app_port_id->originator_port) == NULL) {
+ ogs_error("OpenAPI_app_port_id_convertToJSON() failed [originator_port]");
+ goto end;
+ }
}
end:
@@ -61,26 +61,26 @@ OpenAPI_app_port_id_t *OpenAPI_app_port_id_parseFromJSON(cJSON *app_port_idJSON)
OpenAPI_app_port_id_t *app_port_id_local_var = NULL;
cJSON *destination_port = cJSON_GetObjectItemCaseSensitive(app_port_idJSON, "destinationPort");
- if (destination_port) {
- if (!cJSON_IsNumber(destination_port)) {
- ogs_error("OpenAPI_app_port_id_parseFromJSON() failed [destination_port]");
- goto end;
- }
+ if (destination_port) {
+ if (!cJSON_IsNumber(destination_port)) {
+ ogs_error("OpenAPI_app_port_id_parseFromJSON() failed [destination_port]");
+ goto end;
+ }
}
cJSON *originator_port = cJSON_GetObjectItemCaseSensitive(app_port_idJSON, "originatorPort");
- if (originator_port) {
- if (!cJSON_IsNumber(originator_port)) {
- ogs_error("OpenAPI_app_port_id_parseFromJSON() failed [originator_port]");
- goto end;
- }
+ if (originator_port) {
+ if (!cJSON_IsNumber(originator_port)) {
+ ogs_error("OpenAPI_app_port_id_parseFromJSON() failed [originator_port]");
+ goto end;
+ }
}
app_port_id_local_var = OpenAPI_app_port_id_create (
destination_port ? destination_port->valuedouble : 0,
originator_port ? originator_port->valuedouble : 0
- );
+ );
return app_port_id_local_var;
end:
diff --git a/lib/sbi/openapi/model/app_port_id.h b/lib/sbi/openapi/model/app_port_id.h
index d38d4e649..ac484f174 100644
--- a/lib/sbi/openapi/model/app_port_id.h
+++ b/lib/sbi/openapi/model/app_port_id.h
@@ -1,7 +1,7 @@
/*
* app_port_id.h
*
- *
+ *
*/
#ifndef _OpenAPI_app_port_id_H_
@@ -26,7 +26,7 @@ typedef struct OpenAPI_app_port_id_s {
OpenAPI_app_port_id_t *OpenAPI_app_port_id_create(
int destination_port,
int originator_port
- );
+);
void OpenAPI_app_port_id_free(OpenAPI_app_port_id_t *app_port_id);
OpenAPI_app_port_id_t *OpenAPI_app_port_id_parseFromJSON(cJSON *app_port_idJSON);
cJSON *OpenAPI_app_port_id_convertToJSON(OpenAPI_app_port_id_t *app_port_id);
diff --git a/lib/sbi/openapi/model/app_session_context.c b/lib/sbi/openapi/model/app_session_context.c
index 936e09fc0..83d731af2 100644
--- a/lib/sbi/openapi/model/app_session_context.c
+++ b/lib/sbi/openapi/model/app_session_context.c
@@ -8,7 +8,7 @@ OpenAPI_app_session_context_t *OpenAPI_app_session_context_create(
OpenAPI_app_session_context_req_data_t *asc_req_data,
OpenAPI_app_session_context_resp_data_t *asc_resp_data,
OpenAPI_events_notification_t *evs_notif
- )
+)
{
OpenAPI_app_session_context_t *app_session_context_local_var = OpenAPI_malloc(sizeof(OpenAPI_app_session_context_t));
if (!app_session_context_local_var) {
@@ -44,42 +44,42 @@ cJSON *OpenAPI_app_session_context_convertToJSON(OpenAPI_app_session_context_t *
item = cJSON_CreateObject();
if (app_session_context->asc_req_data) {
- cJSON *asc_req_data_local_JSON = OpenAPI_app_session_context_req_data_convertToJSON(app_session_context->asc_req_data);
- if (asc_req_data_local_JSON == NULL) {
- ogs_error("OpenAPI_app_session_context_convertToJSON() failed [asc_req_data]");
- goto end;
- }
- cJSON_AddItemToObject(item, "ascReqData", asc_req_data_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_app_session_context_convertToJSON() failed [asc_req_data]");
- goto end;
- }
+ cJSON *asc_req_data_local_JSON = OpenAPI_app_session_context_req_data_convertToJSON(app_session_context->asc_req_data);
+ if (asc_req_data_local_JSON == NULL) {
+ ogs_error("OpenAPI_app_session_context_convertToJSON() failed [asc_req_data]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "ascReqData", asc_req_data_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_app_session_context_convertToJSON() failed [asc_req_data]");
+ goto end;
+ }
}
if (app_session_context->asc_resp_data) {
- cJSON *asc_resp_data_local_JSON = OpenAPI_app_session_context_resp_data_convertToJSON(app_session_context->asc_resp_data);
- if (asc_resp_data_local_JSON == NULL) {
- ogs_error("OpenAPI_app_session_context_convertToJSON() failed [asc_resp_data]");
- goto end;
- }
- cJSON_AddItemToObject(item, "ascRespData", asc_resp_data_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_app_session_context_convertToJSON() failed [asc_resp_data]");
- goto end;
- }
+ cJSON *asc_resp_data_local_JSON = OpenAPI_app_session_context_resp_data_convertToJSON(app_session_context->asc_resp_data);
+ if (asc_resp_data_local_JSON == NULL) {
+ ogs_error("OpenAPI_app_session_context_convertToJSON() failed [asc_resp_data]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "ascRespData", asc_resp_data_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_app_session_context_convertToJSON() failed [asc_resp_data]");
+ goto end;
+ }
}
if (app_session_context->evs_notif) {
- cJSON *evs_notif_local_JSON = OpenAPI_events_notification_convertToJSON(app_session_context->evs_notif);
- if (evs_notif_local_JSON == NULL) {
- ogs_error("OpenAPI_app_session_context_convertToJSON() failed [evs_notif]");
- goto end;
- }
- cJSON_AddItemToObject(item, "evsNotif", evs_notif_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_app_session_context_convertToJSON() failed [evs_notif]");
- goto end;
- }
+ cJSON *evs_notif_local_JSON = OpenAPI_events_notification_convertToJSON(app_session_context->evs_notif);
+ if (evs_notif_local_JSON == NULL) {
+ ogs_error("OpenAPI_app_session_context_convertToJSON() failed [evs_notif]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "evsNotif", evs_notif_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_app_session_context_convertToJSON() failed [evs_notif]");
+ goto end;
+ }
}
end:
@@ -92,29 +92,29 @@ OpenAPI_app_session_context_t *OpenAPI_app_session_context_parseFromJSON(cJSON *
cJSON *asc_req_data = cJSON_GetObjectItemCaseSensitive(app_session_contextJSON, "ascReqData");
OpenAPI_app_session_context_req_data_t *asc_req_data_local_nonprim = NULL;
- if (asc_req_data) {
- asc_req_data_local_nonprim = OpenAPI_app_session_context_req_data_parseFromJSON(asc_req_data);
+ if (asc_req_data) {
+ asc_req_data_local_nonprim = OpenAPI_app_session_context_req_data_parseFromJSON(asc_req_data);
}
cJSON *asc_resp_data = cJSON_GetObjectItemCaseSensitive(app_session_contextJSON, "ascRespData");
OpenAPI_app_session_context_resp_data_t *asc_resp_data_local_nonprim = NULL;
- if (asc_resp_data) {
- asc_resp_data_local_nonprim = OpenAPI_app_session_context_resp_data_parseFromJSON(asc_resp_data);
+ if (asc_resp_data) {
+ asc_resp_data_local_nonprim = OpenAPI_app_session_context_resp_data_parseFromJSON(asc_resp_data);
}
cJSON *evs_notif = cJSON_GetObjectItemCaseSensitive(app_session_contextJSON, "evsNotif");
OpenAPI_events_notification_t *evs_notif_local_nonprim = NULL;
- if (evs_notif) {
- evs_notif_local_nonprim = OpenAPI_events_notification_parseFromJSON(evs_notif);
+ if (evs_notif) {
+ evs_notif_local_nonprim = OpenAPI_events_notification_parseFromJSON(evs_notif);
}
app_session_context_local_var = OpenAPI_app_session_context_create (
asc_req_data ? asc_req_data_local_nonprim : NULL,
asc_resp_data ? asc_resp_data_local_nonprim : NULL,
evs_notif ? evs_notif_local_nonprim : NULL
- );
+ );
return app_session_context_local_var;
end:
diff --git a/lib/sbi/openapi/model/app_session_context.h b/lib/sbi/openapi/model/app_session_context.h
index ffdea79ec..4659ac340 100644
--- a/lib/sbi/openapi/model/app_session_context.h
+++ b/lib/sbi/openapi/model/app_session_context.h
@@ -31,7 +31,7 @@ OpenAPI_app_session_context_t *OpenAPI_app_session_context_create(
OpenAPI_app_session_context_req_data_t *asc_req_data,
OpenAPI_app_session_context_resp_data_t *asc_resp_data,
OpenAPI_events_notification_t *evs_notif
- );
+);
void OpenAPI_app_session_context_free(OpenAPI_app_session_context_t *app_session_context);
OpenAPI_app_session_context_t *OpenAPI_app_session_context_parseFromJSON(cJSON *app_session_contextJSON);
cJSON *OpenAPI_app_session_context_convertToJSON(OpenAPI_app_session_context_t *app_session_context);
diff --git a/lib/sbi/openapi/model/app_session_context_req_data.c b/lib/sbi/openapi/model/app_session_context_req_data.c
index 0c769e0f2..ddaafb37b 100644
--- a/lib/sbi/openapi/model/app_session_context_req_data.c
+++ b/lib/sbi/openapi/model/app_session_context_req_data.c
@@ -33,9 +33,10 @@ OpenAPI_app_session_context_req_data_t *OpenAPI_app_session_context_req_data_cre
char *ue_ipv4,
char *ue_ipv6,
char *ue_mac,
+ OpenAPI_bridge_management_container_t *tsn_bridge_man_cont,
OpenAPI_port_management_container_t *tsn_port_man_cont_dstt,
OpenAPI_list_t *tsn_port_man_cont_nwtts
- )
+)
{
OpenAPI_app_session_context_req_data_t *app_session_context_req_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_app_session_context_req_data_t));
if (!app_session_context_req_data_local_var) {
@@ -69,6 +70,7 @@ OpenAPI_app_session_context_req_data_t *OpenAPI_app_session_context_req_data_cre
app_session_context_req_data_local_var->ue_ipv4 = ue_ipv4;
app_session_context_req_data_local_var->ue_ipv6 = ue_ipv6;
app_session_context_req_data_local_var->ue_mac = ue_mac;
+ app_session_context_req_data_local_var->tsn_bridge_man_cont = tsn_bridge_man_cont;
app_session_context_req_data_local_var->tsn_port_man_cont_dstt = tsn_port_man_cont_dstt;
app_session_context_req_data_local_var->tsn_port_man_cont_nwtts = tsn_port_man_cont_nwtts;
@@ -109,6 +111,7 @@ void OpenAPI_app_session_context_req_data_free(OpenAPI_app_session_context_req_d
ogs_free(app_session_context_req_data->ue_ipv4);
ogs_free(app_session_context_req_data->ue_ipv6);
ogs_free(app_session_context_req_data->ue_mac);
+ OpenAPI_bridge_management_container_free(app_session_context_req_data->tsn_bridge_man_cont);
OpenAPI_port_management_container_free(app_session_context_req_data->tsn_port_man_cont_dstt);
OpenAPI_list_for_each(app_session_context_req_data->tsn_port_man_cont_nwtts, node) {
OpenAPI_port_management_container_free(node->data);
@@ -128,148 +131,148 @@ cJSON *OpenAPI_app_session_context_req_data_convertToJSON(OpenAPI_app_session_co
item = cJSON_CreateObject();
if (app_session_context_req_data->af_app_id) {
- if (cJSON_AddStringToObject(item, "afAppId", app_session_context_req_data->af_app_id) == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [af_app_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "afAppId", app_session_context_req_data->af_app_id) == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [af_app_id]");
+ goto end;
+ }
}
if (app_session_context_req_data->af_charg_id) {
- if (cJSON_AddStringToObject(item, "afChargId", app_session_context_req_data->af_charg_id) == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [af_charg_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "afChargId", app_session_context_req_data->af_charg_id) == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [af_charg_id]");
+ goto end;
+ }
}
if (app_session_context_req_data->af_req_data) {
- if (cJSON_AddStringToObject(item, "afReqData", OpenAPI_af_requested_data_ToString(app_session_context_req_data->af_req_data)) == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [af_req_data]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "afReqData", OpenAPI_af_requested_data_ToString(app_session_context_req_data->af_req_data)) == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [af_req_data]");
+ goto end;
+ }
}
if (app_session_context_req_data->af_rout_req) {
- cJSON *af_rout_req_local_JSON = OpenAPI_af_routing_requirement_convertToJSON(app_session_context_req_data->af_rout_req);
- if (af_rout_req_local_JSON == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [af_rout_req]");
- goto end;
- }
- cJSON_AddItemToObject(item, "afRoutReq", af_rout_req_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [af_rout_req]");
- goto end;
- }
+ cJSON *af_rout_req_local_JSON = OpenAPI_af_routing_requirement_convertToJSON(app_session_context_req_data->af_rout_req);
+ if (af_rout_req_local_JSON == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [af_rout_req]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "afRoutReq", af_rout_req_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [af_rout_req]");
+ goto end;
+ }
}
if (app_session_context_req_data->asp_id) {
- if (cJSON_AddStringToObject(item, "aspId", app_session_context_req_data->asp_id) == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [asp_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "aspId", app_session_context_req_data->asp_id) == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [asp_id]");
+ goto end;
+ }
}
if (app_session_context_req_data->bdt_ref_id) {
- if (cJSON_AddStringToObject(item, "bdtRefId", app_session_context_req_data->bdt_ref_id) == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [bdt_ref_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "bdtRefId", app_session_context_req_data->bdt_ref_id) == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [bdt_ref_id]");
+ goto end;
+ }
}
if (app_session_context_req_data->dnn) {
- if (cJSON_AddStringToObject(item, "dnn", app_session_context_req_data->dnn) == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [dnn]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "dnn", app_session_context_req_data->dnn) == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [dnn]");
+ goto end;
+ }
}
if (app_session_context_req_data->ev_subsc) {
- cJSON *ev_subsc_local_JSON = OpenAPI_events_subsc_req_data_convertToJSON(app_session_context_req_data->ev_subsc);
- if (ev_subsc_local_JSON == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [ev_subsc]");
- goto end;
- }
- cJSON_AddItemToObject(item, "evSubsc", ev_subsc_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [ev_subsc]");
- goto end;
- }
+ cJSON *ev_subsc_local_JSON = OpenAPI_events_subsc_req_data_convertToJSON(app_session_context_req_data->ev_subsc);
+ if (ev_subsc_local_JSON == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [ev_subsc]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "evSubsc", ev_subsc_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [ev_subsc]");
+ goto end;
+ }
}
if (app_session_context_req_data->mcptt_id) {
- if (cJSON_AddStringToObject(item, "mcpttId", app_session_context_req_data->mcptt_id) == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [mcptt_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "mcpttId", app_session_context_req_data->mcptt_id) == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [mcptt_id]");
+ goto end;
+ }
}
if (app_session_context_req_data->mc_video_id) {
- if (cJSON_AddStringToObject(item, "mcVideoId", app_session_context_req_data->mc_video_id) == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [mc_video_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "mcVideoId", app_session_context_req_data->mc_video_id) == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [mc_video_id]");
+ goto end;
+ }
}
if (app_session_context_req_data->med_components) {
- cJSON *med_components = cJSON_AddObjectToObject(item, "medComponents");
- if (med_components == NULL) {
+ cJSON *med_components = cJSON_AddObjectToObject(item, "medComponents");
+ if (med_components == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [med_components]");
+ goto end;
+ }
+ cJSON *localMapObject = med_components;
+ OpenAPI_lnode_t *med_components_node;
+ if (app_session_context_req_data->med_components) {
+ OpenAPI_list_for_each(app_session_context_req_data->med_components, med_components_node) {
+ OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)med_components_node->data;
+ cJSON *itemLocal = OpenAPI_media_component_convertToJSON(localKeyValue->value);
+ if (itemLocal == NULL) {
ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [med_components]");
goto end;
}
- cJSON *localMapObject = med_components;
- OpenAPI_lnode_t *med_components_node;
- if (app_session_context_req_data->med_components) {
- OpenAPI_list_for_each(app_session_context_req_data->med_components, med_components_node) {
- OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)med_components_node->data;
- cJSON *itemLocal = OpenAPI_media_component_convertToJSON(localKeyValue->value);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [med_components]");
- goto end;
- }
- cJSON_AddItemToObject(med_components, localKeyValue->key, itemLocal);
+ cJSON_AddItemToObject(med_components, localKeyValue->key, itemLocal);
}
}
}
if (app_session_context_req_data->ip_domain) {
- if (cJSON_AddStringToObject(item, "ipDomain", app_session_context_req_data->ip_domain) == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [ip_domain]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "ipDomain", app_session_context_req_data->ip_domain) == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [ip_domain]");
+ goto end;
+ }
}
if (app_session_context_req_data->mps_id) {
- if (cJSON_AddStringToObject(item, "mpsId", app_session_context_req_data->mps_id) == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [mps_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "mpsId", app_session_context_req_data->mps_id) == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [mps_id]");
+ goto end;
+ }
}
if (app_session_context_req_data->mcs_id) {
- if (cJSON_AddStringToObject(item, "mcsId", app_session_context_req_data->mcs_id) == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [mcs_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "mcsId", app_session_context_req_data->mcs_id) == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [mcs_id]");
+ goto end;
+ }
}
if (app_session_context_req_data->preempt_control_info) {
- if (cJSON_AddStringToObject(item, "preemptControlInfo", OpenAPI_preemption_control_information_ToString(app_session_context_req_data->preempt_control_info)) == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [preempt_control_info]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "preemptControlInfo", OpenAPI_preemption_control_information_ToString(app_session_context_req_data->preempt_control_info)) == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [preempt_control_info]");
+ goto end;
+ }
}
if (app_session_context_req_data->res_prio) {
- if (cJSON_AddStringToObject(item, "resPrio", OpenAPI_reserv_priority_ToString(app_session_context_req_data->res_prio)) == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [res_prio]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "resPrio", OpenAPI_reserv_priority_ToString(app_session_context_req_data->res_prio)) == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [res_prio]");
+ goto end;
+ }
}
if (app_session_context_req_data->serv_inf_status) {
- if (cJSON_AddStringToObject(item, "servInfStatus", OpenAPI_service_info_status_ToString(app_session_context_req_data->serv_inf_status)) == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [serv_inf_status]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "servInfStatus", OpenAPI_service_info_status_ToString(app_session_context_req_data->serv_inf_status)) == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [serv_inf_status]");
+ goto end;
+ }
}
if (cJSON_AddStringToObject(item, "notifUri", app_session_context_req_data->notif_uri) == NULL) {
@@ -278,51 +281,51 @@ cJSON *OpenAPI_app_session_context_req_data_convertToJSON(OpenAPI_app_session_co
}
if (app_session_context_req_data->serv_urn) {
- if (cJSON_AddStringToObject(item, "servUrn", app_session_context_req_data->serv_urn) == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [serv_urn]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "servUrn", app_session_context_req_data->serv_urn) == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [serv_urn]");
+ goto end;
+ }
}
if (app_session_context_req_data->slice_info) {
- cJSON *slice_info_local_JSON = OpenAPI_snssai_convertToJSON(app_session_context_req_data->slice_info);
- if (slice_info_local_JSON == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [slice_info]");
- goto end;
- }
- cJSON_AddItemToObject(item, "sliceInfo", slice_info_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [slice_info]");
- goto end;
- }
+ cJSON *slice_info_local_JSON = OpenAPI_snssai_convertToJSON(app_session_context_req_data->slice_info);
+ if (slice_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [slice_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "sliceInfo", slice_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [slice_info]");
+ goto end;
+ }
}
if (app_session_context_req_data->spon_id) {
- if (cJSON_AddStringToObject(item, "sponId", app_session_context_req_data->spon_id) == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [spon_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "sponId", app_session_context_req_data->spon_id) == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [spon_id]");
+ goto end;
+ }
}
if (app_session_context_req_data->spon_status) {
- if (cJSON_AddStringToObject(item, "sponStatus", OpenAPI_sponsoring_status_ToString(app_session_context_req_data->spon_status)) == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [spon_status]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "sponStatus", OpenAPI_sponsoring_status_ToString(app_session_context_req_data->spon_status)) == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [spon_status]");
+ goto end;
+ }
}
if (app_session_context_req_data->supi) {
- if (cJSON_AddStringToObject(item, "supi", app_session_context_req_data->supi) == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [supi]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "supi", app_session_context_req_data->supi) == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [supi]");
+ goto end;
+ }
}
if (app_session_context_req_data->gpsi) {
- if (cJSON_AddStringToObject(item, "gpsi", app_session_context_req_data->gpsi) == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [gpsi]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "gpsi", app_session_context_req_data->gpsi) == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [gpsi]");
+ goto end;
+ }
}
if (cJSON_AddStringToObject(item, "suppFeat", app_session_context_req_data->supp_feat) == NULL) {
@@ -331,58 +334,71 @@ cJSON *OpenAPI_app_session_context_req_data_convertToJSON(OpenAPI_app_session_co
}
if (app_session_context_req_data->ue_ipv4) {
- if (cJSON_AddStringToObject(item, "ueIpv4", app_session_context_req_data->ue_ipv4) == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [ue_ipv4]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "ueIpv4", app_session_context_req_data->ue_ipv4) == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [ue_ipv4]");
+ goto end;
+ }
}
if (app_session_context_req_data->ue_ipv6) {
- if (cJSON_AddStringToObject(item, "ueIpv6", app_session_context_req_data->ue_ipv6) == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [ue_ipv6]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "ueIpv6", app_session_context_req_data->ue_ipv6) == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [ue_ipv6]");
+ goto end;
+ }
}
if (app_session_context_req_data->ue_mac) {
- if (cJSON_AddStringToObject(item, "ueMac", app_session_context_req_data->ue_mac) == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [ue_mac]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "ueMac", app_session_context_req_data->ue_mac) == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [ue_mac]");
+ goto end;
+ }
+ }
+
+ if (app_session_context_req_data->tsn_bridge_man_cont) {
+ cJSON *tsn_bridge_man_cont_local_JSON = OpenAPI_bridge_management_container_convertToJSON(app_session_context_req_data->tsn_bridge_man_cont);
+ if (tsn_bridge_man_cont_local_JSON == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [tsn_bridge_man_cont]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "tsnBridgeManCont", tsn_bridge_man_cont_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [tsn_bridge_man_cont]");
+ goto end;
+ }
}
if (app_session_context_req_data->tsn_port_man_cont_dstt) {
- cJSON *tsn_port_man_cont_dstt_local_JSON = OpenAPI_port_management_container_convertToJSON(app_session_context_req_data->tsn_port_man_cont_dstt);
- if (tsn_port_man_cont_dstt_local_JSON == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [tsn_port_man_cont_dstt]");
- goto end;
- }
- cJSON_AddItemToObject(item, "tsnPortManContDstt", tsn_port_man_cont_dstt_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [tsn_port_man_cont_dstt]");
- goto end;
- }
+ cJSON *tsn_port_man_cont_dstt_local_JSON = OpenAPI_port_management_container_convertToJSON(app_session_context_req_data->tsn_port_man_cont_dstt);
+ if (tsn_port_man_cont_dstt_local_JSON == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [tsn_port_man_cont_dstt]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "tsnPortManContDstt", tsn_port_man_cont_dstt_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [tsn_port_man_cont_dstt]");
+ goto end;
+ }
}
if (app_session_context_req_data->tsn_port_man_cont_nwtts) {
- cJSON *tsn_port_man_cont_nwttsList = cJSON_AddArrayToObject(item, "tsnPortManContNwtts");
- if (tsn_port_man_cont_nwttsList == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [tsn_port_man_cont_nwtts]");
- goto end;
- }
+ cJSON *tsn_port_man_cont_nwttsList = cJSON_AddArrayToObject(item, "tsnPortManContNwtts");
+ if (tsn_port_man_cont_nwttsList == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [tsn_port_man_cont_nwtts]");
+ goto end;
+ }
- OpenAPI_lnode_t *tsn_port_man_cont_nwtts_node;
- if (app_session_context_req_data->tsn_port_man_cont_nwtts) {
- OpenAPI_list_for_each(app_session_context_req_data->tsn_port_man_cont_nwtts, tsn_port_man_cont_nwtts_node) {
- cJSON *itemLocal = OpenAPI_port_management_container_convertToJSON(tsn_port_man_cont_nwtts_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [tsn_port_man_cont_nwtts]");
- goto end;
- }
- cJSON_AddItemToArray(tsn_port_man_cont_nwttsList, itemLocal);
+ OpenAPI_lnode_t *tsn_port_man_cont_nwtts_node;
+ if (app_session_context_req_data->tsn_port_man_cont_nwtts) {
+ OpenAPI_list_for_each(app_session_context_req_data->tsn_port_man_cont_nwtts, tsn_port_man_cont_nwtts_node) {
+ cJSON *itemLocal = OpenAPI_port_management_container_convertToJSON(tsn_port_man_cont_nwtts_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [tsn_port_man_cont_nwtts]");
+ goto end;
}
+ cJSON_AddItemToArray(tsn_port_man_cont_nwttsList, itemLocal);
}
}
+ }
end:
return item;
@@ -393,173 +409,173 @@ OpenAPI_app_session_context_req_data_t *OpenAPI_app_session_context_req_data_par
OpenAPI_app_session_context_req_data_t *app_session_context_req_data_local_var = NULL;
cJSON *af_app_id = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "afAppId");
- if (af_app_id) {
- if (!cJSON_IsString(af_app_id)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [af_app_id]");
- goto end;
- }
+ if (af_app_id) {
+ if (!cJSON_IsString(af_app_id)) {
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [af_app_id]");
+ goto end;
+ }
}
cJSON *af_charg_id = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "afChargId");
- if (af_charg_id) {
- if (!cJSON_IsString(af_charg_id)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [af_charg_id]");
- goto end;
- }
+ if (af_charg_id) {
+ if (!cJSON_IsString(af_charg_id)) {
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [af_charg_id]");
+ goto end;
+ }
}
cJSON *af_req_data = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "afReqData");
OpenAPI_af_requested_data_e af_req_dataVariable;
- if (af_req_data) {
- if (!cJSON_IsString(af_req_data)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [af_req_data]");
- goto end;
- }
- af_req_dataVariable = OpenAPI_af_requested_data_FromString(af_req_data->valuestring);
+ if (af_req_data) {
+ if (!cJSON_IsString(af_req_data)) {
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [af_req_data]");
+ goto end;
+ }
+ af_req_dataVariable = OpenAPI_af_requested_data_FromString(af_req_data->valuestring);
}
cJSON *af_rout_req = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "afRoutReq");
OpenAPI_af_routing_requirement_t *af_rout_req_local_nonprim = NULL;
- if (af_rout_req) {
- af_rout_req_local_nonprim = OpenAPI_af_routing_requirement_parseFromJSON(af_rout_req);
+ if (af_rout_req) {
+ af_rout_req_local_nonprim = OpenAPI_af_routing_requirement_parseFromJSON(af_rout_req);
}
cJSON *asp_id = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "aspId");
- if (asp_id) {
- if (!cJSON_IsString(asp_id)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [asp_id]");
- goto end;
- }
+ if (asp_id) {
+ if (!cJSON_IsString(asp_id)) {
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [asp_id]");
+ goto end;
+ }
}
cJSON *bdt_ref_id = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "bdtRefId");
- if (bdt_ref_id) {
- if (!cJSON_IsString(bdt_ref_id)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [bdt_ref_id]");
- goto end;
- }
+ if (bdt_ref_id) {
+ if (!cJSON_IsString(bdt_ref_id)) {
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [bdt_ref_id]");
+ goto end;
+ }
}
cJSON *dnn = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "dnn");
- if (dnn) {
- if (!cJSON_IsString(dnn)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [dnn]");
- goto end;
- }
+ if (dnn) {
+ if (!cJSON_IsString(dnn)) {
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [dnn]");
+ goto end;
+ }
}
cJSON *ev_subsc = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "evSubsc");
OpenAPI_events_subsc_req_data_t *ev_subsc_local_nonprim = NULL;
- if (ev_subsc) {
- ev_subsc_local_nonprim = OpenAPI_events_subsc_req_data_parseFromJSON(ev_subsc);
+ if (ev_subsc) {
+ ev_subsc_local_nonprim = OpenAPI_events_subsc_req_data_parseFromJSON(ev_subsc);
}
cJSON *mcptt_id = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "mcpttId");
- if (mcptt_id) {
- if (!cJSON_IsString(mcptt_id)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [mcptt_id]");
- goto end;
- }
+ if (mcptt_id) {
+ if (!cJSON_IsString(mcptt_id)) {
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [mcptt_id]");
+ goto end;
+ }
}
cJSON *mc_video_id = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "mcVideoId");
- if (mc_video_id) {
- if (!cJSON_IsString(mc_video_id)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [mc_video_id]");
- goto end;
- }
+ if (mc_video_id) {
+ if (!cJSON_IsString(mc_video_id)) {
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [mc_video_id]");
+ goto end;
+ }
}
cJSON *med_components = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "medComponents");
OpenAPI_list_t *med_componentsList;
- if (med_components) {
- cJSON *med_components_local_map;
- if (!cJSON_IsObject(med_components)) {
+ if (med_components) {
+ cJSON *med_components_local_map;
+ if (!cJSON_IsObject(med_components)) {
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [med_components]");
+ goto end;
+ }
+ med_componentsList = OpenAPI_list_create();
+ OpenAPI_map_t *localMapKeyPair = NULL;
+ cJSON_ArrayForEach(med_components_local_map, med_components) {
+ cJSON *localMapObject = med_components_local_map;
+ if (!cJSON_IsObject(med_components_local_map)) {
ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [med_components]");
goto end;
}
- med_componentsList = OpenAPI_list_create();
- OpenAPI_map_t *localMapKeyPair = NULL;
- cJSON_ArrayForEach(med_components_local_map, med_components) {
- cJSON *localMapObject = med_components_local_map;
- if (!cJSON_IsObject(med_components_local_map)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [med_components]");
- goto end;
- }
- localMapKeyPair = OpenAPI_map_create(
- localMapObject->string, OpenAPI_media_component_parseFromJSON(localMapObject));
- OpenAPI_list_add(med_componentsList, localMapKeyPair);
- }
+ localMapKeyPair = OpenAPI_map_create(
+ localMapObject->string, OpenAPI_media_component_parseFromJSON(localMapObject));
+ OpenAPI_list_add(med_componentsList , localMapKeyPair);
+ }
}
cJSON *ip_domain = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "ipDomain");
- if (ip_domain) {
- if (!cJSON_IsString(ip_domain)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [ip_domain]");
- goto end;
- }
+ if (ip_domain) {
+ if (!cJSON_IsString(ip_domain)) {
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [ip_domain]");
+ goto end;
+ }
}
cJSON *mps_id = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "mpsId");
- if (mps_id) {
- if (!cJSON_IsString(mps_id)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [mps_id]");
- goto end;
- }
+ if (mps_id) {
+ if (!cJSON_IsString(mps_id)) {
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [mps_id]");
+ goto end;
+ }
}
cJSON *mcs_id = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "mcsId");
- if (mcs_id) {
- if (!cJSON_IsString(mcs_id)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [mcs_id]");
- goto end;
- }
+ if (mcs_id) {
+ if (!cJSON_IsString(mcs_id)) {
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [mcs_id]");
+ goto end;
+ }
}
cJSON *preempt_control_info = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "preemptControlInfo");
OpenAPI_preemption_control_information_e preempt_control_infoVariable;
- if (preempt_control_info) {
- if (!cJSON_IsString(preempt_control_info)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [preempt_control_info]");
- goto end;
- }
- preempt_control_infoVariable = OpenAPI_preemption_control_information_FromString(preempt_control_info->valuestring);
+ if (preempt_control_info) {
+ if (!cJSON_IsString(preempt_control_info)) {
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [preempt_control_info]");
+ goto end;
+ }
+ preempt_control_infoVariable = OpenAPI_preemption_control_information_FromString(preempt_control_info->valuestring);
}
cJSON *res_prio = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "resPrio");
OpenAPI_reserv_priority_e res_prioVariable;
- if (res_prio) {
- if (!cJSON_IsString(res_prio)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [res_prio]");
- goto end;
- }
- res_prioVariable = OpenAPI_reserv_priority_FromString(res_prio->valuestring);
+ if (res_prio) {
+ if (!cJSON_IsString(res_prio)) {
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [res_prio]");
+ goto end;
+ }
+ res_prioVariable = OpenAPI_reserv_priority_FromString(res_prio->valuestring);
}
cJSON *serv_inf_status = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "servInfStatus");
OpenAPI_service_info_status_e serv_inf_statusVariable;
- if (serv_inf_status) {
- if (!cJSON_IsString(serv_inf_status)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [serv_inf_status]");
- goto end;
- }
- serv_inf_statusVariable = OpenAPI_service_info_status_FromString(serv_inf_status->valuestring);
+ if (serv_inf_status) {
+ if (!cJSON_IsString(serv_inf_status)) {
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [serv_inf_status]");
+ goto end;
+ }
+ serv_inf_statusVariable = OpenAPI_service_info_status_FromString(serv_inf_status->valuestring);
}
cJSON *notif_uri = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "notifUri");
@@ -568,7 +584,7 @@ OpenAPI_app_session_context_req_data_t *OpenAPI_app_session_context_req_data_par
goto end;
}
-
+
if (!cJSON_IsString(notif_uri)) {
ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [notif_uri]");
goto end;
@@ -576,56 +592,56 @@ OpenAPI_app_session_context_req_data_t *OpenAPI_app_session_context_req_data_par
cJSON *serv_urn = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "servUrn");
- if (serv_urn) {
- if (!cJSON_IsString(serv_urn)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [serv_urn]");
- goto end;
- }
+ if (serv_urn) {
+ if (!cJSON_IsString(serv_urn)) {
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [serv_urn]");
+ goto end;
+ }
}
cJSON *slice_info = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "sliceInfo");
OpenAPI_snssai_t *slice_info_local_nonprim = NULL;
- if (slice_info) {
- slice_info_local_nonprim = OpenAPI_snssai_parseFromJSON(slice_info);
+ if (slice_info) {
+ slice_info_local_nonprim = OpenAPI_snssai_parseFromJSON(slice_info);
}
cJSON *spon_id = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "sponId");
- if (spon_id) {
- if (!cJSON_IsString(spon_id)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [spon_id]");
- goto end;
- }
+ if (spon_id) {
+ if (!cJSON_IsString(spon_id)) {
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [spon_id]");
+ goto end;
+ }
}
cJSON *spon_status = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "sponStatus");
OpenAPI_sponsoring_status_e spon_statusVariable;
- if (spon_status) {
- if (!cJSON_IsString(spon_status)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [spon_status]");
- goto end;
- }
- spon_statusVariable = OpenAPI_sponsoring_status_FromString(spon_status->valuestring);
+ if (spon_status) {
+ if (!cJSON_IsString(spon_status)) {
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [spon_status]");
+ goto end;
+ }
+ spon_statusVariable = OpenAPI_sponsoring_status_FromString(spon_status->valuestring);
}
cJSON *supi = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "supi");
- if (supi) {
- if (!cJSON_IsString(supi)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [supi]");
- goto end;
- }
+ if (supi) {
+ if (!cJSON_IsString(supi)) {
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [supi]");
+ goto end;
+ }
}
cJSON *gpsi = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "gpsi");
- if (gpsi) {
- if (!cJSON_IsString(gpsi)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [gpsi]");
- goto end;
- }
+ if (gpsi) {
+ if (!cJSON_IsString(gpsi)) {
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [gpsi]");
+ goto end;
+ }
}
cJSON *supp_feat = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "suppFeat");
@@ -634,7 +650,7 @@ OpenAPI_app_session_context_req_data_t *OpenAPI_app_session_context_req_data_par
goto end;
}
-
+
if (!cJSON_IsString(supp_feat)) {
ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [supp_feat]");
goto end;
@@ -642,59 +658,66 @@ OpenAPI_app_session_context_req_data_t *OpenAPI_app_session_context_req_data_par
cJSON *ue_ipv4 = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "ueIpv4");
- if (ue_ipv4) {
- if (!cJSON_IsString(ue_ipv4)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [ue_ipv4]");
- goto end;
- }
+ if (ue_ipv4) {
+ if (!cJSON_IsString(ue_ipv4)) {
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [ue_ipv4]");
+ goto end;
+ }
}
cJSON *ue_ipv6 = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "ueIpv6");
- if (ue_ipv6) {
- if (!cJSON_IsString(ue_ipv6)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [ue_ipv6]");
- goto end;
- }
+ if (ue_ipv6) {
+ if (!cJSON_IsString(ue_ipv6)) {
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [ue_ipv6]");
+ goto end;
+ }
}
cJSON *ue_mac = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "ueMac");
- if (ue_mac) {
- if (!cJSON_IsString(ue_mac)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [ue_mac]");
- goto end;
- }
+ if (ue_mac) {
+ if (!cJSON_IsString(ue_mac)) {
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [ue_mac]");
+ goto end;
+ }
+ }
+
+ cJSON *tsn_bridge_man_cont = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "tsnBridgeManCont");
+
+ OpenAPI_bridge_management_container_t *tsn_bridge_man_cont_local_nonprim = NULL;
+ if (tsn_bridge_man_cont) {
+ tsn_bridge_man_cont_local_nonprim = OpenAPI_bridge_management_container_parseFromJSON(tsn_bridge_man_cont);
}
cJSON *tsn_port_man_cont_dstt = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "tsnPortManContDstt");
OpenAPI_port_management_container_t *tsn_port_man_cont_dstt_local_nonprim = NULL;
- if (tsn_port_man_cont_dstt) {
- tsn_port_man_cont_dstt_local_nonprim = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_dstt);
+ if (tsn_port_man_cont_dstt) {
+ tsn_port_man_cont_dstt_local_nonprim = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_dstt);
}
cJSON *tsn_port_man_cont_nwtts = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "tsnPortManContNwtts");
OpenAPI_list_t *tsn_port_man_cont_nwttsList;
- if (tsn_port_man_cont_nwtts) {
- cJSON *tsn_port_man_cont_nwtts_local_nonprimitive;
- if (!cJSON_IsArray(tsn_port_man_cont_nwtts)) {
+ if (tsn_port_man_cont_nwtts) {
+ cJSON *tsn_port_man_cont_nwtts_local_nonprimitive;
+ if (!cJSON_IsArray(tsn_port_man_cont_nwtts)){
+ ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [tsn_port_man_cont_nwtts]");
+ goto end;
+ }
+
+ tsn_port_man_cont_nwttsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(tsn_port_man_cont_nwtts_local_nonprimitive, tsn_port_man_cont_nwtts ) {
+ if (!cJSON_IsObject(tsn_port_man_cont_nwtts_local_nonprimitive)) {
ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [tsn_port_man_cont_nwtts]");
goto end;
}
+ OpenAPI_port_management_container_t *tsn_port_man_cont_nwttsItem = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_nwtts_local_nonprimitive);
- tsn_port_man_cont_nwttsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(tsn_port_man_cont_nwtts_local_nonprimitive, tsn_port_man_cont_nwtts ) {
- if (!cJSON_IsObject(tsn_port_man_cont_nwtts_local_nonprimitive)) {
- ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [tsn_port_man_cont_nwtts]");
- goto end;
- }
- OpenAPI_port_management_container_t *tsn_port_man_cont_nwttsItem = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_nwtts_local_nonprimitive);
-
- OpenAPI_list_add(tsn_port_man_cont_nwttsList, tsn_port_man_cont_nwttsItem);
- }
+ OpenAPI_list_add(tsn_port_man_cont_nwttsList, tsn_port_man_cont_nwttsItem);
+ }
}
app_session_context_req_data_local_var = OpenAPI_app_session_context_req_data_create (
@@ -726,9 +749,10 @@ OpenAPI_app_session_context_req_data_t *OpenAPI_app_session_context_req_data_par
ue_ipv4 ? ogs_strdup_or_assert(ue_ipv4->valuestring) : NULL,
ue_ipv6 ? ogs_strdup_or_assert(ue_ipv6->valuestring) : NULL,
ue_mac ? ogs_strdup_or_assert(ue_mac->valuestring) : NULL,
+ tsn_bridge_man_cont ? tsn_bridge_man_cont_local_nonprim : NULL,
tsn_port_man_cont_dstt ? tsn_port_man_cont_dstt_local_nonprim : NULL,
tsn_port_man_cont_nwtts ? tsn_port_man_cont_nwttsList : NULL
- );
+ );
return app_session_context_req_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/app_session_context_req_data.h b/lib/sbi/openapi/model/app_session_context_req_data.h
index 054888f02..878653eef 100644
--- a/lib/sbi/openapi/model/app_session_context_req_data.h
+++ b/lib/sbi/openapi/model/app_session_context_req_data.h
@@ -14,6 +14,7 @@
#include "../include/binary.h"
#include "af_requested_data.h"
#include "af_routing_requirement.h"
+#include "bridge_management_container.h"
#include "events_subsc_req_data.h"
#include "media_component.h"
#include "port_management_container.h"
@@ -57,6 +58,7 @@ typedef struct OpenAPI_app_session_context_req_data_s {
char *ue_ipv4;
char *ue_ipv6;
char *ue_mac;
+ struct OpenAPI_bridge_management_container_s *tsn_bridge_man_cont;
struct OpenAPI_port_management_container_s *tsn_port_man_cont_dstt;
OpenAPI_list_t *tsn_port_man_cont_nwtts;
} OpenAPI_app_session_context_req_data_t;
@@ -90,9 +92,10 @@ OpenAPI_app_session_context_req_data_t *OpenAPI_app_session_context_req_data_cre
char *ue_ipv4,
char *ue_ipv6,
char *ue_mac,
+ OpenAPI_bridge_management_container_t *tsn_bridge_man_cont,
OpenAPI_port_management_container_t *tsn_port_man_cont_dstt,
OpenAPI_list_t *tsn_port_man_cont_nwtts
- );
+);
void OpenAPI_app_session_context_req_data_free(OpenAPI_app_session_context_req_data_t *app_session_context_req_data);
OpenAPI_app_session_context_req_data_t *OpenAPI_app_session_context_req_data_parseFromJSON(cJSON *app_session_context_req_dataJSON);
cJSON *OpenAPI_app_session_context_req_data_convertToJSON(OpenAPI_app_session_context_req_data_t *app_session_context_req_data);
diff --git a/lib/sbi/openapi/model/app_session_context_resp_data.c b/lib/sbi/openapi/model/app_session_context_resp_data.c
index fd14abe5d..1bcc7c202 100644
--- a/lib/sbi/openapi/model/app_session_context_resp_data.c
+++ b/lib/sbi/openapi/model/app_session_context_resp_data.c
@@ -8,7 +8,7 @@ OpenAPI_app_session_context_resp_data_t *OpenAPI_app_session_context_resp_data_c
OpenAPI_serv_auth_info_e serv_auth_info,
OpenAPI_list_t *ue_ids,
char *supp_feat
- )
+)
{
OpenAPI_app_session_context_resp_data_t *app_session_context_resp_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_app_session_context_resp_data_t));
if (!app_session_context_resp_data_local_var) {
@@ -46,37 +46,37 @@ cJSON *OpenAPI_app_session_context_resp_data_convertToJSON(OpenAPI_app_session_c
item = cJSON_CreateObject();
if (app_session_context_resp_data->serv_auth_info) {
- if (cJSON_AddStringToObject(item, "servAuthInfo", OpenAPI_serv_auth_info_ToString(app_session_context_resp_data->serv_auth_info)) == NULL) {
- ogs_error("OpenAPI_app_session_context_resp_data_convertToJSON() failed [serv_auth_info]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "servAuthInfo", OpenAPI_serv_auth_info_ToString(app_session_context_resp_data->serv_auth_info)) == NULL) {
+ ogs_error("OpenAPI_app_session_context_resp_data_convertToJSON() failed [serv_auth_info]");
+ goto end;
+ }
}
if (app_session_context_resp_data->ue_ids) {
- cJSON *ue_idsList = cJSON_AddArrayToObject(item, "ueIds");
- if (ue_idsList == NULL) {
- ogs_error("OpenAPI_app_session_context_resp_data_convertToJSON() failed [ue_ids]");
- goto end;
- }
+ cJSON *ue_idsList = cJSON_AddArrayToObject(item, "ueIds");
+ if (ue_idsList == NULL) {
+ ogs_error("OpenAPI_app_session_context_resp_data_convertToJSON() failed [ue_ids]");
+ goto end;
+ }
- OpenAPI_lnode_t *ue_ids_node;
- if (app_session_context_resp_data->ue_ids) {
- OpenAPI_list_for_each(app_session_context_resp_data->ue_ids, ue_ids_node) {
- cJSON *itemLocal = OpenAPI_ue_identity_info_convertToJSON(ue_ids_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_app_session_context_resp_data_convertToJSON() failed [ue_ids]");
- goto end;
- }
- cJSON_AddItemToArray(ue_idsList, itemLocal);
+ OpenAPI_lnode_t *ue_ids_node;
+ if (app_session_context_resp_data->ue_ids) {
+ OpenAPI_list_for_each(app_session_context_resp_data->ue_ids, ue_ids_node) {
+ cJSON *itemLocal = OpenAPI_ue_identity_info_convertToJSON(ue_ids_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_app_session_context_resp_data_convertToJSON() failed [ue_ids]");
+ goto end;
}
+ cJSON_AddItemToArray(ue_idsList, itemLocal);
}
}
+ }
if (app_session_context_resp_data->supp_feat) {
- if (cJSON_AddStringToObject(item, "suppFeat", app_session_context_resp_data->supp_feat) == NULL) {
- ogs_error("OpenAPI_app_session_context_resp_data_convertToJSON() failed [supp_feat]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "suppFeat", app_session_context_resp_data->supp_feat) == NULL) {
+ ogs_error("OpenAPI_app_session_context_resp_data_convertToJSON() failed [supp_feat]");
+ goto end;
+ }
}
end:
@@ -89,51 +89,51 @@ OpenAPI_app_session_context_resp_data_t *OpenAPI_app_session_context_resp_data_p
cJSON *serv_auth_info = cJSON_GetObjectItemCaseSensitive(app_session_context_resp_dataJSON, "servAuthInfo");
OpenAPI_serv_auth_info_e serv_auth_infoVariable;
- if (serv_auth_info) {
- if (!cJSON_IsString(serv_auth_info)) {
- ogs_error("OpenAPI_app_session_context_resp_data_parseFromJSON() failed [serv_auth_info]");
- goto end;
- }
- serv_auth_infoVariable = OpenAPI_serv_auth_info_FromString(serv_auth_info->valuestring);
+ if (serv_auth_info) {
+ if (!cJSON_IsString(serv_auth_info)) {
+ ogs_error("OpenAPI_app_session_context_resp_data_parseFromJSON() failed [serv_auth_info]");
+ goto end;
+ }
+ serv_auth_infoVariable = OpenAPI_serv_auth_info_FromString(serv_auth_info->valuestring);
}
cJSON *ue_ids = cJSON_GetObjectItemCaseSensitive(app_session_context_resp_dataJSON, "ueIds");
OpenAPI_list_t *ue_idsList;
- if (ue_ids) {
- cJSON *ue_ids_local_nonprimitive;
- if (!cJSON_IsArray(ue_ids)) {
+ if (ue_ids) {
+ cJSON *ue_ids_local_nonprimitive;
+ if (!cJSON_IsArray(ue_ids)){
+ ogs_error("OpenAPI_app_session_context_resp_data_parseFromJSON() failed [ue_ids]");
+ goto end;
+ }
+
+ ue_idsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(ue_ids_local_nonprimitive, ue_ids ) {
+ if (!cJSON_IsObject(ue_ids_local_nonprimitive)) {
ogs_error("OpenAPI_app_session_context_resp_data_parseFromJSON() failed [ue_ids]");
goto end;
}
+ OpenAPI_ue_identity_info_t *ue_idsItem = OpenAPI_ue_identity_info_parseFromJSON(ue_ids_local_nonprimitive);
- ue_idsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(ue_ids_local_nonprimitive, ue_ids ) {
- if (!cJSON_IsObject(ue_ids_local_nonprimitive)) {
- ogs_error("OpenAPI_app_session_context_resp_data_parseFromJSON() failed [ue_ids]");
- goto end;
- }
- OpenAPI_ue_identity_info_t *ue_idsItem = OpenAPI_ue_identity_info_parseFromJSON(ue_ids_local_nonprimitive);
-
- OpenAPI_list_add(ue_idsList, ue_idsItem);
- }
+ OpenAPI_list_add(ue_idsList, ue_idsItem);
+ }
}
cJSON *supp_feat = cJSON_GetObjectItemCaseSensitive(app_session_context_resp_dataJSON, "suppFeat");
- if (supp_feat) {
- if (!cJSON_IsString(supp_feat)) {
- ogs_error("OpenAPI_app_session_context_resp_data_parseFromJSON() failed [supp_feat]");
- goto end;
- }
+ if (supp_feat) {
+ if (!cJSON_IsString(supp_feat)) {
+ ogs_error("OpenAPI_app_session_context_resp_data_parseFromJSON() failed [supp_feat]");
+ goto end;
+ }
}
app_session_context_resp_data_local_var = OpenAPI_app_session_context_resp_data_create (
serv_auth_info ? serv_auth_infoVariable : 0,
ue_ids ? ue_idsList : NULL,
supp_feat ? ogs_strdup_or_assert(supp_feat->valuestring) : NULL
- );
+ );
return app_session_context_resp_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/app_session_context_resp_data.h b/lib/sbi/openapi/model/app_session_context_resp_data.h
index 377a43fb5..30c4b4835 100644
--- a/lib/sbi/openapi/model/app_session_context_resp_data.h
+++ b/lib/sbi/openapi/model/app_session_context_resp_data.h
@@ -30,7 +30,7 @@ OpenAPI_app_session_context_resp_data_t *OpenAPI_app_session_context_resp_data_c
OpenAPI_serv_auth_info_e serv_auth_info,
OpenAPI_list_t *ue_ids,
char *supp_feat
- );
+);
void OpenAPI_app_session_context_resp_data_free(OpenAPI_app_session_context_resp_data_t *app_session_context_resp_data);
OpenAPI_app_session_context_resp_data_t *OpenAPI_app_session_context_resp_data_parseFromJSON(cJSON *app_session_context_resp_dataJSON);
cJSON *OpenAPI_app_session_context_resp_data_convertToJSON(OpenAPI_app_session_context_resp_data_t *app_session_context_resp_data);
diff --git a/lib/sbi/openapi/model/app_session_context_update_data.c b/lib/sbi/openapi/model/app_session_context_update_data.c
index 80d7086b9..72687c6dd 100644
--- a/lib/sbi/openapi/model/app_session_context_update_data.c
+++ b/lib/sbi/openapi/model/app_session_context_update_data.c
@@ -21,9 +21,10 @@ OpenAPI_app_session_context_update_data_t *OpenAPI_app_session_context_update_da
OpenAPI_sip_forking_indication_e sip_fork_ind,
char *spon_id,
OpenAPI_sponsoring_status_e spon_status,
+ OpenAPI_bridge_management_container_t *tsn_bridge_man_cont,
OpenAPI_port_management_container_t *tsn_port_man_cont_dstt,
OpenAPI_list_t *tsn_port_man_cont_nwtts
- )
+)
{
OpenAPI_app_session_context_update_data_t *app_session_context_update_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_app_session_context_update_data_t));
if (!app_session_context_update_data_local_var) {
@@ -45,6 +46,7 @@ OpenAPI_app_session_context_update_data_t *OpenAPI_app_session_context_update_da
app_session_context_update_data_local_var->sip_fork_ind = sip_fork_ind;
app_session_context_update_data_local_var->spon_id = spon_id;
app_session_context_update_data_local_var->spon_status = spon_status;
+ app_session_context_update_data_local_var->tsn_bridge_man_cont = tsn_bridge_man_cont;
app_session_context_update_data_local_var->tsn_port_man_cont_dstt = tsn_port_man_cont_dstt;
app_session_context_update_data_local_var->tsn_port_man_cont_nwtts = tsn_port_man_cont_nwtts;
@@ -74,6 +76,7 @@ void OpenAPI_app_session_context_update_data_free(OpenAPI_app_session_context_up
ogs_free(app_session_context_update_data->mcs_id);
OpenAPI_preemption_control_information_rm_free(app_session_context_update_data->preempt_control_info);
ogs_free(app_session_context_update_data->spon_id);
+ OpenAPI_bridge_management_container_free(app_session_context_update_data->tsn_bridge_man_cont);
OpenAPI_port_management_container_free(app_session_context_update_data->tsn_port_man_cont_dstt);
OpenAPI_list_for_each(app_session_context_update_data->tsn_port_man_cont_nwtts, node) {
OpenAPI_port_management_container_free(node->data);
@@ -93,181 +96,194 @@ cJSON *OpenAPI_app_session_context_update_data_convertToJSON(OpenAPI_app_session
item = cJSON_CreateObject();
if (app_session_context_update_data->af_app_id) {
- if (cJSON_AddStringToObject(item, "afAppId", app_session_context_update_data->af_app_id) == NULL) {
- ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [af_app_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "afAppId", app_session_context_update_data->af_app_id) == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [af_app_id]");
+ goto end;
+ }
}
if (app_session_context_update_data->af_rout_req) {
- cJSON *af_rout_req_local_JSON = OpenAPI_af_routing_requirement_rm_convertToJSON(app_session_context_update_data->af_rout_req);
- if (af_rout_req_local_JSON == NULL) {
- ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [af_rout_req]");
- goto end;
- }
- cJSON_AddItemToObject(item, "afRoutReq", af_rout_req_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [af_rout_req]");
- goto end;
- }
+ cJSON *af_rout_req_local_JSON = OpenAPI_af_routing_requirement_rm_convertToJSON(app_session_context_update_data->af_rout_req);
+ if (af_rout_req_local_JSON == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [af_rout_req]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "afRoutReq", af_rout_req_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [af_rout_req]");
+ goto end;
+ }
}
if (app_session_context_update_data->asp_id) {
- if (cJSON_AddStringToObject(item, "aspId", app_session_context_update_data->asp_id) == NULL) {
- ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [asp_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "aspId", app_session_context_update_data->asp_id) == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [asp_id]");
+ goto end;
+ }
}
if (app_session_context_update_data->bdt_ref_id) {
- if (cJSON_AddStringToObject(item, "bdtRefId", app_session_context_update_data->bdt_ref_id) == NULL) {
- ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [bdt_ref_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "bdtRefId", app_session_context_update_data->bdt_ref_id) == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [bdt_ref_id]");
+ goto end;
+ }
}
if (app_session_context_update_data->ev_subsc) {
- cJSON *ev_subsc_local_JSON = OpenAPI_events_subsc_req_data_rm_convertToJSON(app_session_context_update_data->ev_subsc);
- if (ev_subsc_local_JSON == NULL) {
- ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [ev_subsc]");
- goto end;
- }
- cJSON_AddItemToObject(item, "evSubsc", ev_subsc_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [ev_subsc]");
- goto end;
- }
+ cJSON *ev_subsc_local_JSON = OpenAPI_events_subsc_req_data_rm_convertToJSON(app_session_context_update_data->ev_subsc);
+ if (ev_subsc_local_JSON == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [ev_subsc]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "evSubsc", ev_subsc_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [ev_subsc]");
+ goto end;
+ }
}
if (app_session_context_update_data->mcptt_id) {
- if (cJSON_AddStringToObject(item, "mcpttId", app_session_context_update_data->mcptt_id) == NULL) {
- ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [mcptt_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "mcpttId", app_session_context_update_data->mcptt_id) == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [mcptt_id]");
+ goto end;
+ }
}
if (app_session_context_update_data->mc_video_id) {
- if (cJSON_AddStringToObject(item, "mcVideoId", app_session_context_update_data->mc_video_id) == NULL) {
- ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [mc_video_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "mcVideoId", app_session_context_update_data->mc_video_id) == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [mc_video_id]");
+ goto end;
+ }
}
if (app_session_context_update_data->med_components) {
- cJSON *med_components = cJSON_AddObjectToObject(item, "medComponents");
- if (med_components == NULL) {
+ cJSON *med_components = cJSON_AddObjectToObject(item, "medComponents");
+ if (med_components == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [med_components]");
+ goto end;
+ }
+ cJSON *localMapObject = med_components;
+ OpenAPI_lnode_t *med_components_node;
+ if (app_session_context_update_data->med_components) {
+ OpenAPI_list_for_each(app_session_context_update_data->med_components, med_components_node) {
+ OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)med_components_node->data;
+ cJSON *itemLocal = OpenAPI_media_component_rm_convertToJSON(localKeyValue->value);
+ if (itemLocal == NULL) {
ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [med_components]");
goto end;
}
- cJSON *localMapObject = med_components;
- OpenAPI_lnode_t *med_components_node;
- if (app_session_context_update_data->med_components) {
- OpenAPI_list_for_each(app_session_context_update_data->med_components, med_components_node) {
- OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)med_components_node->data;
- cJSON *itemLocal = OpenAPI_media_component_rm_convertToJSON(localKeyValue->value);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [med_components]");
- goto end;
- }
- cJSON_AddItemToObject(med_components, localKeyValue->key, itemLocal);
+ cJSON_AddItemToObject(med_components, localKeyValue->key, itemLocal);
}
}
}
if (app_session_context_update_data->mps_id) {
- if (cJSON_AddStringToObject(item, "mpsId", app_session_context_update_data->mps_id) == NULL) {
- ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [mps_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "mpsId", app_session_context_update_data->mps_id) == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [mps_id]");
+ goto end;
+ }
}
if (app_session_context_update_data->mcs_id) {
- if (cJSON_AddStringToObject(item, "mcsId", app_session_context_update_data->mcs_id) == NULL) {
- ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [mcs_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "mcsId", app_session_context_update_data->mcs_id) == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [mcs_id]");
+ goto end;
+ }
}
if (app_session_context_update_data->preempt_control_info) {
- cJSON *preempt_control_info_local_JSON = OpenAPI_preemption_control_information_rm_convertToJSON(app_session_context_update_data->preempt_control_info);
- if (preempt_control_info_local_JSON == NULL) {
- ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [preempt_control_info]");
- goto end;
- }
- cJSON_AddItemToObject(item, "preemptControlInfo", preempt_control_info_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [preempt_control_info]");
- goto end;
- }
+ cJSON *preempt_control_info_local_JSON = OpenAPI_preemption_control_information_rm_convertToJSON(app_session_context_update_data->preempt_control_info);
+ if (preempt_control_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [preempt_control_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "preemptControlInfo", preempt_control_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [preempt_control_info]");
+ goto end;
+ }
}
if (app_session_context_update_data->res_prio) {
- if (cJSON_AddStringToObject(item, "resPrio", OpenAPI_reserv_priority_ToString(app_session_context_update_data->res_prio)) == NULL) {
- ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [res_prio]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "resPrio", OpenAPI_reserv_priority_ToString(app_session_context_update_data->res_prio)) == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [res_prio]");
+ goto end;
+ }
}
if (app_session_context_update_data->serv_inf_status) {
- if (cJSON_AddStringToObject(item, "servInfStatus", OpenAPI_service_info_status_ToString(app_session_context_update_data->serv_inf_status)) == NULL) {
- ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [serv_inf_status]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "servInfStatus", OpenAPI_service_info_status_ToString(app_session_context_update_data->serv_inf_status)) == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [serv_inf_status]");
+ goto end;
+ }
}
if (app_session_context_update_data->sip_fork_ind) {
- if (cJSON_AddStringToObject(item, "sipForkInd", OpenAPI_sip_forking_indication_ToString(app_session_context_update_data->sip_fork_ind)) == NULL) {
- ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [sip_fork_ind]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "sipForkInd", OpenAPI_sip_forking_indication_ToString(app_session_context_update_data->sip_fork_ind)) == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [sip_fork_ind]");
+ goto end;
+ }
}
if (app_session_context_update_data->spon_id) {
- if (cJSON_AddStringToObject(item, "sponId", app_session_context_update_data->spon_id) == NULL) {
- ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [spon_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "sponId", app_session_context_update_data->spon_id) == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [spon_id]");
+ goto end;
+ }
}
if (app_session_context_update_data->spon_status) {
- if (cJSON_AddStringToObject(item, "sponStatus", OpenAPI_sponsoring_status_ToString(app_session_context_update_data->spon_status)) == NULL) {
- ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [spon_status]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "sponStatus", OpenAPI_sponsoring_status_ToString(app_session_context_update_data->spon_status)) == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [spon_status]");
+ goto end;
+ }
+ }
+
+ if (app_session_context_update_data->tsn_bridge_man_cont) {
+ cJSON *tsn_bridge_man_cont_local_JSON = OpenAPI_bridge_management_container_convertToJSON(app_session_context_update_data->tsn_bridge_man_cont);
+ if (tsn_bridge_man_cont_local_JSON == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [tsn_bridge_man_cont]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "tsnBridgeManCont", tsn_bridge_man_cont_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [tsn_bridge_man_cont]");
+ goto end;
+ }
}
if (app_session_context_update_data->tsn_port_man_cont_dstt) {
- cJSON *tsn_port_man_cont_dstt_local_JSON = OpenAPI_port_management_container_convertToJSON(app_session_context_update_data->tsn_port_man_cont_dstt);
- if (tsn_port_man_cont_dstt_local_JSON == NULL) {
- ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [tsn_port_man_cont_dstt]");
- goto end;
- }
- cJSON_AddItemToObject(item, "tsnPortManContDstt", tsn_port_man_cont_dstt_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [tsn_port_man_cont_dstt]");
- goto end;
- }
+ cJSON *tsn_port_man_cont_dstt_local_JSON = OpenAPI_port_management_container_convertToJSON(app_session_context_update_data->tsn_port_man_cont_dstt);
+ if (tsn_port_man_cont_dstt_local_JSON == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [tsn_port_man_cont_dstt]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "tsnPortManContDstt", tsn_port_man_cont_dstt_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [tsn_port_man_cont_dstt]");
+ goto end;
+ }
}
if (app_session_context_update_data->tsn_port_man_cont_nwtts) {
- cJSON *tsn_port_man_cont_nwttsList = cJSON_AddArrayToObject(item, "tsnPortManContNwtts");
- if (tsn_port_man_cont_nwttsList == NULL) {
- ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [tsn_port_man_cont_nwtts]");
- goto end;
- }
+ cJSON *tsn_port_man_cont_nwttsList = cJSON_AddArrayToObject(item, "tsnPortManContNwtts");
+ if (tsn_port_man_cont_nwttsList == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [tsn_port_man_cont_nwtts]");
+ goto end;
+ }
- OpenAPI_lnode_t *tsn_port_man_cont_nwtts_node;
- if (app_session_context_update_data->tsn_port_man_cont_nwtts) {
- OpenAPI_list_for_each(app_session_context_update_data->tsn_port_man_cont_nwtts, tsn_port_man_cont_nwtts_node) {
- cJSON *itemLocal = OpenAPI_port_management_container_convertToJSON(tsn_port_man_cont_nwtts_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [tsn_port_man_cont_nwtts]");
- goto end;
- }
- cJSON_AddItemToArray(tsn_port_man_cont_nwttsList, itemLocal);
+ OpenAPI_lnode_t *tsn_port_man_cont_nwtts_node;
+ if (app_session_context_update_data->tsn_port_man_cont_nwtts) {
+ OpenAPI_list_for_each(app_session_context_update_data->tsn_port_man_cont_nwtts, tsn_port_man_cont_nwtts_node) {
+ cJSON *itemLocal = OpenAPI_port_management_container_convertToJSON(tsn_port_man_cont_nwtts_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_convertToJSON() failed [tsn_port_man_cont_nwtts]");
+ goto end;
}
+ cJSON_AddItemToArray(tsn_port_man_cont_nwttsList, itemLocal);
}
}
+ }
end:
return item;
@@ -278,192 +294,199 @@ OpenAPI_app_session_context_update_data_t *OpenAPI_app_session_context_update_da
OpenAPI_app_session_context_update_data_t *app_session_context_update_data_local_var = NULL;
cJSON *af_app_id = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "afAppId");
- if (af_app_id) {
- if (!cJSON_IsString(af_app_id)) {
- ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [af_app_id]");
- goto end;
- }
+ if (af_app_id) {
+ if (!cJSON_IsString(af_app_id)) {
+ ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [af_app_id]");
+ goto end;
+ }
}
cJSON *af_rout_req = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "afRoutReq");
OpenAPI_af_routing_requirement_rm_t *af_rout_req_local_nonprim = NULL;
- if (af_rout_req) {
- af_rout_req_local_nonprim = OpenAPI_af_routing_requirement_rm_parseFromJSON(af_rout_req);
+ if (af_rout_req) {
+ af_rout_req_local_nonprim = OpenAPI_af_routing_requirement_rm_parseFromJSON(af_rout_req);
}
cJSON *asp_id = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "aspId");
- if (asp_id) {
- if (!cJSON_IsString(asp_id)) {
- ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [asp_id]");
- goto end;
- }
+ if (asp_id) {
+ if (!cJSON_IsString(asp_id)) {
+ ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [asp_id]");
+ goto end;
+ }
}
cJSON *bdt_ref_id = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "bdtRefId");
- if (bdt_ref_id) {
- if (!cJSON_IsString(bdt_ref_id)) {
- ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [bdt_ref_id]");
- goto end;
- }
+ if (bdt_ref_id) {
+ if (!cJSON_IsString(bdt_ref_id)) {
+ ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [bdt_ref_id]");
+ goto end;
+ }
}
cJSON *ev_subsc = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "evSubsc");
OpenAPI_events_subsc_req_data_rm_t *ev_subsc_local_nonprim = NULL;
- if (ev_subsc) {
- ev_subsc_local_nonprim = OpenAPI_events_subsc_req_data_rm_parseFromJSON(ev_subsc);
+ if (ev_subsc) {
+ ev_subsc_local_nonprim = OpenAPI_events_subsc_req_data_rm_parseFromJSON(ev_subsc);
}
cJSON *mcptt_id = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "mcpttId");
- if (mcptt_id) {
- if (!cJSON_IsString(mcptt_id)) {
- ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [mcptt_id]");
- goto end;
- }
+ if (mcptt_id) {
+ if (!cJSON_IsString(mcptt_id)) {
+ ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [mcptt_id]");
+ goto end;
+ }
}
cJSON *mc_video_id = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "mcVideoId");
- if (mc_video_id) {
- if (!cJSON_IsString(mc_video_id)) {
- ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [mc_video_id]");
- goto end;
- }
+ if (mc_video_id) {
+ if (!cJSON_IsString(mc_video_id)) {
+ ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [mc_video_id]");
+ goto end;
+ }
}
cJSON *med_components = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "medComponents");
OpenAPI_list_t *med_componentsList;
- if (med_components) {
- cJSON *med_components_local_map;
- if (!cJSON_IsObject(med_components)) {
+ if (med_components) {
+ cJSON *med_components_local_map;
+ if (!cJSON_IsObject(med_components)) {
+ ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [med_components]");
+ goto end;
+ }
+ med_componentsList = OpenAPI_list_create();
+ OpenAPI_map_t *localMapKeyPair = NULL;
+ cJSON_ArrayForEach(med_components_local_map, med_components) {
+ cJSON *localMapObject = med_components_local_map;
+ if (!cJSON_IsObject(med_components_local_map)) {
ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [med_components]");
goto end;
}
- med_componentsList = OpenAPI_list_create();
- OpenAPI_map_t *localMapKeyPair = NULL;
- cJSON_ArrayForEach(med_components_local_map, med_components) {
- cJSON *localMapObject = med_components_local_map;
- if (!cJSON_IsObject(med_components_local_map)) {
- ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [med_components]");
- goto end;
- }
- localMapKeyPair = OpenAPI_map_create(
- localMapObject->string, OpenAPI_media_component_rm_parseFromJSON(localMapObject));
- OpenAPI_list_add(med_componentsList, localMapKeyPair);
- }
+ localMapKeyPair = OpenAPI_map_create(
+ localMapObject->string, OpenAPI_media_component_rm_parseFromJSON(localMapObject));
+ OpenAPI_list_add(med_componentsList , localMapKeyPair);
+ }
}
cJSON *mps_id = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "mpsId");
- if (mps_id) {
- if (!cJSON_IsString(mps_id)) {
- ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [mps_id]");
- goto end;
- }
+ if (mps_id) {
+ if (!cJSON_IsString(mps_id)) {
+ ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [mps_id]");
+ goto end;
+ }
}
cJSON *mcs_id = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "mcsId");
- if (mcs_id) {
- if (!cJSON_IsString(mcs_id)) {
- ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [mcs_id]");
- goto end;
- }
+ if (mcs_id) {
+ if (!cJSON_IsString(mcs_id)) {
+ ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [mcs_id]");
+ goto end;
+ }
}
cJSON *preempt_control_info = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "preemptControlInfo");
OpenAPI_preemption_control_information_rm_t *preempt_control_info_local_nonprim = NULL;
- if (preempt_control_info) {
- preempt_control_info_local_nonprim = OpenAPI_preemption_control_information_rm_parseFromJSON(preempt_control_info);
+ if (preempt_control_info) {
+ preempt_control_info_local_nonprim = OpenAPI_preemption_control_information_rm_parseFromJSON(preempt_control_info);
}
cJSON *res_prio = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "resPrio");
OpenAPI_reserv_priority_e res_prioVariable;
- if (res_prio) {
- if (!cJSON_IsString(res_prio)) {
- ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [res_prio]");
- goto end;
- }
- res_prioVariable = OpenAPI_reserv_priority_FromString(res_prio->valuestring);
+ if (res_prio) {
+ if (!cJSON_IsString(res_prio)) {
+ ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [res_prio]");
+ goto end;
+ }
+ res_prioVariable = OpenAPI_reserv_priority_FromString(res_prio->valuestring);
}
cJSON *serv_inf_status = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "servInfStatus");
OpenAPI_service_info_status_e serv_inf_statusVariable;
- if (serv_inf_status) {
- if (!cJSON_IsString(serv_inf_status)) {
- ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [serv_inf_status]");
- goto end;
- }
- serv_inf_statusVariable = OpenAPI_service_info_status_FromString(serv_inf_status->valuestring);
+ if (serv_inf_status) {
+ if (!cJSON_IsString(serv_inf_status)) {
+ ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [serv_inf_status]");
+ goto end;
+ }
+ serv_inf_statusVariable = OpenAPI_service_info_status_FromString(serv_inf_status->valuestring);
}
cJSON *sip_fork_ind = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "sipForkInd");
OpenAPI_sip_forking_indication_e sip_fork_indVariable;
- if (sip_fork_ind) {
- if (!cJSON_IsString(sip_fork_ind)) {
- ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [sip_fork_ind]");
- goto end;
- }
- sip_fork_indVariable = OpenAPI_sip_forking_indication_FromString(sip_fork_ind->valuestring);
+ if (sip_fork_ind) {
+ if (!cJSON_IsString(sip_fork_ind)) {
+ ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [sip_fork_ind]");
+ goto end;
+ }
+ sip_fork_indVariable = OpenAPI_sip_forking_indication_FromString(sip_fork_ind->valuestring);
}
cJSON *spon_id = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "sponId");
- if (spon_id) {
- if (!cJSON_IsString(spon_id)) {
- ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [spon_id]");
- goto end;
- }
+ if (spon_id) {
+ if (!cJSON_IsString(spon_id)) {
+ ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [spon_id]");
+ goto end;
+ }
}
cJSON *spon_status = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "sponStatus");
OpenAPI_sponsoring_status_e spon_statusVariable;
- if (spon_status) {
- if (!cJSON_IsString(spon_status)) {
- ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [spon_status]");
- goto end;
- }
- spon_statusVariable = OpenAPI_sponsoring_status_FromString(spon_status->valuestring);
+ if (spon_status) {
+ if (!cJSON_IsString(spon_status)) {
+ ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [spon_status]");
+ goto end;
+ }
+ spon_statusVariable = OpenAPI_sponsoring_status_FromString(spon_status->valuestring);
+ }
+
+ cJSON *tsn_bridge_man_cont = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "tsnBridgeManCont");
+
+ OpenAPI_bridge_management_container_t *tsn_bridge_man_cont_local_nonprim = NULL;
+ if (tsn_bridge_man_cont) {
+ tsn_bridge_man_cont_local_nonprim = OpenAPI_bridge_management_container_parseFromJSON(tsn_bridge_man_cont);
}
cJSON *tsn_port_man_cont_dstt = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "tsnPortManContDstt");
OpenAPI_port_management_container_t *tsn_port_man_cont_dstt_local_nonprim = NULL;
- if (tsn_port_man_cont_dstt) {
- tsn_port_man_cont_dstt_local_nonprim = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_dstt);
+ if (tsn_port_man_cont_dstt) {
+ tsn_port_man_cont_dstt_local_nonprim = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_dstt);
}
cJSON *tsn_port_man_cont_nwtts = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "tsnPortManContNwtts");
OpenAPI_list_t *tsn_port_man_cont_nwttsList;
- if (tsn_port_man_cont_nwtts) {
- cJSON *tsn_port_man_cont_nwtts_local_nonprimitive;
- if (!cJSON_IsArray(tsn_port_man_cont_nwtts)) {
+ if (tsn_port_man_cont_nwtts) {
+ cJSON *tsn_port_man_cont_nwtts_local_nonprimitive;
+ if (!cJSON_IsArray(tsn_port_man_cont_nwtts)){
+ ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [tsn_port_man_cont_nwtts]");
+ goto end;
+ }
+
+ tsn_port_man_cont_nwttsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(tsn_port_man_cont_nwtts_local_nonprimitive, tsn_port_man_cont_nwtts ) {
+ if (!cJSON_IsObject(tsn_port_man_cont_nwtts_local_nonprimitive)) {
ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [tsn_port_man_cont_nwtts]");
goto end;
}
+ OpenAPI_port_management_container_t *tsn_port_man_cont_nwttsItem = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_nwtts_local_nonprimitive);
- tsn_port_man_cont_nwttsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(tsn_port_man_cont_nwtts_local_nonprimitive, tsn_port_man_cont_nwtts ) {
- if (!cJSON_IsObject(tsn_port_man_cont_nwtts_local_nonprimitive)) {
- ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON() failed [tsn_port_man_cont_nwtts]");
- goto end;
- }
- OpenAPI_port_management_container_t *tsn_port_man_cont_nwttsItem = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_nwtts_local_nonprimitive);
-
- OpenAPI_list_add(tsn_port_man_cont_nwttsList, tsn_port_man_cont_nwttsItem);
- }
+ OpenAPI_list_add(tsn_port_man_cont_nwttsList, tsn_port_man_cont_nwttsItem);
+ }
}
app_session_context_update_data_local_var = OpenAPI_app_session_context_update_data_create (
@@ -483,9 +506,10 @@ OpenAPI_app_session_context_update_data_t *OpenAPI_app_session_context_update_da
sip_fork_ind ? sip_fork_indVariable : 0,
spon_id ? ogs_strdup_or_assert(spon_id->valuestring) : NULL,
spon_status ? spon_statusVariable : 0,
+ tsn_bridge_man_cont ? tsn_bridge_man_cont_local_nonprim : NULL,
tsn_port_man_cont_dstt ? tsn_port_man_cont_dstt_local_nonprim : NULL,
tsn_port_man_cont_nwtts ? tsn_port_man_cont_nwttsList : NULL
- );
+ );
return app_session_context_update_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/app_session_context_update_data.h b/lib/sbi/openapi/model/app_session_context_update_data.h
index 4efa4005c..823407126 100644
--- a/lib/sbi/openapi/model/app_session_context_update_data.h
+++ b/lib/sbi/openapi/model/app_session_context_update_data.h
@@ -1,7 +1,7 @@
/*
* app_session_context_update_data.h
*
- * Identifies the modifications to an Individual Application Session Context and may include the modifications to the sub-resource Events Subscription.
+ * Identifies the modifications to the \"ascReqData\" property of an Individual Application Session Context which may include the modifications to the sub-resource Events Subscription.
*/
#ifndef _OpenAPI_app_session_context_update_data_H_
@@ -13,6 +13,7 @@
#include "../include/keyValuePair.h"
#include "../include/binary.h"
#include "af_routing_requirement_rm.h"
+#include "bridge_management_container.h"
#include "events_subsc_req_data_rm.h"
#include "media_component_rm.h"
#include "port_management_container.h"
@@ -44,6 +45,7 @@ typedef struct OpenAPI_app_session_context_update_data_s {
OpenAPI_sip_forking_indication_e sip_fork_ind;
char *spon_id;
OpenAPI_sponsoring_status_e spon_status;
+ struct OpenAPI_bridge_management_container_s *tsn_bridge_man_cont;
struct OpenAPI_port_management_container_s *tsn_port_man_cont_dstt;
OpenAPI_list_t *tsn_port_man_cont_nwtts;
} OpenAPI_app_session_context_update_data_t;
@@ -65,9 +67,10 @@ OpenAPI_app_session_context_update_data_t *OpenAPI_app_session_context_update_da
OpenAPI_sip_forking_indication_e sip_fork_ind,
char *spon_id,
OpenAPI_sponsoring_status_e spon_status,
+ OpenAPI_bridge_management_container_t *tsn_bridge_man_cont,
OpenAPI_port_management_container_t *tsn_port_man_cont_dstt,
OpenAPI_list_t *tsn_port_man_cont_nwtts
- );
+);
void OpenAPI_app_session_context_update_data_free(OpenAPI_app_session_context_update_data_t *app_session_context_update_data);
OpenAPI_app_session_context_update_data_t *OpenAPI_app_session_context_update_data_parseFromJSON(cJSON *app_session_context_update_dataJSON);
cJSON *OpenAPI_app_session_context_update_data_convertToJSON(OpenAPI_app_session_context_update_data_t *app_session_context_update_data);
diff --git a/lib/sbi/openapi/model/app_session_context_update_data_patch.c b/lib/sbi/openapi/model/app_session_context_update_data_patch.c
new file mode 100644
index 000000000..937e5836a
--- /dev/null
+++ b/lib/sbi/openapi/model/app_session_context_update_data_patch.c
@@ -0,0 +1,109 @@
+
+#include
+#include
+#include
+#include "app_session_context_update_data_patch.h"
+
+OpenAPI_app_session_context_update_data_patch_t *OpenAPI_app_session_context_update_data_patch_create(
+ OpenAPI_app_session_context_update_data_t *asc_req_data
+)
+{
+ OpenAPI_app_session_context_update_data_patch_t *app_session_context_update_data_patch_local_var = OpenAPI_malloc(sizeof(OpenAPI_app_session_context_update_data_patch_t));
+ if (!app_session_context_update_data_patch_local_var) {
+ return NULL;
+ }
+ app_session_context_update_data_patch_local_var->asc_req_data = asc_req_data;
+
+ return app_session_context_update_data_patch_local_var;
+}
+
+void OpenAPI_app_session_context_update_data_patch_free(OpenAPI_app_session_context_update_data_patch_t *app_session_context_update_data_patch)
+{
+ if (NULL == app_session_context_update_data_patch) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ OpenAPI_app_session_context_update_data_free(app_session_context_update_data_patch->asc_req_data);
+ ogs_free(app_session_context_update_data_patch);
+}
+
+cJSON *OpenAPI_app_session_context_update_data_patch_convertToJSON(OpenAPI_app_session_context_update_data_patch_t *app_session_context_update_data_patch)
+{
+ cJSON *item = NULL;
+
+ if (app_session_context_update_data_patch == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_patch_convertToJSON() failed [AppSessionContextUpdateDataPatch]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (app_session_context_update_data_patch->asc_req_data) {
+ cJSON *asc_req_data_local_JSON = OpenAPI_app_session_context_update_data_convertToJSON(app_session_context_update_data_patch->asc_req_data);
+ if (asc_req_data_local_JSON == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_patch_convertToJSON() failed [asc_req_data]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "ascReqData", asc_req_data_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_app_session_context_update_data_patch_convertToJSON() failed [asc_req_data]");
+ goto end;
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_app_session_context_update_data_patch_t *OpenAPI_app_session_context_update_data_patch_parseFromJSON(cJSON *app_session_context_update_data_patchJSON)
+{
+ OpenAPI_app_session_context_update_data_patch_t *app_session_context_update_data_patch_local_var = NULL;
+ cJSON *asc_req_data = cJSON_GetObjectItemCaseSensitive(app_session_context_update_data_patchJSON, "ascReqData");
+
+ OpenAPI_app_session_context_update_data_t *asc_req_data_local_nonprim = NULL;
+ if (asc_req_data) {
+ asc_req_data_local_nonprim = OpenAPI_app_session_context_update_data_parseFromJSON(asc_req_data);
+ }
+
+ app_session_context_update_data_patch_local_var = OpenAPI_app_session_context_update_data_patch_create (
+ asc_req_data ? asc_req_data_local_nonprim : NULL
+ );
+
+ return app_session_context_update_data_patch_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_app_session_context_update_data_patch_t *OpenAPI_app_session_context_update_data_patch_copy(OpenAPI_app_session_context_update_data_patch_t *dst, OpenAPI_app_session_context_update_data_patch_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_app_session_context_update_data_patch_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_app_session_context_update_data_patch_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_app_session_context_update_data_patch_free(dst);
+ dst = OpenAPI_app_session_context_update_data_patch_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/app_session_context_update_data_patch.h b/lib/sbi/openapi/model/app_session_context_update_data_patch.h
new file mode 100644
index 000000000..ab83151b5
--- /dev/null
+++ b/lib/sbi/openapi/model/app_session_context_update_data_patch.h
@@ -0,0 +1,39 @@
+/*
+ * app_session_context_update_data_patch.h
+ *
+ * Identifies the modifications to an Individual Application Session Context and/or the modifications to the sub-resource Events Subscription.
+ */
+
+#ifndef _OpenAPI_app_session_context_update_data_patch_H_
+#define _OpenAPI_app_session_context_update_data_patch_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+#include "app_session_context_update_data.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_app_session_context_update_data_patch_s OpenAPI_app_session_context_update_data_patch_t;
+typedef struct OpenAPI_app_session_context_update_data_patch_s {
+ struct OpenAPI_app_session_context_update_data_s *asc_req_data;
+} OpenAPI_app_session_context_update_data_patch_t;
+
+OpenAPI_app_session_context_update_data_patch_t *OpenAPI_app_session_context_update_data_patch_create(
+ OpenAPI_app_session_context_update_data_t *asc_req_data
+);
+void OpenAPI_app_session_context_update_data_patch_free(OpenAPI_app_session_context_update_data_patch_t *app_session_context_update_data_patch);
+OpenAPI_app_session_context_update_data_patch_t *OpenAPI_app_session_context_update_data_patch_parseFromJSON(cJSON *app_session_context_update_data_patchJSON);
+cJSON *OpenAPI_app_session_context_update_data_patch_convertToJSON(OpenAPI_app_session_context_update_data_patch_t *app_session_context_update_data_patch);
+OpenAPI_app_session_context_update_data_patch_t *OpenAPI_app_session_context_update_data_patch_copy(OpenAPI_app_session_context_update_data_patch_t *dst, OpenAPI_app_session_context_update_data_patch_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_app_session_context_update_data_patch_H_ */
+
diff --git a/lib/sbi/openapi/model/application_data_change_notif.c b/lib/sbi/openapi/model/application_data_change_notif.c
index 3173a672d..1cd1de85a 100644
--- a/lib/sbi/openapi/model/application_data_change_notif.c
+++ b/lib/sbi/openapi/model/application_data_change_notif.c
@@ -10,7 +10,7 @@ OpenAPI_application_data_change_notif_t *OpenAPI_application_data_change_notif_c
OpenAPI_bdt_policy_data_t *bdt_policy_data,
char *res_uri,
OpenAPI_service_parameter_data_t *ser_param_data
- )
+)
{
OpenAPI_application_data_change_notif_t *application_data_change_notif_local_var = OpenAPI_malloc(sizeof(OpenAPI_application_data_change_notif_t));
if (!application_data_change_notif_local_var) {
@@ -50,42 +50,42 @@ cJSON *OpenAPI_application_data_change_notif_convertToJSON(OpenAPI_application_d
item = cJSON_CreateObject();
if (application_data_change_notif->iptv_config_data) {
- cJSON *iptv_config_data_local_JSON = OpenAPI_iptv_config_data_convertToJSON(application_data_change_notif->iptv_config_data);
- if (iptv_config_data_local_JSON == NULL) {
- ogs_error("OpenAPI_application_data_change_notif_convertToJSON() failed [iptv_config_data]");
- goto end;
- }
- cJSON_AddItemToObject(item, "iptvConfigData", iptv_config_data_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_application_data_change_notif_convertToJSON() failed [iptv_config_data]");
- goto end;
- }
+ cJSON *iptv_config_data_local_JSON = OpenAPI_iptv_config_data_convertToJSON(application_data_change_notif->iptv_config_data);
+ if (iptv_config_data_local_JSON == NULL) {
+ ogs_error("OpenAPI_application_data_change_notif_convertToJSON() failed [iptv_config_data]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "iptvConfigData", iptv_config_data_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_application_data_change_notif_convertToJSON() failed [iptv_config_data]");
+ goto end;
+ }
}
if (application_data_change_notif->pfd_data) {
- cJSON *pfd_data_local_JSON = OpenAPI_pfd_change_notification_convertToJSON(application_data_change_notif->pfd_data);
- if (pfd_data_local_JSON == NULL) {
- ogs_error("OpenAPI_application_data_change_notif_convertToJSON() failed [pfd_data]");
- goto end;
- }
- cJSON_AddItemToObject(item, "pfdData", pfd_data_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_application_data_change_notif_convertToJSON() failed [pfd_data]");
- goto end;
- }
+ cJSON *pfd_data_local_JSON = OpenAPI_pfd_change_notification_convertToJSON(application_data_change_notif->pfd_data);
+ if (pfd_data_local_JSON == NULL) {
+ ogs_error("OpenAPI_application_data_change_notif_convertToJSON() failed [pfd_data]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "pfdData", pfd_data_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_application_data_change_notif_convertToJSON() failed [pfd_data]");
+ goto end;
+ }
}
if (application_data_change_notif->bdt_policy_data) {
- cJSON *bdt_policy_data_local_JSON = OpenAPI_bdt_policy_data_convertToJSON(application_data_change_notif->bdt_policy_data);
- if (bdt_policy_data_local_JSON == NULL) {
- ogs_error("OpenAPI_application_data_change_notif_convertToJSON() failed [bdt_policy_data]");
- goto end;
- }
- cJSON_AddItemToObject(item, "bdtPolicyData", bdt_policy_data_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_application_data_change_notif_convertToJSON() failed [bdt_policy_data]");
- goto end;
- }
+ cJSON *bdt_policy_data_local_JSON = OpenAPI_bdt_policy_data_convertToJSON(application_data_change_notif->bdt_policy_data);
+ if (bdt_policy_data_local_JSON == NULL) {
+ ogs_error("OpenAPI_application_data_change_notif_convertToJSON() failed [bdt_policy_data]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "bdtPolicyData", bdt_policy_data_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_application_data_change_notif_convertToJSON() failed [bdt_policy_data]");
+ goto end;
+ }
}
if (cJSON_AddStringToObject(item, "resUri", application_data_change_notif->res_uri) == NULL) {
@@ -94,16 +94,16 @@ cJSON *OpenAPI_application_data_change_notif_convertToJSON(OpenAPI_application_d
}
if (application_data_change_notif->ser_param_data) {
- cJSON *ser_param_data_local_JSON = OpenAPI_service_parameter_data_convertToJSON(application_data_change_notif->ser_param_data);
- if (ser_param_data_local_JSON == NULL) {
- ogs_error("OpenAPI_application_data_change_notif_convertToJSON() failed [ser_param_data]");
- goto end;
- }
- cJSON_AddItemToObject(item, "serParamData", ser_param_data_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_application_data_change_notif_convertToJSON() failed [ser_param_data]");
- goto end;
- }
+ cJSON *ser_param_data_local_JSON = OpenAPI_service_parameter_data_convertToJSON(application_data_change_notif->ser_param_data);
+ if (ser_param_data_local_JSON == NULL) {
+ ogs_error("OpenAPI_application_data_change_notif_convertToJSON() failed [ser_param_data]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "serParamData", ser_param_data_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_application_data_change_notif_convertToJSON() failed [ser_param_data]");
+ goto end;
+ }
}
end:
@@ -116,22 +116,22 @@ OpenAPI_application_data_change_notif_t *OpenAPI_application_data_change_notif_p
cJSON *iptv_config_data = cJSON_GetObjectItemCaseSensitive(application_data_change_notifJSON, "iptvConfigData");
OpenAPI_iptv_config_data_t *iptv_config_data_local_nonprim = NULL;
- if (iptv_config_data) {
- iptv_config_data_local_nonprim = OpenAPI_iptv_config_data_parseFromJSON(iptv_config_data);
+ if (iptv_config_data) {
+ iptv_config_data_local_nonprim = OpenAPI_iptv_config_data_parseFromJSON(iptv_config_data);
}
cJSON *pfd_data = cJSON_GetObjectItemCaseSensitive(application_data_change_notifJSON, "pfdData");
OpenAPI_pfd_change_notification_t *pfd_data_local_nonprim = NULL;
- if (pfd_data) {
- pfd_data_local_nonprim = OpenAPI_pfd_change_notification_parseFromJSON(pfd_data);
+ if (pfd_data) {
+ pfd_data_local_nonprim = OpenAPI_pfd_change_notification_parseFromJSON(pfd_data);
}
cJSON *bdt_policy_data = cJSON_GetObjectItemCaseSensitive(application_data_change_notifJSON, "bdtPolicyData");
OpenAPI_bdt_policy_data_t *bdt_policy_data_local_nonprim = NULL;
- if (bdt_policy_data) {
- bdt_policy_data_local_nonprim = OpenAPI_bdt_policy_data_parseFromJSON(bdt_policy_data);
+ if (bdt_policy_data) {
+ bdt_policy_data_local_nonprim = OpenAPI_bdt_policy_data_parseFromJSON(bdt_policy_data);
}
cJSON *res_uri = cJSON_GetObjectItemCaseSensitive(application_data_change_notifJSON, "resUri");
@@ -140,7 +140,7 @@ OpenAPI_application_data_change_notif_t *OpenAPI_application_data_change_notif_p
goto end;
}
-
+
if (!cJSON_IsString(res_uri)) {
ogs_error("OpenAPI_application_data_change_notif_parseFromJSON() failed [res_uri]");
goto end;
@@ -149,8 +149,8 @@ OpenAPI_application_data_change_notif_t *OpenAPI_application_data_change_notif_p
cJSON *ser_param_data = cJSON_GetObjectItemCaseSensitive(application_data_change_notifJSON, "serParamData");
OpenAPI_service_parameter_data_t *ser_param_data_local_nonprim = NULL;
- if (ser_param_data) {
- ser_param_data_local_nonprim = OpenAPI_service_parameter_data_parseFromJSON(ser_param_data);
+ if (ser_param_data) {
+ ser_param_data_local_nonprim = OpenAPI_service_parameter_data_parseFromJSON(ser_param_data);
}
application_data_change_notif_local_var = OpenAPI_application_data_change_notif_create (
@@ -159,7 +159,7 @@ OpenAPI_application_data_change_notif_t *OpenAPI_application_data_change_notif_p
bdt_policy_data ? bdt_policy_data_local_nonprim : NULL,
ogs_strdup_or_assert(res_uri->valuestring),
ser_param_data ? ser_param_data_local_nonprim : NULL
- );
+ );
return application_data_change_notif_local_var;
end:
diff --git a/lib/sbi/openapi/model/application_data_change_notif.h b/lib/sbi/openapi/model/application_data_change_notif.h
index 33c0cc045..20059a881 100644
--- a/lib/sbi/openapi/model/application_data_change_notif.h
+++ b/lib/sbi/openapi/model/application_data_change_notif.h
@@ -36,7 +36,7 @@ OpenAPI_application_data_change_notif_t *OpenAPI_application_data_change_notif_c
OpenAPI_bdt_policy_data_t *bdt_policy_data,
char *res_uri,
OpenAPI_service_parameter_data_t *ser_param_data
- );
+);
void OpenAPI_application_data_change_notif_free(OpenAPI_application_data_change_notif_t *application_data_change_notif);
OpenAPI_application_data_change_notif_t *OpenAPI_application_data_change_notif_parseFromJSON(cJSON *application_data_change_notifJSON);
cJSON *OpenAPI_application_data_change_notif_convertToJSON(OpenAPI_application_data_change_notif_t *application_data_change_notif);
diff --git a/lib/sbi/openapi/model/application_data_subs.c b/lib/sbi/openapi/model/application_data_subs.c
index e93afccb3..5897fda20 100644
--- a/lib/sbi/openapi/model/application_data_subs.c
+++ b/lib/sbi/openapi/model/application_data_subs.c
@@ -9,7 +9,7 @@ OpenAPI_application_data_subs_t *OpenAPI_application_data_subs_create(
OpenAPI_list_t *data_filters,
char *expiry,
char *supported_features
- )
+)
{
OpenAPI_application_data_subs_t *application_data_subs_local_var = OpenAPI_malloc(sizeof(OpenAPI_application_data_subs_t));
if (!application_data_subs_local_var) {
@@ -55,37 +55,37 @@ cJSON *OpenAPI_application_data_subs_convertToJSON(OpenAPI_application_data_subs
}
if (application_data_subs->data_filters) {
- cJSON *data_filtersList = cJSON_AddArrayToObject(item, "dataFilters");
- if (data_filtersList == NULL) {
- ogs_error("OpenAPI_application_data_subs_convertToJSON() failed [data_filters]");
- goto end;
- }
+ cJSON *data_filtersList = cJSON_AddArrayToObject(item, "dataFilters");
+ if (data_filtersList == NULL) {
+ ogs_error("OpenAPI_application_data_subs_convertToJSON() failed [data_filters]");
+ goto end;
+ }
- OpenAPI_lnode_t *data_filters_node;
- if (application_data_subs->data_filters) {
- OpenAPI_list_for_each(application_data_subs->data_filters, data_filters_node) {
- cJSON *itemLocal = OpenAPI_data_filter_convertToJSON(data_filters_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_application_data_subs_convertToJSON() failed [data_filters]");
- goto end;
- }
- cJSON_AddItemToArray(data_filtersList, itemLocal);
+ OpenAPI_lnode_t *data_filters_node;
+ if (application_data_subs->data_filters) {
+ OpenAPI_list_for_each(application_data_subs->data_filters, data_filters_node) {
+ cJSON *itemLocal = OpenAPI_data_filter_convertToJSON(data_filters_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_application_data_subs_convertToJSON() failed [data_filters]");
+ goto end;
}
+ cJSON_AddItemToArray(data_filtersList, itemLocal);
}
}
+ }
if (application_data_subs->expiry) {
- if (cJSON_AddStringToObject(item, "expiry", application_data_subs->expiry) == NULL) {
- ogs_error("OpenAPI_application_data_subs_convertToJSON() failed [expiry]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "expiry", application_data_subs->expiry) == NULL) {
+ ogs_error("OpenAPI_application_data_subs_convertToJSON() failed [expiry]");
+ goto end;
+ }
}
if (application_data_subs->supported_features) {
- if (cJSON_AddStringToObject(item, "supportedFeatures", application_data_subs->supported_features) == NULL) {
- ogs_error("OpenAPI_application_data_subs_convertToJSON() failed [supported_features]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "supportedFeatures", application_data_subs->supported_features) == NULL) {
+ ogs_error("OpenAPI_application_data_subs_convertToJSON() failed [supported_features]");
+ goto end;
+ }
}
end:
@@ -101,7 +101,7 @@ OpenAPI_application_data_subs_t *OpenAPI_application_data_subs_parseFromJSON(cJS
goto end;
}
-
+
if (!cJSON_IsString(notification_uri)) {
ogs_error("OpenAPI_application_data_subs_parseFromJSON() failed [notification_uri]");
goto end;
@@ -110,42 +110,42 @@ OpenAPI_application_data_subs_t *OpenAPI_application_data_subs_parseFromJSON(cJS
cJSON *data_filters = cJSON_GetObjectItemCaseSensitive(application_data_subsJSON, "dataFilters");
OpenAPI_list_t *data_filtersList;
- if (data_filters) {
- cJSON *data_filters_local_nonprimitive;
- if (!cJSON_IsArray(data_filters)) {
+ if (data_filters) {
+ cJSON *data_filters_local_nonprimitive;
+ if (!cJSON_IsArray(data_filters)){
+ ogs_error("OpenAPI_application_data_subs_parseFromJSON() failed [data_filters]");
+ goto end;
+ }
+
+ data_filtersList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(data_filters_local_nonprimitive, data_filters ) {
+ if (!cJSON_IsObject(data_filters_local_nonprimitive)) {
ogs_error("OpenAPI_application_data_subs_parseFromJSON() failed [data_filters]");
goto end;
}
+ OpenAPI_data_filter_t *data_filtersItem = OpenAPI_data_filter_parseFromJSON(data_filters_local_nonprimitive);
- data_filtersList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(data_filters_local_nonprimitive, data_filters ) {
- if (!cJSON_IsObject(data_filters_local_nonprimitive)) {
- ogs_error("OpenAPI_application_data_subs_parseFromJSON() failed [data_filters]");
- goto end;
- }
- OpenAPI_data_filter_t *data_filtersItem = OpenAPI_data_filter_parseFromJSON(data_filters_local_nonprimitive);
-
- OpenAPI_list_add(data_filtersList, data_filtersItem);
- }
+ OpenAPI_list_add(data_filtersList, data_filtersItem);
+ }
}
cJSON *expiry = cJSON_GetObjectItemCaseSensitive(application_data_subsJSON, "expiry");
- if (expiry) {
- if (!cJSON_IsString(expiry)) {
- ogs_error("OpenAPI_application_data_subs_parseFromJSON() failed [expiry]");
- goto end;
- }
+ if (expiry) {
+ if (!cJSON_IsString(expiry)) {
+ ogs_error("OpenAPI_application_data_subs_parseFromJSON() failed [expiry]");
+ goto end;
+ }
}
cJSON *supported_features = cJSON_GetObjectItemCaseSensitive(application_data_subsJSON, "supportedFeatures");
- if (supported_features) {
- if (!cJSON_IsString(supported_features)) {
- ogs_error("OpenAPI_application_data_subs_parseFromJSON() failed [supported_features]");
- goto end;
- }
+ if (supported_features) {
+ if (!cJSON_IsString(supported_features)) {
+ ogs_error("OpenAPI_application_data_subs_parseFromJSON() failed [supported_features]");
+ goto end;
+ }
}
application_data_subs_local_var = OpenAPI_application_data_subs_create (
@@ -153,7 +153,7 @@ OpenAPI_application_data_subs_t *OpenAPI_application_data_subs_parseFromJSON(cJS
data_filters ? data_filtersList : NULL,
expiry ? ogs_strdup_or_assert(expiry->valuestring) : NULL,
supported_features ? ogs_strdup_or_assert(supported_features->valuestring) : NULL
- );
+ );
return application_data_subs_local_var;
end:
diff --git a/lib/sbi/openapi/model/application_data_subs.h b/lib/sbi/openapi/model/application_data_subs.h
index 7f6f33201..65fe1b85e 100644
--- a/lib/sbi/openapi/model/application_data_subs.h
+++ b/lib/sbi/openapi/model/application_data_subs.h
@@ -31,7 +31,7 @@ OpenAPI_application_data_subs_t *OpenAPI_application_data_subs_create(
OpenAPI_list_t *data_filters,
char *expiry,
char *supported_features
- );
+);
void OpenAPI_application_data_subs_free(OpenAPI_application_data_subs_t *application_data_subs);
OpenAPI_application_data_subs_t *OpenAPI_application_data_subs_parseFromJSON(cJSON *application_data_subsJSON);
cJSON *OpenAPI_application_data_subs_convertToJSON(OpenAPI_application_data_subs_t *application_data_subs);
diff --git a/lib/sbi/openapi/model/area.c b/lib/sbi/openapi/model/area.c
index 29a054a44..e0806030d 100644
--- a/lib/sbi/openapi/model/area.c
+++ b/lib/sbi/openapi/model/area.c
@@ -7,7 +7,7 @@
OpenAPI_area_t *OpenAPI_area_create(
OpenAPI_list_t *tacs,
char *area_code
- )
+)
{
OpenAPI_area_t *area_local_var = OpenAPI_malloc(sizeof(OpenAPI_area_t));
if (!area_local_var) {
@@ -44,26 +44,26 @@ cJSON *OpenAPI_area_convertToJSON(OpenAPI_area_t *area)
item = cJSON_CreateObject();
if (area->tacs) {
- cJSON *tacs = cJSON_AddArrayToObject(item, "tacs");
- if (tacs == NULL) {
- ogs_error("OpenAPI_area_convertToJSON() failed [tacs]");
- goto end;
- }
+ cJSON *tacs = cJSON_AddArrayToObject(item, "tacs");
+ if (tacs == NULL) {
+ ogs_error("OpenAPI_area_convertToJSON() failed [tacs]");
+ goto end;
+ }
- OpenAPI_lnode_t *tacs_node;
- OpenAPI_list_for_each(area->tacs, tacs_node) {
- if (cJSON_AddStringToObject(tacs, "", (char*)tacs_node->data) == NULL) {
- ogs_error("OpenAPI_area_convertToJSON() failed [tacs]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *tacs_node;
+ OpenAPI_list_for_each(area->tacs, tacs_node) {
+ if (cJSON_AddStringToObject(tacs, "", (char*)tacs_node->data) == NULL) {
+ ogs_error("OpenAPI_area_convertToJSON() failed [tacs]");
+ goto end;
+ }
+ }
}
if (area->area_code) {
- if (cJSON_AddStringToObject(item, "areaCode", area->area_code) == NULL) {
- ogs_error("OpenAPI_area_convertToJSON() failed [area_code]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "areaCode", area->area_code) == NULL) {
+ ogs_error("OpenAPI_area_convertToJSON() failed [area_code]");
+ goto end;
+ }
}
end:
@@ -76,36 +76,36 @@ OpenAPI_area_t *OpenAPI_area_parseFromJSON(cJSON *areaJSON)
cJSON *tacs = cJSON_GetObjectItemCaseSensitive(areaJSON, "tacs");
OpenAPI_list_t *tacsList;
- if (tacs) {
- cJSON *tacs_local;
- if (!cJSON_IsArray(tacs)) {
- ogs_error("OpenAPI_area_parseFromJSON() failed [tacs]");
- goto end;
- }
- tacsList = OpenAPI_list_create();
+ if (tacs) {
+ cJSON *tacs_local;
+ if (!cJSON_IsArray(tacs)) {
+ ogs_error("OpenAPI_area_parseFromJSON() failed [tacs]");
+ goto end;
+ }
+ tacsList = OpenAPI_list_create();
- cJSON_ArrayForEach(tacs_local, tacs) {
- if (!cJSON_IsString(tacs_local)) {
- ogs_error("OpenAPI_area_parseFromJSON() failed [tacs]");
- goto end;
- }
- OpenAPI_list_add(tacsList, ogs_strdup_or_assert(tacs_local->valuestring));
- }
+ cJSON_ArrayForEach(tacs_local, tacs) {
+ if (!cJSON_IsString(tacs_local)) {
+ ogs_error("OpenAPI_area_parseFromJSON() failed [tacs]");
+ goto end;
+ }
+ OpenAPI_list_add(tacsList , ogs_strdup_or_assert(tacs_local->valuestring));
+ }
}
cJSON *area_code = cJSON_GetObjectItemCaseSensitive(areaJSON, "areaCode");
- if (area_code) {
- if (!cJSON_IsString(area_code)) {
- ogs_error("OpenAPI_area_parseFromJSON() failed [area_code]");
- goto end;
- }
+ if (area_code) {
+ if (!cJSON_IsString(area_code)) {
+ ogs_error("OpenAPI_area_parseFromJSON() failed [area_code]");
+ goto end;
+ }
}
area_local_var = OpenAPI_area_create (
tacs ? tacsList : NULL,
area_code ? ogs_strdup_or_assert(area_code->valuestring) : NULL
- );
+ );
return area_local_var;
end:
diff --git a/lib/sbi/openapi/model/area.h b/lib/sbi/openapi/model/area.h
index 4092e15e8..63adae58d 100644
--- a/lib/sbi/openapi/model/area.h
+++ b/lib/sbi/openapi/model/area.h
@@ -1,7 +1,7 @@
/*
* area.h
*
- *
+ *
*/
#ifndef _OpenAPI_area_H_
@@ -26,7 +26,7 @@ typedef struct OpenAPI_area_s {
OpenAPI_area_t *OpenAPI_area_create(
OpenAPI_list_t *tacs,
char *area_code
- );
+);
void OpenAPI_area_free(OpenAPI_area_t *area);
OpenAPI_area_t *OpenAPI_area_parseFromJSON(cJSON *areaJSON);
cJSON *OpenAPI_area_convertToJSON(OpenAPI_area_t *area);
diff --git a/lib/sbi/openapi/model/area_1.c b/lib/sbi/openapi/model/area_1.c
new file mode 100644
index 000000000..7dccc52d3
--- /dev/null
+++ b/lib/sbi/openapi/model/area_1.c
@@ -0,0 +1,148 @@
+
+#include
+#include
+#include
+#include "area_1.h"
+
+OpenAPI_area_1_t *OpenAPI_area_1_create(
+ OpenAPI_list_t *tacs,
+ char *area_code
+)
+{
+ OpenAPI_area_1_t *area_1_local_var = OpenAPI_malloc(sizeof(OpenAPI_area_1_t));
+ if (!area_1_local_var) {
+ return NULL;
+ }
+ area_1_local_var->tacs = tacs;
+ area_1_local_var->area_code = area_code;
+
+ return area_1_local_var;
+}
+
+void OpenAPI_area_1_free(OpenAPI_area_1_t *area_1)
+{
+ if (NULL == area_1) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ OpenAPI_list_for_each(area_1->tacs, node) {
+ ogs_free(node->data);
+ }
+ OpenAPI_list_free(area_1->tacs);
+ ogs_free(area_1->area_code);
+ ogs_free(area_1);
+}
+
+cJSON *OpenAPI_area_1_convertToJSON(OpenAPI_area_1_t *area_1)
+{
+ cJSON *item = NULL;
+
+ if (area_1 == NULL) {
+ ogs_error("OpenAPI_area_1_convertToJSON() failed [Area_1]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (area_1->tacs) {
+ cJSON *tacs = cJSON_AddArrayToObject(item, "tacs");
+ if (tacs == NULL) {
+ ogs_error("OpenAPI_area_1_convertToJSON() failed [tacs]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *tacs_node;
+ OpenAPI_list_for_each(area_1->tacs, tacs_node) {
+ if (cJSON_AddStringToObject(tacs, "", (char*)tacs_node->data) == NULL) {
+ ogs_error("OpenAPI_area_1_convertToJSON() failed [tacs]");
+ goto end;
+ }
+ }
+ }
+
+ if (area_1->area_code) {
+ if (cJSON_AddStringToObject(item, "areaCode", area_1->area_code) == NULL) {
+ ogs_error("OpenAPI_area_1_convertToJSON() failed [area_code]");
+ goto end;
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_area_1_t *OpenAPI_area_1_parseFromJSON(cJSON *area_1JSON)
+{
+ OpenAPI_area_1_t *area_1_local_var = NULL;
+ cJSON *tacs = cJSON_GetObjectItemCaseSensitive(area_1JSON, "tacs");
+
+ OpenAPI_list_t *tacsList;
+ if (tacs) {
+ cJSON *tacs_local;
+ if (!cJSON_IsArray(tacs)) {
+ ogs_error("OpenAPI_area_1_parseFromJSON() failed [tacs]");
+ goto end;
+ }
+ tacsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(tacs_local, tacs) {
+ if (!cJSON_IsString(tacs_local)) {
+ ogs_error("OpenAPI_area_1_parseFromJSON() failed [tacs]");
+ goto end;
+ }
+ OpenAPI_list_add(tacsList , ogs_strdup_or_assert(tacs_local->valuestring));
+ }
+ }
+
+ cJSON *area_code = cJSON_GetObjectItemCaseSensitive(area_1JSON, "areaCode");
+
+ if (area_code) {
+ if (!cJSON_IsString(area_code)) {
+ ogs_error("OpenAPI_area_1_parseFromJSON() failed [area_code]");
+ goto end;
+ }
+ }
+
+ area_1_local_var = OpenAPI_area_1_create (
+ tacs ? tacsList : NULL,
+ area_code ? ogs_strdup_or_assert(area_code->valuestring) : NULL
+ );
+
+ return area_1_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_area_1_t *OpenAPI_area_1_copy(OpenAPI_area_1_t *dst, OpenAPI_area_1_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_area_1_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_area_1_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_area_1_free(dst);
+ dst = OpenAPI_area_1_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/area_1.h b/lib/sbi/openapi/model/area_1.h
new file mode 100644
index 000000000..056c1c078
--- /dev/null
+++ b/lib/sbi/openapi/model/area_1.h
@@ -0,0 +1,40 @@
+/*
+ * area_1.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_area_1_H_
+#define _OpenAPI_area_1_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_area_1_s OpenAPI_area_1_t;
+typedef struct OpenAPI_area_1_s {
+ OpenAPI_list_t *tacs;
+ char *area_code;
+} OpenAPI_area_1_t;
+
+OpenAPI_area_1_t *OpenAPI_area_1_create(
+ OpenAPI_list_t *tacs,
+ char *area_code
+);
+void OpenAPI_area_1_free(OpenAPI_area_1_t *area_1);
+OpenAPI_area_1_t *OpenAPI_area_1_parseFromJSON(cJSON *area_1JSON);
+cJSON *OpenAPI_area_1_convertToJSON(OpenAPI_area_1_t *area_1);
+OpenAPI_area_1_t *OpenAPI_area_1_copy(OpenAPI_area_1_t *dst, OpenAPI_area_1_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_area_1_H_ */
+
diff --git a/lib/sbi/openapi/model/area_of_validity.c b/lib/sbi/openapi/model/area_of_validity.c
index 366f26462..5d072dc0f 100644
--- a/lib/sbi/openapi/model/area_of_validity.c
+++ b/lib/sbi/openapi/model/area_of_validity.c
@@ -6,7 +6,7 @@
OpenAPI_area_of_validity_t *OpenAPI_area_of_validity_create(
OpenAPI_list_t *tai_list
- )
+)
{
OpenAPI_area_of_validity_t *area_of_validity_local_var = OpenAPI_malloc(sizeof(OpenAPI_area_of_validity_t));
if (!area_of_validity_local_var) {
@@ -72,9 +72,9 @@ OpenAPI_area_of_validity_t *OpenAPI_area_of_validity_parseFromJSON(cJSON *area_o
}
OpenAPI_list_t *tai_listList;
-
+
cJSON *tai_list_local_nonprimitive;
- if (!cJSON_IsArray(tai_list)) {
+ if (!cJSON_IsArray(tai_list)){
ogs_error("OpenAPI_area_of_validity_parseFromJSON() failed [tai_list]");
goto end;
}
@@ -93,7 +93,7 @@ OpenAPI_area_of_validity_t *OpenAPI_area_of_validity_parseFromJSON(cJSON *area_o
area_of_validity_local_var = OpenAPI_area_of_validity_create (
tai_listList
- );
+ );
return area_of_validity_local_var;
end:
diff --git a/lib/sbi/openapi/model/area_of_validity.h b/lib/sbi/openapi/model/area_of_validity.h
index 4ae9648ea..802ce2ca8 100644
--- a/lib/sbi/openapi/model/area_of_validity.h
+++ b/lib/sbi/openapi/model/area_of_validity.h
@@ -1,7 +1,7 @@
/*
* area_of_validity.h
*
- *
+ *
*/
#ifndef _OpenAPI_area_of_validity_H_
@@ -25,7 +25,7 @@ typedef struct OpenAPI_area_of_validity_s {
OpenAPI_area_of_validity_t *OpenAPI_area_of_validity_create(
OpenAPI_list_t *tai_list
- );
+);
void OpenAPI_area_of_validity_free(OpenAPI_area_of_validity_t *area_of_validity);
OpenAPI_area_of_validity_t *OpenAPI_area_of_validity_parseFromJSON(cJSON *area_of_validityJSON);
cJSON *OpenAPI_area_of_validity_convertToJSON(OpenAPI_area_of_validity_t *area_of_validity);
diff --git a/lib/sbi/openapi/model/area_scope.c b/lib/sbi/openapi/model/area_scope.c
index 495c3d3a0..54224e08b 100644
--- a/lib/sbi/openapi/model/area_scope.c
+++ b/lib/sbi/openapi/model/area_scope.c
@@ -9,7 +9,7 @@ OpenAPI_area_scope_t *OpenAPI_area_scope_create(
OpenAPI_list_t *nr_cell_id_list,
OpenAPI_list_t *tac_list,
OpenAPI_list_t* tac_info_per_plmn
- )
+)
{
OpenAPI_area_scope_t *area_scope_local_var = OpenAPI_malloc(sizeof(OpenAPI_area_scope_t));
if (!area_scope_local_var) {
@@ -61,70 +61,70 @@ cJSON *OpenAPI_area_scope_convertToJSON(OpenAPI_area_scope_t *area_scope)
item = cJSON_CreateObject();
if (area_scope->eutra_cell_id_list) {
- cJSON *eutra_cell_id_list = cJSON_AddArrayToObject(item, "eutraCellIdList");
- if (eutra_cell_id_list == NULL) {
- ogs_error("OpenAPI_area_scope_convertToJSON() failed [eutra_cell_id_list]");
- goto end;
- }
+ cJSON *eutra_cell_id_list = cJSON_AddArrayToObject(item, "eutraCellIdList");
+ if (eutra_cell_id_list == NULL) {
+ ogs_error("OpenAPI_area_scope_convertToJSON() failed [eutra_cell_id_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *eutra_cell_id_list_node;
- OpenAPI_list_for_each(area_scope->eutra_cell_id_list, eutra_cell_id_list_node) {
- if (cJSON_AddStringToObject(eutra_cell_id_list, "", (char*)eutra_cell_id_list_node->data) == NULL) {
- ogs_error("OpenAPI_area_scope_convertToJSON() failed [eutra_cell_id_list]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *eutra_cell_id_list_node;
+ OpenAPI_list_for_each(area_scope->eutra_cell_id_list, eutra_cell_id_list_node) {
+ if (cJSON_AddStringToObject(eutra_cell_id_list, "", (char*)eutra_cell_id_list_node->data) == NULL) {
+ ogs_error("OpenAPI_area_scope_convertToJSON() failed [eutra_cell_id_list]");
+ goto end;
+ }
+ }
}
if (area_scope->nr_cell_id_list) {
- cJSON *nr_cell_id_list = cJSON_AddArrayToObject(item, "nrCellIdList");
- if (nr_cell_id_list == NULL) {
- ogs_error("OpenAPI_area_scope_convertToJSON() failed [nr_cell_id_list]");
- goto end;
- }
+ cJSON *nr_cell_id_list = cJSON_AddArrayToObject(item, "nrCellIdList");
+ if (nr_cell_id_list == NULL) {
+ ogs_error("OpenAPI_area_scope_convertToJSON() failed [nr_cell_id_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *nr_cell_id_list_node;
- OpenAPI_list_for_each(area_scope->nr_cell_id_list, nr_cell_id_list_node) {
- if (cJSON_AddStringToObject(nr_cell_id_list, "", (char*)nr_cell_id_list_node->data) == NULL) {
- ogs_error("OpenAPI_area_scope_convertToJSON() failed [nr_cell_id_list]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *nr_cell_id_list_node;
+ OpenAPI_list_for_each(area_scope->nr_cell_id_list, nr_cell_id_list_node) {
+ if (cJSON_AddStringToObject(nr_cell_id_list, "", (char*)nr_cell_id_list_node->data) == NULL) {
+ ogs_error("OpenAPI_area_scope_convertToJSON() failed [nr_cell_id_list]");
+ goto end;
+ }
+ }
}
if (area_scope->tac_list) {
- cJSON *tac_list = cJSON_AddArrayToObject(item, "tacList");
- if (tac_list == NULL) {
- ogs_error("OpenAPI_area_scope_convertToJSON() failed [tac_list]");
- goto end;
- }
+ cJSON *tac_list = cJSON_AddArrayToObject(item, "tacList");
+ if (tac_list == NULL) {
+ ogs_error("OpenAPI_area_scope_convertToJSON() failed [tac_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *tac_list_node;
- OpenAPI_list_for_each(area_scope->tac_list, tac_list_node) {
- if (cJSON_AddStringToObject(tac_list, "", (char*)tac_list_node->data) == NULL) {
- ogs_error("OpenAPI_area_scope_convertToJSON() failed [tac_list]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *tac_list_node;
+ OpenAPI_list_for_each(area_scope->tac_list, tac_list_node) {
+ if (cJSON_AddStringToObject(tac_list, "", (char*)tac_list_node->data) == NULL) {
+ ogs_error("OpenAPI_area_scope_convertToJSON() failed [tac_list]");
+ goto end;
+ }
+ }
}
if (area_scope->tac_info_per_plmn) {
- cJSON *tac_info_per_plmn = cJSON_AddObjectToObject(item, "tacInfoPerPlmn");
- if (tac_info_per_plmn == NULL) {
+ cJSON *tac_info_per_plmn = cJSON_AddObjectToObject(item, "tacInfoPerPlmn");
+ if (tac_info_per_plmn == NULL) {
+ ogs_error("OpenAPI_area_scope_convertToJSON() failed [tac_info_per_plmn]");
+ goto end;
+ }
+ cJSON *localMapObject = tac_info_per_plmn;
+ OpenAPI_lnode_t *tac_info_per_plmn_node;
+ if (area_scope->tac_info_per_plmn) {
+ OpenAPI_list_for_each(area_scope->tac_info_per_plmn, tac_info_per_plmn_node) {
+ OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)tac_info_per_plmn_node->data;
+ cJSON *itemLocal = OpenAPI_tac_info_convertToJSON(localKeyValue->value);
+ if (itemLocal == NULL) {
ogs_error("OpenAPI_area_scope_convertToJSON() failed [tac_info_per_plmn]");
goto end;
}
- cJSON *localMapObject = tac_info_per_plmn;
- OpenAPI_lnode_t *tac_info_per_plmn_node;
- if (area_scope->tac_info_per_plmn) {
- OpenAPI_list_for_each(area_scope->tac_info_per_plmn, tac_info_per_plmn_node) {
- OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)tac_info_per_plmn_node->data;
- cJSON *itemLocal = OpenAPI_tac_info_convertToJSON(localKeyValue->value);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_area_scope_convertToJSON() failed [tac_info_per_plmn]");
- goto end;
- }
- cJSON_AddItemToObject(tac_info_per_plmn, localKeyValue->key, itemLocal);
+ cJSON_AddItemToObject(tac_info_per_plmn, localKeyValue->key, itemLocal);
}
}
}
@@ -139,84 +139,84 @@ OpenAPI_area_scope_t *OpenAPI_area_scope_parseFromJSON(cJSON *area_scopeJSON)
cJSON *eutra_cell_id_list = cJSON_GetObjectItemCaseSensitive(area_scopeJSON, "eutraCellIdList");
OpenAPI_list_t *eutra_cell_id_listList;
- if (eutra_cell_id_list) {
- cJSON *eutra_cell_id_list_local;
- if (!cJSON_IsArray(eutra_cell_id_list)) {
- ogs_error("OpenAPI_area_scope_parseFromJSON() failed [eutra_cell_id_list]");
- goto end;
- }
- eutra_cell_id_listList = OpenAPI_list_create();
+ if (eutra_cell_id_list) {
+ cJSON *eutra_cell_id_list_local;
+ if (!cJSON_IsArray(eutra_cell_id_list)) {
+ ogs_error("OpenAPI_area_scope_parseFromJSON() failed [eutra_cell_id_list]");
+ goto end;
+ }
+ eutra_cell_id_listList = OpenAPI_list_create();
- cJSON_ArrayForEach(eutra_cell_id_list_local, eutra_cell_id_list) {
- if (!cJSON_IsString(eutra_cell_id_list_local)) {
- ogs_error("OpenAPI_area_scope_parseFromJSON() failed [eutra_cell_id_list]");
- goto end;
- }
- OpenAPI_list_add(eutra_cell_id_listList, ogs_strdup_or_assert(eutra_cell_id_list_local->valuestring));
- }
+ cJSON_ArrayForEach(eutra_cell_id_list_local, eutra_cell_id_list) {
+ if (!cJSON_IsString(eutra_cell_id_list_local)) {
+ ogs_error("OpenAPI_area_scope_parseFromJSON() failed [eutra_cell_id_list]");
+ goto end;
+ }
+ OpenAPI_list_add(eutra_cell_id_listList , ogs_strdup_or_assert(eutra_cell_id_list_local->valuestring));
+ }
}
cJSON *nr_cell_id_list = cJSON_GetObjectItemCaseSensitive(area_scopeJSON, "nrCellIdList");
OpenAPI_list_t *nr_cell_id_listList;
- if (nr_cell_id_list) {
- cJSON *nr_cell_id_list_local;
- if (!cJSON_IsArray(nr_cell_id_list)) {
- ogs_error("OpenAPI_area_scope_parseFromJSON() failed [nr_cell_id_list]");
- goto end;
- }
- nr_cell_id_listList = OpenAPI_list_create();
+ if (nr_cell_id_list) {
+ cJSON *nr_cell_id_list_local;
+ if (!cJSON_IsArray(nr_cell_id_list)) {
+ ogs_error("OpenAPI_area_scope_parseFromJSON() failed [nr_cell_id_list]");
+ goto end;
+ }
+ nr_cell_id_listList = OpenAPI_list_create();
- cJSON_ArrayForEach(nr_cell_id_list_local, nr_cell_id_list) {
- if (!cJSON_IsString(nr_cell_id_list_local)) {
- ogs_error("OpenAPI_area_scope_parseFromJSON() failed [nr_cell_id_list]");
- goto end;
- }
- OpenAPI_list_add(nr_cell_id_listList, ogs_strdup_or_assert(nr_cell_id_list_local->valuestring));
- }
+ cJSON_ArrayForEach(nr_cell_id_list_local, nr_cell_id_list) {
+ if (!cJSON_IsString(nr_cell_id_list_local)) {
+ ogs_error("OpenAPI_area_scope_parseFromJSON() failed [nr_cell_id_list]");
+ goto end;
+ }
+ OpenAPI_list_add(nr_cell_id_listList , ogs_strdup_or_assert(nr_cell_id_list_local->valuestring));
+ }
}
cJSON *tac_list = cJSON_GetObjectItemCaseSensitive(area_scopeJSON, "tacList");
OpenAPI_list_t *tac_listList;
- if (tac_list) {
- cJSON *tac_list_local;
- if (!cJSON_IsArray(tac_list)) {
- ogs_error("OpenAPI_area_scope_parseFromJSON() failed [tac_list]");
- goto end;
- }
- tac_listList = OpenAPI_list_create();
+ if (tac_list) {
+ cJSON *tac_list_local;
+ if (!cJSON_IsArray(tac_list)) {
+ ogs_error("OpenAPI_area_scope_parseFromJSON() failed [tac_list]");
+ goto end;
+ }
+ tac_listList = OpenAPI_list_create();
- cJSON_ArrayForEach(tac_list_local, tac_list) {
- if (!cJSON_IsString(tac_list_local)) {
- ogs_error("OpenAPI_area_scope_parseFromJSON() failed [tac_list]");
- goto end;
- }
- OpenAPI_list_add(tac_listList, ogs_strdup_or_assert(tac_list_local->valuestring));
- }
+ cJSON_ArrayForEach(tac_list_local, tac_list) {
+ if (!cJSON_IsString(tac_list_local)) {
+ ogs_error("OpenAPI_area_scope_parseFromJSON() failed [tac_list]");
+ goto end;
+ }
+ OpenAPI_list_add(tac_listList , ogs_strdup_or_assert(tac_list_local->valuestring));
+ }
}
cJSON *tac_info_per_plmn = cJSON_GetObjectItemCaseSensitive(area_scopeJSON, "tacInfoPerPlmn");
OpenAPI_list_t *tac_info_per_plmnList;
- if (tac_info_per_plmn) {
- cJSON *tac_info_per_plmn_local_map;
- if (!cJSON_IsObject(tac_info_per_plmn)) {
+ if (tac_info_per_plmn) {
+ cJSON *tac_info_per_plmn_local_map;
+ if (!cJSON_IsObject(tac_info_per_plmn)) {
+ ogs_error("OpenAPI_area_scope_parseFromJSON() failed [tac_info_per_plmn]");
+ goto end;
+ }
+ tac_info_per_plmnList = OpenAPI_list_create();
+ OpenAPI_map_t *localMapKeyPair = NULL;
+ cJSON_ArrayForEach(tac_info_per_plmn_local_map, tac_info_per_plmn) {
+ cJSON *localMapObject = tac_info_per_plmn_local_map;
+ if (!cJSON_IsObject(tac_info_per_plmn_local_map)) {
ogs_error("OpenAPI_area_scope_parseFromJSON() failed [tac_info_per_plmn]");
goto end;
}
- tac_info_per_plmnList = OpenAPI_list_create();
- OpenAPI_map_t *localMapKeyPair = NULL;
- cJSON_ArrayForEach(tac_info_per_plmn_local_map, tac_info_per_plmn) {
- cJSON *localMapObject = tac_info_per_plmn_local_map;
- if (!cJSON_IsObject(tac_info_per_plmn_local_map)) {
- ogs_error("OpenAPI_area_scope_parseFromJSON() failed [tac_info_per_plmn]");
- goto end;
- }
- localMapKeyPair = OpenAPI_map_create(
- localMapObject->string, OpenAPI_tac_info_parseFromJSON(localMapObject));
- OpenAPI_list_add(tac_info_per_plmnList, localMapKeyPair);
- }
+ localMapKeyPair = OpenAPI_map_create(
+ localMapObject->string, OpenAPI_tac_info_parseFromJSON(localMapObject));
+ OpenAPI_list_add(tac_info_per_plmnList , localMapKeyPair);
+ }
}
area_scope_local_var = OpenAPI_area_scope_create (
@@ -224,7 +224,7 @@ OpenAPI_area_scope_t *OpenAPI_area_scope_parseFromJSON(cJSON *area_scopeJSON)
nr_cell_id_list ? nr_cell_id_listList : NULL,
tac_list ? tac_listList : NULL,
tac_info_per_plmn ? tac_info_per_plmnList : NULL
- );
+ );
return area_scope_local_var;
end:
diff --git a/lib/sbi/openapi/model/area_scope.h b/lib/sbi/openapi/model/area_scope.h
index a0b29fd03..646a25b34 100644
--- a/lib/sbi/openapi/model/area_scope.h
+++ b/lib/sbi/openapi/model/area_scope.h
@@ -1,7 +1,7 @@
/*
* area_scope.h
*
- *
+ *
*/
#ifndef _OpenAPI_area_scope_H_
@@ -31,7 +31,7 @@ OpenAPI_area_scope_t *OpenAPI_area_scope_create(
OpenAPI_list_t *nr_cell_id_list,
OpenAPI_list_t *tac_list,
OpenAPI_list_t* tac_info_per_plmn
- );
+);
void OpenAPI_area_scope_free(OpenAPI_area_scope_t *area_scope);
OpenAPI_area_scope_t *OpenAPI_area_scope_parseFromJSON(cJSON *area_scopeJSON);
cJSON *OpenAPI_area_scope_convertToJSON(OpenAPI_area_scope_t *area_scope);
diff --git a/lib/sbi/openapi/model/arp.c b/lib/sbi/openapi/model/arp.c
index a36867943..8d62dd92e 100644
--- a/lib/sbi/openapi/model/arp.c
+++ b/lib/sbi/openapi/model/arp.c
@@ -8,7 +8,7 @@ OpenAPI_arp_t *OpenAPI_arp_create(
int priority_level,
OpenAPI_preemption_capability_e preempt_cap,
OpenAPI_preemption_vulnerability_e preempt_vuln
- )
+)
{
OpenAPI_arp_t *arp_local_var = OpenAPI_malloc(sizeof(OpenAPI_arp_t));
if (!arp_local_var) {
@@ -68,7 +68,7 @@ OpenAPI_arp_t *OpenAPI_arp_parseFromJSON(cJSON *arpJSON)
goto end;
}
-
+
if (!cJSON_IsNumber(priority_level)) {
ogs_error("OpenAPI_arp_parseFromJSON() failed [priority_level]");
goto end;
@@ -81,7 +81,7 @@ OpenAPI_arp_t *OpenAPI_arp_parseFromJSON(cJSON *arpJSON)
}
OpenAPI_preemption_capability_e preempt_capVariable;
-
+
if (!cJSON_IsString(preempt_cap)) {
ogs_error("OpenAPI_arp_parseFromJSON() failed [preempt_cap]");
goto end;
@@ -95,7 +95,7 @@ OpenAPI_arp_t *OpenAPI_arp_parseFromJSON(cJSON *arpJSON)
}
OpenAPI_preemption_vulnerability_e preempt_vulnVariable;
-
+
if (!cJSON_IsString(preempt_vuln)) {
ogs_error("OpenAPI_arp_parseFromJSON() failed [preempt_vuln]");
goto end;
@@ -106,7 +106,7 @@ OpenAPI_arp_t *OpenAPI_arp_parseFromJSON(cJSON *arpJSON)
priority_level->valuedouble,
preempt_capVariable,
preempt_vulnVariable
- );
+ );
return arp_local_var;
end:
diff --git a/lib/sbi/openapi/model/arp.h b/lib/sbi/openapi/model/arp.h
index 8e4a437ab..a50c29383 100644
--- a/lib/sbi/openapi/model/arp.h
+++ b/lib/sbi/openapi/model/arp.h
@@ -1,7 +1,7 @@
/*
* arp.h
*
- *
+ *
*/
#ifndef _OpenAPI_arp_H_
@@ -30,7 +30,7 @@ OpenAPI_arp_t *OpenAPI_arp_create(
int priority_level,
OpenAPI_preemption_capability_e preempt_cap,
OpenAPI_preemption_vulnerability_e preempt_vuln
- );
+);
void OpenAPI_arp_free(OpenAPI_arp_t *arp);
OpenAPI_arp_t *OpenAPI_arp_parseFromJSON(cJSON *arpJSON);
cJSON *OpenAPI_arp_convertToJSON(OpenAPI_arp_t *arp);
diff --git a/lib/sbi/openapi/model/arp_1.c b/lib/sbi/openapi/model/arp_1.c
new file mode 100644
index 000000000..4605ed33d
--- /dev/null
+++ b/lib/sbi/openapi/model/arp_1.c
@@ -0,0 +1,149 @@
+
+#include
+#include
+#include
+#include "arp_1.h"
+
+OpenAPI_arp_1_t *OpenAPI_arp_1_create(
+ int priority_level,
+ OpenAPI_preemption_capability_e preempt_cap,
+ OpenAPI_preemption_vulnerability_e preempt_vuln
+)
+{
+ OpenAPI_arp_1_t *arp_1_local_var = OpenAPI_malloc(sizeof(OpenAPI_arp_1_t));
+ if (!arp_1_local_var) {
+ return NULL;
+ }
+ arp_1_local_var->priority_level = priority_level;
+ arp_1_local_var->preempt_cap = preempt_cap;
+ arp_1_local_var->preempt_vuln = preempt_vuln;
+
+ return arp_1_local_var;
+}
+
+void OpenAPI_arp_1_free(OpenAPI_arp_1_t *arp_1)
+{
+ if (NULL == arp_1) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ ogs_free(arp_1);
+}
+
+cJSON *OpenAPI_arp_1_convertToJSON(OpenAPI_arp_1_t *arp_1)
+{
+ cJSON *item = NULL;
+
+ if (arp_1 == NULL) {
+ ogs_error("OpenAPI_arp_1_convertToJSON() failed [Arp_1]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (cJSON_AddNumberToObject(item, "priorityLevel", arp_1->priority_level) == NULL) {
+ ogs_error("OpenAPI_arp_1_convertToJSON() failed [priority_level]");
+ goto end;
+ }
+
+ if (cJSON_AddStringToObject(item, "preemptCap", OpenAPI_preemption_capability_ToString(arp_1->preempt_cap)) == NULL) {
+ ogs_error("OpenAPI_arp_1_convertToJSON() failed [preempt_cap]");
+ goto end;
+ }
+
+ if (cJSON_AddStringToObject(item, "preemptVuln", OpenAPI_preemption_vulnerability_ToString(arp_1->preempt_vuln)) == NULL) {
+ ogs_error("OpenAPI_arp_1_convertToJSON() failed [preempt_vuln]");
+ goto end;
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_arp_1_t *OpenAPI_arp_1_parseFromJSON(cJSON *arp_1JSON)
+{
+ OpenAPI_arp_1_t *arp_1_local_var = NULL;
+ cJSON *priority_level = cJSON_GetObjectItemCaseSensitive(arp_1JSON, "priorityLevel");
+ if (!priority_level) {
+ ogs_error("OpenAPI_arp_1_parseFromJSON() failed [priority_level]");
+ goto end;
+ }
+
+
+ if (!cJSON_IsNumber(priority_level)) {
+ ogs_error("OpenAPI_arp_1_parseFromJSON() failed [priority_level]");
+ goto end;
+ }
+
+ cJSON *preempt_cap = cJSON_GetObjectItemCaseSensitive(arp_1JSON, "preemptCap");
+ if (!preempt_cap) {
+ ogs_error("OpenAPI_arp_1_parseFromJSON() failed [preempt_cap]");
+ goto end;
+ }
+
+ OpenAPI_preemption_capability_e preempt_capVariable;
+
+ if (!cJSON_IsString(preempt_cap)) {
+ ogs_error("OpenAPI_arp_1_parseFromJSON() failed [preempt_cap]");
+ goto end;
+ }
+ preempt_capVariable = OpenAPI_preemption_capability_FromString(preempt_cap->valuestring);
+
+ cJSON *preempt_vuln = cJSON_GetObjectItemCaseSensitive(arp_1JSON, "preemptVuln");
+ if (!preempt_vuln) {
+ ogs_error("OpenAPI_arp_1_parseFromJSON() failed [preempt_vuln]");
+ goto end;
+ }
+
+ OpenAPI_preemption_vulnerability_e preempt_vulnVariable;
+
+ if (!cJSON_IsString(preempt_vuln)) {
+ ogs_error("OpenAPI_arp_1_parseFromJSON() failed [preempt_vuln]");
+ goto end;
+ }
+ preempt_vulnVariable = OpenAPI_preemption_vulnerability_FromString(preempt_vuln->valuestring);
+
+ arp_1_local_var = OpenAPI_arp_1_create (
+ priority_level->valuedouble,
+ preempt_capVariable,
+ preempt_vulnVariable
+ );
+
+ return arp_1_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_arp_1_t *OpenAPI_arp_1_copy(OpenAPI_arp_1_t *dst, OpenAPI_arp_1_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_arp_1_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_arp_1_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_arp_1_free(dst);
+ dst = OpenAPI_arp_1_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/arp_1.h b/lib/sbi/openapi/model/arp_1.h
new file mode 100644
index 000000000..2efa5846f
--- /dev/null
+++ b/lib/sbi/openapi/model/arp_1.h
@@ -0,0 +1,44 @@
+/*
+ * arp_1.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_arp_1_H_
+#define _OpenAPI_arp_1_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+#include "preemption_capability.h"
+#include "preemption_vulnerability.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_arp_1_s OpenAPI_arp_1_t;
+typedef struct OpenAPI_arp_1_s {
+ int priority_level;
+ OpenAPI_preemption_capability_e preempt_cap;
+ OpenAPI_preemption_vulnerability_e preempt_vuln;
+} OpenAPI_arp_1_t;
+
+OpenAPI_arp_1_t *OpenAPI_arp_1_create(
+ int priority_level,
+ OpenAPI_preemption_capability_e preempt_cap,
+ OpenAPI_preemption_vulnerability_e preempt_vuln
+);
+void OpenAPI_arp_1_free(OpenAPI_arp_1_t *arp_1);
+OpenAPI_arp_1_t *OpenAPI_arp_1_parseFromJSON(cJSON *arp_1JSON);
+cJSON *OpenAPI_arp_1_convertToJSON(OpenAPI_arp_1_t *arp_1);
+OpenAPI_arp_1_t *OpenAPI_arp_1_copy(OpenAPI_arp_1_t *dst, OpenAPI_arp_1_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_arp_1_H_ */
+
diff --git a/lib/sbi/openapi/model/assign_ebi_data.c b/lib/sbi/openapi/model/assign_ebi_data.c
index 576a02dee..454e840d1 100644
--- a/lib/sbi/openapi/model/assign_ebi_data.c
+++ b/lib/sbi/openapi/model/assign_ebi_data.c
@@ -9,7 +9,7 @@ OpenAPI_assign_ebi_data_t *OpenAPI_assign_ebi_data_create(
OpenAPI_list_t *arp_list,
OpenAPI_list_t *released_ebi_list,
OpenAPI_guami_t *old_guami
- )
+)
{
OpenAPI_assign_ebi_data_t *assign_ebi_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_assign_ebi_data_t));
if (!assign_ebi_data_local_var) {
@@ -57,52 +57,52 @@ cJSON *OpenAPI_assign_ebi_data_convertToJSON(OpenAPI_assign_ebi_data_t *assign_e
}
if (assign_ebi_data->arp_list) {
- cJSON *arp_listList = cJSON_AddArrayToObject(item, "arpList");
- if (arp_listList == NULL) {
- ogs_error("OpenAPI_assign_ebi_data_convertToJSON() failed [arp_list]");
- goto end;
- }
+ cJSON *arp_listList = cJSON_AddArrayToObject(item, "arpList");
+ if (arp_listList == NULL) {
+ ogs_error("OpenAPI_assign_ebi_data_convertToJSON() failed [arp_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *arp_list_node;
- if (assign_ebi_data->arp_list) {
- OpenAPI_list_for_each(assign_ebi_data->arp_list, arp_list_node) {
- cJSON *itemLocal = OpenAPI_arp_convertToJSON(arp_list_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_assign_ebi_data_convertToJSON() failed [arp_list]");
- goto end;
- }
- cJSON_AddItemToArray(arp_listList, itemLocal);
+ OpenAPI_lnode_t *arp_list_node;
+ if (assign_ebi_data->arp_list) {
+ OpenAPI_list_for_each(assign_ebi_data->arp_list, arp_list_node) {
+ cJSON *itemLocal = OpenAPI_arp_convertToJSON(arp_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_assign_ebi_data_convertToJSON() failed [arp_list]");
+ goto end;
}
+ cJSON_AddItemToArray(arp_listList, itemLocal);
}
}
+ }
if (assign_ebi_data->released_ebi_list) {
- cJSON *released_ebi_list = cJSON_AddArrayToObject(item, "releasedEbiList");
- if (released_ebi_list == NULL) {
- ogs_error("OpenAPI_assign_ebi_data_convertToJSON() failed [released_ebi_list]");
- goto end;
- }
+ cJSON *released_ebi_list = cJSON_AddArrayToObject(item, "releasedEbiList");
+ if (released_ebi_list == NULL) {
+ ogs_error("OpenAPI_assign_ebi_data_convertToJSON() failed [released_ebi_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *released_ebi_list_node;
- OpenAPI_list_for_each(assign_ebi_data->released_ebi_list, released_ebi_list_node) {
- if (cJSON_AddNumberToObject(released_ebi_list, "", *(double *)released_ebi_list_node->data) == NULL) {
- ogs_error("OpenAPI_assign_ebi_data_convertToJSON() failed [released_ebi_list]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *released_ebi_list_node;
+ OpenAPI_list_for_each(assign_ebi_data->released_ebi_list, released_ebi_list_node) {
+ if (cJSON_AddNumberToObject(released_ebi_list, "", *(double *)released_ebi_list_node->data) == NULL) {
+ ogs_error("OpenAPI_assign_ebi_data_convertToJSON() failed [released_ebi_list]");
+ goto end;
+ }
+ }
}
if (assign_ebi_data->old_guami) {
- cJSON *old_guami_local_JSON = OpenAPI_guami_convertToJSON(assign_ebi_data->old_guami);
- if (old_guami_local_JSON == NULL) {
- ogs_error("OpenAPI_assign_ebi_data_convertToJSON() failed [old_guami]");
- goto end;
- }
- cJSON_AddItemToObject(item, "oldGuami", old_guami_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_assign_ebi_data_convertToJSON() failed [old_guami]");
- goto end;
- }
+ cJSON *old_guami_local_JSON = OpenAPI_guami_convertToJSON(assign_ebi_data->old_guami);
+ if (old_guami_local_JSON == NULL) {
+ ogs_error("OpenAPI_assign_ebi_data_convertToJSON() failed [old_guami]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "oldGuami", old_guami_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_assign_ebi_data_convertToJSON() failed [old_guami]");
+ goto end;
+ }
}
end:
@@ -118,7 +118,7 @@ OpenAPI_assign_ebi_data_t *OpenAPI_assign_ebi_data_parseFromJSON(cJSON *assign_e
goto end;
}
-
+
if (!cJSON_IsNumber(pdu_session_id)) {
ogs_error("OpenAPI_assign_ebi_data_parseFromJSON() failed [pdu_session_id]");
goto end;
@@ -127,51 +127,51 @@ OpenAPI_assign_ebi_data_t *OpenAPI_assign_ebi_data_parseFromJSON(cJSON *assign_e
cJSON *arp_list = cJSON_GetObjectItemCaseSensitive(assign_ebi_dataJSON, "arpList");
OpenAPI_list_t *arp_listList;
- if (arp_list) {
- cJSON *arp_list_local_nonprimitive;
- if (!cJSON_IsArray(arp_list)) {
+ if (arp_list) {
+ cJSON *arp_list_local_nonprimitive;
+ if (!cJSON_IsArray(arp_list)){
+ ogs_error("OpenAPI_assign_ebi_data_parseFromJSON() failed [arp_list]");
+ goto end;
+ }
+
+ arp_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(arp_list_local_nonprimitive, arp_list ) {
+ if (!cJSON_IsObject(arp_list_local_nonprimitive)) {
ogs_error("OpenAPI_assign_ebi_data_parseFromJSON() failed [arp_list]");
goto end;
}
+ OpenAPI_arp_t *arp_listItem = OpenAPI_arp_parseFromJSON(arp_list_local_nonprimitive);
- arp_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(arp_list_local_nonprimitive, arp_list ) {
- if (!cJSON_IsObject(arp_list_local_nonprimitive)) {
- ogs_error("OpenAPI_assign_ebi_data_parseFromJSON() failed [arp_list]");
- goto end;
- }
- OpenAPI_arp_t *arp_listItem = OpenAPI_arp_parseFromJSON(arp_list_local_nonprimitive);
-
- OpenAPI_list_add(arp_listList, arp_listItem);
- }
+ OpenAPI_list_add(arp_listList, arp_listItem);
+ }
}
cJSON *released_ebi_list = cJSON_GetObjectItemCaseSensitive(assign_ebi_dataJSON, "releasedEbiList");
OpenAPI_list_t *released_ebi_listList;
- if (released_ebi_list) {
- cJSON *released_ebi_list_local;
- if (!cJSON_IsArray(released_ebi_list)) {
- ogs_error("OpenAPI_assign_ebi_data_parseFromJSON() failed [released_ebi_list]");
- goto end;
- }
- released_ebi_listList = OpenAPI_list_create();
+ if (released_ebi_list) {
+ cJSON *released_ebi_list_local;
+ if (!cJSON_IsArray(released_ebi_list)) {
+ ogs_error("OpenAPI_assign_ebi_data_parseFromJSON() failed [released_ebi_list]");
+ goto end;
+ }
+ released_ebi_listList = OpenAPI_list_create();
- cJSON_ArrayForEach(released_ebi_list_local, released_ebi_list) {
- if (!cJSON_IsNumber(released_ebi_list_local)) {
- ogs_error("OpenAPI_assign_ebi_data_parseFromJSON() failed [released_ebi_list]");
- goto end;
- }
- OpenAPI_list_add(released_ebi_listList, &released_ebi_list_local->valuedouble);
- }
+ cJSON_ArrayForEach(released_ebi_list_local, released_ebi_list) {
+ if (!cJSON_IsNumber(released_ebi_list_local)) {
+ ogs_error("OpenAPI_assign_ebi_data_parseFromJSON() failed [released_ebi_list]");
+ goto end;
+ }
+ OpenAPI_list_add(released_ebi_listList , &released_ebi_list_local->valuedouble);
+ }
}
cJSON *old_guami = cJSON_GetObjectItemCaseSensitive(assign_ebi_dataJSON, "oldGuami");
OpenAPI_guami_t *old_guami_local_nonprim = NULL;
- if (old_guami) {
- old_guami_local_nonprim = OpenAPI_guami_parseFromJSON(old_guami);
+ if (old_guami) {
+ old_guami_local_nonprim = OpenAPI_guami_parseFromJSON(old_guami);
}
assign_ebi_data_local_var = OpenAPI_assign_ebi_data_create (
@@ -179,7 +179,7 @@ OpenAPI_assign_ebi_data_t *OpenAPI_assign_ebi_data_parseFromJSON(cJSON *assign_e
arp_list ? arp_listList : NULL,
released_ebi_list ? released_ebi_listList : NULL,
old_guami ? old_guami_local_nonprim : NULL
- );
+ );
return assign_ebi_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/assign_ebi_data.h b/lib/sbi/openapi/model/assign_ebi_data.h
index 3ffc7a473..779dcc434 100644
--- a/lib/sbi/openapi/model/assign_ebi_data.h
+++ b/lib/sbi/openapi/model/assign_ebi_data.h
@@ -1,7 +1,7 @@
/*
* assign_ebi_data.h
*
- *
+ *
*/
#ifndef _OpenAPI_assign_ebi_data_H_
@@ -32,7 +32,7 @@ OpenAPI_assign_ebi_data_t *OpenAPI_assign_ebi_data_create(
OpenAPI_list_t *arp_list,
OpenAPI_list_t *released_ebi_list,
OpenAPI_guami_t *old_guami
- );
+);
void OpenAPI_assign_ebi_data_free(OpenAPI_assign_ebi_data_t *assign_ebi_data);
OpenAPI_assign_ebi_data_t *OpenAPI_assign_ebi_data_parseFromJSON(cJSON *assign_ebi_dataJSON);
cJSON *OpenAPI_assign_ebi_data_convertToJSON(OpenAPI_assign_ebi_data_t *assign_ebi_data);
diff --git a/lib/sbi/openapi/model/assign_ebi_error.c b/lib/sbi/openapi/model/assign_ebi_error.c
index b959f2ca1..bd073573e 100644
--- a/lib/sbi/openapi/model/assign_ebi_error.c
+++ b/lib/sbi/openapi/model/assign_ebi_error.c
@@ -7,7 +7,7 @@
OpenAPI_assign_ebi_error_t *OpenAPI_assign_ebi_error_create(
OpenAPI_problem_details_t *error,
OpenAPI_assign_ebi_failed_t *failure_details
- )
+)
{
OpenAPI_assign_ebi_error_t *assign_ebi_error_local_var = OpenAPI_malloc(sizeof(OpenAPI_assign_ebi_error_t));
if (!assign_ebi_error_local_var) {
@@ -76,7 +76,7 @@ OpenAPI_assign_ebi_error_t *OpenAPI_assign_ebi_error_parseFromJSON(cJSON *assign
}
OpenAPI_problem_details_t *error_local_nonprim = NULL;
-
+
error_local_nonprim = OpenAPI_problem_details_parseFromJSON(error);
cJSON *failure_details = cJSON_GetObjectItemCaseSensitive(assign_ebi_errorJSON, "failureDetails");
@@ -86,13 +86,13 @@ OpenAPI_assign_ebi_error_t *OpenAPI_assign_ebi_error_parseFromJSON(cJSON *assign
}
OpenAPI_assign_ebi_failed_t *failure_details_local_nonprim = NULL;
-
+
failure_details_local_nonprim = OpenAPI_assign_ebi_failed_parseFromJSON(failure_details);
assign_ebi_error_local_var = OpenAPI_assign_ebi_error_create (
error_local_nonprim,
failure_details_local_nonprim
- );
+ );
return assign_ebi_error_local_var;
end:
diff --git a/lib/sbi/openapi/model/assign_ebi_error.h b/lib/sbi/openapi/model/assign_ebi_error.h
index 74e5f8570..1ff25d509 100644
--- a/lib/sbi/openapi/model/assign_ebi_error.h
+++ b/lib/sbi/openapi/model/assign_ebi_error.h
@@ -1,7 +1,7 @@
/*
* assign_ebi_error.h
*
- *
+ *
*/
#ifndef _OpenAPI_assign_ebi_error_H_
@@ -28,7 +28,7 @@ typedef struct OpenAPI_assign_ebi_error_s {
OpenAPI_assign_ebi_error_t *OpenAPI_assign_ebi_error_create(
OpenAPI_problem_details_t *error,
OpenAPI_assign_ebi_failed_t *failure_details
- );
+);
void OpenAPI_assign_ebi_error_free(OpenAPI_assign_ebi_error_t *assign_ebi_error);
OpenAPI_assign_ebi_error_t *OpenAPI_assign_ebi_error_parseFromJSON(cJSON *assign_ebi_errorJSON);
cJSON *OpenAPI_assign_ebi_error_convertToJSON(OpenAPI_assign_ebi_error_t *assign_ebi_error);
diff --git a/lib/sbi/openapi/model/assign_ebi_failed.c b/lib/sbi/openapi/model/assign_ebi_failed.c
index f060300cc..3c92c7bbc 100644
--- a/lib/sbi/openapi/model/assign_ebi_failed.c
+++ b/lib/sbi/openapi/model/assign_ebi_failed.c
@@ -7,7 +7,7 @@
OpenAPI_assign_ebi_failed_t *OpenAPI_assign_ebi_failed_create(
int pdu_session_id,
OpenAPI_list_t *failed_arp_list
- )
+)
{
OpenAPI_assign_ebi_failed_t *assign_ebi_failed_local_var = OpenAPI_malloc(sizeof(OpenAPI_assign_ebi_failed_t));
if (!assign_ebi_failed_local_var) {
@@ -48,24 +48,24 @@ cJSON *OpenAPI_assign_ebi_failed_convertToJSON(OpenAPI_assign_ebi_failed_t *assi
}
if (assign_ebi_failed->failed_arp_list) {
- cJSON *failed_arp_listList = cJSON_AddArrayToObject(item, "failedArpList");
- if (failed_arp_listList == NULL) {
- ogs_error("OpenAPI_assign_ebi_failed_convertToJSON() failed [failed_arp_list]");
- goto end;
- }
+ cJSON *failed_arp_listList = cJSON_AddArrayToObject(item, "failedArpList");
+ if (failed_arp_listList == NULL) {
+ ogs_error("OpenAPI_assign_ebi_failed_convertToJSON() failed [failed_arp_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *failed_arp_list_node;
- if (assign_ebi_failed->failed_arp_list) {
- OpenAPI_list_for_each(assign_ebi_failed->failed_arp_list, failed_arp_list_node) {
- cJSON *itemLocal = OpenAPI_arp_convertToJSON(failed_arp_list_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_assign_ebi_failed_convertToJSON() failed [failed_arp_list]");
- goto end;
- }
- cJSON_AddItemToArray(failed_arp_listList, itemLocal);
+ OpenAPI_lnode_t *failed_arp_list_node;
+ if (assign_ebi_failed->failed_arp_list) {
+ OpenAPI_list_for_each(assign_ebi_failed->failed_arp_list, failed_arp_list_node) {
+ cJSON *itemLocal = OpenAPI_arp_convertToJSON(failed_arp_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_assign_ebi_failed_convertToJSON() failed [failed_arp_list]");
+ goto end;
}
+ cJSON_AddItemToArray(failed_arp_listList, itemLocal);
}
}
+ }
end:
return item;
@@ -80,7 +80,7 @@ OpenAPI_assign_ebi_failed_t *OpenAPI_assign_ebi_failed_parseFromJSON(cJSON *assi
goto end;
}
-
+
if (!cJSON_IsNumber(pdu_session_id)) {
ogs_error("OpenAPI_assign_ebi_failed_parseFromJSON() failed [pdu_session_id]");
goto end;
@@ -89,30 +89,30 @@ OpenAPI_assign_ebi_failed_t *OpenAPI_assign_ebi_failed_parseFromJSON(cJSON *assi
cJSON *failed_arp_list = cJSON_GetObjectItemCaseSensitive(assign_ebi_failedJSON, "failedArpList");
OpenAPI_list_t *failed_arp_listList;
- if (failed_arp_list) {
- cJSON *failed_arp_list_local_nonprimitive;
- if (!cJSON_IsArray(failed_arp_list)) {
+ if (failed_arp_list) {
+ cJSON *failed_arp_list_local_nonprimitive;
+ if (!cJSON_IsArray(failed_arp_list)){
+ ogs_error("OpenAPI_assign_ebi_failed_parseFromJSON() failed [failed_arp_list]");
+ goto end;
+ }
+
+ failed_arp_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(failed_arp_list_local_nonprimitive, failed_arp_list ) {
+ if (!cJSON_IsObject(failed_arp_list_local_nonprimitive)) {
ogs_error("OpenAPI_assign_ebi_failed_parseFromJSON() failed [failed_arp_list]");
goto end;
}
+ OpenAPI_arp_t *failed_arp_listItem = OpenAPI_arp_parseFromJSON(failed_arp_list_local_nonprimitive);
- failed_arp_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(failed_arp_list_local_nonprimitive, failed_arp_list ) {
- if (!cJSON_IsObject(failed_arp_list_local_nonprimitive)) {
- ogs_error("OpenAPI_assign_ebi_failed_parseFromJSON() failed [failed_arp_list]");
- goto end;
- }
- OpenAPI_arp_t *failed_arp_listItem = OpenAPI_arp_parseFromJSON(failed_arp_list_local_nonprimitive);
-
- OpenAPI_list_add(failed_arp_listList, failed_arp_listItem);
- }
+ OpenAPI_list_add(failed_arp_listList, failed_arp_listItem);
+ }
}
assign_ebi_failed_local_var = OpenAPI_assign_ebi_failed_create (
pdu_session_id->valuedouble,
failed_arp_list ? failed_arp_listList : NULL
- );
+ );
return assign_ebi_failed_local_var;
end:
diff --git a/lib/sbi/openapi/model/assign_ebi_failed.h b/lib/sbi/openapi/model/assign_ebi_failed.h
index 5d29796d5..c4fbb757e 100644
--- a/lib/sbi/openapi/model/assign_ebi_failed.h
+++ b/lib/sbi/openapi/model/assign_ebi_failed.h
@@ -1,7 +1,7 @@
/*
* assign_ebi_failed.h
*
- *
+ *
*/
#ifndef _OpenAPI_assign_ebi_failed_H_
@@ -27,7 +27,7 @@ typedef struct OpenAPI_assign_ebi_failed_s {
OpenAPI_assign_ebi_failed_t *OpenAPI_assign_ebi_failed_create(
int pdu_session_id,
OpenAPI_list_t *failed_arp_list
- );
+);
void OpenAPI_assign_ebi_failed_free(OpenAPI_assign_ebi_failed_t *assign_ebi_failed);
OpenAPI_assign_ebi_failed_t *OpenAPI_assign_ebi_failed_parseFromJSON(cJSON *assign_ebi_failedJSON);
cJSON *OpenAPI_assign_ebi_failed_convertToJSON(OpenAPI_assign_ebi_failed_t *assign_ebi_failed);
diff --git a/lib/sbi/openapi/model/assigned_ebi_data.c b/lib/sbi/openapi/model/assigned_ebi_data.c
index 5368d6643..484a0409f 100644
--- a/lib/sbi/openapi/model/assigned_ebi_data.c
+++ b/lib/sbi/openapi/model/assigned_ebi_data.c
@@ -9,7 +9,7 @@ OpenAPI_assigned_ebi_data_t *OpenAPI_assigned_ebi_data_create(
OpenAPI_list_t *assigned_ebi_list,
OpenAPI_list_t *failed_arp_list,
OpenAPI_list_t *released_ebi_list
- )
+)
{
OpenAPI_assigned_ebi_data_t *assigned_ebi_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_assigned_ebi_data_t));
if (!assigned_ebi_data_local_var) {
@@ -78,39 +78,39 @@ cJSON *OpenAPI_assigned_ebi_data_convertToJSON(OpenAPI_assigned_ebi_data_t *assi
}
if (assigned_ebi_data->failed_arp_list) {
- cJSON *failed_arp_listList = cJSON_AddArrayToObject(item, "failedArpList");
- if (failed_arp_listList == NULL) {
- ogs_error("OpenAPI_assigned_ebi_data_convertToJSON() failed [failed_arp_list]");
- goto end;
- }
+ cJSON *failed_arp_listList = cJSON_AddArrayToObject(item, "failedArpList");
+ if (failed_arp_listList == NULL) {
+ ogs_error("OpenAPI_assigned_ebi_data_convertToJSON() failed [failed_arp_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *failed_arp_list_node;
- if (assigned_ebi_data->failed_arp_list) {
- OpenAPI_list_for_each(assigned_ebi_data->failed_arp_list, failed_arp_list_node) {
- cJSON *itemLocal = OpenAPI_arp_convertToJSON(failed_arp_list_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_assigned_ebi_data_convertToJSON() failed [failed_arp_list]");
- goto end;
- }
- cJSON_AddItemToArray(failed_arp_listList, itemLocal);
+ OpenAPI_lnode_t *failed_arp_list_node;
+ if (assigned_ebi_data->failed_arp_list) {
+ OpenAPI_list_for_each(assigned_ebi_data->failed_arp_list, failed_arp_list_node) {
+ cJSON *itemLocal = OpenAPI_arp_convertToJSON(failed_arp_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_assigned_ebi_data_convertToJSON() failed [failed_arp_list]");
+ goto end;
}
+ cJSON_AddItemToArray(failed_arp_listList, itemLocal);
}
}
+ }
if (assigned_ebi_data->released_ebi_list) {
- cJSON *released_ebi_list = cJSON_AddArrayToObject(item, "releasedEbiList");
- if (released_ebi_list == NULL) {
- ogs_error("OpenAPI_assigned_ebi_data_convertToJSON() failed [released_ebi_list]");
- goto end;
- }
+ cJSON *released_ebi_list = cJSON_AddArrayToObject(item, "releasedEbiList");
+ if (released_ebi_list == NULL) {
+ ogs_error("OpenAPI_assigned_ebi_data_convertToJSON() failed [released_ebi_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *released_ebi_list_node;
- OpenAPI_list_for_each(assigned_ebi_data->released_ebi_list, released_ebi_list_node) {
- if (cJSON_AddNumberToObject(released_ebi_list, "", *(double *)released_ebi_list_node->data) == NULL) {
- ogs_error("OpenAPI_assigned_ebi_data_convertToJSON() failed [released_ebi_list]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *released_ebi_list_node;
+ OpenAPI_list_for_each(assigned_ebi_data->released_ebi_list, released_ebi_list_node) {
+ if (cJSON_AddNumberToObject(released_ebi_list, "", *(double *)released_ebi_list_node->data) == NULL) {
+ ogs_error("OpenAPI_assigned_ebi_data_convertToJSON() failed [released_ebi_list]");
+ goto end;
+ }
+ }
}
end:
@@ -126,7 +126,7 @@ OpenAPI_assigned_ebi_data_t *OpenAPI_assigned_ebi_data_parseFromJSON(cJSON *assi
goto end;
}
-
+
if (!cJSON_IsNumber(pdu_session_id)) {
ogs_error("OpenAPI_assigned_ebi_data_parseFromJSON() failed [pdu_session_id]");
goto end;
@@ -139,9 +139,9 @@ OpenAPI_assigned_ebi_data_t *OpenAPI_assigned_ebi_data_parseFromJSON(cJSON *assi
}
OpenAPI_list_t *assigned_ebi_listList;
-
+
cJSON *assigned_ebi_list_local_nonprimitive;
- if (!cJSON_IsArray(assigned_ebi_list)) {
+ if (!cJSON_IsArray(assigned_ebi_list)){
ogs_error("OpenAPI_assigned_ebi_data_parseFromJSON() failed [assigned_ebi_list]");
goto end;
}
@@ -161,44 +161,44 @@ OpenAPI_assigned_ebi_data_t *OpenAPI_assigned_ebi_data_parseFromJSON(cJSON *assi
cJSON *failed_arp_list = cJSON_GetObjectItemCaseSensitive(assigned_ebi_dataJSON, "failedArpList");
OpenAPI_list_t *failed_arp_listList;
- if (failed_arp_list) {
- cJSON *failed_arp_list_local_nonprimitive;
- if (!cJSON_IsArray(failed_arp_list)) {
+ if (failed_arp_list) {
+ cJSON *failed_arp_list_local_nonprimitive;
+ if (!cJSON_IsArray(failed_arp_list)){
+ ogs_error("OpenAPI_assigned_ebi_data_parseFromJSON() failed [failed_arp_list]");
+ goto end;
+ }
+
+ failed_arp_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(failed_arp_list_local_nonprimitive, failed_arp_list ) {
+ if (!cJSON_IsObject(failed_arp_list_local_nonprimitive)) {
ogs_error("OpenAPI_assigned_ebi_data_parseFromJSON() failed [failed_arp_list]");
goto end;
}
+ OpenAPI_arp_t *failed_arp_listItem = OpenAPI_arp_parseFromJSON(failed_arp_list_local_nonprimitive);
- failed_arp_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(failed_arp_list_local_nonprimitive, failed_arp_list ) {
- if (!cJSON_IsObject(failed_arp_list_local_nonprimitive)) {
- ogs_error("OpenAPI_assigned_ebi_data_parseFromJSON() failed [failed_arp_list]");
- goto end;
- }
- OpenAPI_arp_t *failed_arp_listItem = OpenAPI_arp_parseFromJSON(failed_arp_list_local_nonprimitive);
-
- OpenAPI_list_add(failed_arp_listList, failed_arp_listItem);
- }
+ OpenAPI_list_add(failed_arp_listList, failed_arp_listItem);
+ }
}
cJSON *released_ebi_list = cJSON_GetObjectItemCaseSensitive(assigned_ebi_dataJSON, "releasedEbiList");
OpenAPI_list_t *released_ebi_listList;
- if (released_ebi_list) {
- cJSON *released_ebi_list_local;
- if (!cJSON_IsArray(released_ebi_list)) {
- ogs_error("OpenAPI_assigned_ebi_data_parseFromJSON() failed [released_ebi_list]");
- goto end;
- }
- released_ebi_listList = OpenAPI_list_create();
+ if (released_ebi_list) {
+ cJSON *released_ebi_list_local;
+ if (!cJSON_IsArray(released_ebi_list)) {
+ ogs_error("OpenAPI_assigned_ebi_data_parseFromJSON() failed [released_ebi_list]");
+ goto end;
+ }
+ released_ebi_listList = OpenAPI_list_create();
- cJSON_ArrayForEach(released_ebi_list_local, released_ebi_list) {
- if (!cJSON_IsNumber(released_ebi_list_local)) {
- ogs_error("OpenAPI_assigned_ebi_data_parseFromJSON() failed [released_ebi_list]");
- goto end;
- }
- OpenAPI_list_add(released_ebi_listList, &released_ebi_list_local->valuedouble);
- }
+ cJSON_ArrayForEach(released_ebi_list_local, released_ebi_list) {
+ if (!cJSON_IsNumber(released_ebi_list_local)) {
+ ogs_error("OpenAPI_assigned_ebi_data_parseFromJSON() failed [released_ebi_list]");
+ goto end;
+ }
+ OpenAPI_list_add(released_ebi_listList , &released_ebi_list_local->valuedouble);
+ }
}
assigned_ebi_data_local_var = OpenAPI_assigned_ebi_data_create (
@@ -206,7 +206,7 @@ OpenAPI_assigned_ebi_data_t *OpenAPI_assigned_ebi_data_parseFromJSON(cJSON *assi
assigned_ebi_listList,
failed_arp_list ? failed_arp_listList : NULL,
released_ebi_list ? released_ebi_listList : NULL
- );
+ );
return assigned_ebi_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/assigned_ebi_data.h b/lib/sbi/openapi/model/assigned_ebi_data.h
index 6ac2fbdd4..128324e9b 100644
--- a/lib/sbi/openapi/model/assigned_ebi_data.h
+++ b/lib/sbi/openapi/model/assigned_ebi_data.h
@@ -1,7 +1,7 @@
/*
* assigned_ebi_data.h
*
- *
+ *
*/
#ifndef _OpenAPI_assigned_ebi_data_H_
@@ -32,7 +32,7 @@ OpenAPI_assigned_ebi_data_t *OpenAPI_assigned_ebi_data_create(
OpenAPI_list_t *assigned_ebi_list,
OpenAPI_list_t *failed_arp_list,
OpenAPI_list_t *released_ebi_list
- );
+);
void OpenAPI_assigned_ebi_data_free(OpenAPI_assigned_ebi_data_t *assigned_ebi_data);
OpenAPI_assigned_ebi_data_t *OpenAPI_assigned_ebi_data_parseFromJSON(cJSON *assigned_ebi_dataJSON);
cJSON *OpenAPI_assigned_ebi_data_convertToJSON(OpenAPI_assigned_ebi_data_t *assigned_ebi_data);
diff --git a/lib/sbi/openapi/model/association_type.c b/lib/sbi/openapi/model/association_type.c
index 9db72d309..57a0498eb 100644
--- a/lib/sbi/openapi/model/association_type.c
+++ b/lib/sbi/openapi/model/association_type.c
@@ -5,7 +5,7 @@
#include "association_type.h"
OpenAPI_association_type_t *OpenAPI_association_type_create(
- )
+)
{
OpenAPI_association_type_t *association_type_local_var = OpenAPI_malloc(sizeof(OpenAPI_association_type_t));
if (!association_type_local_var) {
@@ -42,7 +42,7 @@ OpenAPI_association_type_t *OpenAPI_association_type_parseFromJSON(cJSON *associ
{
OpenAPI_association_type_t *association_type_local_var = NULL;
association_type_local_var = OpenAPI_association_type_create (
- );
+ );
return association_type_local_var;
end:
diff --git a/lib/sbi/openapi/model/association_type.h b/lib/sbi/openapi/model/association_type.h
index a7a1993ff..ef6437b8a 100644
--- a/lib/sbi/openapi/model/association_type.h
+++ b/lib/sbi/openapi/model/association_type.h
@@ -1,7 +1,7 @@
/*
* association_type.h
*
- *
+ *
*/
#ifndef _OpenAPI_association_type_H_
@@ -12,6 +12,7 @@
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
+#include "association_type_any_of.h"
#ifdef __cplusplus
extern "C" {
@@ -22,7 +23,7 @@ typedef struct OpenAPI_association_type_s {
} OpenAPI_association_type_t;
OpenAPI_association_type_t *OpenAPI_association_type_create(
- );
+);
void OpenAPI_association_type_free(OpenAPI_association_type_t *association_type);
OpenAPI_association_type_t *OpenAPI_association_type_parseFromJSON(cJSON *association_typeJSON);
cJSON *OpenAPI_association_type_convertToJSON(OpenAPI_association_type_t *association_type);
diff --git a/lib/sbi/openapi/model/association_type_any_of.c b/lib/sbi/openapi/model/association_type_any_of.c
new file mode 100644
index 000000000..d885a171b
--- /dev/null
+++ b/lib/sbi/openapi/model/association_type_any_of.c
@@ -0,0 +1,30 @@
+
+#include
+#include
+#include
+#include "association_type_any_of.h"
+
+char* OpenAPI_association_type_any_of_ToString(OpenAPI_association_type_any_of_e association_type_any_of)
+{
+ const char *association_type_any_ofArray[] = { "NULL", "IMEI_CHANGE", "IMEISV_CHANGE" };
+ size_t sizeofArray = sizeof(association_type_any_ofArray) / sizeof(association_type_any_ofArray[0]);
+ if (association_type_any_of < sizeofArray)
+ return (char *)association_type_any_ofArray[association_type_any_of];
+ else
+ return (char *)"Unknown";
+}
+
+OpenAPI_association_type_any_of_e OpenAPI_association_type_any_of_FromString(char* association_type_any_of)
+{
+ int stringToReturn = 0;
+ const char *association_type_any_ofArray[] = { "NULL", "IMEI_CHANGE", "IMEISV_CHANGE" };
+ size_t sizeofArray = sizeof(association_type_any_ofArray) / sizeof(association_type_any_ofArray[0]);
+ while (stringToReturn < sizeofArray) {
+ if (strcmp(association_type_any_of, association_type_any_ofArray[stringToReturn]) == 0) {
+ return stringToReturn;
+ }
+ stringToReturn++;
+ }
+ return 0;
+}
+
diff --git a/lib/sbi/openapi/model/association_type_any_of.h b/lib/sbi/openapi/model/association_type_any_of.h
new file mode 100644
index 000000000..f323a427b
--- /dev/null
+++ b/lib/sbi/openapi/model/association_type_any_of.h
@@ -0,0 +1,31 @@
+/*
+ * association_type_any_of.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_association_type_any_of_H_
+#define _OpenAPI_association_type_any_of_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum { OpenAPI_association_type_any_of_NULL = 0, OpenAPI_association_type_any_of_IMEI_CHANGE, OpenAPI_association_type_any_of_IMEISV_CHANGE } OpenAPI_association_type_any_of_e;
+
+char* OpenAPI_association_type_any_of_ToString(OpenAPI_association_type_any_of_e association_type_any_of);
+
+OpenAPI_association_type_any_of_e OpenAPI_association_type_any_of_FromString(char* association_type_any_of);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_association_type_any_of_H_ */
+
diff --git a/lib/sbi/openapi/model/atom.c b/lib/sbi/openapi/model/atom.c
index 30a43f12c..512d85e0b 100644
--- a/lib/sbi/openapi/model/atom.c
+++ b/lib/sbi/openapi/model/atom.c
@@ -8,7 +8,7 @@ OpenAPI_atom_t *OpenAPI_atom_create(
char *attr,
char *value,
int negative
- )
+)
{
OpenAPI_atom_t *atom_local_var = OpenAPI_malloc(sizeof(OpenAPI_atom_t));
if (!atom_local_var) {
@@ -53,10 +53,10 @@ cJSON *OpenAPI_atom_convertToJSON(OpenAPI_atom_t *atom)
}
if (atom->negative) {
- if (cJSON_AddBoolToObject(item, "negative", atom->negative) == NULL) {
- ogs_error("OpenAPI_atom_convertToJSON() failed [negative]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "negative", atom->negative) == NULL) {
+ ogs_error("OpenAPI_atom_convertToJSON() failed [negative]");
+ goto end;
+ }
}
end:
@@ -72,7 +72,7 @@ OpenAPI_atom_t *OpenAPI_atom_parseFromJSON(cJSON *atomJSON)
goto end;
}
-
+
if (!cJSON_IsString(attr)) {
ogs_error("OpenAPI_atom_parseFromJSON() failed [attr]");
goto end;
@@ -84,7 +84,7 @@ OpenAPI_atom_t *OpenAPI_atom_parseFromJSON(cJSON *atomJSON)
goto end;
}
-
+
if (!cJSON_IsString(value)) {
ogs_error("OpenAPI_atom_parseFromJSON() failed [value]");
goto end;
@@ -92,18 +92,18 @@ OpenAPI_atom_t *OpenAPI_atom_parseFromJSON(cJSON *atomJSON)
cJSON *negative = cJSON_GetObjectItemCaseSensitive(atomJSON, "negative");
- if (negative) {
- if (!cJSON_IsBool(negative)) {
- ogs_error("OpenAPI_atom_parseFromJSON() failed [negative]");
- goto end;
- }
+ if (negative) {
+ if (!cJSON_IsBool(negative)) {
+ ogs_error("OpenAPI_atom_parseFromJSON() failed [negative]");
+ goto end;
+ }
}
atom_local_var = OpenAPI_atom_create (
ogs_strdup_or_assert(attr->valuestring),
ogs_strdup_or_assert(value->valuestring),
negative ? negative->valueint : 0
- );
+ );
return atom_local_var;
end:
diff --git a/lib/sbi/openapi/model/atom.h b/lib/sbi/openapi/model/atom.h
index 512a4a94b..ef1362d6b 100644
--- a/lib/sbi/openapi/model/atom.h
+++ b/lib/sbi/openapi/model/atom.h
@@ -1,7 +1,7 @@
/*
* atom.h
*
- *
+ *
*/
#ifndef _OpenAPI_atom_H_
@@ -28,7 +28,7 @@ OpenAPI_atom_t *OpenAPI_atom_create(
char *attr,
char *value,
int negative
- );
+);
void OpenAPI_atom_free(OpenAPI_atom_t *atom);
OpenAPI_atom_t *OpenAPI_atom_parseFromJSON(cJSON *atomJSON);
cJSON *OpenAPI_atom_convertToJSON(OpenAPI_atom_t *atom);
diff --git a/lib/sbi/openapi/model/atsss_capability.c b/lib/sbi/openapi/model/atsss_capability.c
index 39f9a3db4..2b99e01c2 100644
--- a/lib/sbi/openapi/model/atsss_capability.c
+++ b/lib/sbi/openapi/model/atsss_capability.c
@@ -8,7 +8,7 @@ OpenAPI_atsss_capability_t *OpenAPI_atsss_capability_create(
int atsss_ll,
int mptcp,
int rtt_without_pmf
- )
+)
{
OpenAPI_atsss_capability_t *atsss_capability_local_var = OpenAPI_malloc(sizeof(OpenAPI_atsss_capability_t));
if (!atsss_capability_local_var) {
@@ -41,24 +41,24 @@ cJSON *OpenAPI_atsss_capability_convertToJSON(OpenAPI_atsss_capability_t *atsss_
item = cJSON_CreateObject();
if (atsss_capability->atsss_ll) {
- if (cJSON_AddBoolToObject(item, "atsssLL", atsss_capability->atsss_ll) == NULL) {
- ogs_error("OpenAPI_atsss_capability_convertToJSON() failed [atsss_ll]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "atsssLL", atsss_capability->atsss_ll) == NULL) {
+ ogs_error("OpenAPI_atsss_capability_convertToJSON() failed [atsss_ll]");
+ goto end;
+ }
}
if (atsss_capability->mptcp) {
- if (cJSON_AddBoolToObject(item, "mptcp", atsss_capability->mptcp) == NULL) {
- ogs_error("OpenAPI_atsss_capability_convertToJSON() failed [mptcp]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "mptcp", atsss_capability->mptcp) == NULL) {
+ ogs_error("OpenAPI_atsss_capability_convertToJSON() failed [mptcp]");
+ goto end;
+ }
}
if (atsss_capability->rtt_without_pmf) {
- if (cJSON_AddBoolToObject(item, "rttWithoutPmf", atsss_capability->rtt_without_pmf) == NULL) {
- ogs_error("OpenAPI_atsss_capability_convertToJSON() failed [rtt_without_pmf]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "rttWithoutPmf", atsss_capability->rtt_without_pmf) == NULL) {
+ ogs_error("OpenAPI_atsss_capability_convertToJSON() failed [rtt_without_pmf]");
+ goto end;
+ }
}
end:
@@ -70,36 +70,36 @@ OpenAPI_atsss_capability_t *OpenAPI_atsss_capability_parseFromJSON(cJSON *atsss_
OpenAPI_atsss_capability_t *atsss_capability_local_var = NULL;
cJSON *atsss_ll = cJSON_GetObjectItemCaseSensitive(atsss_capabilityJSON, "atsssLL");
- if (atsss_ll) {
- if (!cJSON_IsBool(atsss_ll)) {
- ogs_error("OpenAPI_atsss_capability_parseFromJSON() failed [atsss_ll]");
- goto end;
- }
+ if (atsss_ll) {
+ if (!cJSON_IsBool(atsss_ll)) {
+ ogs_error("OpenAPI_atsss_capability_parseFromJSON() failed [atsss_ll]");
+ goto end;
+ }
}
cJSON *mptcp = cJSON_GetObjectItemCaseSensitive(atsss_capabilityJSON, "mptcp");
- if (mptcp) {
- if (!cJSON_IsBool(mptcp)) {
- ogs_error("OpenAPI_atsss_capability_parseFromJSON() failed [mptcp]");
- goto end;
- }
+ if (mptcp) {
+ if (!cJSON_IsBool(mptcp)) {
+ ogs_error("OpenAPI_atsss_capability_parseFromJSON() failed [mptcp]");
+ goto end;
+ }
}
cJSON *rtt_without_pmf = cJSON_GetObjectItemCaseSensitive(atsss_capabilityJSON, "rttWithoutPmf");
- if (rtt_without_pmf) {
- if (!cJSON_IsBool(rtt_without_pmf)) {
- ogs_error("OpenAPI_atsss_capability_parseFromJSON() failed [rtt_without_pmf]");
- goto end;
- }
+ if (rtt_without_pmf) {
+ if (!cJSON_IsBool(rtt_without_pmf)) {
+ ogs_error("OpenAPI_atsss_capability_parseFromJSON() failed [rtt_without_pmf]");
+ goto end;
+ }
}
atsss_capability_local_var = OpenAPI_atsss_capability_create (
atsss_ll ? atsss_ll->valueint : 0,
mptcp ? mptcp->valueint : 0,
rtt_without_pmf ? rtt_without_pmf->valueint : 0
- );
+ );
return atsss_capability_local_var;
end:
diff --git a/lib/sbi/openapi/model/atsss_capability.h b/lib/sbi/openapi/model/atsss_capability.h
index d49bc6565..63c4afed2 100644
--- a/lib/sbi/openapi/model/atsss_capability.h
+++ b/lib/sbi/openapi/model/atsss_capability.h
@@ -1,7 +1,7 @@
/*
* atsss_capability.h
*
- *
+ *
*/
#ifndef _OpenAPI_atsss_capability_H_
@@ -28,7 +28,7 @@ OpenAPI_atsss_capability_t *OpenAPI_atsss_capability_create(
int atsss_ll,
int mptcp,
int rtt_without_pmf
- );
+);
void OpenAPI_atsss_capability_free(OpenAPI_atsss_capability_t *atsss_capability);
OpenAPI_atsss_capability_t *OpenAPI_atsss_capability_parseFromJSON(cJSON *atsss_capabilityJSON);
cJSON *OpenAPI_atsss_capability_convertToJSON(OpenAPI_atsss_capability_t *atsss_capability);
diff --git a/lib/sbi/openapi/model/atsss_capability_any_of.c b/lib/sbi/openapi/model/atsss_capability_any_of.c
new file mode 100644
index 000000000..133ddd6da
--- /dev/null
+++ b/lib/sbi/openapi/model/atsss_capability_any_of.c
@@ -0,0 +1,30 @@
+
+#include
+#include
+#include
+#include "atsss_capability_any_of.h"
+
+char* OpenAPI_atsss_capability_any_of_ToString(OpenAPI_atsss_capability_any_of_e atsss_capability_any_of)
+{
+ const char *atsss_capability_any_ofArray[] = { "NULL", "MPTCP_ATSSS_LL_WITH_ASMODE_UL", "MPTCP_ATSSS_LL_WITH_EXSDMODE_DL_ASMODE_UL", "MPTCP_ATSSS_LL_WITH_ASMODE_DLUL", "ATSSS_LL", "MPTCP_ATSSS_LL" };
+ size_t sizeofArray = sizeof(atsss_capability_any_ofArray) / sizeof(atsss_capability_any_ofArray[0]);
+ if (atsss_capability_any_of < sizeofArray)
+ return (char *)atsss_capability_any_ofArray[atsss_capability_any_of];
+ else
+ return (char *)"Unknown";
+}
+
+OpenAPI_atsss_capability_any_of_e OpenAPI_atsss_capability_any_of_FromString(char* atsss_capability_any_of)
+{
+ int stringToReturn = 0;
+ const char *atsss_capability_any_ofArray[] = { "NULL", "MPTCP_ATSSS_LL_WITH_ASMODE_UL", "MPTCP_ATSSS_LL_WITH_EXSDMODE_DL_ASMODE_UL", "MPTCP_ATSSS_LL_WITH_ASMODE_DLUL", "ATSSS_LL", "MPTCP_ATSSS_LL" };
+ size_t sizeofArray = sizeof(atsss_capability_any_ofArray) / sizeof(atsss_capability_any_ofArray[0]);
+ while (stringToReturn < sizeofArray) {
+ if (strcmp(atsss_capability_any_of, atsss_capability_any_ofArray[stringToReturn]) == 0) {
+ return stringToReturn;
+ }
+ stringToReturn++;
+ }
+ return 0;
+}
+
diff --git a/lib/sbi/openapi/model/atsss_capability_any_of.h b/lib/sbi/openapi/model/atsss_capability_any_of.h
new file mode 100644
index 000000000..5ddc0b677
--- /dev/null
+++ b/lib/sbi/openapi/model/atsss_capability_any_of.h
@@ -0,0 +1,31 @@
+/*
+ * atsss_capability_any_of.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_atsss_capability_any_of_H_
+#define _OpenAPI_atsss_capability_any_of_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum { OpenAPI_atsss_capability_any_of_NULL = 0, OpenAPI_atsss_capability_any_of_MPTCP_ATSSS_LL_WITH_ASMODE_UL, OpenAPI_atsss_capability_any_of_MPTCP_ATSSS_LL_WITH_EXSDMODE_DL_ASMODE_UL, OpenAPI_atsss_capability_any_of_MPTCP_ATSSS_LL_WITH_ASMODE_DLUL, OpenAPI_atsss_capability_any_of_ATSSS_LL, OpenAPI_atsss_capability_any_of_MPTCP_ATSSS_LL } OpenAPI_atsss_capability_any_of_e;
+
+char* OpenAPI_atsss_capability_any_of_ToString(OpenAPI_atsss_capability_any_of_e atsss_capability_any_of);
+
+OpenAPI_atsss_capability_any_of_e OpenAPI_atsss_capability_any_of_FromString(char* atsss_capability_any_of);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_atsss_capability_any_of_H_ */
+
diff --git a/lib/sbi/openapi/model/ausf_info.c b/lib/sbi/openapi/model/ausf_info.c
index d4bd4d426..83f0456c0 100644
--- a/lib/sbi/openapi/model/ausf_info.c
+++ b/lib/sbi/openapi/model/ausf_info.c
@@ -8,7 +8,7 @@ OpenAPI_ausf_info_t *OpenAPI_ausf_info_create(
char *group_id,
OpenAPI_list_t *supi_ranges,
OpenAPI_list_t *routing_indicators
- )
+)
{
OpenAPI_ausf_info_t *ausf_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_ausf_info_t));
if (!ausf_info_local_var) {
@@ -50,46 +50,46 @@ cJSON *OpenAPI_ausf_info_convertToJSON(OpenAPI_ausf_info_t *ausf_info)
item = cJSON_CreateObject();
if (ausf_info->group_id) {
- if (cJSON_AddStringToObject(item, "groupId", ausf_info->group_id) == NULL) {
- ogs_error("OpenAPI_ausf_info_convertToJSON() failed [group_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "groupId", ausf_info->group_id) == NULL) {
+ ogs_error("OpenAPI_ausf_info_convertToJSON() failed [group_id]");
+ goto end;
+ }
}
if (ausf_info->supi_ranges) {
- cJSON *supi_rangesList = cJSON_AddArrayToObject(item, "supiRanges");
- if (supi_rangesList == NULL) {
- ogs_error("OpenAPI_ausf_info_convertToJSON() failed [supi_ranges]");
- goto end;
- }
+ cJSON *supi_rangesList = cJSON_AddArrayToObject(item, "supiRanges");
+ if (supi_rangesList == NULL) {
+ ogs_error("OpenAPI_ausf_info_convertToJSON() failed [supi_ranges]");
+ goto end;
+ }
- OpenAPI_lnode_t *supi_ranges_node;
- if (ausf_info->supi_ranges) {
- OpenAPI_list_for_each(ausf_info->supi_ranges, supi_ranges_node) {
- cJSON *itemLocal = OpenAPI_supi_range_convertToJSON(supi_ranges_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_ausf_info_convertToJSON() failed [supi_ranges]");
- goto end;
- }
- cJSON_AddItemToArray(supi_rangesList, itemLocal);
+ OpenAPI_lnode_t *supi_ranges_node;
+ if (ausf_info->supi_ranges) {
+ OpenAPI_list_for_each(ausf_info->supi_ranges, supi_ranges_node) {
+ cJSON *itemLocal = OpenAPI_supi_range_convertToJSON(supi_ranges_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_ausf_info_convertToJSON() failed [supi_ranges]");
+ goto end;
}
+ cJSON_AddItemToArray(supi_rangesList, itemLocal);
}
}
+ }
if (ausf_info->routing_indicators) {
- cJSON *routing_indicators = cJSON_AddArrayToObject(item, "routingIndicators");
- if (routing_indicators == NULL) {
- ogs_error("OpenAPI_ausf_info_convertToJSON() failed [routing_indicators]");
- goto end;
- }
+ cJSON *routing_indicators = cJSON_AddArrayToObject(item, "routingIndicators");
+ if (routing_indicators == NULL) {
+ ogs_error("OpenAPI_ausf_info_convertToJSON() failed [routing_indicators]");
+ goto end;
+ }
- OpenAPI_lnode_t *routing_indicators_node;
- OpenAPI_list_for_each(ausf_info->routing_indicators, routing_indicators_node) {
- if (cJSON_AddStringToObject(routing_indicators, "", (char*)routing_indicators_node->data) == NULL) {
- ogs_error("OpenAPI_ausf_info_convertToJSON() failed [routing_indicators]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *routing_indicators_node;
+ OpenAPI_list_for_each(ausf_info->routing_indicators, routing_indicators_node) {
+ if (cJSON_AddStringToObject(routing_indicators, "", (char*)routing_indicators_node->data) == NULL) {
+ ogs_error("OpenAPI_ausf_info_convertToJSON() failed [routing_indicators]");
+ goto end;
+ }
+ }
}
end:
@@ -101,61 +101,61 @@ OpenAPI_ausf_info_t *OpenAPI_ausf_info_parseFromJSON(cJSON *ausf_infoJSON)
OpenAPI_ausf_info_t *ausf_info_local_var = NULL;
cJSON *group_id = cJSON_GetObjectItemCaseSensitive(ausf_infoJSON, "groupId");
- if (group_id) {
- if (!cJSON_IsString(group_id)) {
- ogs_error("OpenAPI_ausf_info_parseFromJSON() failed [group_id]");
- goto end;
- }
+ if (group_id) {
+ if (!cJSON_IsString(group_id)) {
+ ogs_error("OpenAPI_ausf_info_parseFromJSON() failed [group_id]");
+ goto end;
+ }
}
cJSON *supi_ranges = cJSON_GetObjectItemCaseSensitive(ausf_infoJSON, "supiRanges");
OpenAPI_list_t *supi_rangesList;
- if (supi_ranges) {
- cJSON *supi_ranges_local_nonprimitive;
- if (!cJSON_IsArray(supi_ranges)) {
+ if (supi_ranges) {
+ cJSON *supi_ranges_local_nonprimitive;
+ if (!cJSON_IsArray(supi_ranges)){
+ ogs_error("OpenAPI_ausf_info_parseFromJSON() failed [supi_ranges]");
+ goto end;
+ }
+
+ supi_rangesList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(supi_ranges_local_nonprimitive, supi_ranges ) {
+ if (!cJSON_IsObject(supi_ranges_local_nonprimitive)) {
ogs_error("OpenAPI_ausf_info_parseFromJSON() failed [supi_ranges]");
goto end;
}
+ OpenAPI_supi_range_t *supi_rangesItem = OpenAPI_supi_range_parseFromJSON(supi_ranges_local_nonprimitive);
- supi_rangesList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(supi_ranges_local_nonprimitive, supi_ranges ) {
- if (!cJSON_IsObject(supi_ranges_local_nonprimitive)) {
- ogs_error("OpenAPI_ausf_info_parseFromJSON() failed [supi_ranges]");
- goto end;
- }
- OpenAPI_supi_range_t *supi_rangesItem = OpenAPI_supi_range_parseFromJSON(supi_ranges_local_nonprimitive);
-
- OpenAPI_list_add(supi_rangesList, supi_rangesItem);
- }
+ OpenAPI_list_add(supi_rangesList, supi_rangesItem);
+ }
}
cJSON *routing_indicators = cJSON_GetObjectItemCaseSensitive(ausf_infoJSON, "routingIndicators");
OpenAPI_list_t *routing_indicatorsList;
- if (routing_indicators) {
- cJSON *routing_indicators_local;
- if (!cJSON_IsArray(routing_indicators)) {
- ogs_error("OpenAPI_ausf_info_parseFromJSON() failed [routing_indicators]");
- goto end;
- }
- routing_indicatorsList = OpenAPI_list_create();
+ if (routing_indicators) {
+ cJSON *routing_indicators_local;
+ if (!cJSON_IsArray(routing_indicators)) {
+ ogs_error("OpenAPI_ausf_info_parseFromJSON() failed [routing_indicators]");
+ goto end;
+ }
+ routing_indicatorsList = OpenAPI_list_create();
- cJSON_ArrayForEach(routing_indicators_local, routing_indicators) {
- if (!cJSON_IsString(routing_indicators_local)) {
- ogs_error("OpenAPI_ausf_info_parseFromJSON() failed [routing_indicators]");
- goto end;
- }
- OpenAPI_list_add(routing_indicatorsList, ogs_strdup_or_assert(routing_indicators_local->valuestring));
- }
+ cJSON_ArrayForEach(routing_indicators_local, routing_indicators) {
+ if (!cJSON_IsString(routing_indicators_local)) {
+ ogs_error("OpenAPI_ausf_info_parseFromJSON() failed [routing_indicators]");
+ goto end;
+ }
+ OpenAPI_list_add(routing_indicatorsList , ogs_strdup_or_assert(routing_indicators_local->valuestring));
+ }
}
ausf_info_local_var = OpenAPI_ausf_info_create (
group_id ? ogs_strdup_or_assert(group_id->valuestring) : NULL,
supi_ranges ? supi_rangesList : NULL,
routing_indicators ? routing_indicatorsList : NULL
- );
+ );
return ausf_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/ausf_info.h b/lib/sbi/openapi/model/ausf_info.h
index 6b337b899..755ab0fa5 100644
--- a/lib/sbi/openapi/model/ausf_info.h
+++ b/lib/sbi/openapi/model/ausf_info.h
@@ -29,7 +29,7 @@ OpenAPI_ausf_info_t *OpenAPI_ausf_info_create(
char *group_id,
OpenAPI_list_t *supi_ranges,
OpenAPI_list_t *routing_indicators
- );
+);
void OpenAPI_ausf_info_free(OpenAPI_ausf_info_t *ausf_info);
OpenAPI_ausf_info_t *OpenAPI_ausf_info_parseFromJSON(cJSON *ausf_infoJSON);
cJSON *OpenAPI_ausf_info_convertToJSON(OpenAPI_ausf_info_t *ausf_info);
diff --git a/lib/sbi/openapi/model/auth_event.c b/lib/sbi/openapi/model/auth_event.c
index a55d5e68b..7ebe878a5 100644
--- a/lib/sbi/openapi/model/auth_event.c
+++ b/lib/sbi/openapi/model/auth_event.c
@@ -11,7 +11,7 @@ OpenAPI_auth_event_t *OpenAPI_auth_event_create(
OpenAPI_auth_type_e auth_type,
char *serving_network_name,
int auth_removal_ind
- )
+)
{
OpenAPI_auth_event_t *auth_event_local_var = OpenAPI_malloc(sizeof(OpenAPI_auth_event_t));
if (!auth_event_local_var) {
@@ -75,10 +75,10 @@ cJSON *OpenAPI_auth_event_convertToJSON(OpenAPI_auth_event_t *auth_event)
}
if (auth_event->auth_removal_ind) {
- if (cJSON_AddBoolToObject(item, "authRemovalInd", auth_event->auth_removal_ind) == NULL) {
- ogs_error("OpenAPI_auth_event_convertToJSON() failed [auth_removal_ind]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "authRemovalInd", auth_event->auth_removal_ind) == NULL) {
+ ogs_error("OpenAPI_auth_event_convertToJSON() failed [auth_removal_ind]");
+ goto end;
+ }
}
end:
@@ -94,7 +94,7 @@ OpenAPI_auth_event_t *OpenAPI_auth_event_parseFromJSON(cJSON *auth_eventJSON)
goto end;
}
-
+
if (!cJSON_IsString(nf_instance_id)) {
ogs_error("OpenAPI_auth_event_parseFromJSON() failed [nf_instance_id]");
goto end;
@@ -106,7 +106,7 @@ OpenAPI_auth_event_t *OpenAPI_auth_event_parseFromJSON(cJSON *auth_eventJSON)
goto end;
}
-
+
if (!cJSON_IsBool(success)) {
ogs_error("OpenAPI_auth_event_parseFromJSON() failed [success]");
goto end;
@@ -118,7 +118,7 @@ OpenAPI_auth_event_t *OpenAPI_auth_event_parseFromJSON(cJSON *auth_eventJSON)
goto end;
}
-
+
if (!cJSON_IsString(time_stamp)) {
ogs_error("OpenAPI_auth_event_parseFromJSON() failed [time_stamp]");
goto end;
@@ -131,7 +131,7 @@ OpenAPI_auth_event_t *OpenAPI_auth_event_parseFromJSON(cJSON *auth_eventJSON)
}
OpenAPI_auth_type_e auth_typeVariable;
-
+
if (!cJSON_IsString(auth_type)) {
ogs_error("OpenAPI_auth_event_parseFromJSON() failed [auth_type]");
goto end;
@@ -144,7 +144,7 @@ OpenAPI_auth_event_t *OpenAPI_auth_event_parseFromJSON(cJSON *auth_eventJSON)
goto end;
}
-
+
if (!cJSON_IsString(serving_network_name)) {
ogs_error("OpenAPI_auth_event_parseFromJSON() failed [serving_network_name]");
goto end;
@@ -152,11 +152,11 @@ OpenAPI_auth_event_t *OpenAPI_auth_event_parseFromJSON(cJSON *auth_eventJSON)
cJSON *auth_removal_ind = cJSON_GetObjectItemCaseSensitive(auth_eventJSON, "authRemovalInd");
- if (auth_removal_ind) {
- if (!cJSON_IsBool(auth_removal_ind)) {
- ogs_error("OpenAPI_auth_event_parseFromJSON() failed [auth_removal_ind]");
- goto end;
- }
+ if (auth_removal_ind) {
+ if (!cJSON_IsBool(auth_removal_ind)) {
+ ogs_error("OpenAPI_auth_event_parseFromJSON() failed [auth_removal_ind]");
+ goto end;
+ }
}
auth_event_local_var = OpenAPI_auth_event_create (
@@ -166,7 +166,7 @@ OpenAPI_auth_event_t *OpenAPI_auth_event_parseFromJSON(cJSON *auth_eventJSON)
auth_typeVariable,
ogs_strdup_or_assert(serving_network_name->valuestring),
auth_removal_ind ? auth_removal_ind->valueint : 0
- );
+ );
return auth_event_local_var;
end:
diff --git a/lib/sbi/openapi/model/auth_event.h b/lib/sbi/openapi/model/auth_event.h
index 8f894ae26..ee87a9494 100644
--- a/lib/sbi/openapi/model/auth_event.h
+++ b/lib/sbi/openapi/model/auth_event.h
@@ -1,7 +1,7 @@
/*
* auth_event.h
*
- *
+ *
*/
#ifndef _OpenAPI_auth_event_H_
@@ -35,7 +35,7 @@ OpenAPI_auth_event_t *OpenAPI_auth_event_create(
OpenAPI_auth_type_e auth_type,
char *serving_network_name,
int auth_removal_ind
- );
+);
void OpenAPI_auth_event_free(OpenAPI_auth_event_t *auth_event);
OpenAPI_auth_event_t *OpenAPI_auth_event_parseFromJSON(cJSON *auth_eventJSON);
cJSON *OpenAPI_auth_event_convertToJSON(OpenAPI_auth_event_t *auth_event);
diff --git a/lib/sbi/openapi/model/auth_method.h b/lib/sbi/openapi/model/auth_method.h
index 30076f08c..e492f3462 100644
--- a/lib/sbi/openapi/model/auth_method.h
+++ b/lib/sbi/openapi/model/auth_method.h
@@ -1,7 +1,7 @@
/*
* auth_method.h
*
- *
+ *
*/
#ifndef _OpenAPI_auth_method_H_
diff --git a/lib/sbi/openapi/model/auth_result.h b/lib/sbi/openapi/model/auth_result.h
index 2aec16e3f..0082c5f31 100644
--- a/lib/sbi/openapi/model/auth_result.h
+++ b/lib/sbi/openapi/model/auth_result.h
@@ -1,7 +1,7 @@
/*
* auth_result.h
*
- *
+ *
*/
#ifndef _OpenAPI_auth_result_H_
diff --git a/lib/sbi/openapi/model/auth_status.c b/lib/sbi/openapi/model/auth_status.c
new file mode 100644
index 000000000..3044b4b44
--- /dev/null
+++ b/lib/sbi/openapi/model/auth_status.c
@@ -0,0 +1,30 @@
+
+#include
+#include
+#include
+#include "auth_status.h"
+
+char* OpenAPI_auth_status_ToString(OpenAPI_auth_status_e auth_status)
+{
+ const char *auth_statusArray[] = { "NULL", "EAP_SUCCESS", "EAP_FAILURE", "PENDING" };
+ size_t sizeofArray = sizeof(auth_statusArray) / sizeof(auth_statusArray[0]);
+ if (auth_status < sizeofArray)
+ return (char *)auth_statusArray[auth_status];
+ else
+ return (char *)"Unknown";
+}
+
+OpenAPI_auth_status_e OpenAPI_auth_status_FromString(char* auth_status)
+{
+ int stringToReturn = 0;
+ const char *auth_statusArray[] = { "NULL", "EAP_SUCCESS", "EAP_FAILURE", "PENDING" };
+ size_t sizeofArray = sizeof(auth_statusArray) / sizeof(auth_statusArray[0]);
+ while (stringToReturn < sizeofArray) {
+ if (strcmp(auth_status, auth_statusArray[stringToReturn]) == 0) {
+ return stringToReturn;
+ }
+ stringToReturn++;
+ }
+ return 0;
+}
+
diff --git a/lib/sbi/openapi/model/auth_status.h b/lib/sbi/openapi/model/auth_status.h
new file mode 100644
index 000000000..3a1f47aa5
--- /dev/null
+++ b/lib/sbi/openapi/model/auth_status.h
@@ -0,0 +1,31 @@
+/*
+ * auth_status.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_auth_status_H_
+#define _OpenAPI_auth_status_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum { OpenAPI_auth_status_NULL = 0, OpenAPI_auth_status_EAP_SUCCESS, OpenAPI_auth_status_EAP_FAILURE, OpenAPI_auth_status_PENDING } OpenAPI_auth_status_e;
+
+char* OpenAPI_auth_status_ToString(OpenAPI_auth_status_e auth_status);
+
+OpenAPI_auth_status_e OpenAPI_auth_status_FromString(char* auth_status);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_auth_status_H_ */
+
diff --git a/lib/sbi/openapi/model/auth_type.h b/lib/sbi/openapi/model/auth_type.h
index 0282679bf..22d1a59e7 100644
--- a/lib/sbi/openapi/model/auth_type.h
+++ b/lib/sbi/openapi/model/auth_type.h
@@ -1,7 +1,7 @@
/*
* auth_type.h
*
- *
+ *
*/
#ifndef _OpenAPI_auth_type_H_
diff --git a/lib/sbi/openapi/model/authentication_info.c b/lib/sbi/openapi/model/authentication_info.c
index 411733ece..8a7843999 100644
--- a/lib/sbi/openapi/model/authentication_info.c
+++ b/lib/sbi/openapi/model/authentication_info.c
@@ -12,8 +12,10 @@ OpenAPI_authentication_info_t *OpenAPI_authentication_info_create(
OpenAPI_trace_data_t *trace_data,
char *udm_group_id,
char *routing_indicator,
- char *cag_id
- )
+ OpenAPI_list_t *cell_cag_info,
+ int n5gc_ind,
+ char *supported_features
+)
{
OpenAPI_authentication_info_t *authentication_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_authentication_info_t));
if (!authentication_info_local_var) {
@@ -26,7 +28,9 @@ OpenAPI_authentication_info_t *OpenAPI_authentication_info_create(
authentication_info_local_var->trace_data = trace_data;
authentication_info_local_var->udm_group_id = udm_group_id;
authentication_info_local_var->routing_indicator = routing_indicator;
- authentication_info_local_var->cag_id = cag_id;
+ authentication_info_local_var->cell_cag_info = cell_cag_info;
+ authentication_info_local_var->n5gc_ind = n5gc_ind;
+ authentication_info_local_var->supported_features = supported_features;
return authentication_info_local_var;
}
@@ -44,7 +48,11 @@ void OpenAPI_authentication_info_free(OpenAPI_authentication_info_t *authenticat
OpenAPI_trace_data_free(authentication_info->trace_data);
ogs_free(authentication_info->udm_group_id);
ogs_free(authentication_info->routing_indicator);
- ogs_free(authentication_info->cag_id);
+ OpenAPI_list_for_each(authentication_info->cell_cag_info, node) {
+ ogs_free(node->data);
+ }
+ OpenAPI_list_free(authentication_info->cell_cag_info);
+ ogs_free(authentication_info->supported_features);
ogs_free(authentication_info);
}
@@ -69,57 +77,80 @@ cJSON *OpenAPI_authentication_info_convertToJSON(OpenAPI_authentication_info_t *
}
if (authentication_info->resynchronization_info) {
- cJSON *resynchronization_info_local_JSON = OpenAPI_resynchronization_info_convertToJSON(authentication_info->resynchronization_info);
- if (resynchronization_info_local_JSON == NULL) {
- ogs_error("OpenAPI_authentication_info_convertToJSON() failed [resynchronization_info]");
- goto end;
- }
- cJSON_AddItemToObject(item, "resynchronizationInfo", resynchronization_info_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_authentication_info_convertToJSON() failed [resynchronization_info]");
- goto end;
- }
+ cJSON *resynchronization_info_local_JSON = OpenAPI_resynchronization_info_convertToJSON(authentication_info->resynchronization_info);
+ if (resynchronization_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_authentication_info_convertToJSON() failed [resynchronization_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "resynchronizationInfo", resynchronization_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_authentication_info_convertToJSON() failed [resynchronization_info]");
+ goto end;
+ }
}
if (authentication_info->pei) {
- if (cJSON_AddStringToObject(item, "pei", authentication_info->pei) == NULL) {
- ogs_error("OpenAPI_authentication_info_convertToJSON() failed [pei]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "pei", authentication_info->pei) == NULL) {
+ ogs_error("OpenAPI_authentication_info_convertToJSON() failed [pei]");
+ goto end;
+ }
}
if (authentication_info->trace_data) {
- cJSON *trace_data_local_JSON = OpenAPI_trace_data_convertToJSON(authentication_info->trace_data);
- if (trace_data_local_JSON == NULL) {
- ogs_error("OpenAPI_authentication_info_convertToJSON() failed [trace_data]");
- goto end;
- }
- cJSON_AddItemToObject(item, "traceData", trace_data_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_authentication_info_convertToJSON() failed [trace_data]");
- goto end;
- }
+ cJSON *trace_data_local_JSON = OpenAPI_trace_data_convertToJSON(authentication_info->trace_data);
+ if (trace_data_local_JSON == NULL) {
+ ogs_error("OpenAPI_authentication_info_convertToJSON() failed [trace_data]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "traceData", trace_data_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_authentication_info_convertToJSON() failed [trace_data]");
+ goto end;
+ }
}
if (authentication_info->udm_group_id) {
- if (cJSON_AddStringToObject(item, "udmGroupId", authentication_info->udm_group_id) == NULL) {
- ogs_error("OpenAPI_authentication_info_convertToJSON() failed [udm_group_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "udmGroupId", authentication_info->udm_group_id) == NULL) {
+ ogs_error("OpenAPI_authentication_info_convertToJSON() failed [udm_group_id]");
+ goto end;
+ }
}
if (authentication_info->routing_indicator) {
- if (cJSON_AddStringToObject(item, "routingIndicator", authentication_info->routing_indicator) == NULL) {
- ogs_error("OpenAPI_authentication_info_convertToJSON() failed [routing_indicator]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "routingIndicator", authentication_info->routing_indicator) == NULL) {
+ ogs_error("OpenAPI_authentication_info_convertToJSON() failed [routing_indicator]");
+ goto end;
+ }
}
- if (authentication_info->cag_id) {
- if (cJSON_AddStringToObject(item, "cagId", authentication_info->cag_id) == NULL) {
- ogs_error("OpenAPI_authentication_info_convertToJSON() failed [cag_id]");
- goto end;
- }
+ if (authentication_info->cell_cag_info) {
+ cJSON *cell_cag_info = cJSON_AddArrayToObject(item, "cellCagInfo");
+ if (cell_cag_info == NULL) {
+ ogs_error("OpenAPI_authentication_info_convertToJSON() failed [cell_cag_info]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *cell_cag_info_node;
+ OpenAPI_list_for_each(authentication_info->cell_cag_info, cell_cag_info_node) {
+ if (cJSON_AddStringToObject(cell_cag_info, "", (char*)cell_cag_info_node->data) == NULL) {
+ ogs_error("OpenAPI_authentication_info_convertToJSON() failed [cell_cag_info]");
+ goto end;
+ }
+ }
+ }
+
+ if (authentication_info->n5gc_ind) {
+ if (cJSON_AddBoolToObject(item, "n5gcInd", authentication_info->n5gc_ind) == NULL) {
+ ogs_error("OpenAPI_authentication_info_convertToJSON() failed [n5gc_ind]");
+ goto end;
+ }
+ }
+
+ if (authentication_info->supported_features) {
+ if (cJSON_AddStringToObject(item, "supportedFeatures", authentication_info->supported_features) == NULL) {
+ ogs_error("OpenAPI_authentication_info_convertToJSON() failed [supported_features]");
+ goto end;
+ }
}
end:
@@ -135,7 +166,7 @@ OpenAPI_authentication_info_t *OpenAPI_authentication_info_parseFromJSON(cJSON *
goto end;
}
-
+
if (!cJSON_IsString(supi_or_suci)) {
ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [supi_or_suci]");
goto end;
@@ -147,7 +178,7 @@ OpenAPI_authentication_info_t *OpenAPI_authentication_info_parseFromJSON(cJSON *
goto end;
}
-
+
if (!cJSON_IsString(serving_network_name)) {
ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [serving_network_name]");
goto end;
@@ -156,51 +187,80 @@ OpenAPI_authentication_info_t *OpenAPI_authentication_info_parseFromJSON(cJSON *
cJSON *resynchronization_info = cJSON_GetObjectItemCaseSensitive(authentication_infoJSON, "resynchronizationInfo");
OpenAPI_resynchronization_info_t *resynchronization_info_local_nonprim = NULL;
- if (resynchronization_info) {
- resynchronization_info_local_nonprim = OpenAPI_resynchronization_info_parseFromJSON(resynchronization_info);
+ if (resynchronization_info) {
+ resynchronization_info_local_nonprim = OpenAPI_resynchronization_info_parseFromJSON(resynchronization_info);
}
cJSON *pei = cJSON_GetObjectItemCaseSensitive(authentication_infoJSON, "pei");
- if (pei) {
- if (!cJSON_IsString(pei)) {
- ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [pei]");
- goto end;
- }
+ if (pei) {
+ if (!cJSON_IsString(pei)) {
+ ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [pei]");
+ goto end;
+ }
}
cJSON *trace_data = cJSON_GetObjectItemCaseSensitive(authentication_infoJSON, "traceData");
OpenAPI_trace_data_t *trace_data_local_nonprim = NULL;
- if (trace_data) {
- trace_data_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_data);
+ if (trace_data) {
+ trace_data_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_data);
}
cJSON *udm_group_id = cJSON_GetObjectItemCaseSensitive(authentication_infoJSON, "udmGroupId");
- if (udm_group_id) {
- if (!cJSON_IsString(udm_group_id)) {
- ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [udm_group_id]");
- goto end;
- }
+ if (udm_group_id) {
+ if (!cJSON_IsString(udm_group_id)) {
+ ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [udm_group_id]");
+ goto end;
+ }
}
cJSON *routing_indicator = cJSON_GetObjectItemCaseSensitive(authentication_infoJSON, "routingIndicator");
- if (routing_indicator) {
- if (!cJSON_IsString(routing_indicator)) {
- ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [routing_indicator]");
- goto end;
- }
+ if (routing_indicator) {
+ if (!cJSON_IsString(routing_indicator)) {
+ ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [routing_indicator]");
+ goto end;
+ }
}
- cJSON *cag_id = cJSON_GetObjectItemCaseSensitive(authentication_infoJSON, "cagId");
+ cJSON *cell_cag_info = cJSON_GetObjectItemCaseSensitive(authentication_infoJSON, "cellCagInfo");
- if (cag_id) {
- if (!cJSON_IsString(cag_id)) {
- ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [cag_id]");
- goto end;
- }
+ OpenAPI_list_t *cell_cag_infoList;
+ if (cell_cag_info) {
+ cJSON *cell_cag_info_local;
+ if (!cJSON_IsArray(cell_cag_info)) {
+ ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [cell_cag_info]");
+ goto end;
+ }
+ cell_cag_infoList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(cell_cag_info_local, cell_cag_info) {
+ if (!cJSON_IsString(cell_cag_info_local)) {
+ ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [cell_cag_info]");
+ goto end;
+ }
+ OpenAPI_list_add(cell_cag_infoList , ogs_strdup_or_assert(cell_cag_info_local->valuestring));
+ }
+ }
+
+ cJSON *n5gc_ind = cJSON_GetObjectItemCaseSensitive(authentication_infoJSON, "n5gcInd");
+
+ if (n5gc_ind) {
+ if (!cJSON_IsBool(n5gc_ind)) {
+ ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [n5gc_ind]");
+ goto end;
+ }
+ }
+
+ cJSON *supported_features = cJSON_GetObjectItemCaseSensitive(authentication_infoJSON, "supportedFeatures");
+
+ if (supported_features) {
+ if (!cJSON_IsString(supported_features)) {
+ ogs_error("OpenAPI_authentication_info_parseFromJSON() failed [supported_features]");
+ goto end;
+ }
}
authentication_info_local_var = OpenAPI_authentication_info_create (
@@ -211,8 +271,10 @@ OpenAPI_authentication_info_t *OpenAPI_authentication_info_parseFromJSON(cJSON *
trace_data ? trace_data_local_nonprim : NULL,
udm_group_id ? ogs_strdup_or_assert(udm_group_id->valuestring) : NULL,
routing_indicator ? ogs_strdup_or_assert(routing_indicator->valuestring) : NULL,
- cag_id ? ogs_strdup_or_assert(cag_id->valuestring) : NULL
- );
+ cell_cag_info ? cell_cag_infoList : NULL,
+ n5gc_ind ? n5gc_ind->valueint : 0,
+ supported_features ? ogs_strdup_or_assert(supported_features->valuestring) : NULL
+ );
return authentication_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/authentication_info.h b/lib/sbi/openapi/model/authentication_info.h
index 7cf72bc9e..1176f7441 100644
--- a/lib/sbi/openapi/model/authentication_info.h
+++ b/lib/sbi/openapi/model/authentication_info.h
@@ -1,7 +1,7 @@
/*
* authentication_info.h
*
- *
+ *
*/
#ifndef _OpenAPI_authentication_info_H_
@@ -28,7 +28,9 @@ typedef struct OpenAPI_authentication_info_s {
struct OpenAPI_trace_data_s *trace_data;
char *udm_group_id;
char *routing_indicator;
- char *cag_id;
+ OpenAPI_list_t *cell_cag_info;
+ int n5gc_ind;
+ char *supported_features;
} OpenAPI_authentication_info_t;
OpenAPI_authentication_info_t *OpenAPI_authentication_info_create(
@@ -39,8 +41,10 @@ OpenAPI_authentication_info_t *OpenAPI_authentication_info_create(
OpenAPI_trace_data_t *trace_data,
char *udm_group_id,
char *routing_indicator,
- char *cag_id
- );
+ OpenAPI_list_t *cell_cag_info,
+ int n5gc_ind,
+ char *supported_features
+);
void OpenAPI_authentication_info_free(OpenAPI_authentication_info_t *authentication_info);
OpenAPI_authentication_info_t *OpenAPI_authentication_info_parseFromJSON(cJSON *authentication_infoJSON);
cJSON *OpenAPI_authentication_info_convertToJSON(OpenAPI_authentication_info_t *authentication_info);
diff --git a/lib/sbi/openapi/model/authentication_info_request.c b/lib/sbi/openapi/model/authentication_info_request.c
index b8d79e340..dda1576c4 100644
--- a/lib/sbi/openapi/model/authentication_info_request.c
+++ b/lib/sbi/openapi/model/authentication_info_request.c
@@ -11,7 +11,7 @@ OpenAPI_authentication_info_request_t *OpenAPI_authentication_info_request_creat
char *ausf_instance_id,
OpenAPI_list_t *cell_cag_info,
int n5gc_ind
- )
+)
{
OpenAPI_authentication_info_request_t *authentication_info_request_local_var = OpenAPI_malloc(sizeof(OpenAPI_authentication_info_request_t));
if (!authentication_info_request_local_var) {
@@ -55,10 +55,10 @@ cJSON *OpenAPI_authentication_info_request_convertToJSON(OpenAPI_authentication_
item = cJSON_CreateObject();
if (authentication_info_request->supported_features) {
- if (cJSON_AddStringToObject(item, "supportedFeatures", authentication_info_request->supported_features) == NULL) {
- ogs_error("OpenAPI_authentication_info_request_convertToJSON() failed [supported_features]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "supportedFeatures", authentication_info_request->supported_features) == NULL) {
+ ogs_error("OpenAPI_authentication_info_request_convertToJSON() failed [supported_features]");
+ goto end;
+ }
}
if (cJSON_AddStringToObject(item, "servingNetworkName", authentication_info_request->serving_network_name) == NULL) {
@@ -67,16 +67,16 @@ cJSON *OpenAPI_authentication_info_request_convertToJSON(OpenAPI_authentication_
}
if (authentication_info_request->resynchronization_info) {
- cJSON *resynchronization_info_local_JSON = OpenAPI_resynchronization_info_convertToJSON(authentication_info_request->resynchronization_info);
- if (resynchronization_info_local_JSON == NULL) {
- ogs_error("OpenAPI_authentication_info_request_convertToJSON() failed [resynchronization_info]");
- goto end;
- }
- cJSON_AddItemToObject(item, "resynchronizationInfo", resynchronization_info_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_authentication_info_request_convertToJSON() failed [resynchronization_info]");
- goto end;
- }
+ cJSON *resynchronization_info_local_JSON = OpenAPI_resynchronization_info_convertToJSON(authentication_info_request->resynchronization_info);
+ if (resynchronization_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_authentication_info_request_convertToJSON() failed [resynchronization_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "resynchronizationInfo", resynchronization_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_authentication_info_request_convertToJSON() failed [resynchronization_info]");
+ goto end;
+ }
}
if (cJSON_AddStringToObject(item, "ausfInstanceId", authentication_info_request->ausf_instance_id) == NULL) {
@@ -85,26 +85,26 @@ cJSON *OpenAPI_authentication_info_request_convertToJSON(OpenAPI_authentication_
}
if (authentication_info_request->cell_cag_info) {
- cJSON *cell_cag_info = cJSON_AddArrayToObject(item, "cellCagInfo");
- if (cell_cag_info == NULL) {
- ogs_error("OpenAPI_authentication_info_request_convertToJSON() failed [cell_cag_info]");
- goto end;
- }
+ cJSON *cell_cag_info = cJSON_AddArrayToObject(item, "cellCagInfo");
+ if (cell_cag_info == NULL) {
+ ogs_error("OpenAPI_authentication_info_request_convertToJSON() failed [cell_cag_info]");
+ goto end;
+ }
- OpenAPI_lnode_t *cell_cag_info_node;
- OpenAPI_list_for_each(authentication_info_request->cell_cag_info, cell_cag_info_node) {
- if (cJSON_AddStringToObject(cell_cag_info, "", (char*)cell_cag_info_node->data) == NULL) {
- ogs_error("OpenAPI_authentication_info_request_convertToJSON() failed [cell_cag_info]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *cell_cag_info_node;
+ OpenAPI_list_for_each(authentication_info_request->cell_cag_info, cell_cag_info_node) {
+ if (cJSON_AddStringToObject(cell_cag_info, "", (char*)cell_cag_info_node->data) == NULL) {
+ ogs_error("OpenAPI_authentication_info_request_convertToJSON() failed [cell_cag_info]");
+ goto end;
+ }
+ }
}
if (authentication_info_request->n5gc_ind) {
- if (cJSON_AddBoolToObject(item, "n5gcInd", authentication_info_request->n5gc_ind) == NULL) {
- ogs_error("OpenAPI_authentication_info_request_convertToJSON() failed [n5gc_ind]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "n5gcInd", authentication_info_request->n5gc_ind) == NULL) {
+ ogs_error("OpenAPI_authentication_info_request_convertToJSON() failed [n5gc_ind]");
+ goto end;
+ }
}
end:
@@ -116,11 +116,11 @@ OpenAPI_authentication_info_request_t *OpenAPI_authentication_info_request_parse
OpenAPI_authentication_info_request_t *authentication_info_request_local_var = NULL;
cJSON *supported_features = cJSON_GetObjectItemCaseSensitive(authentication_info_requestJSON, "supportedFeatures");
- if (supported_features) {
- if (!cJSON_IsString(supported_features)) {
- ogs_error("OpenAPI_authentication_info_request_parseFromJSON() failed [supported_features]");
- goto end;
- }
+ if (supported_features) {
+ if (!cJSON_IsString(supported_features)) {
+ ogs_error("OpenAPI_authentication_info_request_parseFromJSON() failed [supported_features]");
+ goto end;
+ }
}
cJSON *serving_network_name = cJSON_GetObjectItemCaseSensitive(authentication_info_requestJSON, "servingNetworkName");
@@ -129,7 +129,7 @@ OpenAPI_authentication_info_request_t *OpenAPI_authentication_info_request_parse
goto end;
}
-
+
if (!cJSON_IsString(serving_network_name)) {
ogs_error("OpenAPI_authentication_info_request_parseFromJSON() failed [serving_network_name]");
goto end;
@@ -138,8 +138,8 @@ OpenAPI_authentication_info_request_t *OpenAPI_authentication_info_request_parse
cJSON *resynchronization_info = cJSON_GetObjectItemCaseSensitive(authentication_info_requestJSON, "resynchronizationInfo");
OpenAPI_resynchronization_info_t *resynchronization_info_local_nonprim = NULL;
- if (resynchronization_info) {
- resynchronization_info_local_nonprim = OpenAPI_resynchronization_info_parseFromJSON(resynchronization_info);
+ if (resynchronization_info) {
+ resynchronization_info_local_nonprim = OpenAPI_resynchronization_info_parseFromJSON(resynchronization_info);
}
cJSON *ausf_instance_id = cJSON_GetObjectItemCaseSensitive(authentication_info_requestJSON, "ausfInstanceId");
@@ -148,7 +148,7 @@ OpenAPI_authentication_info_request_t *OpenAPI_authentication_info_request_parse
goto end;
}
-
+
if (!cJSON_IsString(ausf_instance_id)) {
ogs_error("OpenAPI_authentication_info_request_parseFromJSON() failed [ausf_instance_id]");
goto end;
@@ -157,30 +157,30 @@ OpenAPI_authentication_info_request_t *OpenAPI_authentication_info_request_parse
cJSON *cell_cag_info = cJSON_GetObjectItemCaseSensitive(authentication_info_requestJSON, "cellCagInfo");
OpenAPI_list_t *cell_cag_infoList;
- if (cell_cag_info) {
- cJSON *cell_cag_info_local;
- if (!cJSON_IsArray(cell_cag_info)) {
- ogs_error("OpenAPI_authentication_info_request_parseFromJSON() failed [cell_cag_info]");
- goto end;
- }
- cell_cag_infoList = OpenAPI_list_create();
+ if (cell_cag_info) {
+ cJSON *cell_cag_info_local;
+ if (!cJSON_IsArray(cell_cag_info)) {
+ ogs_error("OpenAPI_authentication_info_request_parseFromJSON() failed [cell_cag_info]");
+ goto end;
+ }
+ cell_cag_infoList = OpenAPI_list_create();
- cJSON_ArrayForEach(cell_cag_info_local, cell_cag_info) {
- if (!cJSON_IsString(cell_cag_info_local)) {
- ogs_error("OpenAPI_authentication_info_request_parseFromJSON() failed [cell_cag_info]");
- goto end;
- }
- OpenAPI_list_add(cell_cag_infoList, ogs_strdup_or_assert(cell_cag_info_local->valuestring));
- }
+ cJSON_ArrayForEach(cell_cag_info_local, cell_cag_info) {
+ if (!cJSON_IsString(cell_cag_info_local)) {
+ ogs_error("OpenAPI_authentication_info_request_parseFromJSON() failed [cell_cag_info]");
+ goto end;
+ }
+ OpenAPI_list_add(cell_cag_infoList , ogs_strdup_or_assert(cell_cag_info_local->valuestring));
+ }
}
cJSON *n5gc_ind = cJSON_GetObjectItemCaseSensitive(authentication_info_requestJSON, "n5gcInd");
- if (n5gc_ind) {
- if (!cJSON_IsBool(n5gc_ind)) {
- ogs_error("OpenAPI_authentication_info_request_parseFromJSON() failed [n5gc_ind]");
- goto end;
- }
+ if (n5gc_ind) {
+ if (!cJSON_IsBool(n5gc_ind)) {
+ ogs_error("OpenAPI_authentication_info_request_parseFromJSON() failed [n5gc_ind]");
+ goto end;
+ }
}
authentication_info_request_local_var = OpenAPI_authentication_info_request_create (
@@ -190,7 +190,7 @@ OpenAPI_authentication_info_request_t *OpenAPI_authentication_info_request_parse
ogs_strdup_or_assert(ausf_instance_id->valuestring),
cell_cag_info ? cell_cag_infoList : NULL,
n5gc_ind ? n5gc_ind->valueint : 0
- );
+ );
return authentication_info_request_local_var;
end:
diff --git a/lib/sbi/openapi/model/authentication_info_request.h b/lib/sbi/openapi/model/authentication_info_request.h
index abb7a9a22..4606e795e 100644
--- a/lib/sbi/openapi/model/authentication_info_request.h
+++ b/lib/sbi/openapi/model/authentication_info_request.h
@@ -1,7 +1,7 @@
/*
* authentication_info_request.h
*
- *
+ *
*/
#ifndef _OpenAPI_authentication_info_request_H_
@@ -35,7 +35,7 @@ OpenAPI_authentication_info_request_t *OpenAPI_authentication_info_request_creat
char *ausf_instance_id,
OpenAPI_list_t *cell_cag_info,
int n5gc_ind
- );
+);
void OpenAPI_authentication_info_request_free(OpenAPI_authentication_info_request_t *authentication_info_request);
OpenAPI_authentication_info_request_t *OpenAPI_authentication_info_request_parseFromJSON(cJSON *authentication_info_requestJSON);
cJSON *OpenAPI_authentication_info_request_convertToJSON(OpenAPI_authentication_info_request_t *authentication_info_request);
diff --git a/lib/sbi/openapi/model/authentication_info_result.c b/lib/sbi/openapi/model/authentication_info_result.c
index 5647b8d12..42cf97a11 100644
--- a/lib/sbi/openapi/model/authentication_info_result.c
+++ b/lib/sbi/openapi/model/authentication_info_result.c
@@ -9,7 +9,7 @@ OpenAPI_authentication_info_result_t *OpenAPI_authentication_info_result_create(
char *supported_features,
OpenAPI_authentication_vector_t *authentication_vector,
char *supi
- )
+)
{
OpenAPI_authentication_info_result_t *authentication_info_result_local_var = OpenAPI_malloc(sizeof(OpenAPI_authentication_info_result_t));
if (!authentication_info_result_local_var) {
@@ -51,30 +51,30 @@ cJSON *OpenAPI_authentication_info_result_convertToJSON(OpenAPI_authentication_i
}
if (authentication_info_result->supported_features) {
- if (cJSON_AddStringToObject(item, "supportedFeatures", authentication_info_result->supported_features) == NULL) {
- ogs_error("OpenAPI_authentication_info_result_convertToJSON() failed [supported_features]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "supportedFeatures", authentication_info_result->supported_features) == NULL) {
+ ogs_error("OpenAPI_authentication_info_result_convertToJSON() failed [supported_features]");
+ goto end;
+ }
}
if (authentication_info_result->authentication_vector) {
- cJSON *authentication_vector_local_JSON = OpenAPI_authentication_vector_convertToJSON(authentication_info_result->authentication_vector);
- if (authentication_vector_local_JSON == NULL) {
- ogs_error("OpenAPI_authentication_info_result_convertToJSON() failed [authentication_vector]");
- goto end;
- }
- cJSON_AddItemToObject(item, "authenticationVector", authentication_vector_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_authentication_info_result_convertToJSON() failed [authentication_vector]");
- goto end;
- }
+ cJSON *authentication_vector_local_JSON = OpenAPI_authentication_vector_convertToJSON(authentication_info_result->authentication_vector);
+ if (authentication_vector_local_JSON == NULL) {
+ ogs_error("OpenAPI_authentication_info_result_convertToJSON() failed [authentication_vector]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "authenticationVector", authentication_vector_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_authentication_info_result_convertToJSON() failed [authentication_vector]");
+ goto end;
+ }
}
if (authentication_info_result->supi) {
- if (cJSON_AddStringToObject(item, "supi", authentication_info_result->supi) == NULL) {
- ogs_error("OpenAPI_authentication_info_result_convertToJSON() failed [supi]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "supi", authentication_info_result->supi) == NULL) {
+ ogs_error("OpenAPI_authentication_info_result_convertToJSON() failed [supi]");
+ goto end;
+ }
}
end:
@@ -91,7 +91,7 @@ OpenAPI_authentication_info_result_t *OpenAPI_authentication_info_result_parseFr
}
OpenAPI_auth_type_e auth_typeVariable;
-
+
if (!cJSON_IsString(auth_type)) {
ogs_error("OpenAPI_authentication_info_result_parseFromJSON() failed [auth_type]");
goto end;
@@ -100,27 +100,27 @@ OpenAPI_authentication_info_result_t *OpenAPI_authentication_info_result_parseFr
cJSON *supported_features = cJSON_GetObjectItemCaseSensitive(authentication_info_resultJSON, "supportedFeatures");
- if (supported_features) {
- if (!cJSON_IsString(supported_features)) {
- ogs_error("OpenAPI_authentication_info_result_parseFromJSON() failed [supported_features]");
- goto end;
- }
+ if (supported_features) {
+ if (!cJSON_IsString(supported_features)) {
+ ogs_error("OpenAPI_authentication_info_result_parseFromJSON() failed [supported_features]");
+ goto end;
+ }
}
cJSON *authentication_vector = cJSON_GetObjectItemCaseSensitive(authentication_info_resultJSON, "authenticationVector");
OpenAPI_authentication_vector_t *authentication_vector_local_nonprim = NULL;
- if (authentication_vector) {
- authentication_vector_local_nonprim = OpenAPI_authentication_vector_parseFromJSON(authentication_vector);
+ if (authentication_vector) {
+ authentication_vector_local_nonprim = OpenAPI_authentication_vector_parseFromJSON(authentication_vector);
}
cJSON *supi = cJSON_GetObjectItemCaseSensitive(authentication_info_resultJSON, "supi");
- if (supi) {
- if (!cJSON_IsString(supi)) {
- ogs_error("OpenAPI_authentication_info_result_parseFromJSON() failed [supi]");
- goto end;
- }
+ if (supi) {
+ if (!cJSON_IsString(supi)) {
+ ogs_error("OpenAPI_authentication_info_result_parseFromJSON() failed [supi]");
+ goto end;
+ }
}
authentication_info_result_local_var = OpenAPI_authentication_info_result_create (
@@ -128,7 +128,7 @@ OpenAPI_authentication_info_result_t *OpenAPI_authentication_info_result_parseFr
supported_features ? ogs_strdup_or_assert(supported_features->valuestring) : NULL,
authentication_vector ? authentication_vector_local_nonprim : NULL,
supi ? ogs_strdup_or_assert(supi->valuestring) : NULL
- );
+ );
return authentication_info_result_local_var;
end:
diff --git a/lib/sbi/openapi/model/authentication_info_result.h b/lib/sbi/openapi/model/authentication_info_result.h
index f941ed9a9..1515a46e6 100644
--- a/lib/sbi/openapi/model/authentication_info_result.h
+++ b/lib/sbi/openapi/model/authentication_info_result.h
@@ -1,7 +1,7 @@
/*
* authentication_info_result.h
*
- *
+ *
*/
#ifndef _OpenAPI_authentication_info_result_H_
@@ -32,7 +32,7 @@ OpenAPI_authentication_info_result_t *OpenAPI_authentication_info_result_create(
char *supported_features,
OpenAPI_authentication_vector_t *authentication_vector,
char *supi
- );
+);
void OpenAPI_authentication_info_result_free(OpenAPI_authentication_info_result_t *authentication_info_result);
OpenAPI_authentication_info_result_t *OpenAPI_authentication_info_result_parseFromJSON(cJSON *authentication_info_resultJSON);
cJSON *OpenAPI_authentication_info_result_convertToJSON(OpenAPI_authentication_info_result_t *authentication_info_result);
diff --git a/lib/sbi/openapi/model/authentication_subscription.c b/lib/sbi/openapi/model/authentication_subscription.c
index 8bf496269..c347ccb4e 100644
--- a/lib/sbi/openapi/model/authentication_subscription.c
+++ b/lib/sbi/openapi/model/authentication_subscription.c
@@ -17,7 +17,7 @@ OpenAPI_authentication_subscription_t *OpenAPI_authentication_subscription_creat
OpenAPI_auth_method_e n5gc_auth_method,
int rg_authentication_ind,
char *supi
- )
+)
{
OpenAPI_authentication_subscription_t *authentication_subscription_local_var = OpenAPI_malloc(sizeof(OpenAPI_authentication_subscription_t));
if (!authentication_subscription_local_var) {
@@ -72,86 +72,86 @@ cJSON *OpenAPI_authentication_subscription_convertToJSON(OpenAPI_authentication_
}
if (authentication_subscription->enc_permanent_key) {
- if (cJSON_AddStringToObject(item, "encPermanentKey", authentication_subscription->enc_permanent_key) == NULL) {
- ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [enc_permanent_key]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "encPermanentKey", authentication_subscription->enc_permanent_key) == NULL) {
+ ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [enc_permanent_key]");
+ goto end;
+ }
}
if (authentication_subscription->protection_parameter_id) {
- if (cJSON_AddStringToObject(item, "protectionParameterId", authentication_subscription->protection_parameter_id) == NULL) {
- ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [protection_parameter_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "protectionParameterId", authentication_subscription->protection_parameter_id) == NULL) {
+ ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [protection_parameter_id]");
+ goto end;
+ }
}
if (authentication_subscription->sequence_number) {
- cJSON *sequence_number_local_JSON = OpenAPI_sequence_number_convertToJSON(authentication_subscription->sequence_number);
- if (sequence_number_local_JSON == NULL) {
- ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [sequence_number]");
- goto end;
- }
- cJSON_AddItemToObject(item, "sequenceNumber", sequence_number_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [sequence_number]");
- goto end;
- }
+ cJSON *sequence_number_local_JSON = OpenAPI_sequence_number_convertToJSON(authentication_subscription->sequence_number);
+ if (sequence_number_local_JSON == NULL) {
+ ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [sequence_number]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "sequenceNumber", sequence_number_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [sequence_number]");
+ goto end;
+ }
}
if (authentication_subscription->authentication_management_field) {
- if (cJSON_AddStringToObject(item, "authenticationManagementField", authentication_subscription->authentication_management_field) == NULL) {
- ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [authentication_management_field]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "authenticationManagementField", authentication_subscription->authentication_management_field) == NULL) {
+ ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [authentication_management_field]");
+ goto end;
+ }
}
if (authentication_subscription->algorithm_id) {
- if (cJSON_AddStringToObject(item, "algorithmId", authentication_subscription->algorithm_id) == NULL) {
- ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [algorithm_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "algorithmId", authentication_subscription->algorithm_id) == NULL) {
+ ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [algorithm_id]");
+ goto end;
+ }
}
if (authentication_subscription->enc_opc_key) {
- if (cJSON_AddStringToObject(item, "encOpcKey", authentication_subscription->enc_opc_key) == NULL) {
- ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [enc_opc_key]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "encOpcKey", authentication_subscription->enc_opc_key) == NULL) {
+ ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [enc_opc_key]");
+ goto end;
+ }
}
if (authentication_subscription->enc_topc_key) {
- if (cJSON_AddStringToObject(item, "encTopcKey", authentication_subscription->enc_topc_key) == NULL) {
- ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [enc_topc_key]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "encTopcKey", authentication_subscription->enc_topc_key) == NULL) {
+ ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [enc_topc_key]");
+ goto end;
+ }
}
if (authentication_subscription->vector_generation_in_hss) {
- if (cJSON_AddBoolToObject(item, "vectorGenerationInHss", authentication_subscription->vector_generation_in_hss) == NULL) {
- ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [vector_generation_in_hss]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "vectorGenerationInHss", authentication_subscription->vector_generation_in_hss) == NULL) {
+ ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [vector_generation_in_hss]");
+ goto end;
+ }
}
if (authentication_subscription->n5gc_auth_method) {
- if (cJSON_AddStringToObject(item, "n5gcAuthMethod", OpenAPI_auth_method_ToString(authentication_subscription->n5gc_auth_method)) == NULL) {
- ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [n5gc_auth_method]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "n5gcAuthMethod", OpenAPI_auth_method_ToString(authentication_subscription->n5gc_auth_method)) == NULL) {
+ ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [n5gc_auth_method]");
+ goto end;
+ }
}
if (authentication_subscription->rg_authentication_ind) {
- if (cJSON_AddBoolToObject(item, "rgAuthenticationInd", authentication_subscription->rg_authentication_ind) == NULL) {
- ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [rg_authentication_ind]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "rgAuthenticationInd", authentication_subscription->rg_authentication_ind) == NULL) {
+ ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [rg_authentication_ind]");
+ goto end;
+ }
}
if (authentication_subscription->supi) {
- if (cJSON_AddStringToObject(item, "supi", authentication_subscription->supi) == NULL) {
- ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [supi]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "supi", authentication_subscription->supi) == NULL) {
+ ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [supi]");
+ goto end;
+ }
}
end:
@@ -168,7 +168,7 @@ OpenAPI_authentication_subscription_t *OpenAPI_authentication_subscription_parse
}
OpenAPI_auth_method_e authentication_methodVariable;
-
+
if (!cJSON_IsString(authentication_method)) {
ogs_error("OpenAPI_authentication_subscription_parseFromJSON() failed [authentication_method]");
goto end;
@@ -177,101 +177,101 @@ OpenAPI_authentication_subscription_t *OpenAPI_authentication_subscription_parse
cJSON *enc_permanent_key = cJSON_GetObjectItemCaseSensitive(authentication_subscriptionJSON, "encPermanentKey");
- if (enc_permanent_key) {
- if (!cJSON_IsString(enc_permanent_key)) {
- ogs_error("OpenAPI_authentication_subscription_parseFromJSON() failed [enc_permanent_key]");
- goto end;
- }
+ if (enc_permanent_key) {
+ if (!cJSON_IsString(enc_permanent_key)) {
+ ogs_error("OpenAPI_authentication_subscription_parseFromJSON() failed [enc_permanent_key]");
+ goto end;
+ }
}
cJSON *protection_parameter_id = cJSON_GetObjectItemCaseSensitive(authentication_subscriptionJSON, "protectionParameterId");
- if (protection_parameter_id) {
- if (!cJSON_IsString(protection_parameter_id)) {
- ogs_error("OpenAPI_authentication_subscription_parseFromJSON() failed [protection_parameter_id]");
- goto end;
- }
+ if (protection_parameter_id) {
+ if (!cJSON_IsString(protection_parameter_id)) {
+ ogs_error("OpenAPI_authentication_subscription_parseFromJSON() failed [protection_parameter_id]");
+ goto end;
+ }
}
cJSON *sequence_number = cJSON_GetObjectItemCaseSensitive(authentication_subscriptionJSON, "sequenceNumber");
OpenAPI_sequence_number_t *sequence_number_local_nonprim = NULL;
- if (sequence_number) {
- sequence_number_local_nonprim = OpenAPI_sequence_number_parseFromJSON(sequence_number);
+ if (sequence_number) {
+ sequence_number_local_nonprim = OpenAPI_sequence_number_parseFromJSON(sequence_number);
}
cJSON *authentication_management_field = cJSON_GetObjectItemCaseSensitive(authentication_subscriptionJSON, "authenticationManagementField");
- if (authentication_management_field) {
- if (!cJSON_IsString(authentication_management_field)) {
- ogs_error("OpenAPI_authentication_subscription_parseFromJSON() failed [authentication_management_field]");
- goto end;
- }
+ if (authentication_management_field) {
+ if (!cJSON_IsString(authentication_management_field)) {
+ ogs_error("OpenAPI_authentication_subscription_parseFromJSON() failed [authentication_management_field]");
+ goto end;
+ }
}
cJSON *algorithm_id = cJSON_GetObjectItemCaseSensitive(authentication_subscriptionJSON, "algorithmId");
- if (algorithm_id) {
- if (!cJSON_IsString(algorithm_id)) {
- ogs_error("OpenAPI_authentication_subscription_parseFromJSON() failed [algorithm_id]");
- goto end;
- }
+ if (algorithm_id) {
+ if (!cJSON_IsString(algorithm_id)) {
+ ogs_error("OpenAPI_authentication_subscription_parseFromJSON() failed [algorithm_id]");
+ goto end;
+ }
}
cJSON *enc_opc_key = cJSON_GetObjectItemCaseSensitive(authentication_subscriptionJSON, "encOpcKey");
- if (enc_opc_key) {
- if (!cJSON_IsString(enc_opc_key)) {
- ogs_error("OpenAPI_authentication_subscription_parseFromJSON() failed [enc_opc_key]");
- goto end;
- }
+ if (enc_opc_key) {
+ if (!cJSON_IsString(enc_opc_key)) {
+ ogs_error("OpenAPI_authentication_subscription_parseFromJSON() failed [enc_opc_key]");
+ goto end;
+ }
}
cJSON *enc_topc_key = cJSON_GetObjectItemCaseSensitive(authentication_subscriptionJSON, "encTopcKey");
- if (enc_topc_key) {
- if (!cJSON_IsString(enc_topc_key)) {
- ogs_error("OpenAPI_authentication_subscription_parseFromJSON() failed [enc_topc_key]");
- goto end;
- }
+ if (enc_topc_key) {
+ if (!cJSON_IsString(enc_topc_key)) {
+ ogs_error("OpenAPI_authentication_subscription_parseFromJSON() failed [enc_topc_key]");
+ goto end;
+ }
}
cJSON *vector_generation_in_hss = cJSON_GetObjectItemCaseSensitive(authentication_subscriptionJSON, "vectorGenerationInHss");
- if (vector_generation_in_hss) {
- if (!cJSON_IsBool(vector_generation_in_hss)) {
- ogs_error("OpenAPI_authentication_subscription_parseFromJSON() failed [vector_generation_in_hss]");
- goto end;
- }
+ if (vector_generation_in_hss) {
+ if (!cJSON_IsBool(vector_generation_in_hss)) {
+ ogs_error("OpenAPI_authentication_subscription_parseFromJSON() failed [vector_generation_in_hss]");
+ goto end;
+ }
}
cJSON *n5gc_auth_method = cJSON_GetObjectItemCaseSensitive(authentication_subscriptionJSON, "n5gcAuthMethod");
OpenAPI_auth_method_e n5gc_auth_methodVariable;
- if (n5gc_auth_method) {
- if (!cJSON_IsString(n5gc_auth_method)) {
- ogs_error("OpenAPI_authentication_subscription_parseFromJSON() failed [n5gc_auth_method]");
- goto end;
- }
- n5gc_auth_methodVariable = OpenAPI_auth_method_FromString(n5gc_auth_method->valuestring);
+ if (n5gc_auth_method) {
+ if (!cJSON_IsString(n5gc_auth_method)) {
+ ogs_error("OpenAPI_authentication_subscription_parseFromJSON() failed [n5gc_auth_method]");
+ goto end;
+ }
+ n5gc_auth_methodVariable = OpenAPI_auth_method_FromString(n5gc_auth_method->valuestring);
}
cJSON *rg_authentication_ind = cJSON_GetObjectItemCaseSensitive(authentication_subscriptionJSON, "rgAuthenticationInd");
- if (rg_authentication_ind) {
- if (!cJSON_IsBool(rg_authentication_ind)) {
- ogs_error("OpenAPI_authentication_subscription_parseFromJSON() failed [rg_authentication_ind]");
- goto end;
- }
+ if (rg_authentication_ind) {
+ if (!cJSON_IsBool(rg_authentication_ind)) {
+ ogs_error("OpenAPI_authentication_subscription_parseFromJSON() failed [rg_authentication_ind]");
+ goto end;
+ }
}
cJSON *supi = cJSON_GetObjectItemCaseSensitive(authentication_subscriptionJSON, "supi");
- if (supi) {
- if (!cJSON_IsString(supi)) {
- ogs_error("OpenAPI_authentication_subscription_parseFromJSON() failed [supi]");
- goto end;
- }
+ if (supi) {
+ if (!cJSON_IsString(supi)) {
+ ogs_error("OpenAPI_authentication_subscription_parseFromJSON() failed [supi]");
+ goto end;
+ }
}
authentication_subscription_local_var = OpenAPI_authentication_subscription_create (
@@ -287,7 +287,7 @@ OpenAPI_authentication_subscription_t *OpenAPI_authentication_subscription_parse
n5gc_auth_method ? n5gc_auth_methodVariable : 0,
rg_authentication_ind ? rg_authentication_ind->valueint : 0,
supi ? ogs_strdup_or_assert(supi->valuestring) : NULL
- );
+ );
return authentication_subscription_local_var;
end:
diff --git a/lib/sbi/openapi/model/authentication_subscription.h b/lib/sbi/openapi/model/authentication_subscription.h
index eee03e4a5..766f2e0d3 100644
--- a/lib/sbi/openapi/model/authentication_subscription.h
+++ b/lib/sbi/openapi/model/authentication_subscription.h
@@ -1,7 +1,7 @@
/*
* authentication_subscription.h
*
- *
+ *
*/
#ifndef _OpenAPI_authentication_subscription_H_
@@ -48,7 +48,7 @@ OpenAPI_authentication_subscription_t *OpenAPI_authentication_subscription_creat
OpenAPI_auth_method_e n5gc_auth_method,
int rg_authentication_ind,
char *supi
- );
+);
void OpenAPI_authentication_subscription_free(OpenAPI_authentication_subscription_t *authentication_subscription);
OpenAPI_authentication_subscription_t *OpenAPI_authentication_subscription_parseFromJSON(cJSON *authentication_subscriptionJSON);
cJSON *OpenAPI_authentication_subscription_convertToJSON(OpenAPI_authentication_subscription_t *authentication_subscription);
diff --git a/lib/sbi/openapi/model/authentication_vector.c b/lib/sbi/openapi/model/authentication_vector.c
index 3ed18e2b8..823931864 100644
--- a/lib/sbi/openapi/model/authentication_vector.c
+++ b/lib/sbi/openapi/model/authentication_vector.c
@@ -13,7 +13,7 @@ OpenAPI_authentication_vector_t *OpenAPI_authentication_vector_create(
char *ik_prime,
char *xres_star,
char *kausf
- )
+)
{
OpenAPI_authentication_vector_t *authentication_vector_local_var = OpenAPI_malloc(sizeof(OpenAPI_authentication_vector_t));
if (!authentication_vector_local_var) {
@@ -68,10 +68,10 @@ cJSON *OpenAPI_authentication_vector_convertToJSON(OpenAPI_authentication_vector
}
if (authentication_vector->xres) {
- if (cJSON_AddStringToObject(item, "xres", authentication_vector->xres) == NULL) {
- ogs_error("OpenAPI_authentication_vector_convertToJSON() failed [xres]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "xres", authentication_vector->xres) == NULL) {
+ ogs_error("OpenAPI_authentication_vector_convertToJSON() failed [xres]");
+ goto end;
+ }
}
if (cJSON_AddStringToObject(item, "autn", authentication_vector->autn) == NULL) {
@@ -80,31 +80,31 @@ cJSON *OpenAPI_authentication_vector_convertToJSON(OpenAPI_authentication_vector
}
if (authentication_vector->ck_prime) {
- if (cJSON_AddStringToObject(item, "ckPrime", authentication_vector->ck_prime) == NULL) {
- ogs_error("OpenAPI_authentication_vector_convertToJSON() failed [ck_prime]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "ckPrime", authentication_vector->ck_prime) == NULL) {
+ ogs_error("OpenAPI_authentication_vector_convertToJSON() failed [ck_prime]");
+ goto end;
+ }
}
if (authentication_vector->ik_prime) {
- if (cJSON_AddStringToObject(item, "ikPrime", authentication_vector->ik_prime) == NULL) {
- ogs_error("OpenAPI_authentication_vector_convertToJSON() failed [ik_prime]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "ikPrime", authentication_vector->ik_prime) == NULL) {
+ ogs_error("OpenAPI_authentication_vector_convertToJSON() failed [ik_prime]");
+ goto end;
+ }
}
if (authentication_vector->xres_star) {
- if (cJSON_AddStringToObject(item, "xresStar", authentication_vector->xres_star) == NULL) {
- ogs_error("OpenAPI_authentication_vector_convertToJSON() failed [xres_star]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "xresStar", authentication_vector->xres_star) == NULL) {
+ ogs_error("OpenAPI_authentication_vector_convertToJSON() failed [xres_star]");
+ goto end;
+ }
}
if (authentication_vector->kausf) {
- if (cJSON_AddStringToObject(item, "kausf", authentication_vector->kausf) == NULL) {
- ogs_error("OpenAPI_authentication_vector_convertToJSON() failed [kausf]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "kausf", authentication_vector->kausf) == NULL) {
+ ogs_error("OpenAPI_authentication_vector_convertToJSON() failed [kausf]");
+ goto end;
+ }
}
end:
@@ -121,7 +121,7 @@ OpenAPI_authentication_vector_t *OpenAPI_authentication_vector_parseFromJSON(cJS
}
OpenAPI_av_type_e av_typeVariable;
-
+
if (!cJSON_IsString(av_type)) {
ogs_error("OpenAPI_authentication_vector_parseFromJSON() failed [av_type]");
goto end;
@@ -134,7 +134,7 @@ OpenAPI_authentication_vector_t *OpenAPI_authentication_vector_parseFromJSON(cJS
goto end;
}
-
+
if (!cJSON_IsString(rand)) {
ogs_error("OpenAPI_authentication_vector_parseFromJSON() failed [rand]");
goto end;
@@ -142,11 +142,11 @@ OpenAPI_authentication_vector_t *OpenAPI_authentication_vector_parseFromJSON(cJS
cJSON *xres = cJSON_GetObjectItemCaseSensitive(authentication_vectorJSON, "xres");
- if (xres) {
- if (!cJSON_IsString(xres)) {
- ogs_error("OpenAPI_authentication_vector_parseFromJSON() failed [xres]");
- goto end;
- }
+ if (xres) {
+ if (!cJSON_IsString(xres)) {
+ ogs_error("OpenAPI_authentication_vector_parseFromJSON() failed [xres]");
+ goto end;
+ }
}
cJSON *autn = cJSON_GetObjectItemCaseSensitive(authentication_vectorJSON, "autn");
@@ -155,7 +155,7 @@ OpenAPI_authentication_vector_t *OpenAPI_authentication_vector_parseFromJSON(cJS
goto end;
}
-
+
if (!cJSON_IsString(autn)) {
ogs_error("OpenAPI_authentication_vector_parseFromJSON() failed [autn]");
goto end;
@@ -163,38 +163,38 @@ OpenAPI_authentication_vector_t *OpenAPI_authentication_vector_parseFromJSON(cJS
cJSON *ck_prime = cJSON_GetObjectItemCaseSensitive(authentication_vectorJSON, "ckPrime");
- if (ck_prime) {
- if (!cJSON_IsString(ck_prime)) {
- ogs_error("OpenAPI_authentication_vector_parseFromJSON() failed [ck_prime]");
- goto end;
- }
+ if (ck_prime) {
+ if (!cJSON_IsString(ck_prime)) {
+ ogs_error("OpenAPI_authentication_vector_parseFromJSON() failed [ck_prime]");
+ goto end;
+ }
}
cJSON *ik_prime = cJSON_GetObjectItemCaseSensitive(authentication_vectorJSON, "ikPrime");
- if (ik_prime) {
- if (!cJSON_IsString(ik_prime)) {
- ogs_error("OpenAPI_authentication_vector_parseFromJSON() failed [ik_prime]");
- goto end;
- }
+ if (ik_prime) {
+ if (!cJSON_IsString(ik_prime)) {
+ ogs_error("OpenAPI_authentication_vector_parseFromJSON() failed [ik_prime]");
+ goto end;
+ }
}
cJSON *xres_star = cJSON_GetObjectItemCaseSensitive(authentication_vectorJSON, "xresStar");
- if (xres_star) {
- if (!cJSON_IsString(xres_star)) {
- ogs_error("OpenAPI_authentication_vector_parseFromJSON() failed [xres_star]");
- goto end;
- }
+ if (xres_star) {
+ if (!cJSON_IsString(xres_star)) {
+ ogs_error("OpenAPI_authentication_vector_parseFromJSON() failed [xres_star]");
+ goto end;
+ }
}
cJSON *kausf = cJSON_GetObjectItemCaseSensitive(authentication_vectorJSON, "kausf");
- if (kausf) {
- if (!cJSON_IsString(kausf)) {
- ogs_error("OpenAPI_authentication_vector_parseFromJSON() failed [kausf]");
- goto end;
- }
+ if (kausf) {
+ if (!cJSON_IsString(kausf)) {
+ ogs_error("OpenAPI_authentication_vector_parseFromJSON() failed [kausf]");
+ goto end;
+ }
}
authentication_vector_local_var = OpenAPI_authentication_vector_create (
@@ -206,7 +206,7 @@ OpenAPI_authentication_vector_t *OpenAPI_authentication_vector_parseFromJSON(cJS
ik_prime ? ogs_strdup_or_assert(ik_prime->valuestring) : NULL,
xres_star ? ogs_strdup_or_assert(xres_star->valuestring) : NULL,
kausf ? ogs_strdup_or_assert(kausf->valuestring) : NULL
- );
+ );
return authentication_vector_local_var;
end:
diff --git a/lib/sbi/openapi/model/authentication_vector.h b/lib/sbi/openapi/model/authentication_vector.h
index 4be13e2f8..36e294109 100644
--- a/lib/sbi/openapi/model/authentication_vector.h
+++ b/lib/sbi/openapi/model/authentication_vector.h
@@ -1,7 +1,7 @@
/*
* authentication_vector.h
*
- *
+ *
*/
#ifndef _OpenAPI_authentication_vector_H_
@@ -12,7 +12,7 @@
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
-#include "av5_g_he_aka.h"
+#include "av5_ghe_aka.h"
#include "av_eap_aka_prime.h"
#include "av_type.h"
@@ -41,7 +41,7 @@ OpenAPI_authentication_vector_t *OpenAPI_authentication_vector_create(
char *ik_prime,
char *xres_star,
char *kausf
- );
+);
void OpenAPI_authentication_vector_free(OpenAPI_authentication_vector_t *authentication_vector);
OpenAPI_authentication_vector_t *OpenAPI_authentication_vector_parseFromJSON(cJSON *authentication_vectorJSON);
cJSON *OpenAPI_authentication_vector_convertToJSON(OpenAPI_authentication_vector_t *authentication_vector);
diff --git a/lib/sbi/openapi/model/authorization_data.c b/lib/sbi/openapi/model/authorization_data.c
index 218fe22f0..f06420a79 100644
--- a/lib/sbi/openapi/model/authorization_data.c
+++ b/lib/sbi/openapi/model/authorization_data.c
@@ -7,7 +7,7 @@
OpenAPI_authorization_data_t *OpenAPI_authorization_data_create(
OpenAPI_list_t *authorization_data,
char *validity_time
- )
+)
{
OpenAPI_authorization_data_t *authorization_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_authorization_data_t));
if (!authorization_data_local_var) {
@@ -62,10 +62,10 @@ cJSON *OpenAPI_authorization_data_convertToJSON(OpenAPI_authorization_data_t *au
}
if (authorization_data->validity_time) {
- if (cJSON_AddStringToObject(item, "validityTime", authorization_data->validity_time) == NULL) {
- ogs_error("OpenAPI_authorization_data_convertToJSON() failed [validity_time]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "validityTime", authorization_data->validity_time) == NULL) {
+ ogs_error("OpenAPI_authorization_data_convertToJSON() failed [validity_time]");
+ goto end;
+ }
}
end:
@@ -82,9 +82,9 @@ OpenAPI_authorization_data_t *OpenAPI_authorization_data_parseFromJSON(cJSON *au
}
OpenAPI_list_t *authorization_dataList;
-
+
cJSON *authorization_data_local_nonprimitive;
- if (!cJSON_IsArray(authorization_data)) {
+ if (!cJSON_IsArray(authorization_data)){
ogs_error("OpenAPI_authorization_data_parseFromJSON() failed [authorization_data]");
goto end;
}
@@ -103,17 +103,17 @@ OpenAPI_authorization_data_t *OpenAPI_authorization_data_parseFromJSON(cJSON *au
cJSON *validity_time = cJSON_GetObjectItemCaseSensitive(authorization_dataJSON, "validityTime");
- if (validity_time) {
- if (!cJSON_IsString(validity_time)) {
- ogs_error("OpenAPI_authorization_data_parseFromJSON() failed [validity_time]");
- goto end;
- }
+ if (validity_time) {
+ if (!cJSON_IsString(validity_time)) {
+ ogs_error("OpenAPI_authorization_data_parseFromJSON() failed [validity_time]");
+ goto end;
+ }
}
authorization_data_local_var = OpenAPI_authorization_data_create (
authorization_dataList,
validity_time ? ogs_strdup_or_assert(validity_time->valuestring) : NULL
- );
+ );
return authorization_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/authorization_data.h b/lib/sbi/openapi/model/authorization_data.h
index 388c623c3..0b547ff6f 100644
--- a/lib/sbi/openapi/model/authorization_data.h
+++ b/lib/sbi/openapi/model/authorization_data.h
@@ -1,7 +1,7 @@
/*
* authorization_data.h
*
- *
+ *
*/
#ifndef _OpenAPI_authorization_data_H_
@@ -27,7 +27,7 @@ typedef struct OpenAPI_authorization_data_s {
OpenAPI_authorization_data_t *OpenAPI_authorization_data_create(
OpenAPI_list_t *authorization_data,
char *validity_time
- );
+);
void OpenAPI_authorization_data_free(OpenAPI_authorization_data_t *authorization_data);
OpenAPI_authorization_data_t *OpenAPI_authorization_data_parseFromJSON(cJSON *authorization_dataJSON);
cJSON *OpenAPI_authorization_data_convertToJSON(OpenAPI_authorization_data_t *authorization_data);
diff --git a/lib/sbi/openapi/model/authorized_default_qos.c b/lib/sbi/openapi/model/authorized_default_qos.c
index 4a5952d7c..a99cc135d 100644
--- a/lib/sbi/openapi/model/authorized_default_qos.c
+++ b/lib/sbi/openapi/model/authorized_default_qos.c
@@ -14,9 +14,8 @@ OpenAPI_authorized_default_qos_t *OpenAPI_authorized_default_qos_create(
char *maxbr_dl,
char *gbr_ul,
char *gbr_dl,
- int qnc,
int ext_max_data_burst_vol
- )
+)
{
OpenAPI_authorized_default_qos_t *authorized_default_qos_local_var = OpenAPI_malloc(sizeof(OpenAPI_authorized_default_qos_t));
if (!authorized_default_qos_local_var) {
@@ -31,7 +30,6 @@ OpenAPI_authorized_default_qos_t *OpenAPI_authorized_default_qos_create(
authorized_default_qos_local_var->maxbr_dl = maxbr_dl;
authorized_default_qos_local_var->gbr_ul = gbr_ul;
authorized_default_qos_local_var->gbr_dl = gbr_dl;
- authorized_default_qos_local_var->qnc = qnc;
authorized_default_qos_local_var->ext_max_data_burst_vol = ext_max_data_burst_vol;
return authorized_default_qos_local_var;
@@ -62,86 +60,79 @@ cJSON *OpenAPI_authorized_default_qos_convertToJSON(OpenAPI_authorized_default_q
item = cJSON_CreateObject();
if (authorized_default_qos->_5qi) {
- if (cJSON_AddNumberToObject(item, "5qi", authorized_default_qos->_5qi) == NULL) {
- ogs_error("OpenAPI_authorized_default_qos_convertToJSON() failed [_5qi]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "5qi", authorized_default_qos->_5qi) == NULL) {
+ ogs_error("OpenAPI_authorized_default_qos_convertToJSON() failed [_5qi]");
+ goto end;
+ }
}
if (authorized_default_qos->arp) {
- cJSON *arp_local_JSON = OpenAPI_arp_convertToJSON(authorized_default_qos->arp);
- if (arp_local_JSON == NULL) {
- ogs_error("OpenAPI_authorized_default_qos_convertToJSON() failed [arp]");
- goto end;
- }
- cJSON_AddItemToObject(item, "arp", arp_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_authorized_default_qos_convertToJSON() failed [arp]");
- goto end;
- }
+ cJSON *arp_local_JSON = OpenAPI_arp_convertToJSON(authorized_default_qos->arp);
+ if (arp_local_JSON == NULL) {
+ ogs_error("OpenAPI_authorized_default_qos_convertToJSON() failed [arp]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "arp", arp_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_authorized_default_qos_convertToJSON() failed [arp]");
+ goto end;
+ }
}
if (authorized_default_qos->priority_level) {
- if (cJSON_AddNumberToObject(item, "priorityLevel", authorized_default_qos->priority_level) == NULL) {
- ogs_error("OpenAPI_authorized_default_qos_convertToJSON() failed [priority_level]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "priorityLevel", authorized_default_qos->priority_level) == NULL) {
+ ogs_error("OpenAPI_authorized_default_qos_convertToJSON() failed [priority_level]");
+ goto end;
+ }
}
if (authorized_default_qos->aver_window) {
- if (cJSON_AddNumberToObject(item, "averWindow", authorized_default_qos->aver_window) == NULL) {
- ogs_error("OpenAPI_authorized_default_qos_convertToJSON() failed [aver_window]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "averWindow", authorized_default_qos->aver_window) == NULL) {
+ ogs_error("OpenAPI_authorized_default_qos_convertToJSON() failed [aver_window]");
+ goto end;
+ }
}
if (authorized_default_qos->max_data_burst_vol) {
- if (cJSON_AddNumberToObject(item, "maxDataBurstVol", authorized_default_qos->max_data_burst_vol) == NULL) {
- ogs_error("OpenAPI_authorized_default_qos_convertToJSON() failed [max_data_burst_vol]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "maxDataBurstVol", authorized_default_qos->max_data_burst_vol) == NULL) {
+ ogs_error("OpenAPI_authorized_default_qos_convertToJSON() failed [max_data_burst_vol]");
+ goto end;
+ }
}
if (authorized_default_qos->maxbr_ul) {
- if (cJSON_AddStringToObject(item, "maxbrUl", authorized_default_qos->maxbr_ul) == NULL) {
- ogs_error("OpenAPI_authorized_default_qos_convertToJSON() failed [maxbr_ul]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "maxbrUl", authorized_default_qos->maxbr_ul) == NULL) {
+ ogs_error("OpenAPI_authorized_default_qos_convertToJSON() failed [maxbr_ul]");
+ goto end;
+ }
}
if (authorized_default_qos->maxbr_dl) {
- if (cJSON_AddStringToObject(item, "maxbrDl", authorized_default_qos->maxbr_dl) == NULL) {
- ogs_error("OpenAPI_authorized_default_qos_convertToJSON() failed [maxbr_dl]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "maxbrDl", authorized_default_qos->maxbr_dl) == NULL) {
+ ogs_error("OpenAPI_authorized_default_qos_convertToJSON() failed [maxbr_dl]");
+ goto end;
+ }
}
if (authorized_default_qos->gbr_ul) {
- if (cJSON_AddStringToObject(item, "gbrUl", authorized_default_qos->gbr_ul) == NULL) {
- ogs_error("OpenAPI_authorized_default_qos_convertToJSON() failed [gbr_ul]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "gbrUl", authorized_default_qos->gbr_ul) == NULL) {
+ ogs_error("OpenAPI_authorized_default_qos_convertToJSON() failed [gbr_ul]");
+ goto end;
+ }
}
if (authorized_default_qos->gbr_dl) {
- if (cJSON_AddStringToObject(item, "gbrDl", authorized_default_qos->gbr_dl) == NULL) {
- ogs_error("OpenAPI_authorized_default_qos_convertToJSON() failed [gbr_dl]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "gbrDl", authorized_default_qos->gbr_dl) == NULL) {
+ ogs_error("OpenAPI_authorized_default_qos_convertToJSON() failed [gbr_dl]");
+ goto end;
}
-
- if (authorized_default_qos->qnc) {
- if (cJSON_AddBoolToObject(item, "qnc", authorized_default_qos->qnc) == NULL) {
- ogs_error("OpenAPI_authorized_default_qos_convertToJSON() failed [qnc]");
- goto end;
- }
}
if (authorized_default_qos->ext_max_data_burst_vol) {
- if (cJSON_AddNumberToObject(item, "extMaxDataBurstVol", authorized_default_qos->ext_max_data_burst_vol) == NULL) {
- ogs_error("OpenAPI_authorized_default_qos_convertToJSON() failed [ext_max_data_burst_vol]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "extMaxDataBurstVol", authorized_default_qos->ext_max_data_burst_vol) == NULL) {
+ ogs_error("OpenAPI_authorized_default_qos_convertToJSON() failed [ext_max_data_burst_vol]");
+ goto end;
+ }
}
end:
@@ -153,99 +144,90 @@ OpenAPI_authorized_default_qos_t *OpenAPI_authorized_default_qos_parseFromJSON(c
OpenAPI_authorized_default_qos_t *authorized_default_qos_local_var = NULL;
cJSON *_5qi = cJSON_GetObjectItemCaseSensitive(authorized_default_qosJSON, "5qi");
- if (_5qi) {
- if (!cJSON_IsNumber(_5qi)) {
- ogs_error("OpenAPI_authorized_default_qos_parseFromJSON() failed [_5qi]");
- goto end;
- }
+ if (_5qi) {
+ if (!cJSON_IsNumber(_5qi)) {
+ ogs_error("OpenAPI_authorized_default_qos_parseFromJSON() failed [_5qi]");
+ goto end;
+ }
}
cJSON *arp = cJSON_GetObjectItemCaseSensitive(authorized_default_qosJSON, "arp");
OpenAPI_arp_t *arp_local_nonprim = NULL;
- if (arp) {
- arp_local_nonprim = OpenAPI_arp_parseFromJSON(arp);
+ if (arp) {
+ arp_local_nonprim = OpenAPI_arp_parseFromJSON(arp);
}
cJSON *priority_level = cJSON_GetObjectItemCaseSensitive(authorized_default_qosJSON, "priorityLevel");
- if (priority_level) {
- if (!cJSON_IsNumber(priority_level)) {
- ogs_error("OpenAPI_authorized_default_qos_parseFromJSON() failed [priority_level]");
- goto end;
- }
+ if (priority_level) {
+ if (!cJSON_IsNumber(priority_level)) {
+ ogs_error("OpenAPI_authorized_default_qos_parseFromJSON() failed [priority_level]");
+ goto end;
+ }
}
cJSON *aver_window = cJSON_GetObjectItemCaseSensitive(authorized_default_qosJSON, "averWindow");
- if (aver_window) {
- if (!cJSON_IsNumber(aver_window)) {
- ogs_error("OpenAPI_authorized_default_qos_parseFromJSON() failed [aver_window]");
- goto end;
- }
+ if (aver_window) {
+ if (!cJSON_IsNumber(aver_window)) {
+ ogs_error("OpenAPI_authorized_default_qos_parseFromJSON() failed [aver_window]");
+ goto end;
+ }
}
cJSON *max_data_burst_vol = cJSON_GetObjectItemCaseSensitive(authorized_default_qosJSON, "maxDataBurstVol");
- if (max_data_burst_vol) {
- if (!cJSON_IsNumber(max_data_burst_vol)) {
- ogs_error("OpenAPI_authorized_default_qos_parseFromJSON() failed [max_data_burst_vol]");
- goto end;
- }
+ if (max_data_burst_vol) {
+ if (!cJSON_IsNumber(max_data_burst_vol)) {
+ ogs_error("OpenAPI_authorized_default_qos_parseFromJSON() failed [max_data_burst_vol]");
+ goto end;
+ }
}
cJSON *maxbr_ul = cJSON_GetObjectItemCaseSensitive(authorized_default_qosJSON, "maxbrUl");
- if (maxbr_ul) {
- if (!cJSON_IsString(maxbr_ul)) {
- ogs_error("OpenAPI_authorized_default_qos_parseFromJSON() failed [maxbr_ul]");
- goto end;
- }
+ if (maxbr_ul) {
+ if (!cJSON_IsString(maxbr_ul)) {
+ ogs_error("OpenAPI_authorized_default_qos_parseFromJSON() failed [maxbr_ul]");
+ goto end;
+ }
}
cJSON *maxbr_dl = cJSON_GetObjectItemCaseSensitive(authorized_default_qosJSON, "maxbrDl");
- if (maxbr_dl) {
- if (!cJSON_IsString(maxbr_dl)) {
- ogs_error("OpenAPI_authorized_default_qos_parseFromJSON() failed [maxbr_dl]");
- goto end;
- }
+ if (maxbr_dl) {
+ if (!cJSON_IsString(maxbr_dl)) {
+ ogs_error("OpenAPI_authorized_default_qos_parseFromJSON() failed [maxbr_dl]");
+ goto end;
+ }
}
cJSON *gbr_ul = cJSON_GetObjectItemCaseSensitive(authorized_default_qosJSON, "gbrUl");
- if (gbr_ul) {
- if (!cJSON_IsString(gbr_ul)) {
- ogs_error("OpenAPI_authorized_default_qos_parseFromJSON() failed [gbr_ul]");
- goto end;
- }
+ if (gbr_ul) {
+ if (!cJSON_IsString(gbr_ul)) {
+ ogs_error("OpenAPI_authorized_default_qos_parseFromJSON() failed [gbr_ul]");
+ goto end;
+ }
}
cJSON *gbr_dl = cJSON_GetObjectItemCaseSensitive(authorized_default_qosJSON, "gbrDl");
- if (gbr_dl) {
- if (!cJSON_IsString(gbr_dl)) {
- ogs_error("OpenAPI_authorized_default_qos_parseFromJSON() failed [gbr_dl]");
- goto end;
- }
+ if (gbr_dl) {
+ if (!cJSON_IsString(gbr_dl)) {
+ ogs_error("OpenAPI_authorized_default_qos_parseFromJSON() failed [gbr_dl]");
+ goto end;
}
-
- cJSON *qnc = cJSON_GetObjectItemCaseSensitive(authorized_default_qosJSON, "qnc");
-
- if (qnc) {
- if (!cJSON_IsBool(qnc)) {
- ogs_error("OpenAPI_authorized_default_qos_parseFromJSON() failed [qnc]");
- goto end;
- }
}
cJSON *ext_max_data_burst_vol = cJSON_GetObjectItemCaseSensitive(authorized_default_qosJSON, "extMaxDataBurstVol");
- if (ext_max_data_burst_vol) {
- if (!cJSON_IsNumber(ext_max_data_burst_vol)) {
- ogs_error("OpenAPI_authorized_default_qos_parseFromJSON() failed [ext_max_data_burst_vol]");
- goto end;
- }
+ if (ext_max_data_burst_vol) {
+ if (!cJSON_IsNumber(ext_max_data_burst_vol)) {
+ ogs_error("OpenAPI_authorized_default_qos_parseFromJSON() failed [ext_max_data_burst_vol]");
+ goto end;
+ }
}
authorized_default_qos_local_var = OpenAPI_authorized_default_qos_create (
@@ -258,9 +240,8 @@ OpenAPI_authorized_default_qos_t *OpenAPI_authorized_default_qos_parseFromJSON(c
maxbr_dl ? ogs_strdup_or_assert(maxbr_dl->valuestring) : NULL,
gbr_ul ? ogs_strdup_or_assert(gbr_ul->valuestring) : NULL,
gbr_dl ? ogs_strdup_or_assert(gbr_dl->valuestring) : NULL,
- qnc ? qnc->valueint : 0,
ext_max_data_burst_vol ? ext_max_data_burst_vol->valuedouble : 0
- );
+ );
return authorized_default_qos_local_var;
end:
diff --git a/lib/sbi/openapi/model/authorized_default_qos.h b/lib/sbi/openapi/model/authorized_default_qos.h
index f5088a7ec..4f0279ab7 100644
--- a/lib/sbi/openapi/model/authorized_default_qos.h
+++ b/lib/sbi/openapi/model/authorized_default_qos.h
@@ -1,7 +1,7 @@
/*
* authorized_default_qos.h
*
- *
+ *
*/
#ifndef _OpenAPI_authorized_default_qos_H_
@@ -29,7 +29,6 @@ typedef struct OpenAPI_authorized_default_qos_s {
char *maxbr_dl;
char *gbr_ul;
char *gbr_dl;
- int qnc;
int ext_max_data_burst_vol;
} OpenAPI_authorized_default_qos_t;
@@ -43,9 +42,8 @@ OpenAPI_authorized_default_qos_t *OpenAPI_authorized_default_qos_create(
char *maxbr_dl,
char *gbr_ul,
char *gbr_dl,
- int qnc,
int ext_max_data_burst_vol
- );
+);
void OpenAPI_authorized_default_qos_free(OpenAPI_authorized_default_qos_t *authorized_default_qos);
OpenAPI_authorized_default_qos_t *OpenAPI_authorized_default_qos_parseFromJSON(cJSON *authorized_default_qosJSON);
cJSON *OpenAPI_authorized_default_qos_convertToJSON(OpenAPI_authorized_default_qos_t *authorized_default_qos);
diff --git a/lib/sbi/openapi/model/authorized_network_slice_info.c b/lib/sbi/openapi/model/authorized_network_slice_info.c
index 586618fec..6b7d16bd1 100644
--- a/lib/sbi/openapi/model/authorized_network_slice_info.c
+++ b/lib/sbi/openapi/model/authorized_network_slice_info.c
@@ -17,7 +17,7 @@ OpenAPI_authorized_network_slice_info_t *OpenAPI_authorized_network_slice_info_c
char *nrf_amf_set_nf_mgt_uri,
char *nrf_amf_set_access_token_uri,
char *target_amf_service_set
- )
+)
{
OpenAPI_authorized_network_slice_info_t *authorized_network_slice_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_authorized_network_slice_info_t));
if (!authorized_network_slice_info_local_var) {
@@ -86,154 +86,154 @@ cJSON *OpenAPI_authorized_network_slice_info_convertToJSON(OpenAPI_authorized_ne
item = cJSON_CreateObject();
if (authorized_network_slice_info->allowed_nssai_list) {
- cJSON *allowed_nssai_listList = cJSON_AddArrayToObject(item, "allowedNssaiList");
- if (allowed_nssai_listList == NULL) {
- ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [allowed_nssai_list]");
- goto end;
- }
+ cJSON *allowed_nssai_listList = cJSON_AddArrayToObject(item, "allowedNssaiList");
+ if (allowed_nssai_listList == NULL) {
+ ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [allowed_nssai_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *allowed_nssai_list_node;
- if (authorized_network_slice_info->allowed_nssai_list) {
- OpenAPI_list_for_each(authorized_network_slice_info->allowed_nssai_list, allowed_nssai_list_node) {
- cJSON *itemLocal = OpenAPI_allowed_nssai_convertToJSON(allowed_nssai_list_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [allowed_nssai_list]");
- goto end;
- }
- cJSON_AddItemToArray(allowed_nssai_listList, itemLocal);
+ OpenAPI_lnode_t *allowed_nssai_list_node;
+ if (authorized_network_slice_info->allowed_nssai_list) {
+ OpenAPI_list_for_each(authorized_network_slice_info->allowed_nssai_list, allowed_nssai_list_node) {
+ cJSON *itemLocal = OpenAPI_allowed_nssai_convertToJSON(allowed_nssai_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [allowed_nssai_list]");
+ goto end;
}
+ cJSON_AddItemToArray(allowed_nssai_listList, itemLocal);
}
}
+ }
if (authorized_network_slice_info->configured_nssai) {
- cJSON *configured_nssaiList = cJSON_AddArrayToObject(item, "configuredNssai");
- if (configured_nssaiList == NULL) {
- ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [configured_nssai]");
- goto end;
- }
+ cJSON *configured_nssaiList = cJSON_AddArrayToObject(item, "configuredNssai");
+ if (configured_nssaiList == NULL) {
+ ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [configured_nssai]");
+ goto end;
+ }
- OpenAPI_lnode_t *configured_nssai_node;
- if (authorized_network_slice_info->configured_nssai) {
- OpenAPI_list_for_each(authorized_network_slice_info->configured_nssai, configured_nssai_node) {
- cJSON *itemLocal = OpenAPI_configured_snssai_convertToJSON(configured_nssai_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [configured_nssai]");
- goto end;
- }
- cJSON_AddItemToArray(configured_nssaiList, itemLocal);
+ OpenAPI_lnode_t *configured_nssai_node;
+ if (authorized_network_slice_info->configured_nssai) {
+ OpenAPI_list_for_each(authorized_network_slice_info->configured_nssai, configured_nssai_node) {
+ cJSON *itemLocal = OpenAPI_configured_snssai_convertToJSON(configured_nssai_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [configured_nssai]");
+ goto end;
}
+ cJSON_AddItemToArray(configured_nssaiList, itemLocal);
}
}
+ }
if (authorized_network_slice_info->target_amf_set) {
- if (cJSON_AddStringToObject(item, "targetAmfSet", authorized_network_slice_info->target_amf_set) == NULL) {
- ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [target_amf_set]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "targetAmfSet", authorized_network_slice_info->target_amf_set) == NULL) {
+ ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [target_amf_set]");
+ goto end;
+ }
}
if (authorized_network_slice_info->candidate_amf_list) {
- cJSON *candidate_amf_list = cJSON_AddArrayToObject(item, "candidateAmfList");
- if (candidate_amf_list == NULL) {
- ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [candidate_amf_list]");
- goto end;
- }
+ cJSON *candidate_amf_list = cJSON_AddArrayToObject(item, "candidateAmfList");
+ if (candidate_amf_list == NULL) {
+ ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [candidate_amf_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *candidate_amf_list_node;
- OpenAPI_list_for_each(authorized_network_slice_info->candidate_amf_list, candidate_amf_list_node) {
- if (cJSON_AddStringToObject(candidate_amf_list, "", (char*)candidate_amf_list_node->data) == NULL) {
- ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [candidate_amf_list]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *candidate_amf_list_node;
+ OpenAPI_list_for_each(authorized_network_slice_info->candidate_amf_list, candidate_amf_list_node) {
+ if (cJSON_AddStringToObject(candidate_amf_list, "", (char*)candidate_amf_list_node->data) == NULL) {
+ ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [candidate_amf_list]");
+ goto end;
+ }
+ }
}
if (authorized_network_slice_info->rejected_nssai_in_plmn) {
- cJSON *rejected_nssai_in_plmnList = cJSON_AddArrayToObject(item, "rejectedNssaiInPlmn");
- if (rejected_nssai_in_plmnList == NULL) {
- ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [rejected_nssai_in_plmn]");
- goto end;
- }
+ cJSON *rejected_nssai_in_plmnList = cJSON_AddArrayToObject(item, "rejectedNssaiInPlmn");
+ if (rejected_nssai_in_plmnList == NULL) {
+ ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [rejected_nssai_in_plmn]");
+ goto end;
+ }
- OpenAPI_lnode_t *rejected_nssai_in_plmn_node;
- if (authorized_network_slice_info->rejected_nssai_in_plmn) {
- OpenAPI_list_for_each(authorized_network_slice_info->rejected_nssai_in_plmn, rejected_nssai_in_plmn_node) {
- cJSON *itemLocal = OpenAPI_snssai_convertToJSON(rejected_nssai_in_plmn_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [rejected_nssai_in_plmn]");
- goto end;
- }
- cJSON_AddItemToArray(rejected_nssai_in_plmnList, itemLocal);
+ OpenAPI_lnode_t *rejected_nssai_in_plmn_node;
+ if (authorized_network_slice_info->rejected_nssai_in_plmn) {
+ OpenAPI_list_for_each(authorized_network_slice_info->rejected_nssai_in_plmn, rejected_nssai_in_plmn_node) {
+ cJSON *itemLocal = OpenAPI_snssai_convertToJSON(rejected_nssai_in_plmn_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [rejected_nssai_in_plmn]");
+ goto end;
}
+ cJSON_AddItemToArray(rejected_nssai_in_plmnList, itemLocal);
}
}
+ }
if (authorized_network_slice_info->rejected_nssai_in_ta) {
- cJSON *rejected_nssai_in_taList = cJSON_AddArrayToObject(item, "rejectedNssaiInTa");
- if (rejected_nssai_in_taList == NULL) {
- ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [rejected_nssai_in_ta]");
- goto end;
- }
+ cJSON *rejected_nssai_in_taList = cJSON_AddArrayToObject(item, "rejectedNssaiInTa");
+ if (rejected_nssai_in_taList == NULL) {
+ ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [rejected_nssai_in_ta]");
+ goto end;
+ }
- OpenAPI_lnode_t *rejected_nssai_in_ta_node;
- if (authorized_network_slice_info->rejected_nssai_in_ta) {
- OpenAPI_list_for_each(authorized_network_slice_info->rejected_nssai_in_ta, rejected_nssai_in_ta_node) {
- cJSON *itemLocal = OpenAPI_snssai_convertToJSON(rejected_nssai_in_ta_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [rejected_nssai_in_ta]");
- goto end;
- }
- cJSON_AddItemToArray(rejected_nssai_in_taList, itemLocal);
+ OpenAPI_lnode_t *rejected_nssai_in_ta_node;
+ if (authorized_network_slice_info->rejected_nssai_in_ta) {
+ OpenAPI_list_for_each(authorized_network_slice_info->rejected_nssai_in_ta, rejected_nssai_in_ta_node) {
+ cJSON *itemLocal = OpenAPI_snssai_convertToJSON(rejected_nssai_in_ta_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [rejected_nssai_in_ta]");
+ goto end;
}
+ cJSON_AddItemToArray(rejected_nssai_in_taList, itemLocal);
}
}
+ }
if (authorized_network_slice_info->nsi_information) {
- cJSON *nsi_information_local_JSON = OpenAPI_nsi_information_convertToJSON(authorized_network_slice_info->nsi_information);
- if (nsi_information_local_JSON == NULL) {
- ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [nsi_information]");
- goto end;
- }
- cJSON_AddItemToObject(item, "nsiInformation", nsi_information_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [nsi_information]");
- goto end;
- }
+ cJSON *nsi_information_local_JSON = OpenAPI_nsi_information_convertToJSON(authorized_network_slice_info->nsi_information);
+ if (nsi_information_local_JSON == NULL) {
+ ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [nsi_information]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "nsiInformation", nsi_information_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [nsi_information]");
+ goto end;
+ }
}
if (authorized_network_slice_info->supported_features) {
- if (cJSON_AddStringToObject(item, "supportedFeatures", authorized_network_slice_info->supported_features) == NULL) {
- ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [supported_features]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "supportedFeatures", authorized_network_slice_info->supported_features) == NULL) {
+ ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [supported_features]");
+ goto end;
+ }
}
if (authorized_network_slice_info->nrf_amf_set) {
- if (cJSON_AddStringToObject(item, "nrfAmfSet", authorized_network_slice_info->nrf_amf_set) == NULL) {
- ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [nrf_amf_set]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "nrfAmfSet", authorized_network_slice_info->nrf_amf_set) == NULL) {
+ ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [nrf_amf_set]");
+ goto end;
+ }
}
if (authorized_network_slice_info->nrf_amf_set_nf_mgt_uri) {
- if (cJSON_AddStringToObject(item, "nrfAmfSetNfMgtUri", authorized_network_slice_info->nrf_amf_set_nf_mgt_uri) == NULL) {
- ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [nrf_amf_set_nf_mgt_uri]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "nrfAmfSetNfMgtUri", authorized_network_slice_info->nrf_amf_set_nf_mgt_uri) == NULL) {
+ ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [nrf_amf_set_nf_mgt_uri]");
+ goto end;
+ }
}
if (authorized_network_slice_info->nrf_amf_set_access_token_uri) {
- if (cJSON_AddStringToObject(item, "nrfAmfSetAccessTokenUri", authorized_network_slice_info->nrf_amf_set_access_token_uri) == NULL) {
- ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [nrf_amf_set_access_token_uri]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "nrfAmfSetAccessTokenUri", authorized_network_slice_info->nrf_amf_set_access_token_uri) == NULL) {
+ ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [nrf_amf_set_access_token_uri]");
+ goto end;
+ }
}
if (authorized_network_slice_info->target_amf_service_set) {
- if (cJSON_AddStringToObject(item, "targetAmfServiceSet", authorized_network_slice_info->target_amf_service_set) == NULL) {
- ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [target_amf_service_set]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "targetAmfServiceSet", authorized_network_slice_info->target_amf_service_set) == NULL) {
+ ogs_error("OpenAPI_authorized_network_slice_info_convertToJSON() failed [target_amf_service_set]");
+ goto end;
+ }
}
end:
@@ -246,174 +246,174 @@ OpenAPI_authorized_network_slice_info_t *OpenAPI_authorized_network_slice_info_p
cJSON *allowed_nssai_list = cJSON_GetObjectItemCaseSensitive(authorized_network_slice_infoJSON, "allowedNssaiList");
OpenAPI_list_t *allowed_nssai_listList;
- if (allowed_nssai_list) {
- cJSON *allowed_nssai_list_local_nonprimitive;
- if (!cJSON_IsArray(allowed_nssai_list)) {
+ if (allowed_nssai_list) {
+ cJSON *allowed_nssai_list_local_nonprimitive;
+ if (!cJSON_IsArray(allowed_nssai_list)){
+ ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [allowed_nssai_list]");
+ goto end;
+ }
+
+ allowed_nssai_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(allowed_nssai_list_local_nonprimitive, allowed_nssai_list ) {
+ if (!cJSON_IsObject(allowed_nssai_list_local_nonprimitive)) {
ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [allowed_nssai_list]");
goto end;
}
+ OpenAPI_allowed_nssai_t *allowed_nssai_listItem = OpenAPI_allowed_nssai_parseFromJSON(allowed_nssai_list_local_nonprimitive);
- allowed_nssai_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(allowed_nssai_list_local_nonprimitive, allowed_nssai_list ) {
- if (!cJSON_IsObject(allowed_nssai_list_local_nonprimitive)) {
- ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [allowed_nssai_list]");
- goto end;
- }
- OpenAPI_allowed_nssai_t *allowed_nssai_listItem = OpenAPI_allowed_nssai_parseFromJSON(allowed_nssai_list_local_nonprimitive);
-
- OpenAPI_list_add(allowed_nssai_listList, allowed_nssai_listItem);
- }
+ OpenAPI_list_add(allowed_nssai_listList, allowed_nssai_listItem);
+ }
}
cJSON *configured_nssai = cJSON_GetObjectItemCaseSensitive(authorized_network_slice_infoJSON, "configuredNssai");
OpenAPI_list_t *configured_nssaiList;
- if (configured_nssai) {
- cJSON *configured_nssai_local_nonprimitive;
- if (!cJSON_IsArray(configured_nssai)) {
+ if (configured_nssai) {
+ cJSON *configured_nssai_local_nonprimitive;
+ if (!cJSON_IsArray(configured_nssai)){
+ ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [configured_nssai]");
+ goto end;
+ }
+
+ configured_nssaiList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(configured_nssai_local_nonprimitive, configured_nssai ) {
+ if (!cJSON_IsObject(configured_nssai_local_nonprimitive)) {
ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [configured_nssai]");
goto end;
}
+ OpenAPI_configured_snssai_t *configured_nssaiItem = OpenAPI_configured_snssai_parseFromJSON(configured_nssai_local_nonprimitive);
- configured_nssaiList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(configured_nssai_local_nonprimitive, configured_nssai ) {
- if (!cJSON_IsObject(configured_nssai_local_nonprimitive)) {
- ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [configured_nssai]");
- goto end;
- }
- OpenAPI_configured_snssai_t *configured_nssaiItem = OpenAPI_configured_snssai_parseFromJSON(configured_nssai_local_nonprimitive);
-
- OpenAPI_list_add(configured_nssaiList, configured_nssaiItem);
- }
+ OpenAPI_list_add(configured_nssaiList, configured_nssaiItem);
+ }
}
cJSON *target_amf_set = cJSON_GetObjectItemCaseSensitive(authorized_network_slice_infoJSON, "targetAmfSet");
- if (target_amf_set) {
- if (!cJSON_IsString(target_amf_set)) {
- ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [target_amf_set]");
- goto end;
- }
+ if (target_amf_set) {
+ if (!cJSON_IsString(target_amf_set)) {
+ ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [target_amf_set]");
+ goto end;
+ }
}
cJSON *candidate_amf_list = cJSON_GetObjectItemCaseSensitive(authorized_network_slice_infoJSON, "candidateAmfList");
OpenAPI_list_t *candidate_amf_listList;
- if (candidate_amf_list) {
- cJSON *candidate_amf_list_local;
- if (!cJSON_IsArray(candidate_amf_list)) {
- ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [candidate_amf_list]");
- goto end;
- }
- candidate_amf_listList = OpenAPI_list_create();
+ if (candidate_amf_list) {
+ cJSON *candidate_amf_list_local;
+ if (!cJSON_IsArray(candidate_amf_list)) {
+ ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [candidate_amf_list]");
+ goto end;
+ }
+ candidate_amf_listList = OpenAPI_list_create();
- cJSON_ArrayForEach(candidate_amf_list_local, candidate_amf_list) {
- if (!cJSON_IsString(candidate_amf_list_local)) {
- ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [candidate_amf_list]");
- goto end;
- }
- OpenAPI_list_add(candidate_amf_listList, ogs_strdup_or_assert(candidate_amf_list_local->valuestring));
- }
+ cJSON_ArrayForEach(candidate_amf_list_local, candidate_amf_list) {
+ if (!cJSON_IsString(candidate_amf_list_local)) {
+ ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [candidate_amf_list]");
+ goto end;
+ }
+ OpenAPI_list_add(candidate_amf_listList , ogs_strdup_or_assert(candidate_amf_list_local->valuestring));
+ }
}
cJSON *rejected_nssai_in_plmn = cJSON_GetObjectItemCaseSensitive(authorized_network_slice_infoJSON, "rejectedNssaiInPlmn");
OpenAPI_list_t *rejected_nssai_in_plmnList;
- if (rejected_nssai_in_plmn) {
- cJSON *rejected_nssai_in_plmn_local_nonprimitive;
- if (!cJSON_IsArray(rejected_nssai_in_plmn)) {
+ if (rejected_nssai_in_plmn) {
+ cJSON *rejected_nssai_in_plmn_local_nonprimitive;
+ if (!cJSON_IsArray(rejected_nssai_in_plmn)){
+ ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [rejected_nssai_in_plmn]");
+ goto end;
+ }
+
+ rejected_nssai_in_plmnList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(rejected_nssai_in_plmn_local_nonprimitive, rejected_nssai_in_plmn ) {
+ if (!cJSON_IsObject(rejected_nssai_in_plmn_local_nonprimitive)) {
ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [rejected_nssai_in_plmn]");
goto end;
}
+ OpenAPI_snssai_t *rejected_nssai_in_plmnItem = OpenAPI_snssai_parseFromJSON(rejected_nssai_in_plmn_local_nonprimitive);
- rejected_nssai_in_plmnList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(rejected_nssai_in_plmn_local_nonprimitive, rejected_nssai_in_plmn ) {
- if (!cJSON_IsObject(rejected_nssai_in_plmn_local_nonprimitive)) {
- ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [rejected_nssai_in_plmn]");
- goto end;
- }
- OpenAPI_snssai_t *rejected_nssai_in_plmnItem = OpenAPI_snssai_parseFromJSON(rejected_nssai_in_plmn_local_nonprimitive);
-
- OpenAPI_list_add(rejected_nssai_in_plmnList, rejected_nssai_in_plmnItem);
- }
+ OpenAPI_list_add(rejected_nssai_in_plmnList, rejected_nssai_in_plmnItem);
+ }
}
cJSON *rejected_nssai_in_ta = cJSON_GetObjectItemCaseSensitive(authorized_network_slice_infoJSON, "rejectedNssaiInTa");
OpenAPI_list_t *rejected_nssai_in_taList;
- if (rejected_nssai_in_ta) {
- cJSON *rejected_nssai_in_ta_local_nonprimitive;
- if (!cJSON_IsArray(rejected_nssai_in_ta)) {
+ if (rejected_nssai_in_ta) {
+ cJSON *rejected_nssai_in_ta_local_nonprimitive;
+ if (!cJSON_IsArray(rejected_nssai_in_ta)){
+ ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [rejected_nssai_in_ta]");
+ goto end;
+ }
+
+ rejected_nssai_in_taList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(rejected_nssai_in_ta_local_nonprimitive, rejected_nssai_in_ta ) {
+ if (!cJSON_IsObject(rejected_nssai_in_ta_local_nonprimitive)) {
ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [rejected_nssai_in_ta]");
goto end;
}
+ OpenAPI_snssai_t *rejected_nssai_in_taItem = OpenAPI_snssai_parseFromJSON(rejected_nssai_in_ta_local_nonprimitive);
- rejected_nssai_in_taList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(rejected_nssai_in_ta_local_nonprimitive, rejected_nssai_in_ta ) {
- if (!cJSON_IsObject(rejected_nssai_in_ta_local_nonprimitive)) {
- ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [rejected_nssai_in_ta]");
- goto end;
- }
- OpenAPI_snssai_t *rejected_nssai_in_taItem = OpenAPI_snssai_parseFromJSON(rejected_nssai_in_ta_local_nonprimitive);
-
- OpenAPI_list_add(rejected_nssai_in_taList, rejected_nssai_in_taItem);
- }
+ OpenAPI_list_add(rejected_nssai_in_taList, rejected_nssai_in_taItem);
+ }
}
cJSON *nsi_information = cJSON_GetObjectItemCaseSensitive(authorized_network_slice_infoJSON, "nsiInformation");
OpenAPI_nsi_information_t *nsi_information_local_nonprim = NULL;
- if (nsi_information) {
- nsi_information_local_nonprim = OpenAPI_nsi_information_parseFromJSON(nsi_information);
+ if (nsi_information) {
+ nsi_information_local_nonprim = OpenAPI_nsi_information_parseFromJSON(nsi_information);
}
cJSON *supported_features = cJSON_GetObjectItemCaseSensitive(authorized_network_slice_infoJSON, "supportedFeatures");
- if (supported_features) {
- if (!cJSON_IsString(supported_features)) {
- ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [supported_features]");
- goto end;
- }
+ if (supported_features) {
+ if (!cJSON_IsString(supported_features)) {
+ ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [supported_features]");
+ goto end;
+ }
}
cJSON *nrf_amf_set = cJSON_GetObjectItemCaseSensitive(authorized_network_slice_infoJSON, "nrfAmfSet");
- if (nrf_amf_set) {
- if (!cJSON_IsString(nrf_amf_set)) {
- ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [nrf_amf_set]");
- goto end;
- }
+ if (nrf_amf_set) {
+ if (!cJSON_IsString(nrf_amf_set)) {
+ ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [nrf_amf_set]");
+ goto end;
+ }
}
cJSON *nrf_amf_set_nf_mgt_uri = cJSON_GetObjectItemCaseSensitive(authorized_network_slice_infoJSON, "nrfAmfSetNfMgtUri");
- if (nrf_amf_set_nf_mgt_uri) {
- if (!cJSON_IsString(nrf_amf_set_nf_mgt_uri)) {
- ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [nrf_amf_set_nf_mgt_uri]");
- goto end;
- }
+ if (nrf_amf_set_nf_mgt_uri) {
+ if (!cJSON_IsString(nrf_amf_set_nf_mgt_uri)) {
+ ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [nrf_amf_set_nf_mgt_uri]");
+ goto end;
+ }
}
cJSON *nrf_amf_set_access_token_uri = cJSON_GetObjectItemCaseSensitive(authorized_network_slice_infoJSON, "nrfAmfSetAccessTokenUri");
- if (nrf_amf_set_access_token_uri) {
- if (!cJSON_IsString(nrf_amf_set_access_token_uri)) {
- ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [nrf_amf_set_access_token_uri]");
- goto end;
- }
+ if (nrf_amf_set_access_token_uri) {
+ if (!cJSON_IsString(nrf_amf_set_access_token_uri)) {
+ ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [nrf_amf_set_access_token_uri]");
+ goto end;
+ }
}
cJSON *target_amf_service_set = cJSON_GetObjectItemCaseSensitive(authorized_network_slice_infoJSON, "targetAmfServiceSet");
- if (target_amf_service_set) {
- if (!cJSON_IsString(target_amf_service_set)) {
- ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [target_amf_service_set]");
- goto end;
- }
+ if (target_amf_service_set) {
+ if (!cJSON_IsString(target_amf_service_set)) {
+ ogs_error("OpenAPI_authorized_network_slice_info_parseFromJSON() failed [target_amf_service_set]");
+ goto end;
+ }
}
authorized_network_slice_info_local_var = OpenAPI_authorized_network_slice_info_create (
@@ -429,7 +429,7 @@ OpenAPI_authorized_network_slice_info_t *OpenAPI_authorized_network_slice_info_p
nrf_amf_set_nf_mgt_uri ? ogs_strdup_or_assert(nrf_amf_set_nf_mgt_uri->valuestring) : NULL,
nrf_amf_set_access_token_uri ? ogs_strdup_or_assert(nrf_amf_set_access_token_uri->valuestring) : NULL,
target_amf_service_set ? ogs_strdup_or_assert(target_amf_service_set->valuestring) : NULL
- );
+ );
return authorized_network_slice_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/authorized_network_slice_info.h b/lib/sbi/openapi/model/authorized_network_slice_info.h
index 1aab0f2e3..5ea012bf1 100644
--- a/lib/sbi/openapi/model/authorized_network_slice_info.h
+++ b/lib/sbi/openapi/model/authorized_network_slice_info.h
@@ -1,7 +1,7 @@
/*
* authorized_network_slice_info.h
*
- *
+ *
*/
#ifndef _OpenAPI_authorized_network_slice_info_H_
@@ -50,7 +50,7 @@ OpenAPI_authorized_network_slice_info_t *OpenAPI_authorized_network_slice_info_c
char *nrf_amf_set_nf_mgt_uri,
char *nrf_amf_set_access_token_uri,
char *target_amf_service_set
- );
+);
void OpenAPI_authorized_network_slice_info_free(OpenAPI_authorized_network_slice_info_t *authorized_network_slice_info);
OpenAPI_authorized_network_slice_info_t *OpenAPI_authorized_network_slice_info_parseFromJSON(cJSON *authorized_network_slice_infoJSON);
cJSON *OpenAPI_authorized_network_slice_info_convertToJSON(OpenAPI_authorized_network_slice_info_t *authorized_network_slice_info);
diff --git a/lib/sbi/openapi/model/av5_g_he_aka.c b/lib/sbi/openapi/model/av5_g_he_aka.c
deleted file mode 100644
index 01127abdd..000000000
--- a/lib/sbi/openapi/model/av5_g_he_aka.c
+++ /dev/null
@@ -1,189 +0,0 @@
-
-#include
-#include
-#include
-#include "av5_g_he_aka.h"
-
-OpenAPI_av5_g_he_aka_t *OpenAPI_av5_g_he_aka_create(
- OpenAPI_av_type_e av_type,
- char *rand,
- char *xres_star,
- char *autn,
- char *kausf
- )
-{
- OpenAPI_av5_g_he_aka_t *av5_g_he_aka_local_var = OpenAPI_malloc(sizeof(OpenAPI_av5_g_he_aka_t));
- if (!av5_g_he_aka_local_var) {
- return NULL;
- }
- av5_g_he_aka_local_var->av_type = av_type;
- av5_g_he_aka_local_var->rand = rand;
- av5_g_he_aka_local_var->xres_star = xres_star;
- av5_g_he_aka_local_var->autn = autn;
- av5_g_he_aka_local_var->kausf = kausf;
-
- return av5_g_he_aka_local_var;
-}
-
-void OpenAPI_av5_g_he_aka_free(OpenAPI_av5_g_he_aka_t *av5_g_he_aka)
-{
- if (NULL == av5_g_he_aka) {
- return;
- }
- OpenAPI_lnode_t *node;
- ogs_free(av5_g_he_aka->rand);
- ogs_free(av5_g_he_aka->xres_star);
- ogs_free(av5_g_he_aka->autn);
- ogs_free(av5_g_he_aka->kausf);
- ogs_free(av5_g_he_aka);
-}
-
-cJSON *OpenAPI_av5_g_he_aka_convertToJSON(OpenAPI_av5_g_he_aka_t *av5_g_he_aka)
-{
- cJSON *item = NULL;
-
- if (av5_g_he_aka == NULL) {
- ogs_error("OpenAPI_av5_g_he_aka_convertToJSON() failed [Av5GHeAka]");
- return NULL;
- }
-
- item = cJSON_CreateObject();
- if (cJSON_AddStringToObject(item, "avType", OpenAPI_av_type_ToString(av5_g_he_aka->av_type)) == NULL) {
- ogs_error("OpenAPI_av5_g_he_aka_convertToJSON() failed [av_type]");
- goto end;
- }
-
- if (cJSON_AddStringToObject(item, "rand", av5_g_he_aka->rand) == NULL) {
- ogs_error("OpenAPI_av5_g_he_aka_convertToJSON() failed [rand]");
- goto end;
- }
-
- if (av5_g_he_aka->xres_star) {
- if (cJSON_AddStringToObject(item, "xresStar", av5_g_he_aka->xres_star) == NULL) {
- ogs_error("OpenAPI_av5_g_he_aka_convertToJSON() failed [xres_star]");
- goto end;
- }
- }
-
- if (cJSON_AddStringToObject(item, "autn", av5_g_he_aka->autn) == NULL) {
- ogs_error("OpenAPI_av5_g_he_aka_convertToJSON() failed [autn]");
- goto end;
- }
-
- if (av5_g_he_aka->kausf) {
- if (cJSON_AddStringToObject(item, "kausf", av5_g_he_aka->kausf) == NULL) {
- ogs_error("OpenAPI_av5_g_he_aka_convertToJSON() failed [kausf]");
- goto end;
- }
- }
-
-end:
- return item;
-}
-
-OpenAPI_av5_g_he_aka_t *OpenAPI_av5_g_he_aka_parseFromJSON(cJSON *av5_g_he_akaJSON)
-{
- OpenAPI_av5_g_he_aka_t *av5_g_he_aka_local_var = NULL;
- cJSON *av_type = cJSON_GetObjectItemCaseSensitive(av5_g_he_akaJSON, "avType");
- if (!av_type) {
- ogs_error("OpenAPI_av5_g_he_aka_parseFromJSON() failed [av_type]");
- goto end;
- }
-
- OpenAPI_av_type_e av_typeVariable;
-
- if (!cJSON_IsString(av_type)) {
- ogs_error("OpenAPI_av5_g_he_aka_parseFromJSON() failed [av_type]");
- goto end;
- }
- av_typeVariable = OpenAPI_av_type_FromString(av_type->valuestring);
-
- cJSON *rand = cJSON_GetObjectItemCaseSensitive(av5_g_he_akaJSON, "rand");
- if (!rand) {
- ogs_error("OpenAPI_av5_g_he_aka_parseFromJSON() failed [rand]");
- goto end;
- }
-
-
- if (!cJSON_IsString(rand)) {
- ogs_error("OpenAPI_av5_g_he_aka_parseFromJSON() failed [rand]");
- goto end;
- }
-
- cJSON *xres_star = cJSON_GetObjectItemCaseSensitive(av5_g_he_akaJSON, "xresStar");
-
- if (xres_star) {
- if (!cJSON_IsString(xres_star)) {
- ogs_error("OpenAPI_av5_g_he_aka_parseFromJSON() failed [xres_star]");
- goto end;
- }
- }
-
- cJSON *autn = cJSON_GetObjectItemCaseSensitive(av5_g_he_akaJSON, "autn");
- if (!autn) {
- ogs_error("OpenAPI_av5_g_he_aka_parseFromJSON() failed [autn]");
- goto end;
- }
-
-
- if (!cJSON_IsString(autn)) {
- ogs_error("OpenAPI_av5_g_he_aka_parseFromJSON() failed [autn]");
- goto end;
- }
-
- cJSON *kausf = cJSON_GetObjectItemCaseSensitive(av5_g_he_akaJSON, "kausf");
-
- if (kausf) {
- if (!cJSON_IsString(kausf)) {
- ogs_error("OpenAPI_av5_g_he_aka_parseFromJSON() failed [kausf]");
- goto end;
- }
- }
-
- av5_g_he_aka_local_var = OpenAPI_av5_g_he_aka_create (
- av_typeVariable,
- ogs_strdup_or_assert(rand->valuestring),
- xres_star ? ogs_strdup_or_assert(xres_star->valuestring) : NULL,
- ogs_strdup_or_assert(autn->valuestring),
- kausf ? ogs_strdup_or_assert(kausf->valuestring) : NULL
- );
-
- return av5_g_he_aka_local_var;
-end:
- return NULL;
-}
-
-OpenAPI_av5_g_he_aka_t *OpenAPI_av5_g_he_aka_copy(OpenAPI_av5_g_he_aka_t *dst, OpenAPI_av5_g_he_aka_t *src)
-{
- cJSON *item = NULL;
- char *content = NULL;
-
- ogs_assert(src);
- item = OpenAPI_av5_g_he_aka_convertToJSON(src);
- if (!item) {
- ogs_error("OpenAPI_av5_g_he_aka_convertToJSON() failed");
- return NULL;
- }
-
- content = cJSON_Print(item);
- cJSON_Delete(item);
-
- if (!content) {
- ogs_error("cJSON_Print() failed");
- return NULL;
- }
-
- item = cJSON_Parse(content);
- ogs_free(content);
- if (!item) {
- ogs_error("cJSON_Parse() failed");
- return NULL;
- }
-
- OpenAPI_av5_g_he_aka_free(dst);
- dst = OpenAPI_av5_g_he_aka_parseFromJSON(item);
- cJSON_Delete(item);
-
- return dst;
-}
-
diff --git a/lib/sbi/openapi/model/av5_g_he_aka.h b/lib/sbi/openapi/model/av5_g_he_aka.h
deleted file mode 100644
index cc0421452..000000000
--- a/lib/sbi/openapi/model/av5_g_he_aka.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * av5_g_he_aka.h
- *
- *
- */
-
-#ifndef _OpenAPI_av5_g_he_aka_H_
-#define _OpenAPI_av5_g_he_aka_H_
-
-#include
-#include "../external/cJSON.h"
-#include "../include/list.h"
-#include "../include/keyValuePair.h"
-#include "../include/binary.h"
-#include "av_type.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct OpenAPI_av5_g_he_aka_s OpenAPI_av5_g_he_aka_t;
-typedef struct OpenAPI_av5_g_he_aka_s {
- OpenAPI_av_type_e av_type;
- char *rand;
- char *xres_star;
- char *autn;
- char *kausf;
-} OpenAPI_av5_g_he_aka_t;
-
-OpenAPI_av5_g_he_aka_t *OpenAPI_av5_g_he_aka_create(
- OpenAPI_av_type_e av_type,
- char *rand,
- char *xres_star,
- char *autn,
- char *kausf
- );
-void OpenAPI_av5_g_he_aka_free(OpenAPI_av5_g_he_aka_t *av5_g_he_aka);
-OpenAPI_av5_g_he_aka_t *OpenAPI_av5_g_he_aka_parseFromJSON(cJSON *av5_g_he_akaJSON);
-cJSON *OpenAPI_av5_g_he_aka_convertToJSON(OpenAPI_av5_g_he_aka_t *av5_g_he_aka);
-OpenAPI_av5_g_he_aka_t *OpenAPI_av5_g_he_aka_copy(OpenAPI_av5_g_he_aka_t *dst, OpenAPI_av5_g_he_aka_t *src);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _OpenAPI_av5_g_he_aka_H_ */
-
diff --git a/lib/sbi/openapi/model/av5_ghe_aka.c b/lib/sbi/openapi/model/av5_ghe_aka.c
new file mode 100644
index 000000000..2650b1c7b
--- /dev/null
+++ b/lib/sbi/openapi/model/av5_ghe_aka.c
@@ -0,0 +1,189 @@
+
+#include
+#include
+#include
+#include "av5_ghe_aka.h"
+
+OpenAPI_av5_ghe_aka_t *OpenAPI_av5_ghe_aka_create(
+ OpenAPI_av_type_e av_type,
+ char *rand,
+ char *xres_star,
+ char *autn,
+ char *kausf
+)
+{
+ OpenAPI_av5_ghe_aka_t *av5_ghe_aka_local_var = OpenAPI_malloc(sizeof(OpenAPI_av5_ghe_aka_t));
+ if (!av5_ghe_aka_local_var) {
+ return NULL;
+ }
+ av5_ghe_aka_local_var->av_type = av_type;
+ av5_ghe_aka_local_var->rand = rand;
+ av5_ghe_aka_local_var->xres_star = xres_star;
+ av5_ghe_aka_local_var->autn = autn;
+ av5_ghe_aka_local_var->kausf = kausf;
+
+ return av5_ghe_aka_local_var;
+}
+
+void OpenAPI_av5_ghe_aka_free(OpenAPI_av5_ghe_aka_t *av5_ghe_aka)
+{
+ if (NULL == av5_ghe_aka) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ ogs_free(av5_ghe_aka->rand);
+ ogs_free(av5_ghe_aka->xres_star);
+ ogs_free(av5_ghe_aka->autn);
+ ogs_free(av5_ghe_aka->kausf);
+ ogs_free(av5_ghe_aka);
+}
+
+cJSON *OpenAPI_av5_ghe_aka_convertToJSON(OpenAPI_av5_ghe_aka_t *av5_ghe_aka)
+{
+ cJSON *item = NULL;
+
+ if (av5_ghe_aka == NULL) {
+ ogs_error("OpenAPI_av5_ghe_aka_convertToJSON() failed [Av5GHeAka]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (cJSON_AddStringToObject(item, "avType", OpenAPI_av_type_ToString(av5_ghe_aka->av_type)) == NULL) {
+ ogs_error("OpenAPI_av5_ghe_aka_convertToJSON() failed [av_type]");
+ goto end;
+ }
+
+ if (cJSON_AddStringToObject(item, "rand", av5_ghe_aka->rand) == NULL) {
+ ogs_error("OpenAPI_av5_ghe_aka_convertToJSON() failed [rand]");
+ goto end;
+ }
+
+ if (av5_ghe_aka->xres_star) {
+ if (cJSON_AddStringToObject(item, "xresStar", av5_ghe_aka->xres_star) == NULL) {
+ ogs_error("OpenAPI_av5_ghe_aka_convertToJSON() failed [xres_star]");
+ goto end;
+ }
+ }
+
+ if (cJSON_AddStringToObject(item, "autn", av5_ghe_aka->autn) == NULL) {
+ ogs_error("OpenAPI_av5_ghe_aka_convertToJSON() failed [autn]");
+ goto end;
+ }
+
+ if (av5_ghe_aka->kausf) {
+ if (cJSON_AddStringToObject(item, "kausf", av5_ghe_aka->kausf) == NULL) {
+ ogs_error("OpenAPI_av5_ghe_aka_convertToJSON() failed [kausf]");
+ goto end;
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_av5_ghe_aka_t *OpenAPI_av5_ghe_aka_parseFromJSON(cJSON *av5_ghe_akaJSON)
+{
+ OpenAPI_av5_ghe_aka_t *av5_ghe_aka_local_var = NULL;
+ cJSON *av_type = cJSON_GetObjectItemCaseSensitive(av5_ghe_akaJSON, "avType");
+ if (!av_type) {
+ ogs_error("OpenAPI_av5_ghe_aka_parseFromJSON() failed [av_type]");
+ goto end;
+ }
+
+ OpenAPI_av_type_e av_typeVariable;
+
+ if (!cJSON_IsString(av_type)) {
+ ogs_error("OpenAPI_av5_ghe_aka_parseFromJSON() failed [av_type]");
+ goto end;
+ }
+ av_typeVariable = OpenAPI_av_type_FromString(av_type->valuestring);
+
+ cJSON *rand = cJSON_GetObjectItemCaseSensitive(av5_ghe_akaJSON, "rand");
+ if (!rand) {
+ ogs_error("OpenAPI_av5_ghe_aka_parseFromJSON() failed [rand]");
+ goto end;
+ }
+
+
+ if (!cJSON_IsString(rand)) {
+ ogs_error("OpenAPI_av5_ghe_aka_parseFromJSON() failed [rand]");
+ goto end;
+ }
+
+ cJSON *xres_star = cJSON_GetObjectItemCaseSensitive(av5_ghe_akaJSON, "xresStar");
+
+ if (xres_star) {
+ if (!cJSON_IsString(xres_star)) {
+ ogs_error("OpenAPI_av5_ghe_aka_parseFromJSON() failed [xres_star]");
+ goto end;
+ }
+ }
+
+ cJSON *autn = cJSON_GetObjectItemCaseSensitive(av5_ghe_akaJSON, "autn");
+ if (!autn) {
+ ogs_error("OpenAPI_av5_ghe_aka_parseFromJSON() failed [autn]");
+ goto end;
+ }
+
+
+ if (!cJSON_IsString(autn)) {
+ ogs_error("OpenAPI_av5_ghe_aka_parseFromJSON() failed [autn]");
+ goto end;
+ }
+
+ cJSON *kausf = cJSON_GetObjectItemCaseSensitive(av5_ghe_akaJSON, "kausf");
+
+ if (kausf) {
+ if (!cJSON_IsString(kausf)) {
+ ogs_error("OpenAPI_av5_ghe_aka_parseFromJSON() failed [kausf]");
+ goto end;
+ }
+ }
+
+ av5_ghe_aka_local_var = OpenAPI_av5_ghe_aka_create (
+ av_typeVariable,
+ ogs_strdup_or_assert(rand->valuestring),
+ xres_star ? ogs_strdup_or_assert(xres_star->valuestring) : NULL,
+ ogs_strdup_or_assert(autn->valuestring),
+ kausf ? ogs_strdup_or_assert(kausf->valuestring) : NULL
+ );
+
+ return av5_ghe_aka_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_av5_ghe_aka_t *OpenAPI_av5_ghe_aka_copy(OpenAPI_av5_ghe_aka_t *dst, OpenAPI_av5_ghe_aka_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_av5_ghe_aka_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_av5_ghe_aka_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_av5_ghe_aka_free(dst);
+ dst = OpenAPI_av5_ghe_aka_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/av5_ghe_aka.h b/lib/sbi/openapi/model/av5_ghe_aka.h
new file mode 100644
index 000000000..ae9c4bc85
--- /dev/null
+++ b/lib/sbi/openapi/model/av5_ghe_aka.h
@@ -0,0 +1,47 @@
+/*
+ * av5_ghe_aka.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_av5_ghe_aka_H_
+#define _OpenAPI_av5_ghe_aka_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+#include "av_type.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_av5_ghe_aka_s OpenAPI_av5_ghe_aka_t;
+typedef struct OpenAPI_av5_ghe_aka_s {
+ OpenAPI_av_type_e av_type;
+ char *rand;
+ char *xres_star;
+ char *autn;
+ char *kausf;
+} OpenAPI_av5_ghe_aka_t;
+
+OpenAPI_av5_ghe_aka_t *OpenAPI_av5_ghe_aka_create(
+ OpenAPI_av_type_e av_type,
+ char *rand,
+ char *xres_star,
+ char *autn,
+ char *kausf
+);
+void OpenAPI_av5_ghe_aka_free(OpenAPI_av5_ghe_aka_t *av5_ghe_aka);
+OpenAPI_av5_ghe_aka_t *OpenAPI_av5_ghe_aka_parseFromJSON(cJSON *av5_ghe_akaJSON);
+cJSON *OpenAPI_av5_ghe_aka_convertToJSON(OpenAPI_av5_ghe_aka_t *av5_ghe_aka);
+OpenAPI_av5_ghe_aka_t *OpenAPI_av5_ghe_aka_copy(OpenAPI_av5_ghe_aka_t *dst, OpenAPI_av5_ghe_aka_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_av5_ghe_aka_H_ */
+
diff --git a/lib/sbi/openapi/model/av5g_aka.c b/lib/sbi/openapi/model/av5g_aka.c
index 4dbbdddbb..e3d8b1509 100644
--- a/lib/sbi/openapi/model/av5g_aka.c
+++ b/lib/sbi/openapi/model/av5g_aka.c
@@ -8,7 +8,7 @@ OpenAPI_av5g_aka_t *OpenAPI_av5g_aka_create(
char *rand,
char *hxres_star,
char *autn
- )
+)
{
OpenAPI_av5g_aka_t *av5g_aka_local_var = OpenAPI_malloc(sizeof(OpenAPI_av5g_aka_t));
if (!av5g_aka_local_var) {
@@ -71,7 +71,7 @@ OpenAPI_av5g_aka_t *OpenAPI_av5g_aka_parseFromJSON(cJSON *av5g_akaJSON)
goto end;
}
-
+
if (!cJSON_IsString(rand)) {
ogs_error("OpenAPI_av5g_aka_parseFromJSON() failed [rand]");
goto end;
@@ -83,7 +83,7 @@ OpenAPI_av5g_aka_t *OpenAPI_av5g_aka_parseFromJSON(cJSON *av5g_akaJSON)
goto end;
}
-
+
if (!cJSON_IsString(hxres_star)) {
ogs_error("OpenAPI_av5g_aka_parseFromJSON() failed [hxres_star]");
goto end;
@@ -95,7 +95,7 @@ OpenAPI_av5g_aka_t *OpenAPI_av5g_aka_parseFromJSON(cJSON *av5g_akaJSON)
goto end;
}
-
+
if (!cJSON_IsString(autn)) {
ogs_error("OpenAPI_av5g_aka_parseFromJSON() failed [autn]");
goto end;
@@ -105,7 +105,7 @@ OpenAPI_av5g_aka_t *OpenAPI_av5g_aka_parseFromJSON(cJSON *av5g_akaJSON)
ogs_strdup_or_assert(rand->valuestring),
ogs_strdup_or_assert(hxres_star->valuestring),
ogs_strdup_or_assert(autn->valuestring)
- );
+ );
return av5g_aka_local_var;
end:
diff --git a/lib/sbi/openapi/model/av5g_aka.h b/lib/sbi/openapi/model/av5g_aka.h
index d0508b56c..2e82d39f8 100644
--- a/lib/sbi/openapi/model/av5g_aka.h
+++ b/lib/sbi/openapi/model/av5g_aka.h
@@ -1,7 +1,7 @@
/*
* av5g_aka.h
*
- *
+ *
*/
#ifndef _OpenAPI_av5g_aka_H_
@@ -28,7 +28,7 @@ OpenAPI_av5g_aka_t *OpenAPI_av5g_aka_create(
char *rand,
char *hxres_star,
char *autn
- );
+);
void OpenAPI_av5g_aka_free(OpenAPI_av5g_aka_t *av5g_aka);
OpenAPI_av5g_aka_t *OpenAPI_av5g_aka_parseFromJSON(cJSON *av5g_akaJSON);
cJSON *OpenAPI_av5g_aka_convertToJSON(OpenAPI_av5g_aka_t *av5g_aka);
diff --git a/lib/sbi/openapi/model/av_eap_aka_prime.c b/lib/sbi/openapi/model/av_eap_aka_prime.c
index e4e98222b..1c6d8a89b 100644
--- a/lib/sbi/openapi/model/av_eap_aka_prime.c
+++ b/lib/sbi/openapi/model/av_eap_aka_prime.c
@@ -11,7 +11,7 @@ OpenAPI_av_eap_aka_prime_t *OpenAPI_av_eap_aka_prime_create(
char *autn,
char *ck_prime,
char *ik_prime
- )
+)
{
OpenAPI_av_eap_aka_prime_t *av_eap_aka_prime_local_var = OpenAPI_malloc(sizeof(OpenAPI_av_eap_aka_prime_t));
if (!av_eap_aka_prime_local_var) {
@@ -62,10 +62,10 @@ cJSON *OpenAPI_av_eap_aka_prime_convertToJSON(OpenAPI_av_eap_aka_prime_t *av_eap
}
if (av_eap_aka_prime->xres) {
- if (cJSON_AddStringToObject(item, "xres", av_eap_aka_prime->xres) == NULL) {
- ogs_error("OpenAPI_av_eap_aka_prime_convertToJSON() failed [xres]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "xres", av_eap_aka_prime->xres) == NULL) {
+ ogs_error("OpenAPI_av_eap_aka_prime_convertToJSON() failed [xres]");
+ goto end;
+ }
}
if (cJSON_AddStringToObject(item, "autn", av_eap_aka_prime->autn) == NULL) {
@@ -74,17 +74,17 @@ cJSON *OpenAPI_av_eap_aka_prime_convertToJSON(OpenAPI_av_eap_aka_prime_t *av_eap
}
if (av_eap_aka_prime->ck_prime) {
- if (cJSON_AddStringToObject(item, "ckPrime", av_eap_aka_prime->ck_prime) == NULL) {
- ogs_error("OpenAPI_av_eap_aka_prime_convertToJSON() failed [ck_prime]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "ckPrime", av_eap_aka_prime->ck_prime) == NULL) {
+ ogs_error("OpenAPI_av_eap_aka_prime_convertToJSON() failed [ck_prime]");
+ goto end;
+ }
}
if (av_eap_aka_prime->ik_prime) {
- if (cJSON_AddStringToObject(item, "ikPrime", av_eap_aka_prime->ik_prime) == NULL) {
- ogs_error("OpenAPI_av_eap_aka_prime_convertToJSON() failed [ik_prime]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "ikPrime", av_eap_aka_prime->ik_prime) == NULL) {
+ ogs_error("OpenAPI_av_eap_aka_prime_convertToJSON() failed [ik_prime]");
+ goto end;
+ }
}
end:
@@ -101,7 +101,7 @@ OpenAPI_av_eap_aka_prime_t *OpenAPI_av_eap_aka_prime_parseFromJSON(cJSON *av_eap
}
OpenAPI_av_type_e av_typeVariable;
-
+
if (!cJSON_IsString(av_type)) {
ogs_error("OpenAPI_av_eap_aka_prime_parseFromJSON() failed [av_type]");
goto end;
@@ -114,7 +114,7 @@ OpenAPI_av_eap_aka_prime_t *OpenAPI_av_eap_aka_prime_parseFromJSON(cJSON *av_eap
goto end;
}
-
+
if (!cJSON_IsString(rand)) {
ogs_error("OpenAPI_av_eap_aka_prime_parseFromJSON() failed [rand]");
goto end;
@@ -122,11 +122,11 @@ OpenAPI_av_eap_aka_prime_t *OpenAPI_av_eap_aka_prime_parseFromJSON(cJSON *av_eap
cJSON *xres = cJSON_GetObjectItemCaseSensitive(av_eap_aka_primeJSON, "xres");
- if (xres) {
- if (!cJSON_IsString(xres)) {
- ogs_error("OpenAPI_av_eap_aka_prime_parseFromJSON() failed [xres]");
- goto end;
- }
+ if (xres) {
+ if (!cJSON_IsString(xres)) {
+ ogs_error("OpenAPI_av_eap_aka_prime_parseFromJSON() failed [xres]");
+ goto end;
+ }
}
cJSON *autn = cJSON_GetObjectItemCaseSensitive(av_eap_aka_primeJSON, "autn");
@@ -135,7 +135,7 @@ OpenAPI_av_eap_aka_prime_t *OpenAPI_av_eap_aka_prime_parseFromJSON(cJSON *av_eap
goto end;
}
-
+
if (!cJSON_IsString(autn)) {
ogs_error("OpenAPI_av_eap_aka_prime_parseFromJSON() failed [autn]");
goto end;
@@ -143,20 +143,20 @@ OpenAPI_av_eap_aka_prime_t *OpenAPI_av_eap_aka_prime_parseFromJSON(cJSON *av_eap
cJSON *ck_prime = cJSON_GetObjectItemCaseSensitive(av_eap_aka_primeJSON, "ckPrime");
- if (ck_prime) {
- if (!cJSON_IsString(ck_prime)) {
- ogs_error("OpenAPI_av_eap_aka_prime_parseFromJSON() failed [ck_prime]");
- goto end;
- }
+ if (ck_prime) {
+ if (!cJSON_IsString(ck_prime)) {
+ ogs_error("OpenAPI_av_eap_aka_prime_parseFromJSON() failed [ck_prime]");
+ goto end;
+ }
}
cJSON *ik_prime = cJSON_GetObjectItemCaseSensitive(av_eap_aka_primeJSON, "ikPrime");
- if (ik_prime) {
- if (!cJSON_IsString(ik_prime)) {
- ogs_error("OpenAPI_av_eap_aka_prime_parseFromJSON() failed [ik_prime]");
- goto end;
- }
+ if (ik_prime) {
+ if (!cJSON_IsString(ik_prime)) {
+ ogs_error("OpenAPI_av_eap_aka_prime_parseFromJSON() failed [ik_prime]");
+ goto end;
+ }
}
av_eap_aka_prime_local_var = OpenAPI_av_eap_aka_prime_create (
@@ -166,7 +166,7 @@ OpenAPI_av_eap_aka_prime_t *OpenAPI_av_eap_aka_prime_parseFromJSON(cJSON *av_eap
ogs_strdup_or_assert(autn->valuestring),
ck_prime ? ogs_strdup_or_assert(ck_prime->valuestring) : NULL,
ik_prime ? ogs_strdup_or_assert(ik_prime->valuestring) : NULL
- );
+ );
return av_eap_aka_prime_local_var;
end:
diff --git a/lib/sbi/openapi/model/av_eap_aka_prime.h b/lib/sbi/openapi/model/av_eap_aka_prime.h
index bb8dfd072..5576613c3 100644
--- a/lib/sbi/openapi/model/av_eap_aka_prime.h
+++ b/lib/sbi/openapi/model/av_eap_aka_prime.h
@@ -1,7 +1,7 @@
/*
* av_eap_aka_prime.h
*
- *
+ *
*/
#ifndef _OpenAPI_av_eap_aka_prime_H_
@@ -35,7 +35,7 @@ OpenAPI_av_eap_aka_prime_t *OpenAPI_av_eap_aka_prime_create(
char *autn,
char *ck_prime,
char *ik_prime
- );
+);
void OpenAPI_av_eap_aka_prime_free(OpenAPI_av_eap_aka_prime_t *av_eap_aka_prime);
OpenAPI_av_eap_aka_prime_t *OpenAPI_av_eap_aka_prime_parseFromJSON(cJSON *av_eap_aka_primeJSON);
cJSON *OpenAPI_av_eap_aka_prime_convertToJSON(OpenAPI_av_eap_aka_prime_t *av_eap_aka_prime);
diff --git a/lib/sbi/openapi/model/av_eps_aka.c b/lib/sbi/openapi/model/av_eps_aka.c
index e06ae1414..c586bfdf6 100644
--- a/lib/sbi/openapi/model/av_eps_aka.c
+++ b/lib/sbi/openapi/model/av_eps_aka.c
@@ -10,7 +10,7 @@ OpenAPI_av_eps_aka_t *OpenAPI_av_eps_aka_create(
char *xres,
char *autn,
char *kasme
- )
+)
{
OpenAPI_av_eps_aka_t *av_eps_aka_local_var = OpenAPI_malloc(sizeof(OpenAPI_av_eps_aka_t));
if (!av_eps_aka_local_var) {
@@ -87,7 +87,7 @@ OpenAPI_av_eps_aka_t *OpenAPI_av_eps_aka_parseFromJSON(cJSON *av_eps_akaJSON)
}
OpenAPI_hss_av_type_e av_typeVariable;
-
+
if (!cJSON_IsString(av_type)) {
ogs_error("OpenAPI_av_eps_aka_parseFromJSON() failed [av_type]");
goto end;
@@ -100,7 +100,7 @@ OpenAPI_av_eps_aka_t *OpenAPI_av_eps_aka_parseFromJSON(cJSON *av_eps_akaJSON)
goto end;
}
-
+
if (!cJSON_IsString(rand)) {
ogs_error("OpenAPI_av_eps_aka_parseFromJSON() failed [rand]");
goto end;
@@ -112,7 +112,7 @@ OpenAPI_av_eps_aka_t *OpenAPI_av_eps_aka_parseFromJSON(cJSON *av_eps_akaJSON)
goto end;
}
-
+
if (!cJSON_IsString(xres)) {
ogs_error("OpenAPI_av_eps_aka_parseFromJSON() failed [xres]");
goto end;
@@ -124,7 +124,7 @@ OpenAPI_av_eps_aka_t *OpenAPI_av_eps_aka_parseFromJSON(cJSON *av_eps_akaJSON)
goto end;
}
-
+
if (!cJSON_IsString(autn)) {
ogs_error("OpenAPI_av_eps_aka_parseFromJSON() failed [autn]");
goto end;
@@ -136,7 +136,7 @@ OpenAPI_av_eps_aka_t *OpenAPI_av_eps_aka_parseFromJSON(cJSON *av_eps_akaJSON)
goto end;
}
-
+
if (!cJSON_IsString(kasme)) {
ogs_error("OpenAPI_av_eps_aka_parseFromJSON() failed [kasme]");
goto end;
@@ -148,7 +148,7 @@ OpenAPI_av_eps_aka_t *OpenAPI_av_eps_aka_parseFromJSON(cJSON *av_eps_akaJSON)
ogs_strdup_or_assert(xres->valuestring),
ogs_strdup_or_assert(autn->valuestring),
ogs_strdup_or_assert(kasme->valuestring)
- );
+ );
return av_eps_aka_local_var;
end:
diff --git a/lib/sbi/openapi/model/av_eps_aka.h b/lib/sbi/openapi/model/av_eps_aka.h
index 359f0cce2..6adec423c 100644
--- a/lib/sbi/openapi/model/av_eps_aka.h
+++ b/lib/sbi/openapi/model/av_eps_aka.h
@@ -1,7 +1,7 @@
/*
* av_eps_aka.h
*
- *
+ *
*/
#ifndef _OpenAPI_av_eps_aka_H_
@@ -33,7 +33,7 @@ OpenAPI_av_eps_aka_t *OpenAPI_av_eps_aka_create(
char *xres,
char *autn,
char *kasme
- );
+);
void OpenAPI_av_eps_aka_free(OpenAPI_av_eps_aka_t *av_eps_aka);
OpenAPI_av_eps_aka_t *OpenAPI_av_eps_aka_parseFromJSON(cJSON *av_eps_akaJSON);
cJSON *OpenAPI_av_eps_aka_convertToJSON(OpenAPI_av_eps_aka_t *av_eps_aka);
diff --git a/lib/sbi/openapi/model/av_ims_gba_eap_aka.c b/lib/sbi/openapi/model/av_ims_gba_eap_aka.c
index 595cf1145..c250d2669 100644
--- a/lib/sbi/openapi/model/av_ims_gba_eap_aka.c
+++ b/lib/sbi/openapi/model/av_ims_gba_eap_aka.c
@@ -11,7 +11,7 @@ OpenAPI_av_ims_gba_eap_aka_t *OpenAPI_av_ims_gba_eap_aka_create(
char *autn,
char *ck,
char *ik
- )
+)
{
OpenAPI_av_ims_gba_eap_aka_t *av_ims_gba_eap_aka_local_var = OpenAPI_malloc(sizeof(OpenAPI_av_ims_gba_eap_aka_t));
if (!av_ims_gba_eap_aka_local_var) {
@@ -95,7 +95,7 @@ OpenAPI_av_ims_gba_eap_aka_t *OpenAPI_av_ims_gba_eap_aka_parseFromJSON(cJSON *av
}
OpenAPI_hss_av_type_e av_typeVariable;
-
+
if (!cJSON_IsString(av_type)) {
ogs_error("OpenAPI_av_ims_gba_eap_aka_parseFromJSON() failed [av_type]");
goto end;
@@ -108,7 +108,7 @@ OpenAPI_av_ims_gba_eap_aka_t *OpenAPI_av_ims_gba_eap_aka_parseFromJSON(cJSON *av
goto end;
}
-
+
if (!cJSON_IsString(rand)) {
ogs_error("OpenAPI_av_ims_gba_eap_aka_parseFromJSON() failed [rand]");
goto end;
@@ -120,7 +120,7 @@ OpenAPI_av_ims_gba_eap_aka_t *OpenAPI_av_ims_gba_eap_aka_parseFromJSON(cJSON *av
goto end;
}
-
+
if (!cJSON_IsString(xres)) {
ogs_error("OpenAPI_av_ims_gba_eap_aka_parseFromJSON() failed [xres]");
goto end;
@@ -132,7 +132,7 @@ OpenAPI_av_ims_gba_eap_aka_t *OpenAPI_av_ims_gba_eap_aka_parseFromJSON(cJSON *av
goto end;
}
-
+
if (!cJSON_IsString(autn)) {
ogs_error("OpenAPI_av_ims_gba_eap_aka_parseFromJSON() failed [autn]");
goto end;
@@ -144,7 +144,7 @@ OpenAPI_av_ims_gba_eap_aka_t *OpenAPI_av_ims_gba_eap_aka_parseFromJSON(cJSON *av
goto end;
}
-
+
if (!cJSON_IsString(ck)) {
ogs_error("OpenAPI_av_ims_gba_eap_aka_parseFromJSON() failed [ck]");
goto end;
@@ -156,7 +156,7 @@ OpenAPI_av_ims_gba_eap_aka_t *OpenAPI_av_ims_gba_eap_aka_parseFromJSON(cJSON *av
goto end;
}
-
+
if (!cJSON_IsString(ik)) {
ogs_error("OpenAPI_av_ims_gba_eap_aka_parseFromJSON() failed [ik]");
goto end;
@@ -169,7 +169,7 @@ OpenAPI_av_ims_gba_eap_aka_t *OpenAPI_av_ims_gba_eap_aka_parseFromJSON(cJSON *av
ogs_strdup_or_assert(autn->valuestring),
ogs_strdup_or_assert(ck->valuestring),
ogs_strdup_or_assert(ik->valuestring)
- );
+ );
return av_ims_gba_eap_aka_local_var;
end:
diff --git a/lib/sbi/openapi/model/av_ims_gba_eap_aka.h b/lib/sbi/openapi/model/av_ims_gba_eap_aka.h
index 622bead8f..8153cc1a8 100644
--- a/lib/sbi/openapi/model/av_ims_gba_eap_aka.h
+++ b/lib/sbi/openapi/model/av_ims_gba_eap_aka.h
@@ -1,7 +1,7 @@
/*
* av_ims_gba_eap_aka.h
*
- *
+ *
*/
#ifndef _OpenAPI_av_ims_gba_eap_aka_H_
@@ -35,7 +35,7 @@ OpenAPI_av_ims_gba_eap_aka_t *OpenAPI_av_ims_gba_eap_aka_create(
char *autn,
char *ck,
char *ik
- );
+);
void OpenAPI_av_ims_gba_eap_aka_free(OpenAPI_av_ims_gba_eap_aka_t *av_ims_gba_eap_aka);
OpenAPI_av_ims_gba_eap_aka_t *OpenAPI_av_ims_gba_eap_aka_parseFromJSON(cJSON *av_ims_gba_eap_akaJSON);
cJSON *OpenAPI_av_ims_gba_eap_aka_convertToJSON(OpenAPI_av_ims_gba_eap_aka_t *av_ims_gba_eap_aka);
diff --git a/lib/sbi/openapi/model/av_type.h b/lib/sbi/openapi/model/av_type.h
index 2f296f09a..ea5916dd5 100644
--- a/lib/sbi/openapi/model/av_type.h
+++ b/lib/sbi/openapi/model/av_type.h
@@ -1,7 +1,7 @@
/*
* av_type.h
*
- *
+ *
*/
#ifndef _OpenAPI_av_type_H_
diff --git a/lib/sbi/openapi/model/backup_amf_info.c b/lib/sbi/openapi/model/backup_amf_info.c
index ccb23145d..ce827e6d4 100644
--- a/lib/sbi/openapi/model/backup_amf_info.c
+++ b/lib/sbi/openapi/model/backup_amf_info.c
@@ -7,7 +7,7 @@
OpenAPI_backup_amf_info_t *OpenAPI_backup_amf_info_create(
char *backup_amf,
OpenAPI_list_t *guami_list
- )
+)
{
OpenAPI_backup_amf_info_t *backup_amf_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_backup_amf_info_t));
if (!backup_amf_info_local_var) {
@@ -49,24 +49,24 @@ cJSON *OpenAPI_backup_amf_info_convertToJSON(OpenAPI_backup_amf_info_t *backup_a
}
if (backup_amf_info->guami_list) {
- cJSON *guami_listList = cJSON_AddArrayToObject(item, "guamiList");
- if (guami_listList == NULL) {
- ogs_error("OpenAPI_backup_amf_info_convertToJSON() failed [guami_list]");
- goto end;
- }
+ cJSON *guami_listList = cJSON_AddArrayToObject(item, "guamiList");
+ if (guami_listList == NULL) {
+ ogs_error("OpenAPI_backup_amf_info_convertToJSON() failed [guami_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *guami_list_node;
- if (backup_amf_info->guami_list) {
- OpenAPI_list_for_each(backup_amf_info->guami_list, guami_list_node) {
- cJSON *itemLocal = OpenAPI_guami_convertToJSON(guami_list_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_backup_amf_info_convertToJSON() failed [guami_list]");
- goto end;
- }
- cJSON_AddItemToArray(guami_listList, itemLocal);
+ OpenAPI_lnode_t *guami_list_node;
+ if (backup_amf_info->guami_list) {
+ OpenAPI_list_for_each(backup_amf_info->guami_list, guami_list_node) {
+ cJSON *itemLocal = OpenAPI_guami_convertToJSON(guami_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_backup_amf_info_convertToJSON() failed [guami_list]");
+ goto end;
}
+ cJSON_AddItemToArray(guami_listList, itemLocal);
}
}
+ }
end:
return item;
@@ -81,7 +81,7 @@ OpenAPI_backup_amf_info_t *OpenAPI_backup_amf_info_parseFromJSON(cJSON *backup_a
goto end;
}
-
+
if (!cJSON_IsString(backup_amf)) {
ogs_error("OpenAPI_backup_amf_info_parseFromJSON() failed [backup_amf]");
goto end;
@@ -90,30 +90,30 @@ OpenAPI_backup_amf_info_t *OpenAPI_backup_amf_info_parseFromJSON(cJSON *backup_a
cJSON *guami_list = cJSON_GetObjectItemCaseSensitive(backup_amf_infoJSON, "guamiList");
OpenAPI_list_t *guami_listList;
- if (guami_list) {
- cJSON *guami_list_local_nonprimitive;
- if (!cJSON_IsArray(guami_list)) {
+ if (guami_list) {
+ cJSON *guami_list_local_nonprimitive;
+ if (!cJSON_IsArray(guami_list)){
+ ogs_error("OpenAPI_backup_amf_info_parseFromJSON() failed [guami_list]");
+ goto end;
+ }
+
+ guami_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(guami_list_local_nonprimitive, guami_list ) {
+ if (!cJSON_IsObject(guami_list_local_nonprimitive)) {
ogs_error("OpenAPI_backup_amf_info_parseFromJSON() failed [guami_list]");
goto end;
}
+ OpenAPI_guami_t *guami_listItem = OpenAPI_guami_parseFromJSON(guami_list_local_nonprimitive);
- guami_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(guami_list_local_nonprimitive, guami_list ) {
- if (!cJSON_IsObject(guami_list_local_nonprimitive)) {
- ogs_error("OpenAPI_backup_amf_info_parseFromJSON() failed [guami_list]");
- goto end;
- }
- OpenAPI_guami_t *guami_listItem = OpenAPI_guami_parseFromJSON(guami_list_local_nonprimitive);
-
- OpenAPI_list_add(guami_listList, guami_listItem);
- }
+ OpenAPI_list_add(guami_listList, guami_listItem);
+ }
}
backup_amf_info_local_var = OpenAPI_backup_amf_info_create (
ogs_strdup_or_assert(backup_amf->valuestring),
guami_list ? guami_listList : NULL
- );
+ );
return backup_amf_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/backup_amf_info.h b/lib/sbi/openapi/model/backup_amf_info.h
index eed0a3fc0..48e13d4e8 100644
--- a/lib/sbi/openapi/model/backup_amf_info.h
+++ b/lib/sbi/openapi/model/backup_amf_info.h
@@ -1,7 +1,7 @@
/*
* backup_amf_info.h
*
- *
+ *
*/
#ifndef _OpenAPI_backup_amf_info_H_
@@ -27,7 +27,7 @@ typedef struct OpenAPI_backup_amf_info_s {
OpenAPI_backup_amf_info_t *OpenAPI_backup_amf_info_create(
char *backup_amf,
OpenAPI_list_t *guami_list
- );
+);
void OpenAPI_backup_amf_info_free(OpenAPI_backup_amf_info_t *backup_amf_info);
OpenAPI_backup_amf_info_t *OpenAPI_backup_amf_info_parseFromJSON(cJSON *backup_amf_infoJSON);
cJSON *OpenAPI_backup_amf_info_convertToJSON(OpenAPI_backup_amf_info_t *backup_amf_info);
diff --git a/lib/sbi/openapi/model/battery_indication.c b/lib/sbi/openapi/model/battery_indication.c
index 49392f37d..810ea237d 100644
--- a/lib/sbi/openapi/model/battery_indication.c
+++ b/lib/sbi/openapi/model/battery_indication.c
@@ -8,7 +8,7 @@ OpenAPI_battery_indication_t *OpenAPI_battery_indication_create(
int battery_ind,
int replaceable_ind,
int rechargeable_ind
- )
+)
{
OpenAPI_battery_indication_t *battery_indication_local_var = OpenAPI_malloc(sizeof(OpenAPI_battery_indication_t));
if (!battery_indication_local_var) {
@@ -41,24 +41,24 @@ cJSON *OpenAPI_battery_indication_convertToJSON(OpenAPI_battery_indication_t *ba
item = cJSON_CreateObject();
if (battery_indication->battery_ind) {
- if (cJSON_AddBoolToObject(item, "batteryInd", battery_indication->battery_ind) == NULL) {
- ogs_error("OpenAPI_battery_indication_convertToJSON() failed [battery_ind]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "batteryInd", battery_indication->battery_ind) == NULL) {
+ ogs_error("OpenAPI_battery_indication_convertToJSON() failed [battery_ind]");
+ goto end;
+ }
}
if (battery_indication->replaceable_ind) {
- if (cJSON_AddBoolToObject(item, "replaceableInd", battery_indication->replaceable_ind) == NULL) {
- ogs_error("OpenAPI_battery_indication_convertToJSON() failed [replaceable_ind]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "replaceableInd", battery_indication->replaceable_ind) == NULL) {
+ ogs_error("OpenAPI_battery_indication_convertToJSON() failed [replaceable_ind]");
+ goto end;
+ }
}
if (battery_indication->rechargeable_ind) {
- if (cJSON_AddBoolToObject(item, "rechargeableInd", battery_indication->rechargeable_ind) == NULL) {
- ogs_error("OpenAPI_battery_indication_convertToJSON() failed [rechargeable_ind]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "rechargeableInd", battery_indication->rechargeable_ind) == NULL) {
+ ogs_error("OpenAPI_battery_indication_convertToJSON() failed [rechargeable_ind]");
+ goto end;
+ }
}
end:
@@ -70,36 +70,36 @@ OpenAPI_battery_indication_t *OpenAPI_battery_indication_parseFromJSON(cJSON *ba
OpenAPI_battery_indication_t *battery_indication_local_var = NULL;
cJSON *battery_ind = cJSON_GetObjectItemCaseSensitive(battery_indicationJSON, "batteryInd");
- if (battery_ind) {
- if (!cJSON_IsBool(battery_ind)) {
- ogs_error("OpenAPI_battery_indication_parseFromJSON() failed [battery_ind]");
- goto end;
- }
+ if (battery_ind) {
+ if (!cJSON_IsBool(battery_ind)) {
+ ogs_error("OpenAPI_battery_indication_parseFromJSON() failed [battery_ind]");
+ goto end;
+ }
}
cJSON *replaceable_ind = cJSON_GetObjectItemCaseSensitive(battery_indicationJSON, "replaceableInd");
- if (replaceable_ind) {
- if (!cJSON_IsBool(replaceable_ind)) {
- ogs_error("OpenAPI_battery_indication_parseFromJSON() failed [replaceable_ind]");
- goto end;
- }
+ if (replaceable_ind) {
+ if (!cJSON_IsBool(replaceable_ind)) {
+ ogs_error("OpenAPI_battery_indication_parseFromJSON() failed [replaceable_ind]");
+ goto end;
+ }
}
cJSON *rechargeable_ind = cJSON_GetObjectItemCaseSensitive(battery_indicationJSON, "rechargeableInd");
- if (rechargeable_ind) {
- if (!cJSON_IsBool(rechargeable_ind)) {
- ogs_error("OpenAPI_battery_indication_parseFromJSON() failed [rechargeable_ind]");
- goto end;
- }
+ if (rechargeable_ind) {
+ if (!cJSON_IsBool(rechargeable_ind)) {
+ ogs_error("OpenAPI_battery_indication_parseFromJSON() failed [rechargeable_ind]");
+ goto end;
+ }
}
battery_indication_local_var = OpenAPI_battery_indication_create (
battery_ind ? battery_ind->valueint : 0,
replaceable_ind ? replaceable_ind->valueint : 0,
rechargeable_ind ? rechargeable_ind->valueint : 0
- );
+ );
return battery_indication_local_var;
end:
diff --git a/lib/sbi/openapi/model/battery_indication.h b/lib/sbi/openapi/model/battery_indication.h
index 6988a2487..105eedb57 100644
--- a/lib/sbi/openapi/model/battery_indication.h
+++ b/lib/sbi/openapi/model/battery_indication.h
@@ -1,7 +1,7 @@
/*
* battery_indication.h
*
- *
+ *
*/
#ifndef _OpenAPI_battery_indication_H_
@@ -28,7 +28,7 @@ OpenAPI_battery_indication_t *OpenAPI_battery_indication_create(
int battery_ind,
int replaceable_ind,
int rechargeable_ind
- );
+);
void OpenAPI_battery_indication_free(OpenAPI_battery_indication_t *battery_indication);
OpenAPI_battery_indication_t *OpenAPI_battery_indication_parseFromJSON(cJSON *battery_indicationJSON);
cJSON *OpenAPI_battery_indication_convertToJSON(OpenAPI_battery_indication_t *battery_indication);
diff --git a/lib/sbi/openapi/model/battery_indication_rm.c b/lib/sbi/openapi/model/battery_indication_rm.c
index 2d5fda39e..58209cc5b 100644
--- a/lib/sbi/openapi/model/battery_indication_rm.c
+++ b/lib/sbi/openapi/model/battery_indication_rm.c
@@ -8,7 +8,7 @@ OpenAPI_battery_indication_rm_t *OpenAPI_battery_indication_rm_create(
int battery_ind,
int replaceable_ind,
int rechargeable_ind
- )
+)
{
OpenAPI_battery_indication_rm_t *battery_indication_rm_local_var = OpenAPI_malloc(sizeof(OpenAPI_battery_indication_rm_t));
if (!battery_indication_rm_local_var) {
@@ -41,24 +41,24 @@ cJSON *OpenAPI_battery_indication_rm_convertToJSON(OpenAPI_battery_indication_rm
item = cJSON_CreateObject();
if (battery_indication_rm->battery_ind) {
- if (cJSON_AddBoolToObject(item, "batteryInd", battery_indication_rm->battery_ind) == NULL) {
- ogs_error("OpenAPI_battery_indication_rm_convertToJSON() failed [battery_ind]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "batteryInd", battery_indication_rm->battery_ind) == NULL) {
+ ogs_error("OpenAPI_battery_indication_rm_convertToJSON() failed [battery_ind]");
+ goto end;
+ }
}
if (battery_indication_rm->replaceable_ind) {
- if (cJSON_AddBoolToObject(item, "replaceableInd", battery_indication_rm->replaceable_ind) == NULL) {
- ogs_error("OpenAPI_battery_indication_rm_convertToJSON() failed [replaceable_ind]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "replaceableInd", battery_indication_rm->replaceable_ind) == NULL) {
+ ogs_error("OpenAPI_battery_indication_rm_convertToJSON() failed [replaceable_ind]");
+ goto end;
+ }
}
if (battery_indication_rm->rechargeable_ind) {
- if (cJSON_AddBoolToObject(item, "rechargeableInd", battery_indication_rm->rechargeable_ind) == NULL) {
- ogs_error("OpenAPI_battery_indication_rm_convertToJSON() failed [rechargeable_ind]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "rechargeableInd", battery_indication_rm->rechargeable_ind) == NULL) {
+ ogs_error("OpenAPI_battery_indication_rm_convertToJSON() failed [rechargeable_ind]");
+ goto end;
+ }
}
end:
@@ -70,36 +70,36 @@ OpenAPI_battery_indication_rm_t *OpenAPI_battery_indication_rm_parseFromJSON(cJS
OpenAPI_battery_indication_rm_t *battery_indication_rm_local_var = NULL;
cJSON *battery_ind = cJSON_GetObjectItemCaseSensitive(battery_indication_rmJSON, "batteryInd");
- if (battery_ind) {
- if (!cJSON_IsBool(battery_ind)) {
- ogs_error("OpenAPI_battery_indication_rm_parseFromJSON() failed [battery_ind]");
- goto end;
- }
+ if (battery_ind) {
+ if (!cJSON_IsBool(battery_ind)) {
+ ogs_error("OpenAPI_battery_indication_rm_parseFromJSON() failed [battery_ind]");
+ goto end;
+ }
}
cJSON *replaceable_ind = cJSON_GetObjectItemCaseSensitive(battery_indication_rmJSON, "replaceableInd");
- if (replaceable_ind) {
- if (!cJSON_IsBool(replaceable_ind)) {
- ogs_error("OpenAPI_battery_indication_rm_parseFromJSON() failed [replaceable_ind]");
- goto end;
- }
+ if (replaceable_ind) {
+ if (!cJSON_IsBool(replaceable_ind)) {
+ ogs_error("OpenAPI_battery_indication_rm_parseFromJSON() failed [replaceable_ind]");
+ goto end;
+ }
}
cJSON *rechargeable_ind = cJSON_GetObjectItemCaseSensitive(battery_indication_rmJSON, "rechargeableInd");
- if (rechargeable_ind) {
- if (!cJSON_IsBool(rechargeable_ind)) {
- ogs_error("OpenAPI_battery_indication_rm_parseFromJSON() failed [rechargeable_ind]");
- goto end;
- }
+ if (rechargeable_ind) {
+ if (!cJSON_IsBool(rechargeable_ind)) {
+ ogs_error("OpenAPI_battery_indication_rm_parseFromJSON() failed [rechargeable_ind]");
+ goto end;
+ }
}
battery_indication_rm_local_var = OpenAPI_battery_indication_rm_create (
battery_ind ? battery_ind->valueint : 0,
replaceable_ind ? replaceable_ind->valueint : 0,
rechargeable_ind ? rechargeable_ind->valueint : 0
- );
+ );
return battery_indication_rm_local_var;
end:
diff --git a/lib/sbi/openapi/model/battery_indication_rm.h b/lib/sbi/openapi/model/battery_indication_rm.h
index e4d3c39a1..378d7e574 100644
--- a/lib/sbi/openapi/model/battery_indication_rm.h
+++ b/lib/sbi/openapi/model/battery_indication_rm.h
@@ -1,7 +1,7 @@
/*
* battery_indication_rm.h
*
- *
+ *
*/
#ifndef _OpenAPI_battery_indication_rm_H_
@@ -30,7 +30,7 @@ OpenAPI_battery_indication_rm_t *OpenAPI_battery_indication_rm_create(
int battery_ind,
int replaceable_ind,
int rechargeable_ind
- );
+);
void OpenAPI_battery_indication_rm_free(OpenAPI_battery_indication_rm_t *battery_indication_rm);
OpenAPI_battery_indication_rm_t *OpenAPI_battery_indication_rm_parseFromJSON(cJSON *battery_indication_rmJSON);
cJSON *OpenAPI_battery_indication_rm_convertToJSON(OpenAPI_battery_indication_rm_t *battery_indication_rm);
diff --git a/lib/sbi/openapi/model/bdt_data.c b/lib/sbi/openapi/model/bdt_data.c
index ce6361880..427e87b13 100644
--- a/lib/sbi/openapi/model/bdt_data.c
+++ b/lib/sbi/openapi/model/bdt_data.c
@@ -8,12 +8,15 @@ OpenAPI_bdt_data_t *OpenAPI_bdt_data_create(
char *asp_id,
OpenAPI_transfer_policy_t *trans_policy,
char *bdt_ref_id,
- OpenAPI_network_area_info_2_t *nw_area_info,
+ OpenAPI_network_area_info_1_t *nw_area_info,
int num_of_ues,
OpenAPI_usage_threshold_t *vol_per_ue,
char *dnn,
- OpenAPI_snssai_t *snssai
- )
+ OpenAPI_snssai_t *snssai,
+ char *traffic_des,
+ OpenAPI_bdt_policy_status_t *bdtp_status,
+ char *supp_feat
+)
{
OpenAPI_bdt_data_t *bdt_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_bdt_data_t));
if (!bdt_data_local_var) {
@@ -27,6 +30,9 @@ OpenAPI_bdt_data_t *OpenAPI_bdt_data_create(
bdt_data_local_var->vol_per_ue = vol_per_ue;
bdt_data_local_var->dnn = dnn;
bdt_data_local_var->snssai = snssai;
+ bdt_data_local_var->traffic_des = traffic_des;
+ bdt_data_local_var->bdtp_status = bdtp_status;
+ bdt_data_local_var->supp_feat = supp_feat;
return bdt_data_local_var;
}
@@ -40,10 +46,13 @@ void OpenAPI_bdt_data_free(OpenAPI_bdt_data_t *bdt_data)
ogs_free(bdt_data->asp_id);
OpenAPI_transfer_policy_free(bdt_data->trans_policy);
ogs_free(bdt_data->bdt_ref_id);
- OpenAPI_network_area_info_2_free(bdt_data->nw_area_info);
+ OpenAPI_network_area_info_1_free(bdt_data->nw_area_info);
OpenAPI_usage_threshold_free(bdt_data->vol_per_ue);
ogs_free(bdt_data->dnn);
OpenAPI_snssai_free(bdt_data->snssai);
+ ogs_free(bdt_data->traffic_des);
+ OpenAPI_bdt_policy_status_free(bdt_data->bdtp_status);
+ ogs_free(bdt_data->supp_feat);
ogs_free(bdt_data);
}
@@ -74,63 +83,90 @@ cJSON *OpenAPI_bdt_data_convertToJSON(OpenAPI_bdt_data_t *bdt_data)
}
if (bdt_data->bdt_ref_id) {
- if (cJSON_AddStringToObject(item, "bdtRefId", bdt_data->bdt_ref_id) == NULL) {
- ogs_error("OpenAPI_bdt_data_convertToJSON() failed [bdt_ref_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "bdtRefId", bdt_data->bdt_ref_id) == NULL) {
+ ogs_error("OpenAPI_bdt_data_convertToJSON() failed [bdt_ref_id]");
+ goto end;
+ }
}
if (bdt_data->nw_area_info) {
- cJSON *nw_area_info_local_JSON = OpenAPI_network_area_info_2_convertToJSON(bdt_data->nw_area_info);
- if (nw_area_info_local_JSON == NULL) {
- ogs_error("OpenAPI_bdt_data_convertToJSON() failed [nw_area_info]");
- goto end;
- }
- cJSON_AddItemToObject(item, "nwAreaInfo", nw_area_info_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_bdt_data_convertToJSON() failed [nw_area_info]");
- goto end;
- }
+ cJSON *nw_area_info_local_JSON = OpenAPI_network_area_info_1_convertToJSON(bdt_data->nw_area_info);
+ if (nw_area_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_bdt_data_convertToJSON() failed [nw_area_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "nwAreaInfo", nw_area_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_bdt_data_convertToJSON() failed [nw_area_info]");
+ goto end;
+ }
}
if (bdt_data->num_of_ues) {
- if (cJSON_AddNumberToObject(item, "numOfUes", bdt_data->num_of_ues) == NULL) {
- ogs_error("OpenAPI_bdt_data_convertToJSON() failed [num_of_ues]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "numOfUes", bdt_data->num_of_ues) == NULL) {
+ ogs_error("OpenAPI_bdt_data_convertToJSON() failed [num_of_ues]");
+ goto end;
+ }
}
if (bdt_data->vol_per_ue) {
- cJSON *vol_per_ue_local_JSON = OpenAPI_usage_threshold_convertToJSON(bdt_data->vol_per_ue);
- if (vol_per_ue_local_JSON == NULL) {
- ogs_error("OpenAPI_bdt_data_convertToJSON() failed [vol_per_ue]");
- goto end;
- }
- cJSON_AddItemToObject(item, "volPerUe", vol_per_ue_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_bdt_data_convertToJSON() failed [vol_per_ue]");
- goto end;
- }
+ cJSON *vol_per_ue_local_JSON = OpenAPI_usage_threshold_convertToJSON(bdt_data->vol_per_ue);
+ if (vol_per_ue_local_JSON == NULL) {
+ ogs_error("OpenAPI_bdt_data_convertToJSON() failed [vol_per_ue]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "volPerUe", vol_per_ue_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_bdt_data_convertToJSON() failed [vol_per_ue]");
+ goto end;
+ }
}
if (bdt_data->dnn) {
- if (cJSON_AddStringToObject(item, "dnn", bdt_data->dnn) == NULL) {
- ogs_error("OpenAPI_bdt_data_convertToJSON() failed [dnn]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "dnn", bdt_data->dnn) == NULL) {
+ ogs_error("OpenAPI_bdt_data_convertToJSON() failed [dnn]");
+ goto end;
+ }
}
if (bdt_data->snssai) {
- cJSON *snssai_local_JSON = OpenAPI_snssai_convertToJSON(bdt_data->snssai);
- if (snssai_local_JSON == NULL) {
- ogs_error("OpenAPI_bdt_data_convertToJSON() failed [snssai]");
- goto end;
- }
- cJSON_AddItemToObject(item, "snssai", snssai_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_bdt_data_convertToJSON() failed [snssai]");
- goto end;
- }
+ cJSON *snssai_local_JSON = OpenAPI_snssai_convertToJSON(bdt_data->snssai);
+ if (snssai_local_JSON == NULL) {
+ ogs_error("OpenAPI_bdt_data_convertToJSON() failed [snssai]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "snssai", snssai_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_bdt_data_convertToJSON() failed [snssai]");
+ goto end;
+ }
+ }
+
+ if (bdt_data->traffic_des) {
+ if (cJSON_AddStringToObject(item, "trafficDes", bdt_data->traffic_des) == NULL) {
+ ogs_error("OpenAPI_bdt_data_convertToJSON() failed [traffic_des]");
+ goto end;
+ }
+ }
+
+ if (bdt_data->bdtp_status) {
+ cJSON *bdtp_status_local_JSON = OpenAPI_bdt_policy_status_convertToJSON(bdt_data->bdtp_status);
+ if (bdtp_status_local_JSON == NULL) {
+ ogs_error("OpenAPI_bdt_data_convertToJSON() failed [bdtp_status]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "bdtpStatus", bdtp_status_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_bdt_data_convertToJSON() failed [bdtp_status]");
+ goto end;
+ }
+ }
+
+ if (bdt_data->supp_feat) {
+ if (cJSON_AddStringToObject(item, "suppFeat", bdt_data->supp_feat) == NULL) {
+ ogs_error("OpenAPI_bdt_data_convertToJSON() failed [supp_feat]");
+ goto end;
+ }
}
end:
@@ -146,7 +182,7 @@ OpenAPI_bdt_data_t *OpenAPI_bdt_data_parseFromJSON(cJSON *bdt_dataJSON)
goto end;
}
-
+
if (!cJSON_IsString(asp_id)) {
ogs_error("OpenAPI_bdt_data_parseFromJSON() failed [asp_id]");
goto end;
@@ -159,55 +195,80 @@ OpenAPI_bdt_data_t *OpenAPI_bdt_data_parseFromJSON(cJSON *bdt_dataJSON)
}
OpenAPI_transfer_policy_t *trans_policy_local_nonprim = NULL;
-
+
trans_policy_local_nonprim = OpenAPI_transfer_policy_parseFromJSON(trans_policy);
cJSON *bdt_ref_id = cJSON_GetObjectItemCaseSensitive(bdt_dataJSON, "bdtRefId");
- if (bdt_ref_id) {
- if (!cJSON_IsString(bdt_ref_id)) {
- ogs_error("OpenAPI_bdt_data_parseFromJSON() failed [bdt_ref_id]");
- goto end;
- }
+ if (bdt_ref_id) {
+ if (!cJSON_IsString(bdt_ref_id)) {
+ ogs_error("OpenAPI_bdt_data_parseFromJSON() failed [bdt_ref_id]");
+ goto end;
+ }
}
cJSON *nw_area_info = cJSON_GetObjectItemCaseSensitive(bdt_dataJSON, "nwAreaInfo");
- OpenAPI_network_area_info_2_t *nw_area_info_local_nonprim = NULL;
- if (nw_area_info) {
- nw_area_info_local_nonprim = OpenAPI_network_area_info_2_parseFromJSON(nw_area_info);
+ OpenAPI_network_area_info_1_t *nw_area_info_local_nonprim = NULL;
+ if (nw_area_info) {
+ nw_area_info_local_nonprim = OpenAPI_network_area_info_1_parseFromJSON(nw_area_info);
}
cJSON *num_of_ues = cJSON_GetObjectItemCaseSensitive(bdt_dataJSON, "numOfUes");
- if (num_of_ues) {
- if (!cJSON_IsNumber(num_of_ues)) {
- ogs_error("OpenAPI_bdt_data_parseFromJSON() failed [num_of_ues]");
- goto end;
- }
+ if (num_of_ues) {
+ if (!cJSON_IsNumber(num_of_ues)) {
+ ogs_error("OpenAPI_bdt_data_parseFromJSON() failed [num_of_ues]");
+ goto end;
+ }
}
cJSON *vol_per_ue = cJSON_GetObjectItemCaseSensitive(bdt_dataJSON, "volPerUe");
OpenAPI_usage_threshold_t *vol_per_ue_local_nonprim = NULL;
- if (vol_per_ue) {
- vol_per_ue_local_nonprim = OpenAPI_usage_threshold_parseFromJSON(vol_per_ue);
+ if (vol_per_ue) {
+ vol_per_ue_local_nonprim = OpenAPI_usage_threshold_parseFromJSON(vol_per_ue);
}
cJSON *dnn = cJSON_GetObjectItemCaseSensitive(bdt_dataJSON, "dnn");
- if (dnn) {
- if (!cJSON_IsString(dnn)) {
- ogs_error("OpenAPI_bdt_data_parseFromJSON() failed [dnn]");
- goto end;
- }
+ if (dnn) {
+ if (!cJSON_IsString(dnn)) {
+ ogs_error("OpenAPI_bdt_data_parseFromJSON() failed [dnn]");
+ goto end;
+ }
}
cJSON *snssai = cJSON_GetObjectItemCaseSensitive(bdt_dataJSON, "snssai");
OpenAPI_snssai_t *snssai_local_nonprim = NULL;
- if (snssai) {
- snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai);
+ if (snssai) {
+ snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai);
+ }
+
+ cJSON *traffic_des = cJSON_GetObjectItemCaseSensitive(bdt_dataJSON, "trafficDes");
+
+ if (traffic_des) {
+ if (!cJSON_IsString(traffic_des)) {
+ ogs_error("OpenAPI_bdt_data_parseFromJSON() failed [traffic_des]");
+ goto end;
+ }
+ }
+
+ cJSON *bdtp_status = cJSON_GetObjectItemCaseSensitive(bdt_dataJSON, "bdtpStatus");
+
+ OpenAPI_bdt_policy_status_t *bdtp_status_local_nonprim = NULL;
+ if (bdtp_status) {
+ bdtp_status_local_nonprim = OpenAPI_bdt_policy_status_parseFromJSON(bdtp_status);
+ }
+
+ cJSON *supp_feat = cJSON_GetObjectItemCaseSensitive(bdt_dataJSON, "suppFeat");
+
+ if (supp_feat) {
+ if (!cJSON_IsString(supp_feat)) {
+ ogs_error("OpenAPI_bdt_data_parseFromJSON() failed [supp_feat]");
+ goto end;
+ }
}
bdt_data_local_var = OpenAPI_bdt_data_create (
@@ -218,8 +279,11 @@ OpenAPI_bdt_data_t *OpenAPI_bdt_data_parseFromJSON(cJSON *bdt_dataJSON)
num_of_ues ? num_of_ues->valuedouble : 0,
vol_per_ue ? vol_per_ue_local_nonprim : NULL,
dnn ? ogs_strdup_or_assert(dnn->valuestring) : NULL,
- snssai ? snssai_local_nonprim : NULL
- );
+ snssai ? snssai_local_nonprim : NULL,
+ traffic_des ? ogs_strdup_or_assert(traffic_des->valuestring) : NULL,
+ bdtp_status ? bdtp_status_local_nonprim : NULL,
+ supp_feat ? ogs_strdup_or_assert(supp_feat->valuestring) : NULL
+ );
return bdt_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/bdt_data.h b/lib/sbi/openapi/model/bdt_data.h
index db817db96..301f6023c 100644
--- a/lib/sbi/openapi/model/bdt_data.h
+++ b/lib/sbi/openapi/model/bdt_data.h
@@ -12,7 +12,8 @@
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
-#include "network_area_info_2.h"
+#include "bdt_policy_status.h"
+#include "network_area_info_1.h"
#include "snssai.h"
#include "transfer_policy.h"
#include "usage_threshold.h"
@@ -26,23 +27,29 @@ typedef struct OpenAPI_bdt_data_s {
char *asp_id;
struct OpenAPI_transfer_policy_s *trans_policy;
char *bdt_ref_id;
- struct OpenAPI_network_area_info_2_s *nw_area_info;
+ struct OpenAPI_network_area_info_1_s *nw_area_info;
int num_of_ues;
struct OpenAPI_usage_threshold_s *vol_per_ue;
char *dnn;
struct OpenAPI_snssai_s *snssai;
+ char *traffic_des;
+ struct OpenAPI_bdt_policy_status_s *bdtp_status;
+ char *supp_feat;
} OpenAPI_bdt_data_t;
OpenAPI_bdt_data_t *OpenAPI_bdt_data_create(
char *asp_id,
OpenAPI_transfer_policy_t *trans_policy,
char *bdt_ref_id,
- OpenAPI_network_area_info_2_t *nw_area_info,
+ OpenAPI_network_area_info_1_t *nw_area_info,
int num_of_ues,
OpenAPI_usage_threshold_t *vol_per_ue,
char *dnn,
- OpenAPI_snssai_t *snssai
- );
+ OpenAPI_snssai_t *snssai,
+ char *traffic_des,
+ OpenAPI_bdt_policy_status_t *bdtp_status,
+ char *supp_feat
+);
void OpenAPI_bdt_data_free(OpenAPI_bdt_data_t *bdt_data);
OpenAPI_bdt_data_t *OpenAPI_bdt_data_parseFromJSON(cJSON *bdt_dataJSON);
cJSON *OpenAPI_bdt_data_convertToJSON(OpenAPI_bdt_data_t *bdt_data);
diff --git a/lib/sbi/openapi/model/bdt_data_patch.c b/lib/sbi/openapi/model/bdt_data_patch.c
new file mode 100644
index 000000000..072171bb5
--- /dev/null
+++ b/lib/sbi/openapi/model/bdt_data_patch.c
@@ -0,0 +1,133 @@
+
+#include
+#include
+#include
+#include "bdt_data_patch.h"
+
+OpenAPI_bdt_data_patch_t *OpenAPI_bdt_data_patch_create(
+ OpenAPI_transfer_policy_t *trans_policy,
+ OpenAPI_bdt_policy_status_t *bdtp_status
+)
+{
+ OpenAPI_bdt_data_patch_t *bdt_data_patch_local_var = OpenAPI_malloc(sizeof(OpenAPI_bdt_data_patch_t));
+ if (!bdt_data_patch_local_var) {
+ return NULL;
+ }
+ bdt_data_patch_local_var->trans_policy = trans_policy;
+ bdt_data_patch_local_var->bdtp_status = bdtp_status;
+
+ return bdt_data_patch_local_var;
+}
+
+void OpenAPI_bdt_data_patch_free(OpenAPI_bdt_data_patch_t *bdt_data_patch)
+{
+ if (NULL == bdt_data_patch) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ OpenAPI_transfer_policy_free(bdt_data_patch->trans_policy);
+ OpenAPI_bdt_policy_status_free(bdt_data_patch->bdtp_status);
+ ogs_free(bdt_data_patch);
+}
+
+cJSON *OpenAPI_bdt_data_patch_convertToJSON(OpenAPI_bdt_data_patch_t *bdt_data_patch)
+{
+ cJSON *item = NULL;
+
+ if (bdt_data_patch == NULL) {
+ ogs_error("OpenAPI_bdt_data_patch_convertToJSON() failed [BdtDataPatch]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (bdt_data_patch->trans_policy) {
+ cJSON *trans_policy_local_JSON = OpenAPI_transfer_policy_convertToJSON(bdt_data_patch->trans_policy);
+ if (trans_policy_local_JSON == NULL) {
+ ogs_error("OpenAPI_bdt_data_patch_convertToJSON() failed [trans_policy]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "transPolicy", trans_policy_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_bdt_data_patch_convertToJSON() failed [trans_policy]");
+ goto end;
+ }
+ }
+
+ if (bdt_data_patch->bdtp_status) {
+ cJSON *bdtp_status_local_JSON = OpenAPI_bdt_policy_status_convertToJSON(bdt_data_patch->bdtp_status);
+ if (bdtp_status_local_JSON == NULL) {
+ ogs_error("OpenAPI_bdt_data_patch_convertToJSON() failed [bdtp_status]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "bdtpStatus", bdtp_status_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_bdt_data_patch_convertToJSON() failed [bdtp_status]");
+ goto end;
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_bdt_data_patch_t *OpenAPI_bdt_data_patch_parseFromJSON(cJSON *bdt_data_patchJSON)
+{
+ OpenAPI_bdt_data_patch_t *bdt_data_patch_local_var = NULL;
+ cJSON *trans_policy = cJSON_GetObjectItemCaseSensitive(bdt_data_patchJSON, "transPolicy");
+
+ OpenAPI_transfer_policy_t *trans_policy_local_nonprim = NULL;
+ if (trans_policy) {
+ trans_policy_local_nonprim = OpenAPI_transfer_policy_parseFromJSON(trans_policy);
+ }
+
+ cJSON *bdtp_status = cJSON_GetObjectItemCaseSensitive(bdt_data_patchJSON, "bdtpStatus");
+
+ OpenAPI_bdt_policy_status_t *bdtp_status_local_nonprim = NULL;
+ if (bdtp_status) {
+ bdtp_status_local_nonprim = OpenAPI_bdt_policy_status_parseFromJSON(bdtp_status);
+ }
+
+ bdt_data_patch_local_var = OpenAPI_bdt_data_patch_create (
+ trans_policy ? trans_policy_local_nonprim : NULL,
+ bdtp_status ? bdtp_status_local_nonprim : NULL
+ );
+
+ return bdt_data_patch_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_bdt_data_patch_t *OpenAPI_bdt_data_patch_copy(OpenAPI_bdt_data_patch_t *dst, OpenAPI_bdt_data_patch_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_bdt_data_patch_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_bdt_data_patch_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_bdt_data_patch_free(dst);
+ dst = OpenAPI_bdt_data_patch_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/bdt_data_patch.h b/lib/sbi/openapi/model/bdt_data_patch.h
new file mode 100644
index 000000000..0703106ee
--- /dev/null
+++ b/lib/sbi/openapi/model/bdt_data_patch.h
@@ -0,0 +1,42 @@
+/*
+ * bdt_data_patch.h
+ *
+ * Contains the modified background data transfer data.
+ */
+
+#ifndef _OpenAPI_bdt_data_patch_H_
+#define _OpenAPI_bdt_data_patch_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+#include "bdt_policy_status.h"
+#include "transfer_policy.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_bdt_data_patch_s OpenAPI_bdt_data_patch_t;
+typedef struct OpenAPI_bdt_data_patch_s {
+ struct OpenAPI_transfer_policy_s *trans_policy;
+ struct OpenAPI_bdt_policy_status_s *bdtp_status;
+} OpenAPI_bdt_data_patch_t;
+
+OpenAPI_bdt_data_patch_t *OpenAPI_bdt_data_patch_create(
+ OpenAPI_transfer_policy_t *trans_policy,
+ OpenAPI_bdt_policy_status_t *bdtp_status
+);
+void OpenAPI_bdt_data_patch_free(OpenAPI_bdt_data_patch_t *bdt_data_patch);
+OpenAPI_bdt_data_patch_t *OpenAPI_bdt_data_patch_parseFromJSON(cJSON *bdt_data_patchJSON);
+cJSON *OpenAPI_bdt_data_patch_convertToJSON(OpenAPI_bdt_data_patch_t *bdt_data_patch);
+OpenAPI_bdt_data_patch_t *OpenAPI_bdt_data_patch_copy(OpenAPI_bdt_data_patch_t *dst, OpenAPI_bdt_data_patch_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_bdt_data_patch_H_ */
+
diff --git a/lib/sbi/openapi/model/bdt_policy_data.c b/lib/sbi/openapi/model/bdt_policy_data.c
index 7143866aa..9f77777fc 100644
--- a/lib/sbi/openapi/model/bdt_policy_data.c
+++ b/lib/sbi/openapi/model/bdt_policy_data.c
@@ -9,8 +9,9 @@ OpenAPI_bdt_policy_data_t *OpenAPI_bdt_policy_data_create(
char *supi,
char *bdt_ref_id,
char *dnn,
- OpenAPI_snssai_t *snssai
- )
+ OpenAPI_snssai_t *snssai,
+ char *res_uri
+)
{
OpenAPI_bdt_policy_data_t *bdt_policy_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_bdt_policy_data_t));
if (!bdt_policy_data_local_var) {
@@ -21,6 +22,7 @@ OpenAPI_bdt_policy_data_t *OpenAPI_bdt_policy_data_create(
bdt_policy_data_local_var->bdt_ref_id = bdt_ref_id;
bdt_policy_data_local_var->dnn = dnn;
bdt_policy_data_local_var->snssai = snssai;
+ bdt_policy_data_local_var->res_uri = res_uri;
return bdt_policy_data_local_var;
}
@@ -36,6 +38,7 @@ void OpenAPI_bdt_policy_data_free(OpenAPI_bdt_policy_data_t *bdt_policy_data)
ogs_free(bdt_policy_data->bdt_ref_id);
ogs_free(bdt_policy_data->dnn);
OpenAPI_snssai_free(bdt_policy_data->snssai);
+ ogs_free(bdt_policy_data->res_uri);
ogs_free(bdt_policy_data);
}
@@ -50,17 +53,17 @@ cJSON *OpenAPI_bdt_policy_data_convertToJSON(OpenAPI_bdt_policy_data_t *bdt_poli
item = cJSON_CreateObject();
if (bdt_policy_data->inter_group_id) {
- if (cJSON_AddStringToObject(item, "interGroupId", bdt_policy_data->inter_group_id) == NULL) {
- ogs_error("OpenAPI_bdt_policy_data_convertToJSON() failed [inter_group_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "interGroupId", bdt_policy_data->inter_group_id) == NULL) {
+ ogs_error("OpenAPI_bdt_policy_data_convertToJSON() failed [inter_group_id]");
+ goto end;
+ }
}
if (bdt_policy_data->supi) {
- if (cJSON_AddStringToObject(item, "supi", bdt_policy_data->supi) == NULL) {
- ogs_error("OpenAPI_bdt_policy_data_convertToJSON() failed [supi]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "supi", bdt_policy_data->supi) == NULL) {
+ ogs_error("OpenAPI_bdt_policy_data_convertToJSON() failed [supi]");
+ goto end;
+ }
}
if (cJSON_AddStringToObject(item, "bdtRefId", bdt_policy_data->bdt_ref_id) == NULL) {
@@ -69,23 +72,30 @@ cJSON *OpenAPI_bdt_policy_data_convertToJSON(OpenAPI_bdt_policy_data_t *bdt_poli
}
if (bdt_policy_data->dnn) {
- if (cJSON_AddStringToObject(item, "dnn", bdt_policy_data->dnn) == NULL) {
- ogs_error("OpenAPI_bdt_policy_data_convertToJSON() failed [dnn]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "dnn", bdt_policy_data->dnn) == NULL) {
+ ogs_error("OpenAPI_bdt_policy_data_convertToJSON() failed [dnn]");
+ goto end;
+ }
}
if (bdt_policy_data->snssai) {
- cJSON *snssai_local_JSON = OpenAPI_snssai_convertToJSON(bdt_policy_data->snssai);
- if (snssai_local_JSON == NULL) {
- ogs_error("OpenAPI_bdt_policy_data_convertToJSON() failed [snssai]");
- goto end;
- }
- cJSON_AddItemToObject(item, "snssai", snssai_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_bdt_policy_data_convertToJSON() failed [snssai]");
- goto end;
- }
+ cJSON *snssai_local_JSON = OpenAPI_snssai_convertToJSON(bdt_policy_data->snssai);
+ if (snssai_local_JSON == NULL) {
+ ogs_error("OpenAPI_bdt_policy_data_convertToJSON() failed [snssai]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "snssai", snssai_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_bdt_policy_data_convertToJSON() failed [snssai]");
+ goto end;
+ }
+ }
+
+ if (bdt_policy_data->res_uri) {
+ if (cJSON_AddStringToObject(item, "resUri", bdt_policy_data->res_uri) == NULL) {
+ ogs_error("OpenAPI_bdt_policy_data_convertToJSON() failed [res_uri]");
+ goto end;
+ }
}
end:
@@ -97,20 +107,20 @@ OpenAPI_bdt_policy_data_t *OpenAPI_bdt_policy_data_parseFromJSON(cJSON *bdt_poli
OpenAPI_bdt_policy_data_t *bdt_policy_data_local_var = NULL;
cJSON *inter_group_id = cJSON_GetObjectItemCaseSensitive(bdt_policy_dataJSON, "interGroupId");
- if (inter_group_id) {
- if (!cJSON_IsString(inter_group_id)) {
- ogs_error("OpenAPI_bdt_policy_data_parseFromJSON() failed [inter_group_id]");
- goto end;
- }
+ if (inter_group_id) {
+ if (!cJSON_IsString(inter_group_id)) {
+ ogs_error("OpenAPI_bdt_policy_data_parseFromJSON() failed [inter_group_id]");
+ goto end;
+ }
}
cJSON *supi = cJSON_GetObjectItemCaseSensitive(bdt_policy_dataJSON, "supi");
- if (supi) {
- if (!cJSON_IsString(supi)) {
- ogs_error("OpenAPI_bdt_policy_data_parseFromJSON() failed [supi]");
- goto end;
- }
+ if (supi) {
+ if (!cJSON_IsString(supi)) {
+ ogs_error("OpenAPI_bdt_policy_data_parseFromJSON() failed [supi]");
+ goto end;
+ }
}
cJSON *bdt_ref_id = cJSON_GetObjectItemCaseSensitive(bdt_policy_dataJSON, "bdtRefId");
@@ -119,7 +129,7 @@ OpenAPI_bdt_policy_data_t *OpenAPI_bdt_policy_data_parseFromJSON(cJSON *bdt_poli
goto end;
}
-
+
if (!cJSON_IsString(bdt_ref_id)) {
ogs_error("OpenAPI_bdt_policy_data_parseFromJSON() failed [bdt_ref_id]");
goto end;
@@ -127,18 +137,27 @@ OpenAPI_bdt_policy_data_t *OpenAPI_bdt_policy_data_parseFromJSON(cJSON *bdt_poli
cJSON *dnn = cJSON_GetObjectItemCaseSensitive(bdt_policy_dataJSON, "dnn");
- if (dnn) {
- if (!cJSON_IsString(dnn)) {
- ogs_error("OpenAPI_bdt_policy_data_parseFromJSON() failed [dnn]");
- goto end;
- }
+ if (dnn) {
+ if (!cJSON_IsString(dnn)) {
+ ogs_error("OpenAPI_bdt_policy_data_parseFromJSON() failed [dnn]");
+ goto end;
+ }
}
cJSON *snssai = cJSON_GetObjectItemCaseSensitive(bdt_policy_dataJSON, "snssai");
OpenAPI_snssai_t *snssai_local_nonprim = NULL;
- if (snssai) {
- snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai);
+ if (snssai) {
+ snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai);
+ }
+
+ cJSON *res_uri = cJSON_GetObjectItemCaseSensitive(bdt_policy_dataJSON, "resUri");
+
+ if (res_uri) {
+ if (!cJSON_IsString(res_uri)) {
+ ogs_error("OpenAPI_bdt_policy_data_parseFromJSON() failed [res_uri]");
+ goto end;
+ }
}
bdt_policy_data_local_var = OpenAPI_bdt_policy_data_create (
@@ -146,8 +165,9 @@ OpenAPI_bdt_policy_data_t *OpenAPI_bdt_policy_data_parseFromJSON(cJSON *bdt_poli
supi ? ogs_strdup_or_assert(supi->valuestring) : NULL,
ogs_strdup_or_assert(bdt_ref_id->valuestring),
dnn ? ogs_strdup_or_assert(dnn->valuestring) : NULL,
- snssai ? snssai_local_nonprim : NULL
- );
+ snssai ? snssai_local_nonprim : NULL,
+ res_uri ? ogs_strdup_or_assert(res_uri->valuestring) : NULL
+ );
return bdt_policy_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/bdt_policy_data.h b/lib/sbi/openapi/model/bdt_policy_data.h
index 708239cbd..f30917db2 100644
--- a/lib/sbi/openapi/model/bdt_policy_data.h
+++ b/lib/sbi/openapi/model/bdt_policy_data.h
@@ -1,7 +1,7 @@
/*
* bdt_policy_data.h
*
- *
+ *
*/
#ifndef _OpenAPI_bdt_policy_data_H_
@@ -25,6 +25,7 @@ typedef struct OpenAPI_bdt_policy_data_s {
char *bdt_ref_id;
char *dnn;
struct OpenAPI_snssai_s *snssai;
+ char *res_uri;
} OpenAPI_bdt_policy_data_t;
OpenAPI_bdt_policy_data_t *OpenAPI_bdt_policy_data_create(
@@ -32,8 +33,9 @@ OpenAPI_bdt_policy_data_t *OpenAPI_bdt_policy_data_create(
char *supi,
char *bdt_ref_id,
char *dnn,
- OpenAPI_snssai_t *snssai
- );
+ OpenAPI_snssai_t *snssai,
+ char *res_uri
+);
void OpenAPI_bdt_policy_data_free(OpenAPI_bdt_policy_data_t *bdt_policy_data);
OpenAPI_bdt_policy_data_t *OpenAPI_bdt_policy_data_parseFromJSON(cJSON *bdt_policy_dataJSON);
cJSON *OpenAPI_bdt_policy_data_convertToJSON(OpenAPI_bdt_policy_data_t *bdt_policy_data);
diff --git a/lib/sbi/openapi/model/bdt_policy_data_patch.c b/lib/sbi/openapi/model/bdt_policy_data_patch.c
index 104101c9e..d42d70548 100644
--- a/lib/sbi/openapi/model/bdt_policy_data_patch.c
+++ b/lib/sbi/openapi/model/bdt_policy_data_patch.c
@@ -6,7 +6,7 @@
OpenAPI_bdt_policy_data_patch_t *OpenAPI_bdt_policy_data_patch_create(
char *bdt_ref_id
- )
+)
{
OpenAPI_bdt_policy_data_patch_t *bdt_policy_data_patch_local_var = OpenAPI_malloc(sizeof(OpenAPI_bdt_policy_data_patch_t));
if (!bdt_policy_data_patch_local_var) {
@@ -55,7 +55,7 @@ OpenAPI_bdt_policy_data_patch_t *OpenAPI_bdt_policy_data_patch_parseFromJSON(cJS
goto end;
}
-
+
if (!cJSON_IsString(bdt_ref_id)) {
ogs_error("OpenAPI_bdt_policy_data_patch_parseFromJSON() failed [bdt_ref_id]");
goto end;
@@ -63,7 +63,7 @@ OpenAPI_bdt_policy_data_patch_t *OpenAPI_bdt_policy_data_patch_parseFromJSON(cJS
bdt_policy_data_patch_local_var = OpenAPI_bdt_policy_data_patch_create (
ogs_strdup_or_assert(bdt_ref_id->valuestring)
- );
+ );
return bdt_policy_data_patch_local_var;
end:
diff --git a/lib/sbi/openapi/model/bdt_policy_data_patch.h b/lib/sbi/openapi/model/bdt_policy_data_patch.h
index 67a2c2e36..a4db2b8b4 100644
--- a/lib/sbi/openapi/model/bdt_policy_data_patch.h
+++ b/lib/sbi/openapi/model/bdt_policy_data_patch.h
@@ -1,7 +1,7 @@
/*
* bdt_policy_data_patch.h
*
- *
+ *
*/
#ifndef _OpenAPI_bdt_policy_data_patch_H_
@@ -24,7 +24,7 @@ typedef struct OpenAPI_bdt_policy_data_patch_s {
OpenAPI_bdt_policy_data_patch_t *OpenAPI_bdt_policy_data_patch_create(
char *bdt_ref_id
- );
+);
void OpenAPI_bdt_policy_data_patch_free(OpenAPI_bdt_policy_data_patch_t *bdt_policy_data_patch);
OpenAPI_bdt_policy_data_patch_t *OpenAPI_bdt_policy_data_patch_parseFromJSON(cJSON *bdt_policy_data_patchJSON);
cJSON *OpenAPI_bdt_policy_data_patch_convertToJSON(OpenAPI_bdt_policy_data_patch_t *bdt_policy_data_patch);
diff --git a/lib/sbi/openapi/model/bdt_policy_status.c b/lib/sbi/openapi/model/bdt_policy_status.c
new file mode 100644
index 000000000..27f7d8ac4
--- /dev/null
+++ b/lib/sbi/openapi/model/bdt_policy_status.c
@@ -0,0 +1,85 @@
+
+#include
+#include
+#include
+#include "bdt_policy_status.h"
+
+OpenAPI_bdt_policy_status_t *OpenAPI_bdt_policy_status_create(
+)
+{
+ OpenAPI_bdt_policy_status_t *bdt_policy_status_local_var = OpenAPI_malloc(sizeof(OpenAPI_bdt_policy_status_t));
+ if (!bdt_policy_status_local_var) {
+ return NULL;
+ }
+
+ return bdt_policy_status_local_var;
+}
+
+void OpenAPI_bdt_policy_status_free(OpenAPI_bdt_policy_status_t *bdt_policy_status)
+{
+ if (NULL == bdt_policy_status) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ ogs_free(bdt_policy_status);
+}
+
+cJSON *OpenAPI_bdt_policy_status_convertToJSON(OpenAPI_bdt_policy_status_t *bdt_policy_status)
+{
+ cJSON *item = NULL;
+
+ if (bdt_policy_status == NULL) {
+ ogs_error("OpenAPI_bdt_policy_status_convertToJSON() failed [BdtPolicyStatus]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+end:
+ return item;
+}
+
+OpenAPI_bdt_policy_status_t *OpenAPI_bdt_policy_status_parseFromJSON(cJSON *bdt_policy_statusJSON)
+{
+ OpenAPI_bdt_policy_status_t *bdt_policy_status_local_var = NULL;
+ bdt_policy_status_local_var = OpenAPI_bdt_policy_status_create (
+ );
+
+ return bdt_policy_status_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_bdt_policy_status_t *OpenAPI_bdt_policy_status_copy(OpenAPI_bdt_policy_status_t *dst, OpenAPI_bdt_policy_status_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_bdt_policy_status_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_bdt_policy_status_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_bdt_policy_status_free(dst);
+ dst = OpenAPI_bdt_policy_status_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/bdt_policy_status.h b/lib/sbi/openapi/model/bdt_policy_status.h
new file mode 100644
index 000000000..8a01e27b8
--- /dev/null
+++ b/lib/sbi/openapi/model/bdt_policy_status.h
@@ -0,0 +1,37 @@
+/*
+ * bdt_policy_status.h
+ *
+ * Indicates the validation status of a negotiated BDT policy.
+ */
+
+#ifndef _OpenAPI_bdt_policy_status_H_
+#define _OpenAPI_bdt_policy_status_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+#include "bdt_policy_status_any_of.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_bdt_policy_status_s OpenAPI_bdt_policy_status_t;
+typedef struct OpenAPI_bdt_policy_status_s {
+} OpenAPI_bdt_policy_status_t;
+
+OpenAPI_bdt_policy_status_t *OpenAPI_bdt_policy_status_create(
+);
+void OpenAPI_bdt_policy_status_free(OpenAPI_bdt_policy_status_t *bdt_policy_status);
+OpenAPI_bdt_policy_status_t *OpenAPI_bdt_policy_status_parseFromJSON(cJSON *bdt_policy_statusJSON);
+cJSON *OpenAPI_bdt_policy_status_convertToJSON(OpenAPI_bdt_policy_status_t *bdt_policy_status);
+OpenAPI_bdt_policy_status_t *OpenAPI_bdt_policy_status_copy(OpenAPI_bdt_policy_status_t *dst, OpenAPI_bdt_policy_status_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_bdt_policy_status_H_ */
+
diff --git a/lib/sbi/openapi/model/bdt_policy_status_any_of.c b/lib/sbi/openapi/model/bdt_policy_status_any_of.c
new file mode 100644
index 000000000..ed3909451
--- /dev/null
+++ b/lib/sbi/openapi/model/bdt_policy_status_any_of.c
@@ -0,0 +1,30 @@
+
+#include
+#include
+#include
+#include "bdt_policy_status_any_of.h"
+
+char* OpenAPI_bdt_policy_status_any_of_ToString(OpenAPI_bdt_policy_status_any_of_e bdt_policy_status_any_of)
+{
+ const char *bdt_policy_status_any_ofArray[] = { "NULL", "INVALID", "VALID" };
+ size_t sizeofArray = sizeof(bdt_policy_status_any_ofArray) / sizeof(bdt_policy_status_any_ofArray[0]);
+ if (bdt_policy_status_any_of < sizeofArray)
+ return (char *)bdt_policy_status_any_ofArray[bdt_policy_status_any_of];
+ else
+ return (char *)"Unknown";
+}
+
+OpenAPI_bdt_policy_status_any_of_e OpenAPI_bdt_policy_status_any_of_FromString(char* bdt_policy_status_any_of)
+{
+ int stringToReturn = 0;
+ const char *bdt_policy_status_any_ofArray[] = { "NULL", "INVALID", "VALID" };
+ size_t sizeofArray = sizeof(bdt_policy_status_any_ofArray) / sizeof(bdt_policy_status_any_ofArray[0]);
+ while (stringToReturn < sizeofArray) {
+ if (strcmp(bdt_policy_status_any_of, bdt_policy_status_any_ofArray[stringToReturn]) == 0) {
+ return stringToReturn;
+ }
+ stringToReturn++;
+ }
+ return 0;
+}
+
diff --git a/lib/sbi/openapi/model/bdt_policy_status_any_of.h b/lib/sbi/openapi/model/bdt_policy_status_any_of.h
new file mode 100644
index 000000000..44dec77c3
--- /dev/null
+++ b/lib/sbi/openapi/model/bdt_policy_status_any_of.h
@@ -0,0 +1,31 @@
+/*
+ * bdt_policy_status_any_of.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_bdt_policy_status_any_of_H_
+#define _OpenAPI_bdt_policy_status_any_of_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum { OpenAPI_bdt_policy_status_any_of_NULL = 0, OpenAPI_bdt_policy_status_any_of_INVALID, OpenAPI_bdt_policy_status_any_of_VALID } OpenAPI_bdt_policy_status_any_of_e;
+
+char* OpenAPI_bdt_policy_status_any_of_ToString(OpenAPI_bdt_policy_status_any_of_e bdt_policy_status_any_of);
+
+OpenAPI_bdt_policy_status_any_of_e OpenAPI_bdt_policy_status_any_of_FromString(char* bdt_policy_status_any_of);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_bdt_policy_status_any_of_H_ */
+
diff --git a/lib/sbi/openapi/model/binding_level.h b/lib/sbi/openapi/model/binding_level.h
index 023906529..0df902048 100644
--- a/lib/sbi/openapi/model/binding_level.h
+++ b/lib/sbi/openapi/model/binding_level.h
@@ -1,7 +1,7 @@
/*
* binding_level.h
*
- *
+ *
*/
#ifndef _OpenAPI_binding_level_H_
diff --git a/lib/sbi/openapi/model/binding_resp.c b/lib/sbi/openapi/model/binding_resp.c
index f4a24662d..7944939df 100644
--- a/lib/sbi/openapi/model/binding_resp.c
+++ b/lib/sbi/openapi/model/binding_resp.c
@@ -7,7 +7,7 @@
OpenAPI_binding_resp_t *OpenAPI_binding_resp_create(
char *pcf_sm_fqdn,
OpenAPI_list_t *pcf_sm_ip_end_points
- )
+)
{
OpenAPI_binding_resp_t *binding_resp_local_var = OpenAPI_malloc(sizeof(OpenAPI_binding_resp_t));
if (!binding_resp_local_var) {
@@ -44,31 +44,31 @@ cJSON *OpenAPI_binding_resp_convertToJSON(OpenAPI_binding_resp_t *binding_resp)
item = cJSON_CreateObject();
if (binding_resp->pcf_sm_fqdn) {
- if (cJSON_AddStringToObject(item, "pcfSmFqdn", binding_resp->pcf_sm_fqdn) == NULL) {
- ogs_error("OpenAPI_binding_resp_convertToJSON() failed [pcf_sm_fqdn]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "pcfSmFqdn", binding_resp->pcf_sm_fqdn) == NULL) {
+ ogs_error("OpenAPI_binding_resp_convertToJSON() failed [pcf_sm_fqdn]");
+ goto end;
+ }
}
if (binding_resp->pcf_sm_ip_end_points) {
- cJSON *pcf_sm_ip_end_pointsList = cJSON_AddArrayToObject(item, "pcfSmIpEndPoints");
- if (pcf_sm_ip_end_pointsList == NULL) {
- ogs_error("OpenAPI_binding_resp_convertToJSON() failed [pcf_sm_ip_end_points]");
- goto end;
- }
+ cJSON *pcf_sm_ip_end_pointsList = cJSON_AddArrayToObject(item, "pcfSmIpEndPoints");
+ if (pcf_sm_ip_end_pointsList == NULL) {
+ ogs_error("OpenAPI_binding_resp_convertToJSON() failed [pcf_sm_ip_end_points]");
+ goto end;
+ }
- OpenAPI_lnode_t *pcf_sm_ip_end_points_node;
- if (binding_resp->pcf_sm_ip_end_points) {
- OpenAPI_list_for_each(binding_resp->pcf_sm_ip_end_points, pcf_sm_ip_end_points_node) {
- cJSON *itemLocal = OpenAPI_ip_end_point_convertToJSON(pcf_sm_ip_end_points_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_binding_resp_convertToJSON() failed [pcf_sm_ip_end_points]");
- goto end;
- }
- cJSON_AddItemToArray(pcf_sm_ip_end_pointsList, itemLocal);
+ OpenAPI_lnode_t *pcf_sm_ip_end_points_node;
+ if (binding_resp->pcf_sm_ip_end_points) {
+ OpenAPI_list_for_each(binding_resp->pcf_sm_ip_end_points, pcf_sm_ip_end_points_node) {
+ cJSON *itemLocal = OpenAPI_ip_end_point_convertToJSON(pcf_sm_ip_end_points_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_binding_resp_convertToJSON() failed [pcf_sm_ip_end_points]");
+ goto end;
}
+ cJSON_AddItemToArray(pcf_sm_ip_end_pointsList, itemLocal);
}
}
+ }
end:
return item;
@@ -79,40 +79,40 @@ OpenAPI_binding_resp_t *OpenAPI_binding_resp_parseFromJSON(cJSON *binding_respJS
OpenAPI_binding_resp_t *binding_resp_local_var = NULL;
cJSON *pcf_sm_fqdn = cJSON_GetObjectItemCaseSensitive(binding_respJSON, "pcfSmFqdn");
- if (pcf_sm_fqdn) {
- if (!cJSON_IsString(pcf_sm_fqdn)) {
- ogs_error("OpenAPI_binding_resp_parseFromJSON() failed [pcf_sm_fqdn]");
- goto end;
- }
+ if (pcf_sm_fqdn) {
+ if (!cJSON_IsString(pcf_sm_fqdn)) {
+ ogs_error("OpenAPI_binding_resp_parseFromJSON() failed [pcf_sm_fqdn]");
+ goto end;
+ }
}
cJSON *pcf_sm_ip_end_points = cJSON_GetObjectItemCaseSensitive(binding_respJSON, "pcfSmIpEndPoints");
OpenAPI_list_t *pcf_sm_ip_end_pointsList;
- if (pcf_sm_ip_end_points) {
- cJSON *pcf_sm_ip_end_points_local_nonprimitive;
- if (!cJSON_IsArray(pcf_sm_ip_end_points)) {
+ if (pcf_sm_ip_end_points) {
+ cJSON *pcf_sm_ip_end_points_local_nonprimitive;
+ if (!cJSON_IsArray(pcf_sm_ip_end_points)){
+ ogs_error("OpenAPI_binding_resp_parseFromJSON() failed [pcf_sm_ip_end_points]");
+ goto end;
+ }
+
+ pcf_sm_ip_end_pointsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(pcf_sm_ip_end_points_local_nonprimitive, pcf_sm_ip_end_points ) {
+ if (!cJSON_IsObject(pcf_sm_ip_end_points_local_nonprimitive)) {
ogs_error("OpenAPI_binding_resp_parseFromJSON() failed [pcf_sm_ip_end_points]");
goto end;
}
+ OpenAPI_ip_end_point_t *pcf_sm_ip_end_pointsItem = OpenAPI_ip_end_point_parseFromJSON(pcf_sm_ip_end_points_local_nonprimitive);
- pcf_sm_ip_end_pointsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(pcf_sm_ip_end_points_local_nonprimitive, pcf_sm_ip_end_points ) {
- if (!cJSON_IsObject(pcf_sm_ip_end_points_local_nonprimitive)) {
- ogs_error("OpenAPI_binding_resp_parseFromJSON() failed [pcf_sm_ip_end_points]");
- goto end;
- }
- OpenAPI_ip_end_point_t *pcf_sm_ip_end_pointsItem = OpenAPI_ip_end_point_parseFromJSON(pcf_sm_ip_end_points_local_nonprimitive);
-
- OpenAPI_list_add(pcf_sm_ip_end_pointsList, pcf_sm_ip_end_pointsItem);
- }
+ OpenAPI_list_add(pcf_sm_ip_end_pointsList, pcf_sm_ip_end_pointsItem);
+ }
}
binding_resp_local_var = OpenAPI_binding_resp_create (
pcf_sm_fqdn ? ogs_strdup_or_assert(pcf_sm_fqdn->valuestring) : NULL,
pcf_sm_ip_end_points ? pcf_sm_ip_end_pointsList : NULL
- );
+ );
return binding_resp_local_var;
end:
diff --git a/lib/sbi/openapi/model/binding_resp.h b/lib/sbi/openapi/model/binding_resp.h
index d56a6ec6c..cffc3f42f 100644
--- a/lib/sbi/openapi/model/binding_resp.h
+++ b/lib/sbi/openapi/model/binding_resp.h
@@ -1,7 +1,7 @@
/*
* binding_resp.h
*
- *
+ *
*/
#ifndef _OpenAPI_binding_resp_H_
@@ -27,7 +27,7 @@ typedef struct OpenAPI_binding_resp_s {
OpenAPI_binding_resp_t *OpenAPI_binding_resp_create(
char *pcf_sm_fqdn,
OpenAPI_list_t *pcf_sm_ip_end_points
- );
+);
void OpenAPI_binding_resp_free(OpenAPI_binding_resp_t *binding_resp);
OpenAPI_binding_resp_t *OpenAPI_binding_resp_parseFromJSON(cJSON *binding_respJSON);
cJSON *OpenAPI_binding_resp_convertToJSON(OpenAPI_binding_resp_t *binding_resp);
diff --git a/lib/sbi/openapi/model/bridge_management_container.c b/lib/sbi/openapi/model/bridge_management_container.c
new file mode 100644
index 000000000..314d863aa
--- /dev/null
+++ b/lib/sbi/openapi/model/bridge_management_container.c
@@ -0,0 +1,105 @@
+
+#include
+#include
+#include
+#include "bridge_management_container.h"
+
+OpenAPI_bridge_management_container_t *OpenAPI_bridge_management_container_create(
+ char bridge_man_cont
+)
+{
+ OpenAPI_bridge_management_container_t *bridge_management_container_local_var = OpenAPI_malloc(sizeof(OpenAPI_bridge_management_container_t));
+ if (!bridge_management_container_local_var) {
+ return NULL;
+ }
+ bridge_management_container_local_var->bridge_man_cont = bridge_man_cont;
+
+ return bridge_management_container_local_var;
+}
+
+void OpenAPI_bridge_management_container_free(OpenAPI_bridge_management_container_t *bridge_management_container)
+{
+ if (NULL == bridge_management_container) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ ogs_free(bridge_management_container);
+}
+
+cJSON *OpenAPI_bridge_management_container_convertToJSON(OpenAPI_bridge_management_container_t *bridge_management_container)
+{
+ cJSON *item = NULL;
+
+ if (bridge_management_container == NULL) {
+ ogs_error("OpenAPI_bridge_management_container_convertToJSON() failed [BridgeManagementContainer]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (cJSON_AddNumberToObject(item, "bridgeManCont", bridge_management_container->bridge_man_cont) == NULL) {
+ ogs_error("OpenAPI_bridge_management_container_convertToJSON() failed [bridge_man_cont]");
+ goto end;
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_bridge_management_container_t *OpenAPI_bridge_management_container_parseFromJSON(cJSON *bridge_management_containerJSON)
+{
+ OpenAPI_bridge_management_container_t *bridge_management_container_local_var = NULL;
+ cJSON *bridge_man_cont = cJSON_GetObjectItemCaseSensitive(bridge_management_containerJSON, "bridgeManCont");
+ if (!bridge_man_cont) {
+ ogs_error("OpenAPI_bridge_management_container_parseFromJSON() failed [bridge_man_cont]");
+ goto end;
+ }
+
+
+ if (!cJSON_IsNumber(bridge_man_cont)) {
+ ogs_error("OpenAPI_bridge_management_container_parseFromJSON() failed [bridge_man_cont]");
+ goto end;
+ }
+
+ bridge_management_container_local_var = OpenAPI_bridge_management_container_create (
+ bridge_man_cont->valueint
+ );
+
+ return bridge_management_container_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_bridge_management_container_t *OpenAPI_bridge_management_container_copy(OpenAPI_bridge_management_container_t *dst, OpenAPI_bridge_management_container_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_bridge_management_container_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_bridge_management_container_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_bridge_management_container_free(dst);
+ dst = OpenAPI_bridge_management_container_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/bridge_management_container.h b/lib/sbi/openapi/model/bridge_management_container.h
new file mode 100644
index 000000000..2a80a48a1
--- /dev/null
+++ b/lib/sbi/openapi/model/bridge_management_container.h
@@ -0,0 +1,38 @@
+/*
+ * bridge_management_container.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_bridge_management_container_H_
+#define _OpenAPI_bridge_management_container_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_bridge_management_container_s OpenAPI_bridge_management_container_t;
+typedef struct OpenAPI_bridge_management_container_s {
+ char bridge_man_cont;
+} OpenAPI_bridge_management_container_t;
+
+OpenAPI_bridge_management_container_t *OpenAPI_bridge_management_container_create(
+ char bridge_man_cont
+);
+void OpenAPI_bridge_management_container_free(OpenAPI_bridge_management_container_t *bridge_management_container);
+OpenAPI_bridge_management_container_t *OpenAPI_bridge_management_container_parseFromJSON(cJSON *bridge_management_containerJSON);
+cJSON *OpenAPI_bridge_management_container_convertToJSON(OpenAPI_bridge_management_container_t *bridge_management_container);
+OpenAPI_bridge_management_container_t *OpenAPI_bridge_management_container_copy(OpenAPI_bridge_management_container_t *dst, OpenAPI_bridge_management_container_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_bridge_management_container_H_ */
+
diff --git a/lib/sbi/openapi/model/bsf_info.c b/lib/sbi/openapi/model/bsf_info.c
index b84083c34..3ca47ca46 100644
--- a/lib/sbi/openapi/model/bsf_info.c
+++ b/lib/sbi/openapi/model/bsf_info.c
@@ -9,7 +9,7 @@ OpenAPI_bsf_info_t *OpenAPI_bsf_info_create(
OpenAPI_list_t *ip_domain_list,
OpenAPI_list_t *ipv4_address_ranges,
OpenAPI_list_t *ipv6_prefix_ranges
- )
+)
{
OpenAPI_bsf_info_t *bsf_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_bsf_info_t));
if (!bsf_info_local_var) {
@@ -59,76 +59,76 @@ cJSON *OpenAPI_bsf_info_convertToJSON(OpenAPI_bsf_info_t *bsf_info)
item = cJSON_CreateObject();
if (bsf_info->dnn_list) {
- cJSON *dnn_list = cJSON_AddArrayToObject(item, "dnnList");
- if (dnn_list == NULL) {
- ogs_error("OpenAPI_bsf_info_convertToJSON() failed [dnn_list]");
- goto end;
- }
+ cJSON *dnn_list = cJSON_AddArrayToObject(item, "dnnList");
+ if (dnn_list == NULL) {
+ ogs_error("OpenAPI_bsf_info_convertToJSON() failed [dnn_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *dnn_list_node;
- OpenAPI_list_for_each(bsf_info->dnn_list, dnn_list_node) {
- if (cJSON_AddStringToObject(dnn_list, "", (char*)dnn_list_node->data) == NULL) {
- ogs_error("OpenAPI_bsf_info_convertToJSON() failed [dnn_list]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *dnn_list_node;
+ OpenAPI_list_for_each(bsf_info->dnn_list, dnn_list_node) {
+ if (cJSON_AddStringToObject(dnn_list, "", (char*)dnn_list_node->data) == NULL) {
+ ogs_error("OpenAPI_bsf_info_convertToJSON() failed [dnn_list]");
+ goto end;
+ }
+ }
}
if (bsf_info->ip_domain_list) {
- cJSON *ip_domain_list = cJSON_AddArrayToObject(item, "ipDomainList");
- if (ip_domain_list == NULL) {
- ogs_error("OpenAPI_bsf_info_convertToJSON() failed [ip_domain_list]");
- goto end;
- }
+ cJSON *ip_domain_list = cJSON_AddArrayToObject(item, "ipDomainList");
+ if (ip_domain_list == NULL) {
+ ogs_error("OpenAPI_bsf_info_convertToJSON() failed [ip_domain_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *ip_domain_list_node;
- OpenAPI_list_for_each(bsf_info->ip_domain_list, ip_domain_list_node) {
- if (cJSON_AddStringToObject(ip_domain_list, "", (char*)ip_domain_list_node->data) == NULL) {
- ogs_error("OpenAPI_bsf_info_convertToJSON() failed [ip_domain_list]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *ip_domain_list_node;
+ OpenAPI_list_for_each(bsf_info->ip_domain_list, ip_domain_list_node) {
+ if (cJSON_AddStringToObject(ip_domain_list, "", (char*)ip_domain_list_node->data) == NULL) {
+ ogs_error("OpenAPI_bsf_info_convertToJSON() failed [ip_domain_list]");
+ goto end;
+ }
+ }
}
if (bsf_info->ipv4_address_ranges) {
- cJSON *ipv4_address_rangesList = cJSON_AddArrayToObject(item, "ipv4AddressRanges");
- if (ipv4_address_rangesList == NULL) {
- ogs_error("OpenAPI_bsf_info_convertToJSON() failed [ipv4_address_ranges]");
- goto end;
- }
+ cJSON *ipv4_address_rangesList = cJSON_AddArrayToObject(item, "ipv4AddressRanges");
+ if (ipv4_address_rangesList == NULL) {
+ ogs_error("OpenAPI_bsf_info_convertToJSON() failed [ipv4_address_ranges]");
+ goto end;
+ }
- OpenAPI_lnode_t *ipv4_address_ranges_node;
- if (bsf_info->ipv4_address_ranges) {
- OpenAPI_list_for_each(bsf_info->ipv4_address_ranges, ipv4_address_ranges_node) {
- cJSON *itemLocal = OpenAPI_ipv4_address_range_convertToJSON(ipv4_address_ranges_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_bsf_info_convertToJSON() failed [ipv4_address_ranges]");
- goto end;
- }
- cJSON_AddItemToArray(ipv4_address_rangesList, itemLocal);
+ OpenAPI_lnode_t *ipv4_address_ranges_node;
+ if (bsf_info->ipv4_address_ranges) {
+ OpenAPI_list_for_each(bsf_info->ipv4_address_ranges, ipv4_address_ranges_node) {
+ cJSON *itemLocal = OpenAPI_ipv4_address_range_convertToJSON(ipv4_address_ranges_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_bsf_info_convertToJSON() failed [ipv4_address_ranges]");
+ goto end;
}
+ cJSON_AddItemToArray(ipv4_address_rangesList, itemLocal);
}
}
+ }
if (bsf_info->ipv6_prefix_ranges) {
- cJSON *ipv6_prefix_rangesList = cJSON_AddArrayToObject(item, "ipv6PrefixRanges");
- if (ipv6_prefix_rangesList == NULL) {
- ogs_error("OpenAPI_bsf_info_convertToJSON() failed [ipv6_prefix_ranges]");
- goto end;
- }
+ cJSON *ipv6_prefix_rangesList = cJSON_AddArrayToObject(item, "ipv6PrefixRanges");
+ if (ipv6_prefix_rangesList == NULL) {
+ ogs_error("OpenAPI_bsf_info_convertToJSON() failed [ipv6_prefix_ranges]");
+ goto end;
+ }
- OpenAPI_lnode_t *ipv6_prefix_ranges_node;
- if (bsf_info->ipv6_prefix_ranges) {
- OpenAPI_list_for_each(bsf_info->ipv6_prefix_ranges, ipv6_prefix_ranges_node) {
- cJSON *itemLocal = OpenAPI_ipv6_prefix_range_convertToJSON(ipv6_prefix_ranges_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_bsf_info_convertToJSON() failed [ipv6_prefix_ranges]");
- goto end;
- }
- cJSON_AddItemToArray(ipv6_prefix_rangesList, itemLocal);
+ OpenAPI_lnode_t *ipv6_prefix_ranges_node;
+ if (bsf_info->ipv6_prefix_ranges) {
+ OpenAPI_list_for_each(bsf_info->ipv6_prefix_ranges, ipv6_prefix_ranges_node) {
+ cJSON *itemLocal = OpenAPI_ipv6_prefix_range_convertToJSON(ipv6_prefix_ranges_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_bsf_info_convertToJSON() failed [ipv6_prefix_ranges]");
+ goto end;
}
+ cJSON_AddItemToArray(ipv6_prefix_rangesList, itemLocal);
}
}
+ }
end:
return item;
@@ -140,87 +140,87 @@ OpenAPI_bsf_info_t *OpenAPI_bsf_info_parseFromJSON(cJSON *bsf_infoJSON)
cJSON *dnn_list = cJSON_GetObjectItemCaseSensitive(bsf_infoJSON, "dnnList");
OpenAPI_list_t *dnn_listList;
- if (dnn_list) {
- cJSON *dnn_list_local;
- if (!cJSON_IsArray(dnn_list)) {
- ogs_error("OpenAPI_bsf_info_parseFromJSON() failed [dnn_list]");
- goto end;
- }
- dnn_listList = OpenAPI_list_create();
+ if (dnn_list) {
+ cJSON *dnn_list_local;
+ if (!cJSON_IsArray(dnn_list)) {
+ ogs_error("OpenAPI_bsf_info_parseFromJSON() failed [dnn_list]");
+ goto end;
+ }
+ dnn_listList = OpenAPI_list_create();
- cJSON_ArrayForEach(dnn_list_local, dnn_list) {
- if (!cJSON_IsString(dnn_list_local)) {
- ogs_error("OpenAPI_bsf_info_parseFromJSON() failed [dnn_list]");
- goto end;
- }
- OpenAPI_list_add(dnn_listList, ogs_strdup_or_assert(dnn_list_local->valuestring));
- }
+ cJSON_ArrayForEach(dnn_list_local, dnn_list) {
+ if (!cJSON_IsString(dnn_list_local)) {
+ ogs_error("OpenAPI_bsf_info_parseFromJSON() failed [dnn_list]");
+ goto end;
+ }
+ OpenAPI_list_add(dnn_listList , ogs_strdup_or_assert(dnn_list_local->valuestring));
+ }
}
cJSON *ip_domain_list = cJSON_GetObjectItemCaseSensitive(bsf_infoJSON, "ipDomainList");
OpenAPI_list_t *ip_domain_listList;
- if (ip_domain_list) {
- cJSON *ip_domain_list_local;
- if (!cJSON_IsArray(ip_domain_list)) {
- ogs_error("OpenAPI_bsf_info_parseFromJSON() failed [ip_domain_list]");
- goto end;
- }
- ip_domain_listList = OpenAPI_list_create();
+ if (ip_domain_list) {
+ cJSON *ip_domain_list_local;
+ if (!cJSON_IsArray(ip_domain_list)) {
+ ogs_error("OpenAPI_bsf_info_parseFromJSON() failed [ip_domain_list]");
+ goto end;
+ }
+ ip_domain_listList = OpenAPI_list_create();
- cJSON_ArrayForEach(ip_domain_list_local, ip_domain_list) {
- if (!cJSON_IsString(ip_domain_list_local)) {
- ogs_error("OpenAPI_bsf_info_parseFromJSON() failed [ip_domain_list]");
- goto end;
- }
- OpenAPI_list_add(ip_domain_listList, ogs_strdup_or_assert(ip_domain_list_local->valuestring));
- }
+ cJSON_ArrayForEach(ip_domain_list_local, ip_domain_list) {
+ if (!cJSON_IsString(ip_domain_list_local)) {
+ ogs_error("OpenAPI_bsf_info_parseFromJSON() failed [ip_domain_list]");
+ goto end;
+ }
+ OpenAPI_list_add(ip_domain_listList , ogs_strdup_or_assert(ip_domain_list_local->valuestring));
+ }
}
cJSON *ipv4_address_ranges = cJSON_GetObjectItemCaseSensitive(bsf_infoJSON, "ipv4AddressRanges");
OpenAPI_list_t *ipv4_address_rangesList;
- if (ipv4_address_ranges) {
- cJSON *ipv4_address_ranges_local_nonprimitive;
- if (!cJSON_IsArray(ipv4_address_ranges)) {
+ if (ipv4_address_ranges) {
+ cJSON *ipv4_address_ranges_local_nonprimitive;
+ if (!cJSON_IsArray(ipv4_address_ranges)){
+ ogs_error("OpenAPI_bsf_info_parseFromJSON() failed [ipv4_address_ranges]");
+ goto end;
+ }
+
+ ipv4_address_rangesList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(ipv4_address_ranges_local_nonprimitive, ipv4_address_ranges ) {
+ if (!cJSON_IsObject(ipv4_address_ranges_local_nonprimitive)) {
ogs_error("OpenAPI_bsf_info_parseFromJSON() failed [ipv4_address_ranges]");
goto end;
}
+ OpenAPI_ipv4_address_range_t *ipv4_address_rangesItem = OpenAPI_ipv4_address_range_parseFromJSON(ipv4_address_ranges_local_nonprimitive);
- ipv4_address_rangesList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(ipv4_address_ranges_local_nonprimitive, ipv4_address_ranges ) {
- if (!cJSON_IsObject(ipv4_address_ranges_local_nonprimitive)) {
- ogs_error("OpenAPI_bsf_info_parseFromJSON() failed [ipv4_address_ranges]");
- goto end;
- }
- OpenAPI_ipv4_address_range_t *ipv4_address_rangesItem = OpenAPI_ipv4_address_range_parseFromJSON(ipv4_address_ranges_local_nonprimitive);
-
- OpenAPI_list_add(ipv4_address_rangesList, ipv4_address_rangesItem);
- }
+ OpenAPI_list_add(ipv4_address_rangesList, ipv4_address_rangesItem);
+ }
}
cJSON *ipv6_prefix_ranges = cJSON_GetObjectItemCaseSensitive(bsf_infoJSON, "ipv6PrefixRanges");
OpenAPI_list_t *ipv6_prefix_rangesList;
- if (ipv6_prefix_ranges) {
- cJSON *ipv6_prefix_ranges_local_nonprimitive;
- if (!cJSON_IsArray(ipv6_prefix_ranges)) {
+ if (ipv6_prefix_ranges) {
+ cJSON *ipv6_prefix_ranges_local_nonprimitive;
+ if (!cJSON_IsArray(ipv6_prefix_ranges)){
+ ogs_error("OpenAPI_bsf_info_parseFromJSON() failed [ipv6_prefix_ranges]");
+ goto end;
+ }
+
+ ipv6_prefix_rangesList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(ipv6_prefix_ranges_local_nonprimitive, ipv6_prefix_ranges ) {
+ if (!cJSON_IsObject(ipv6_prefix_ranges_local_nonprimitive)) {
ogs_error("OpenAPI_bsf_info_parseFromJSON() failed [ipv6_prefix_ranges]");
goto end;
}
+ OpenAPI_ipv6_prefix_range_t *ipv6_prefix_rangesItem = OpenAPI_ipv6_prefix_range_parseFromJSON(ipv6_prefix_ranges_local_nonprimitive);
- ipv6_prefix_rangesList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(ipv6_prefix_ranges_local_nonprimitive, ipv6_prefix_ranges ) {
- if (!cJSON_IsObject(ipv6_prefix_ranges_local_nonprimitive)) {
- ogs_error("OpenAPI_bsf_info_parseFromJSON() failed [ipv6_prefix_ranges]");
- goto end;
- }
- OpenAPI_ipv6_prefix_range_t *ipv6_prefix_rangesItem = OpenAPI_ipv6_prefix_range_parseFromJSON(ipv6_prefix_ranges_local_nonprimitive);
-
- OpenAPI_list_add(ipv6_prefix_rangesList, ipv6_prefix_rangesItem);
- }
+ OpenAPI_list_add(ipv6_prefix_rangesList, ipv6_prefix_rangesItem);
+ }
}
bsf_info_local_var = OpenAPI_bsf_info_create (
@@ -228,7 +228,7 @@ OpenAPI_bsf_info_t *OpenAPI_bsf_info_parseFromJSON(cJSON *bsf_infoJSON)
ip_domain_list ? ip_domain_listList : NULL,
ipv4_address_ranges ? ipv4_address_rangesList : NULL,
ipv6_prefix_ranges ? ipv6_prefix_rangesList : NULL
- );
+ );
return bsf_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/bsf_info.h b/lib/sbi/openapi/model/bsf_info.h
index dcbcf7b56..3db3feec5 100644
--- a/lib/sbi/openapi/model/bsf_info.h
+++ b/lib/sbi/openapi/model/bsf_info.h
@@ -32,7 +32,7 @@ OpenAPI_bsf_info_t *OpenAPI_bsf_info_create(
OpenAPI_list_t *ip_domain_list,
OpenAPI_list_t *ipv4_address_ranges,
OpenAPI_list_t *ipv6_prefix_ranges
- );
+);
void OpenAPI_bsf_info_free(OpenAPI_bsf_info_t *bsf_info);
OpenAPI_bsf_info_t *OpenAPI_bsf_info_parseFromJSON(cJSON *bsf_infoJSON);
cJSON *OpenAPI_bsf_info_convertToJSON(OpenAPI_bsf_info_t *bsf_info);
diff --git a/lib/sbi/openapi/model/cag_ack_data.c b/lib/sbi/openapi/model/cag_ack_data.c
index 4169bb928..cde085392 100644
--- a/lib/sbi/openapi/model/cag_ack_data.c
+++ b/lib/sbi/openapi/model/cag_ack_data.c
@@ -7,7 +7,7 @@
OpenAPI_cag_ack_data_t *OpenAPI_cag_ack_data_create(
char *provisioning_time,
OpenAPI_ue_update_status_e ue_update_status
- )
+)
{
OpenAPI_cag_ack_data_t *cag_ack_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_cag_ack_data_t));
if (!cag_ack_data_local_var) {
@@ -62,7 +62,7 @@ OpenAPI_cag_ack_data_t *OpenAPI_cag_ack_data_parseFromJSON(cJSON *cag_ack_dataJS
goto end;
}
-
+
if (!cJSON_IsString(provisioning_time)) {
ogs_error("OpenAPI_cag_ack_data_parseFromJSON() failed [provisioning_time]");
goto end;
@@ -75,7 +75,7 @@ OpenAPI_cag_ack_data_t *OpenAPI_cag_ack_data_parseFromJSON(cJSON *cag_ack_dataJS
}
OpenAPI_ue_update_status_e ue_update_statusVariable;
-
+
if (!cJSON_IsString(ue_update_status)) {
ogs_error("OpenAPI_cag_ack_data_parseFromJSON() failed [ue_update_status]");
goto end;
@@ -85,7 +85,7 @@ OpenAPI_cag_ack_data_t *OpenAPI_cag_ack_data_parseFromJSON(cJSON *cag_ack_dataJS
cag_ack_data_local_var = OpenAPI_cag_ack_data_create (
ogs_strdup_or_assert(provisioning_time->valuestring),
ue_update_statusVariable
- );
+ );
return cag_ack_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/cag_ack_data.h b/lib/sbi/openapi/model/cag_ack_data.h
index de9b540fe..253377ab0 100644
--- a/lib/sbi/openapi/model/cag_ack_data.h
+++ b/lib/sbi/openapi/model/cag_ack_data.h
@@ -1,7 +1,7 @@
/*
* cag_ack_data.h
*
- *
+ *
*/
#ifndef _OpenAPI_cag_ack_data_H_
@@ -27,7 +27,7 @@ typedef struct OpenAPI_cag_ack_data_s {
OpenAPI_cag_ack_data_t *OpenAPI_cag_ack_data_create(
char *provisioning_time,
OpenAPI_ue_update_status_e ue_update_status
- );
+);
void OpenAPI_cag_ack_data_free(OpenAPI_cag_ack_data_t *cag_ack_data);
OpenAPI_cag_ack_data_t *OpenAPI_cag_ack_data_parseFromJSON(cJSON *cag_ack_dataJSON);
cJSON *OpenAPI_cag_ack_data_convertToJSON(OpenAPI_cag_ack_data_t *cag_ack_data);
diff --git a/lib/sbi/openapi/model/cag_data.c b/lib/sbi/openapi/model/cag_data.c
index a31b23753..2b11e6ec5 100644
--- a/lib/sbi/openapi/model/cag_data.c
+++ b/lib/sbi/openapi/model/cag_data.c
@@ -7,7 +7,7 @@
OpenAPI_cag_data_t *OpenAPI_cag_data_create(
OpenAPI_list_t* cag_infos,
char *provisioning_time
- )
+)
{
OpenAPI_cag_data_t *cag_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_cag_data_t));
if (!cag_data_local_var) {
@@ -55,20 +55,20 @@ cJSON *OpenAPI_cag_data_convertToJSON(OpenAPI_cag_data_t *cag_data)
if (cag_data->cag_infos) {
OpenAPI_list_for_each(cag_data->cag_infos, cag_infos_node) {
OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)cag_infos_node->data;
- cJSON *itemLocal = OpenAPI_cag_info_convertToJSON(localKeyValue->value);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_cag_data_convertToJSON() failed [cag_infos]");
- goto end;
- }
- cJSON_AddItemToObject(cag_infos, localKeyValue->key, itemLocal);
- }
- }
-
- if (cag_data->provisioning_time) {
- if (cJSON_AddStringToObject(item, "provisioningTime", cag_data->provisioning_time) == NULL) {
- ogs_error("OpenAPI_cag_data_convertToJSON() failed [provisioning_time]");
+ cJSON *itemLocal = OpenAPI_cag_info_convertToJSON(localKeyValue->value);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_cag_data_convertToJSON() failed [cag_infos]");
goto end;
}
+ cJSON_AddItemToObject(cag_infos, localKeyValue->key, itemLocal);
+ }
+ }
+
+ if (cag_data->provisioning_time) {
+ if (cJSON_AddStringToObject(item, "provisioningTime", cag_data->provisioning_time) == NULL) {
+ ogs_error("OpenAPI_cag_data_convertToJSON() failed [provisioning_time]");
+ goto end;
+ }
}
end:
@@ -85,7 +85,7 @@ OpenAPI_cag_data_t *OpenAPI_cag_data_parseFromJSON(cJSON *cag_dataJSON)
}
OpenAPI_list_t *cag_infosList;
-
+
cJSON *cag_infos_local_map;
if (!cJSON_IsObject(cag_infos)) {
ogs_error("OpenAPI_cag_data_parseFromJSON() failed [cag_infos]");
@@ -101,22 +101,22 @@ OpenAPI_cag_data_t *OpenAPI_cag_data_parseFromJSON(cJSON *cag_dataJSON)
}
localMapKeyPair = OpenAPI_map_create(
localMapObject->string, OpenAPI_cag_info_parseFromJSON(localMapObject));
- OpenAPI_list_add(cag_infosList, localMapKeyPair);
+ OpenAPI_list_add(cag_infosList , localMapKeyPair);
}
cJSON *provisioning_time = cJSON_GetObjectItemCaseSensitive(cag_dataJSON, "provisioningTime");
- if (provisioning_time) {
- if (!cJSON_IsString(provisioning_time)) {
- ogs_error("OpenAPI_cag_data_parseFromJSON() failed [provisioning_time]");
- goto end;
- }
+ if (provisioning_time) {
+ if (!cJSON_IsString(provisioning_time)) {
+ ogs_error("OpenAPI_cag_data_parseFromJSON() failed [provisioning_time]");
+ goto end;
+ }
}
cag_data_local_var = OpenAPI_cag_data_create (
cag_infosList,
provisioning_time ? ogs_strdup_or_assert(provisioning_time->valuestring) : NULL
- );
+ );
return cag_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/cag_data.h b/lib/sbi/openapi/model/cag_data.h
index cf4c6b4e5..f43d4dc09 100644
--- a/lib/sbi/openapi/model/cag_data.h
+++ b/lib/sbi/openapi/model/cag_data.h
@@ -1,7 +1,7 @@
/*
* cag_data.h
*
- *
+ *
*/
#ifndef _OpenAPI_cag_data_H_
@@ -27,7 +27,7 @@ typedef struct OpenAPI_cag_data_s {
OpenAPI_cag_data_t *OpenAPI_cag_data_create(
OpenAPI_list_t* cag_infos,
char *provisioning_time
- );
+);
void OpenAPI_cag_data_free(OpenAPI_cag_data_t *cag_data);
OpenAPI_cag_data_t *OpenAPI_cag_data_parseFromJSON(cJSON *cag_dataJSON);
cJSON *OpenAPI_cag_data_convertToJSON(OpenAPI_cag_data_t *cag_data);
diff --git a/lib/sbi/openapi/model/cag_data_1.c b/lib/sbi/openapi/model/cag_data_1.c
new file mode 100644
index 000000000..2cc52ad59
--- /dev/null
+++ b/lib/sbi/openapi/model/cag_data_1.c
@@ -0,0 +1,159 @@
+
+#include
+#include
+#include
+#include "cag_data_1.h"
+
+OpenAPI_cag_data_1_t *OpenAPI_cag_data_1_create(
+ OpenAPI_list_t* cag_infos,
+ char *provisioning_time
+)
+{
+ OpenAPI_cag_data_1_t *cag_data_1_local_var = OpenAPI_malloc(sizeof(OpenAPI_cag_data_1_t));
+ if (!cag_data_1_local_var) {
+ return NULL;
+ }
+ cag_data_1_local_var->cag_infos = cag_infos;
+ cag_data_1_local_var->provisioning_time = provisioning_time;
+
+ return cag_data_1_local_var;
+}
+
+void OpenAPI_cag_data_1_free(OpenAPI_cag_data_1_t *cag_data_1)
+{
+ if (NULL == cag_data_1) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ OpenAPI_list_for_each(cag_data_1->cag_infos, node) {
+ OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)node->data;
+ OpenAPI_cag_info_1_free(localKeyValue->value);
+ ogs_free(localKeyValue);
+ }
+ OpenAPI_list_free(cag_data_1->cag_infos);
+ ogs_free(cag_data_1->provisioning_time);
+ ogs_free(cag_data_1);
+}
+
+cJSON *OpenAPI_cag_data_1_convertToJSON(OpenAPI_cag_data_1_t *cag_data_1)
+{
+ cJSON *item = NULL;
+
+ if (cag_data_1 == NULL) {
+ ogs_error("OpenAPI_cag_data_1_convertToJSON() failed [CagData_1]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ cJSON *cag_infos = cJSON_AddObjectToObject(item, "cagInfos");
+ if (cag_infos == NULL) {
+ ogs_error("OpenAPI_cag_data_1_convertToJSON() failed [cag_infos]");
+ goto end;
+ }
+ cJSON *localMapObject = cag_infos;
+ OpenAPI_lnode_t *cag_infos_node;
+ if (cag_data_1->cag_infos) {
+ OpenAPI_list_for_each(cag_data_1->cag_infos, cag_infos_node) {
+ OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)cag_infos_node->data;
+ cJSON *itemLocal = OpenAPI_cag_info_1_convertToJSON(localKeyValue->value);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_cag_data_1_convertToJSON() failed [cag_infos]");
+ goto end;
+ }
+ cJSON_AddItemToObject(cag_infos, localKeyValue->key, itemLocal);
+ }
+ }
+
+ if (cag_data_1->provisioning_time) {
+ if (cJSON_AddStringToObject(item, "provisioningTime", cag_data_1->provisioning_time) == NULL) {
+ ogs_error("OpenAPI_cag_data_1_convertToJSON() failed [provisioning_time]");
+ goto end;
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_cag_data_1_t *OpenAPI_cag_data_1_parseFromJSON(cJSON *cag_data_1JSON)
+{
+ OpenAPI_cag_data_1_t *cag_data_1_local_var = NULL;
+ cJSON *cag_infos = cJSON_GetObjectItemCaseSensitive(cag_data_1JSON, "cagInfos");
+ if (!cag_infos) {
+ ogs_error("OpenAPI_cag_data_1_parseFromJSON() failed [cag_infos]");
+ goto end;
+ }
+
+ OpenAPI_list_t *cag_infosList;
+
+ cJSON *cag_infos_local_map;
+ if (!cJSON_IsObject(cag_infos)) {
+ ogs_error("OpenAPI_cag_data_1_parseFromJSON() failed [cag_infos]");
+ goto end;
+ }
+ cag_infosList = OpenAPI_list_create();
+ OpenAPI_map_t *localMapKeyPair = NULL;
+ cJSON_ArrayForEach(cag_infos_local_map, cag_infos) {
+ cJSON *localMapObject = cag_infos_local_map;
+ if (!cJSON_IsObject(cag_infos_local_map)) {
+ ogs_error("OpenAPI_cag_data_1_parseFromJSON() failed [cag_infos]");
+ goto end;
+ }
+ localMapKeyPair = OpenAPI_map_create(
+ localMapObject->string, OpenAPI_cag_info_1_parseFromJSON(localMapObject));
+ OpenAPI_list_add(cag_infosList , localMapKeyPair);
+ }
+
+ cJSON *provisioning_time = cJSON_GetObjectItemCaseSensitive(cag_data_1JSON, "provisioningTime");
+
+ if (provisioning_time) {
+ if (!cJSON_IsString(provisioning_time)) {
+ ogs_error("OpenAPI_cag_data_1_parseFromJSON() failed [provisioning_time]");
+ goto end;
+ }
+ }
+
+ cag_data_1_local_var = OpenAPI_cag_data_1_create (
+ cag_infosList,
+ provisioning_time ? ogs_strdup_or_assert(provisioning_time->valuestring) : NULL
+ );
+
+ return cag_data_1_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_cag_data_1_t *OpenAPI_cag_data_1_copy(OpenAPI_cag_data_1_t *dst, OpenAPI_cag_data_1_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_cag_data_1_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_cag_data_1_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_cag_data_1_free(dst);
+ dst = OpenAPI_cag_data_1_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/cag_data_1.h b/lib/sbi/openapi/model/cag_data_1.h
new file mode 100644
index 000000000..a9dcf44f6
--- /dev/null
+++ b/lib/sbi/openapi/model/cag_data_1.h
@@ -0,0 +1,41 @@
+/*
+ * cag_data_1.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_cag_data_1_H_
+#define _OpenAPI_cag_data_1_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+#include "cag_info_1.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_cag_data_1_s OpenAPI_cag_data_1_t;
+typedef struct OpenAPI_cag_data_1_s {
+ OpenAPI_list_t* cag_infos;
+ char *provisioning_time;
+} OpenAPI_cag_data_1_t;
+
+OpenAPI_cag_data_1_t *OpenAPI_cag_data_1_create(
+ OpenAPI_list_t* cag_infos,
+ char *provisioning_time
+);
+void OpenAPI_cag_data_1_free(OpenAPI_cag_data_1_t *cag_data_1);
+OpenAPI_cag_data_1_t *OpenAPI_cag_data_1_parseFromJSON(cJSON *cag_data_1JSON);
+cJSON *OpenAPI_cag_data_1_convertToJSON(OpenAPI_cag_data_1_t *cag_data_1);
+OpenAPI_cag_data_1_t *OpenAPI_cag_data_1_copy(OpenAPI_cag_data_1_t *dst, OpenAPI_cag_data_1_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_cag_data_1_H_ */
+
diff --git a/lib/sbi/openapi/model/cag_info.c b/lib/sbi/openapi/model/cag_info.c
index c798109a3..d39cab890 100644
--- a/lib/sbi/openapi/model/cag_info.c
+++ b/lib/sbi/openapi/model/cag_info.c
@@ -7,7 +7,7 @@
OpenAPI_cag_info_t *OpenAPI_cag_info_create(
OpenAPI_list_t *allowed_cag_list,
int cag_only_indicator
- )
+)
{
OpenAPI_cag_info_t *cag_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_cag_info_t));
if (!cag_info_local_var) {
@@ -50,17 +50,17 @@ cJSON *OpenAPI_cag_info_convertToJSON(OpenAPI_cag_info_t *cag_info)
OpenAPI_lnode_t *allowed_cag_list_node;
OpenAPI_list_for_each(cag_info->allowed_cag_list, allowed_cag_list_node) {
- if (cJSON_AddStringToObject(allowed_cag_list, "", (char*)allowed_cag_list_node->data) == NULL) {
- ogs_error("OpenAPI_cag_info_convertToJSON() failed [allowed_cag_list]");
- goto end;
- }
+ if (cJSON_AddStringToObject(allowed_cag_list, "", (char*)allowed_cag_list_node->data) == NULL) {
+ ogs_error("OpenAPI_cag_info_convertToJSON() failed [allowed_cag_list]");
+ goto end;
}
+ }
if (cag_info->cag_only_indicator) {
- if (cJSON_AddBoolToObject(item, "cagOnlyIndicator", cag_info->cag_only_indicator) == NULL) {
- ogs_error("OpenAPI_cag_info_convertToJSON() failed [cag_only_indicator]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "cagOnlyIndicator", cag_info->cag_only_indicator) == NULL) {
+ ogs_error("OpenAPI_cag_info_convertToJSON() failed [cag_only_indicator]");
+ goto end;
+ }
}
end:
@@ -77,7 +77,7 @@ OpenAPI_cag_info_t *OpenAPI_cag_info_parseFromJSON(cJSON *cag_infoJSON)
}
OpenAPI_list_t *allowed_cag_listList;
-
+
cJSON *allowed_cag_list_local;
if (!cJSON_IsArray(allowed_cag_list)) {
ogs_error("OpenAPI_cag_info_parseFromJSON() failed [allowed_cag_list]");
@@ -86,26 +86,26 @@ OpenAPI_cag_info_t *OpenAPI_cag_info_parseFromJSON(cJSON *cag_infoJSON)
allowed_cag_listList = OpenAPI_list_create();
cJSON_ArrayForEach(allowed_cag_list_local, allowed_cag_list) {
- if (!cJSON_IsString(allowed_cag_list_local)) {
- ogs_error("OpenAPI_cag_info_parseFromJSON() failed [allowed_cag_list]");
- goto end;
- }
- OpenAPI_list_add(allowed_cag_listList, ogs_strdup_or_assert(allowed_cag_list_local->valuestring));
+ if (!cJSON_IsString(allowed_cag_list_local)) {
+ ogs_error("OpenAPI_cag_info_parseFromJSON() failed [allowed_cag_list]");
+ goto end;
}
+ OpenAPI_list_add(allowed_cag_listList , ogs_strdup_or_assert(allowed_cag_list_local->valuestring));
+ }
cJSON *cag_only_indicator = cJSON_GetObjectItemCaseSensitive(cag_infoJSON, "cagOnlyIndicator");
- if (cag_only_indicator) {
- if (!cJSON_IsBool(cag_only_indicator)) {
- ogs_error("OpenAPI_cag_info_parseFromJSON() failed [cag_only_indicator]");
- goto end;
- }
+ if (cag_only_indicator) {
+ if (!cJSON_IsBool(cag_only_indicator)) {
+ ogs_error("OpenAPI_cag_info_parseFromJSON() failed [cag_only_indicator]");
+ goto end;
+ }
}
cag_info_local_var = OpenAPI_cag_info_create (
allowed_cag_listList,
cag_only_indicator ? cag_only_indicator->valueint : 0
- );
+ );
return cag_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/cag_info.h b/lib/sbi/openapi/model/cag_info.h
index 920a99baf..f03260b22 100644
--- a/lib/sbi/openapi/model/cag_info.h
+++ b/lib/sbi/openapi/model/cag_info.h
@@ -1,7 +1,7 @@
/*
* cag_info.h
*
- *
+ *
*/
#ifndef _OpenAPI_cag_info_H_
@@ -26,7 +26,7 @@ typedef struct OpenAPI_cag_info_s {
OpenAPI_cag_info_t *OpenAPI_cag_info_create(
OpenAPI_list_t *allowed_cag_list,
int cag_only_indicator
- );
+);
void OpenAPI_cag_info_free(OpenAPI_cag_info_t *cag_info);
OpenAPI_cag_info_t *OpenAPI_cag_info_parseFromJSON(cJSON *cag_infoJSON);
cJSON *OpenAPI_cag_info_convertToJSON(OpenAPI_cag_info_t *cag_info);
diff --git a/lib/sbi/openapi/model/cag_info_1.c b/lib/sbi/openapi/model/cag_info_1.c
new file mode 100644
index 000000000..3d57b896e
--- /dev/null
+++ b/lib/sbi/openapi/model/cag_info_1.c
@@ -0,0 +1,148 @@
+
+#include
+#include
+#include
+#include "cag_info_1.h"
+
+OpenAPI_cag_info_1_t *OpenAPI_cag_info_1_create(
+ OpenAPI_list_t *allowed_cag_list,
+ int cag_only_indicator
+)
+{
+ OpenAPI_cag_info_1_t *cag_info_1_local_var = OpenAPI_malloc(sizeof(OpenAPI_cag_info_1_t));
+ if (!cag_info_1_local_var) {
+ return NULL;
+ }
+ cag_info_1_local_var->allowed_cag_list = allowed_cag_list;
+ cag_info_1_local_var->cag_only_indicator = cag_only_indicator;
+
+ return cag_info_1_local_var;
+}
+
+void OpenAPI_cag_info_1_free(OpenAPI_cag_info_1_t *cag_info_1)
+{
+ if (NULL == cag_info_1) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ OpenAPI_list_for_each(cag_info_1->allowed_cag_list, node) {
+ ogs_free(node->data);
+ }
+ OpenAPI_list_free(cag_info_1->allowed_cag_list);
+ ogs_free(cag_info_1);
+}
+
+cJSON *OpenAPI_cag_info_1_convertToJSON(OpenAPI_cag_info_1_t *cag_info_1)
+{
+ cJSON *item = NULL;
+
+ if (cag_info_1 == NULL) {
+ ogs_error("OpenAPI_cag_info_1_convertToJSON() failed [CagInfo_1]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ cJSON *allowed_cag_list = cJSON_AddArrayToObject(item, "allowedCagList");
+ if (allowed_cag_list == NULL) {
+ ogs_error("OpenAPI_cag_info_1_convertToJSON() failed [allowed_cag_list]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *allowed_cag_list_node;
+ OpenAPI_list_for_each(cag_info_1->allowed_cag_list, allowed_cag_list_node) {
+ if (cJSON_AddStringToObject(allowed_cag_list, "", (char*)allowed_cag_list_node->data) == NULL) {
+ ogs_error("OpenAPI_cag_info_1_convertToJSON() failed [allowed_cag_list]");
+ goto end;
+ }
+ }
+
+ if (cag_info_1->cag_only_indicator) {
+ if (cJSON_AddBoolToObject(item, "cagOnlyIndicator", cag_info_1->cag_only_indicator) == NULL) {
+ ogs_error("OpenAPI_cag_info_1_convertToJSON() failed [cag_only_indicator]");
+ goto end;
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_cag_info_1_t *OpenAPI_cag_info_1_parseFromJSON(cJSON *cag_info_1JSON)
+{
+ OpenAPI_cag_info_1_t *cag_info_1_local_var = NULL;
+ cJSON *allowed_cag_list = cJSON_GetObjectItemCaseSensitive(cag_info_1JSON, "allowedCagList");
+ if (!allowed_cag_list) {
+ ogs_error("OpenAPI_cag_info_1_parseFromJSON() failed [allowed_cag_list]");
+ goto end;
+ }
+
+ OpenAPI_list_t *allowed_cag_listList;
+
+ cJSON *allowed_cag_list_local;
+ if (!cJSON_IsArray(allowed_cag_list)) {
+ ogs_error("OpenAPI_cag_info_1_parseFromJSON() failed [allowed_cag_list]");
+ goto end;
+ }
+ allowed_cag_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(allowed_cag_list_local, allowed_cag_list) {
+ if (!cJSON_IsString(allowed_cag_list_local)) {
+ ogs_error("OpenAPI_cag_info_1_parseFromJSON() failed [allowed_cag_list]");
+ goto end;
+ }
+ OpenAPI_list_add(allowed_cag_listList , ogs_strdup_or_assert(allowed_cag_list_local->valuestring));
+ }
+
+ cJSON *cag_only_indicator = cJSON_GetObjectItemCaseSensitive(cag_info_1JSON, "cagOnlyIndicator");
+
+ if (cag_only_indicator) {
+ if (!cJSON_IsBool(cag_only_indicator)) {
+ ogs_error("OpenAPI_cag_info_1_parseFromJSON() failed [cag_only_indicator]");
+ goto end;
+ }
+ }
+
+ cag_info_1_local_var = OpenAPI_cag_info_1_create (
+ allowed_cag_listList,
+ cag_only_indicator ? cag_only_indicator->valueint : 0
+ );
+
+ return cag_info_1_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_cag_info_1_t *OpenAPI_cag_info_1_copy(OpenAPI_cag_info_1_t *dst, OpenAPI_cag_info_1_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_cag_info_1_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_cag_info_1_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_cag_info_1_free(dst);
+ dst = OpenAPI_cag_info_1_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/cag_info_1.h b/lib/sbi/openapi/model/cag_info_1.h
new file mode 100644
index 000000000..688c937a4
--- /dev/null
+++ b/lib/sbi/openapi/model/cag_info_1.h
@@ -0,0 +1,40 @@
+/*
+ * cag_info_1.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_cag_info_1_H_
+#define _OpenAPI_cag_info_1_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_cag_info_1_s OpenAPI_cag_info_1_t;
+typedef struct OpenAPI_cag_info_1_s {
+ OpenAPI_list_t *allowed_cag_list;
+ int cag_only_indicator;
+} OpenAPI_cag_info_1_t;
+
+OpenAPI_cag_info_1_t *OpenAPI_cag_info_1_create(
+ OpenAPI_list_t *allowed_cag_list,
+ int cag_only_indicator
+);
+void OpenAPI_cag_info_1_free(OpenAPI_cag_info_1_t *cag_info_1);
+OpenAPI_cag_info_1_t *OpenAPI_cag_info_1_parseFromJSON(cJSON *cag_info_1JSON);
+cJSON *OpenAPI_cag_info_1_convertToJSON(OpenAPI_cag_info_1_t *cag_info_1);
+OpenAPI_cag_info_1_t *OpenAPI_cag_info_1_copy(OpenAPI_cag_info_1_t *dst, OpenAPI_cag_info_1_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_cag_info_1_H_ */
+
diff --git a/lib/sbi/openapi/model/candidate_for_replacement.c b/lib/sbi/openapi/model/candidate_for_replacement.c
index aaa5a762d..63e965f81 100644
--- a/lib/sbi/openapi/model/candidate_for_replacement.c
+++ b/lib/sbi/openapi/model/candidate_for_replacement.c
@@ -7,7 +7,7 @@
OpenAPI_candidate_for_replacement_t *OpenAPI_candidate_for_replacement_create(
OpenAPI_snssai_t *snssai,
OpenAPI_list_t *dnns
- )
+)
{
OpenAPI_candidate_for_replacement_t *candidate_for_replacement_local_var = OpenAPI_malloc(sizeof(OpenAPI_candidate_for_replacement_t));
if (!candidate_for_replacement_local_var) {
@@ -55,19 +55,19 @@ cJSON *OpenAPI_candidate_for_replacement_convertToJSON(OpenAPI_candidate_for_rep
}
if (candidate_for_replacement->dnns) {
- cJSON *dnns = cJSON_AddArrayToObject(item, "dnns");
- if (dnns == NULL) {
- ogs_error("OpenAPI_candidate_for_replacement_convertToJSON() failed [dnns]");
- goto end;
- }
+ cJSON *dnns = cJSON_AddArrayToObject(item, "dnns");
+ if (dnns == NULL) {
+ ogs_error("OpenAPI_candidate_for_replacement_convertToJSON() failed [dnns]");
+ goto end;
+ }
- OpenAPI_lnode_t *dnns_node;
- OpenAPI_list_for_each(candidate_for_replacement->dnns, dnns_node) {
- if (cJSON_AddStringToObject(dnns, "", (char*)dnns_node->data) == NULL) {
- ogs_error("OpenAPI_candidate_for_replacement_convertToJSON() failed [dnns]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *dnns_node;
+ OpenAPI_list_for_each(candidate_for_replacement->dnns, dnns_node) {
+ if (cJSON_AddStringToObject(dnns, "", (char*)dnns_node->data) == NULL) {
+ ogs_error("OpenAPI_candidate_for_replacement_convertToJSON() failed [dnns]");
+ goto end;
+ }
+ }
}
end:
@@ -84,33 +84,33 @@ OpenAPI_candidate_for_replacement_t *OpenAPI_candidate_for_replacement_parseFrom
}
OpenAPI_snssai_t *snssai_local_nonprim = NULL;
-
+
snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai);
cJSON *dnns = cJSON_GetObjectItemCaseSensitive(candidate_for_replacementJSON, "dnns");
OpenAPI_list_t *dnnsList;
- if (dnns) {
- cJSON *dnns_local;
- if (!cJSON_IsArray(dnns)) {
- ogs_error("OpenAPI_candidate_for_replacement_parseFromJSON() failed [dnns]");
- goto end;
- }
- dnnsList = OpenAPI_list_create();
+ if (dnns) {
+ cJSON *dnns_local;
+ if (!cJSON_IsArray(dnns)) {
+ ogs_error("OpenAPI_candidate_for_replacement_parseFromJSON() failed [dnns]");
+ goto end;
+ }
+ dnnsList = OpenAPI_list_create();
- cJSON_ArrayForEach(dnns_local, dnns) {
- if (!cJSON_IsString(dnns_local)) {
- ogs_error("OpenAPI_candidate_for_replacement_parseFromJSON() failed [dnns]");
- goto end;
- }
- OpenAPI_list_add(dnnsList, ogs_strdup_or_assert(dnns_local->valuestring));
- }
+ cJSON_ArrayForEach(dnns_local, dnns) {
+ if (!cJSON_IsString(dnns_local)) {
+ ogs_error("OpenAPI_candidate_for_replacement_parseFromJSON() failed [dnns]");
+ goto end;
+ }
+ OpenAPI_list_add(dnnsList , ogs_strdup_or_assert(dnns_local->valuestring));
+ }
}
candidate_for_replacement_local_var = OpenAPI_candidate_for_replacement_create (
snssai_local_nonprim,
dnns ? dnnsList : NULL
- );
+ );
return candidate_for_replacement_local_var;
end:
diff --git a/lib/sbi/openapi/model/candidate_for_replacement.h b/lib/sbi/openapi/model/candidate_for_replacement.h
index b558b5501..09e1e9903 100644
--- a/lib/sbi/openapi/model/candidate_for_replacement.h
+++ b/lib/sbi/openapi/model/candidate_for_replacement.h
@@ -1,7 +1,7 @@
/*
* candidate_for_replacement.h
*
- *
+ *
*/
#ifndef _OpenAPI_candidate_for_replacement_H_
@@ -27,7 +27,7 @@ typedef struct OpenAPI_candidate_for_replacement_s {
OpenAPI_candidate_for_replacement_t *OpenAPI_candidate_for_replacement_create(
OpenAPI_snssai_t *snssai,
OpenAPI_list_t *dnns
- );
+);
void OpenAPI_candidate_for_replacement_free(OpenAPI_candidate_for_replacement_t *candidate_for_replacement);
OpenAPI_candidate_for_replacement_t *OpenAPI_candidate_for_replacement_parseFromJSON(cJSON *candidate_for_replacementJSON);
cJSON *OpenAPI_candidate_for_replacement_convertToJSON(OpenAPI_candidate_for_replacement_t *candidate_for_replacement);
diff --git a/lib/sbi/openapi/model/cause.c b/lib/sbi/openapi/model/cause.c
index 98be1feee..9d5606f5c 100644
--- a/lib/sbi/openapi/model/cause.c
+++ b/lib/sbi/openapi/model/cause.c
@@ -6,7 +6,7 @@
char* OpenAPI_cause_ToString(OpenAPI_cause_e cause)
{
- const char *causeArray[] = { "NULL", "REL_DUE_TO_HO", "EPS_FALLBACK", "REL_DUE_TO_UP_SEC", "DNN_CONGESTION", "S_NSSAI_CONGESTION", "REL_DUE_TO_REACTIVATION", "_5G_AN_NOT_RESPONDING", "REL_DUE_TO_SLICE_NOT_AVAILABLE", "REL_DUE_TO_DUPLICATE_SESSION_ID", "PDU_SESSION_STATUS_MISMATCH", "HO_FAILURE", "INSUFFICIENT_UP_RESOURCES", "PDU_SESSION_HANDED_OVER", "PDU_SESSION_RESUMED", "CN_ASSISTED_RAN_PARAMETER_TUNING", "ISMF_CONTEXT_TRANSFER", "SMF_CONTEXT_TRANSFER", "REL_DUE_TO_PS_TO_CS_HO", "REL_DUE_TO_SUBSCRIPTION_CHANGE", "HO_CANCEL", "REL_DUE_TO_SLICE_NOT_AUTHORIZED", "PDU_SESSION_HAND_OVER_FAILURE", "DDN_FAILURE_STATUS", "REL_DUE_TO_CP_ONLY_NOT_APPLICABLE", "NOT_SUPPORTED_WITH_ISMF" };
+ const char *causeArray[] = { "NULL", "REL_DUE_TO_HO", "EPS_FALLBACK", "REL_DUE_TO_UP_SEC", "DNN_CONGESTION", "S_NSSAI_CONGESTION", "REL_DUE_TO_REACTIVATION", "_5G_AN_NOT_RESPONDING", "REL_DUE_TO_SLICE_NOT_AVAILABLE", "REL_DUE_TO_DUPLICATE_SESSION_ID", "PDU_SESSION_STATUS_MISMATCH", "HO_FAILURE", "INSUFFICIENT_UP_RESOURCES", "PDU_SESSION_HANDED_OVER", "PDU_SESSION_RESUMED", "CN_ASSISTED_RAN_PARAMETER_TUNING", "ISMF_CONTEXT_TRANSFER", "SMF_CONTEXT_TRANSFER", "REL_DUE_TO_PS_TO_CS_HO", "REL_DUE_TO_SUBSCRIPTION_CHANGE", "HO_CANCEL", "REL_DUE_TO_SLICE_NOT_AUTHORIZED", "PDU_SESSION_HAND_OVER_FAILURE", "DDN_FAILURE_STATUS", "REL_DUE_TO_CP_ONLY_NOT_APPLICABLE", "NOT_SUPPORTED_WITH_ISMF", "CHANGED_ANCHOR_SMF", "CHANGED_INTERMEDIATE_SMF" };
size_t sizeofArray = sizeof(causeArray) / sizeof(causeArray[0]);
if (cause < sizeofArray)
return (char *)causeArray[cause];
@@ -17,7 +17,7 @@ char* OpenAPI_cause_ToString(OpenAPI_cause_e cause)
OpenAPI_cause_e OpenAPI_cause_FromString(char* cause)
{
int stringToReturn = 0;
- const char *causeArray[] = { "NULL", "REL_DUE_TO_HO", "EPS_FALLBACK", "REL_DUE_TO_UP_SEC", "DNN_CONGESTION", "S_NSSAI_CONGESTION", "REL_DUE_TO_REACTIVATION", "_5G_AN_NOT_RESPONDING", "REL_DUE_TO_SLICE_NOT_AVAILABLE", "REL_DUE_TO_DUPLICATE_SESSION_ID", "PDU_SESSION_STATUS_MISMATCH", "HO_FAILURE", "INSUFFICIENT_UP_RESOURCES", "PDU_SESSION_HANDED_OVER", "PDU_SESSION_RESUMED", "CN_ASSISTED_RAN_PARAMETER_TUNING", "ISMF_CONTEXT_TRANSFER", "SMF_CONTEXT_TRANSFER", "REL_DUE_TO_PS_TO_CS_HO", "REL_DUE_TO_SUBSCRIPTION_CHANGE", "HO_CANCEL", "REL_DUE_TO_SLICE_NOT_AUTHORIZED", "PDU_SESSION_HAND_OVER_FAILURE", "DDN_FAILURE_STATUS", "REL_DUE_TO_CP_ONLY_NOT_APPLICABLE", "NOT_SUPPORTED_WITH_ISMF" };
+ const char *causeArray[] = { "NULL", "REL_DUE_TO_HO", "EPS_FALLBACK", "REL_DUE_TO_UP_SEC", "DNN_CONGESTION", "S_NSSAI_CONGESTION", "REL_DUE_TO_REACTIVATION", "_5G_AN_NOT_RESPONDING", "REL_DUE_TO_SLICE_NOT_AVAILABLE", "REL_DUE_TO_DUPLICATE_SESSION_ID", "PDU_SESSION_STATUS_MISMATCH", "HO_FAILURE", "INSUFFICIENT_UP_RESOURCES", "PDU_SESSION_HANDED_OVER", "PDU_SESSION_RESUMED", "CN_ASSISTED_RAN_PARAMETER_TUNING", "ISMF_CONTEXT_TRANSFER", "SMF_CONTEXT_TRANSFER", "REL_DUE_TO_PS_TO_CS_HO", "REL_DUE_TO_SUBSCRIPTION_CHANGE", "HO_CANCEL", "REL_DUE_TO_SLICE_NOT_AUTHORIZED", "PDU_SESSION_HAND_OVER_FAILURE", "DDN_FAILURE_STATUS", "REL_DUE_TO_CP_ONLY_NOT_APPLICABLE", "NOT_SUPPORTED_WITH_ISMF", "CHANGED_ANCHOR_SMF", "CHANGED_INTERMEDIATE_SMF" };
size_t sizeofArray = sizeof(causeArray) / sizeof(causeArray[0]);
while (stringToReturn < sizeofArray) {
if (strcmp(cause, causeArray[stringToReturn]) == 0) {
diff --git a/lib/sbi/openapi/model/cause.h b/lib/sbi/openapi/model/cause.h
index 37db3a1a1..f8b238688 100644
--- a/lib/sbi/openapi/model/cause.h
+++ b/lib/sbi/openapi/model/cause.h
@@ -1,7 +1,7 @@
/*
* cause.h
*
- *
+ *
*/
#ifndef _OpenAPI_cause_H_
@@ -17,7 +17,7 @@
extern "C" {
#endif
-typedef enum { OpenAPI_cause_NULL = 0, OpenAPI_cause_REL_DUE_TO_HO, OpenAPI_cause_EPS_FALLBACK, OpenAPI_cause_REL_DUE_TO_UP_SEC, OpenAPI_cause_DNN_CONGESTION, OpenAPI_cause_S_NSSAI_CONGESTION, OpenAPI_cause_REL_DUE_TO_REACTIVATION, OpenAPI_cause__5G_AN_NOT_RESPONDING, OpenAPI_cause_REL_DUE_TO_SLICE_NOT_AVAILABLE, OpenAPI_cause_REL_DUE_TO_DUPLICATE_SESSION_ID, OpenAPI_cause_PDU_SESSION_STATUS_MISMATCH, OpenAPI_cause_HO_FAILURE, OpenAPI_cause_INSUFFICIENT_UP_RESOURCES, OpenAPI_cause_PDU_SESSION_HANDED_OVER, OpenAPI_cause_PDU_SESSION_RESUMED, OpenAPI_cause_CN_ASSISTED_RAN_PARAMETER_TUNING, OpenAPI_cause_ISMF_CONTEXT_TRANSFER, OpenAPI_cause_SMF_CONTEXT_TRANSFER, OpenAPI_cause_REL_DUE_TO_PS_TO_CS_HO, OpenAPI_cause_REL_DUE_TO_SUBSCRIPTION_CHANGE, OpenAPI_cause_HO_CANCEL, OpenAPI_cause_REL_DUE_TO_SLICE_NOT_AUTHORIZED, OpenAPI_cause_PDU_SESSION_HAND_OVER_FAILURE, OpenAPI_cause_DDN_FAILURE_STATUS, OpenAPI_cause_REL_DUE_TO_CP_ONLY_NOT_APPLICABLE, OpenAPI_cause_NOT_SUPPORTED_WITH_ISMF } OpenAPI_cause_e;
+typedef enum { OpenAPI_cause_NULL = 0, OpenAPI_cause_REL_DUE_TO_HO, OpenAPI_cause_EPS_FALLBACK, OpenAPI_cause_REL_DUE_TO_UP_SEC, OpenAPI_cause_DNN_CONGESTION, OpenAPI_cause_S_NSSAI_CONGESTION, OpenAPI_cause_REL_DUE_TO_REACTIVATION, OpenAPI_cause__5G_AN_NOT_RESPONDING, OpenAPI_cause_REL_DUE_TO_SLICE_NOT_AVAILABLE, OpenAPI_cause_REL_DUE_TO_DUPLICATE_SESSION_ID, OpenAPI_cause_PDU_SESSION_STATUS_MISMATCH, OpenAPI_cause_HO_FAILURE, OpenAPI_cause_INSUFFICIENT_UP_RESOURCES, OpenAPI_cause_PDU_SESSION_HANDED_OVER, OpenAPI_cause_PDU_SESSION_RESUMED, OpenAPI_cause_CN_ASSISTED_RAN_PARAMETER_TUNING, OpenAPI_cause_ISMF_CONTEXT_TRANSFER, OpenAPI_cause_SMF_CONTEXT_TRANSFER, OpenAPI_cause_REL_DUE_TO_PS_TO_CS_HO, OpenAPI_cause_REL_DUE_TO_SUBSCRIPTION_CHANGE, OpenAPI_cause_HO_CANCEL, OpenAPI_cause_REL_DUE_TO_SLICE_NOT_AUTHORIZED, OpenAPI_cause_PDU_SESSION_HAND_OVER_FAILURE, OpenAPI_cause_DDN_FAILURE_STATUS, OpenAPI_cause_REL_DUE_TO_CP_ONLY_NOT_APPLICABLE, OpenAPI_cause_NOT_SUPPORTED_WITH_ISMF, OpenAPI_cause_CHANGED_ANCHOR_SMF, OpenAPI_cause_CHANGED_INTERMEDIATE_SMF } OpenAPI_cause_e;
char* OpenAPI_cause_ToString(OpenAPI_cause_e cause);
diff --git a/lib/sbi/openapi/model/ce_mode_b_ind.c b/lib/sbi/openapi/model/ce_mode_b_ind.c
new file mode 100644
index 000000000..c9d130453
--- /dev/null
+++ b/lib/sbi/openapi/model/ce_mode_b_ind.c
@@ -0,0 +1,105 @@
+
+#include
+#include
+#include
+#include "ce_mode_b_ind.h"
+
+OpenAPI_ce_mode_b_ind_t *OpenAPI_ce_mode_b_ind_create(
+ int ce_mode_b_support_ind
+)
+{
+ OpenAPI_ce_mode_b_ind_t *ce_mode_b_ind_local_var = OpenAPI_malloc(sizeof(OpenAPI_ce_mode_b_ind_t));
+ if (!ce_mode_b_ind_local_var) {
+ return NULL;
+ }
+ ce_mode_b_ind_local_var->ce_mode_b_support_ind = ce_mode_b_support_ind;
+
+ return ce_mode_b_ind_local_var;
+}
+
+void OpenAPI_ce_mode_b_ind_free(OpenAPI_ce_mode_b_ind_t *ce_mode_b_ind)
+{
+ if (NULL == ce_mode_b_ind) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ ogs_free(ce_mode_b_ind);
+}
+
+cJSON *OpenAPI_ce_mode_b_ind_convertToJSON(OpenAPI_ce_mode_b_ind_t *ce_mode_b_ind)
+{
+ cJSON *item = NULL;
+
+ if (ce_mode_b_ind == NULL) {
+ ogs_error("OpenAPI_ce_mode_b_ind_convertToJSON() failed [CeModeBInd]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (cJSON_AddBoolToObject(item, "ceModeBSupportInd", ce_mode_b_ind->ce_mode_b_support_ind) == NULL) {
+ ogs_error("OpenAPI_ce_mode_b_ind_convertToJSON() failed [ce_mode_b_support_ind]");
+ goto end;
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_ce_mode_b_ind_t *OpenAPI_ce_mode_b_ind_parseFromJSON(cJSON *ce_mode_b_indJSON)
+{
+ OpenAPI_ce_mode_b_ind_t *ce_mode_b_ind_local_var = NULL;
+ cJSON *ce_mode_b_support_ind = cJSON_GetObjectItemCaseSensitive(ce_mode_b_indJSON, "ceModeBSupportInd");
+ if (!ce_mode_b_support_ind) {
+ ogs_error("OpenAPI_ce_mode_b_ind_parseFromJSON() failed [ce_mode_b_support_ind]");
+ goto end;
+ }
+
+
+ if (!cJSON_IsBool(ce_mode_b_support_ind)) {
+ ogs_error("OpenAPI_ce_mode_b_ind_parseFromJSON() failed [ce_mode_b_support_ind]");
+ goto end;
+ }
+
+ ce_mode_b_ind_local_var = OpenAPI_ce_mode_b_ind_create (
+ ce_mode_b_support_ind->valueint
+ );
+
+ return ce_mode_b_ind_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_ce_mode_b_ind_t *OpenAPI_ce_mode_b_ind_copy(OpenAPI_ce_mode_b_ind_t *dst, OpenAPI_ce_mode_b_ind_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_ce_mode_b_ind_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_ce_mode_b_ind_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_ce_mode_b_ind_free(dst);
+ dst = OpenAPI_ce_mode_b_ind_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/ce_mode_b_ind.h b/lib/sbi/openapi/model/ce_mode_b_ind.h
new file mode 100644
index 000000000..05a304fdd
--- /dev/null
+++ b/lib/sbi/openapi/model/ce_mode_b_ind.h
@@ -0,0 +1,38 @@
+/*
+ * ce_mode_b_ind.h
+ *
+ * CE-mode-B Support Indicator.
+ */
+
+#ifndef _OpenAPI_ce_mode_b_ind_H_
+#define _OpenAPI_ce_mode_b_ind_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_ce_mode_b_ind_s OpenAPI_ce_mode_b_ind_t;
+typedef struct OpenAPI_ce_mode_b_ind_s {
+ int ce_mode_b_support_ind;
+} OpenAPI_ce_mode_b_ind_t;
+
+OpenAPI_ce_mode_b_ind_t *OpenAPI_ce_mode_b_ind_create(
+ int ce_mode_b_support_ind
+);
+void OpenAPI_ce_mode_b_ind_free(OpenAPI_ce_mode_b_ind_t *ce_mode_b_ind);
+OpenAPI_ce_mode_b_ind_t *OpenAPI_ce_mode_b_ind_parseFromJSON(cJSON *ce_mode_b_indJSON);
+cJSON *OpenAPI_ce_mode_b_ind_convertToJSON(OpenAPI_ce_mode_b_ind_t *ce_mode_b_ind);
+OpenAPI_ce_mode_b_ind_t *OpenAPI_ce_mode_b_ind_copy(OpenAPI_ce_mode_b_ind_t *dst, OpenAPI_ce_mode_b_ind_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_ce_mode_b_ind_H_ */
+
diff --git a/lib/sbi/openapi/model/change_item.c b/lib/sbi/openapi/model/change_item.c
index 1b6058677..d5c11a585 100644
--- a/lib/sbi/openapi/model/change_item.c
+++ b/lib/sbi/openapi/model/change_item.c
@@ -10,7 +10,7 @@ OpenAPI_change_item_t *OpenAPI_change_item_create(
char *from,
char *orig_value,
char *new_value
- )
+)
{
OpenAPI_change_item_t *change_item_local_var = OpenAPI_malloc(sizeof(OpenAPI_change_item_t));
if (!change_item_local_var) {
@@ -59,24 +59,24 @@ cJSON *OpenAPI_change_item_convertToJSON(OpenAPI_change_item_t *change_item)
}
if (change_item->from) {
- if (cJSON_AddStringToObject(item, "from", change_item->from) == NULL) {
- ogs_error("OpenAPI_change_item_convertToJSON() failed [from]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "from", change_item->from) == NULL) {
+ ogs_error("OpenAPI_change_item_convertToJSON() failed [from]");
+ goto end;
+ }
}
if (change_item->orig_value) {
- if (cJSON_AddStringToObject(item, "origValue", change_item->orig_value) == NULL) {
- ogs_error("OpenAPI_change_item_convertToJSON() failed [orig_value]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "origValue", change_item->orig_value) == NULL) {
+ ogs_error("OpenAPI_change_item_convertToJSON() failed [orig_value]");
+ goto end;
+ }
}
if (change_item->new_value) {
- if (cJSON_AddStringToObject(item, "newValue", change_item->new_value) == NULL) {
- ogs_error("OpenAPI_change_item_convertToJSON() failed [new_value]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "newValue", change_item->new_value) == NULL) {
+ ogs_error("OpenAPI_change_item_convertToJSON() failed [new_value]");
+ goto end;
+ }
}
end:
@@ -93,7 +93,7 @@ OpenAPI_change_item_t *OpenAPI_change_item_parseFromJSON(cJSON *change_itemJSON)
}
OpenAPI_change_type_e opVariable;
-
+
if (!cJSON_IsString(op)) {
ogs_error("OpenAPI_change_item_parseFromJSON() failed [op]");
goto end;
@@ -106,7 +106,7 @@ OpenAPI_change_item_t *OpenAPI_change_item_parseFromJSON(cJSON *change_itemJSON)
goto end;
}
-
+
if (!cJSON_IsString(path)) {
ogs_error("OpenAPI_change_item_parseFromJSON() failed [path]");
goto end;
@@ -114,29 +114,29 @@ OpenAPI_change_item_t *OpenAPI_change_item_parseFromJSON(cJSON *change_itemJSON)
cJSON *from = cJSON_GetObjectItemCaseSensitive(change_itemJSON, "from");
- if (from) {
- if (!cJSON_IsString(from)) {
- ogs_error("OpenAPI_change_item_parseFromJSON() failed [from]");
- goto end;
- }
+ if (from) {
+ if (!cJSON_IsString(from)) {
+ ogs_error("OpenAPI_change_item_parseFromJSON() failed [from]");
+ goto end;
+ }
}
cJSON *orig_value = cJSON_GetObjectItemCaseSensitive(change_itemJSON, "origValue");
- if (orig_value) {
- if (!cJSON_IsString(orig_value)) {
- ogs_error("OpenAPI_change_item_parseFromJSON() failed [orig_value]");
- goto end;
- }
+ if (orig_value) {
+ if (!cJSON_IsString(orig_value)) {
+ ogs_error("OpenAPI_change_item_parseFromJSON() failed [orig_value]");
+ goto end;
+ }
}
cJSON *new_value = cJSON_GetObjectItemCaseSensitive(change_itemJSON, "newValue");
- if (new_value) {
- if (!cJSON_IsString(new_value)) {
- ogs_error("OpenAPI_change_item_parseFromJSON() failed [new_value]");
- goto end;
- }
+ if (new_value) {
+ if (!cJSON_IsString(new_value)) {
+ ogs_error("OpenAPI_change_item_parseFromJSON() failed [new_value]");
+ goto end;
+ }
}
change_item_local_var = OpenAPI_change_item_create (
@@ -145,7 +145,7 @@ OpenAPI_change_item_t *OpenAPI_change_item_parseFromJSON(cJSON *change_itemJSON)
from ? ogs_strdup_or_assert(from->valuestring) : NULL,
orig_value ? ogs_strdup_or_assert(orig_value->valuestring) : NULL,
new_value ? ogs_strdup_or_assert(new_value->valuestring) : NULL
- );
+ );
return change_item_local_var;
end:
diff --git a/lib/sbi/openapi/model/change_item.h b/lib/sbi/openapi/model/change_item.h
index d3939d31d..029053322 100644
--- a/lib/sbi/openapi/model/change_item.h
+++ b/lib/sbi/openapi/model/change_item.h
@@ -1,7 +1,7 @@
/*
* change_item.h
*
- *
+ *
*/
#ifndef _OpenAPI_change_item_H_
@@ -33,7 +33,7 @@ OpenAPI_change_item_t *OpenAPI_change_item_create(
char *from,
char *orig_value,
char *new_value
- );
+);
void OpenAPI_change_item_free(OpenAPI_change_item_t *change_item);
OpenAPI_change_item_t *OpenAPI_change_item_parseFromJSON(cJSON *change_itemJSON);
cJSON *OpenAPI_change_item_convertToJSON(OpenAPI_change_item_t *change_item);
diff --git a/lib/sbi/openapi/model/change_type.h b/lib/sbi/openapi/model/change_type.h
index b5d8656bf..d61819b3b 100644
--- a/lib/sbi/openapi/model/change_type.h
+++ b/lib/sbi/openapi/model/change_type.h
@@ -1,7 +1,7 @@
/*
* change_type.h
*
- *
+ *
*/
#ifndef _OpenAPI_change_type_H_
diff --git a/lib/sbi/openapi/model/charging_data.c b/lib/sbi/openapi/model/charging_data.c
index 08c618659..e77458e56 100644
--- a/lib/sbi/openapi/model/charging_data.c
+++ b/lib/sbi/openapi/model/charging_data.c
@@ -17,7 +17,7 @@ OpenAPI_charging_data_t *OpenAPI_charging_data_create(
char *app_svc_prov_id,
int af_charging_identifier,
char *af_charg_id
- )
+)
{
OpenAPI_charging_data_t *charging_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_charging_data_t));
if (!charging_data_local_var) {
@@ -68,80 +68,80 @@ cJSON *OpenAPI_charging_data_convertToJSON(OpenAPI_charging_data_t *charging_dat
}
if (charging_data->metering_method) {
- if (cJSON_AddStringToObject(item, "meteringMethod", OpenAPI_metering_method_ToString(charging_data->metering_method)) == NULL) {
- ogs_error("OpenAPI_charging_data_convertToJSON() failed [metering_method]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "meteringMethod", OpenAPI_metering_method_ToString(charging_data->metering_method)) == NULL) {
+ ogs_error("OpenAPI_charging_data_convertToJSON() failed [metering_method]");
+ goto end;
+ }
}
if (charging_data->offline) {
- if (cJSON_AddBoolToObject(item, "offline", charging_data->offline) == NULL) {
- ogs_error("OpenAPI_charging_data_convertToJSON() failed [offline]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "offline", charging_data->offline) == NULL) {
+ ogs_error("OpenAPI_charging_data_convertToJSON() failed [offline]");
+ goto end;
+ }
}
if (charging_data->online) {
- if (cJSON_AddBoolToObject(item, "online", charging_data->online) == NULL) {
- ogs_error("OpenAPI_charging_data_convertToJSON() failed [online]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "online", charging_data->online) == NULL) {
+ ogs_error("OpenAPI_charging_data_convertToJSON() failed [online]");
+ goto end;
+ }
}
if (charging_data->sdf_handl) {
- if (cJSON_AddBoolToObject(item, "sdfHandl", charging_data->sdf_handl) == NULL) {
- ogs_error("OpenAPI_charging_data_convertToJSON() failed [sdf_handl]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "sdfHandl", charging_data->sdf_handl) == NULL) {
+ ogs_error("OpenAPI_charging_data_convertToJSON() failed [sdf_handl]");
+ goto end;
+ }
}
if (charging_data->rating_group) {
- if (cJSON_AddNumberToObject(item, "ratingGroup", charging_data->rating_group) == NULL) {
- ogs_error("OpenAPI_charging_data_convertToJSON() failed [rating_group]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "ratingGroup", charging_data->rating_group) == NULL) {
+ ogs_error("OpenAPI_charging_data_convertToJSON() failed [rating_group]");
+ goto end;
+ }
}
if (charging_data->reporting_level) {
- if (cJSON_AddStringToObject(item, "reportingLevel", OpenAPI_reporting_level_ToString(charging_data->reporting_level)) == NULL) {
- ogs_error("OpenAPI_charging_data_convertToJSON() failed [reporting_level]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "reportingLevel", OpenAPI_reporting_level_ToString(charging_data->reporting_level)) == NULL) {
+ ogs_error("OpenAPI_charging_data_convertToJSON() failed [reporting_level]");
+ goto end;
+ }
}
if (charging_data->service_id) {
- if (cJSON_AddNumberToObject(item, "serviceId", charging_data->service_id) == NULL) {
- ogs_error("OpenAPI_charging_data_convertToJSON() failed [service_id]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "serviceId", charging_data->service_id) == NULL) {
+ ogs_error("OpenAPI_charging_data_convertToJSON() failed [service_id]");
+ goto end;
+ }
}
if (charging_data->sponsor_id) {
- if (cJSON_AddStringToObject(item, "sponsorId", charging_data->sponsor_id) == NULL) {
- ogs_error("OpenAPI_charging_data_convertToJSON() failed [sponsor_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "sponsorId", charging_data->sponsor_id) == NULL) {
+ ogs_error("OpenAPI_charging_data_convertToJSON() failed [sponsor_id]");
+ goto end;
+ }
}
if (charging_data->app_svc_prov_id) {
- if (cJSON_AddStringToObject(item, "appSvcProvId", charging_data->app_svc_prov_id) == NULL) {
- ogs_error("OpenAPI_charging_data_convertToJSON() failed [app_svc_prov_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "appSvcProvId", charging_data->app_svc_prov_id) == NULL) {
+ ogs_error("OpenAPI_charging_data_convertToJSON() failed [app_svc_prov_id]");
+ goto end;
+ }
}
if (charging_data->af_charging_identifier) {
- if (cJSON_AddNumberToObject(item, "afChargingIdentifier", charging_data->af_charging_identifier) == NULL) {
- ogs_error("OpenAPI_charging_data_convertToJSON() failed [af_charging_identifier]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "afChargingIdentifier", charging_data->af_charging_identifier) == NULL) {
+ ogs_error("OpenAPI_charging_data_convertToJSON() failed [af_charging_identifier]");
+ goto end;
+ }
}
if (charging_data->af_charg_id) {
- if (cJSON_AddStringToObject(item, "afChargId", charging_data->af_charg_id) == NULL) {
- ogs_error("OpenAPI_charging_data_convertToJSON() failed [af_charg_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "afChargId", charging_data->af_charg_id) == NULL) {
+ ogs_error("OpenAPI_charging_data_convertToJSON() failed [af_charg_id]");
+ goto end;
+ }
}
end:
@@ -157,7 +157,7 @@ OpenAPI_charging_data_t *OpenAPI_charging_data_parseFromJSON(cJSON *charging_dat
goto end;
}
-
+
if (!cJSON_IsString(chg_id)) {
ogs_error("OpenAPI_charging_data_parseFromJSON() failed [chg_id]");
goto end;
@@ -166,104 +166,104 @@ OpenAPI_charging_data_t *OpenAPI_charging_data_parseFromJSON(cJSON *charging_dat
cJSON *metering_method = cJSON_GetObjectItemCaseSensitive(charging_dataJSON, "meteringMethod");
OpenAPI_metering_method_e metering_methodVariable;
- if (metering_method) {
- if (!cJSON_IsString(metering_method)) {
- ogs_error("OpenAPI_charging_data_parseFromJSON() failed [metering_method]");
- goto end;
- }
- metering_methodVariable = OpenAPI_metering_method_FromString(metering_method->valuestring);
+ if (metering_method) {
+ if (!cJSON_IsString(metering_method)) {
+ ogs_error("OpenAPI_charging_data_parseFromJSON() failed [metering_method]");
+ goto end;
+ }
+ metering_methodVariable = OpenAPI_metering_method_FromString(metering_method->valuestring);
}
cJSON *offline = cJSON_GetObjectItemCaseSensitive(charging_dataJSON, "offline");
- if (offline) {
- if (!cJSON_IsBool(offline)) {
- ogs_error("OpenAPI_charging_data_parseFromJSON() failed [offline]");
- goto end;
- }
+ if (offline) {
+ if (!cJSON_IsBool(offline)) {
+ ogs_error("OpenAPI_charging_data_parseFromJSON() failed [offline]");
+ goto end;
+ }
}
cJSON *online = cJSON_GetObjectItemCaseSensitive(charging_dataJSON, "online");
- if (online) {
- if (!cJSON_IsBool(online)) {
- ogs_error("OpenAPI_charging_data_parseFromJSON() failed [online]");
- goto end;
- }
+ if (online) {
+ if (!cJSON_IsBool(online)) {
+ ogs_error("OpenAPI_charging_data_parseFromJSON() failed [online]");
+ goto end;
+ }
}
cJSON *sdf_handl = cJSON_GetObjectItemCaseSensitive(charging_dataJSON, "sdfHandl");
- if (sdf_handl) {
- if (!cJSON_IsBool(sdf_handl)) {
- ogs_error("OpenAPI_charging_data_parseFromJSON() failed [sdf_handl]");
- goto end;
- }
+ if (sdf_handl) {
+ if (!cJSON_IsBool(sdf_handl)) {
+ ogs_error("OpenAPI_charging_data_parseFromJSON() failed [sdf_handl]");
+ goto end;
+ }
}
cJSON *rating_group = cJSON_GetObjectItemCaseSensitive(charging_dataJSON, "ratingGroup");
- if (rating_group) {
- if (!cJSON_IsNumber(rating_group)) {
- ogs_error("OpenAPI_charging_data_parseFromJSON() failed [rating_group]");
- goto end;
- }
+ if (rating_group) {
+ if (!cJSON_IsNumber(rating_group)) {
+ ogs_error("OpenAPI_charging_data_parseFromJSON() failed [rating_group]");
+ goto end;
+ }
}
cJSON *reporting_level = cJSON_GetObjectItemCaseSensitive(charging_dataJSON, "reportingLevel");
OpenAPI_reporting_level_e reporting_levelVariable;
- if (reporting_level) {
- if (!cJSON_IsString(reporting_level)) {
- ogs_error("OpenAPI_charging_data_parseFromJSON() failed [reporting_level]");
- goto end;
- }
- reporting_levelVariable = OpenAPI_reporting_level_FromString(reporting_level->valuestring);
+ if (reporting_level) {
+ if (!cJSON_IsString(reporting_level)) {
+ ogs_error("OpenAPI_charging_data_parseFromJSON() failed [reporting_level]");
+ goto end;
+ }
+ reporting_levelVariable = OpenAPI_reporting_level_FromString(reporting_level->valuestring);
}
cJSON *service_id = cJSON_GetObjectItemCaseSensitive(charging_dataJSON, "serviceId");
- if (service_id) {
- if (!cJSON_IsNumber(service_id)) {
- ogs_error("OpenAPI_charging_data_parseFromJSON() failed [service_id]");
- goto end;
- }
+ if (service_id) {
+ if (!cJSON_IsNumber(service_id)) {
+ ogs_error("OpenAPI_charging_data_parseFromJSON() failed [service_id]");
+ goto end;
+ }
}
cJSON *sponsor_id = cJSON_GetObjectItemCaseSensitive(charging_dataJSON, "sponsorId");
- if (sponsor_id) {
- if (!cJSON_IsString(sponsor_id)) {
- ogs_error("OpenAPI_charging_data_parseFromJSON() failed [sponsor_id]");
- goto end;
- }
+ if (sponsor_id) {
+ if (!cJSON_IsString(sponsor_id)) {
+ ogs_error("OpenAPI_charging_data_parseFromJSON() failed [sponsor_id]");
+ goto end;
+ }
}
cJSON *app_svc_prov_id = cJSON_GetObjectItemCaseSensitive(charging_dataJSON, "appSvcProvId");
- if (app_svc_prov_id) {
- if (!cJSON_IsString(app_svc_prov_id)) {
- ogs_error("OpenAPI_charging_data_parseFromJSON() failed [app_svc_prov_id]");
- goto end;
- }
+ if (app_svc_prov_id) {
+ if (!cJSON_IsString(app_svc_prov_id)) {
+ ogs_error("OpenAPI_charging_data_parseFromJSON() failed [app_svc_prov_id]");
+ goto end;
+ }
}
cJSON *af_charging_identifier = cJSON_GetObjectItemCaseSensitive(charging_dataJSON, "afChargingIdentifier");
- if (af_charging_identifier) {
- if (!cJSON_IsNumber(af_charging_identifier)) {
- ogs_error("OpenAPI_charging_data_parseFromJSON() failed [af_charging_identifier]");
- goto end;
- }
+ if (af_charging_identifier) {
+ if (!cJSON_IsNumber(af_charging_identifier)) {
+ ogs_error("OpenAPI_charging_data_parseFromJSON() failed [af_charging_identifier]");
+ goto end;
+ }
}
cJSON *af_charg_id = cJSON_GetObjectItemCaseSensitive(charging_dataJSON, "afChargId");
- if (af_charg_id) {
- if (!cJSON_IsString(af_charg_id)) {
- ogs_error("OpenAPI_charging_data_parseFromJSON() failed [af_charg_id]");
- goto end;
- }
+ if (af_charg_id) {
+ if (!cJSON_IsString(af_charg_id)) {
+ ogs_error("OpenAPI_charging_data_parseFromJSON() failed [af_charg_id]");
+ goto end;
+ }
}
charging_data_local_var = OpenAPI_charging_data_create (
@@ -279,7 +279,7 @@ OpenAPI_charging_data_t *OpenAPI_charging_data_parseFromJSON(cJSON *charging_dat
app_svc_prov_id ? ogs_strdup_or_assert(app_svc_prov_id->valuestring) : NULL,
af_charging_identifier ? af_charging_identifier->valuedouble : 0,
af_charg_id ? ogs_strdup_or_assert(af_charg_id->valuestring) : NULL
- );
+ );
return charging_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/charging_data.h b/lib/sbi/openapi/model/charging_data.h
index 6375263f3..8683c3e0e 100644
--- a/lib/sbi/openapi/model/charging_data.h
+++ b/lib/sbi/openapi/model/charging_data.h
@@ -1,7 +1,7 @@
/*
* charging_data.h
*
- *
+ *
*/
#ifndef _OpenAPI_charging_data_H_
@@ -48,7 +48,7 @@ OpenAPI_charging_data_t *OpenAPI_charging_data_create(
char *app_svc_prov_id,
int af_charging_identifier,
char *af_charg_id
- );
+);
void OpenAPI_charging_data_free(OpenAPI_charging_data_t *charging_data);
OpenAPI_charging_data_t *OpenAPI_charging_data_parseFromJSON(cJSON *charging_dataJSON);
cJSON *OpenAPI_charging_data_convertToJSON(OpenAPI_charging_data_t *charging_data);
diff --git a/lib/sbi/openapi/model/charging_information.c b/lib/sbi/openapi/model/charging_information.c
index 3cc25f276..b49c1acc2 100644
--- a/lib/sbi/openapi/model/charging_information.c
+++ b/lib/sbi/openapi/model/charging_information.c
@@ -11,7 +11,7 @@ OpenAPI_charging_information_t *OpenAPI_charging_information_create(
char *primary_chf_instance_id,
char *secondary_chf_set_id,
char *secondary_chf_instance_id
- )
+)
{
OpenAPI_charging_information_t *charging_information_local_var = OpenAPI_malloc(sizeof(OpenAPI_charging_information_t));
if (!charging_information_local_var) {
@@ -63,31 +63,31 @@ cJSON *OpenAPI_charging_information_convertToJSON(OpenAPI_charging_information_t
}
if (charging_information->primary_chf_set_id) {
- if (cJSON_AddStringToObject(item, "primaryChfSetId", charging_information->primary_chf_set_id) == NULL) {
- ogs_error("OpenAPI_charging_information_convertToJSON() failed [primary_chf_set_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "primaryChfSetId", charging_information->primary_chf_set_id) == NULL) {
+ ogs_error("OpenAPI_charging_information_convertToJSON() failed [primary_chf_set_id]");
+ goto end;
+ }
}
if (charging_information->primary_chf_instance_id) {
- if (cJSON_AddStringToObject(item, "primaryChfInstanceId", charging_information->primary_chf_instance_id) == NULL) {
- ogs_error("OpenAPI_charging_information_convertToJSON() failed [primary_chf_instance_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "primaryChfInstanceId", charging_information->primary_chf_instance_id) == NULL) {
+ ogs_error("OpenAPI_charging_information_convertToJSON() failed [primary_chf_instance_id]");
+ goto end;
+ }
}
if (charging_information->secondary_chf_set_id) {
- if (cJSON_AddStringToObject(item, "secondaryChfSetId", charging_information->secondary_chf_set_id) == NULL) {
- ogs_error("OpenAPI_charging_information_convertToJSON() failed [secondary_chf_set_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "secondaryChfSetId", charging_information->secondary_chf_set_id) == NULL) {
+ ogs_error("OpenAPI_charging_information_convertToJSON() failed [secondary_chf_set_id]");
+ goto end;
+ }
}
if (charging_information->secondary_chf_instance_id) {
- if (cJSON_AddStringToObject(item, "secondaryChfInstanceId", charging_information->secondary_chf_instance_id) == NULL) {
- ogs_error("OpenAPI_charging_information_convertToJSON() failed [secondary_chf_instance_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "secondaryChfInstanceId", charging_information->secondary_chf_instance_id) == NULL) {
+ ogs_error("OpenAPI_charging_information_convertToJSON() failed [secondary_chf_instance_id]");
+ goto end;
+ }
}
end:
@@ -103,7 +103,7 @@ OpenAPI_charging_information_t *OpenAPI_charging_information_parseFromJSON(cJSON
goto end;
}
-
+
if (!cJSON_IsString(primary_chf_address)) {
ogs_error("OpenAPI_charging_information_parseFromJSON() failed [primary_chf_address]");
goto end;
@@ -115,7 +115,7 @@ OpenAPI_charging_information_t *OpenAPI_charging_information_parseFromJSON(cJSON
goto end;
}
-
+
if (!cJSON_IsString(secondary_chf_address)) {
ogs_error("OpenAPI_charging_information_parseFromJSON() failed [secondary_chf_address]");
goto end;
@@ -123,38 +123,38 @@ OpenAPI_charging_information_t *OpenAPI_charging_information_parseFromJSON(cJSON
cJSON *primary_chf_set_id = cJSON_GetObjectItemCaseSensitive(charging_informationJSON, "primaryChfSetId");
- if (primary_chf_set_id) {
- if (!cJSON_IsString(primary_chf_set_id)) {
- ogs_error("OpenAPI_charging_information_parseFromJSON() failed [primary_chf_set_id]");
- goto end;
- }
+ if (primary_chf_set_id) {
+ if (!cJSON_IsString(primary_chf_set_id)) {
+ ogs_error("OpenAPI_charging_information_parseFromJSON() failed [primary_chf_set_id]");
+ goto end;
+ }
}
cJSON *primary_chf_instance_id = cJSON_GetObjectItemCaseSensitive(charging_informationJSON, "primaryChfInstanceId");
- if (primary_chf_instance_id) {
- if (!cJSON_IsString(primary_chf_instance_id)) {
- ogs_error("OpenAPI_charging_information_parseFromJSON() failed [primary_chf_instance_id]");
- goto end;
- }
+ if (primary_chf_instance_id) {
+ if (!cJSON_IsString(primary_chf_instance_id)) {
+ ogs_error("OpenAPI_charging_information_parseFromJSON() failed [primary_chf_instance_id]");
+ goto end;
+ }
}
cJSON *secondary_chf_set_id = cJSON_GetObjectItemCaseSensitive(charging_informationJSON, "secondaryChfSetId");
- if (secondary_chf_set_id) {
- if (!cJSON_IsString(secondary_chf_set_id)) {
- ogs_error("OpenAPI_charging_information_parseFromJSON() failed [secondary_chf_set_id]");
- goto end;
- }
+ if (secondary_chf_set_id) {
+ if (!cJSON_IsString(secondary_chf_set_id)) {
+ ogs_error("OpenAPI_charging_information_parseFromJSON() failed [secondary_chf_set_id]");
+ goto end;
+ }
}
cJSON *secondary_chf_instance_id = cJSON_GetObjectItemCaseSensitive(charging_informationJSON, "secondaryChfInstanceId");
- if (secondary_chf_instance_id) {
- if (!cJSON_IsString(secondary_chf_instance_id)) {
- ogs_error("OpenAPI_charging_information_parseFromJSON() failed [secondary_chf_instance_id]");
- goto end;
- }
+ if (secondary_chf_instance_id) {
+ if (!cJSON_IsString(secondary_chf_instance_id)) {
+ ogs_error("OpenAPI_charging_information_parseFromJSON() failed [secondary_chf_instance_id]");
+ goto end;
+ }
}
charging_information_local_var = OpenAPI_charging_information_create (
@@ -164,7 +164,7 @@ OpenAPI_charging_information_t *OpenAPI_charging_information_parseFromJSON(cJSON
primary_chf_instance_id ? ogs_strdup_or_assert(primary_chf_instance_id->valuestring) : NULL,
secondary_chf_set_id ? ogs_strdup_or_assert(secondary_chf_set_id->valuestring) : NULL,
secondary_chf_instance_id ? ogs_strdup_or_assert(secondary_chf_instance_id->valuestring) : NULL
- );
+ );
return charging_information_local_var;
end:
diff --git a/lib/sbi/openapi/model/charging_information.h b/lib/sbi/openapi/model/charging_information.h
index c3c3ea23d..444dd6519 100644
--- a/lib/sbi/openapi/model/charging_information.h
+++ b/lib/sbi/openapi/model/charging_information.h
@@ -1,7 +1,7 @@
/*
* charging_information.h
*
- *
+ *
*/
#ifndef _OpenAPI_charging_information_H_
@@ -34,7 +34,7 @@ OpenAPI_charging_information_t *OpenAPI_charging_information_create(
char *primary_chf_instance_id,
char *secondary_chf_set_id,
char *secondary_chf_instance_id
- );
+);
void OpenAPI_charging_information_free(OpenAPI_charging_information_t *charging_information);
OpenAPI_charging_information_t *OpenAPI_charging_information_parseFromJSON(cJSON *charging_informationJSON);
cJSON *OpenAPI_charging_information_convertToJSON(OpenAPI_charging_information_t *charging_information);
diff --git a/lib/sbi/openapi/model/chf_info.c b/lib/sbi/openapi/model/chf_info.c
index d450cb0e9..ecb362e40 100644
--- a/lib/sbi/openapi/model/chf_info.c
+++ b/lib/sbi/openapi/model/chf_info.c
@@ -8,8 +8,10 @@ OpenAPI_chf_info_t *OpenAPI_chf_info_create(
OpenAPI_list_t *supi_range_list,
OpenAPI_list_t *gpsi_range_list,
OpenAPI_list_t *plmn_range_list,
- char *group_id
- )
+ char *group_id,
+ char *primary_chf_instance,
+ char *secondary_chf_instance
+)
{
OpenAPI_chf_info_t *chf_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_chf_info_t));
if (!chf_info_local_var) {
@@ -19,6 +21,8 @@ OpenAPI_chf_info_t *OpenAPI_chf_info_create(
chf_info_local_var->gpsi_range_list = gpsi_range_list;
chf_info_local_var->plmn_range_list = plmn_range_list;
chf_info_local_var->group_id = group_id;
+ chf_info_local_var->primary_chf_instance = primary_chf_instance;
+ chf_info_local_var->secondary_chf_instance = secondary_chf_instance;
return chf_info_local_var;
}
@@ -42,6 +46,8 @@ void OpenAPI_chf_info_free(OpenAPI_chf_info_t *chf_info)
}
OpenAPI_list_free(chf_info->plmn_range_list);
ogs_free(chf_info->group_id);
+ ogs_free(chf_info->primary_chf_instance);
+ ogs_free(chf_info->secondary_chf_instance);
ogs_free(chf_info);
}
@@ -56,70 +62,84 @@ cJSON *OpenAPI_chf_info_convertToJSON(OpenAPI_chf_info_t *chf_info)
item = cJSON_CreateObject();
if (chf_info->supi_range_list) {
- cJSON *supi_range_listList = cJSON_AddArrayToObject(item, "supiRangeList");
- if (supi_range_listList == NULL) {
- ogs_error("OpenAPI_chf_info_convertToJSON() failed [supi_range_list]");
- goto end;
- }
+ cJSON *supi_range_listList = cJSON_AddArrayToObject(item, "supiRangeList");
+ if (supi_range_listList == NULL) {
+ ogs_error("OpenAPI_chf_info_convertToJSON() failed [supi_range_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *supi_range_list_node;
- if (chf_info->supi_range_list) {
- OpenAPI_list_for_each(chf_info->supi_range_list, supi_range_list_node) {
- cJSON *itemLocal = OpenAPI_supi_range_convertToJSON(supi_range_list_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_chf_info_convertToJSON() failed [supi_range_list]");
- goto end;
- }
- cJSON_AddItemToArray(supi_range_listList, itemLocal);
+ OpenAPI_lnode_t *supi_range_list_node;
+ if (chf_info->supi_range_list) {
+ OpenAPI_list_for_each(chf_info->supi_range_list, supi_range_list_node) {
+ cJSON *itemLocal = OpenAPI_supi_range_convertToJSON(supi_range_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_chf_info_convertToJSON() failed [supi_range_list]");
+ goto end;
}
+ cJSON_AddItemToArray(supi_range_listList, itemLocal);
}
}
+ }
if (chf_info->gpsi_range_list) {
- cJSON *gpsi_range_listList = cJSON_AddArrayToObject(item, "gpsiRangeList");
- if (gpsi_range_listList == NULL) {
- ogs_error("OpenAPI_chf_info_convertToJSON() failed [gpsi_range_list]");
- goto end;
- }
+ cJSON *gpsi_range_listList = cJSON_AddArrayToObject(item, "gpsiRangeList");
+ if (gpsi_range_listList == NULL) {
+ ogs_error("OpenAPI_chf_info_convertToJSON() failed [gpsi_range_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *gpsi_range_list_node;
- if (chf_info->gpsi_range_list) {
- OpenAPI_list_for_each(chf_info->gpsi_range_list, gpsi_range_list_node) {
- cJSON *itemLocal = OpenAPI_identity_range_convertToJSON(gpsi_range_list_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_chf_info_convertToJSON() failed [gpsi_range_list]");
- goto end;
- }
- cJSON_AddItemToArray(gpsi_range_listList, itemLocal);
+ OpenAPI_lnode_t *gpsi_range_list_node;
+ if (chf_info->gpsi_range_list) {
+ OpenAPI_list_for_each(chf_info->gpsi_range_list, gpsi_range_list_node) {
+ cJSON *itemLocal = OpenAPI_identity_range_convertToJSON(gpsi_range_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_chf_info_convertToJSON() failed [gpsi_range_list]");
+ goto end;
}
+ cJSON_AddItemToArray(gpsi_range_listList, itemLocal);
}
}
+ }
if (chf_info->plmn_range_list) {
- cJSON *plmn_range_listList = cJSON_AddArrayToObject(item, "plmnRangeList");
- if (plmn_range_listList == NULL) {
- ogs_error("OpenAPI_chf_info_convertToJSON() failed [plmn_range_list]");
- goto end;
- }
+ cJSON *plmn_range_listList = cJSON_AddArrayToObject(item, "plmnRangeList");
+ if (plmn_range_listList == NULL) {
+ ogs_error("OpenAPI_chf_info_convertToJSON() failed [plmn_range_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *plmn_range_list_node;
- if (chf_info->plmn_range_list) {
- OpenAPI_list_for_each(chf_info->plmn_range_list, plmn_range_list_node) {
- cJSON *itemLocal = OpenAPI_plmn_range_convertToJSON(plmn_range_list_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_chf_info_convertToJSON() failed [plmn_range_list]");
- goto end;
- }
- cJSON_AddItemToArray(plmn_range_listList, itemLocal);
+ OpenAPI_lnode_t *plmn_range_list_node;
+ if (chf_info->plmn_range_list) {
+ OpenAPI_list_for_each(chf_info->plmn_range_list, plmn_range_list_node) {
+ cJSON *itemLocal = OpenAPI_plmn_range_convertToJSON(plmn_range_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_chf_info_convertToJSON() failed [plmn_range_list]");
+ goto end;
}
+ cJSON_AddItemToArray(plmn_range_listList, itemLocal);
}
}
+ }
if (chf_info->group_id) {
- if (cJSON_AddStringToObject(item, "groupId", chf_info->group_id) == NULL) {
- ogs_error("OpenAPI_chf_info_convertToJSON() failed [group_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "groupId", chf_info->group_id) == NULL) {
+ ogs_error("OpenAPI_chf_info_convertToJSON() failed [group_id]");
+ goto end;
+ }
+ }
+
+ if (chf_info->primary_chf_instance) {
+ if (cJSON_AddStringToObject(item, "primaryChfInstance", chf_info->primary_chf_instance) == NULL) {
+ ogs_error("OpenAPI_chf_info_convertToJSON() failed [primary_chf_instance]");
+ goto end;
+ }
+ }
+
+ if (chf_info->secondary_chf_instance) {
+ if (cJSON_AddStringToObject(item, "secondaryChfInstance", chf_info->secondary_chf_instance) == NULL) {
+ ogs_error("OpenAPI_chf_info_convertToJSON() failed [secondary_chf_instance]");
+ goto end;
+ }
}
end:
@@ -132,87 +152,107 @@ OpenAPI_chf_info_t *OpenAPI_chf_info_parseFromJSON(cJSON *chf_infoJSON)
cJSON *supi_range_list = cJSON_GetObjectItemCaseSensitive(chf_infoJSON, "supiRangeList");
OpenAPI_list_t *supi_range_listList;
- if (supi_range_list) {
- cJSON *supi_range_list_local_nonprimitive;
- if (!cJSON_IsArray(supi_range_list)) {
+ if (supi_range_list) {
+ cJSON *supi_range_list_local_nonprimitive;
+ if (!cJSON_IsArray(supi_range_list)){
+ ogs_error("OpenAPI_chf_info_parseFromJSON() failed [supi_range_list]");
+ goto end;
+ }
+
+ supi_range_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(supi_range_list_local_nonprimitive, supi_range_list ) {
+ if (!cJSON_IsObject(supi_range_list_local_nonprimitive)) {
ogs_error("OpenAPI_chf_info_parseFromJSON() failed [supi_range_list]");
goto end;
}
+ OpenAPI_supi_range_t *supi_range_listItem = OpenAPI_supi_range_parseFromJSON(supi_range_list_local_nonprimitive);
- supi_range_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(supi_range_list_local_nonprimitive, supi_range_list ) {
- if (!cJSON_IsObject(supi_range_list_local_nonprimitive)) {
- ogs_error("OpenAPI_chf_info_parseFromJSON() failed [supi_range_list]");
- goto end;
- }
- OpenAPI_supi_range_t *supi_range_listItem = OpenAPI_supi_range_parseFromJSON(supi_range_list_local_nonprimitive);
-
- OpenAPI_list_add(supi_range_listList, supi_range_listItem);
- }
+ OpenAPI_list_add(supi_range_listList, supi_range_listItem);
+ }
}
cJSON *gpsi_range_list = cJSON_GetObjectItemCaseSensitive(chf_infoJSON, "gpsiRangeList");
OpenAPI_list_t *gpsi_range_listList;
- if (gpsi_range_list) {
- cJSON *gpsi_range_list_local_nonprimitive;
- if (!cJSON_IsArray(gpsi_range_list)) {
+ if (gpsi_range_list) {
+ cJSON *gpsi_range_list_local_nonprimitive;
+ if (!cJSON_IsArray(gpsi_range_list)){
+ ogs_error("OpenAPI_chf_info_parseFromJSON() failed [gpsi_range_list]");
+ goto end;
+ }
+
+ gpsi_range_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(gpsi_range_list_local_nonprimitive, gpsi_range_list ) {
+ if (!cJSON_IsObject(gpsi_range_list_local_nonprimitive)) {
ogs_error("OpenAPI_chf_info_parseFromJSON() failed [gpsi_range_list]");
goto end;
}
+ OpenAPI_identity_range_t *gpsi_range_listItem = OpenAPI_identity_range_parseFromJSON(gpsi_range_list_local_nonprimitive);
- gpsi_range_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(gpsi_range_list_local_nonprimitive, gpsi_range_list ) {
- if (!cJSON_IsObject(gpsi_range_list_local_nonprimitive)) {
- ogs_error("OpenAPI_chf_info_parseFromJSON() failed [gpsi_range_list]");
- goto end;
- }
- OpenAPI_identity_range_t *gpsi_range_listItem = OpenAPI_identity_range_parseFromJSON(gpsi_range_list_local_nonprimitive);
-
- OpenAPI_list_add(gpsi_range_listList, gpsi_range_listItem);
- }
+ OpenAPI_list_add(gpsi_range_listList, gpsi_range_listItem);
+ }
}
cJSON *plmn_range_list = cJSON_GetObjectItemCaseSensitive(chf_infoJSON, "plmnRangeList");
OpenAPI_list_t *plmn_range_listList;
- if (plmn_range_list) {
- cJSON *plmn_range_list_local_nonprimitive;
- if (!cJSON_IsArray(plmn_range_list)) {
+ if (plmn_range_list) {
+ cJSON *plmn_range_list_local_nonprimitive;
+ if (!cJSON_IsArray(plmn_range_list)){
+ ogs_error("OpenAPI_chf_info_parseFromJSON() failed [plmn_range_list]");
+ goto end;
+ }
+
+ plmn_range_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(plmn_range_list_local_nonprimitive, plmn_range_list ) {
+ if (!cJSON_IsObject(plmn_range_list_local_nonprimitive)) {
ogs_error("OpenAPI_chf_info_parseFromJSON() failed [plmn_range_list]");
goto end;
}
+ OpenAPI_plmn_range_t *plmn_range_listItem = OpenAPI_plmn_range_parseFromJSON(plmn_range_list_local_nonprimitive);
- plmn_range_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(plmn_range_list_local_nonprimitive, plmn_range_list ) {
- if (!cJSON_IsObject(plmn_range_list_local_nonprimitive)) {
- ogs_error("OpenAPI_chf_info_parseFromJSON() failed [plmn_range_list]");
- goto end;
- }
- OpenAPI_plmn_range_t *plmn_range_listItem = OpenAPI_plmn_range_parseFromJSON(plmn_range_list_local_nonprimitive);
-
- OpenAPI_list_add(plmn_range_listList, plmn_range_listItem);
- }
+ OpenAPI_list_add(plmn_range_listList, plmn_range_listItem);
+ }
}
cJSON *group_id = cJSON_GetObjectItemCaseSensitive(chf_infoJSON, "groupId");
- if (group_id) {
- if (!cJSON_IsString(group_id)) {
- ogs_error("OpenAPI_chf_info_parseFromJSON() failed [group_id]");
- goto end;
- }
+ if (group_id) {
+ if (!cJSON_IsString(group_id)) {
+ ogs_error("OpenAPI_chf_info_parseFromJSON() failed [group_id]");
+ goto end;
+ }
+ }
+
+ cJSON *primary_chf_instance = cJSON_GetObjectItemCaseSensitive(chf_infoJSON, "primaryChfInstance");
+
+ if (primary_chf_instance) {
+ if (!cJSON_IsString(primary_chf_instance)) {
+ ogs_error("OpenAPI_chf_info_parseFromJSON() failed [primary_chf_instance]");
+ goto end;
+ }
+ }
+
+ cJSON *secondary_chf_instance = cJSON_GetObjectItemCaseSensitive(chf_infoJSON, "secondaryChfInstance");
+
+ if (secondary_chf_instance) {
+ if (!cJSON_IsString(secondary_chf_instance)) {
+ ogs_error("OpenAPI_chf_info_parseFromJSON() failed [secondary_chf_instance]");
+ goto end;
+ }
}
chf_info_local_var = OpenAPI_chf_info_create (
supi_range_list ? supi_range_listList : NULL,
gpsi_range_list ? gpsi_range_listList : NULL,
plmn_range_list ? plmn_range_listList : NULL,
- group_id ? ogs_strdup_or_assert(group_id->valuestring) : NULL
- );
+ group_id ? ogs_strdup_or_assert(group_id->valuestring) : NULL,
+ primary_chf_instance ? ogs_strdup_or_assert(primary_chf_instance->valuestring) : NULL,
+ secondary_chf_instance ? ogs_strdup_or_assert(secondary_chf_instance->valuestring) : NULL
+ );
return chf_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/chf_info.h b/lib/sbi/openapi/model/chf_info.h
index fe67367fb..c0448d8f0 100644
--- a/lib/sbi/openapi/model/chf_info.h
+++ b/lib/sbi/openapi/model/chf_info.h
@@ -26,14 +26,18 @@ typedef struct OpenAPI_chf_info_s {
OpenAPI_list_t *gpsi_range_list;
OpenAPI_list_t *plmn_range_list;
char *group_id;
+ char *primary_chf_instance;
+ char *secondary_chf_instance;
} OpenAPI_chf_info_t;
OpenAPI_chf_info_t *OpenAPI_chf_info_create(
OpenAPI_list_t *supi_range_list,
OpenAPI_list_t *gpsi_range_list,
OpenAPI_list_t *plmn_range_list,
- char *group_id
- );
+ char *group_id,
+ char *primary_chf_instance,
+ char *secondary_chf_instance
+);
void OpenAPI_chf_info_free(OpenAPI_chf_info_t *chf_info);
OpenAPI_chf_info_t *OpenAPI_chf_info_parseFromJSON(cJSON *chf_infoJSON);
cJSON *OpenAPI_chf_info_convertToJSON(OpenAPI_chf_info_t *chf_info);
diff --git a/lib/sbi/openapi/model/chf_service_info.c b/lib/sbi/openapi/model/chf_service_info.c
deleted file mode 100644
index abb3794b9..000000000
--- a/lib/sbi/openapi/model/chf_service_info.c
+++ /dev/null
@@ -1,125 +0,0 @@
-
-#include
-#include
-#include
-#include "chf_service_info.h"
-
-OpenAPI_chf_service_info_t *OpenAPI_chf_service_info_create(
- char *primary_chf_service_instance,
- char *secondary_chf_service_instance
- )
-{
- OpenAPI_chf_service_info_t *chf_service_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_chf_service_info_t));
- if (!chf_service_info_local_var) {
- return NULL;
- }
- chf_service_info_local_var->primary_chf_service_instance = primary_chf_service_instance;
- chf_service_info_local_var->secondary_chf_service_instance = secondary_chf_service_instance;
-
- return chf_service_info_local_var;
-}
-
-void OpenAPI_chf_service_info_free(OpenAPI_chf_service_info_t *chf_service_info)
-{
- if (NULL == chf_service_info) {
- return;
- }
- OpenAPI_lnode_t *node;
- ogs_free(chf_service_info->primary_chf_service_instance);
- ogs_free(chf_service_info->secondary_chf_service_instance);
- ogs_free(chf_service_info);
-}
-
-cJSON *OpenAPI_chf_service_info_convertToJSON(OpenAPI_chf_service_info_t *chf_service_info)
-{
- cJSON *item = NULL;
-
- if (chf_service_info == NULL) {
- ogs_error("OpenAPI_chf_service_info_convertToJSON() failed [ChfServiceInfo]");
- return NULL;
- }
-
- item = cJSON_CreateObject();
- if (chf_service_info->primary_chf_service_instance) {
- if (cJSON_AddStringToObject(item, "primaryChfServiceInstance", chf_service_info->primary_chf_service_instance) == NULL) {
- ogs_error("OpenAPI_chf_service_info_convertToJSON() failed [primary_chf_service_instance]");
- goto end;
- }
- }
-
- if (chf_service_info->secondary_chf_service_instance) {
- if (cJSON_AddStringToObject(item, "secondaryChfServiceInstance", chf_service_info->secondary_chf_service_instance) == NULL) {
- ogs_error("OpenAPI_chf_service_info_convertToJSON() failed [secondary_chf_service_instance]");
- goto end;
- }
- }
-
-end:
- return item;
-}
-
-OpenAPI_chf_service_info_t *OpenAPI_chf_service_info_parseFromJSON(cJSON *chf_service_infoJSON)
-{
- OpenAPI_chf_service_info_t *chf_service_info_local_var = NULL;
- cJSON *primary_chf_service_instance = cJSON_GetObjectItemCaseSensitive(chf_service_infoJSON, "primaryChfServiceInstance");
-
- if (primary_chf_service_instance) {
- if (!cJSON_IsString(primary_chf_service_instance)) {
- ogs_error("OpenAPI_chf_service_info_parseFromJSON() failed [primary_chf_service_instance]");
- goto end;
- }
- }
-
- cJSON *secondary_chf_service_instance = cJSON_GetObjectItemCaseSensitive(chf_service_infoJSON, "secondaryChfServiceInstance");
-
- if (secondary_chf_service_instance) {
- if (!cJSON_IsString(secondary_chf_service_instance)) {
- ogs_error("OpenAPI_chf_service_info_parseFromJSON() failed [secondary_chf_service_instance]");
- goto end;
- }
- }
-
- chf_service_info_local_var = OpenAPI_chf_service_info_create (
- primary_chf_service_instance ? ogs_strdup_or_assert(primary_chf_service_instance->valuestring) : NULL,
- secondary_chf_service_instance ? ogs_strdup_or_assert(secondary_chf_service_instance->valuestring) : NULL
- );
-
- return chf_service_info_local_var;
-end:
- return NULL;
-}
-
-OpenAPI_chf_service_info_t *OpenAPI_chf_service_info_copy(OpenAPI_chf_service_info_t *dst, OpenAPI_chf_service_info_t *src)
-{
- cJSON *item = NULL;
- char *content = NULL;
-
- ogs_assert(src);
- item = OpenAPI_chf_service_info_convertToJSON(src);
- if (!item) {
- ogs_error("OpenAPI_chf_service_info_convertToJSON() failed");
- return NULL;
- }
-
- content = cJSON_Print(item);
- cJSON_Delete(item);
-
- if (!content) {
- ogs_error("cJSON_Print() failed");
- return NULL;
- }
-
- item = cJSON_Parse(content);
- ogs_free(content);
- if (!item) {
- ogs_error("cJSON_Parse() failed");
- return NULL;
- }
-
- OpenAPI_chf_service_info_free(dst);
- dst = OpenAPI_chf_service_info_parseFromJSON(item);
- cJSON_Delete(item);
-
- return dst;
-}
-
diff --git a/lib/sbi/openapi/model/chf_service_info.h b/lib/sbi/openapi/model/chf_service_info.h
deleted file mode 100644
index 48b60f0e4..000000000
--- a/lib/sbi/openapi/model/chf_service_info.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * chf_service_info.h
- *
- * Information of primary and secondary CHF services
- */
-
-#ifndef _OpenAPI_chf_service_info_H_
-#define _OpenAPI_chf_service_info_H_
-
-#include
-#include "../external/cJSON.h"
-#include "../include/list.h"
-#include "../include/keyValuePair.h"
-#include "../include/binary.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct OpenAPI_chf_service_info_s OpenAPI_chf_service_info_t;
-typedef struct OpenAPI_chf_service_info_s {
- char *primary_chf_service_instance;
- char *secondary_chf_service_instance;
-} OpenAPI_chf_service_info_t;
-
-OpenAPI_chf_service_info_t *OpenAPI_chf_service_info_create(
- char *primary_chf_service_instance,
- char *secondary_chf_service_instance
- );
-void OpenAPI_chf_service_info_free(OpenAPI_chf_service_info_t *chf_service_info);
-OpenAPI_chf_service_info_t *OpenAPI_chf_service_info_parseFromJSON(cJSON *chf_service_infoJSON);
-cJSON *OpenAPI_chf_service_info_convertToJSON(OpenAPI_chf_service_info_t *chf_service_info);
-OpenAPI_chf_service_info_t *OpenAPI_chf_service_info_copy(OpenAPI_chf_service_info_t *dst, OpenAPI_chf_service_info_t *src);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _OpenAPI_chf_service_info_H_ */
-
diff --git a/lib/sbi/openapi/model/ciphering_algorithm.h b/lib/sbi/openapi/model/ciphering_algorithm.h
index 4ff701f8d..ad3a099a8 100644
--- a/lib/sbi/openapi/model/ciphering_algorithm.h
+++ b/lib/sbi/openapi/model/ciphering_algorithm.h
@@ -1,7 +1,7 @@
/*
* ciphering_algorithm.h
*
- *
+ *
*/
#ifndef _OpenAPI_ciphering_algorithm_H_
diff --git a/lib/sbi/openapi/model/civic_address.c b/lib/sbi/openapi/model/civic_address.c
index d3bfe110d..21a34f601 100644
--- a/lib/sbi/openapi/model/civic_address.c
+++ b/lib/sbi/openapi/model/civic_address.c
@@ -35,8 +35,11 @@ OpenAPI_civic_address_t *OpenAPI_civic_address_create(
char *rdbr,
char *rdsubbr,
char *prm,
- char *pom
- )
+ char *pom,
+ char *usage_rules,
+ char *method,
+ char *provided_by
+)
{
OpenAPI_civic_address_t *civic_address_local_var = OpenAPI_malloc(sizeof(OpenAPI_civic_address_t));
if (!civic_address_local_var) {
@@ -73,6 +76,9 @@ OpenAPI_civic_address_t *OpenAPI_civic_address_create(
civic_address_local_var->rdsubbr = rdsubbr;
civic_address_local_var->prm = prm;
civic_address_local_var->pom = pom;
+ civic_address_local_var->usage_rules = usage_rules;
+ civic_address_local_var->method = method;
+ civic_address_local_var->provided_by = provided_by;
return civic_address_local_var;
}
@@ -114,6 +120,9 @@ void OpenAPI_civic_address_free(OpenAPI_civic_address_t *civic_address)
ogs_free(civic_address->rdsubbr);
ogs_free(civic_address->prm);
ogs_free(civic_address->pom);
+ ogs_free(civic_address->usage_rules);
+ ogs_free(civic_address->method);
+ ogs_free(civic_address->provided_by);
ogs_free(civic_address);
}
@@ -128,220 +137,241 @@ cJSON *OpenAPI_civic_address_convertToJSON(OpenAPI_civic_address_t *civic_addres
item = cJSON_CreateObject();
if (civic_address->country) {
- if (cJSON_AddStringToObject(item, "country", civic_address->country) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [country]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "country", civic_address->country) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [country]");
+ goto end;
+ }
}
if (civic_address->a1) {
- if (cJSON_AddStringToObject(item, "A1", civic_address->a1) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [a1]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "A1", civic_address->a1) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [a1]");
+ goto end;
+ }
}
if (civic_address->a2) {
- if (cJSON_AddStringToObject(item, "A2", civic_address->a2) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [a2]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "A2", civic_address->a2) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [a2]");
+ goto end;
+ }
}
if (civic_address->a3) {
- if (cJSON_AddStringToObject(item, "A3", civic_address->a3) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [a3]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "A3", civic_address->a3) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [a3]");
+ goto end;
+ }
}
if (civic_address->a4) {
- if (cJSON_AddStringToObject(item, "A4", civic_address->a4) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [a4]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "A4", civic_address->a4) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [a4]");
+ goto end;
+ }
}
if (civic_address->a5) {
- if (cJSON_AddStringToObject(item, "A5", civic_address->a5) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [a5]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "A5", civic_address->a5) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [a5]");
+ goto end;
+ }
}
if (civic_address->a6) {
- if (cJSON_AddStringToObject(item, "A6", civic_address->a6) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [a6]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "A6", civic_address->a6) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [a6]");
+ goto end;
+ }
}
if (civic_address->prd) {
- if (cJSON_AddStringToObject(item, "PRD", civic_address->prd) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [prd]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "PRD", civic_address->prd) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [prd]");
+ goto end;
+ }
}
if (civic_address->pod) {
- if (cJSON_AddStringToObject(item, "POD", civic_address->pod) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [pod]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "POD", civic_address->pod) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [pod]");
+ goto end;
+ }
}
if (civic_address->sts) {
- if (cJSON_AddStringToObject(item, "STS", civic_address->sts) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [sts]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "STS", civic_address->sts) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [sts]");
+ goto end;
+ }
}
if (civic_address->hno) {
- if (cJSON_AddStringToObject(item, "HNO", civic_address->hno) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [hno]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "HNO", civic_address->hno) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [hno]");
+ goto end;
+ }
}
if (civic_address->hns) {
- if (cJSON_AddStringToObject(item, "HNS", civic_address->hns) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [hns]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "HNS", civic_address->hns) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [hns]");
+ goto end;
+ }
}
if (civic_address->lmk) {
- if (cJSON_AddStringToObject(item, "LMK", civic_address->lmk) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [lmk]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "LMK", civic_address->lmk) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [lmk]");
+ goto end;
+ }
}
if (civic_address->loc) {
- if (cJSON_AddStringToObject(item, "LOC", civic_address->loc) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [loc]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "LOC", civic_address->loc) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [loc]");
+ goto end;
+ }
}
if (civic_address->nam) {
- if (cJSON_AddStringToObject(item, "NAM", civic_address->nam) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [nam]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "NAM", civic_address->nam) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [nam]");
+ goto end;
+ }
}
if (civic_address->pc) {
- if (cJSON_AddStringToObject(item, "PC", civic_address->pc) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [pc]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "PC", civic_address->pc) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [pc]");
+ goto end;
+ }
}
if (civic_address->bld) {
- if (cJSON_AddStringToObject(item, "BLD", civic_address->bld) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [bld]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "BLD", civic_address->bld) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [bld]");
+ goto end;
+ }
}
if (civic_address->unit) {
- if (cJSON_AddStringToObject(item, "UNIT", civic_address->unit) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [unit]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "UNIT", civic_address->unit) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [unit]");
+ goto end;
+ }
}
if (civic_address->flr) {
- if (cJSON_AddStringToObject(item, "FLR", civic_address->flr) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [flr]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "FLR", civic_address->flr) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [flr]");
+ goto end;
+ }
}
if (civic_address->room) {
- if (cJSON_AddStringToObject(item, "ROOM", civic_address->room) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [room]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "ROOM", civic_address->room) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [room]");
+ goto end;
+ }
}
if (civic_address->plc) {
- if (cJSON_AddStringToObject(item, "PLC", civic_address->plc) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [plc]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "PLC", civic_address->plc) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [plc]");
+ goto end;
+ }
}
if (civic_address->pcn) {
- if (cJSON_AddStringToObject(item, "PCN", civic_address->pcn) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [pcn]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "PCN", civic_address->pcn) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [pcn]");
+ goto end;
+ }
}
if (civic_address->pobox) {
- if (cJSON_AddStringToObject(item, "POBOX", civic_address->pobox) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [pobox]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "POBOX", civic_address->pobox) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [pobox]");
+ goto end;
+ }
}
if (civic_address->addcode) {
- if (cJSON_AddStringToObject(item, "ADDCODE", civic_address->addcode) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [addcode]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "ADDCODE", civic_address->addcode) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [addcode]");
+ goto end;
+ }
}
if (civic_address->seat) {
- if (cJSON_AddStringToObject(item, "SEAT", civic_address->seat) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [seat]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "SEAT", civic_address->seat) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [seat]");
+ goto end;
+ }
}
if (civic_address->rd) {
- if (cJSON_AddStringToObject(item, "RD", civic_address->rd) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [rd]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "RD", civic_address->rd) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [rd]");
+ goto end;
+ }
}
if (civic_address->rdsec) {
- if (cJSON_AddStringToObject(item, "RDSEC", civic_address->rdsec) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [rdsec]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "RDSEC", civic_address->rdsec) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [rdsec]");
+ goto end;
+ }
}
if (civic_address->rdbr) {
- if (cJSON_AddStringToObject(item, "RDBR", civic_address->rdbr) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [rdbr]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "RDBR", civic_address->rdbr) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [rdbr]");
+ goto end;
+ }
}
if (civic_address->rdsubbr) {
- if (cJSON_AddStringToObject(item, "RDSUBBR", civic_address->rdsubbr) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [rdsubbr]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "RDSUBBR", civic_address->rdsubbr) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [rdsubbr]");
+ goto end;
+ }
}
if (civic_address->prm) {
- if (cJSON_AddStringToObject(item, "PRM", civic_address->prm) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [prm]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "PRM", civic_address->prm) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [prm]");
+ goto end;
+ }
}
if (civic_address->pom) {
- if (cJSON_AddStringToObject(item, "POM", civic_address->pom) == NULL) {
- ogs_error("OpenAPI_civic_address_convertToJSON() failed [pom]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "POM", civic_address->pom) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [pom]");
+ goto end;
+ }
+ }
+
+ if (civic_address->usage_rules) {
+ if (cJSON_AddStringToObject(item, "usageRules", civic_address->usage_rules) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [usage_rules]");
+ goto end;
+ }
+ }
+
+ if (civic_address->method) {
+ if (cJSON_AddStringToObject(item, "method", civic_address->method) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [method]");
+ goto end;
+ }
+ }
+
+ if (civic_address->provided_by) {
+ if (cJSON_AddStringToObject(item, "providedBy", civic_address->provided_by) == NULL) {
+ ogs_error("OpenAPI_civic_address_convertToJSON() failed [provided_by]");
+ goto end;
+ }
}
end:
@@ -353,281 +383,308 @@ OpenAPI_civic_address_t *OpenAPI_civic_address_parseFromJSON(cJSON *civic_addres
OpenAPI_civic_address_t *civic_address_local_var = NULL;
cJSON *country = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "country");
- if (country) {
- if (!cJSON_IsString(country)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [country]");
- goto end;
- }
+ if (country) {
+ if (!cJSON_IsString(country)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [country]");
+ goto end;
+ }
}
cJSON *a1 = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "A1");
- if (a1) {
- if (!cJSON_IsString(a1)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [a1]");
- goto end;
- }
+ if (a1) {
+ if (!cJSON_IsString(a1)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [a1]");
+ goto end;
+ }
}
cJSON *a2 = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "A2");
- if (a2) {
- if (!cJSON_IsString(a2)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [a2]");
- goto end;
- }
+ if (a2) {
+ if (!cJSON_IsString(a2)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [a2]");
+ goto end;
+ }
}
cJSON *a3 = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "A3");
- if (a3) {
- if (!cJSON_IsString(a3)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [a3]");
- goto end;
- }
+ if (a3) {
+ if (!cJSON_IsString(a3)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [a3]");
+ goto end;
+ }
}
cJSON *a4 = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "A4");
- if (a4) {
- if (!cJSON_IsString(a4)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [a4]");
- goto end;
- }
+ if (a4) {
+ if (!cJSON_IsString(a4)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [a4]");
+ goto end;
+ }
}
cJSON *a5 = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "A5");
- if (a5) {
- if (!cJSON_IsString(a5)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [a5]");
- goto end;
- }
+ if (a5) {
+ if (!cJSON_IsString(a5)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [a5]");
+ goto end;
+ }
}
cJSON *a6 = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "A6");
- if (a6) {
- if (!cJSON_IsString(a6)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [a6]");
- goto end;
- }
+ if (a6) {
+ if (!cJSON_IsString(a6)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [a6]");
+ goto end;
+ }
}
cJSON *prd = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "PRD");
- if (prd) {
- if (!cJSON_IsString(prd)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [prd]");
- goto end;
- }
+ if (prd) {
+ if (!cJSON_IsString(prd)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [prd]");
+ goto end;
+ }
}
cJSON *pod = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "POD");
- if (pod) {
- if (!cJSON_IsString(pod)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [pod]");
- goto end;
- }
+ if (pod) {
+ if (!cJSON_IsString(pod)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [pod]");
+ goto end;
+ }
}
cJSON *sts = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "STS");
- if (sts) {
- if (!cJSON_IsString(sts)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [sts]");
- goto end;
- }
+ if (sts) {
+ if (!cJSON_IsString(sts)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [sts]");
+ goto end;
+ }
}
cJSON *hno = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "HNO");
- if (hno) {
- if (!cJSON_IsString(hno)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [hno]");
- goto end;
- }
+ if (hno) {
+ if (!cJSON_IsString(hno)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [hno]");
+ goto end;
+ }
}
cJSON *hns = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "HNS");
- if (hns) {
- if (!cJSON_IsString(hns)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [hns]");
- goto end;
- }
+ if (hns) {
+ if (!cJSON_IsString(hns)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [hns]");
+ goto end;
+ }
}
cJSON *lmk = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "LMK");
- if (lmk) {
- if (!cJSON_IsString(lmk)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [lmk]");
- goto end;
- }
+ if (lmk) {
+ if (!cJSON_IsString(lmk)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [lmk]");
+ goto end;
+ }
}
cJSON *loc = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "LOC");
- if (loc) {
- if (!cJSON_IsString(loc)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [loc]");
- goto end;
- }
+ if (loc) {
+ if (!cJSON_IsString(loc)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [loc]");
+ goto end;
+ }
}
cJSON *nam = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "NAM");
- if (nam) {
- if (!cJSON_IsString(nam)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [nam]");
- goto end;
- }
+ if (nam) {
+ if (!cJSON_IsString(nam)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [nam]");
+ goto end;
+ }
}
cJSON *pc = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "PC");
- if (pc) {
- if (!cJSON_IsString(pc)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [pc]");
- goto end;
- }
+ if (pc) {
+ if (!cJSON_IsString(pc)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [pc]");
+ goto end;
+ }
}
cJSON *bld = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "BLD");
- if (bld) {
- if (!cJSON_IsString(bld)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [bld]");
- goto end;
- }
+ if (bld) {
+ if (!cJSON_IsString(bld)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [bld]");
+ goto end;
+ }
}
cJSON *unit = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "UNIT");
- if (unit) {
- if (!cJSON_IsString(unit)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [unit]");
- goto end;
- }
+ if (unit) {
+ if (!cJSON_IsString(unit)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [unit]");
+ goto end;
+ }
}
cJSON *flr = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "FLR");
- if (flr) {
- if (!cJSON_IsString(flr)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [flr]");
- goto end;
- }
+ if (flr) {
+ if (!cJSON_IsString(flr)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [flr]");
+ goto end;
+ }
}
cJSON *room = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "ROOM");
- if (room) {
- if (!cJSON_IsString(room)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [room]");
- goto end;
- }
+ if (room) {
+ if (!cJSON_IsString(room)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [room]");
+ goto end;
+ }
}
cJSON *plc = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "PLC");
- if (plc) {
- if (!cJSON_IsString(plc)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [plc]");
- goto end;
- }
+ if (plc) {
+ if (!cJSON_IsString(plc)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [plc]");
+ goto end;
+ }
}
cJSON *pcn = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "PCN");
- if (pcn) {
- if (!cJSON_IsString(pcn)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [pcn]");
- goto end;
- }
+ if (pcn) {
+ if (!cJSON_IsString(pcn)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [pcn]");
+ goto end;
+ }
}
cJSON *pobox = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "POBOX");
- if (pobox) {
- if (!cJSON_IsString(pobox)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [pobox]");
- goto end;
- }
+ if (pobox) {
+ if (!cJSON_IsString(pobox)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [pobox]");
+ goto end;
+ }
}
cJSON *addcode = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "ADDCODE");
- if (addcode) {
- if (!cJSON_IsString(addcode)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [addcode]");
- goto end;
- }
+ if (addcode) {
+ if (!cJSON_IsString(addcode)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [addcode]");
+ goto end;
+ }
}
cJSON *seat = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "SEAT");
- if (seat) {
- if (!cJSON_IsString(seat)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [seat]");
- goto end;
- }
+ if (seat) {
+ if (!cJSON_IsString(seat)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [seat]");
+ goto end;
+ }
}
cJSON *rd = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "RD");
- if (rd) {
- if (!cJSON_IsString(rd)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [rd]");
- goto end;
- }
+ if (rd) {
+ if (!cJSON_IsString(rd)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [rd]");
+ goto end;
+ }
}
cJSON *rdsec = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "RDSEC");
- if (rdsec) {
- if (!cJSON_IsString(rdsec)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [rdsec]");
- goto end;
- }
+ if (rdsec) {
+ if (!cJSON_IsString(rdsec)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [rdsec]");
+ goto end;
+ }
}
cJSON *rdbr = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "RDBR");
- if (rdbr) {
- if (!cJSON_IsString(rdbr)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [rdbr]");
- goto end;
- }
+ if (rdbr) {
+ if (!cJSON_IsString(rdbr)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [rdbr]");
+ goto end;
+ }
}
cJSON *rdsubbr = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "RDSUBBR");
- if (rdsubbr) {
- if (!cJSON_IsString(rdsubbr)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [rdsubbr]");
- goto end;
- }
+ if (rdsubbr) {
+ if (!cJSON_IsString(rdsubbr)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [rdsubbr]");
+ goto end;
+ }
}
cJSON *prm = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "PRM");
- if (prm) {
- if (!cJSON_IsString(prm)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [prm]");
- goto end;
- }
+ if (prm) {
+ if (!cJSON_IsString(prm)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [prm]");
+ goto end;
+ }
}
cJSON *pom = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "POM");
- if (pom) {
- if (!cJSON_IsString(pom)) {
- ogs_error("OpenAPI_civic_address_parseFromJSON() failed [pom]");
- goto end;
- }
+ if (pom) {
+ if (!cJSON_IsString(pom)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [pom]");
+ goto end;
+ }
+ }
+
+ cJSON *usage_rules = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "usageRules");
+
+ if (usage_rules) {
+ if (!cJSON_IsString(usage_rules)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [usage_rules]");
+ goto end;
+ }
+ }
+
+ cJSON *method = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "method");
+
+ if (method) {
+ if (!cJSON_IsString(method)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [method]");
+ goto end;
+ }
+ }
+
+ cJSON *provided_by = cJSON_GetObjectItemCaseSensitive(civic_addressJSON, "providedBy");
+
+ if (provided_by) {
+ if (!cJSON_IsString(provided_by)) {
+ ogs_error("OpenAPI_civic_address_parseFromJSON() failed [provided_by]");
+ goto end;
+ }
}
civic_address_local_var = OpenAPI_civic_address_create (
@@ -661,8 +718,11 @@ OpenAPI_civic_address_t *OpenAPI_civic_address_parseFromJSON(cJSON *civic_addres
rdbr ? ogs_strdup_or_assert(rdbr->valuestring) : NULL,
rdsubbr ? ogs_strdup_or_assert(rdsubbr->valuestring) : NULL,
prm ? ogs_strdup_or_assert(prm->valuestring) : NULL,
- pom ? ogs_strdup_or_assert(pom->valuestring) : NULL
- );
+ pom ? ogs_strdup_or_assert(pom->valuestring) : NULL,
+ usage_rules ? ogs_strdup_or_assert(usage_rules->valuestring) : NULL,
+ method ? ogs_strdup_or_assert(method->valuestring) : NULL,
+ provided_by ? ogs_strdup_or_assert(provided_by->valuestring) : NULL
+ );
return civic_address_local_var;
end:
diff --git a/lib/sbi/openapi/model/civic_address.h b/lib/sbi/openapi/model/civic_address.h
index 19639b837..79b846796 100644
--- a/lib/sbi/openapi/model/civic_address.h
+++ b/lib/sbi/openapi/model/civic_address.h
@@ -1,7 +1,7 @@
/*
* civic_address.h
*
- *
+ *
*/
#ifndef _OpenAPI_civic_address_H_
@@ -50,6 +50,9 @@ typedef struct OpenAPI_civic_address_s {
char *rdsubbr;
char *prm;
char *pom;
+ char *usage_rules;
+ char *method;
+ char *provided_by;
} OpenAPI_civic_address_t;
OpenAPI_civic_address_t *OpenAPI_civic_address_create(
@@ -83,8 +86,11 @@ OpenAPI_civic_address_t *OpenAPI_civic_address_create(
char *rdbr,
char *rdsubbr,
char *prm,
- char *pom
- );
+ char *pom,
+ char *usage_rules,
+ char *method,
+ char *provided_by
+);
void OpenAPI_civic_address_free(OpenAPI_civic_address_t *civic_address);
OpenAPI_civic_address_t *OpenAPI_civic_address_parseFromJSON(cJSON *civic_addressJSON);
cJSON *OpenAPI_civic_address_convertToJSON(OpenAPI_civic_address_t *civic_address);
diff --git a/lib/sbi/openapi/model/cm_info.c b/lib/sbi/openapi/model/cm_info.c
index 7cb4ee2e9..5262aa9fb 100644
--- a/lib/sbi/openapi/model/cm_info.c
+++ b/lib/sbi/openapi/model/cm_info.c
@@ -7,7 +7,7 @@
OpenAPI_cm_info_t *OpenAPI_cm_info_create(
OpenAPI_cm_state_t *cm_state,
OpenAPI_access_type_e access_type
- )
+)
{
OpenAPI_cm_info_t *cm_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_cm_info_t));
if (!cm_info_local_var) {
@@ -69,7 +69,7 @@ OpenAPI_cm_info_t *OpenAPI_cm_info_parseFromJSON(cJSON *cm_infoJSON)
}
OpenAPI_cm_state_t *cm_state_local_nonprim = NULL;
-
+
cm_state_local_nonprim = OpenAPI_cm_state_parseFromJSON(cm_state);
cJSON *access_type = cJSON_GetObjectItemCaseSensitive(cm_infoJSON, "accessType");
@@ -79,7 +79,7 @@ OpenAPI_cm_info_t *OpenAPI_cm_info_parseFromJSON(cJSON *cm_infoJSON)
}
OpenAPI_access_type_e access_typeVariable;
-
+
if (!cJSON_IsString(access_type)) {
ogs_error("OpenAPI_cm_info_parseFromJSON() failed [access_type]");
goto end;
@@ -89,7 +89,7 @@ OpenAPI_cm_info_t *OpenAPI_cm_info_parseFromJSON(cJSON *cm_infoJSON)
cm_info_local_var = OpenAPI_cm_info_create (
cm_state_local_nonprim,
access_typeVariable
- );
+ );
return cm_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/cm_info.h b/lib/sbi/openapi/model/cm_info.h
index ce20fac8b..cc3e0708b 100644
--- a/lib/sbi/openapi/model/cm_info.h
+++ b/lib/sbi/openapi/model/cm_info.h
@@ -1,7 +1,7 @@
/*
* cm_info.h
*
- *
+ *
*/
#ifndef _OpenAPI_cm_info_H_
@@ -28,7 +28,7 @@ typedef struct OpenAPI_cm_info_s {
OpenAPI_cm_info_t *OpenAPI_cm_info_create(
OpenAPI_cm_state_t *cm_state,
OpenAPI_access_type_e access_type
- );
+);
void OpenAPI_cm_info_free(OpenAPI_cm_info_t *cm_info);
OpenAPI_cm_info_t *OpenAPI_cm_info_parseFromJSON(cJSON *cm_infoJSON);
cJSON *OpenAPI_cm_info_convertToJSON(OpenAPI_cm_info_t *cm_info);
diff --git a/lib/sbi/openapi/model/cm_state.c b/lib/sbi/openapi/model/cm_state.c
index daf1d6a01..75c6060d6 100644
--- a/lib/sbi/openapi/model/cm_state.c
+++ b/lib/sbi/openapi/model/cm_state.c
@@ -5,7 +5,7 @@
#include "cm_state.h"
OpenAPI_cm_state_t *OpenAPI_cm_state_create(
- )
+)
{
OpenAPI_cm_state_t *cm_state_local_var = OpenAPI_malloc(sizeof(OpenAPI_cm_state_t));
if (!cm_state_local_var) {
@@ -42,7 +42,7 @@ OpenAPI_cm_state_t *OpenAPI_cm_state_parseFromJSON(cJSON *cm_stateJSON)
{
OpenAPI_cm_state_t *cm_state_local_var = NULL;
cm_state_local_var = OpenAPI_cm_state_create (
- );
+ );
return cm_state_local_var;
end:
diff --git a/lib/sbi/openapi/model/cm_state.h b/lib/sbi/openapi/model/cm_state.h
index c5809ec8d..f85a3160e 100644
--- a/lib/sbi/openapi/model/cm_state.h
+++ b/lib/sbi/openapi/model/cm_state.h
@@ -1,7 +1,7 @@
/*
* cm_state.h
*
- *
+ *
*/
#ifndef _OpenAPI_cm_state_H_
@@ -12,6 +12,7 @@
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
+#include "cm_state_any_of.h"
#ifdef __cplusplus
extern "C" {
@@ -22,7 +23,7 @@ typedef struct OpenAPI_cm_state_s {
} OpenAPI_cm_state_t;
OpenAPI_cm_state_t *OpenAPI_cm_state_create(
- );
+);
void OpenAPI_cm_state_free(OpenAPI_cm_state_t *cm_state);
OpenAPI_cm_state_t *OpenAPI_cm_state_parseFromJSON(cJSON *cm_stateJSON);
cJSON *OpenAPI_cm_state_convertToJSON(OpenAPI_cm_state_t *cm_state);
diff --git a/lib/sbi/openapi/model/cm_state_any_of.c b/lib/sbi/openapi/model/cm_state_any_of.c
new file mode 100644
index 000000000..c0803f3b3
--- /dev/null
+++ b/lib/sbi/openapi/model/cm_state_any_of.c
@@ -0,0 +1,30 @@
+
+#include
+#include
+#include
+#include "cm_state_any_of.h"
+
+char* OpenAPI_cm_state_any_of_ToString(OpenAPI_cm_state_any_of_e cm_state_any_of)
+{
+ const char *cm_state_any_ofArray[] = { "NULL", "IDLE", "CONNECTED" };
+ size_t sizeofArray = sizeof(cm_state_any_ofArray) / sizeof(cm_state_any_ofArray[0]);
+ if (cm_state_any_of < sizeofArray)
+ return (char *)cm_state_any_ofArray[cm_state_any_of];
+ else
+ return (char *)"Unknown";
+}
+
+OpenAPI_cm_state_any_of_e OpenAPI_cm_state_any_of_FromString(char* cm_state_any_of)
+{
+ int stringToReturn = 0;
+ const char *cm_state_any_ofArray[] = { "NULL", "IDLE", "CONNECTED" };
+ size_t sizeofArray = sizeof(cm_state_any_ofArray) / sizeof(cm_state_any_ofArray[0]);
+ while (stringToReturn < sizeofArray) {
+ if (strcmp(cm_state_any_of, cm_state_any_ofArray[stringToReturn]) == 0) {
+ return stringToReturn;
+ }
+ stringToReturn++;
+ }
+ return 0;
+}
+
diff --git a/lib/sbi/openapi/model/cm_state_any_of.h b/lib/sbi/openapi/model/cm_state_any_of.h
new file mode 100644
index 000000000..4bb4a4599
--- /dev/null
+++ b/lib/sbi/openapi/model/cm_state_any_of.h
@@ -0,0 +1,31 @@
+/*
+ * cm_state_any_of.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_cm_state_any_of_H_
+#define _OpenAPI_cm_state_any_of_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum { OpenAPI_cm_state_any_of_NULL = 0, OpenAPI_cm_state_any_of_IDLE, OpenAPI_cm_state_any_of_CONNECTED } OpenAPI_cm_state_any_of_e;
+
+char* OpenAPI_cm_state_any_of_ToString(OpenAPI_cm_state_any_of_e cm_state_any_of);
+
+OpenAPI_cm_state_any_of_e OpenAPI_cm_state_any_of_FromString(char* cm_state_any_of);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_cm_state_any_of_H_ */
+
diff --git a/lib/sbi/openapi/model/cn_assisted_ran_para.c b/lib/sbi/openapi/model/cn_assisted_ran_para.c
index 9da31438c..aa476e56b 100644
--- a/lib/sbi/openapi/model/cn_assisted_ran_para.c
+++ b/lib/sbi/openapi/model/cn_assisted_ran_para.c
@@ -12,7 +12,7 @@ OpenAPI_cn_assisted_ran_para_t *OpenAPI_cn_assisted_ran_para_create(
OpenAPI_scheduled_communication_type_e scheduled_communication_type,
OpenAPI_traffic_profile_e traffic_profile,
OpenAPI_battery_indication_t *battery_indication
- )
+)
{
OpenAPI_cn_assisted_ran_para_t *cn_assisted_ran_para_local_var = OpenAPI_malloc(sizeof(OpenAPI_cn_assisted_ran_para_t));
if (!cn_assisted_ran_para_local_var) {
@@ -51,64 +51,64 @@ cJSON *OpenAPI_cn_assisted_ran_para_convertToJSON(OpenAPI_cn_assisted_ran_para_t
item = cJSON_CreateObject();
if (cn_assisted_ran_para->stationary_indication) {
- if (cJSON_AddStringToObject(item, "stationaryIndication", OpenAPI_stationary_indication_ToString(cn_assisted_ran_para->stationary_indication)) == NULL) {
- ogs_error("OpenAPI_cn_assisted_ran_para_convertToJSON() failed [stationary_indication]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "stationaryIndication", OpenAPI_stationary_indication_ToString(cn_assisted_ran_para->stationary_indication)) == NULL) {
+ ogs_error("OpenAPI_cn_assisted_ran_para_convertToJSON() failed [stationary_indication]");
+ goto end;
+ }
}
if (cn_assisted_ran_para->communication_duration_time) {
- if (cJSON_AddNumberToObject(item, "communicationDurationTime", cn_assisted_ran_para->communication_duration_time) == NULL) {
- ogs_error("OpenAPI_cn_assisted_ran_para_convertToJSON() failed [communication_duration_time]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "communicationDurationTime", cn_assisted_ran_para->communication_duration_time) == NULL) {
+ ogs_error("OpenAPI_cn_assisted_ran_para_convertToJSON() failed [communication_duration_time]");
+ goto end;
+ }
}
if (cn_assisted_ran_para->periodic_time) {
- if (cJSON_AddNumberToObject(item, "periodicTime", cn_assisted_ran_para->periodic_time) == NULL) {
- ogs_error("OpenAPI_cn_assisted_ran_para_convertToJSON() failed [periodic_time]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "periodicTime", cn_assisted_ran_para->periodic_time) == NULL) {
+ ogs_error("OpenAPI_cn_assisted_ran_para_convertToJSON() failed [periodic_time]");
+ goto end;
+ }
}
if (cn_assisted_ran_para->scheduled_communication_time) {
- cJSON *scheduled_communication_time_local_JSON = OpenAPI_scheduled_communication_time_convertToJSON(cn_assisted_ran_para->scheduled_communication_time);
- if (scheduled_communication_time_local_JSON == NULL) {
- ogs_error("OpenAPI_cn_assisted_ran_para_convertToJSON() failed [scheduled_communication_time]");
- goto end;
- }
- cJSON_AddItemToObject(item, "scheduledCommunicationTime", scheduled_communication_time_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_cn_assisted_ran_para_convertToJSON() failed [scheduled_communication_time]");
- goto end;
- }
+ cJSON *scheduled_communication_time_local_JSON = OpenAPI_scheduled_communication_time_convertToJSON(cn_assisted_ran_para->scheduled_communication_time);
+ if (scheduled_communication_time_local_JSON == NULL) {
+ ogs_error("OpenAPI_cn_assisted_ran_para_convertToJSON() failed [scheduled_communication_time]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "scheduledCommunicationTime", scheduled_communication_time_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_cn_assisted_ran_para_convertToJSON() failed [scheduled_communication_time]");
+ goto end;
+ }
}
if (cn_assisted_ran_para->scheduled_communication_type) {
- if (cJSON_AddStringToObject(item, "scheduledCommunicationType", OpenAPI_scheduled_communication_type_ToString(cn_assisted_ran_para->scheduled_communication_type)) == NULL) {
- ogs_error("OpenAPI_cn_assisted_ran_para_convertToJSON() failed [scheduled_communication_type]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "scheduledCommunicationType", OpenAPI_scheduled_communication_type_ToString(cn_assisted_ran_para->scheduled_communication_type)) == NULL) {
+ ogs_error("OpenAPI_cn_assisted_ran_para_convertToJSON() failed [scheduled_communication_type]");
+ goto end;
+ }
}
if (cn_assisted_ran_para->traffic_profile) {
- if (cJSON_AddStringToObject(item, "trafficProfile", OpenAPI_traffic_profile_ToString(cn_assisted_ran_para->traffic_profile)) == NULL) {
- ogs_error("OpenAPI_cn_assisted_ran_para_convertToJSON() failed [traffic_profile]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "trafficProfile", OpenAPI_traffic_profile_ToString(cn_assisted_ran_para->traffic_profile)) == NULL) {
+ ogs_error("OpenAPI_cn_assisted_ran_para_convertToJSON() failed [traffic_profile]");
+ goto end;
+ }
}
if (cn_assisted_ran_para->battery_indication) {
- cJSON *battery_indication_local_JSON = OpenAPI_battery_indication_convertToJSON(cn_assisted_ran_para->battery_indication);
- if (battery_indication_local_JSON == NULL) {
- ogs_error("OpenAPI_cn_assisted_ran_para_convertToJSON() failed [battery_indication]");
- goto end;
- }
- cJSON_AddItemToObject(item, "batteryIndication", battery_indication_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_cn_assisted_ran_para_convertToJSON() failed [battery_indication]");
- goto end;
- }
+ cJSON *battery_indication_local_JSON = OpenAPI_battery_indication_convertToJSON(cn_assisted_ran_para->battery_indication);
+ if (battery_indication_local_JSON == NULL) {
+ ogs_error("OpenAPI_cn_assisted_ran_para_convertToJSON() failed [battery_indication]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "batteryIndication", battery_indication_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_cn_assisted_ran_para_convertToJSON() failed [battery_indication]");
+ goto end;
+ }
}
end:
@@ -121,66 +121,66 @@ OpenAPI_cn_assisted_ran_para_t *OpenAPI_cn_assisted_ran_para_parseFromJSON(cJSON
cJSON *stationary_indication = cJSON_GetObjectItemCaseSensitive(cn_assisted_ran_paraJSON, "stationaryIndication");
OpenAPI_stationary_indication_e stationary_indicationVariable;
- if (stationary_indication) {
- if (!cJSON_IsString(stationary_indication)) {
- ogs_error("OpenAPI_cn_assisted_ran_para_parseFromJSON() failed [stationary_indication]");
- goto end;
- }
- stationary_indicationVariable = OpenAPI_stationary_indication_FromString(stationary_indication->valuestring);
+ if (stationary_indication) {
+ if (!cJSON_IsString(stationary_indication)) {
+ ogs_error("OpenAPI_cn_assisted_ran_para_parseFromJSON() failed [stationary_indication]");
+ goto end;
+ }
+ stationary_indicationVariable = OpenAPI_stationary_indication_FromString(stationary_indication->valuestring);
}
cJSON *communication_duration_time = cJSON_GetObjectItemCaseSensitive(cn_assisted_ran_paraJSON, "communicationDurationTime");
- if (communication_duration_time) {
- if (!cJSON_IsNumber(communication_duration_time)) {
- ogs_error("OpenAPI_cn_assisted_ran_para_parseFromJSON() failed [communication_duration_time]");
- goto end;
- }
+ if (communication_duration_time) {
+ if (!cJSON_IsNumber(communication_duration_time)) {
+ ogs_error("OpenAPI_cn_assisted_ran_para_parseFromJSON() failed [communication_duration_time]");
+ goto end;
+ }
}
cJSON *periodic_time = cJSON_GetObjectItemCaseSensitive(cn_assisted_ran_paraJSON, "periodicTime");
- if (periodic_time) {
- if (!cJSON_IsNumber(periodic_time)) {
- ogs_error("OpenAPI_cn_assisted_ran_para_parseFromJSON() failed [periodic_time]");
- goto end;
- }
+ if (periodic_time) {
+ if (!cJSON_IsNumber(periodic_time)) {
+ ogs_error("OpenAPI_cn_assisted_ran_para_parseFromJSON() failed [periodic_time]");
+ goto end;
+ }
}
cJSON *scheduled_communication_time = cJSON_GetObjectItemCaseSensitive(cn_assisted_ran_paraJSON, "scheduledCommunicationTime");
OpenAPI_scheduled_communication_time_t *scheduled_communication_time_local_nonprim = NULL;
- if (scheduled_communication_time) {
- scheduled_communication_time_local_nonprim = OpenAPI_scheduled_communication_time_parseFromJSON(scheduled_communication_time);
+ if (scheduled_communication_time) {
+ scheduled_communication_time_local_nonprim = OpenAPI_scheduled_communication_time_parseFromJSON(scheduled_communication_time);
}
cJSON *scheduled_communication_type = cJSON_GetObjectItemCaseSensitive(cn_assisted_ran_paraJSON, "scheduledCommunicationType");
OpenAPI_scheduled_communication_type_e scheduled_communication_typeVariable;
- if (scheduled_communication_type) {
- if (!cJSON_IsString(scheduled_communication_type)) {
- ogs_error("OpenAPI_cn_assisted_ran_para_parseFromJSON() failed [scheduled_communication_type]");
- goto end;
- }
- scheduled_communication_typeVariable = OpenAPI_scheduled_communication_type_FromString(scheduled_communication_type->valuestring);
+ if (scheduled_communication_type) {
+ if (!cJSON_IsString(scheduled_communication_type)) {
+ ogs_error("OpenAPI_cn_assisted_ran_para_parseFromJSON() failed [scheduled_communication_type]");
+ goto end;
+ }
+ scheduled_communication_typeVariable = OpenAPI_scheduled_communication_type_FromString(scheduled_communication_type->valuestring);
}
cJSON *traffic_profile = cJSON_GetObjectItemCaseSensitive(cn_assisted_ran_paraJSON, "trafficProfile");
OpenAPI_traffic_profile_e traffic_profileVariable;
- if (traffic_profile) {
- if (!cJSON_IsString(traffic_profile)) {
- ogs_error("OpenAPI_cn_assisted_ran_para_parseFromJSON() failed [traffic_profile]");
- goto end;
- }
- traffic_profileVariable = OpenAPI_traffic_profile_FromString(traffic_profile->valuestring);
+ if (traffic_profile) {
+ if (!cJSON_IsString(traffic_profile)) {
+ ogs_error("OpenAPI_cn_assisted_ran_para_parseFromJSON() failed [traffic_profile]");
+ goto end;
+ }
+ traffic_profileVariable = OpenAPI_traffic_profile_FromString(traffic_profile->valuestring);
}
cJSON *battery_indication = cJSON_GetObjectItemCaseSensitive(cn_assisted_ran_paraJSON, "batteryIndication");
OpenAPI_battery_indication_t *battery_indication_local_nonprim = NULL;
- if (battery_indication) {
- battery_indication_local_nonprim = OpenAPI_battery_indication_parseFromJSON(battery_indication);
+ if (battery_indication) {
+ battery_indication_local_nonprim = OpenAPI_battery_indication_parseFromJSON(battery_indication);
}
cn_assisted_ran_para_local_var = OpenAPI_cn_assisted_ran_para_create (
@@ -191,7 +191,7 @@ OpenAPI_cn_assisted_ran_para_t *OpenAPI_cn_assisted_ran_para_parseFromJSON(cJSON
scheduled_communication_type ? scheduled_communication_typeVariable : 0,
traffic_profile ? traffic_profileVariable : 0,
battery_indication ? battery_indication_local_nonprim : NULL
- );
+ );
return cn_assisted_ran_para_local_var;
end:
diff --git a/lib/sbi/openapi/model/cn_assisted_ran_para.h b/lib/sbi/openapi/model/cn_assisted_ran_para.h
index c316f62a3..b456e0ff7 100644
--- a/lib/sbi/openapi/model/cn_assisted_ran_para.h
+++ b/lib/sbi/openapi/model/cn_assisted_ran_para.h
@@ -1,7 +1,7 @@
/*
* cn_assisted_ran_para.h
*
- *
+ *
*/
#ifndef _OpenAPI_cn_assisted_ran_para_H_
@@ -41,7 +41,7 @@ OpenAPI_cn_assisted_ran_para_t *OpenAPI_cn_assisted_ran_para_create(
OpenAPI_scheduled_communication_type_e scheduled_communication_type,
OpenAPI_traffic_profile_e traffic_profile,
OpenAPI_battery_indication_t *battery_indication
- );
+);
void OpenAPI_cn_assisted_ran_para_free(OpenAPI_cn_assisted_ran_para_t *cn_assisted_ran_para);
OpenAPI_cn_assisted_ran_para_t *OpenAPI_cn_assisted_ran_para_parseFromJSON(cJSON *cn_assisted_ran_paraJSON);
cJSON *OpenAPI_cn_assisted_ran_para_convertToJSON(OpenAPI_cn_assisted_ran_para_t *cn_assisted_ran_para);
diff --git a/lib/sbi/openapi/model/cnf.c b/lib/sbi/openapi/model/cnf.c
index 3c522458c..d8cbe1b89 100644
--- a/lib/sbi/openapi/model/cnf.c
+++ b/lib/sbi/openapi/model/cnf.c
@@ -6,7 +6,7 @@
OpenAPI_cnf_t *OpenAPI_cnf_create(
OpenAPI_list_t *cnf_units
- )
+)
{
OpenAPI_cnf_t *cnf_local_var = OpenAPI_malloc(sizeof(OpenAPI_cnf_t));
if (!cnf_local_var) {
@@ -72,9 +72,9 @@ OpenAPI_cnf_t *OpenAPI_cnf_parseFromJSON(cJSON *cnfJSON)
}
OpenAPI_list_t *cnf_unitsList;
-
+
cJSON *cnf_units_local_nonprimitive;
- if (!cJSON_IsArray(cnf_units)) {
+ if (!cJSON_IsArray(cnf_units)){
ogs_error("OpenAPI_cnf_parseFromJSON() failed [cnf_units]");
goto end;
}
@@ -93,7 +93,7 @@ OpenAPI_cnf_t *OpenAPI_cnf_parseFromJSON(cJSON *cnfJSON)
cnf_local_var = OpenAPI_cnf_create (
cnf_unitsList
- );
+ );
return cnf_local_var;
end:
diff --git a/lib/sbi/openapi/model/cnf.h b/lib/sbi/openapi/model/cnf.h
index 83cc46230..27a4e5ce1 100644
--- a/lib/sbi/openapi/model/cnf.h
+++ b/lib/sbi/openapi/model/cnf.h
@@ -1,7 +1,7 @@
/*
* cnf.h
*
- *
+ *
*/
#ifndef _OpenAPI_cnf_H_
@@ -25,7 +25,7 @@ typedef struct OpenAPI_cnf_s {
OpenAPI_cnf_t *OpenAPI_cnf_create(
OpenAPI_list_t *cnf_units
- );
+);
void OpenAPI_cnf_free(OpenAPI_cnf_t *cnf);
OpenAPI_cnf_t *OpenAPI_cnf_parseFromJSON(cJSON *cnfJSON);
cJSON *OpenAPI_cnf_convertToJSON(OpenAPI_cnf_t *cnf);
diff --git a/lib/sbi/openapi/model/cnf_unit.c b/lib/sbi/openapi/model/cnf_unit.c
index 9ef5117e5..37fac6311 100644
--- a/lib/sbi/openapi/model/cnf_unit.c
+++ b/lib/sbi/openapi/model/cnf_unit.c
@@ -6,7 +6,7 @@
OpenAPI_cnf_unit_t *OpenAPI_cnf_unit_create(
OpenAPI_list_t *cnf_unit
- )
+)
{
OpenAPI_cnf_unit_t *cnf_unit_local_var = OpenAPI_malloc(sizeof(OpenAPI_cnf_unit_t));
if (!cnf_unit_local_var) {
@@ -72,9 +72,9 @@ OpenAPI_cnf_unit_t *OpenAPI_cnf_unit_parseFromJSON(cJSON *cnf_unitJSON)
}
OpenAPI_list_t *cnf_unitList;
-
+
cJSON *cnf_unit_local_nonprimitive;
- if (!cJSON_IsArray(cnf_unit)) {
+ if (!cJSON_IsArray(cnf_unit)){
ogs_error("OpenAPI_cnf_unit_parseFromJSON() failed [cnf_unit]");
goto end;
}
@@ -93,7 +93,7 @@ OpenAPI_cnf_unit_t *OpenAPI_cnf_unit_parseFromJSON(cJSON *cnf_unitJSON)
cnf_unit_local_var = OpenAPI_cnf_unit_create (
cnf_unitList
- );
+ );
return cnf_unit_local_var;
end:
diff --git a/lib/sbi/openapi/model/cnf_unit.h b/lib/sbi/openapi/model/cnf_unit.h
index 3a0a6f2a6..4e5ebb159 100644
--- a/lib/sbi/openapi/model/cnf_unit.h
+++ b/lib/sbi/openapi/model/cnf_unit.h
@@ -1,7 +1,7 @@
/*
* cnf_unit.h
*
- *
+ *
*/
#ifndef _OpenAPI_cnf_unit_H_
@@ -25,7 +25,7 @@ typedef struct OpenAPI_cnf_unit_s {
OpenAPI_cnf_unit_t *OpenAPI_cnf_unit_create(
OpenAPI_list_t *cnf_unit
- );
+);
void OpenAPI_cnf_unit_free(OpenAPI_cnf_unit_t *cnf_unit);
OpenAPI_cnf_unit_t *OpenAPI_cnf_unit_parseFromJSON(cJSON *cnf_unitJSON);
cJSON *OpenAPI_cnf_unit_convertToJSON(OpenAPI_cnf_unit_t *cnf_unit);
diff --git a/lib/sbi/openapi/model/code_word_ind.h b/lib/sbi/openapi/model/code_word_ind.h
index 9a433b722..e538ecd15 100644
--- a/lib/sbi/openapi/model/code_word_ind.h
+++ b/lib/sbi/openapi/model/code_word_ind.h
@@ -1,7 +1,7 @@
/*
* code_word_ind.h
*
- *
+ *
*/
#ifndef _OpenAPI_code_word_ind_H_
diff --git a/lib/sbi/openapi/model/collection_period_rmm_lte_mdt.h b/lib/sbi/openapi/model/collection_period_rmm_lte_mdt.h
index 457907721..155d1e325 100644
--- a/lib/sbi/openapi/model/collection_period_rmm_lte_mdt.h
+++ b/lib/sbi/openapi/model/collection_period_rmm_lte_mdt.h
@@ -1,7 +1,7 @@
/*
* collection_period_rmm_lte_mdt.h
*
- *
+ *
*/
#ifndef _OpenAPI_collection_period_rmm_lte_mdt_H_
diff --git a/lib/sbi/openapi/model/collection_period_rmm_nr_mdt.h b/lib/sbi/openapi/model/collection_period_rmm_nr_mdt.h
index 3848f9ab3..380166b2d 100644
--- a/lib/sbi/openapi/model/collection_period_rmm_nr_mdt.h
+++ b/lib/sbi/openapi/model/collection_period_rmm_nr_mdt.h
@@ -1,7 +1,7 @@
/*
* collection_period_rmm_nr_mdt.h
*
- *
+ *
*/
#ifndef _OpenAPI_collection_period_rmm_nr_mdt_H_
diff --git a/lib/sbi/openapi/model/communication_characteristics.c b/lib/sbi/openapi/model/communication_characteristics.c
index 27e78b834..64f05fe30 100644
--- a/lib/sbi/openapi/model/communication_characteristics.c
+++ b/lib/sbi/openapi/model/communication_characteristics.c
@@ -11,7 +11,7 @@ OpenAPI_communication_characteristics_t *OpenAPI_communication_characteristics_c
OpenAPI_pp_dl_packet_count_ext_t *pp_dl_packet_count_ext,
OpenAPI_pp_maximum_response_time_t *pp_maximum_response_time,
OpenAPI_pp_maximum_latency_t *pp_maximum_latency
- )
+)
{
OpenAPI_communication_characteristics_t *communication_characteristics_local_var = OpenAPI_malloc(sizeof(OpenAPI_communication_characteristics_t));
if (!communication_characteristics_local_var) {
@@ -52,75 +52,75 @@ cJSON *OpenAPI_communication_characteristics_convertToJSON(OpenAPI_communication
item = cJSON_CreateObject();
if (communication_characteristics->pp_subs_reg_timer) {
- cJSON *pp_subs_reg_timer_local_JSON = OpenAPI_pp_subs_reg_timer_convertToJSON(communication_characteristics->pp_subs_reg_timer);
- if (pp_subs_reg_timer_local_JSON == NULL) {
- ogs_error("OpenAPI_communication_characteristics_convertToJSON() failed [pp_subs_reg_timer]");
- goto end;
- }
- cJSON_AddItemToObject(item, "ppSubsRegTimer", pp_subs_reg_timer_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_communication_characteristics_convertToJSON() failed [pp_subs_reg_timer]");
- goto end;
- }
+ cJSON *pp_subs_reg_timer_local_JSON = OpenAPI_pp_subs_reg_timer_convertToJSON(communication_characteristics->pp_subs_reg_timer);
+ if (pp_subs_reg_timer_local_JSON == NULL) {
+ ogs_error("OpenAPI_communication_characteristics_convertToJSON() failed [pp_subs_reg_timer]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "ppSubsRegTimer", pp_subs_reg_timer_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_communication_characteristics_convertToJSON() failed [pp_subs_reg_timer]");
+ goto end;
+ }
}
if (communication_characteristics->pp_active_time) {
- cJSON *pp_active_time_local_JSON = OpenAPI_pp_active_time_convertToJSON(communication_characteristics->pp_active_time);
- if (pp_active_time_local_JSON == NULL) {
- ogs_error("OpenAPI_communication_characteristics_convertToJSON() failed [pp_active_time]");
- goto end;
- }
- cJSON_AddItemToObject(item, "ppActiveTime", pp_active_time_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_communication_characteristics_convertToJSON() failed [pp_active_time]");
- goto end;
- }
+ cJSON *pp_active_time_local_JSON = OpenAPI_pp_active_time_convertToJSON(communication_characteristics->pp_active_time);
+ if (pp_active_time_local_JSON == NULL) {
+ ogs_error("OpenAPI_communication_characteristics_convertToJSON() failed [pp_active_time]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "ppActiveTime", pp_active_time_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_communication_characteristics_convertToJSON() failed [pp_active_time]");
+ goto end;
+ }
}
if (communication_characteristics->pp_dl_packet_count) {
- if (cJSON_AddNumberToObject(item, "ppDlPacketCount", communication_characteristics->pp_dl_packet_count) == NULL) {
- ogs_error("OpenAPI_communication_characteristics_convertToJSON() failed [pp_dl_packet_count]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "ppDlPacketCount", communication_characteristics->pp_dl_packet_count) == NULL) {
+ ogs_error("OpenAPI_communication_characteristics_convertToJSON() failed [pp_dl_packet_count]");
+ goto end;
+ }
}
if (communication_characteristics->pp_dl_packet_count_ext) {
- cJSON *pp_dl_packet_count_ext_local_JSON = OpenAPI_pp_dl_packet_count_ext_convertToJSON(communication_characteristics->pp_dl_packet_count_ext);
- if (pp_dl_packet_count_ext_local_JSON == NULL) {
- ogs_error("OpenAPI_communication_characteristics_convertToJSON() failed [pp_dl_packet_count_ext]");
- goto end;
- }
- cJSON_AddItemToObject(item, "ppDlPacketCountExt", pp_dl_packet_count_ext_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_communication_characteristics_convertToJSON() failed [pp_dl_packet_count_ext]");
- goto end;
- }
+ cJSON *pp_dl_packet_count_ext_local_JSON = OpenAPI_pp_dl_packet_count_ext_convertToJSON(communication_characteristics->pp_dl_packet_count_ext);
+ if (pp_dl_packet_count_ext_local_JSON == NULL) {
+ ogs_error("OpenAPI_communication_characteristics_convertToJSON() failed [pp_dl_packet_count_ext]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "ppDlPacketCountExt", pp_dl_packet_count_ext_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_communication_characteristics_convertToJSON() failed [pp_dl_packet_count_ext]");
+ goto end;
+ }
}
if (communication_characteristics->pp_maximum_response_time) {
- cJSON *pp_maximum_response_time_local_JSON = OpenAPI_pp_maximum_response_time_convertToJSON(communication_characteristics->pp_maximum_response_time);
- if (pp_maximum_response_time_local_JSON == NULL) {
- ogs_error("OpenAPI_communication_characteristics_convertToJSON() failed [pp_maximum_response_time]");
- goto end;
- }
- cJSON_AddItemToObject(item, "ppMaximumResponseTime", pp_maximum_response_time_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_communication_characteristics_convertToJSON() failed [pp_maximum_response_time]");
- goto end;
- }
+ cJSON *pp_maximum_response_time_local_JSON = OpenAPI_pp_maximum_response_time_convertToJSON(communication_characteristics->pp_maximum_response_time);
+ if (pp_maximum_response_time_local_JSON == NULL) {
+ ogs_error("OpenAPI_communication_characteristics_convertToJSON() failed [pp_maximum_response_time]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "ppMaximumResponseTime", pp_maximum_response_time_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_communication_characteristics_convertToJSON() failed [pp_maximum_response_time]");
+ goto end;
+ }
}
if (communication_characteristics->pp_maximum_latency) {
- cJSON *pp_maximum_latency_local_JSON = OpenAPI_pp_maximum_latency_convertToJSON(communication_characteristics->pp_maximum_latency);
- if (pp_maximum_latency_local_JSON == NULL) {
- ogs_error("OpenAPI_communication_characteristics_convertToJSON() failed [pp_maximum_latency]");
- goto end;
- }
- cJSON_AddItemToObject(item, "ppMaximumLatency", pp_maximum_latency_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_communication_characteristics_convertToJSON() failed [pp_maximum_latency]");
- goto end;
- }
+ cJSON *pp_maximum_latency_local_JSON = OpenAPI_pp_maximum_latency_convertToJSON(communication_characteristics->pp_maximum_latency);
+ if (pp_maximum_latency_local_JSON == NULL) {
+ ogs_error("OpenAPI_communication_characteristics_convertToJSON() failed [pp_maximum_latency]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "ppMaximumLatency", pp_maximum_latency_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_communication_characteristics_convertToJSON() failed [pp_maximum_latency]");
+ goto end;
+ }
}
end:
@@ -133,45 +133,45 @@ OpenAPI_communication_characteristics_t *OpenAPI_communication_characteristics_p
cJSON *pp_subs_reg_timer = cJSON_GetObjectItemCaseSensitive(communication_characteristicsJSON, "ppSubsRegTimer");
OpenAPI_pp_subs_reg_timer_t *pp_subs_reg_timer_local_nonprim = NULL;
- if (pp_subs_reg_timer) {
- pp_subs_reg_timer_local_nonprim = OpenAPI_pp_subs_reg_timer_parseFromJSON(pp_subs_reg_timer);
+ if (pp_subs_reg_timer) {
+ pp_subs_reg_timer_local_nonprim = OpenAPI_pp_subs_reg_timer_parseFromJSON(pp_subs_reg_timer);
}
cJSON *pp_active_time = cJSON_GetObjectItemCaseSensitive(communication_characteristicsJSON, "ppActiveTime");
OpenAPI_pp_active_time_t *pp_active_time_local_nonprim = NULL;
- if (pp_active_time) {
- pp_active_time_local_nonprim = OpenAPI_pp_active_time_parseFromJSON(pp_active_time);
+ if (pp_active_time) {
+ pp_active_time_local_nonprim = OpenAPI_pp_active_time_parseFromJSON(pp_active_time);
}
cJSON *pp_dl_packet_count = cJSON_GetObjectItemCaseSensitive(communication_characteristicsJSON, "ppDlPacketCount");
- if (pp_dl_packet_count) {
- if (!cJSON_IsNumber(pp_dl_packet_count)) {
- ogs_error("OpenAPI_communication_characteristics_parseFromJSON() failed [pp_dl_packet_count]");
- goto end;
- }
+ if (pp_dl_packet_count) {
+ if (!cJSON_IsNumber(pp_dl_packet_count)) {
+ ogs_error("OpenAPI_communication_characteristics_parseFromJSON() failed [pp_dl_packet_count]");
+ goto end;
+ }
}
cJSON *pp_dl_packet_count_ext = cJSON_GetObjectItemCaseSensitive(communication_characteristicsJSON, "ppDlPacketCountExt");
OpenAPI_pp_dl_packet_count_ext_t *pp_dl_packet_count_ext_local_nonprim = NULL;
- if (pp_dl_packet_count_ext) {
- pp_dl_packet_count_ext_local_nonprim = OpenAPI_pp_dl_packet_count_ext_parseFromJSON(pp_dl_packet_count_ext);
+ if (pp_dl_packet_count_ext) {
+ pp_dl_packet_count_ext_local_nonprim = OpenAPI_pp_dl_packet_count_ext_parseFromJSON(pp_dl_packet_count_ext);
}
cJSON *pp_maximum_response_time = cJSON_GetObjectItemCaseSensitive(communication_characteristicsJSON, "ppMaximumResponseTime");
OpenAPI_pp_maximum_response_time_t *pp_maximum_response_time_local_nonprim = NULL;
- if (pp_maximum_response_time) {
- pp_maximum_response_time_local_nonprim = OpenAPI_pp_maximum_response_time_parseFromJSON(pp_maximum_response_time);
+ if (pp_maximum_response_time) {
+ pp_maximum_response_time_local_nonprim = OpenAPI_pp_maximum_response_time_parseFromJSON(pp_maximum_response_time);
}
cJSON *pp_maximum_latency = cJSON_GetObjectItemCaseSensitive(communication_characteristicsJSON, "ppMaximumLatency");
OpenAPI_pp_maximum_latency_t *pp_maximum_latency_local_nonprim = NULL;
- if (pp_maximum_latency) {
- pp_maximum_latency_local_nonprim = OpenAPI_pp_maximum_latency_parseFromJSON(pp_maximum_latency);
+ if (pp_maximum_latency) {
+ pp_maximum_latency_local_nonprim = OpenAPI_pp_maximum_latency_parseFromJSON(pp_maximum_latency);
}
communication_characteristics_local_var = OpenAPI_communication_characteristics_create (
@@ -181,7 +181,7 @@ OpenAPI_communication_characteristics_t *OpenAPI_communication_characteristics_p
pp_dl_packet_count_ext ? pp_dl_packet_count_ext_local_nonprim : NULL,
pp_maximum_response_time ? pp_maximum_response_time_local_nonprim : NULL,
pp_maximum_latency ? pp_maximum_latency_local_nonprim : NULL
- );
+ );
return communication_characteristics_local_var;
end:
diff --git a/lib/sbi/openapi/model/communication_characteristics.h b/lib/sbi/openapi/model/communication_characteristics.h
index f4500909d..f9e894717 100644
--- a/lib/sbi/openapi/model/communication_characteristics.h
+++ b/lib/sbi/openapi/model/communication_characteristics.h
@@ -1,7 +1,7 @@
/*
* communication_characteristics.h
*
- *
+ *
*/
#ifndef _OpenAPI_communication_characteristics_H_
@@ -39,7 +39,7 @@ OpenAPI_communication_characteristics_t *OpenAPI_communication_characteristics_c
OpenAPI_pp_dl_packet_count_ext_t *pp_dl_packet_count_ext,
OpenAPI_pp_maximum_response_time_t *pp_maximum_response_time,
OpenAPI_pp_maximum_latency_t *pp_maximum_latency
- );
+);
void OpenAPI_communication_characteristics_free(OpenAPI_communication_characteristics_t *communication_characteristics);
OpenAPI_communication_characteristics_t *OpenAPI_communication_characteristics_parseFromJSON(cJSON *communication_characteristicsJSON);
cJSON *OpenAPI_communication_characteristics_convertToJSON(OpenAPI_communication_characteristics_t *communication_characteristics);
diff --git a/lib/sbi/openapi/model/complex_query.c b/lib/sbi/openapi/model/complex_query.c
index 6d2bf1e87..e39814a8e 100644
--- a/lib/sbi/openapi/model/complex_query.c
+++ b/lib/sbi/openapi/model/complex_query.c
@@ -7,7 +7,7 @@
OpenAPI_complex_query_t *OpenAPI_complex_query_create(
OpenAPI_list_t *cnf_units,
OpenAPI_list_t *dnf_units
- )
+)
{
OpenAPI_complex_query_t *complex_query_local_var = OpenAPI_malloc(sizeof(OpenAPI_complex_query_t));
if (!complex_query_local_var) {
@@ -96,9 +96,9 @@ OpenAPI_complex_query_t *OpenAPI_complex_query_parseFromJSON(cJSON *complex_quer
}
OpenAPI_list_t *cnf_unitsList;
-
+
cJSON *cnf_units_local_nonprimitive;
- if (!cJSON_IsArray(cnf_units)) {
+ if (!cJSON_IsArray(cnf_units)){
ogs_error("OpenAPI_complex_query_parseFromJSON() failed [cnf_units]");
goto end;
}
@@ -122,9 +122,9 @@ OpenAPI_complex_query_t *OpenAPI_complex_query_parseFromJSON(cJSON *complex_quer
}
OpenAPI_list_t *dnf_unitsList;
-
+
cJSON *dnf_units_local_nonprimitive;
- if (!cJSON_IsArray(dnf_units)) {
+ if (!cJSON_IsArray(dnf_units)){
ogs_error("OpenAPI_complex_query_parseFromJSON() failed [dnf_units]");
goto end;
}
@@ -144,7 +144,7 @@ OpenAPI_complex_query_t *OpenAPI_complex_query_parseFromJSON(cJSON *complex_quer
complex_query_local_var = OpenAPI_complex_query_create (
cnf_unitsList,
dnf_unitsList
- );
+ );
return complex_query_local_var;
end:
diff --git a/lib/sbi/openapi/model/complex_query.h b/lib/sbi/openapi/model/complex_query.h
index f35b2a2dc..d20730e2e 100644
--- a/lib/sbi/openapi/model/complex_query.h
+++ b/lib/sbi/openapi/model/complex_query.h
@@ -1,7 +1,7 @@
/*
* complex_query.h
*
- *
+ *
*/
#ifndef _OpenAPI_complex_query_H_
@@ -30,7 +30,7 @@ typedef struct OpenAPI_complex_query_s {
OpenAPI_complex_query_t *OpenAPI_complex_query_create(
OpenAPI_list_t *cnf_units,
OpenAPI_list_t *dnf_units
- );
+);
void OpenAPI_complex_query_free(OpenAPI_complex_query_t *complex_query);
OpenAPI_complex_query_t *OpenAPI_complex_query_parseFromJSON(cJSON *complex_queryJSON);
cJSON *OpenAPI_complex_query_convertToJSON(OpenAPI_complex_query_t *complex_query);
diff --git a/lib/sbi/openapi/model/condition_data.c b/lib/sbi/openapi/model/condition_data.c
index 88080f482..f7e69542d 100644
--- a/lib/sbi/openapi/model/condition_data.c
+++ b/lib/sbi/openapi/model/condition_data.c
@@ -10,7 +10,7 @@ OpenAPI_condition_data_t *OpenAPI_condition_data_create(
char *deactivation_time,
OpenAPI_access_type_e access_type,
OpenAPI_rat_type_e rat_type
- )
+)
{
OpenAPI_condition_data_t *condition_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_condition_data_t));
if (!condition_data_local_var) {
@@ -53,31 +53,31 @@ cJSON *OpenAPI_condition_data_convertToJSON(OpenAPI_condition_data_t *condition_
}
if (condition_data->activation_time) {
- if (cJSON_AddStringToObject(item, "activationTime", condition_data->activation_time) == NULL) {
- ogs_error("OpenAPI_condition_data_convertToJSON() failed [activation_time]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "activationTime", condition_data->activation_time) == NULL) {
+ ogs_error("OpenAPI_condition_data_convertToJSON() failed [activation_time]");
+ goto end;
+ }
}
if (condition_data->deactivation_time) {
- if (cJSON_AddStringToObject(item, "deactivationTime", condition_data->deactivation_time) == NULL) {
- ogs_error("OpenAPI_condition_data_convertToJSON() failed [deactivation_time]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "deactivationTime", condition_data->deactivation_time) == NULL) {
+ ogs_error("OpenAPI_condition_data_convertToJSON() failed [deactivation_time]");
+ goto end;
+ }
}
if (condition_data->access_type) {
- if (cJSON_AddStringToObject(item, "accessType", OpenAPI_access_type_ToString(condition_data->access_type)) == NULL) {
- ogs_error("OpenAPI_condition_data_convertToJSON() failed [access_type]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "accessType", OpenAPI_access_type_ToString(condition_data->access_type)) == NULL) {
+ ogs_error("OpenAPI_condition_data_convertToJSON() failed [access_type]");
+ goto end;
+ }
}
if (condition_data->rat_type) {
- if (cJSON_AddStringToObject(item, "ratType", OpenAPI_rat_type_ToString(condition_data->rat_type)) == NULL) {
- ogs_error("OpenAPI_condition_data_convertToJSON() failed [rat_type]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "ratType", OpenAPI_rat_type_ToString(condition_data->rat_type)) == NULL) {
+ ogs_error("OpenAPI_condition_data_convertToJSON() failed [rat_type]");
+ goto end;
+ }
}
end:
@@ -93,7 +93,7 @@ OpenAPI_condition_data_t *OpenAPI_condition_data_parseFromJSON(cJSON *condition_
goto end;
}
-
+
if (!cJSON_IsString(cond_id)) {
ogs_error("OpenAPI_condition_data_parseFromJSON() failed [cond_id]");
goto end;
@@ -101,42 +101,42 @@ OpenAPI_condition_data_t *OpenAPI_condition_data_parseFromJSON(cJSON *condition_
cJSON *activation_time = cJSON_GetObjectItemCaseSensitive(condition_dataJSON, "activationTime");
- if (activation_time) {
- if (!cJSON_IsString(activation_time)) {
- ogs_error("OpenAPI_condition_data_parseFromJSON() failed [activation_time]");
- goto end;
- }
+ if (activation_time) {
+ if (!cJSON_IsString(activation_time)) {
+ ogs_error("OpenAPI_condition_data_parseFromJSON() failed [activation_time]");
+ goto end;
+ }
}
cJSON *deactivation_time = cJSON_GetObjectItemCaseSensitive(condition_dataJSON, "deactivationTime");
- if (deactivation_time) {
- if (!cJSON_IsString(deactivation_time)) {
- ogs_error("OpenAPI_condition_data_parseFromJSON() failed [deactivation_time]");
- goto end;
- }
+ if (deactivation_time) {
+ if (!cJSON_IsString(deactivation_time)) {
+ ogs_error("OpenAPI_condition_data_parseFromJSON() failed [deactivation_time]");
+ goto end;
+ }
}
cJSON *access_type = cJSON_GetObjectItemCaseSensitive(condition_dataJSON, "accessType");
OpenAPI_access_type_e access_typeVariable;
- if (access_type) {
- if (!cJSON_IsString(access_type)) {
- ogs_error("OpenAPI_condition_data_parseFromJSON() failed [access_type]");
- goto end;
- }
- access_typeVariable = OpenAPI_access_type_FromString(access_type->valuestring);
+ if (access_type) {
+ if (!cJSON_IsString(access_type)) {
+ ogs_error("OpenAPI_condition_data_parseFromJSON() failed [access_type]");
+ goto end;
+ }
+ access_typeVariable = OpenAPI_access_type_FromString(access_type->valuestring);
}
cJSON *rat_type = cJSON_GetObjectItemCaseSensitive(condition_dataJSON, "ratType");
OpenAPI_rat_type_e rat_typeVariable;
- if (rat_type) {
- if (!cJSON_IsString(rat_type)) {
- ogs_error("OpenAPI_condition_data_parseFromJSON() failed [rat_type]");
- goto end;
- }
- rat_typeVariable = OpenAPI_rat_type_FromString(rat_type->valuestring);
+ if (rat_type) {
+ if (!cJSON_IsString(rat_type)) {
+ ogs_error("OpenAPI_condition_data_parseFromJSON() failed [rat_type]");
+ goto end;
+ }
+ rat_typeVariable = OpenAPI_rat_type_FromString(rat_type->valuestring);
}
condition_data_local_var = OpenAPI_condition_data_create (
@@ -145,7 +145,7 @@ OpenAPI_condition_data_t *OpenAPI_condition_data_parseFromJSON(cJSON *condition_
deactivation_time ? ogs_strdup_or_assert(deactivation_time->valuestring) : NULL,
access_type ? access_typeVariable : 0,
rat_type ? rat_typeVariable : 0
- );
+ );
return condition_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/condition_data.h b/lib/sbi/openapi/model/condition_data.h
index 3bd81d05b..5127f724b 100644
--- a/lib/sbi/openapi/model/condition_data.h
+++ b/lib/sbi/openapi/model/condition_data.h
@@ -1,7 +1,7 @@
/*
* condition_data.h
*
- *
+ *
*/
#ifndef _OpenAPI_condition_data_H_
@@ -34,7 +34,7 @@ OpenAPI_condition_data_t *OpenAPI_condition_data_create(
char *deactivation_time,
OpenAPI_access_type_e access_type,
OpenAPI_rat_type_e rat_type
- );
+);
void OpenAPI_condition_data_free(OpenAPI_condition_data_t *condition_data);
OpenAPI_condition_data_t *OpenAPI_condition_data_parseFromJSON(cJSON *condition_dataJSON);
cJSON *OpenAPI_condition_data_convertToJSON(OpenAPI_condition_data_t *condition_data);
diff --git a/lib/sbi/openapi/model/condition_event_type.h b/lib/sbi/openapi/model/condition_event_type.h
index bf4644801..a33f25ebe 100644
--- a/lib/sbi/openapi/model/condition_event_type.h
+++ b/lib/sbi/openapi/model/condition_event_type.h
@@ -1,7 +1,7 @@
/*
* condition_event_type.h
*
- *
+ *
*/
#ifndef _OpenAPI_condition_event_type_H_
diff --git a/lib/sbi/openapi/model/configuration_parameters_eutra.c b/lib/sbi/openapi/model/configuration_parameters_eutra.c
deleted file mode 100644
index 99b2ac3db..000000000
--- a/lib/sbi/openapi/model/configuration_parameters_eutra.c
+++ /dev/null
@@ -1,285 +0,0 @@
-
-#include
-#include
-#include
-#include "configuration_parameters_eutra.h"
-
-OpenAPI_configuration_parameters_eutra_t *OpenAPI_configuration_parameters_eutra_create(
- OpenAPI_list_t *ser_to_layer2_ids,
- OpenAPI_list_t *pppp_to_pdbs,
- OpenAPI_list_t *ser_id_to_frequs,
- OpenAPI_list_t *ser_id_to_ppprs
- )
-{
- OpenAPI_configuration_parameters_eutra_t *configuration_parameters_eutra_local_var = OpenAPI_malloc(sizeof(OpenAPI_configuration_parameters_eutra_t));
- if (!configuration_parameters_eutra_local_var) {
- return NULL;
- }
- configuration_parameters_eutra_local_var->ser_to_layer2_ids = ser_to_layer2_ids;
- configuration_parameters_eutra_local_var->pppp_to_pdbs = pppp_to_pdbs;
- configuration_parameters_eutra_local_var->ser_id_to_frequs = ser_id_to_frequs;
- configuration_parameters_eutra_local_var->ser_id_to_ppprs = ser_id_to_ppprs;
-
- return configuration_parameters_eutra_local_var;
-}
-
-void OpenAPI_configuration_parameters_eutra_free(OpenAPI_configuration_parameters_eutra_t *configuration_parameters_eutra)
-{
- if (NULL == configuration_parameters_eutra) {
- return;
- }
- OpenAPI_lnode_t *node;
- OpenAPI_list_for_each(configuration_parameters_eutra->ser_to_layer2_ids, node) {
- OpenAPI_service_id_to_layer2_id_free(node->data);
- }
- OpenAPI_list_free(configuration_parameters_eutra->ser_to_layer2_ids);
- OpenAPI_list_for_each(configuration_parameters_eutra->pppp_to_pdbs, node) {
- OpenAPI_pppp_to_pdb_free(node->data);
- }
- OpenAPI_list_free(configuration_parameters_eutra->pppp_to_pdbs);
- OpenAPI_list_for_each(configuration_parameters_eutra->ser_id_to_frequs, node) {
- OpenAPI_service_id_to_frequency_free(node->data);
- }
- OpenAPI_list_free(configuration_parameters_eutra->ser_id_to_frequs);
- OpenAPI_list_for_each(configuration_parameters_eutra->ser_id_to_ppprs, node) {
- OpenAPI_service_id_to_pppr_free(node->data);
- }
- OpenAPI_list_free(configuration_parameters_eutra->ser_id_to_ppprs);
- ogs_free(configuration_parameters_eutra);
-}
-
-cJSON *OpenAPI_configuration_parameters_eutra_convertToJSON(OpenAPI_configuration_parameters_eutra_t *configuration_parameters_eutra)
-{
- cJSON *item = NULL;
-
- if (configuration_parameters_eutra == NULL) {
- ogs_error("OpenAPI_configuration_parameters_eutra_convertToJSON() failed [ConfigurationParametersEutra]");
- return NULL;
- }
-
- item = cJSON_CreateObject();
- if (configuration_parameters_eutra->ser_to_layer2_ids) {
- cJSON *ser_to_layer2_idsList = cJSON_AddArrayToObject(item, "serToLayer2Ids");
- if (ser_to_layer2_idsList == NULL) {
- ogs_error("OpenAPI_configuration_parameters_eutra_convertToJSON() failed [ser_to_layer2_ids]");
- goto end;
- }
-
- OpenAPI_lnode_t *ser_to_layer2_ids_node;
- if (configuration_parameters_eutra->ser_to_layer2_ids) {
- OpenAPI_list_for_each(configuration_parameters_eutra->ser_to_layer2_ids, ser_to_layer2_ids_node) {
- cJSON *itemLocal = OpenAPI_service_id_to_layer2_id_convertToJSON(ser_to_layer2_ids_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_configuration_parameters_eutra_convertToJSON() failed [ser_to_layer2_ids]");
- goto end;
- }
- cJSON_AddItemToArray(ser_to_layer2_idsList, itemLocal);
- }
- }
- }
-
- if (configuration_parameters_eutra->pppp_to_pdbs) {
- cJSON *pppp_to_pdbsList = cJSON_AddArrayToObject(item, "ppppToPdbs");
- if (pppp_to_pdbsList == NULL) {
- ogs_error("OpenAPI_configuration_parameters_eutra_convertToJSON() failed [pppp_to_pdbs]");
- goto end;
- }
-
- OpenAPI_lnode_t *pppp_to_pdbs_node;
- if (configuration_parameters_eutra->pppp_to_pdbs) {
- OpenAPI_list_for_each(configuration_parameters_eutra->pppp_to_pdbs, pppp_to_pdbs_node) {
- cJSON *itemLocal = OpenAPI_pppp_to_pdb_convertToJSON(pppp_to_pdbs_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_configuration_parameters_eutra_convertToJSON() failed [pppp_to_pdbs]");
- goto end;
- }
- cJSON_AddItemToArray(pppp_to_pdbsList, itemLocal);
- }
- }
- }
-
- if (configuration_parameters_eutra->ser_id_to_frequs) {
- cJSON *ser_id_to_frequsList = cJSON_AddArrayToObject(item, "serIdToFrequs");
- if (ser_id_to_frequsList == NULL) {
- ogs_error("OpenAPI_configuration_parameters_eutra_convertToJSON() failed [ser_id_to_frequs]");
- goto end;
- }
-
- OpenAPI_lnode_t *ser_id_to_frequs_node;
- if (configuration_parameters_eutra->ser_id_to_frequs) {
- OpenAPI_list_for_each(configuration_parameters_eutra->ser_id_to_frequs, ser_id_to_frequs_node) {
- cJSON *itemLocal = OpenAPI_service_id_to_frequency_convertToJSON(ser_id_to_frequs_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_configuration_parameters_eutra_convertToJSON() failed [ser_id_to_frequs]");
- goto end;
- }
- cJSON_AddItemToArray(ser_id_to_frequsList, itemLocal);
- }
- }
- }
-
- if (configuration_parameters_eutra->ser_id_to_ppprs) {
- cJSON *ser_id_to_ppprsList = cJSON_AddArrayToObject(item, "serIdToPpprs");
- if (ser_id_to_ppprsList == NULL) {
- ogs_error("OpenAPI_configuration_parameters_eutra_convertToJSON() failed [ser_id_to_ppprs]");
- goto end;
- }
-
- OpenAPI_lnode_t *ser_id_to_ppprs_node;
- if (configuration_parameters_eutra->ser_id_to_ppprs) {
- OpenAPI_list_for_each(configuration_parameters_eutra->ser_id_to_ppprs, ser_id_to_ppprs_node) {
- cJSON *itemLocal = OpenAPI_service_id_to_pppr_convertToJSON(ser_id_to_ppprs_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_configuration_parameters_eutra_convertToJSON() failed [ser_id_to_ppprs]");
- goto end;
- }
- cJSON_AddItemToArray(ser_id_to_ppprsList, itemLocal);
- }
- }
- }
-
-end:
- return item;
-}
-
-OpenAPI_configuration_parameters_eutra_t *OpenAPI_configuration_parameters_eutra_parseFromJSON(cJSON *configuration_parameters_eutraJSON)
-{
- OpenAPI_configuration_parameters_eutra_t *configuration_parameters_eutra_local_var = NULL;
- cJSON *ser_to_layer2_ids = cJSON_GetObjectItemCaseSensitive(configuration_parameters_eutraJSON, "serToLayer2Ids");
-
- OpenAPI_list_t *ser_to_layer2_idsList;
- if (ser_to_layer2_ids) {
- cJSON *ser_to_layer2_ids_local_nonprimitive;
- if (!cJSON_IsArray(ser_to_layer2_ids)) {
- ogs_error("OpenAPI_configuration_parameters_eutra_parseFromJSON() failed [ser_to_layer2_ids]");
- goto end;
- }
-
- ser_to_layer2_idsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(ser_to_layer2_ids_local_nonprimitive, ser_to_layer2_ids ) {
- if (!cJSON_IsObject(ser_to_layer2_ids_local_nonprimitive)) {
- ogs_error("OpenAPI_configuration_parameters_eutra_parseFromJSON() failed [ser_to_layer2_ids]");
- goto end;
- }
- OpenAPI_service_id_to_layer2_id_t *ser_to_layer2_idsItem = OpenAPI_service_id_to_layer2_id_parseFromJSON(ser_to_layer2_ids_local_nonprimitive);
-
- OpenAPI_list_add(ser_to_layer2_idsList, ser_to_layer2_idsItem);
- }
- }
-
- cJSON *pppp_to_pdbs = cJSON_GetObjectItemCaseSensitive(configuration_parameters_eutraJSON, "ppppToPdbs");
-
- OpenAPI_list_t *pppp_to_pdbsList;
- if (pppp_to_pdbs) {
- cJSON *pppp_to_pdbs_local_nonprimitive;
- if (!cJSON_IsArray(pppp_to_pdbs)) {
- ogs_error("OpenAPI_configuration_parameters_eutra_parseFromJSON() failed [pppp_to_pdbs]");
- goto end;
- }
-
- pppp_to_pdbsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(pppp_to_pdbs_local_nonprimitive, pppp_to_pdbs ) {
- if (!cJSON_IsObject(pppp_to_pdbs_local_nonprimitive)) {
- ogs_error("OpenAPI_configuration_parameters_eutra_parseFromJSON() failed [pppp_to_pdbs]");
- goto end;
- }
- OpenAPI_pppp_to_pdb_t *pppp_to_pdbsItem = OpenAPI_pppp_to_pdb_parseFromJSON(pppp_to_pdbs_local_nonprimitive);
-
- OpenAPI_list_add(pppp_to_pdbsList, pppp_to_pdbsItem);
- }
- }
-
- cJSON *ser_id_to_frequs = cJSON_GetObjectItemCaseSensitive(configuration_parameters_eutraJSON, "serIdToFrequs");
-
- OpenAPI_list_t *ser_id_to_frequsList;
- if (ser_id_to_frequs) {
- cJSON *ser_id_to_frequs_local_nonprimitive;
- if (!cJSON_IsArray(ser_id_to_frequs)) {
- ogs_error("OpenAPI_configuration_parameters_eutra_parseFromJSON() failed [ser_id_to_frequs]");
- goto end;
- }
-
- ser_id_to_frequsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(ser_id_to_frequs_local_nonprimitive, ser_id_to_frequs ) {
- if (!cJSON_IsObject(ser_id_to_frequs_local_nonprimitive)) {
- ogs_error("OpenAPI_configuration_parameters_eutra_parseFromJSON() failed [ser_id_to_frequs]");
- goto end;
- }
- OpenAPI_service_id_to_frequency_t *ser_id_to_frequsItem = OpenAPI_service_id_to_frequency_parseFromJSON(ser_id_to_frequs_local_nonprimitive);
-
- OpenAPI_list_add(ser_id_to_frequsList, ser_id_to_frequsItem);
- }
- }
-
- cJSON *ser_id_to_ppprs = cJSON_GetObjectItemCaseSensitive(configuration_parameters_eutraJSON, "serIdToPpprs");
-
- OpenAPI_list_t *ser_id_to_ppprsList;
- if (ser_id_to_ppprs) {
- cJSON *ser_id_to_ppprs_local_nonprimitive;
- if (!cJSON_IsArray(ser_id_to_ppprs)) {
- ogs_error("OpenAPI_configuration_parameters_eutra_parseFromJSON() failed [ser_id_to_ppprs]");
- goto end;
- }
-
- ser_id_to_ppprsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(ser_id_to_ppprs_local_nonprimitive, ser_id_to_ppprs ) {
- if (!cJSON_IsObject(ser_id_to_ppprs_local_nonprimitive)) {
- ogs_error("OpenAPI_configuration_parameters_eutra_parseFromJSON() failed [ser_id_to_ppprs]");
- goto end;
- }
- OpenAPI_service_id_to_pppr_t *ser_id_to_ppprsItem = OpenAPI_service_id_to_pppr_parseFromJSON(ser_id_to_ppprs_local_nonprimitive);
-
- OpenAPI_list_add(ser_id_to_ppprsList, ser_id_to_ppprsItem);
- }
- }
-
- configuration_parameters_eutra_local_var = OpenAPI_configuration_parameters_eutra_create (
- ser_to_layer2_ids ? ser_to_layer2_idsList : NULL,
- pppp_to_pdbs ? pppp_to_pdbsList : NULL,
- ser_id_to_frequs ? ser_id_to_frequsList : NULL,
- ser_id_to_ppprs ? ser_id_to_ppprsList : NULL
- );
-
- return configuration_parameters_eutra_local_var;
-end:
- return NULL;
-}
-
-OpenAPI_configuration_parameters_eutra_t *OpenAPI_configuration_parameters_eutra_copy(OpenAPI_configuration_parameters_eutra_t *dst, OpenAPI_configuration_parameters_eutra_t *src)
-{
- cJSON *item = NULL;
- char *content = NULL;
-
- ogs_assert(src);
- item = OpenAPI_configuration_parameters_eutra_convertToJSON(src);
- if (!item) {
- ogs_error("OpenAPI_configuration_parameters_eutra_convertToJSON() failed");
- return NULL;
- }
-
- content = cJSON_Print(item);
- cJSON_Delete(item);
-
- if (!content) {
- ogs_error("cJSON_Print() failed");
- return NULL;
- }
-
- item = cJSON_Parse(content);
- ogs_free(content);
- if (!item) {
- ogs_error("cJSON_Parse() failed");
- return NULL;
- }
-
- OpenAPI_configuration_parameters_eutra_free(dst);
- dst = OpenAPI_configuration_parameters_eutra_parseFromJSON(item);
- cJSON_Delete(item);
-
- return dst;
-}
-
diff --git a/lib/sbi/openapi/model/configuration_parameters_eutra.h b/lib/sbi/openapi/model/configuration_parameters_eutra.h
deleted file mode 100644
index eea3013e3..000000000
--- a/lib/sbi/openapi/model/configuration_parameters_eutra.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * configuration_parameters_eutra.h
- *
- *
- */
-
-#ifndef _OpenAPI_configuration_parameters_eutra_H_
-#define _OpenAPI_configuration_parameters_eutra_H_
-
-#include
-#include "../external/cJSON.h"
-#include "../include/list.h"
-#include "../include/keyValuePair.h"
-#include "../include/binary.h"
-#include "pppp_to_pdb.h"
-#include "service_id_to_frequency.h"
-#include "service_id_to_layer2_id.h"
-#include "service_id_to_pppr.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct OpenAPI_configuration_parameters_eutra_s OpenAPI_configuration_parameters_eutra_t;
-typedef struct OpenAPI_configuration_parameters_eutra_s {
- OpenAPI_list_t *ser_to_layer2_ids;
- OpenAPI_list_t *pppp_to_pdbs;
- OpenAPI_list_t *ser_id_to_frequs;
- OpenAPI_list_t *ser_id_to_ppprs;
-} OpenAPI_configuration_parameters_eutra_t;
-
-OpenAPI_configuration_parameters_eutra_t *OpenAPI_configuration_parameters_eutra_create(
- OpenAPI_list_t *ser_to_layer2_ids,
- OpenAPI_list_t *pppp_to_pdbs,
- OpenAPI_list_t *ser_id_to_frequs,
- OpenAPI_list_t *ser_id_to_ppprs
- );
-void OpenAPI_configuration_parameters_eutra_free(OpenAPI_configuration_parameters_eutra_t *configuration_parameters_eutra);
-OpenAPI_configuration_parameters_eutra_t *OpenAPI_configuration_parameters_eutra_parseFromJSON(cJSON *configuration_parameters_eutraJSON);
-cJSON *OpenAPI_configuration_parameters_eutra_convertToJSON(OpenAPI_configuration_parameters_eutra_t *configuration_parameters_eutra);
-OpenAPI_configuration_parameters_eutra_t *OpenAPI_configuration_parameters_eutra_copy(OpenAPI_configuration_parameters_eutra_t *dst, OpenAPI_configuration_parameters_eutra_t *src);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _OpenAPI_configuration_parameters_eutra_H_ */
-
diff --git a/lib/sbi/openapi/model/configuration_parameters_nr.c b/lib/sbi/openapi/model/configuration_parameters_nr.c
deleted file mode 100644
index dc2e80657..000000000
--- a/lib/sbi/openapi/model/configuration_parameters_nr.c
+++ /dev/null
@@ -1,385 +0,0 @@
-
-#include
-#include
-#include
-#include "configuration_parameters_nr.h"
-
-OpenAPI_configuration_parameters_nr_t *OpenAPI_configuration_parameters_nr_create(
- OpenAPI_list_t *ser_to_bro_layer2_ids,
- OpenAPI_list_t *ser_to_gro_layer2_ids,
- OpenAPI_list_t *ser_to_def_layer2_ids,
- OpenAPI_list_t *ser_id_to_frequs,
- OpenAPI_list_t *pc5_qos_mappings,
- OpenAPI_list_t *slrb_configs
- )
-{
- OpenAPI_configuration_parameters_nr_t *configuration_parameters_nr_local_var = OpenAPI_malloc(sizeof(OpenAPI_configuration_parameters_nr_t));
- if (!configuration_parameters_nr_local_var) {
- return NULL;
- }
- configuration_parameters_nr_local_var->ser_to_bro_layer2_ids = ser_to_bro_layer2_ids;
- configuration_parameters_nr_local_var->ser_to_gro_layer2_ids = ser_to_gro_layer2_ids;
- configuration_parameters_nr_local_var->ser_to_def_layer2_ids = ser_to_def_layer2_ids;
- configuration_parameters_nr_local_var->ser_id_to_frequs = ser_id_to_frequs;
- configuration_parameters_nr_local_var->pc5_qos_mappings = pc5_qos_mappings;
- configuration_parameters_nr_local_var->slrb_configs = slrb_configs;
-
- return configuration_parameters_nr_local_var;
-}
-
-void OpenAPI_configuration_parameters_nr_free(OpenAPI_configuration_parameters_nr_t *configuration_parameters_nr)
-{
- if (NULL == configuration_parameters_nr) {
- return;
- }
- OpenAPI_lnode_t *node;
- OpenAPI_list_for_each(configuration_parameters_nr->ser_to_bro_layer2_ids, node) {
- OpenAPI_service_id_to_layer2_id_free(node->data);
- }
- OpenAPI_list_free(configuration_parameters_nr->ser_to_bro_layer2_ids);
- OpenAPI_list_for_each(configuration_parameters_nr->ser_to_gro_layer2_ids, node) {
- OpenAPI_service_id_to_layer2_id_free(node->data);
- }
- OpenAPI_list_free(configuration_parameters_nr->ser_to_gro_layer2_ids);
- OpenAPI_list_for_each(configuration_parameters_nr->ser_to_def_layer2_ids, node) {
- OpenAPI_service_id_to_layer2_id_free(node->data);
- }
- OpenAPI_list_free(configuration_parameters_nr->ser_to_def_layer2_ids);
- OpenAPI_list_for_each(configuration_parameters_nr->ser_id_to_frequs, node) {
- OpenAPI_service_id_to_frequency_free(node->data);
- }
- OpenAPI_list_free(configuration_parameters_nr->ser_id_to_frequs);
- OpenAPI_list_for_each(configuration_parameters_nr->pc5_qos_mappings, node) {
- OpenAPI_pc5_qos_mapping_free(node->data);
- }
- OpenAPI_list_free(configuration_parameters_nr->pc5_qos_mappings);
- OpenAPI_list_for_each(configuration_parameters_nr->slrb_configs, node) {
- OpenAPI_slrb_configurations_free(node->data);
- }
- OpenAPI_list_free(configuration_parameters_nr->slrb_configs);
- ogs_free(configuration_parameters_nr);
-}
-
-cJSON *OpenAPI_configuration_parameters_nr_convertToJSON(OpenAPI_configuration_parameters_nr_t *configuration_parameters_nr)
-{
- cJSON *item = NULL;
-
- if (configuration_parameters_nr == NULL) {
- ogs_error("OpenAPI_configuration_parameters_nr_convertToJSON() failed [ConfigurationParametersNr]");
- return NULL;
- }
-
- item = cJSON_CreateObject();
- if (configuration_parameters_nr->ser_to_bro_layer2_ids) {
- cJSON *ser_to_bro_layer2_idsList = cJSON_AddArrayToObject(item, "serToBroLayer2Ids");
- if (ser_to_bro_layer2_idsList == NULL) {
- ogs_error("OpenAPI_configuration_parameters_nr_convertToJSON() failed [ser_to_bro_layer2_ids]");
- goto end;
- }
-
- OpenAPI_lnode_t *ser_to_bro_layer2_ids_node;
- if (configuration_parameters_nr->ser_to_bro_layer2_ids) {
- OpenAPI_list_for_each(configuration_parameters_nr->ser_to_bro_layer2_ids, ser_to_bro_layer2_ids_node) {
- cJSON *itemLocal = OpenAPI_service_id_to_layer2_id_convertToJSON(ser_to_bro_layer2_ids_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_configuration_parameters_nr_convertToJSON() failed [ser_to_bro_layer2_ids]");
- goto end;
- }
- cJSON_AddItemToArray(ser_to_bro_layer2_idsList, itemLocal);
- }
- }
- }
-
- if (configuration_parameters_nr->ser_to_gro_layer2_ids) {
- cJSON *ser_to_gro_layer2_idsList = cJSON_AddArrayToObject(item, "serToGroLayer2Ids");
- if (ser_to_gro_layer2_idsList == NULL) {
- ogs_error("OpenAPI_configuration_parameters_nr_convertToJSON() failed [ser_to_gro_layer2_ids]");
- goto end;
- }
-
- OpenAPI_lnode_t *ser_to_gro_layer2_ids_node;
- if (configuration_parameters_nr->ser_to_gro_layer2_ids) {
- OpenAPI_list_for_each(configuration_parameters_nr->ser_to_gro_layer2_ids, ser_to_gro_layer2_ids_node) {
- cJSON *itemLocal = OpenAPI_service_id_to_layer2_id_convertToJSON(ser_to_gro_layer2_ids_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_configuration_parameters_nr_convertToJSON() failed [ser_to_gro_layer2_ids]");
- goto end;
- }
- cJSON_AddItemToArray(ser_to_gro_layer2_idsList, itemLocal);
- }
- }
- }
-
- if (configuration_parameters_nr->ser_to_def_layer2_ids) {
- cJSON *ser_to_def_layer2_idsList = cJSON_AddArrayToObject(item, "serToDefLayer2Ids");
- if (ser_to_def_layer2_idsList == NULL) {
- ogs_error("OpenAPI_configuration_parameters_nr_convertToJSON() failed [ser_to_def_layer2_ids]");
- goto end;
- }
-
- OpenAPI_lnode_t *ser_to_def_layer2_ids_node;
- if (configuration_parameters_nr->ser_to_def_layer2_ids) {
- OpenAPI_list_for_each(configuration_parameters_nr->ser_to_def_layer2_ids, ser_to_def_layer2_ids_node) {
- cJSON *itemLocal = OpenAPI_service_id_to_layer2_id_convertToJSON(ser_to_def_layer2_ids_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_configuration_parameters_nr_convertToJSON() failed [ser_to_def_layer2_ids]");
- goto end;
- }
- cJSON_AddItemToArray(ser_to_def_layer2_idsList, itemLocal);
- }
- }
- }
-
- if (configuration_parameters_nr->ser_id_to_frequs) {
- cJSON *ser_id_to_frequsList = cJSON_AddArrayToObject(item, "serIdToFrequs");
- if (ser_id_to_frequsList == NULL) {
- ogs_error("OpenAPI_configuration_parameters_nr_convertToJSON() failed [ser_id_to_frequs]");
- goto end;
- }
-
- OpenAPI_lnode_t *ser_id_to_frequs_node;
- if (configuration_parameters_nr->ser_id_to_frequs) {
- OpenAPI_list_for_each(configuration_parameters_nr->ser_id_to_frequs, ser_id_to_frequs_node) {
- cJSON *itemLocal = OpenAPI_service_id_to_frequency_convertToJSON(ser_id_to_frequs_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_configuration_parameters_nr_convertToJSON() failed [ser_id_to_frequs]");
- goto end;
- }
- cJSON_AddItemToArray(ser_id_to_frequsList, itemLocal);
- }
- }
- }
-
- if (configuration_parameters_nr->pc5_qos_mappings) {
- cJSON *pc5_qos_mappingsList = cJSON_AddArrayToObject(item, "pc5QosMappings");
- if (pc5_qos_mappingsList == NULL) {
- ogs_error("OpenAPI_configuration_parameters_nr_convertToJSON() failed [pc5_qos_mappings]");
- goto end;
- }
-
- OpenAPI_lnode_t *pc5_qos_mappings_node;
- if (configuration_parameters_nr->pc5_qos_mappings) {
- OpenAPI_list_for_each(configuration_parameters_nr->pc5_qos_mappings, pc5_qos_mappings_node) {
- cJSON *itemLocal = OpenAPI_pc5_qos_mapping_convertToJSON(pc5_qos_mappings_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_configuration_parameters_nr_convertToJSON() failed [pc5_qos_mappings]");
- goto end;
- }
- cJSON_AddItemToArray(pc5_qos_mappingsList, itemLocal);
- }
- }
- }
-
- if (configuration_parameters_nr->slrb_configs) {
- cJSON *slrb_configsList = cJSON_AddArrayToObject(item, "slrbConfigs");
- if (slrb_configsList == NULL) {
- ogs_error("OpenAPI_configuration_parameters_nr_convertToJSON() failed [slrb_configs]");
- goto end;
- }
-
- OpenAPI_lnode_t *slrb_configs_node;
- if (configuration_parameters_nr->slrb_configs) {
- OpenAPI_list_for_each(configuration_parameters_nr->slrb_configs, slrb_configs_node) {
- cJSON *itemLocal = OpenAPI_slrb_configurations_convertToJSON(slrb_configs_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_configuration_parameters_nr_convertToJSON() failed [slrb_configs]");
- goto end;
- }
- cJSON_AddItemToArray(slrb_configsList, itemLocal);
- }
- }
- }
-
-end:
- return item;
-}
-
-OpenAPI_configuration_parameters_nr_t *OpenAPI_configuration_parameters_nr_parseFromJSON(cJSON *configuration_parameters_nrJSON)
-{
- OpenAPI_configuration_parameters_nr_t *configuration_parameters_nr_local_var = NULL;
- cJSON *ser_to_bro_layer2_ids = cJSON_GetObjectItemCaseSensitive(configuration_parameters_nrJSON, "serToBroLayer2Ids");
-
- OpenAPI_list_t *ser_to_bro_layer2_idsList;
- if (ser_to_bro_layer2_ids) {
- cJSON *ser_to_bro_layer2_ids_local_nonprimitive;
- if (!cJSON_IsArray(ser_to_bro_layer2_ids)) {
- ogs_error("OpenAPI_configuration_parameters_nr_parseFromJSON() failed [ser_to_bro_layer2_ids]");
- goto end;
- }
-
- ser_to_bro_layer2_idsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(ser_to_bro_layer2_ids_local_nonprimitive, ser_to_bro_layer2_ids ) {
- if (!cJSON_IsObject(ser_to_bro_layer2_ids_local_nonprimitive)) {
- ogs_error("OpenAPI_configuration_parameters_nr_parseFromJSON() failed [ser_to_bro_layer2_ids]");
- goto end;
- }
- OpenAPI_service_id_to_layer2_id_t *ser_to_bro_layer2_idsItem = OpenAPI_service_id_to_layer2_id_parseFromJSON(ser_to_bro_layer2_ids_local_nonprimitive);
-
- OpenAPI_list_add(ser_to_bro_layer2_idsList, ser_to_bro_layer2_idsItem);
- }
- }
-
- cJSON *ser_to_gro_layer2_ids = cJSON_GetObjectItemCaseSensitive(configuration_parameters_nrJSON, "serToGroLayer2Ids");
-
- OpenAPI_list_t *ser_to_gro_layer2_idsList;
- if (ser_to_gro_layer2_ids) {
- cJSON *ser_to_gro_layer2_ids_local_nonprimitive;
- if (!cJSON_IsArray(ser_to_gro_layer2_ids)) {
- ogs_error("OpenAPI_configuration_parameters_nr_parseFromJSON() failed [ser_to_gro_layer2_ids]");
- goto end;
- }
-
- ser_to_gro_layer2_idsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(ser_to_gro_layer2_ids_local_nonprimitive, ser_to_gro_layer2_ids ) {
- if (!cJSON_IsObject(ser_to_gro_layer2_ids_local_nonprimitive)) {
- ogs_error("OpenAPI_configuration_parameters_nr_parseFromJSON() failed [ser_to_gro_layer2_ids]");
- goto end;
- }
- OpenAPI_service_id_to_layer2_id_t *ser_to_gro_layer2_idsItem = OpenAPI_service_id_to_layer2_id_parseFromJSON(ser_to_gro_layer2_ids_local_nonprimitive);
-
- OpenAPI_list_add(ser_to_gro_layer2_idsList, ser_to_gro_layer2_idsItem);
- }
- }
-
- cJSON *ser_to_def_layer2_ids = cJSON_GetObjectItemCaseSensitive(configuration_parameters_nrJSON, "serToDefLayer2Ids");
-
- OpenAPI_list_t *ser_to_def_layer2_idsList;
- if (ser_to_def_layer2_ids) {
- cJSON *ser_to_def_layer2_ids_local_nonprimitive;
- if (!cJSON_IsArray(ser_to_def_layer2_ids)) {
- ogs_error("OpenAPI_configuration_parameters_nr_parseFromJSON() failed [ser_to_def_layer2_ids]");
- goto end;
- }
-
- ser_to_def_layer2_idsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(ser_to_def_layer2_ids_local_nonprimitive, ser_to_def_layer2_ids ) {
- if (!cJSON_IsObject(ser_to_def_layer2_ids_local_nonprimitive)) {
- ogs_error("OpenAPI_configuration_parameters_nr_parseFromJSON() failed [ser_to_def_layer2_ids]");
- goto end;
- }
- OpenAPI_service_id_to_layer2_id_t *ser_to_def_layer2_idsItem = OpenAPI_service_id_to_layer2_id_parseFromJSON(ser_to_def_layer2_ids_local_nonprimitive);
-
- OpenAPI_list_add(ser_to_def_layer2_idsList, ser_to_def_layer2_idsItem);
- }
- }
-
- cJSON *ser_id_to_frequs = cJSON_GetObjectItemCaseSensitive(configuration_parameters_nrJSON, "serIdToFrequs");
-
- OpenAPI_list_t *ser_id_to_frequsList;
- if (ser_id_to_frequs) {
- cJSON *ser_id_to_frequs_local_nonprimitive;
- if (!cJSON_IsArray(ser_id_to_frequs)) {
- ogs_error("OpenAPI_configuration_parameters_nr_parseFromJSON() failed [ser_id_to_frequs]");
- goto end;
- }
-
- ser_id_to_frequsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(ser_id_to_frequs_local_nonprimitive, ser_id_to_frequs ) {
- if (!cJSON_IsObject(ser_id_to_frequs_local_nonprimitive)) {
- ogs_error("OpenAPI_configuration_parameters_nr_parseFromJSON() failed [ser_id_to_frequs]");
- goto end;
- }
- OpenAPI_service_id_to_frequency_t *ser_id_to_frequsItem = OpenAPI_service_id_to_frequency_parseFromJSON(ser_id_to_frequs_local_nonprimitive);
-
- OpenAPI_list_add(ser_id_to_frequsList, ser_id_to_frequsItem);
- }
- }
-
- cJSON *pc5_qos_mappings = cJSON_GetObjectItemCaseSensitive(configuration_parameters_nrJSON, "pc5QosMappings");
-
- OpenAPI_list_t *pc5_qos_mappingsList;
- if (pc5_qos_mappings) {
- cJSON *pc5_qos_mappings_local_nonprimitive;
- if (!cJSON_IsArray(pc5_qos_mappings)) {
- ogs_error("OpenAPI_configuration_parameters_nr_parseFromJSON() failed [pc5_qos_mappings]");
- goto end;
- }
-
- pc5_qos_mappingsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(pc5_qos_mappings_local_nonprimitive, pc5_qos_mappings ) {
- if (!cJSON_IsObject(pc5_qos_mappings_local_nonprimitive)) {
- ogs_error("OpenAPI_configuration_parameters_nr_parseFromJSON() failed [pc5_qos_mappings]");
- goto end;
- }
- OpenAPI_pc5_qos_mapping_t *pc5_qos_mappingsItem = OpenAPI_pc5_qos_mapping_parseFromJSON(pc5_qos_mappings_local_nonprimitive);
-
- OpenAPI_list_add(pc5_qos_mappingsList, pc5_qos_mappingsItem);
- }
- }
-
- cJSON *slrb_configs = cJSON_GetObjectItemCaseSensitive(configuration_parameters_nrJSON, "slrbConfigs");
-
- OpenAPI_list_t *slrb_configsList;
- if (slrb_configs) {
- cJSON *slrb_configs_local_nonprimitive;
- if (!cJSON_IsArray(slrb_configs)) {
- ogs_error("OpenAPI_configuration_parameters_nr_parseFromJSON() failed [slrb_configs]");
- goto end;
- }
-
- slrb_configsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(slrb_configs_local_nonprimitive, slrb_configs ) {
- if (!cJSON_IsObject(slrb_configs_local_nonprimitive)) {
- ogs_error("OpenAPI_configuration_parameters_nr_parseFromJSON() failed [slrb_configs]");
- goto end;
- }
- OpenAPI_slrb_configurations_t *slrb_configsItem = OpenAPI_slrb_configurations_parseFromJSON(slrb_configs_local_nonprimitive);
-
- OpenAPI_list_add(slrb_configsList, slrb_configsItem);
- }
- }
-
- configuration_parameters_nr_local_var = OpenAPI_configuration_parameters_nr_create (
- ser_to_bro_layer2_ids ? ser_to_bro_layer2_idsList : NULL,
- ser_to_gro_layer2_ids ? ser_to_gro_layer2_idsList : NULL,
- ser_to_def_layer2_ids ? ser_to_def_layer2_idsList : NULL,
- ser_id_to_frequs ? ser_id_to_frequsList : NULL,
- pc5_qos_mappings ? pc5_qos_mappingsList : NULL,
- slrb_configs ? slrb_configsList : NULL
- );
-
- return configuration_parameters_nr_local_var;
-end:
- return NULL;
-}
-
-OpenAPI_configuration_parameters_nr_t *OpenAPI_configuration_parameters_nr_copy(OpenAPI_configuration_parameters_nr_t *dst, OpenAPI_configuration_parameters_nr_t *src)
-{
- cJSON *item = NULL;
- char *content = NULL;
-
- ogs_assert(src);
- item = OpenAPI_configuration_parameters_nr_convertToJSON(src);
- if (!item) {
- ogs_error("OpenAPI_configuration_parameters_nr_convertToJSON() failed");
- return NULL;
- }
-
- content = cJSON_Print(item);
- cJSON_Delete(item);
-
- if (!content) {
- ogs_error("cJSON_Print() failed");
- return NULL;
- }
-
- item = cJSON_Parse(content);
- ogs_free(content);
- if (!item) {
- ogs_error("cJSON_Parse() failed");
- return NULL;
- }
-
- OpenAPI_configuration_parameters_nr_free(dst);
- dst = OpenAPI_configuration_parameters_nr_parseFromJSON(item);
- cJSON_Delete(item);
-
- return dst;
-}
-
diff --git a/lib/sbi/openapi/model/configuration_parameters_nr.h b/lib/sbi/openapi/model/configuration_parameters_nr.h
deleted file mode 100644
index 4826d8fe6..000000000
--- a/lib/sbi/openapi/model/configuration_parameters_nr.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * configuration_parameters_nr.h
- *
- *
- */
-
-#ifndef _OpenAPI_configuration_parameters_nr_H_
-#define _OpenAPI_configuration_parameters_nr_H_
-
-#include
-#include "../external/cJSON.h"
-#include "../include/list.h"
-#include "../include/keyValuePair.h"
-#include "../include/binary.h"
-#include "pc5_qos_mapping.h"
-#include "service_id_to_frequency.h"
-#include "service_id_to_layer2_id.h"
-#include "slrb_configurations.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct OpenAPI_configuration_parameters_nr_s OpenAPI_configuration_parameters_nr_t;
-typedef struct OpenAPI_configuration_parameters_nr_s {
- OpenAPI_list_t *ser_to_bro_layer2_ids;
- OpenAPI_list_t *ser_to_gro_layer2_ids;
- OpenAPI_list_t *ser_to_def_layer2_ids;
- OpenAPI_list_t *ser_id_to_frequs;
- OpenAPI_list_t *pc5_qos_mappings;
- OpenAPI_list_t *slrb_configs;
-} OpenAPI_configuration_parameters_nr_t;
-
-OpenAPI_configuration_parameters_nr_t *OpenAPI_configuration_parameters_nr_create(
- OpenAPI_list_t *ser_to_bro_layer2_ids,
- OpenAPI_list_t *ser_to_gro_layer2_ids,
- OpenAPI_list_t *ser_to_def_layer2_ids,
- OpenAPI_list_t *ser_id_to_frequs,
- OpenAPI_list_t *pc5_qos_mappings,
- OpenAPI_list_t *slrb_configs
- );
-void OpenAPI_configuration_parameters_nr_free(OpenAPI_configuration_parameters_nr_t *configuration_parameters_nr);
-OpenAPI_configuration_parameters_nr_t *OpenAPI_configuration_parameters_nr_parseFromJSON(cJSON *configuration_parameters_nrJSON);
-cJSON *OpenAPI_configuration_parameters_nr_convertToJSON(OpenAPI_configuration_parameters_nr_t *configuration_parameters_nr);
-OpenAPI_configuration_parameters_nr_t *OpenAPI_configuration_parameters_nr_copy(OpenAPI_configuration_parameters_nr_t *dst, OpenAPI_configuration_parameters_nr_t *src);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _OpenAPI_configuration_parameters_nr_H_ */
-
diff --git a/lib/sbi/openapi/model/configured_snssai.c b/lib/sbi/openapi/model/configured_snssai.c
index 3efe1777e..645d17d06 100644
--- a/lib/sbi/openapi/model/configured_snssai.c
+++ b/lib/sbi/openapi/model/configured_snssai.c
@@ -7,7 +7,7 @@
OpenAPI_configured_snssai_t *OpenAPI_configured_snssai_create(
OpenAPI_snssai_t *configured_snssai,
OpenAPI_snssai_t *mapped_home_snssai
- )
+)
{
OpenAPI_configured_snssai_t *configured_snssai_local_var = OpenAPI_malloc(sizeof(OpenAPI_configured_snssai_t));
if (!configured_snssai_local_var) {
@@ -52,16 +52,16 @@ cJSON *OpenAPI_configured_snssai_convertToJSON(OpenAPI_configured_snssai_t *conf
}
if (configured_snssai->mapped_home_snssai) {
- cJSON *mapped_home_snssai_local_JSON = OpenAPI_snssai_convertToJSON(configured_snssai->mapped_home_snssai);
- if (mapped_home_snssai_local_JSON == NULL) {
- ogs_error("OpenAPI_configured_snssai_convertToJSON() failed [mapped_home_snssai]");
- goto end;
- }
- cJSON_AddItemToObject(item, "mappedHomeSnssai", mapped_home_snssai_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_configured_snssai_convertToJSON() failed [mapped_home_snssai]");
- goto end;
- }
+ cJSON *mapped_home_snssai_local_JSON = OpenAPI_snssai_convertToJSON(configured_snssai->mapped_home_snssai);
+ if (mapped_home_snssai_local_JSON == NULL) {
+ ogs_error("OpenAPI_configured_snssai_convertToJSON() failed [mapped_home_snssai]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "mappedHomeSnssai", mapped_home_snssai_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_configured_snssai_convertToJSON() failed [mapped_home_snssai]");
+ goto end;
+ }
}
end:
@@ -78,20 +78,20 @@ OpenAPI_configured_snssai_t *OpenAPI_configured_snssai_parseFromJSON(cJSON *conf
}
OpenAPI_snssai_t *configured_snssai_local_nonprim = NULL;
-
+
configured_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(configured_snssai);
cJSON *mapped_home_snssai = cJSON_GetObjectItemCaseSensitive(configured_snssaiJSON, "mappedHomeSnssai");
OpenAPI_snssai_t *mapped_home_snssai_local_nonprim = NULL;
- if (mapped_home_snssai) {
- mapped_home_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(mapped_home_snssai);
+ if (mapped_home_snssai) {
+ mapped_home_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(mapped_home_snssai);
}
configured_snssai_local_var = OpenAPI_configured_snssai_create (
configured_snssai_local_nonprim,
mapped_home_snssai ? mapped_home_snssai_local_nonprim : NULL
- );
+ );
return configured_snssai_local_var;
end:
diff --git a/lib/sbi/openapi/model/configured_snssai.h b/lib/sbi/openapi/model/configured_snssai.h
index ea28f83b4..dc7bd93eb 100644
--- a/lib/sbi/openapi/model/configured_snssai.h
+++ b/lib/sbi/openapi/model/configured_snssai.h
@@ -1,7 +1,7 @@
/*
* configured_snssai.h
*
- *
+ *
*/
#ifndef _OpenAPI_configured_snssai_H_
@@ -27,7 +27,7 @@ typedef struct OpenAPI_configured_snssai_s {
OpenAPI_configured_snssai_t *OpenAPI_configured_snssai_create(
OpenAPI_snssai_t *configured_snssai,
OpenAPI_snssai_t *mapped_home_snssai
- );
+);
void OpenAPI_configured_snssai_free(OpenAPI_configured_snssai_t *configured_snssai);
OpenAPI_configured_snssai_t *OpenAPI_configured_snssai_parseFromJSON(cJSON *configured_snssaiJSON);
cJSON *OpenAPI_configured_snssai_convertToJSON(OpenAPI_configured_snssai_t *configured_snssai);
diff --git a/lib/sbi/openapi/model/confirmation_data.c b/lib/sbi/openapi/model/confirmation_data.c
index 4392b421f..ee4e409f5 100644
--- a/lib/sbi/openapi/model/confirmation_data.c
+++ b/lib/sbi/openapi/model/confirmation_data.c
@@ -5,14 +5,16 @@
#include "confirmation_data.h"
OpenAPI_confirmation_data_t *OpenAPI_confirmation_data_create(
- char *res_star
- )
+ char *res_star,
+ char *supported_features
+)
{
OpenAPI_confirmation_data_t *confirmation_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_confirmation_data_t));
if (!confirmation_data_local_var) {
return NULL;
}
confirmation_data_local_var->res_star = res_star;
+ confirmation_data_local_var->supported_features = supported_features;
return confirmation_data_local_var;
}
@@ -24,6 +26,7 @@ void OpenAPI_confirmation_data_free(OpenAPI_confirmation_data_t *confirmation_da
}
OpenAPI_lnode_t *node;
ogs_free(confirmation_data->res_star);
+ ogs_free(confirmation_data->supported_features);
ogs_free(confirmation_data);
}
@@ -42,6 +45,13 @@ cJSON *OpenAPI_confirmation_data_convertToJSON(OpenAPI_confirmation_data_t *conf
goto end;
}
+ if (confirmation_data->supported_features) {
+ if (cJSON_AddStringToObject(item, "supportedFeatures", confirmation_data->supported_features) == NULL) {
+ ogs_error("OpenAPI_confirmation_data_convertToJSON() failed [supported_features]");
+ goto end;
+ }
+ }
+
end:
return item;
}
@@ -55,15 +65,25 @@ OpenAPI_confirmation_data_t *OpenAPI_confirmation_data_parseFromJSON(cJSON *conf
goto end;
}
-
+
if (!cJSON_IsString(res_star)) {
ogs_error("OpenAPI_confirmation_data_parseFromJSON() failed [res_star]");
goto end;
}
+ cJSON *supported_features = cJSON_GetObjectItemCaseSensitive(confirmation_dataJSON, "supportedFeatures");
+
+ if (supported_features) {
+ if (!cJSON_IsString(supported_features)) {
+ ogs_error("OpenAPI_confirmation_data_parseFromJSON() failed [supported_features]");
+ goto end;
+ }
+ }
+
confirmation_data_local_var = OpenAPI_confirmation_data_create (
- ogs_strdup_or_assert(res_star->valuestring)
- );
+ ogs_strdup_or_assert(res_star->valuestring),
+ supported_features ? ogs_strdup_or_assert(supported_features->valuestring) : NULL
+ );
return confirmation_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/confirmation_data.h b/lib/sbi/openapi/model/confirmation_data.h
index 06f09f276..0bb85a1da 100644
--- a/lib/sbi/openapi/model/confirmation_data.h
+++ b/lib/sbi/openapi/model/confirmation_data.h
@@ -1,7 +1,7 @@
/*
* confirmation_data.h
*
- *
+ *
*/
#ifndef _OpenAPI_confirmation_data_H_
@@ -20,11 +20,13 @@ extern "C" {
typedef struct OpenAPI_confirmation_data_s OpenAPI_confirmation_data_t;
typedef struct OpenAPI_confirmation_data_s {
char *res_star;
+ char *supported_features;
} OpenAPI_confirmation_data_t;
OpenAPI_confirmation_data_t *OpenAPI_confirmation_data_create(
- char *res_star
- );
+ char *res_star,
+ char *supported_features
+);
void OpenAPI_confirmation_data_free(OpenAPI_confirmation_data_t *confirmation_data);
OpenAPI_confirmation_data_t *OpenAPI_confirmation_data_parseFromJSON(cJSON *confirmation_dataJSON);
cJSON *OpenAPI_confirmation_data_convertToJSON(OpenAPI_confirmation_data_t *confirmation_data);
diff --git a/lib/sbi/openapi/model/confirmation_data_response.c b/lib/sbi/openapi/model/confirmation_data_response.c
index 7a6b90d5f..9fbc04f4e 100644
--- a/lib/sbi/openapi/model/confirmation_data_response.c
+++ b/lib/sbi/openapi/model/confirmation_data_response.c
@@ -8,7 +8,7 @@ OpenAPI_confirmation_data_response_t *OpenAPI_confirmation_data_response_create(
OpenAPI_auth_result_e auth_result,
char *supi,
char *kseaf
- )
+)
{
OpenAPI_confirmation_data_response_t *confirmation_data_response_local_var = OpenAPI_malloc(sizeof(OpenAPI_confirmation_data_response_t));
if (!confirmation_data_response_local_var) {
@@ -48,17 +48,17 @@ cJSON *OpenAPI_confirmation_data_response_convertToJSON(OpenAPI_confirmation_dat
}
if (confirmation_data_response->supi) {
- if (cJSON_AddStringToObject(item, "supi", confirmation_data_response->supi) == NULL) {
- ogs_error("OpenAPI_confirmation_data_response_convertToJSON() failed [supi]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "supi", confirmation_data_response->supi) == NULL) {
+ ogs_error("OpenAPI_confirmation_data_response_convertToJSON() failed [supi]");
+ goto end;
+ }
}
if (confirmation_data_response->kseaf) {
- if (cJSON_AddStringToObject(item, "kseaf", confirmation_data_response->kseaf) == NULL) {
- ogs_error("OpenAPI_confirmation_data_response_convertToJSON() failed [kseaf]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "kseaf", confirmation_data_response->kseaf) == NULL) {
+ ogs_error("OpenAPI_confirmation_data_response_convertToJSON() failed [kseaf]");
+ goto end;
+ }
}
end:
@@ -75,7 +75,7 @@ OpenAPI_confirmation_data_response_t *OpenAPI_confirmation_data_response_parseFr
}
OpenAPI_auth_result_e auth_resultVariable;
-
+
if (!cJSON_IsString(auth_result)) {
ogs_error("OpenAPI_confirmation_data_response_parseFromJSON() failed [auth_result]");
goto end;
@@ -84,27 +84,27 @@ OpenAPI_confirmation_data_response_t *OpenAPI_confirmation_data_response_parseFr
cJSON *supi = cJSON_GetObjectItemCaseSensitive(confirmation_data_responseJSON, "supi");
- if (supi) {
- if (!cJSON_IsString(supi)) {
- ogs_error("OpenAPI_confirmation_data_response_parseFromJSON() failed [supi]");
- goto end;
- }
+ if (supi) {
+ if (!cJSON_IsString(supi)) {
+ ogs_error("OpenAPI_confirmation_data_response_parseFromJSON() failed [supi]");
+ goto end;
+ }
}
cJSON *kseaf = cJSON_GetObjectItemCaseSensitive(confirmation_data_responseJSON, "kseaf");
- if (kseaf) {
- if (!cJSON_IsString(kseaf)) {
- ogs_error("OpenAPI_confirmation_data_response_parseFromJSON() failed [kseaf]");
- goto end;
- }
+ if (kseaf) {
+ if (!cJSON_IsString(kseaf)) {
+ ogs_error("OpenAPI_confirmation_data_response_parseFromJSON() failed [kseaf]");
+ goto end;
+ }
}
confirmation_data_response_local_var = OpenAPI_confirmation_data_response_create (
auth_resultVariable,
supi ? ogs_strdup_or_assert(supi->valuestring) : NULL,
kseaf ? ogs_strdup_or_assert(kseaf->valuestring) : NULL
- );
+ );
return confirmation_data_response_local_var;
end:
diff --git a/lib/sbi/openapi/model/confirmation_data_response.h b/lib/sbi/openapi/model/confirmation_data_response.h
index 0f1132d4c..4753c15ab 100644
--- a/lib/sbi/openapi/model/confirmation_data_response.h
+++ b/lib/sbi/openapi/model/confirmation_data_response.h
@@ -1,7 +1,7 @@
/*
* confirmation_data_response.h
*
- *
+ *
*/
#ifndef _OpenAPI_confirmation_data_response_H_
@@ -29,7 +29,7 @@ OpenAPI_confirmation_data_response_t *OpenAPI_confirmation_data_response_create(
OpenAPI_auth_result_e auth_result,
char *supi,
char *kseaf
- );
+);
void OpenAPI_confirmation_data_response_free(OpenAPI_confirmation_data_response_t *confirmation_data_response);
OpenAPI_confirmation_data_response_t *OpenAPI_confirmation_data_response_parseFromJSON(cJSON *confirmation_data_responseJSON);
cJSON *OpenAPI_confirmation_data_response_convertToJSON(OpenAPI_confirmation_data_response_t *confirmation_data_response);
diff --git a/lib/sbi/openapi/model/context_data_set_name.h b/lib/sbi/openapi/model/context_data_set_name.h
index 3899fd8f1..cd85ee93e 100644
--- a/lib/sbi/openapi/model/context_data_set_name.h
+++ b/lib/sbi/openapi/model/context_data_set_name.h
@@ -1,7 +1,7 @@
/*
* context_data_set_name.h
*
- *
+ *
*/
#ifndef _OpenAPI_context_data_set_name_H_
diff --git a/lib/sbi/openapi/model/context_data_sets.c b/lib/sbi/openapi/model/context_data_sets.c
index 43041899a..3f7e17c36 100644
--- a/lib/sbi/openapi/model/context_data_sets.c
+++ b/lib/sbi/openapi/model/context_data_sets.c
@@ -14,7 +14,7 @@ OpenAPI_context_data_sets_t *OpenAPI_context_data_sets_create(
OpenAPI_list_t *subscription_data_subscriptions,
OpenAPI_list_t *smf_registrations,
OpenAPI_ip_sm_gw_registration_t *ip_sm_gw
- )
+)
{
OpenAPI_context_data_sets_t *context_data_sets_local_var = OpenAPI_malloc(sizeof(OpenAPI_context_data_sets_t));
if (!context_data_sets_local_var) {
@@ -74,148 +74,148 @@ cJSON *OpenAPI_context_data_sets_convertToJSON(OpenAPI_context_data_sets_t *cont
item = cJSON_CreateObject();
if (context_data_sets->amf3_gpp) {
- cJSON *amf3_gpp_local_JSON = OpenAPI_amf3_gpp_access_registration_convertToJSON(context_data_sets->amf3_gpp);
- if (amf3_gpp_local_JSON == NULL) {
- ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [amf3_gpp]");
- goto end;
- }
- cJSON_AddItemToObject(item, "amf3Gpp", amf3_gpp_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [amf3_gpp]");
- goto end;
- }
+ cJSON *amf3_gpp_local_JSON = OpenAPI_amf3_gpp_access_registration_convertToJSON(context_data_sets->amf3_gpp);
+ if (amf3_gpp_local_JSON == NULL) {
+ ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [amf3_gpp]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "amf3Gpp", amf3_gpp_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [amf3_gpp]");
+ goto end;
+ }
}
if (context_data_sets->amf_non3_gpp) {
- cJSON *amf_non3_gpp_local_JSON = OpenAPI_amf_non3_gpp_access_registration_convertToJSON(context_data_sets->amf_non3_gpp);
- if (amf_non3_gpp_local_JSON == NULL) {
- ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [amf_non3_gpp]");
- goto end;
- }
- cJSON_AddItemToObject(item, "amfNon3Gpp", amf_non3_gpp_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [amf_non3_gpp]");
- goto end;
- }
+ cJSON *amf_non3_gpp_local_JSON = OpenAPI_amf_non3_gpp_access_registration_convertToJSON(context_data_sets->amf_non3_gpp);
+ if (amf_non3_gpp_local_JSON == NULL) {
+ ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [amf_non3_gpp]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "amfNon3Gpp", amf_non3_gpp_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [amf_non3_gpp]");
+ goto end;
+ }
}
if (context_data_sets->sdm_subscriptions) {
- cJSON *sdm_subscriptionsList = cJSON_AddArrayToObject(item, "sdmSubscriptions");
- if (sdm_subscriptionsList == NULL) {
- ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [sdm_subscriptions]");
- goto end;
- }
+ cJSON *sdm_subscriptionsList = cJSON_AddArrayToObject(item, "sdmSubscriptions");
+ if (sdm_subscriptionsList == NULL) {
+ ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [sdm_subscriptions]");
+ goto end;
+ }
- OpenAPI_lnode_t *sdm_subscriptions_node;
- if (context_data_sets->sdm_subscriptions) {
- OpenAPI_list_for_each(context_data_sets->sdm_subscriptions, sdm_subscriptions_node) {
- cJSON *itemLocal = OpenAPI_sdm_subscription_convertToJSON(sdm_subscriptions_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [sdm_subscriptions]");
- goto end;
- }
- cJSON_AddItemToArray(sdm_subscriptionsList, itemLocal);
+ OpenAPI_lnode_t *sdm_subscriptions_node;
+ if (context_data_sets->sdm_subscriptions) {
+ OpenAPI_list_for_each(context_data_sets->sdm_subscriptions, sdm_subscriptions_node) {
+ cJSON *itemLocal = OpenAPI_sdm_subscription_convertToJSON(sdm_subscriptions_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [sdm_subscriptions]");
+ goto end;
}
+ cJSON_AddItemToArray(sdm_subscriptionsList, itemLocal);
}
}
+ }
if (context_data_sets->ee_subscriptions) {
- cJSON *ee_subscriptionsList = cJSON_AddArrayToObject(item, "eeSubscriptions");
- if (ee_subscriptionsList == NULL) {
- ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [ee_subscriptions]");
- goto end;
- }
+ cJSON *ee_subscriptionsList = cJSON_AddArrayToObject(item, "eeSubscriptions");
+ if (ee_subscriptionsList == NULL) {
+ ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [ee_subscriptions]");
+ goto end;
+ }
- OpenAPI_lnode_t *ee_subscriptions_node;
- if (context_data_sets->ee_subscriptions) {
- OpenAPI_list_for_each(context_data_sets->ee_subscriptions, ee_subscriptions_node) {
- cJSON *itemLocal = OpenAPI_ee_subscription_convertToJSON(ee_subscriptions_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [ee_subscriptions]");
- goto end;
- }
- cJSON_AddItemToArray(ee_subscriptionsList, itemLocal);
+ OpenAPI_lnode_t *ee_subscriptions_node;
+ if (context_data_sets->ee_subscriptions) {
+ OpenAPI_list_for_each(context_data_sets->ee_subscriptions, ee_subscriptions_node) {
+ cJSON *itemLocal = OpenAPI_ee_subscription_convertToJSON(ee_subscriptions_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [ee_subscriptions]");
+ goto end;
}
+ cJSON_AddItemToArray(ee_subscriptionsList, itemLocal);
}
}
+ }
if (context_data_sets->smsf3_gpp_access) {
- cJSON *smsf3_gpp_access_local_JSON = OpenAPI_smsf_registration_convertToJSON(context_data_sets->smsf3_gpp_access);
- if (smsf3_gpp_access_local_JSON == NULL) {
- ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [smsf3_gpp_access]");
- goto end;
- }
- cJSON_AddItemToObject(item, "smsf3GppAccess", smsf3_gpp_access_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [smsf3_gpp_access]");
- goto end;
- }
+ cJSON *smsf3_gpp_access_local_JSON = OpenAPI_smsf_registration_convertToJSON(context_data_sets->smsf3_gpp_access);
+ if (smsf3_gpp_access_local_JSON == NULL) {
+ ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [smsf3_gpp_access]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "smsf3GppAccess", smsf3_gpp_access_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [smsf3_gpp_access]");
+ goto end;
+ }
}
if (context_data_sets->smsf_non3_gpp_access) {
- cJSON *smsf_non3_gpp_access_local_JSON = OpenAPI_smsf_registration_convertToJSON(context_data_sets->smsf_non3_gpp_access);
- if (smsf_non3_gpp_access_local_JSON == NULL) {
- ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [smsf_non3_gpp_access]");
- goto end;
- }
- cJSON_AddItemToObject(item, "smsfNon3GppAccess", smsf_non3_gpp_access_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [smsf_non3_gpp_access]");
- goto end;
- }
+ cJSON *smsf_non3_gpp_access_local_JSON = OpenAPI_smsf_registration_convertToJSON(context_data_sets->smsf_non3_gpp_access);
+ if (smsf_non3_gpp_access_local_JSON == NULL) {
+ ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [smsf_non3_gpp_access]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "smsfNon3GppAccess", smsf_non3_gpp_access_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [smsf_non3_gpp_access]");
+ goto end;
+ }
}
if (context_data_sets->subscription_data_subscriptions) {
- cJSON *subscription_data_subscriptionsList = cJSON_AddArrayToObject(item, "subscriptionDataSubscriptions");
- if (subscription_data_subscriptionsList == NULL) {
- ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [subscription_data_subscriptions]");
- goto end;
- }
+ cJSON *subscription_data_subscriptionsList = cJSON_AddArrayToObject(item, "subscriptionDataSubscriptions");
+ if (subscription_data_subscriptionsList == NULL) {
+ ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [subscription_data_subscriptions]");
+ goto end;
+ }
- OpenAPI_lnode_t *subscription_data_subscriptions_node;
- if (context_data_sets->subscription_data_subscriptions) {
- OpenAPI_list_for_each(context_data_sets->subscription_data_subscriptions, subscription_data_subscriptions_node) {
- cJSON *itemLocal = OpenAPI_subscription_data_subscriptions_convertToJSON(subscription_data_subscriptions_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [subscription_data_subscriptions]");
- goto end;
- }
- cJSON_AddItemToArray(subscription_data_subscriptionsList, itemLocal);
+ OpenAPI_lnode_t *subscription_data_subscriptions_node;
+ if (context_data_sets->subscription_data_subscriptions) {
+ OpenAPI_list_for_each(context_data_sets->subscription_data_subscriptions, subscription_data_subscriptions_node) {
+ cJSON *itemLocal = OpenAPI_subscription_data_subscriptions_convertToJSON(subscription_data_subscriptions_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [subscription_data_subscriptions]");
+ goto end;
}
+ cJSON_AddItemToArray(subscription_data_subscriptionsList, itemLocal);
}
}
+ }
if (context_data_sets->smf_registrations) {
- cJSON *smf_registrationsList = cJSON_AddArrayToObject(item, "smfRegistrations");
- if (smf_registrationsList == NULL) {
- ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [smf_registrations]");
- goto end;
- }
+ cJSON *smf_registrationsList = cJSON_AddArrayToObject(item, "smfRegistrations");
+ if (smf_registrationsList == NULL) {
+ ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [smf_registrations]");
+ goto end;
+ }
- OpenAPI_lnode_t *smf_registrations_node;
- if (context_data_sets->smf_registrations) {
- OpenAPI_list_for_each(context_data_sets->smf_registrations, smf_registrations_node) {
- cJSON *itemLocal = OpenAPI_smf_registration_convertToJSON(smf_registrations_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [smf_registrations]");
- goto end;
- }
- cJSON_AddItemToArray(smf_registrationsList, itemLocal);
+ OpenAPI_lnode_t *smf_registrations_node;
+ if (context_data_sets->smf_registrations) {
+ OpenAPI_list_for_each(context_data_sets->smf_registrations, smf_registrations_node) {
+ cJSON *itemLocal = OpenAPI_smf_registration_convertToJSON(smf_registrations_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [smf_registrations]");
+ goto end;
}
+ cJSON_AddItemToArray(smf_registrationsList, itemLocal);
}
}
+ }
if (context_data_sets->ip_sm_gw) {
- cJSON *ip_sm_gw_local_JSON = OpenAPI_ip_sm_gw_registration_convertToJSON(context_data_sets->ip_sm_gw);
- if (ip_sm_gw_local_JSON == NULL) {
- ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [ip_sm_gw]");
- goto end;
- }
- cJSON_AddItemToObject(item, "ipSmGw", ip_sm_gw_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [ip_sm_gw]");
- goto end;
- }
+ cJSON *ip_sm_gw_local_JSON = OpenAPI_ip_sm_gw_registration_convertToJSON(context_data_sets->ip_sm_gw);
+ if (ip_sm_gw_local_JSON == NULL) {
+ ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [ip_sm_gw]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "ipSmGw", ip_sm_gw_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_context_data_sets_convertToJSON() failed [ip_sm_gw]");
+ goto end;
+ }
}
end:
@@ -228,128 +228,128 @@ OpenAPI_context_data_sets_t *OpenAPI_context_data_sets_parseFromJSON(cJSON *cont
cJSON *amf3_gpp = cJSON_GetObjectItemCaseSensitive(context_data_setsJSON, "amf3Gpp");
OpenAPI_amf3_gpp_access_registration_t *amf3_gpp_local_nonprim = NULL;
- if (amf3_gpp) {
- amf3_gpp_local_nonprim = OpenAPI_amf3_gpp_access_registration_parseFromJSON(amf3_gpp);
+ if (amf3_gpp) {
+ amf3_gpp_local_nonprim = OpenAPI_amf3_gpp_access_registration_parseFromJSON(amf3_gpp);
}
cJSON *amf_non3_gpp = cJSON_GetObjectItemCaseSensitive(context_data_setsJSON, "amfNon3Gpp");
OpenAPI_amf_non3_gpp_access_registration_t *amf_non3_gpp_local_nonprim = NULL;
- if (amf_non3_gpp) {
- amf_non3_gpp_local_nonprim = OpenAPI_amf_non3_gpp_access_registration_parseFromJSON(amf_non3_gpp);
+ if (amf_non3_gpp) {
+ amf_non3_gpp_local_nonprim = OpenAPI_amf_non3_gpp_access_registration_parseFromJSON(amf_non3_gpp);
}
cJSON *sdm_subscriptions = cJSON_GetObjectItemCaseSensitive(context_data_setsJSON, "sdmSubscriptions");
OpenAPI_list_t *sdm_subscriptionsList;
- if (sdm_subscriptions) {
- cJSON *sdm_subscriptions_local_nonprimitive;
- if (!cJSON_IsArray(sdm_subscriptions)) {
+ if (sdm_subscriptions) {
+ cJSON *sdm_subscriptions_local_nonprimitive;
+ if (!cJSON_IsArray(sdm_subscriptions)){
+ ogs_error("OpenAPI_context_data_sets_parseFromJSON() failed [sdm_subscriptions]");
+ goto end;
+ }
+
+ sdm_subscriptionsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(sdm_subscriptions_local_nonprimitive, sdm_subscriptions ) {
+ if (!cJSON_IsObject(sdm_subscriptions_local_nonprimitive)) {
ogs_error("OpenAPI_context_data_sets_parseFromJSON() failed [sdm_subscriptions]");
goto end;
}
+ OpenAPI_sdm_subscription_t *sdm_subscriptionsItem = OpenAPI_sdm_subscription_parseFromJSON(sdm_subscriptions_local_nonprimitive);
- sdm_subscriptionsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(sdm_subscriptions_local_nonprimitive, sdm_subscriptions ) {
- if (!cJSON_IsObject(sdm_subscriptions_local_nonprimitive)) {
- ogs_error("OpenAPI_context_data_sets_parseFromJSON() failed [sdm_subscriptions]");
- goto end;
- }
- OpenAPI_sdm_subscription_t *sdm_subscriptionsItem = OpenAPI_sdm_subscription_parseFromJSON(sdm_subscriptions_local_nonprimitive);
-
- OpenAPI_list_add(sdm_subscriptionsList, sdm_subscriptionsItem);
- }
+ OpenAPI_list_add(sdm_subscriptionsList, sdm_subscriptionsItem);
+ }
}
cJSON *ee_subscriptions = cJSON_GetObjectItemCaseSensitive(context_data_setsJSON, "eeSubscriptions");
OpenAPI_list_t *ee_subscriptionsList;
- if (ee_subscriptions) {
- cJSON *ee_subscriptions_local_nonprimitive;
- if (!cJSON_IsArray(ee_subscriptions)) {
+ if (ee_subscriptions) {
+ cJSON *ee_subscriptions_local_nonprimitive;
+ if (!cJSON_IsArray(ee_subscriptions)){
+ ogs_error("OpenAPI_context_data_sets_parseFromJSON() failed [ee_subscriptions]");
+ goto end;
+ }
+
+ ee_subscriptionsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(ee_subscriptions_local_nonprimitive, ee_subscriptions ) {
+ if (!cJSON_IsObject(ee_subscriptions_local_nonprimitive)) {
ogs_error("OpenAPI_context_data_sets_parseFromJSON() failed [ee_subscriptions]");
goto end;
}
+ OpenAPI_ee_subscription_t *ee_subscriptionsItem = OpenAPI_ee_subscription_parseFromJSON(ee_subscriptions_local_nonprimitive);
- ee_subscriptionsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(ee_subscriptions_local_nonprimitive, ee_subscriptions ) {
- if (!cJSON_IsObject(ee_subscriptions_local_nonprimitive)) {
- ogs_error("OpenAPI_context_data_sets_parseFromJSON() failed [ee_subscriptions]");
- goto end;
- }
- OpenAPI_ee_subscription_t *ee_subscriptionsItem = OpenAPI_ee_subscription_parseFromJSON(ee_subscriptions_local_nonprimitive);
-
- OpenAPI_list_add(ee_subscriptionsList, ee_subscriptionsItem);
- }
+ OpenAPI_list_add(ee_subscriptionsList, ee_subscriptionsItem);
+ }
}
cJSON *smsf3_gpp_access = cJSON_GetObjectItemCaseSensitive(context_data_setsJSON, "smsf3GppAccess");
OpenAPI_smsf_registration_t *smsf3_gpp_access_local_nonprim = NULL;
- if (smsf3_gpp_access) {
- smsf3_gpp_access_local_nonprim = OpenAPI_smsf_registration_parseFromJSON(smsf3_gpp_access);
+ if (smsf3_gpp_access) {
+ smsf3_gpp_access_local_nonprim = OpenAPI_smsf_registration_parseFromJSON(smsf3_gpp_access);
}
cJSON *smsf_non3_gpp_access = cJSON_GetObjectItemCaseSensitive(context_data_setsJSON, "smsfNon3GppAccess");
OpenAPI_smsf_registration_t *smsf_non3_gpp_access_local_nonprim = NULL;
- if (smsf_non3_gpp_access) {
- smsf_non3_gpp_access_local_nonprim = OpenAPI_smsf_registration_parseFromJSON(smsf_non3_gpp_access);
+ if (smsf_non3_gpp_access) {
+ smsf_non3_gpp_access_local_nonprim = OpenAPI_smsf_registration_parseFromJSON(smsf_non3_gpp_access);
}
cJSON *subscription_data_subscriptions = cJSON_GetObjectItemCaseSensitive(context_data_setsJSON, "subscriptionDataSubscriptions");
OpenAPI_list_t *subscription_data_subscriptionsList;
- if (subscription_data_subscriptions) {
- cJSON *subscription_data_subscriptions_local_nonprimitive;
- if (!cJSON_IsArray(subscription_data_subscriptions)) {
+ if (subscription_data_subscriptions) {
+ cJSON *subscription_data_subscriptions_local_nonprimitive;
+ if (!cJSON_IsArray(subscription_data_subscriptions)){
+ ogs_error("OpenAPI_context_data_sets_parseFromJSON() failed [subscription_data_subscriptions]");
+ goto end;
+ }
+
+ subscription_data_subscriptionsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(subscription_data_subscriptions_local_nonprimitive, subscription_data_subscriptions ) {
+ if (!cJSON_IsObject(subscription_data_subscriptions_local_nonprimitive)) {
ogs_error("OpenAPI_context_data_sets_parseFromJSON() failed [subscription_data_subscriptions]");
goto end;
}
+ OpenAPI_subscription_data_subscriptions_t *subscription_data_subscriptionsItem = OpenAPI_subscription_data_subscriptions_parseFromJSON(subscription_data_subscriptions_local_nonprimitive);
- subscription_data_subscriptionsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(subscription_data_subscriptions_local_nonprimitive, subscription_data_subscriptions ) {
- if (!cJSON_IsObject(subscription_data_subscriptions_local_nonprimitive)) {
- ogs_error("OpenAPI_context_data_sets_parseFromJSON() failed [subscription_data_subscriptions]");
- goto end;
- }
- OpenAPI_subscription_data_subscriptions_t *subscription_data_subscriptionsItem = OpenAPI_subscription_data_subscriptions_parseFromJSON(subscription_data_subscriptions_local_nonprimitive);
-
- OpenAPI_list_add(subscription_data_subscriptionsList, subscription_data_subscriptionsItem);
- }
+ OpenAPI_list_add(subscription_data_subscriptionsList, subscription_data_subscriptionsItem);
+ }
}
cJSON *smf_registrations = cJSON_GetObjectItemCaseSensitive(context_data_setsJSON, "smfRegistrations");
OpenAPI_list_t *smf_registrationsList;
- if (smf_registrations) {
- cJSON *smf_registrations_local_nonprimitive;
- if (!cJSON_IsArray(smf_registrations)) {
+ if (smf_registrations) {
+ cJSON *smf_registrations_local_nonprimitive;
+ if (!cJSON_IsArray(smf_registrations)){
+ ogs_error("OpenAPI_context_data_sets_parseFromJSON() failed [smf_registrations]");
+ goto end;
+ }
+
+ smf_registrationsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(smf_registrations_local_nonprimitive, smf_registrations ) {
+ if (!cJSON_IsObject(smf_registrations_local_nonprimitive)) {
ogs_error("OpenAPI_context_data_sets_parseFromJSON() failed [smf_registrations]");
goto end;
}
+ OpenAPI_smf_registration_t *smf_registrationsItem = OpenAPI_smf_registration_parseFromJSON(smf_registrations_local_nonprimitive);
- smf_registrationsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(smf_registrations_local_nonprimitive, smf_registrations ) {
- if (!cJSON_IsObject(smf_registrations_local_nonprimitive)) {
- ogs_error("OpenAPI_context_data_sets_parseFromJSON() failed [smf_registrations]");
- goto end;
- }
- OpenAPI_smf_registration_t *smf_registrationsItem = OpenAPI_smf_registration_parseFromJSON(smf_registrations_local_nonprimitive);
-
- OpenAPI_list_add(smf_registrationsList, smf_registrationsItem);
- }
+ OpenAPI_list_add(smf_registrationsList, smf_registrationsItem);
+ }
}
cJSON *ip_sm_gw = cJSON_GetObjectItemCaseSensitive(context_data_setsJSON, "ipSmGw");
OpenAPI_ip_sm_gw_registration_t *ip_sm_gw_local_nonprim = NULL;
- if (ip_sm_gw) {
- ip_sm_gw_local_nonprim = OpenAPI_ip_sm_gw_registration_parseFromJSON(ip_sm_gw);
+ if (ip_sm_gw) {
+ ip_sm_gw_local_nonprim = OpenAPI_ip_sm_gw_registration_parseFromJSON(ip_sm_gw);
}
context_data_sets_local_var = OpenAPI_context_data_sets_create (
@@ -362,7 +362,7 @@ OpenAPI_context_data_sets_t *OpenAPI_context_data_sets_parseFromJSON(cJSON *cont
subscription_data_subscriptions ? subscription_data_subscriptionsList : NULL,
smf_registrations ? smf_registrationsList : NULL,
ip_sm_gw ? ip_sm_gw_local_nonprim : NULL
- );
+ );
return context_data_sets_local_var;
end:
diff --git a/lib/sbi/openapi/model/context_data_sets.h b/lib/sbi/openapi/model/context_data_sets.h
index fd7080c3f..e56db1aab 100644
--- a/lib/sbi/openapi/model/context_data_sets.h
+++ b/lib/sbi/openapi/model/context_data_sets.h
@@ -1,7 +1,7 @@
/*
* context_data_sets.h
*
- *
+ *
*/
#ifndef _OpenAPI_context_data_sets_H_
@@ -48,7 +48,7 @@ OpenAPI_context_data_sets_t *OpenAPI_context_data_sets_create(
OpenAPI_list_t *subscription_data_subscriptions,
OpenAPI_list_t *smf_registrations,
OpenAPI_ip_sm_gw_registration_t *ip_sm_gw
- );
+);
void OpenAPI_context_data_sets_free(OpenAPI_context_data_sets_t *context_data_sets);
OpenAPI_context_data_sets_t *OpenAPI_context_data_sets_parseFromJSON(cJSON *context_data_setsJSON);
cJSON *OpenAPI_context_data_sets_convertToJSON(OpenAPI_context_data_sets_t *context_data_sets);
diff --git a/lib/sbi/openapi/model/context_info.c b/lib/sbi/openapi/model/context_info.c
index 9c4bb734e..f9b1c26e4 100644
--- a/lib/sbi/openapi/model/context_info.c
+++ b/lib/sbi/openapi/model/context_info.c
@@ -6,7 +6,7 @@
OpenAPI_context_info_t *OpenAPI_context_info_create(
OpenAPI_list_t *orig_headers
- )
+)
{
OpenAPI_context_info_t *context_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_context_info_t));
if (!context_info_local_var) {
@@ -41,19 +41,19 @@ cJSON *OpenAPI_context_info_convertToJSON(OpenAPI_context_info_t *context_info)
item = cJSON_CreateObject();
if (context_info->orig_headers) {
- cJSON *orig_headers = cJSON_AddArrayToObject(item, "origHeaders");
- if (orig_headers == NULL) {
- ogs_error("OpenAPI_context_info_convertToJSON() failed [orig_headers]");
- goto end;
- }
+ cJSON *orig_headers = cJSON_AddArrayToObject(item, "origHeaders");
+ if (orig_headers == NULL) {
+ ogs_error("OpenAPI_context_info_convertToJSON() failed [orig_headers]");
+ goto end;
+ }
- OpenAPI_lnode_t *orig_headers_node;
- OpenAPI_list_for_each(context_info->orig_headers, orig_headers_node) {
- if (cJSON_AddStringToObject(orig_headers, "", (char*)orig_headers_node->data) == NULL) {
- ogs_error("OpenAPI_context_info_convertToJSON() failed [orig_headers]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *orig_headers_node;
+ OpenAPI_list_for_each(context_info->orig_headers, orig_headers_node) {
+ if (cJSON_AddStringToObject(orig_headers, "", (char*)orig_headers_node->data) == NULL) {
+ ogs_error("OpenAPI_context_info_convertToJSON() failed [orig_headers]");
+ goto end;
+ }
+ }
}
end:
@@ -66,26 +66,26 @@ OpenAPI_context_info_t *OpenAPI_context_info_parseFromJSON(cJSON *context_infoJS
cJSON *orig_headers = cJSON_GetObjectItemCaseSensitive(context_infoJSON, "origHeaders");
OpenAPI_list_t *orig_headersList;
- if (orig_headers) {
- cJSON *orig_headers_local;
- if (!cJSON_IsArray(orig_headers)) {
- ogs_error("OpenAPI_context_info_parseFromJSON() failed [orig_headers]");
- goto end;
- }
- orig_headersList = OpenAPI_list_create();
+ if (orig_headers) {
+ cJSON *orig_headers_local;
+ if (!cJSON_IsArray(orig_headers)) {
+ ogs_error("OpenAPI_context_info_parseFromJSON() failed [orig_headers]");
+ goto end;
+ }
+ orig_headersList = OpenAPI_list_create();
- cJSON_ArrayForEach(orig_headers_local, orig_headers) {
- if (!cJSON_IsString(orig_headers_local)) {
- ogs_error("OpenAPI_context_info_parseFromJSON() failed [orig_headers]");
- goto end;
- }
- OpenAPI_list_add(orig_headersList, ogs_strdup_or_assert(orig_headers_local->valuestring));
- }
+ cJSON_ArrayForEach(orig_headers_local, orig_headers) {
+ if (!cJSON_IsString(orig_headers_local)) {
+ ogs_error("OpenAPI_context_info_parseFromJSON() failed [orig_headers]");
+ goto end;
+ }
+ OpenAPI_list_add(orig_headersList , ogs_strdup_or_assert(orig_headers_local->valuestring));
+ }
}
context_info_local_var = OpenAPI_context_info_create (
orig_headers ? orig_headersList : NULL
- );
+ );
return context_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/context_info.h b/lib/sbi/openapi/model/context_info.h
index 3b08ac6a6..a5ecbe541 100644
--- a/lib/sbi/openapi/model/context_info.h
+++ b/lib/sbi/openapi/model/context_info.h
@@ -1,7 +1,7 @@
/*
* context_info.h
*
- *
+ *
*/
#ifndef _OpenAPI_context_info_H_
@@ -24,7 +24,7 @@ typedef struct OpenAPI_context_info_s {
OpenAPI_context_info_t *OpenAPI_context_info_create(
OpenAPI_list_t *orig_headers
- );
+);
void OpenAPI_context_info_free(OpenAPI_context_info_t *context_info);
OpenAPI_context_info_t *OpenAPI_context_info_parseFromJSON(cJSON *context_infoJSON);
cJSON *OpenAPI_context_info_convertToJSON(OpenAPI_context_info_t *context_info);
diff --git a/lib/sbi/openapi/model/core_network_type.h b/lib/sbi/openapi/model/core_network_type.h
index b1329894e..7a9a32fb6 100644
--- a/lib/sbi/openapi/model/core_network_type.h
+++ b/lib/sbi/openapi/model/core_network_type.h
@@ -1,7 +1,7 @@
/*
* core_network_type.h
*
- *
+ *
*/
#ifndef _OpenAPI_core_network_type_H_
diff --git a/lib/sbi/openapi/model/credit_management_status.h b/lib/sbi/openapi/model/credit_management_status.h
index 85479abbb..23d4b57ae 100644
--- a/lib/sbi/openapi/model/credit_management_status.h
+++ b/lib/sbi/openapi/model/credit_management_status.h
@@ -1,7 +1,7 @@
/*
* credit_management_status.h
*
- *
+ *
*/
#ifndef _OpenAPI_credit_management_status_H_
diff --git a/lib/sbi/openapi/model/data_change_notify.c b/lib/sbi/openapi/model/data_change_notify.c
index c4ccbff17..23788db65 100644
--- a/lib/sbi/openapi/model/data_change_notify.c
+++ b/lib/sbi/openapi/model/data_change_notify.c
@@ -8,10 +8,10 @@ OpenAPI_data_change_notify_t *OpenAPI_data_change_notify_create(
OpenAPI_list_t *original_callback_reference,
char *ue_id,
OpenAPI_list_t *notify_items,
- OpenAPI_sdm_subscription_t *sdm_subscription,
+ OpenAPI_sdm_subscription_1_t *sdm_subscription,
OpenAPI_list_t *additional_sdm_subscriptions,
OpenAPI_list_t *subscription_data_subscriptions
- )
+)
{
OpenAPI_data_change_notify_t *data_change_notify_local_var = OpenAPI_malloc(sizeof(OpenAPI_data_change_notify_t));
if (!data_change_notify_local_var) {
@@ -42,9 +42,9 @@ void OpenAPI_data_change_notify_free(OpenAPI_data_change_notify_t *data_change_n
OpenAPI_notify_item_free(node->data);
}
OpenAPI_list_free(data_change_notify->notify_items);
- OpenAPI_sdm_subscription_free(data_change_notify->sdm_subscription);
+ OpenAPI_sdm_subscription_1_free(data_change_notify->sdm_subscription);
OpenAPI_list_for_each(data_change_notify->additional_sdm_subscriptions, node) {
- OpenAPI_sdm_subscription_free(node->data);
+ OpenAPI_sdm_subscription_1_free(node->data);
}
OpenAPI_list_free(data_change_notify->additional_sdm_subscriptions);
OpenAPI_list_for_each(data_change_notify->subscription_data_subscriptions, node) {
@@ -65,100 +65,100 @@ cJSON *OpenAPI_data_change_notify_convertToJSON(OpenAPI_data_change_notify_t *da
item = cJSON_CreateObject();
if (data_change_notify->original_callback_reference) {
- cJSON *original_callback_reference = cJSON_AddArrayToObject(item, "originalCallbackReference");
- if (original_callback_reference == NULL) {
- ogs_error("OpenAPI_data_change_notify_convertToJSON() failed [original_callback_reference]");
- goto end;
- }
+ cJSON *original_callback_reference = cJSON_AddArrayToObject(item, "originalCallbackReference");
+ if (original_callback_reference == NULL) {
+ ogs_error("OpenAPI_data_change_notify_convertToJSON() failed [original_callback_reference]");
+ goto end;
+ }
- OpenAPI_lnode_t *original_callback_reference_node;
- OpenAPI_list_for_each(data_change_notify->original_callback_reference, original_callback_reference_node) {
- if (cJSON_AddStringToObject(original_callback_reference, "", (char*)original_callback_reference_node->data) == NULL) {
- ogs_error("OpenAPI_data_change_notify_convertToJSON() failed [original_callback_reference]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *original_callback_reference_node;
+ OpenAPI_list_for_each(data_change_notify->original_callback_reference, original_callback_reference_node) {
+ if (cJSON_AddStringToObject(original_callback_reference, "", (char*)original_callback_reference_node->data) == NULL) {
+ ogs_error("OpenAPI_data_change_notify_convertToJSON() failed [original_callback_reference]");
+ goto end;
+ }
+ }
}
if (data_change_notify->ue_id) {
- if (cJSON_AddStringToObject(item, "ueId", data_change_notify->ue_id) == NULL) {
- ogs_error("OpenAPI_data_change_notify_convertToJSON() failed [ue_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "ueId", data_change_notify->ue_id) == NULL) {
+ ogs_error("OpenAPI_data_change_notify_convertToJSON() failed [ue_id]");
+ goto end;
+ }
}
if (data_change_notify->notify_items) {
- cJSON *notify_itemsList = cJSON_AddArrayToObject(item, "notifyItems");
- if (notify_itemsList == NULL) {
- ogs_error("OpenAPI_data_change_notify_convertToJSON() failed [notify_items]");
- goto end;
- }
+ cJSON *notify_itemsList = cJSON_AddArrayToObject(item, "notifyItems");
+ if (notify_itemsList == NULL) {
+ ogs_error("OpenAPI_data_change_notify_convertToJSON() failed [notify_items]");
+ goto end;
+ }
- OpenAPI_lnode_t *notify_items_node;
- if (data_change_notify->notify_items) {
- OpenAPI_list_for_each(data_change_notify->notify_items, notify_items_node) {
- cJSON *itemLocal = OpenAPI_notify_item_convertToJSON(notify_items_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_data_change_notify_convertToJSON() failed [notify_items]");
- goto end;
- }
- cJSON_AddItemToArray(notify_itemsList, itemLocal);
+ OpenAPI_lnode_t *notify_items_node;
+ if (data_change_notify->notify_items) {
+ OpenAPI_list_for_each(data_change_notify->notify_items, notify_items_node) {
+ cJSON *itemLocal = OpenAPI_notify_item_convertToJSON(notify_items_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_data_change_notify_convertToJSON() failed [notify_items]");
+ goto end;
}
+ cJSON_AddItemToArray(notify_itemsList, itemLocal);
}
}
+ }
if (data_change_notify->sdm_subscription) {
- cJSON *sdm_subscription_local_JSON = OpenAPI_sdm_subscription_convertToJSON(data_change_notify->sdm_subscription);
- if (sdm_subscription_local_JSON == NULL) {
- ogs_error("OpenAPI_data_change_notify_convertToJSON() failed [sdm_subscription]");
- goto end;
- }
- cJSON_AddItemToObject(item, "sdmSubscription", sdm_subscription_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_data_change_notify_convertToJSON() failed [sdm_subscription]");
- goto end;
- }
+ cJSON *sdm_subscription_local_JSON = OpenAPI_sdm_subscription_1_convertToJSON(data_change_notify->sdm_subscription);
+ if (sdm_subscription_local_JSON == NULL) {
+ ogs_error("OpenAPI_data_change_notify_convertToJSON() failed [sdm_subscription]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "sdmSubscription", sdm_subscription_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_data_change_notify_convertToJSON() failed [sdm_subscription]");
+ goto end;
+ }
}
if (data_change_notify->additional_sdm_subscriptions) {
- cJSON *additional_sdm_subscriptionsList = cJSON_AddArrayToObject(item, "additionalSdmSubscriptions");
- if (additional_sdm_subscriptionsList == NULL) {
- ogs_error("OpenAPI_data_change_notify_convertToJSON() failed [additional_sdm_subscriptions]");
- goto end;
- }
+ cJSON *additional_sdm_subscriptionsList = cJSON_AddArrayToObject(item, "additionalSdmSubscriptions");
+ if (additional_sdm_subscriptionsList == NULL) {
+ ogs_error("OpenAPI_data_change_notify_convertToJSON() failed [additional_sdm_subscriptions]");
+ goto end;
+ }
- OpenAPI_lnode_t *additional_sdm_subscriptions_node;
- if (data_change_notify->additional_sdm_subscriptions) {
- OpenAPI_list_for_each(data_change_notify->additional_sdm_subscriptions, additional_sdm_subscriptions_node) {
- cJSON *itemLocal = OpenAPI_sdm_subscription_convertToJSON(additional_sdm_subscriptions_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_data_change_notify_convertToJSON() failed [additional_sdm_subscriptions]");
- goto end;
- }
- cJSON_AddItemToArray(additional_sdm_subscriptionsList, itemLocal);
+ OpenAPI_lnode_t *additional_sdm_subscriptions_node;
+ if (data_change_notify->additional_sdm_subscriptions) {
+ OpenAPI_list_for_each(data_change_notify->additional_sdm_subscriptions, additional_sdm_subscriptions_node) {
+ cJSON *itemLocal = OpenAPI_sdm_subscription_1_convertToJSON(additional_sdm_subscriptions_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_data_change_notify_convertToJSON() failed [additional_sdm_subscriptions]");
+ goto end;
}
+ cJSON_AddItemToArray(additional_sdm_subscriptionsList, itemLocal);
}
}
+ }
if (data_change_notify->subscription_data_subscriptions) {
- cJSON *subscription_data_subscriptionsList = cJSON_AddArrayToObject(item, "subscriptionDataSubscriptions");
- if (subscription_data_subscriptionsList == NULL) {
- ogs_error("OpenAPI_data_change_notify_convertToJSON() failed [subscription_data_subscriptions]");
- goto end;
- }
+ cJSON *subscription_data_subscriptionsList = cJSON_AddArrayToObject(item, "subscriptionDataSubscriptions");
+ if (subscription_data_subscriptionsList == NULL) {
+ ogs_error("OpenAPI_data_change_notify_convertToJSON() failed [subscription_data_subscriptions]");
+ goto end;
+ }
- OpenAPI_lnode_t *subscription_data_subscriptions_node;
- if (data_change_notify->subscription_data_subscriptions) {
- OpenAPI_list_for_each(data_change_notify->subscription_data_subscriptions, subscription_data_subscriptions_node) {
- cJSON *itemLocal = OpenAPI_subscription_data_subscriptions_convertToJSON(subscription_data_subscriptions_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_data_change_notify_convertToJSON() failed [subscription_data_subscriptions]");
- goto end;
- }
- cJSON_AddItemToArray(subscription_data_subscriptionsList, itemLocal);
+ OpenAPI_lnode_t *subscription_data_subscriptions_node;
+ if (data_change_notify->subscription_data_subscriptions) {
+ OpenAPI_list_for_each(data_change_notify->subscription_data_subscriptions, subscription_data_subscriptions_node) {
+ cJSON *itemLocal = OpenAPI_subscription_data_subscriptions_convertToJSON(subscription_data_subscriptions_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_data_change_notify_convertToJSON() failed [subscription_data_subscriptions]");
+ goto end;
}
+ cJSON_AddItemToArray(subscription_data_subscriptionsList, itemLocal);
}
}
+ }
end:
return item;
@@ -170,106 +170,106 @@ OpenAPI_data_change_notify_t *OpenAPI_data_change_notify_parseFromJSON(cJSON *da
cJSON *original_callback_reference = cJSON_GetObjectItemCaseSensitive(data_change_notifyJSON, "originalCallbackReference");
OpenAPI_list_t *original_callback_referenceList;
- if (original_callback_reference) {
- cJSON *original_callback_reference_local;
- if (!cJSON_IsArray(original_callback_reference)) {
- ogs_error("OpenAPI_data_change_notify_parseFromJSON() failed [original_callback_reference]");
- goto end;
- }
- original_callback_referenceList = OpenAPI_list_create();
+ if (original_callback_reference) {
+ cJSON *original_callback_reference_local;
+ if (!cJSON_IsArray(original_callback_reference)) {
+ ogs_error("OpenAPI_data_change_notify_parseFromJSON() failed [original_callback_reference]");
+ goto end;
+ }
+ original_callback_referenceList = OpenAPI_list_create();
- cJSON_ArrayForEach(original_callback_reference_local, original_callback_reference) {
- if (!cJSON_IsString(original_callback_reference_local)) {
- ogs_error("OpenAPI_data_change_notify_parseFromJSON() failed [original_callback_reference]");
- goto end;
- }
- OpenAPI_list_add(original_callback_referenceList, ogs_strdup_or_assert(original_callback_reference_local->valuestring));
- }
+ cJSON_ArrayForEach(original_callback_reference_local, original_callback_reference) {
+ if (!cJSON_IsString(original_callback_reference_local)) {
+ ogs_error("OpenAPI_data_change_notify_parseFromJSON() failed [original_callback_reference]");
+ goto end;
+ }
+ OpenAPI_list_add(original_callback_referenceList , ogs_strdup_or_assert(original_callback_reference_local->valuestring));
+ }
}
cJSON *ue_id = cJSON_GetObjectItemCaseSensitive(data_change_notifyJSON, "ueId");
- if (ue_id) {
- if (!cJSON_IsString(ue_id)) {
- ogs_error("OpenAPI_data_change_notify_parseFromJSON() failed [ue_id]");
- goto end;
- }
+ if (ue_id) {
+ if (!cJSON_IsString(ue_id)) {
+ ogs_error("OpenAPI_data_change_notify_parseFromJSON() failed [ue_id]");
+ goto end;
+ }
}
cJSON *notify_items = cJSON_GetObjectItemCaseSensitive(data_change_notifyJSON, "notifyItems");
OpenAPI_list_t *notify_itemsList;
- if (notify_items) {
- cJSON *notify_items_local_nonprimitive;
- if (!cJSON_IsArray(notify_items)) {
+ if (notify_items) {
+ cJSON *notify_items_local_nonprimitive;
+ if (!cJSON_IsArray(notify_items)){
+ ogs_error("OpenAPI_data_change_notify_parseFromJSON() failed [notify_items]");
+ goto end;
+ }
+
+ notify_itemsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(notify_items_local_nonprimitive, notify_items ) {
+ if (!cJSON_IsObject(notify_items_local_nonprimitive)) {
ogs_error("OpenAPI_data_change_notify_parseFromJSON() failed [notify_items]");
goto end;
}
+ OpenAPI_notify_item_t *notify_itemsItem = OpenAPI_notify_item_parseFromJSON(notify_items_local_nonprimitive);
- notify_itemsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(notify_items_local_nonprimitive, notify_items ) {
- if (!cJSON_IsObject(notify_items_local_nonprimitive)) {
- ogs_error("OpenAPI_data_change_notify_parseFromJSON() failed [notify_items]");
- goto end;
- }
- OpenAPI_notify_item_t *notify_itemsItem = OpenAPI_notify_item_parseFromJSON(notify_items_local_nonprimitive);
-
- OpenAPI_list_add(notify_itemsList, notify_itemsItem);
- }
+ OpenAPI_list_add(notify_itemsList, notify_itemsItem);
+ }
}
cJSON *sdm_subscription = cJSON_GetObjectItemCaseSensitive(data_change_notifyJSON, "sdmSubscription");
- OpenAPI_sdm_subscription_t *sdm_subscription_local_nonprim = NULL;
- if (sdm_subscription) {
- sdm_subscription_local_nonprim = OpenAPI_sdm_subscription_parseFromJSON(sdm_subscription);
+ OpenAPI_sdm_subscription_1_t *sdm_subscription_local_nonprim = NULL;
+ if (sdm_subscription) {
+ sdm_subscription_local_nonprim = OpenAPI_sdm_subscription_1_parseFromJSON(sdm_subscription);
}
cJSON *additional_sdm_subscriptions = cJSON_GetObjectItemCaseSensitive(data_change_notifyJSON, "additionalSdmSubscriptions");
OpenAPI_list_t *additional_sdm_subscriptionsList;
- if (additional_sdm_subscriptions) {
- cJSON *additional_sdm_subscriptions_local_nonprimitive;
- if (!cJSON_IsArray(additional_sdm_subscriptions)) {
+ if (additional_sdm_subscriptions) {
+ cJSON *additional_sdm_subscriptions_local_nonprimitive;
+ if (!cJSON_IsArray(additional_sdm_subscriptions)){
+ ogs_error("OpenAPI_data_change_notify_parseFromJSON() failed [additional_sdm_subscriptions]");
+ goto end;
+ }
+
+ additional_sdm_subscriptionsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(additional_sdm_subscriptions_local_nonprimitive, additional_sdm_subscriptions ) {
+ if (!cJSON_IsObject(additional_sdm_subscriptions_local_nonprimitive)) {
ogs_error("OpenAPI_data_change_notify_parseFromJSON() failed [additional_sdm_subscriptions]");
goto end;
}
+ OpenAPI_sdm_subscription_1_t *additional_sdm_subscriptionsItem = OpenAPI_sdm_subscription_1_parseFromJSON(additional_sdm_subscriptions_local_nonprimitive);
- additional_sdm_subscriptionsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(additional_sdm_subscriptions_local_nonprimitive, additional_sdm_subscriptions ) {
- if (!cJSON_IsObject(additional_sdm_subscriptions_local_nonprimitive)) {
- ogs_error("OpenAPI_data_change_notify_parseFromJSON() failed [additional_sdm_subscriptions]");
- goto end;
- }
- OpenAPI_sdm_subscription_t *additional_sdm_subscriptionsItem = OpenAPI_sdm_subscription_parseFromJSON(additional_sdm_subscriptions_local_nonprimitive);
-
- OpenAPI_list_add(additional_sdm_subscriptionsList, additional_sdm_subscriptionsItem);
- }
+ OpenAPI_list_add(additional_sdm_subscriptionsList, additional_sdm_subscriptionsItem);
+ }
}
cJSON *subscription_data_subscriptions = cJSON_GetObjectItemCaseSensitive(data_change_notifyJSON, "subscriptionDataSubscriptions");
OpenAPI_list_t *subscription_data_subscriptionsList;
- if (subscription_data_subscriptions) {
- cJSON *subscription_data_subscriptions_local_nonprimitive;
- if (!cJSON_IsArray(subscription_data_subscriptions)) {
+ if (subscription_data_subscriptions) {
+ cJSON *subscription_data_subscriptions_local_nonprimitive;
+ if (!cJSON_IsArray(subscription_data_subscriptions)){
+ ogs_error("OpenAPI_data_change_notify_parseFromJSON() failed [subscription_data_subscriptions]");
+ goto end;
+ }
+
+ subscription_data_subscriptionsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(subscription_data_subscriptions_local_nonprimitive, subscription_data_subscriptions ) {
+ if (!cJSON_IsObject(subscription_data_subscriptions_local_nonprimitive)) {
ogs_error("OpenAPI_data_change_notify_parseFromJSON() failed [subscription_data_subscriptions]");
goto end;
}
+ OpenAPI_subscription_data_subscriptions_t *subscription_data_subscriptionsItem = OpenAPI_subscription_data_subscriptions_parseFromJSON(subscription_data_subscriptions_local_nonprimitive);
- subscription_data_subscriptionsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(subscription_data_subscriptions_local_nonprimitive, subscription_data_subscriptions ) {
- if (!cJSON_IsObject(subscription_data_subscriptions_local_nonprimitive)) {
- ogs_error("OpenAPI_data_change_notify_parseFromJSON() failed [subscription_data_subscriptions]");
- goto end;
- }
- OpenAPI_subscription_data_subscriptions_t *subscription_data_subscriptionsItem = OpenAPI_subscription_data_subscriptions_parseFromJSON(subscription_data_subscriptions_local_nonprimitive);
-
- OpenAPI_list_add(subscription_data_subscriptionsList, subscription_data_subscriptionsItem);
- }
+ OpenAPI_list_add(subscription_data_subscriptionsList, subscription_data_subscriptionsItem);
+ }
}
data_change_notify_local_var = OpenAPI_data_change_notify_create (
@@ -279,7 +279,7 @@ OpenAPI_data_change_notify_t *OpenAPI_data_change_notify_parseFromJSON(cJSON *da
sdm_subscription ? sdm_subscription_local_nonprim : NULL,
additional_sdm_subscriptions ? additional_sdm_subscriptionsList : NULL,
subscription_data_subscriptions ? subscription_data_subscriptionsList : NULL
- );
+ );
return data_change_notify_local_var;
end:
diff --git a/lib/sbi/openapi/model/data_change_notify.h b/lib/sbi/openapi/model/data_change_notify.h
index f46d7a498..ff65a6748 100644
--- a/lib/sbi/openapi/model/data_change_notify.h
+++ b/lib/sbi/openapi/model/data_change_notify.h
@@ -1,7 +1,7 @@
/*
* data_change_notify.h
*
- *
+ *
*/
#ifndef _OpenAPI_data_change_notify_H_
@@ -13,7 +13,7 @@
#include "../include/keyValuePair.h"
#include "../include/binary.h"
#include "notify_item.h"
-#include "sdm_subscription.h"
+#include "sdm_subscription_1.h"
#include "subscription_data_subscriptions.h"
#ifdef __cplusplus
@@ -25,7 +25,7 @@ typedef struct OpenAPI_data_change_notify_s {
OpenAPI_list_t *original_callback_reference;
char *ue_id;
OpenAPI_list_t *notify_items;
- struct OpenAPI_sdm_subscription_s *sdm_subscription;
+ struct OpenAPI_sdm_subscription_1_s *sdm_subscription;
OpenAPI_list_t *additional_sdm_subscriptions;
OpenAPI_list_t *subscription_data_subscriptions;
} OpenAPI_data_change_notify_t;
@@ -34,10 +34,10 @@ OpenAPI_data_change_notify_t *OpenAPI_data_change_notify_create(
OpenAPI_list_t *original_callback_reference,
char *ue_id,
OpenAPI_list_t *notify_items,
- OpenAPI_sdm_subscription_t *sdm_subscription,
+ OpenAPI_sdm_subscription_1_t *sdm_subscription,
OpenAPI_list_t *additional_sdm_subscriptions,
OpenAPI_list_t *subscription_data_subscriptions
- );
+);
void OpenAPI_data_change_notify_free(OpenAPI_data_change_notify_t *data_change_notify);
OpenAPI_data_change_notify_t *OpenAPI_data_change_notify_parseFromJSON(cJSON *data_change_notifyJSON);
cJSON *OpenAPI_data_change_notify_convertToJSON(OpenAPI_data_change_notify_t *data_change_notify);
diff --git a/lib/sbi/openapi/model/data_filter.c b/lib/sbi/openapi/model/data_filter.c
index 06ad82fdc..9522dafd0 100644
--- a/lib/sbi/openapi/model/data_filter.c
+++ b/lib/sbi/openapi/model/data_filter.c
@@ -14,7 +14,7 @@ OpenAPI_data_filter_t *OpenAPI_data_filter_create(
OpenAPI_list_t *ue_ipv4s,
OpenAPI_list_t *ue_ipv6s,
OpenAPI_list_t *ue_macs
- )
+)
{
OpenAPI_data_filter_t *data_filter_local_var = OpenAPI_malloc(sizeof(OpenAPI_data_filter_t));
if (!data_filter_local_var) {
@@ -97,135 +97,135 @@ cJSON *OpenAPI_data_filter_convertToJSON(OpenAPI_data_filter_t *data_filter)
}
if (data_filter->dnns) {
- cJSON *dnns = cJSON_AddArrayToObject(item, "dnns");
- if (dnns == NULL) {
- ogs_error("OpenAPI_data_filter_convertToJSON() failed [dnns]");
- goto end;
- }
+ cJSON *dnns = cJSON_AddArrayToObject(item, "dnns");
+ if (dnns == NULL) {
+ ogs_error("OpenAPI_data_filter_convertToJSON() failed [dnns]");
+ goto end;
+ }
- OpenAPI_lnode_t *dnns_node;
- OpenAPI_list_for_each(data_filter->dnns, dnns_node) {
- if (cJSON_AddStringToObject(dnns, "", (char*)dnns_node->data) == NULL) {
- ogs_error("OpenAPI_data_filter_convertToJSON() failed [dnns]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *dnns_node;
+ OpenAPI_list_for_each(data_filter->dnns, dnns_node) {
+ if (cJSON_AddStringToObject(dnns, "", (char*)dnns_node->data) == NULL) {
+ ogs_error("OpenAPI_data_filter_convertToJSON() failed [dnns]");
+ goto end;
+ }
+ }
}
if (data_filter->snssais) {
- cJSON *snssaisList = cJSON_AddArrayToObject(item, "snssais");
- if (snssaisList == NULL) {
- ogs_error("OpenAPI_data_filter_convertToJSON() failed [snssais]");
- goto end;
- }
+ cJSON *snssaisList = cJSON_AddArrayToObject(item, "snssais");
+ if (snssaisList == NULL) {
+ ogs_error("OpenAPI_data_filter_convertToJSON() failed [snssais]");
+ goto end;
+ }
- OpenAPI_lnode_t *snssais_node;
- if (data_filter->snssais) {
- OpenAPI_list_for_each(data_filter->snssais, snssais_node) {
- cJSON *itemLocal = OpenAPI_snssai_convertToJSON(snssais_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_data_filter_convertToJSON() failed [snssais]");
- goto end;
- }
- cJSON_AddItemToArray(snssaisList, itemLocal);
+ OpenAPI_lnode_t *snssais_node;
+ if (data_filter->snssais) {
+ OpenAPI_list_for_each(data_filter->snssais, snssais_node) {
+ cJSON *itemLocal = OpenAPI_snssai_convertToJSON(snssais_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_data_filter_convertToJSON() failed [snssais]");
+ goto end;
}
+ cJSON_AddItemToArray(snssaisList, itemLocal);
}
}
+ }
if (data_filter->internal_group_ids) {
- cJSON *internal_group_ids = cJSON_AddArrayToObject(item, "internalGroupIds");
- if (internal_group_ids == NULL) {
- ogs_error("OpenAPI_data_filter_convertToJSON() failed [internal_group_ids]");
- goto end;
- }
+ cJSON *internal_group_ids = cJSON_AddArrayToObject(item, "internalGroupIds");
+ if (internal_group_ids == NULL) {
+ ogs_error("OpenAPI_data_filter_convertToJSON() failed [internal_group_ids]");
+ goto end;
+ }
- OpenAPI_lnode_t *internal_group_ids_node;
- OpenAPI_list_for_each(data_filter->internal_group_ids, internal_group_ids_node) {
- if (cJSON_AddStringToObject(internal_group_ids, "", (char*)internal_group_ids_node->data) == NULL) {
- ogs_error("OpenAPI_data_filter_convertToJSON() failed [internal_group_ids]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *internal_group_ids_node;
+ OpenAPI_list_for_each(data_filter->internal_group_ids, internal_group_ids_node) {
+ if (cJSON_AddStringToObject(internal_group_ids, "", (char*)internal_group_ids_node->data) == NULL) {
+ ogs_error("OpenAPI_data_filter_convertToJSON() failed [internal_group_ids]");
+ goto end;
+ }
+ }
}
if (data_filter->supis) {
- cJSON *supis = cJSON_AddArrayToObject(item, "supis");
- if (supis == NULL) {
- ogs_error("OpenAPI_data_filter_convertToJSON() failed [supis]");
- goto end;
- }
+ cJSON *supis = cJSON_AddArrayToObject(item, "supis");
+ if (supis == NULL) {
+ ogs_error("OpenAPI_data_filter_convertToJSON() failed [supis]");
+ goto end;
+ }
- OpenAPI_lnode_t *supis_node;
- OpenAPI_list_for_each(data_filter->supis, supis_node) {
- if (cJSON_AddStringToObject(supis, "", (char*)supis_node->data) == NULL) {
- ogs_error("OpenAPI_data_filter_convertToJSON() failed [supis]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *supis_node;
+ OpenAPI_list_for_each(data_filter->supis, supis_node) {
+ if (cJSON_AddStringToObject(supis, "", (char*)supis_node->data) == NULL) {
+ ogs_error("OpenAPI_data_filter_convertToJSON() failed [supis]");
+ goto end;
+ }
+ }
}
if (data_filter->app_ids) {
- cJSON *app_ids = cJSON_AddArrayToObject(item, "appIds");
- if (app_ids == NULL) {
- ogs_error("OpenAPI_data_filter_convertToJSON() failed [app_ids]");
- goto end;
- }
+ cJSON *app_ids = cJSON_AddArrayToObject(item, "appIds");
+ if (app_ids == NULL) {
+ ogs_error("OpenAPI_data_filter_convertToJSON() failed [app_ids]");
+ goto end;
+ }
- OpenAPI_lnode_t *app_ids_node;
- OpenAPI_list_for_each(data_filter->app_ids, app_ids_node) {
- if (cJSON_AddStringToObject(app_ids, "", (char*)app_ids_node->data) == NULL) {
- ogs_error("OpenAPI_data_filter_convertToJSON() failed [app_ids]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *app_ids_node;
+ OpenAPI_list_for_each(data_filter->app_ids, app_ids_node) {
+ if (cJSON_AddStringToObject(app_ids, "", (char*)app_ids_node->data) == NULL) {
+ ogs_error("OpenAPI_data_filter_convertToJSON() failed [app_ids]");
+ goto end;
+ }
+ }
}
if (data_filter->ue_ipv4s) {
- cJSON *ue_ipv4s = cJSON_AddArrayToObject(item, "ueIpv4s");
- if (ue_ipv4s == NULL) {
- ogs_error("OpenAPI_data_filter_convertToJSON() failed [ue_ipv4s]");
- goto end;
- }
+ cJSON *ue_ipv4s = cJSON_AddArrayToObject(item, "ueIpv4s");
+ if (ue_ipv4s == NULL) {
+ ogs_error("OpenAPI_data_filter_convertToJSON() failed [ue_ipv4s]");
+ goto end;
+ }
- OpenAPI_lnode_t *ue_ipv4s_node;
- OpenAPI_list_for_each(data_filter->ue_ipv4s, ue_ipv4s_node) {
- if (cJSON_AddStringToObject(ue_ipv4s, "", (char*)ue_ipv4s_node->data) == NULL) {
- ogs_error("OpenAPI_data_filter_convertToJSON() failed [ue_ipv4s]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *ue_ipv4s_node;
+ OpenAPI_list_for_each(data_filter->ue_ipv4s, ue_ipv4s_node) {
+ if (cJSON_AddStringToObject(ue_ipv4s, "", (char*)ue_ipv4s_node->data) == NULL) {
+ ogs_error("OpenAPI_data_filter_convertToJSON() failed [ue_ipv4s]");
+ goto end;
+ }
+ }
}
if (data_filter->ue_ipv6s) {
- cJSON *ue_ipv6s = cJSON_AddArrayToObject(item, "ueIpv6s");
- if (ue_ipv6s == NULL) {
- ogs_error("OpenAPI_data_filter_convertToJSON() failed [ue_ipv6s]");
- goto end;
- }
+ cJSON *ue_ipv6s = cJSON_AddArrayToObject(item, "ueIpv6s");
+ if (ue_ipv6s == NULL) {
+ ogs_error("OpenAPI_data_filter_convertToJSON() failed [ue_ipv6s]");
+ goto end;
+ }
- OpenAPI_lnode_t *ue_ipv6s_node;
- OpenAPI_list_for_each(data_filter->ue_ipv6s, ue_ipv6s_node) {
- if (cJSON_AddStringToObject(ue_ipv6s, "", (char*)ue_ipv6s_node->data) == NULL) {
- ogs_error("OpenAPI_data_filter_convertToJSON() failed [ue_ipv6s]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *ue_ipv6s_node;
+ OpenAPI_list_for_each(data_filter->ue_ipv6s, ue_ipv6s_node) {
+ if (cJSON_AddStringToObject(ue_ipv6s, "", (char*)ue_ipv6s_node->data) == NULL) {
+ ogs_error("OpenAPI_data_filter_convertToJSON() failed [ue_ipv6s]");
+ goto end;
+ }
+ }
}
if (data_filter->ue_macs) {
- cJSON *ue_macs = cJSON_AddArrayToObject(item, "ueMacs");
- if (ue_macs == NULL) {
- ogs_error("OpenAPI_data_filter_convertToJSON() failed [ue_macs]");
- goto end;
- }
+ cJSON *ue_macs = cJSON_AddArrayToObject(item, "ueMacs");
+ if (ue_macs == NULL) {
+ ogs_error("OpenAPI_data_filter_convertToJSON() failed [ue_macs]");
+ goto end;
+ }
- OpenAPI_lnode_t *ue_macs_node;
- OpenAPI_list_for_each(data_filter->ue_macs, ue_macs_node) {
- if (cJSON_AddStringToObject(ue_macs, "", (char*)ue_macs_node->data) == NULL) {
- ogs_error("OpenAPI_data_filter_convertToJSON() failed [ue_macs]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *ue_macs_node;
+ OpenAPI_list_for_each(data_filter->ue_macs, ue_macs_node) {
+ if (cJSON_AddStringToObject(ue_macs, "", (char*)ue_macs_node->data) == NULL) {
+ ogs_error("OpenAPI_data_filter_convertToJSON() failed [ue_macs]");
+ goto end;
+ }
+ }
}
end:
@@ -242,170 +242,170 @@ OpenAPI_data_filter_t *OpenAPI_data_filter_parseFromJSON(cJSON *data_filterJSON)
}
OpenAPI_data_ind_t *data_ind_local_nonprim = NULL;
-
+
data_ind_local_nonprim = OpenAPI_data_ind_parseFromJSON(data_ind);
cJSON *dnns = cJSON_GetObjectItemCaseSensitive(data_filterJSON, "dnns");
OpenAPI_list_t *dnnsList;
- if (dnns) {
- cJSON *dnns_local;
- if (!cJSON_IsArray(dnns)) {
- ogs_error("OpenAPI_data_filter_parseFromJSON() failed [dnns]");
- goto end;
- }
- dnnsList = OpenAPI_list_create();
+ if (dnns) {
+ cJSON *dnns_local;
+ if (!cJSON_IsArray(dnns)) {
+ ogs_error("OpenAPI_data_filter_parseFromJSON() failed [dnns]");
+ goto end;
+ }
+ dnnsList = OpenAPI_list_create();
- cJSON_ArrayForEach(dnns_local, dnns) {
- if (!cJSON_IsString(dnns_local)) {
- ogs_error("OpenAPI_data_filter_parseFromJSON() failed [dnns]");
- goto end;
- }
- OpenAPI_list_add(dnnsList, ogs_strdup_or_assert(dnns_local->valuestring));
- }
+ cJSON_ArrayForEach(dnns_local, dnns) {
+ if (!cJSON_IsString(dnns_local)) {
+ ogs_error("OpenAPI_data_filter_parseFromJSON() failed [dnns]");
+ goto end;
+ }
+ OpenAPI_list_add(dnnsList , ogs_strdup_or_assert(dnns_local->valuestring));
+ }
}
cJSON *snssais = cJSON_GetObjectItemCaseSensitive(data_filterJSON, "snssais");
OpenAPI_list_t *snssaisList;
- if (snssais) {
- cJSON *snssais_local_nonprimitive;
- if (!cJSON_IsArray(snssais)) {
+ if (snssais) {
+ cJSON *snssais_local_nonprimitive;
+ if (!cJSON_IsArray(snssais)){
+ ogs_error("OpenAPI_data_filter_parseFromJSON() failed [snssais]");
+ goto end;
+ }
+
+ snssaisList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(snssais_local_nonprimitive, snssais ) {
+ if (!cJSON_IsObject(snssais_local_nonprimitive)) {
ogs_error("OpenAPI_data_filter_parseFromJSON() failed [snssais]");
goto end;
}
+ OpenAPI_snssai_t *snssaisItem = OpenAPI_snssai_parseFromJSON(snssais_local_nonprimitive);
- snssaisList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(snssais_local_nonprimitive, snssais ) {
- if (!cJSON_IsObject(snssais_local_nonprimitive)) {
- ogs_error("OpenAPI_data_filter_parseFromJSON() failed [snssais]");
- goto end;
- }
- OpenAPI_snssai_t *snssaisItem = OpenAPI_snssai_parseFromJSON(snssais_local_nonprimitive);
-
- OpenAPI_list_add(snssaisList, snssaisItem);
- }
+ OpenAPI_list_add(snssaisList, snssaisItem);
+ }
}
cJSON *internal_group_ids = cJSON_GetObjectItemCaseSensitive(data_filterJSON, "internalGroupIds");
OpenAPI_list_t *internal_group_idsList;
- if (internal_group_ids) {
- cJSON *internal_group_ids_local;
- if (!cJSON_IsArray(internal_group_ids)) {
- ogs_error("OpenAPI_data_filter_parseFromJSON() failed [internal_group_ids]");
- goto end;
- }
- internal_group_idsList = OpenAPI_list_create();
+ if (internal_group_ids) {
+ cJSON *internal_group_ids_local;
+ if (!cJSON_IsArray(internal_group_ids)) {
+ ogs_error("OpenAPI_data_filter_parseFromJSON() failed [internal_group_ids]");
+ goto end;
+ }
+ internal_group_idsList = OpenAPI_list_create();
- cJSON_ArrayForEach(internal_group_ids_local, internal_group_ids) {
- if (!cJSON_IsString(internal_group_ids_local)) {
- ogs_error("OpenAPI_data_filter_parseFromJSON() failed [internal_group_ids]");
- goto end;
- }
- OpenAPI_list_add(internal_group_idsList, ogs_strdup_or_assert(internal_group_ids_local->valuestring));
- }
+ cJSON_ArrayForEach(internal_group_ids_local, internal_group_ids) {
+ if (!cJSON_IsString(internal_group_ids_local)) {
+ ogs_error("OpenAPI_data_filter_parseFromJSON() failed [internal_group_ids]");
+ goto end;
+ }
+ OpenAPI_list_add(internal_group_idsList , ogs_strdup_or_assert(internal_group_ids_local->valuestring));
+ }
}
cJSON *supis = cJSON_GetObjectItemCaseSensitive(data_filterJSON, "supis");
OpenAPI_list_t *supisList;
- if (supis) {
- cJSON *supis_local;
- if (!cJSON_IsArray(supis)) {
- ogs_error("OpenAPI_data_filter_parseFromJSON() failed [supis]");
- goto end;
- }
- supisList = OpenAPI_list_create();
+ if (supis) {
+ cJSON *supis_local;
+ if (!cJSON_IsArray(supis)) {
+ ogs_error("OpenAPI_data_filter_parseFromJSON() failed [supis]");
+ goto end;
+ }
+ supisList = OpenAPI_list_create();
- cJSON_ArrayForEach(supis_local, supis) {
- if (!cJSON_IsString(supis_local)) {
- ogs_error("OpenAPI_data_filter_parseFromJSON() failed [supis]");
- goto end;
- }
- OpenAPI_list_add(supisList, ogs_strdup_or_assert(supis_local->valuestring));
- }
+ cJSON_ArrayForEach(supis_local, supis) {
+ if (!cJSON_IsString(supis_local)) {
+ ogs_error("OpenAPI_data_filter_parseFromJSON() failed [supis]");
+ goto end;
+ }
+ OpenAPI_list_add(supisList , ogs_strdup_or_assert(supis_local->valuestring));
+ }
}
cJSON *app_ids = cJSON_GetObjectItemCaseSensitive(data_filterJSON, "appIds");
OpenAPI_list_t *app_idsList;
- if (app_ids) {
- cJSON *app_ids_local;
- if (!cJSON_IsArray(app_ids)) {
- ogs_error("OpenAPI_data_filter_parseFromJSON() failed [app_ids]");
- goto end;
- }
- app_idsList = OpenAPI_list_create();
+ if (app_ids) {
+ cJSON *app_ids_local;
+ if (!cJSON_IsArray(app_ids)) {
+ ogs_error("OpenAPI_data_filter_parseFromJSON() failed [app_ids]");
+ goto end;
+ }
+ app_idsList = OpenAPI_list_create();
- cJSON_ArrayForEach(app_ids_local, app_ids) {
- if (!cJSON_IsString(app_ids_local)) {
- ogs_error("OpenAPI_data_filter_parseFromJSON() failed [app_ids]");
- goto end;
- }
- OpenAPI_list_add(app_idsList, ogs_strdup_or_assert(app_ids_local->valuestring));
- }
+ cJSON_ArrayForEach(app_ids_local, app_ids) {
+ if (!cJSON_IsString(app_ids_local)) {
+ ogs_error("OpenAPI_data_filter_parseFromJSON() failed [app_ids]");
+ goto end;
+ }
+ OpenAPI_list_add(app_idsList , ogs_strdup_or_assert(app_ids_local->valuestring));
+ }
}
cJSON *ue_ipv4s = cJSON_GetObjectItemCaseSensitive(data_filterJSON, "ueIpv4s");
OpenAPI_list_t *ue_ipv4sList;
- if (ue_ipv4s) {
- cJSON *ue_ipv4s_local;
- if (!cJSON_IsArray(ue_ipv4s)) {
- ogs_error("OpenAPI_data_filter_parseFromJSON() failed [ue_ipv4s]");
- goto end;
- }
- ue_ipv4sList = OpenAPI_list_create();
+ if (ue_ipv4s) {
+ cJSON *ue_ipv4s_local;
+ if (!cJSON_IsArray(ue_ipv4s)) {
+ ogs_error("OpenAPI_data_filter_parseFromJSON() failed [ue_ipv4s]");
+ goto end;
+ }
+ ue_ipv4sList = OpenAPI_list_create();
- cJSON_ArrayForEach(ue_ipv4s_local, ue_ipv4s) {
- if (!cJSON_IsString(ue_ipv4s_local)) {
- ogs_error("OpenAPI_data_filter_parseFromJSON() failed [ue_ipv4s]");
- goto end;
- }
- OpenAPI_list_add(ue_ipv4sList, ogs_strdup_or_assert(ue_ipv4s_local->valuestring));
- }
+ cJSON_ArrayForEach(ue_ipv4s_local, ue_ipv4s) {
+ if (!cJSON_IsString(ue_ipv4s_local)) {
+ ogs_error("OpenAPI_data_filter_parseFromJSON() failed [ue_ipv4s]");
+ goto end;
+ }
+ OpenAPI_list_add(ue_ipv4sList , ogs_strdup_or_assert(ue_ipv4s_local->valuestring));
+ }
}
cJSON *ue_ipv6s = cJSON_GetObjectItemCaseSensitive(data_filterJSON, "ueIpv6s");
OpenAPI_list_t *ue_ipv6sList;
- if (ue_ipv6s) {
- cJSON *ue_ipv6s_local;
- if (!cJSON_IsArray(ue_ipv6s)) {
- ogs_error("OpenAPI_data_filter_parseFromJSON() failed [ue_ipv6s]");
- goto end;
- }
- ue_ipv6sList = OpenAPI_list_create();
+ if (ue_ipv6s) {
+ cJSON *ue_ipv6s_local;
+ if (!cJSON_IsArray(ue_ipv6s)) {
+ ogs_error("OpenAPI_data_filter_parseFromJSON() failed [ue_ipv6s]");
+ goto end;
+ }
+ ue_ipv6sList = OpenAPI_list_create();
- cJSON_ArrayForEach(ue_ipv6s_local, ue_ipv6s) {
- if (!cJSON_IsString(ue_ipv6s_local)) {
- ogs_error("OpenAPI_data_filter_parseFromJSON() failed [ue_ipv6s]");
- goto end;
- }
- OpenAPI_list_add(ue_ipv6sList, ogs_strdup_or_assert(ue_ipv6s_local->valuestring));
- }
+ cJSON_ArrayForEach(ue_ipv6s_local, ue_ipv6s) {
+ if (!cJSON_IsString(ue_ipv6s_local)) {
+ ogs_error("OpenAPI_data_filter_parseFromJSON() failed [ue_ipv6s]");
+ goto end;
+ }
+ OpenAPI_list_add(ue_ipv6sList , ogs_strdup_or_assert(ue_ipv6s_local->valuestring));
+ }
}
cJSON *ue_macs = cJSON_GetObjectItemCaseSensitive(data_filterJSON, "ueMacs");
OpenAPI_list_t *ue_macsList;
- if (ue_macs) {
- cJSON *ue_macs_local;
- if (!cJSON_IsArray(ue_macs)) {
- ogs_error("OpenAPI_data_filter_parseFromJSON() failed [ue_macs]");
- goto end;
- }
- ue_macsList = OpenAPI_list_create();
+ if (ue_macs) {
+ cJSON *ue_macs_local;
+ if (!cJSON_IsArray(ue_macs)) {
+ ogs_error("OpenAPI_data_filter_parseFromJSON() failed [ue_macs]");
+ goto end;
+ }
+ ue_macsList = OpenAPI_list_create();
- cJSON_ArrayForEach(ue_macs_local, ue_macs) {
- if (!cJSON_IsString(ue_macs_local)) {
- ogs_error("OpenAPI_data_filter_parseFromJSON() failed [ue_macs]");
- goto end;
- }
- OpenAPI_list_add(ue_macsList, ogs_strdup_or_assert(ue_macs_local->valuestring));
- }
+ cJSON_ArrayForEach(ue_macs_local, ue_macs) {
+ if (!cJSON_IsString(ue_macs_local)) {
+ ogs_error("OpenAPI_data_filter_parseFromJSON() failed [ue_macs]");
+ goto end;
+ }
+ OpenAPI_list_add(ue_macsList , ogs_strdup_or_assert(ue_macs_local->valuestring));
+ }
}
data_filter_local_var = OpenAPI_data_filter_create (
@@ -418,7 +418,7 @@ OpenAPI_data_filter_t *OpenAPI_data_filter_parseFromJSON(cJSON *data_filterJSON)
ue_ipv4s ? ue_ipv4sList : NULL,
ue_ipv6s ? ue_ipv6sList : NULL,
ue_macs ? ue_macsList : NULL
- );
+ );
return data_filter_local_var;
end:
diff --git a/lib/sbi/openapi/model/data_filter.h b/lib/sbi/openapi/model/data_filter.h
index db1ef3dd2..6b72f2709 100644
--- a/lib/sbi/openapi/model/data_filter.h
+++ b/lib/sbi/openapi/model/data_filter.h
@@ -42,7 +42,7 @@ OpenAPI_data_filter_t *OpenAPI_data_filter_create(
OpenAPI_list_t *ue_ipv4s,
OpenAPI_list_t *ue_ipv6s,
OpenAPI_list_t *ue_macs
- );
+);
void OpenAPI_data_filter_free(OpenAPI_data_filter_t *data_filter);
OpenAPI_data_filter_t *OpenAPI_data_filter_parseFromJSON(cJSON *data_filterJSON);
cJSON *OpenAPI_data_filter_convertToJSON(OpenAPI_data_filter_t *data_filter);
diff --git a/lib/sbi/openapi/model/data_ind.c b/lib/sbi/openapi/model/data_ind.c
index ebbd00145..58c9e0476 100644
--- a/lib/sbi/openapi/model/data_ind.c
+++ b/lib/sbi/openapi/model/data_ind.c
@@ -5,7 +5,7 @@
#include "data_ind.h"
OpenAPI_data_ind_t *OpenAPI_data_ind_create(
- )
+)
{
OpenAPI_data_ind_t *data_ind_local_var = OpenAPI_malloc(sizeof(OpenAPI_data_ind_t));
if (!data_ind_local_var) {
@@ -42,7 +42,7 @@ OpenAPI_data_ind_t *OpenAPI_data_ind_parseFromJSON(cJSON *data_indJSON)
{
OpenAPI_data_ind_t *data_ind_local_var = NULL;
data_ind_local_var = OpenAPI_data_ind_create (
- );
+ );
return data_ind_local_var;
end:
diff --git a/lib/sbi/openapi/model/data_ind.h b/lib/sbi/openapi/model/data_ind.h
index 651c211b2..e83b2a6e1 100644
--- a/lib/sbi/openapi/model/data_ind.h
+++ b/lib/sbi/openapi/model/data_ind.h
@@ -1,7 +1,7 @@
/*
* data_ind.h
*
- * Possible values are - PFD - IPTV - BDT - SVC_PARAM
+ * Possible values are - PFD - IPTV - BDT - SVC_PARAM
*/
#ifndef _OpenAPI_data_ind_H_
@@ -12,6 +12,7 @@
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
+#include "data_ind_any_of.h"
#ifdef __cplusplus
extern "C" {
@@ -22,7 +23,7 @@ typedef struct OpenAPI_data_ind_s {
} OpenAPI_data_ind_t;
OpenAPI_data_ind_t *OpenAPI_data_ind_create(
- );
+);
void OpenAPI_data_ind_free(OpenAPI_data_ind_t *data_ind);
OpenAPI_data_ind_t *OpenAPI_data_ind_parseFromJSON(cJSON *data_indJSON);
cJSON *OpenAPI_data_ind_convertToJSON(OpenAPI_data_ind_t *data_ind);
diff --git a/lib/sbi/openapi/model/data_ind_any_of.c b/lib/sbi/openapi/model/data_ind_any_of.c
new file mode 100644
index 000000000..3e140de6b
--- /dev/null
+++ b/lib/sbi/openapi/model/data_ind_any_of.c
@@ -0,0 +1,30 @@
+
+#include
+#include
+#include
+#include "data_ind_any_of.h"
+
+char* OpenAPI_data_ind_any_of_ToString(OpenAPI_data_ind_any_of_e data_ind_any_of)
+{
+ const char *data_ind_any_ofArray[] = { "NULL", "PFD", "IPTV", "BDT", "SVC_PARAM" };
+ size_t sizeofArray = sizeof(data_ind_any_ofArray) / sizeof(data_ind_any_ofArray[0]);
+ if (data_ind_any_of < sizeofArray)
+ return (char *)data_ind_any_ofArray[data_ind_any_of];
+ else
+ return (char *)"Unknown";
+}
+
+OpenAPI_data_ind_any_of_e OpenAPI_data_ind_any_of_FromString(char* data_ind_any_of)
+{
+ int stringToReturn = 0;
+ const char *data_ind_any_ofArray[] = { "NULL", "PFD", "IPTV", "BDT", "SVC_PARAM" };
+ size_t sizeofArray = sizeof(data_ind_any_ofArray) / sizeof(data_ind_any_ofArray[0]);
+ while (stringToReturn < sizeofArray) {
+ if (strcmp(data_ind_any_of, data_ind_any_ofArray[stringToReturn]) == 0) {
+ return stringToReturn;
+ }
+ stringToReturn++;
+ }
+ return 0;
+}
+
diff --git a/lib/sbi/openapi/model/data_ind_any_of.h b/lib/sbi/openapi/model/data_ind_any_of.h
new file mode 100644
index 000000000..cb48da17d
--- /dev/null
+++ b/lib/sbi/openapi/model/data_ind_any_of.h
@@ -0,0 +1,31 @@
+/*
+ * data_ind_any_of.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_data_ind_any_of_H_
+#define _OpenAPI_data_ind_any_of_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum { OpenAPI_data_ind_any_of_NULL = 0, OpenAPI_data_ind_any_of_PFD, OpenAPI_data_ind_any_of_IPTV, OpenAPI_data_ind_any_of_BDT, OpenAPI_data_ind_any_of_SVC_PARAM } OpenAPI_data_ind_any_of_e;
+
+char* OpenAPI_data_ind_any_of_ToString(OpenAPI_data_ind_any_of_e data_ind_any_of);
+
+OpenAPI_data_ind_any_of_e OpenAPI_data_ind_any_of_FromString(char* data_ind_any_of);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_data_ind_any_of_H_ */
+
diff --git a/lib/sbi/openapi/model/data_set_id.c b/lib/sbi/openapi/model/data_set_id.c
index e64f60c48..ebd686556 100644
--- a/lib/sbi/openapi/model/data_set_id.c
+++ b/lib/sbi/openapi/model/data_set_id.c
@@ -4,82 +4,27 @@
#include
#include "data_set_id.h"
-OpenAPI_data_set_id_t *OpenAPI_data_set_id_create(
- )
+char* OpenAPI_data_set_id_ToString(OpenAPI_data_set_id_e data_set_id)
{
- OpenAPI_data_set_id_t *data_set_id_local_var = OpenAPI_malloc(sizeof(OpenAPI_data_set_id_t));
- if (!data_set_id_local_var) {
- return NULL;
- }
-
- return data_set_id_local_var;
+ const char *data_set_idArray[] = { "NULL", "SUBSCRIPTION", "POLICY", "EXPOSURE", "APPLICATION" };
+ size_t sizeofArray = sizeof(data_set_idArray) / sizeof(data_set_idArray[0]);
+ if (data_set_id < sizeofArray)
+ return (char *)data_set_idArray[data_set_id];
+ else
+ return (char *)"Unknown";
}
-void OpenAPI_data_set_id_free(OpenAPI_data_set_id_t *data_set_id)
+OpenAPI_data_set_id_e OpenAPI_data_set_id_FromString(char* data_set_id)
{
- if (NULL == data_set_id) {
- return;
+ int stringToReturn = 0;
+ const char *data_set_idArray[] = { "NULL", "SUBSCRIPTION", "POLICY", "EXPOSURE", "APPLICATION" };
+ size_t sizeofArray = sizeof(data_set_idArray) / sizeof(data_set_idArray[0]);
+ while (stringToReturn < sizeofArray) {
+ if (strcmp(data_set_id, data_set_idArray[stringToReturn]) == 0) {
+ return stringToReturn;
+ }
+ stringToReturn++;
}
- OpenAPI_lnode_t *node;
- ogs_free(data_set_id);
-}
-
-cJSON *OpenAPI_data_set_id_convertToJSON(OpenAPI_data_set_id_t *data_set_id)
-{
- cJSON *item = NULL;
-
- if (data_set_id == NULL) {
- ogs_error("OpenAPI_data_set_id_convertToJSON() failed [DataSetId]");
- return NULL;
- }
-
- item = cJSON_CreateObject();
-end:
- return item;
-}
-
-OpenAPI_data_set_id_t *OpenAPI_data_set_id_parseFromJSON(cJSON *data_set_idJSON)
-{
- OpenAPI_data_set_id_t *data_set_id_local_var = NULL;
- data_set_id_local_var = OpenAPI_data_set_id_create (
- );
-
- return data_set_id_local_var;
-end:
- return NULL;
-}
-
-OpenAPI_data_set_id_t *OpenAPI_data_set_id_copy(OpenAPI_data_set_id_t *dst, OpenAPI_data_set_id_t *src)
-{
- cJSON *item = NULL;
- char *content = NULL;
-
- ogs_assert(src);
- item = OpenAPI_data_set_id_convertToJSON(src);
- if (!item) {
- ogs_error("OpenAPI_data_set_id_convertToJSON() failed");
- return NULL;
- }
-
- content = cJSON_Print(item);
- cJSON_Delete(item);
-
- if (!content) {
- ogs_error("cJSON_Print() failed");
- return NULL;
- }
-
- item = cJSON_Parse(content);
- ogs_free(content);
- if (!item) {
- ogs_error("cJSON_Parse() failed");
- return NULL;
- }
-
- OpenAPI_data_set_id_free(dst);
- dst = OpenAPI_data_set_id_parseFromJSON(item);
- cJSON_Delete(item);
-
- return dst;
+ return 0;
}
diff --git a/lib/sbi/openapi/model/data_set_id.h b/lib/sbi/openapi/model/data_set_id.h
index 3e4ae34d6..70a3221dd 100644
--- a/lib/sbi/openapi/model/data_set_id.h
+++ b/lib/sbi/openapi/model/data_set_id.h
@@ -1,7 +1,7 @@
/*
* data_set_id.h
*
- * Types of data sets stored in UDR
+ *
*/
#ifndef _OpenAPI_data_set_id_H_
@@ -17,16 +17,11 @@
extern "C" {
#endif
-typedef struct OpenAPI_data_set_id_s OpenAPI_data_set_id_t;
-typedef struct OpenAPI_data_set_id_s {
-} OpenAPI_data_set_id_t;
+typedef enum { OpenAPI_data_set_id_NULL = 0, OpenAPI_data_set_id_SUBSCRIPTION, OpenAPI_data_set_id_POLICY, OpenAPI_data_set_id_EXPOSURE, OpenAPI_data_set_id_APPLICATION } OpenAPI_data_set_id_e;
-OpenAPI_data_set_id_t *OpenAPI_data_set_id_create(
- );
-void OpenAPI_data_set_id_free(OpenAPI_data_set_id_t *data_set_id);
-OpenAPI_data_set_id_t *OpenAPI_data_set_id_parseFromJSON(cJSON *data_set_idJSON);
-cJSON *OpenAPI_data_set_id_convertToJSON(OpenAPI_data_set_id_t *data_set_id);
-OpenAPI_data_set_id_t *OpenAPI_data_set_id_copy(OpenAPI_data_set_id_t *dst, OpenAPI_data_set_id_t *src);
+char* OpenAPI_data_set_id_ToString(OpenAPI_data_set_id_e data_set_id);
+
+OpenAPI_data_set_id_e OpenAPI_data_set_id_FromString(char* data_set_id);
#ifdef __cplusplus
}
diff --git a/lib/sbi/openapi/model/data_set_name.h b/lib/sbi/openapi/model/data_set_name.h
index b4b6f66cf..1ccc35dd4 100644
--- a/lib/sbi/openapi/model/data_set_name.h
+++ b/lib/sbi/openapi/model/data_set_name.h
@@ -1,7 +1,7 @@
/*
* data_set_name.h
*
- *
+ *
*/
#ifndef _OpenAPI_data_set_name_H_
diff --git a/lib/sbi/openapi/model/datalink_reporting_configuration.c b/lib/sbi/openapi/model/datalink_reporting_configuration.c
index bced53235..2ccbd5e2d 100644
--- a/lib/sbi/openapi/model/datalink_reporting_configuration.c
+++ b/lib/sbi/openapi/model/datalink_reporting_configuration.c
@@ -9,7 +9,7 @@ OpenAPI_datalink_reporting_configuration_t *OpenAPI_datalink_reporting_configura
char *dnn,
OpenAPI_snssai_t *slice,
OpenAPI_list_t *ddd_status_list
- )
+)
{
OpenAPI_datalink_reporting_configuration_t *datalink_reporting_configuration_local_var = OpenAPI_malloc(sizeof(OpenAPI_datalink_reporting_configuration_t));
if (!datalink_reporting_configuration_local_var) {
@@ -50,58 +50,58 @@ cJSON *OpenAPI_datalink_reporting_configuration_convertToJSON(OpenAPI_datalink_r
item = cJSON_CreateObject();
if (datalink_reporting_configuration->ddd_traffic_des) {
- cJSON *ddd_traffic_desList = cJSON_AddArrayToObject(item, "dddTrafficDes");
- if (ddd_traffic_desList == NULL) {
- ogs_error("OpenAPI_datalink_reporting_configuration_convertToJSON() failed [ddd_traffic_des]");
- goto end;
- }
+ cJSON *ddd_traffic_desList = cJSON_AddArrayToObject(item, "dddTrafficDes");
+ if (ddd_traffic_desList == NULL) {
+ ogs_error("OpenAPI_datalink_reporting_configuration_convertToJSON() failed [ddd_traffic_des]");
+ goto end;
+ }
- OpenAPI_lnode_t *ddd_traffic_des_node;
- if (datalink_reporting_configuration->ddd_traffic_des) {
- OpenAPI_list_for_each(datalink_reporting_configuration->ddd_traffic_des, ddd_traffic_des_node) {
- cJSON *itemLocal = OpenAPI_ddd_traffic_descriptor_convertToJSON(ddd_traffic_des_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_datalink_reporting_configuration_convertToJSON() failed [ddd_traffic_des]");
- goto end;
- }
- cJSON_AddItemToArray(ddd_traffic_desList, itemLocal);
+ OpenAPI_lnode_t *ddd_traffic_des_node;
+ if (datalink_reporting_configuration->ddd_traffic_des) {
+ OpenAPI_list_for_each(datalink_reporting_configuration->ddd_traffic_des, ddd_traffic_des_node) {
+ cJSON *itemLocal = OpenAPI_ddd_traffic_descriptor_convertToJSON(ddd_traffic_des_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_datalink_reporting_configuration_convertToJSON() failed [ddd_traffic_des]");
+ goto end;
}
+ cJSON_AddItemToArray(ddd_traffic_desList, itemLocal);
}
}
+ }
if (datalink_reporting_configuration->dnn) {
- if (cJSON_AddStringToObject(item, "dnn", datalink_reporting_configuration->dnn) == NULL) {
- ogs_error("OpenAPI_datalink_reporting_configuration_convertToJSON() failed [dnn]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "dnn", datalink_reporting_configuration->dnn) == NULL) {
+ ogs_error("OpenAPI_datalink_reporting_configuration_convertToJSON() failed [dnn]");
+ goto end;
+ }
}
if (datalink_reporting_configuration->slice) {
- cJSON *slice_local_JSON = OpenAPI_snssai_convertToJSON(datalink_reporting_configuration->slice);
- if (slice_local_JSON == NULL) {
- ogs_error("OpenAPI_datalink_reporting_configuration_convertToJSON() failed [slice]");
- goto end;
- }
- cJSON_AddItemToObject(item, "slice", slice_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_datalink_reporting_configuration_convertToJSON() failed [slice]");
- goto end;
- }
+ cJSON *slice_local_JSON = OpenAPI_snssai_convertToJSON(datalink_reporting_configuration->slice);
+ if (slice_local_JSON == NULL) {
+ ogs_error("OpenAPI_datalink_reporting_configuration_convertToJSON() failed [slice]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "slice", slice_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_datalink_reporting_configuration_convertToJSON() failed [slice]");
+ goto end;
+ }
}
if (datalink_reporting_configuration->ddd_status_list) {
- cJSON *ddd_status_list = cJSON_AddArrayToObject(item, "dddStatusList");
- if (ddd_status_list == NULL) {
+ cJSON *ddd_status_list = cJSON_AddArrayToObject(item, "dddStatusList");
+ if (ddd_status_list == NULL) {
+ ogs_error("OpenAPI_datalink_reporting_configuration_convertToJSON() failed [ddd_status_list]");
+ goto end;
+ }
+ OpenAPI_lnode_t *ddd_status_list_node;
+ OpenAPI_list_for_each(datalink_reporting_configuration->ddd_status_list, ddd_status_list_node) {
+ if (cJSON_AddStringToObject(ddd_status_list, "", OpenAPI_dl_data_delivery_status_ToString((intptr_t)ddd_status_list_node->data)) == NULL) {
ogs_error("OpenAPI_datalink_reporting_configuration_convertToJSON() failed [ddd_status_list]");
goto end;
}
- OpenAPI_lnode_t *ddd_status_list_node;
- OpenAPI_list_for_each(datalink_reporting_configuration->ddd_status_list, ddd_status_list_node) {
- if (cJSON_AddStringToObject(ddd_status_list, "", OpenAPI_dl_data_delivery_status_ToString((intptr_t)ddd_status_list_node->data)) == NULL) {
- ogs_error("OpenAPI_datalink_reporting_configuration_convertToJSON() failed [ddd_status_list]");
- goto end;
- }
- }
+ }
}
end:
@@ -114,62 +114,62 @@ OpenAPI_datalink_reporting_configuration_t *OpenAPI_datalink_reporting_configura
cJSON *ddd_traffic_des = cJSON_GetObjectItemCaseSensitive(datalink_reporting_configurationJSON, "dddTrafficDes");
OpenAPI_list_t *ddd_traffic_desList;
- if (ddd_traffic_des) {
- cJSON *ddd_traffic_des_local_nonprimitive;
- if (!cJSON_IsArray(ddd_traffic_des)) {
+ if (ddd_traffic_des) {
+ cJSON *ddd_traffic_des_local_nonprimitive;
+ if (!cJSON_IsArray(ddd_traffic_des)){
+ ogs_error("OpenAPI_datalink_reporting_configuration_parseFromJSON() failed [ddd_traffic_des]");
+ goto end;
+ }
+
+ ddd_traffic_desList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(ddd_traffic_des_local_nonprimitive, ddd_traffic_des ) {
+ if (!cJSON_IsObject(ddd_traffic_des_local_nonprimitive)) {
ogs_error("OpenAPI_datalink_reporting_configuration_parseFromJSON() failed [ddd_traffic_des]");
goto end;
}
+ OpenAPI_ddd_traffic_descriptor_t *ddd_traffic_desItem = OpenAPI_ddd_traffic_descriptor_parseFromJSON(ddd_traffic_des_local_nonprimitive);
- ddd_traffic_desList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(ddd_traffic_des_local_nonprimitive, ddd_traffic_des ) {
- if (!cJSON_IsObject(ddd_traffic_des_local_nonprimitive)) {
- ogs_error("OpenAPI_datalink_reporting_configuration_parseFromJSON() failed [ddd_traffic_des]");
- goto end;
- }
- OpenAPI_ddd_traffic_descriptor_t *ddd_traffic_desItem = OpenAPI_ddd_traffic_descriptor_parseFromJSON(ddd_traffic_des_local_nonprimitive);
-
- OpenAPI_list_add(ddd_traffic_desList, ddd_traffic_desItem);
- }
+ OpenAPI_list_add(ddd_traffic_desList, ddd_traffic_desItem);
+ }
}
cJSON *dnn = cJSON_GetObjectItemCaseSensitive(datalink_reporting_configurationJSON, "dnn");
- if (dnn) {
- if (!cJSON_IsString(dnn)) {
- ogs_error("OpenAPI_datalink_reporting_configuration_parseFromJSON() failed [dnn]");
- goto end;
- }
+ if (dnn) {
+ if (!cJSON_IsString(dnn)) {
+ ogs_error("OpenAPI_datalink_reporting_configuration_parseFromJSON() failed [dnn]");
+ goto end;
+ }
}
cJSON *slice = cJSON_GetObjectItemCaseSensitive(datalink_reporting_configurationJSON, "slice");
OpenAPI_snssai_t *slice_local_nonprim = NULL;
- if (slice) {
- slice_local_nonprim = OpenAPI_snssai_parseFromJSON(slice);
+ if (slice) {
+ slice_local_nonprim = OpenAPI_snssai_parseFromJSON(slice);
}
cJSON *ddd_status_list = cJSON_GetObjectItemCaseSensitive(datalink_reporting_configurationJSON, "dddStatusList");
OpenAPI_list_t *ddd_status_listList;
- if (ddd_status_list) {
- cJSON *ddd_status_list_local_nonprimitive;
- if (!cJSON_IsArray(ddd_status_list)) {
+ if (ddd_status_list) {
+ cJSON *ddd_status_list_local_nonprimitive;
+ if (!cJSON_IsArray(ddd_status_list)) {
+ ogs_error("OpenAPI_datalink_reporting_configuration_parseFromJSON() failed [ddd_status_list]");
+ goto end;
+ }
+
+ ddd_status_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(ddd_status_list_local_nonprimitive, ddd_status_list ) {
+ if (!cJSON_IsString(ddd_status_list_local_nonprimitive)){
ogs_error("OpenAPI_datalink_reporting_configuration_parseFromJSON() failed [ddd_status_list]");
goto end;
}
- ddd_status_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(ddd_status_list_local_nonprimitive, ddd_status_list ) {
- if (!cJSON_IsString(ddd_status_list_local_nonprimitive)) {
- ogs_error("OpenAPI_datalink_reporting_configuration_parseFromJSON() failed [ddd_status_list]");
- goto end;
- }
-
- OpenAPI_list_add(ddd_status_listList, (void *)OpenAPI_dl_data_delivery_status_FromString(ddd_status_list_local_nonprimitive->valuestring));
- }
+ OpenAPI_list_add(ddd_status_listList, (void *)OpenAPI_dl_data_delivery_status_FromString(ddd_status_list_local_nonprimitive->valuestring));
+ }
}
datalink_reporting_configuration_local_var = OpenAPI_datalink_reporting_configuration_create (
@@ -177,7 +177,7 @@ OpenAPI_datalink_reporting_configuration_t *OpenAPI_datalink_reporting_configura
dnn ? ogs_strdup_or_assert(dnn->valuestring) : NULL,
slice ? slice_local_nonprim : NULL,
ddd_status_list ? ddd_status_listList : NULL
- );
+ );
return datalink_reporting_configuration_local_var;
end:
diff --git a/lib/sbi/openapi/model/datalink_reporting_configuration.h b/lib/sbi/openapi/model/datalink_reporting_configuration.h
index 1cb02a37e..759b2faba 100644
--- a/lib/sbi/openapi/model/datalink_reporting_configuration.h
+++ b/lib/sbi/openapi/model/datalink_reporting_configuration.h
@@ -1,7 +1,7 @@
/*
* datalink_reporting_configuration.h
*
- *
+ *
*/
#ifndef _OpenAPI_datalink_reporting_configuration_H_
@@ -33,7 +33,7 @@ OpenAPI_datalink_reporting_configuration_t *OpenAPI_datalink_reporting_configura
char *dnn,
OpenAPI_snssai_t *slice,
OpenAPI_list_t *ddd_status_list
- );
+);
void OpenAPI_datalink_reporting_configuration_free(OpenAPI_datalink_reporting_configuration_t *datalink_reporting_configuration);
OpenAPI_datalink_reporting_configuration_t *OpenAPI_datalink_reporting_configuration_parseFromJSON(cJSON *datalink_reporting_configurationJSON);
cJSON *OpenAPI_datalink_reporting_configuration_convertToJSON(OpenAPI_datalink_reporting_configuration_t *datalink_reporting_configuration);
diff --git a/lib/sbi/openapi/model/ddd_traffic_descriptor.c b/lib/sbi/openapi/model/ddd_traffic_descriptor.c
index fb7379871..29cda82a0 100644
--- a/lib/sbi/openapi/model/ddd_traffic_descriptor.c
+++ b/lib/sbi/openapi/model/ddd_traffic_descriptor.c
@@ -9,7 +9,7 @@ OpenAPI_ddd_traffic_descriptor_t *OpenAPI_ddd_traffic_descriptor_create(
char *ipv6_addr,
int port_number,
char *mac_addr
- )
+)
{
OpenAPI_ddd_traffic_descriptor_t *ddd_traffic_descriptor_local_var = OpenAPI_malloc(sizeof(OpenAPI_ddd_traffic_descriptor_t));
if (!ddd_traffic_descriptor_local_var) {
@@ -46,31 +46,31 @@ cJSON *OpenAPI_ddd_traffic_descriptor_convertToJSON(OpenAPI_ddd_traffic_descript
item = cJSON_CreateObject();
if (ddd_traffic_descriptor->ipv4_addr) {
- if (cJSON_AddStringToObject(item, "ipv4Addr", ddd_traffic_descriptor->ipv4_addr) == NULL) {
- ogs_error("OpenAPI_ddd_traffic_descriptor_convertToJSON() failed [ipv4_addr]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "ipv4Addr", ddd_traffic_descriptor->ipv4_addr) == NULL) {
+ ogs_error("OpenAPI_ddd_traffic_descriptor_convertToJSON() failed [ipv4_addr]");
+ goto end;
+ }
}
if (ddd_traffic_descriptor->ipv6_addr) {
- if (cJSON_AddStringToObject(item, "ipv6Addr", ddd_traffic_descriptor->ipv6_addr) == NULL) {
- ogs_error("OpenAPI_ddd_traffic_descriptor_convertToJSON() failed [ipv6_addr]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "ipv6Addr", ddd_traffic_descriptor->ipv6_addr) == NULL) {
+ ogs_error("OpenAPI_ddd_traffic_descriptor_convertToJSON() failed [ipv6_addr]");
+ goto end;
+ }
}
if (ddd_traffic_descriptor->port_number) {
- if (cJSON_AddNumberToObject(item, "portNumber", ddd_traffic_descriptor->port_number) == NULL) {
- ogs_error("OpenAPI_ddd_traffic_descriptor_convertToJSON() failed [port_number]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "portNumber", ddd_traffic_descriptor->port_number) == NULL) {
+ ogs_error("OpenAPI_ddd_traffic_descriptor_convertToJSON() failed [port_number]");
+ goto end;
+ }
}
if (ddd_traffic_descriptor->mac_addr) {
- if (cJSON_AddStringToObject(item, "macAddr", ddd_traffic_descriptor->mac_addr) == NULL) {
- ogs_error("OpenAPI_ddd_traffic_descriptor_convertToJSON() failed [mac_addr]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "macAddr", ddd_traffic_descriptor->mac_addr) == NULL) {
+ ogs_error("OpenAPI_ddd_traffic_descriptor_convertToJSON() failed [mac_addr]");
+ goto end;
+ }
}
end:
@@ -82,38 +82,38 @@ OpenAPI_ddd_traffic_descriptor_t *OpenAPI_ddd_traffic_descriptor_parseFromJSON(c
OpenAPI_ddd_traffic_descriptor_t *ddd_traffic_descriptor_local_var = NULL;
cJSON *ipv4_addr = cJSON_GetObjectItemCaseSensitive(ddd_traffic_descriptorJSON, "ipv4Addr");
- if (ipv4_addr) {
- if (!cJSON_IsString(ipv4_addr)) {
- ogs_error("OpenAPI_ddd_traffic_descriptor_parseFromJSON() failed [ipv4_addr]");
- goto end;
- }
+ if (ipv4_addr) {
+ if (!cJSON_IsString(ipv4_addr)) {
+ ogs_error("OpenAPI_ddd_traffic_descriptor_parseFromJSON() failed [ipv4_addr]");
+ goto end;
+ }
}
cJSON *ipv6_addr = cJSON_GetObjectItemCaseSensitive(ddd_traffic_descriptorJSON, "ipv6Addr");
- if (ipv6_addr) {
- if (!cJSON_IsString(ipv6_addr)) {
- ogs_error("OpenAPI_ddd_traffic_descriptor_parseFromJSON() failed [ipv6_addr]");
- goto end;
- }
+ if (ipv6_addr) {
+ if (!cJSON_IsString(ipv6_addr)) {
+ ogs_error("OpenAPI_ddd_traffic_descriptor_parseFromJSON() failed [ipv6_addr]");
+ goto end;
+ }
}
cJSON *port_number = cJSON_GetObjectItemCaseSensitive(ddd_traffic_descriptorJSON, "portNumber");
- if (port_number) {
- if (!cJSON_IsNumber(port_number)) {
- ogs_error("OpenAPI_ddd_traffic_descriptor_parseFromJSON() failed [port_number]");
- goto end;
- }
+ if (port_number) {
+ if (!cJSON_IsNumber(port_number)) {
+ ogs_error("OpenAPI_ddd_traffic_descriptor_parseFromJSON() failed [port_number]");
+ goto end;
+ }
}
cJSON *mac_addr = cJSON_GetObjectItemCaseSensitive(ddd_traffic_descriptorJSON, "macAddr");
- if (mac_addr) {
- if (!cJSON_IsString(mac_addr)) {
- ogs_error("OpenAPI_ddd_traffic_descriptor_parseFromJSON() failed [mac_addr]");
- goto end;
- }
+ if (mac_addr) {
+ if (!cJSON_IsString(mac_addr)) {
+ ogs_error("OpenAPI_ddd_traffic_descriptor_parseFromJSON() failed [mac_addr]");
+ goto end;
+ }
}
ddd_traffic_descriptor_local_var = OpenAPI_ddd_traffic_descriptor_create (
@@ -121,7 +121,7 @@ OpenAPI_ddd_traffic_descriptor_t *OpenAPI_ddd_traffic_descriptor_parseFromJSON(c
ipv6_addr ? ogs_strdup_or_assert(ipv6_addr->valuestring) : NULL,
port_number ? port_number->valuedouble : 0,
mac_addr ? ogs_strdup_or_assert(mac_addr->valuestring) : NULL
- );
+ );
return ddd_traffic_descriptor_local_var;
end:
diff --git a/lib/sbi/openapi/model/ddd_traffic_descriptor.h b/lib/sbi/openapi/model/ddd_traffic_descriptor.h
index f604c665f..32a0a84bb 100644
--- a/lib/sbi/openapi/model/ddd_traffic_descriptor.h
+++ b/lib/sbi/openapi/model/ddd_traffic_descriptor.h
@@ -1,7 +1,7 @@
/*
* ddd_traffic_descriptor.h
*
- *
+ *
*/
#ifndef _OpenAPI_ddd_traffic_descriptor_H_
@@ -30,7 +30,7 @@ OpenAPI_ddd_traffic_descriptor_t *OpenAPI_ddd_traffic_descriptor_create(
char *ipv6_addr,
int port_number,
char *mac_addr
- );
+);
void OpenAPI_ddd_traffic_descriptor_free(OpenAPI_ddd_traffic_descriptor_t *ddd_traffic_descriptor);
OpenAPI_ddd_traffic_descriptor_t *OpenAPI_ddd_traffic_descriptor_parseFromJSON(cJSON *ddd_traffic_descriptorJSON);
cJSON *OpenAPI_ddd_traffic_descriptor_convertToJSON(OpenAPI_ddd_traffic_descriptor_t *ddd_traffic_descriptor);
diff --git a/lib/sbi/openapi/model/ddn_failure_sub_info.c b/lib/sbi/openapi/model/ddn_failure_sub_info.c
index cbd350491..c81101bfb 100644
--- a/lib/sbi/openapi/model/ddn_failure_sub_info.c
+++ b/lib/sbi/openapi/model/ddn_failure_sub_info.c
@@ -7,7 +7,7 @@
OpenAPI_ddn_failure_sub_info_t *OpenAPI_ddn_failure_sub_info_create(
char *notify_correlation_id,
OpenAPI_list_t *ddd_traffic_descriptor_list
- )
+)
{
OpenAPI_ddn_failure_sub_info_t *ddn_failure_sub_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_ddn_failure_sub_info_t));
if (!ddn_failure_sub_info_local_var) {
@@ -49,24 +49,24 @@ cJSON *OpenAPI_ddn_failure_sub_info_convertToJSON(OpenAPI_ddn_failure_sub_info_t
}
if (ddn_failure_sub_info->ddd_traffic_descriptor_list) {
- cJSON *ddd_traffic_descriptor_listList = cJSON_AddArrayToObject(item, "dddTrafficDescriptorList");
- if (ddd_traffic_descriptor_listList == NULL) {
- ogs_error("OpenAPI_ddn_failure_sub_info_convertToJSON() failed [ddd_traffic_descriptor_list]");
- goto end;
- }
+ cJSON *ddd_traffic_descriptor_listList = cJSON_AddArrayToObject(item, "dddTrafficDescriptorList");
+ if (ddd_traffic_descriptor_listList == NULL) {
+ ogs_error("OpenAPI_ddn_failure_sub_info_convertToJSON() failed [ddd_traffic_descriptor_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *ddd_traffic_descriptor_list_node;
- if (ddn_failure_sub_info->ddd_traffic_descriptor_list) {
- OpenAPI_list_for_each(ddn_failure_sub_info->ddd_traffic_descriptor_list, ddd_traffic_descriptor_list_node) {
- cJSON *itemLocal = OpenAPI_ddd_traffic_descriptor_convertToJSON(ddd_traffic_descriptor_list_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_ddn_failure_sub_info_convertToJSON() failed [ddd_traffic_descriptor_list]");
- goto end;
- }
- cJSON_AddItemToArray(ddd_traffic_descriptor_listList, itemLocal);
+ OpenAPI_lnode_t *ddd_traffic_descriptor_list_node;
+ if (ddn_failure_sub_info->ddd_traffic_descriptor_list) {
+ OpenAPI_list_for_each(ddn_failure_sub_info->ddd_traffic_descriptor_list, ddd_traffic_descriptor_list_node) {
+ cJSON *itemLocal = OpenAPI_ddd_traffic_descriptor_convertToJSON(ddd_traffic_descriptor_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_ddn_failure_sub_info_convertToJSON() failed [ddd_traffic_descriptor_list]");
+ goto end;
}
+ cJSON_AddItemToArray(ddd_traffic_descriptor_listList, itemLocal);
}
}
+ }
end:
return item;
@@ -81,7 +81,7 @@ OpenAPI_ddn_failure_sub_info_t *OpenAPI_ddn_failure_sub_info_parseFromJSON(cJSON
goto end;
}
-
+
if (!cJSON_IsString(notify_correlation_id)) {
ogs_error("OpenAPI_ddn_failure_sub_info_parseFromJSON() failed [notify_correlation_id]");
goto end;
@@ -90,30 +90,30 @@ OpenAPI_ddn_failure_sub_info_t *OpenAPI_ddn_failure_sub_info_parseFromJSON(cJSON
cJSON *ddd_traffic_descriptor_list = cJSON_GetObjectItemCaseSensitive(ddn_failure_sub_infoJSON, "dddTrafficDescriptorList");
OpenAPI_list_t *ddd_traffic_descriptor_listList;
- if (ddd_traffic_descriptor_list) {
- cJSON *ddd_traffic_descriptor_list_local_nonprimitive;
- if (!cJSON_IsArray(ddd_traffic_descriptor_list)) {
+ if (ddd_traffic_descriptor_list) {
+ cJSON *ddd_traffic_descriptor_list_local_nonprimitive;
+ if (!cJSON_IsArray(ddd_traffic_descriptor_list)){
+ ogs_error("OpenAPI_ddn_failure_sub_info_parseFromJSON() failed [ddd_traffic_descriptor_list]");
+ goto end;
+ }
+
+ ddd_traffic_descriptor_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(ddd_traffic_descriptor_list_local_nonprimitive, ddd_traffic_descriptor_list ) {
+ if (!cJSON_IsObject(ddd_traffic_descriptor_list_local_nonprimitive)) {
ogs_error("OpenAPI_ddn_failure_sub_info_parseFromJSON() failed [ddd_traffic_descriptor_list]");
goto end;
}
+ OpenAPI_ddd_traffic_descriptor_t *ddd_traffic_descriptor_listItem = OpenAPI_ddd_traffic_descriptor_parseFromJSON(ddd_traffic_descriptor_list_local_nonprimitive);
- ddd_traffic_descriptor_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(ddd_traffic_descriptor_list_local_nonprimitive, ddd_traffic_descriptor_list ) {
- if (!cJSON_IsObject(ddd_traffic_descriptor_list_local_nonprimitive)) {
- ogs_error("OpenAPI_ddn_failure_sub_info_parseFromJSON() failed [ddd_traffic_descriptor_list]");
- goto end;
- }
- OpenAPI_ddd_traffic_descriptor_t *ddd_traffic_descriptor_listItem = OpenAPI_ddd_traffic_descriptor_parseFromJSON(ddd_traffic_descriptor_list_local_nonprimitive);
-
- OpenAPI_list_add(ddd_traffic_descriptor_listList, ddd_traffic_descriptor_listItem);
- }
+ OpenAPI_list_add(ddd_traffic_descriptor_listList, ddd_traffic_descriptor_listItem);
+ }
}
ddn_failure_sub_info_local_var = OpenAPI_ddn_failure_sub_info_create (
ogs_strdup_or_assert(notify_correlation_id->valuestring),
ddd_traffic_descriptor_list ? ddd_traffic_descriptor_listList : NULL
- );
+ );
return ddn_failure_sub_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/ddn_failure_sub_info.h b/lib/sbi/openapi/model/ddn_failure_sub_info.h
index 0809b45a1..ba1711f72 100644
--- a/lib/sbi/openapi/model/ddn_failure_sub_info.h
+++ b/lib/sbi/openapi/model/ddn_failure_sub_info.h
@@ -1,7 +1,7 @@
/*
* ddn_failure_sub_info.h
*
- *
+ *
*/
#ifndef _OpenAPI_ddn_failure_sub_info_H_
@@ -27,7 +27,7 @@ typedef struct OpenAPI_ddn_failure_sub_info_s {
OpenAPI_ddn_failure_sub_info_t *OpenAPI_ddn_failure_sub_info_create(
char *notify_correlation_id,
OpenAPI_list_t *ddd_traffic_descriptor_list
- );
+);
void OpenAPI_ddn_failure_sub_info_free(OpenAPI_ddn_failure_sub_info_t *ddn_failure_sub_info);
OpenAPI_ddn_failure_sub_info_t *OpenAPI_ddn_failure_sub_info_parseFromJSON(cJSON *ddn_failure_sub_infoJSON);
cJSON *OpenAPI_ddn_failure_sub_info_convertToJSON(OpenAPI_ddn_failure_sub_info_t *ddn_failure_sub_info);
diff --git a/lib/sbi/openapi/model/ddn_failure_subs.c b/lib/sbi/openapi/model/ddn_failure_subs.c
index 808f2b241..878b7292d 100644
--- a/lib/sbi/openapi/model/ddn_failure_subs.c
+++ b/lib/sbi/openapi/model/ddn_failure_subs.c
@@ -7,7 +7,7 @@
OpenAPI_ddn_failure_subs_t *OpenAPI_ddn_failure_subs_create(
int ddn_failure_subs_ind,
OpenAPI_list_t *ddn_failure_subs_info_list
- )
+)
{
OpenAPI_ddn_failure_subs_t *ddn_failure_subs_local_var = OpenAPI_malloc(sizeof(OpenAPI_ddn_failure_subs_t));
if (!ddn_failure_subs_local_var) {
@@ -43,31 +43,31 @@ cJSON *OpenAPI_ddn_failure_subs_convertToJSON(OpenAPI_ddn_failure_subs_t *ddn_fa
item = cJSON_CreateObject();
if (ddn_failure_subs->ddn_failure_subs_ind) {
- if (cJSON_AddBoolToObject(item, "ddnFailureSubsInd", ddn_failure_subs->ddn_failure_subs_ind) == NULL) {
- ogs_error("OpenAPI_ddn_failure_subs_convertToJSON() failed [ddn_failure_subs_ind]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "ddnFailureSubsInd", ddn_failure_subs->ddn_failure_subs_ind) == NULL) {
+ ogs_error("OpenAPI_ddn_failure_subs_convertToJSON() failed [ddn_failure_subs_ind]");
+ goto end;
+ }
}
if (ddn_failure_subs->ddn_failure_subs_info_list) {
- cJSON *ddn_failure_subs_info_listList = cJSON_AddArrayToObject(item, "ddnFailureSubsInfoList");
- if (ddn_failure_subs_info_listList == NULL) {
- ogs_error("OpenAPI_ddn_failure_subs_convertToJSON() failed [ddn_failure_subs_info_list]");
- goto end;
- }
+ cJSON *ddn_failure_subs_info_listList = cJSON_AddArrayToObject(item, "ddnFailureSubsInfoList");
+ if (ddn_failure_subs_info_listList == NULL) {
+ ogs_error("OpenAPI_ddn_failure_subs_convertToJSON() failed [ddn_failure_subs_info_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *ddn_failure_subs_info_list_node;
- if (ddn_failure_subs->ddn_failure_subs_info_list) {
- OpenAPI_list_for_each(ddn_failure_subs->ddn_failure_subs_info_list, ddn_failure_subs_info_list_node) {
- cJSON *itemLocal = OpenAPI_ddn_failure_sub_info_convertToJSON(ddn_failure_subs_info_list_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_ddn_failure_subs_convertToJSON() failed [ddn_failure_subs_info_list]");
- goto end;
- }
- cJSON_AddItemToArray(ddn_failure_subs_info_listList, itemLocal);
+ OpenAPI_lnode_t *ddn_failure_subs_info_list_node;
+ if (ddn_failure_subs->ddn_failure_subs_info_list) {
+ OpenAPI_list_for_each(ddn_failure_subs->ddn_failure_subs_info_list, ddn_failure_subs_info_list_node) {
+ cJSON *itemLocal = OpenAPI_ddn_failure_sub_info_convertToJSON(ddn_failure_subs_info_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_ddn_failure_subs_convertToJSON() failed [ddn_failure_subs_info_list]");
+ goto end;
}
+ cJSON_AddItemToArray(ddn_failure_subs_info_listList, itemLocal);
}
}
+ }
end:
return item;
@@ -78,40 +78,40 @@ OpenAPI_ddn_failure_subs_t *OpenAPI_ddn_failure_subs_parseFromJSON(cJSON *ddn_fa
OpenAPI_ddn_failure_subs_t *ddn_failure_subs_local_var = NULL;
cJSON *ddn_failure_subs_ind = cJSON_GetObjectItemCaseSensitive(ddn_failure_subsJSON, "ddnFailureSubsInd");
- if (ddn_failure_subs_ind) {
- if (!cJSON_IsBool(ddn_failure_subs_ind)) {
- ogs_error("OpenAPI_ddn_failure_subs_parseFromJSON() failed [ddn_failure_subs_ind]");
- goto end;
- }
+ if (ddn_failure_subs_ind) {
+ if (!cJSON_IsBool(ddn_failure_subs_ind)) {
+ ogs_error("OpenAPI_ddn_failure_subs_parseFromJSON() failed [ddn_failure_subs_ind]");
+ goto end;
+ }
}
cJSON *ddn_failure_subs_info_list = cJSON_GetObjectItemCaseSensitive(ddn_failure_subsJSON, "ddnFailureSubsInfoList");
OpenAPI_list_t *ddn_failure_subs_info_listList;
- if (ddn_failure_subs_info_list) {
- cJSON *ddn_failure_subs_info_list_local_nonprimitive;
- if (!cJSON_IsArray(ddn_failure_subs_info_list)) {
+ if (ddn_failure_subs_info_list) {
+ cJSON *ddn_failure_subs_info_list_local_nonprimitive;
+ if (!cJSON_IsArray(ddn_failure_subs_info_list)){
+ ogs_error("OpenAPI_ddn_failure_subs_parseFromJSON() failed [ddn_failure_subs_info_list]");
+ goto end;
+ }
+
+ ddn_failure_subs_info_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(ddn_failure_subs_info_list_local_nonprimitive, ddn_failure_subs_info_list ) {
+ if (!cJSON_IsObject(ddn_failure_subs_info_list_local_nonprimitive)) {
ogs_error("OpenAPI_ddn_failure_subs_parseFromJSON() failed [ddn_failure_subs_info_list]");
goto end;
}
+ OpenAPI_ddn_failure_sub_info_t *ddn_failure_subs_info_listItem = OpenAPI_ddn_failure_sub_info_parseFromJSON(ddn_failure_subs_info_list_local_nonprimitive);
- ddn_failure_subs_info_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(ddn_failure_subs_info_list_local_nonprimitive, ddn_failure_subs_info_list ) {
- if (!cJSON_IsObject(ddn_failure_subs_info_list_local_nonprimitive)) {
- ogs_error("OpenAPI_ddn_failure_subs_parseFromJSON() failed [ddn_failure_subs_info_list]");
- goto end;
- }
- OpenAPI_ddn_failure_sub_info_t *ddn_failure_subs_info_listItem = OpenAPI_ddn_failure_sub_info_parseFromJSON(ddn_failure_subs_info_list_local_nonprimitive);
-
- OpenAPI_list_add(ddn_failure_subs_info_listList, ddn_failure_subs_info_listItem);
- }
+ OpenAPI_list_add(ddn_failure_subs_info_listList, ddn_failure_subs_info_listItem);
+ }
}
ddn_failure_subs_local_var = OpenAPI_ddn_failure_subs_create (
ddn_failure_subs_ind ? ddn_failure_subs_ind->valueint : 0,
ddn_failure_subs_info_list ? ddn_failure_subs_info_listList : NULL
- );
+ );
return ddn_failure_subs_local_var;
end:
diff --git a/lib/sbi/openapi/model/ddn_failure_subs.h b/lib/sbi/openapi/model/ddn_failure_subs.h
index aa4cfc8a6..75510a16c 100644
--- a/lib/sbi/openapi/model/ddn_failure_subs.h
+++ b/lib/sbi/openapi/model/ddn_failure_subs.h
@@ -1,7 +1,7 @@
/*
* ddn_failure_subs.h
*
- *
+ *
*/
#ifndef _OpenAPI_ddn_failure_subs_H_
@@ -27,7 +27,7 @@ typedef struct OpenAPI_ddn_failure_subs_s {
OpenAPI_ddn_failure_subs_t *OpenAPI_ddn_failure_subs_create(
int ddn_failure_subs_ind,
OpenAPI_list_t *ddn_failure_subs_info_list
- );
+);
void OpenAPI_ddn_failure_subs_free(OpenAPI_ddn_failure_subs_t *ddn_failure_subs);
OpenAPI_ddn_failure_subs_t *OpenAPI_ddn_failure_subs_parseFromJSON(cJSON *ddn_failure_subsJSON);
cJSON *OpenAPI_ddn_failure_subs_convertToJSON(OpenAPI_ddn_failure_subs_t *ddn_failure_subs);
diff --git a/lib/sbi/openapi/model/default_notification_subscription.c b/lib/sbi/openapi/model/default_notification_subscription.c
index db14bf507..57309cef0 100644
--- a/lib/sbi/openapi/model/default_notification_subscription.c
+++ b/lib/sbi/openapi/model/default_notification_subscription.c
@@ -11,7 +11,7 @@ OpenAPI_default_notification_subscription_t *OpenAPI_default_notification_subscr
OpenAPI_n2_information_class_e n2_information_class,
OpenAPI_list_t *versions,
char *binding
- )
+)
{
OpenAPI_default_notification_subscription_t *default_notification_subscription_local_var = OpenAPI_malloc(sizeof(OpenAPI_default_notification_subscription_t));
if (!default_notification_subscription_local_var) {
@@ -63,40 +63,40 @@ cJSON *OpenAPI_default_notification_subscription_convertToJSON(OpenAPI_default_n
}
if (default_notification_subscription->n1_message_class) {
- if (cJSON_AddStringToObject(item, "n1MessageClass", OpenAPI_n1_message_class_ToString(default_notification_subscription->n1_message_class)) == NULL) {
- ogs_error("OpenAPI_default_notification_subscription_convertToJSON() failed [n1_message_class]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "n1MessageClass", OpenAPI_n1_message_class_ToString(default_notification_subscription->n1_message_class)) == NULL) {
+ ogs_error("OpenAPI_default_notification_subscription_convertToJSON() failed [n1_message_class]");
+ goto end;
+ }
}
if (default_notification_subscription->n2_information_class) {
- if (cJSON_AddStringToObject(item, "n2InformationClass", OpenAPI_n2_information_class_ToString(default_notification_subscription->n2_information_class)) == NULL) {
- ogs_error("OpenAPI_default_notification_subscription_convertToJSON() failed [n2_information_class]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "n2InformationClass", OpenAPI_n2_information_class_ToString(default_notification_subscription->n2_information_class)) == NULL) {
+ ogs_error("OpenAPI_default_notification_subscription_convertToJSON() failed [n2_information_class]");
+ goto end;
+ }
}
if (default_notification_subscription->versions) {
- cJSON *versions = cJSON_AddArrayToObject(item, "versions");
- if (versions == NULL) {
- ogs_error("OpenAPI_default_notification_subscription_convertToJSON() failed [versions]");
- goto end;
- }
+ cJSON *versions = cJSON_AddArrayToObject(item, "versions");
+ if (versions == NULL) {
+ ogs_error("OpenAPI_default_notification_subscription_convertToJSON() failed [versions]");
+ goto end;
+ }
- OpenAPI_lnode_t *versions_node;
- OpenAPI_list_for_each(default_notification_subscription->versions, versions_node) {
- if (cJSON_AddStringToObject(versions, "", (char*)versions_node->data) == NULL) {
- ogs_error("OpenAPI_default_notification_subscription_convertToJSON() failed [versions]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *versions_node;
+ OpenAPI_list_for_each(default_notification_subscription->versions, versions_node) {
+ if (cJSON_AddStringToObject(versions, "", (char*)versions_node->data) == NULL) {
+ ogs_error("OpenAPI_default_notification_subscription_convertToJSON() failed [versions]");
+ goto end;
+ }
+ }
}
if (default_notification_subscription->binding) {
- if (cJSON_AddStringToObject(item, "binding", default_notification_subscription->binding) == NULL) {
- ogs_error("OpenAPI_default_notification_subscription_convertToJSON() failed [binding]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "binding", default_notification_subscription->binding) == NULL) {
+ ogs_error("OpenAPI_default_notification_subscription_convertToJSON() failed [binding]");
+ goto end;
+ }
}
end:
@@ -113,7 +113,7 @@ OpenAPI_default_notification_subscription_t *OpenAPI_default_notification_subscr
}
OpenAPI_notification_type_e notification_typeVariable;
-
+
if (!cJSON_IsString(notification_type)) {
ogs_error("OpenAPI_default_notification_subscription_parseFromJSON() failed [notification_type]");
goto end;
@@ -126,7 +126,7 @@ OpenAPI_default_notification_subscription_t *OpenAPI_default_notification_subscr
goto end;
}
-
+
if (!cJSON_IsString(callback_uri)) {
ogs_error("OpenAPI_default_notification_subscription_parseFromJSON() failed [callback_uri]");
goto end;
@@ -135,52 +135,52 @@ OpenAPI_default_notification_subscription_t *OpenAPI_default_notification_subscr
cJSON *n1_message_class = cJSON_GetObjectItemCaseSensitive(default_notification_subscriptionJSON, "n1MessageClass");
OpenAPI_n1_message_class_e n1_message_classVariable;
- if (n1_message_class) {
- if (!cJSON_IsString(n1_message_class)) {
- ogs_error("OpenAPI_default_notification_subscription_parseFromJSON() failed [n1_message_class]");
- goto end;
- }
- n1_message_classVariable = OpenAPI_n1_message_class_FromString(n1_message_class->valuestring);
+ if (n1_message_class) {
+ if (!cJSON_IsString(n1_message_class)) {
+ ogs_error("OpenAPI_default_notification_subscription_parseFromJSON() failed [n1_message_class]");
+ goto end;
+ }
+ n1_message_classVariable = OpenAPI_n1_message_class_FromString(n1_message_class->valuestring);
}
cJSON *n2_information_class = cJSON_GetObjectItemCaseSensitive(default_notification_subscriptionJSON, "n2InformationClass");
OpenAPI_n2_information_class_e n2_information_classVariable;
- if (n2_information_class) {
- if (!cJSON_IsString(n2_information_class)) {
- ogs_error("OpenAPI_default_notification_subscription_parseFromJSON() failed [n2_information_class]");
- goto end;
- }
- n2_information_classVariable = OpenAPI_n2_information_class_FromString(n2_information_class->valuestring);
+ if (n2_information_class) {
+ if (!cJSON_IsString(n2_information_class)) {
+ ogs_error("OpenAPI_default_notification_subscription_parseFromJSON() failed [n2_information_class]");
+ goto end;
+ }
+ n2_information_classVariable = OpenAPI_n2_information_class_FromString(n2_information_class->valuestring);
}
cJSON *versions = cJSON_GetObjectItemCaseSensitive(default_notification_subscriptionJSON, "versions");
OpenAPI_list_t *versionsList;
- if (versions) {
- cJSON *versions_local;
- if (!cJSON_IsArray(versions)) {
- ogs_error("OpenAPI_default_notification_subscription_parseFromJSON() failed [versions]");
- goto end;
- }
- versionsList = OpenAPI_list_create();
+ if (versions) {
+ cJSON *versions_local;
+ if (!cJSON_IsArray(versions)) {
+ ogs_error("OpenAPI_default_notification_subscription_parseFromJSON() failed [versions]");
+ goto end;
+ }
+ versionsList = OpenAPI_list_create();
- cJSON_ArrayForEach(versions_local, versions) {
- if (!cJSON_IsString(versions_local)) {
- ogs_error("OpenAPI_default_notification_subscription_parseFromJSON() failed [versions]");
- goto end;
- }
- OpenAPI_list_add(versionsList, ogs_strdup_or_assert(versions_local->valuestring));
- }
+ cJSON_ArrayForEach(versions_local, versions) {
+ if (!cJSON_IsString(versions_local)) {
+ ogs_error("OpenAPI_default_notification_subscription_parseFromJSON() failed [versions]");
+ goto end;
+ }
+ OpenAPI_list_add(versionsList , ogs_strdup_or_assert(versions_local->valuestring));
+ }
}
cJSON *binding = cJSON_GetObjectItemCaseSensitive(default_notification_subscriptionJSON, "binding");
- if (binding) {
- if (!cJSON_IsString(binding)) {
- ogs_error("OpenAPI_default_notification_subscription_parseFromJSON() failed [binding]");
- goto end;
- }
+ if (binding) {
+ if (!cJSON_IsString(binding)) {
+ ogs_error("OpenAPI_default_notification_subscription_parseFromJSON() failed [binding]");
+ goto end;
+ }
}
default_notification_subscription_local_var = OpenAPI_default_notification_subscription_create (
@@ -190,7 +190,7 @@ OpenAPI_default_notification_subscription_t *OpenAPI_default_notification_subscr
n2_information_class ? n2_information_classVariable : 0,
versions ? versionsList : NULL,
binding ? ogs_strdup_or_assert(binding->valuestring) : NULL
- );
+ );
return default_notification_subscription_local_var;
end:
diff --git a/lib/sbi/openapi/model/default_notification_subscription.h b/lib/sbi/openapi/model/default_notification_subscription.h
index 6359b7bf0..3de196bd9 100644
--- a/lib/sbi/openapi/model/default_notification_subscription.h
+++ b/lib/sbi/openapi/model/default_notification_subscription.h
@@ -37,7 +37,7 @@ OpenAPI_default_notification_subscription_t *OpenAPI_default_notification_subscr
OpenAPI_n2_information_class_e n2_information_class,
OpenAPI_list_t *versions,
char *binding
- );
+);
void OpenAPI_default_notification_subscription_free(OpenAPI_default_notification_subscription_t *default_notification_subscription);
OpenAPI_default_notification_subscription_t *OpenAPI_default_notification_subscription_parseFromJSON(cJSON *default_notification_subscriptionJSON);
cJSON *OpenAPI_default_notification_subscription_convertToJSON(OpenAPI_default_notification_subscription_t *default_notification_subscription);
diff --git a/lib/sbi/openapi/model/default_unrelated_class.c b/lib/sbi/openapi/model/default_unrelated_class.c
index 6bb2e5b28..6f539e36d 100644
--- a/lib/sbi/openapi/model/default_unrelated_class.c
+++ b/lib/sbi/openapi/model/default_unrelated_class.c
@@ -10,7 +10,7 @@ OpenAPI_default_unrelated_class_t *OpenAPI_default_unrelated_class_create(
OpenAPI_code_word_ind_e code_word_ind,
OpenAPI_valid_time_period_t *valid_time_period,
OpenAPI_list_t *code_word_list
- )
+)
{
OpenAPI_default_unrelated_class_t *default_unrelated_class_local_var = OpenAPI_malloc(sizeof(OpenAPI_default_unrelated_class_t));
if (!default_unrelated_class_local_var) {
@@ -54,66 +54,66 @@ cJSON *OpenAPI_default_unrelated_class_convertToJSON(OpenAPI_default_unrelated_c
item = cJSON_CreateObject();
if (default_unrelated_class->allowed_geographic_area) {
- cJSON *allowed_geographic_areaList = cJSON_AddArrayToObject(item, "allowedGeographicArea");
- if (allowed_geographic_areaList == NULL) {
- ogs_error("OpenAPI_default_unrelated_class_convertToJSON() failed [allowed_geographic_area]");
- goto end;
- }
+ cJSON *allowed_geographic_areaList = cJSON_AddArrayToObject(item, "allowedGeographicArea");
+ if (allowed_geographic_areaList == NULL) {
+ ogs_error("OpenAPI_default_unrelated_class_convertToJSON() failed [allowed_geographic_area]");
+ goto end;
+ }
- OpenAPI_lnode_t *allowed_geographic_area_node;
- if (default_unrelated_class->allowed_geographic_area) {
- OpenAPI_list_for_each(default_unrelated_class->allowed_geographic_area, allowed_geographic_area_node) {
- cJSON *itemLocal = OpenAPI_geographic_area_convertToJSON(allowed_geographic_area_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_default_unrelated_class_convertToJSON() failed [allowed_geographic_area]");
- goto end;
- }
- cJSON_AddItemToArray(allowed_geographic_areaList, itemLocal);
+ OpenAPI_lnode_t *allowed_geographic_area_node;
+ if (default_unrelated_class->allowed_geographic_area) {
+ OpenAPI_list_for_each(default_unrelated_class->allowed_geographic_area, allowed_geographic_area_node) {
+ cJSON *itemLocal = OpenAPI_geographic_area_convertToJSON(allowed_geographic_area_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_default_unrelated_class_convertToJSON() failed [allowed_geographic_area]");
+ goto end;
}
+ cJSON_AddItemToArray(allowed_geographic_areaList, itemLocal);
}
}
+ }
if (default_unrelated_class->privacy_check_related_action) {
- if (cJSON_AddStringToObject(item, "privacyCheckRelatedAction", OpenAPI_privacy_check_related_action_ToString(default_unrelated_class->privacy_check_related_action)) == NULL) {
- ogs_error("OpenAPI_default_unrelated_class_convertToJSON() failed [privacy_check_related_action]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "privacyCheckRelatedAction", OpenAPI_privacy_check_related_action_ToString(default_unrelated_class->privacy_check_related_action)) == NULL) {
+ ogs_error("OpenAPI_default_unrelated_class_convertToJSON() failed [privacy_check_related_action]");
+ goto end;
+ }
}
if (default_unrelated_class->code_word_ind) {
- if (cJSON_AddStringToObject(item, "codeWordInd", OpenAPI_code_word_ind_ToString(default_unrelated_class->code_word_ind)) == NULL) {
- ogs_error("OpenAPI_default_unrelated_class_convertToJSON() failed [code_word_ind]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "codeWordInd", OpenAPI_code_word_ind_ToString(default_unrelated_class->code_word_ind)) == NULL) {
+ ogs_error("OpenAPI_default_unrelated_class_convertToJSON() failed [code_word_ind]");
+ goto end;
+ }
}
if (default_unrelated_class->valid_time_period) {
- cJSON *valid_time_period_local_JSON = OpenAPI_valid_time_period_convertToJSON(default_unrelated_class->valid_time_period);
- if (valid_time_period_local_JSON == NULL) {
- ogs_error("OpenAPI_default_unrelated_class_convertToJSON() failed [valid_time_period]");
- goto end;
- }
- cJSON_AddItemToObject(item, "validTimePeriod", valid_time_period_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_default_unrelated_class_convertToJSON() failed [valid_time_period]");
- goto end;
- }
+ cJSON *valid_time_period_local_JSON = OpenAPI_valid_time_period_convertToJSON(default_unrelated_class->valid_time_period);
+ if (valid_time_period_local_JSON == NULL) {
+ ogs_error("OpenAPI_default_unrelated_class_convertToJSON() failed [valid_time_period]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "validTimePeriod", valid_time_period_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_default_unrelated_class_convertToJSON() failed [valid_time_period]");
+ goto end;
+ }
}
if (default_unrelated_class->code_word_list) {
- cJSON *code_word_list = cJSON_AddArrayToObject(item, "codeWordList");
- if (code_word_list == NULL) {
- ogs_error("OpenAPI_default_unrelated_class_convertToJSON() failed [code_word_list]");
- goto end;
- }
+ cJSON *code_word_list = cJSON_AddArrayToObject(item, "codeWordList");
+ if (code_word_list == NULL) {
+ ogs_error("OpenAPI_default_unrelated_class_convertToJSON() failed [code_word_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *code_word_list_node;
- OpenAPI_list_for_each(default_unrelated_class->code_word_list, code_word_list_node) {
- if (cJSON_AddStringToObject(code_word_list, "", (char*)code_word_list_node->data) == NULL) {
- ogs_error("OpenAPI_default_unrelated_class_convertToJSON() failed [code_word_list]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *code_word_list_node;
+ OpenAPI_list_for_each(default_unrelated_class->code_word_list, code_word_list_node) {
+ if (cJSON_AddStringToObject(code_word_list, "", (char*)code_word_list_node->data) == NULL) {
+ ogs_error("OpenAPI_default_unrelated_class_convertToJSON() failed [code_word_list]");
+ goto end;
+ }
+ }
}
end:
@@ -126,73 +126,73 @@ OpenAPI_default_unrelated_class_t *OpenAPI_default_unrelated_class_parseFromJSON
cJSON *allowed_geographic_area = cJSON_GetObjectItemCaseSensitive(default_unrelated_classJSON, "allowedGeographicArea");
OpenAPI_list_t *allowed_geographic_areaList;
- if (allowed_geographic_area) {
- cJSON *allowed_geographic_area_local_nonprimitive;
- if (!cJSON_IsArray(allowed_geographic_area)) {
+ if (allowed_geographic_area) {
+ cJSON *allowed_geographic_area_local_nonprimitive;
+ if (!cJSON_IsArray(allowed_geographic_area)){
+ ogs_error("OpenAPI_default_unrelated_class_parseFromJSON() failed [allowed_geographic_area]");
+ goto end;
+ }
+
+ allowed_geographic_areaList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(allowed_geographic_area_local_nonprimitive, allowed_geographic_area ) {
+ if (!cJSON_IsObject(allowed_geographic_area_local_nonprimitive)) {
ogs_error("OpenAPI_default_unrelated_class_parseFromJSON() failed [allowed_geographic_area]");
goto end;
}
+ OpenAPI_geographic_area_t *allowed_geographic_areaItem = OpenAPI_geographic_area_parseFromJSON(allowed_geographic_area_local_nonprimitive);
- allowed_geographic_areaList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(allowed_geographic_area_local_nonprimitive, allowed_geographic_area ) {
- if (!cJSON_IsObject(allowed_geographic_area_local_nonprimitive)) {
- ogs_error("OpenAPI_default_unrelated_class_parseFromJSON() failed [allowed_geographic_area]");
- goto end;
- }
- OpenAPI_geographic_area_t *allowed_geographic_areaItem = OpenAPI_geographic_area_parseFromJSON(allowed_geographic_area_local_nonprimitive);
-
- OpenAPI_list_add(allowed_geographic_areaList, allowed_geographic_areaItem);
- }
+ OpenAPI_list_add(allowed_geographic_areaList, allowed_geographic_areaItem);
+ }
}
cJSON *privacy_check_related_action = cJSON_GetObjectItemCaseSensitive(default_unrelated_classJSON, "privacyCheckRelatedAction");
OpenAPI_privacy_check_related_action_e privacy_check_related_actionVariable;
- if (privacy_check_related_action) {
- if (!cJSON_IsString(privacy_check_related_action)) {
- ogs_error("OpenAPI_default_unrelated_class_parseFromJSON() failed [privacy_check_related_action]");
- goto end;
- }
- privacy_check_related_actionVariable = OpenAPI_privacy_check_related_action_FromString(privacy_check_related_action->valuestring);
+ if (privacy_check_related_action) {
+ if (!cJSON_IsString(privacy_check_related_action)) {
+ ogs_error("OpenAPI_default_unrelated_class_parseFromJSON() failed [privacy_check_related_action]");
+ goto end;
+ }
+ privacy_check_related_actionVariable = OpenAPI_privacy_check_related_action_FromString(privacy_check_related_action->valuestring);
}
cJSON *code_word_ind = cJSON_GetObjectItemCaseSensitive(default_unrelated_classJSON, "codeWordInd");
OpenAPI_code_word_ind_e code_word_indVariable;
- if (code_word_ind) {
- if (!cJSON_IsString(code_word_ind)) {
- ogs_error("OpenAPI_default_unrelated_class_parseFromJSON() failed [code_word_ind]");
- goto end;
- }
- code_word_indVariable = OpenAPI_code_word_ind_FromString(code_word_ind->valuestring);
+ if (code_word_ind) {
+ if (!cJSON_IsString(code_word_ind)) {
+ ogs_error("OpenAPI_default_unrelated_class_parseFromJSON() failed [code_word_ind]");
+ goto end;
+ }
+ code_word_indVariable = OpenAPI_code_word_ind_FromString(code_word_ind->valuestring);
}
cJSON *valid_time_period = cJSON_GetObjectItemCaseSensitive(default_unrelated_classJSON, "validTimePeriod");
OpenAPI_valid_time_period_t *valid_time_period_local_nonprim = NULL;
- if (valid_time_period) {
- valid_time_period_local_nonprim = OpenAPI_valid_time_period_parseFromJSON(valid_time_period);
+ if (valid_time_period) {
+ valid_time_period_local_nonprim = OpenAPI_valid_time_period_parseFromJSON(valid_time_period);
}
cJSON *code_word_list = cJSON_GetObjectItemCaseSensitive(default_unrelated_classJSON, "codeWordList");
OpenAPI_list_t *code_word_listList;
- if (code_word_list) {
- cJSON *code_word_list_local;
- if (!cJSON_IsArray(code_word_list)) {
- ogs_error("OpenAPI_default_unrelated_class_parseFromJSON() failed [code_word_list]");
- goto end;
- }
- code_word_listList = OpenAPI_list_create();
+ if (code_word_list) {
+ cJSON *code_word_list_local;
+ if (!cJSON_IsArray(code_word_list)) {
+ ogs_error("OpenAPI_default_unrelated_class_parseFromJSON() failed [code_word_list]");
+ goto end;
+ }
+ code_word_listList = OpenAPI_list_create();
- cJSON_ArrayForEach(code_word_list_local, code_word_list) {
- if (!cJSON_IsString(code_word_list_local)) {
- ogs_error("OpenAPI_default_unrelated_class_parseFromJSON() failed [code_word_list]");
- goto end;
- }
- OpenAPI_list_add(code_word_listList, ogs_strdup_or_assert(code_word_list_local->valuestring));
- }
+ cJSON_ArrayForEach(code_word_list_local, code_word_list) {
+ if (!cJSON_IsString(code_word_list_local)) {
+ ogs_error("OpenAPI_default_unrelated_class_parseFromJSON() failed [code_word_list]");
+ goto end;
+ }
+ OpenAPI_list_add(code_word_listList , ogs_strdup_or_assert(code_word_list_local->valuestring));
+ }
}
default_unrelated_class_local_var = OpenAPI_default_unrelated_class_create (
@@ -201,7 +201,7 @@ OpenAPI_default_unrelated_class_t *OpenAPI_default_unrelated_class_parseFromJSON
code_word_ind ? code_word_indVariable : 0,
valid_time_period ? valid_time_period_local_nonprim : NULL,
code_word_list ? code_word_listList : NULL
- );
+ );
return default_unrelated_class_local_var;
end:
diff --git a/lib/sbi/openapi/model/default_unrelated_class.h b/lib/sbi/openapi/model/default_unrelated_class.h
index 54c401bbb..2c582f3a7 100644
--- a/lib/sbi/openapi/model/default_unrelated_class.h
+++ b/lib/sbi/openapi/model/default_unrelated_class.h
@@ -1,7 +1,7 @@
/*
* default_unrelated_class.h
*
- *
+ *
*/
#ifndef _OpenAPI_default_unrelated_class_H_
@@ -36,7 +36,7 @@ OpenAPI_default_unrelated_class_t *OpenAPI_default_unrelated_class_create(
OpenAPI_code_word_ind_e code_word_ind,
OpenAPI_valid_time_period_t *valid_time_period,
OpenAPI_list_t *code_word_list
- );
+);
void OpenAPI_default_unrelated_class_free(OpenAPI_default_unrelated_class_t *default_unrelated_class);
OpenAPI_default_unrelated_class_t *OpenAPI_default_unrelated_class_parseFromJSON(cJSON *default_unrelated_classJSON);
cJSON *OpenAPI_default_unrelated_class_convertToJSON(OpenAPI_default_unrelated_class_t *default_unrelated_class);
diff --git a/lib/sbi/openapi/model/default_unrelated_class_1.c b/lib/sbi/openapi/model/default_unrelated_class_1.c
new file mode 100644
index 000000000..a42dcfa57
--- /dev/null
+++ b/lib/sbi/openapi/model/default_unrelated_class_1.c
@@ -0,0 +1,244 @@
+
+#include
+#include
+#include
+#include "default_unrelated_class_1.h"
+
+OpenAPI_default_unrelated_class_1_t *OpenAPI_default_unrelated_class_1_create(
+ OpenAPI_list_t *allowed_geographic_area,
+ OpenAPI_privacy_check_related_action_e privacy_check_related_action,
+ OpenAPI_code_word_ind_e code_word_ind,
+ OpenAPI_valid_time_period_1_t *valid_time_period,
+ OpenAPI_list_t *code_word_list
+)
+{
+ OpenAPI_default_unrelated_class_1_t *default_unrelated_class_1_local_var = OpenAPI_malloc(sizeof(OpenAPI_default_unrelated_class_1_t));
+ if (!default_unrelated_class_1_local_var) {
+ return NULL;
+ }
+ default_unrelated_class_1_local_var->allowed_geographic_area = allowed_geographic_area;
+ default_unrelated_class_1_local_var->privacy_check_related_action = privacy_check_related_action;
+ default_unrelated_class_1_local_var->code_word_ind = code_word_ind;
+ default_unrelated_class_1_local_var->valid_time_period = valid_time_period;
+ default_unrelated_class_1_local_var->code_word_list = code_word_list;
+
+ return default_unrelated_class_1_local_var;
+}
+
+void OpenAPI_default_unrelated_class_1_free(OpenAPI_default_unrelated_class_1_t *default_unrelated_class_1)
+{
+ if (NULL == default_unrelated_class_1) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ OpenAPI_list_for_each(default_unrelated_class_1->allowed_geographic_area, node) {
+ OpenAPI_geographic_area_free(node->data);
+ }
+ OpenAPI_list_free(default_unrelated_class_1->allowed_geographic_area);
+ OpenAPI_valid_time_period_1_free(default_unrelated_class_1->valid_time_period);
+ OpenAPI_list_for_each(default_unrelated_class_1->code_word_list, node) {
+ ogs_free(node->data);
+ }
+ OpenAPI_list_free(default_unrelated_class_1->code_word_list);
+ ogs_free(default_unrelated_class_1);
+}
+
+cJSON *OpenAPI_default_unrelated_class_1_convertToJSON(OpenAPI_default_unrelated_class_1_t *default_unrelated_class_1)
+{
+ cJSON *item = NULL;
+
+ if (default_unrelated_class_1 == NULL) {
+ ogs_error("OpenAPI_default_unrelated_class_1_convertToJSON() failed [DefaultUnrelatedClass_1]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (default_unrelated_class_1->allowed_geographic_area) {
+ cJSON *allowed_geographic_areaList = cJSON_AddArrayToObject(item, "allowedGeographicArea");
+ if (allowed_geographic_areaList == NULL) {
+ ogs_error("OpenAPI_default_unrelated_class_1_convertToJSON() failed [allowed_geographic_area]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *allowed_geographic_area_node;
+ if (default_unrelated_class_1->allowed_geographic_area) {
+ OpenAPI_list_for_each(default_unrelated_class_1->allowed_geographic_area, allowed_geographic_area_node) {
+ cJSON *itemLocal = OpenAPI_geographic_area_convertToJSON(allowed_geographic_area_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_default_unrelated_class_1_convertToJSON() failed [allowed_geographic_area]");
+ goto end;
+ }
+ cJSON_AddItemToArray(allowed_geographic_areaList, itemLocal);
+ }
+ }
+ }
+
+ if (default_unrelated_class_1->privacy_check_related_action) {
+ if (cJSON_AddStringToObject(item, "privacyCheckRelatedAction", OpenAPI_privacy_check_related_action_ToString(default_unrelated_class_1->privacy_check_related_action)) == NULL) {
+ ogs_error("OpenAPI_default_unrelated_class_1_convertToJSON() failed [privacy_check_related_action]");
+ goto end;
+ }
+ }
+
+ if (default_unrelated_class_1->code_word_ind) {
+ if (cJSON_AddStringToObject(item, "codeWordInd", OpenAPI_code_word_ind_ToString(default_unrelated_class_1->code_word_ind)) == NULL) {
+ ogs_error("OpenAPI_default_unrelated_class_1_convertToJSON() failed [code_word_ind]");
+ goto end;
+ }
+ }
+
+ if (default_unrelated_class_1->valid_time_period) {
+ cJSON *valid_time_period_local_JSON = OpenAPI_valid_time_period_1_convertToJSON(default_unrelated_class_1->valid_time_period);
+ if (valid_time_period_local_JSON == NULL) {
+ ogs_error("OpenAPI_default_unrelated_class_1_convertToJSON() failed [valid_time_period]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "validTimePeriod", valid_time_period_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_default_unrelated_class_1_convertToJSON() failed [valid_time_period]");
+ goto end;
+ }
+ }
+
+ if (default_unrelated_class_1->code_word_list) {
+ cJSON *code_word_list = cJSON_AddArrayToObject(item, "codeWordList");
+ if (code_word_list == NULL) {
+ ogs_error("OpenAPI_default_unrelated_class_1_convertToJSON() failed [code_word_list]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *code_word_list_node;
+ OpenAPI_list_for_each(default_unrelated_class_1->code_word_list, code_word_list_node) {
+ if (cJSON_AddStringToObject(code_word_list, "", (char*)code_word_list_node->data) == NULL) {
+ ogs_error("OpenAPI_default_unrelated_class_1_convertToJSON() failed [code_word_list]");
+ goto end;
+ }
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_default_unrelated_class_1_t *OpenAPI_default_unrelated_class_1_parseFromJSON(cJSON *default_unrelated_class_1JSON)
+{
+ OpenAPI_default_unrelated_class_1_t *default_unrelated_class_1_local_var = NULL;
+ cJSON *allowed_geographic_area = cJSON_GetObjectItemCaseSensitive(default_unrelated_class_1JSON, "allowedGeographicArea");
+
+ OpenAPI_list_t *allowed_geographic_areaList;
+ if (allowed_geographic_area) {
+ cJSON *allowed_geographic_area_local_nonprimitive;
+ if (!cJSON_IsArray(allowed_geographic_area)){
+ ogs_error("OpenAPI_default_unrelated_class_1_parseFromJSON() failed [allowed_geographic_area]");
+ goto end;
+ }
+
+ allowed_geographic_areaList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(allowed_geographic_area_local_nonprimitive, allowed_geographic_area ) {
+ if (!cJSON_IsObject(allowed_geographic_area_local_nonprimitive)) {
+ ogs_error("OpenAPI_default_unrelated_class_1_parseFromJSON() failed [allowed_geographic_area]");
+ goto end;
+ }
+ OpenAPI_geographic_area_t *allowed_geographic_areaItem = OpenAPI_geographic_area_parseFromJSON(allowed_geographic_area_local_nonprimitive);
+
+ OpenAPI_list_add(allowed_geographic_areaList, allowed_geographic_areaItem);
+ }
+ }
+
+ cJSON *privacy_check_related_action = cJSON_GetObjectItemCaseSensitive(default_unrelated_class_1JSON, "privacyCheckRelatedAction");
+
+ OpenAPI_privacy_check_related_action_e privacy_check_related_actionVariable;
+ if (privacy_check_related_action) {
+ if (!cJSON_IsString(privacy_check_related_action)) {
+ ogs_error("OpenAPI_default_unrelated_class_1_parseFromJSON() failed [privacy_check_related_action]");
+ goto end;
+ }
+ privacy_check_related_actionVariable = OpenAPI_privacy_check_related_action_FromString(privacy_check_related_action->valuestring);
+ }
+
+ cJSON *code_word_ind = cJSON_GetObjectItemCaseSensitive(default_unrelated_class_1JSON, "codeWordInd");
+
+ OpenAPI_code_word_ind_e code_word_indVariable;
+ if (code_word_ind) {
+ if (!cJSON_IsString(code_word_ind)) {
+ ogs_error("OpenAPI_default_unrelated_class_1_parseFromJSON() failed [code_word_ind]");
+ goto end;
+ }
+ code_word_indVariable = OpenAPI_code_word_ind_FromString(code_word_ind->valuestring);
+ }
+
+ cJSON *valid_time_period = cJSON_GetObjectItemCaseSensitive(default_unrelated_class_1JSON, "validTimePeriod");
+
+ OpenAPI_valid_time_period_1_t *valid_time_period_local_nonprim = NULL;
+ if (valid_time_period) {
+ valid_time_period_local_nonprim = OpenAPI_valid_time_period_1_parseFromJSON(valid_time_period);
+ }
+
+ cJSON *code_word_list = cJSON_GetObjectItemCaseSensitive(default_unrelated_class_1JSON, "codeWordList");
+
+ OpenAPI_list_t *code_word_listList;
+ if (code_word_list) {
+ cJSON *code_word_list_local;
+ if (!cJSON_IsArray(code_word_list)) {
+ ogs_error("OpenAPI_default_unrelated_class_1_parseFromJSON() failed [code_word_list]");
+ goto end;
+ }
+ code_word_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(code_word_list_local, code_word_list) {
+ if (!cJSON_IsString(code_word_list_local)) {
+ ogs_error("OpenAPI_default_unrelated_class_1_parseFromJSON() failed [code_word_list]");
+ goto end;
+ }
+ OpenAPI_list_add(code_word_listList , ogs_strdup_or_assert(code_word_list_local->valuestring));
+ }
+ }
+
+ default_unrelated_class_1_local_var = OpenAPI_default_unrelated_class_1_create (
+ allowed_geographic_area ? allowed_geographic_areaList : NULL,
+ privacy_check_related_action ? privacy_check_related_actionVariable : 0,
+ code_word_ind ? code_word_indVariable : 0,
+ valid_time_period ? valid_time_period_local_nonprim : NULL,
+ code_word_list ? code_word_listList : NULL
+ );
+
+ return default_unrelated_class_1_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_default_unrelated_class_1_t *OpenAPI_default_unrelated_class_1_copy(OpenAPI_default_unrelated_class_1_t *dst, OpenAPI_default_unrelated_class_1_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_default_unrelated_class_1_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_default_unrelated_class_1_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_default_unrelated_class_1_free(dst);
+ dst = OpenAPI_default_unrelated_class_1_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/default_unrelated_class_1.h b/lib/sbi/openapi/model/default_unrelated_class_1.h
new file mode 100644
index 000000000..1374741de
--- /dev/null
+++ b/lib/sbi/openapi/model/default_unrelated_class_1.h
@@ -0,0 +1,50 @@
+/*
+ * default_unrelated_class_1.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_default_unrelated_class_1_H_
+#define _OpenAPI_default_unrelated_class_1_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+#include "code_word_ind.h"
+#include "geographic_area.h"
+#include "privacy_check_related_action.h"
+#include "valid_time_period_1.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_default_unrelated_class_1_s OpenAPI_default_unrelated_class_1_t;
+typedef struct OpenAPI_default_unrelated_class_1_s {
+ OpenAPI_list_t *allowed_geographic_area;
+ OpenAPI_privacy_check_related_action_e privacy_check_related_action;
+ OpenAPI_code_word_ind_e code_word_ind;
+ struct OpenAPI_valid_time_period_1_s *valid_time_period;
+ OpenAPI_list_t *code_word_list;
+} OpenAPI_default_unrelated_class_1_t;
+
+OpenAPI_default_unrelated_class_1_t *OpenAPI_default_unrelated_class_1_create(
+ OpenAPI_list_t *allowed_geographic_area,
+ OpenAPI_privacy_check_related_action_e privacy_check_related_action,
+ OpenAPI_code_word_ind_e code_word_ind,
+ OpenAPI_valid_time_period_1_t *valid_time_period,
+ OpenAPI_list_t *code_word_list
+);
+void OpenAPI_default_unrelated_class_1_free(OpenAPI_default_unrelated_class_1_t *default_unrelated_class_1);
+OpenAPI_default_unrelated_class_1_t *OpenAPI_default_unrelated_class_1_parseFromJSON(cJSON *default_unrelated_class_1JSON);
+cJSON *OpenAPI_default_unrelated_class_1_convertToJSON(OpenAPI_default_unrelated_class_1_t *default_unrelated_class_1);
+OpenAPI_default_unrelated_class_1_t *OpenAPI_default_unrelated_class_1_copy(OpenAPI_default_unrelated_class_1_t *dst, OpenAPI_default_unrelated_class_1_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_default_unrelated_class_1_H_ */
+
diff --git a/lib/sbi/openapi/model/deregistration_data.c b/lib/sbi/openapi/model/deregistration_data.c
index 781d2839e..1f98a171d 100644
--- a/lib/sbi/openapi/model/deregistration_data.c
+++ b/lib/sbi/openapi/model/deregistration_data.c
@@ -9,7 +9,7 @@ OpenAPI_deregistration_data_t *OpenAPI_deregistration_data_create(
OpenAPI_access_type_e access_type,
int pdu_session_id,
char *new_smf_instance_id
- )
+)
{
OpenAPI_deregistration_data_t *deregistration_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_deregistration_data_t));
if (!deregistration_data_local_var) {
@@ -49,24 +49,24 @@ cJSON *OpenAPI_deregistration_data_convertToJSON(OpenAPI_deregistration_data_t *
}
if (deregistration_data->access_type) {
- if (cJSON_AddStringToObject(item, "accessType", OpenAPI_access_type_ToString(deregistration_data->access_type)) == NULL) {
- ogs_error("OpenAPI_deregistration_data_convertToJSON() failed [access_type]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "accessType", OpenAPI_access_type_ToString(deregistration_data->access_type)) == NULL) {
+ ogs_error("OpenAPI_deregistration_data_convertToJSON() failed [access_type]");
+ goto end;
+ }
}
if (deregistration_data->pdu_session_id) {
- if (cJSON_AddNumberToObject(item, "pduSessionId", deregistration_data->pdu_session_id) == NULL) {
- ogs_error("OpenAPI_deregistration_data_convertToJSON() failed [pdu_session_id]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "pduSessionId", deregistration_data->pdu_session_id) == NULL) {
+ ogs_error("OpenAPI_deregistration_data_convertToJSON() failed [pdu_session_id]");
+ goto end;
+ }
}
if (deregistration_data->new_smf_instance_id) {
- if (cJSON_AddStringToObject(item, "newSmfInstanceId", deregistration_data->new_smf_instance_id) == NULL) {
- ogs_error("OpenAPI_deregistration_data_convertToJSON() failed [new_smf_instance_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "newSmfInstanceId", deregistration_data->new_smf_instance_id) == NULL) {
+ ogs_error("OpenAPI_deregistration_data_convertToJSON() failed [new_smf_instance_id]");
+ goto end;
+ }
}
end:
@@ -83,7 +83,7 @@ OpenAPI_deregistration_data_t *OpenAPI_deregistration_data_parseFromJSON(cJSON *
}
OpenAPI_deregistration_reason_e dereg_reasonVariable;
-
+
if (!cJSON_IsString(dereg_reason)) {
ogs_error("OpenAPI_deregistration_data_parseFromJSON() failed [dereg_reason]");
goto end;
@@ -93,30 +93,30 @@ OpenAPI_deregistration_data_t *OpenAPI_deregistration_data_parseFromJSON(cJSON *
cJSON *access_type = cJSON_GetObjectItemCaseSensitive(deregistration_dataJSON, "accessType");
OpenAPI_access_type_e access_typeVariable;
- if (access_type) {
- if (!cJSON_IsString(access_type)) {
- ogs_error("OpenAPI_deregistration_data_parseFromJSON() failed [access_type]");
- goto end;
- }
- access_typeVariable = OpenAPI_access_type_FromString(access_type->valuestring);
+ if (access_type) {
+ if (!cJSON_IsString(access_type)) {
+ ogs_error("OpenAPI_deregistration_data_parseFromJSON() failed [access_type]");
+ goto end;
+ }
+ access_typeVariable = OpenAPI_access_type_FromString(access_type->valuestring);
}
cJSON *pdu_session_id = cJSON_GetObjectItemCaseSensitive(deregistration_dataJSON, "pduSessionId");
- if (pdu_session_id) {
- if (!cJSON_IsNumber(pdu_session_id)) {
- ogs_error("OpenAPI_deregistration_data_parseFromJSON() failed [pdu_session_id]");
- goto end;
- }
+ if (pdu_session_id) {
+ if (!cJSON_IsNumber(pdu_session_id)) {
+ ogs_error("OpenAPI_deregistration_data_parseFromJSON() failed [pdu_session_id]");
+ goto end;
+ }
}
cJSON *new_smf_instance_id = cJSON_GetObjectItemCaseSensitive(deregistration_dataJSON, "newSmfInstanceId");
- if (new_smf_instance_id) {
- if (!cJSON_IsString(new_smf_instance_id)) {
- ogs_error("OpenAPI_deregistration_data_parseFromJSON() failed [new_smf_instance_id]");
- goto end;
- }
+ if (new_smf_instance_id) {
+ if (!cJSON_IsString(new_smf_instance_id)) {
+ ogs_error("OpenAPI_deregistration_data_parseFromJSON() failed [new_smf_instance_id]");
+ goto end;
+ }
}
deregistration_data_local_var = OpenAPI_deregistration_data_create (
@@ -124,7 +124,7 @@ OpenAPI_deregistration_data_t *OpenAPI_deregistration_data_parseFromJSON(cJSON *
access_type ? access_typeVariable : 0,
pdu_session_id ? pdu_session_id->valuedouble : 0,
new_smf_instance_id ? ogs_strdup_or_assert(new_smf_instance_id->valuestring) : NULL
- );
+ );
return deregistration_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/deregistration_data.h b/lib/sbi/openapi/model/deregistration_data.h
index dfac711a3..b84412b6a 100644
--- a/lib/sbi/openapi/model/deregistration_data.h
+++ b/lib/sbi/openapi/model/deregistration_data.h
@@ -1,7 +1,7 @@
/*
* deregistration_data.h
*
- *
+ *
*/
#ifndef _OpenAPI_deregistration_data_H_
@@ -32,7 +32,7 @@ OpenAPI_deregistration_data_t *OpenAPI_deregistration_data_create(
OpenAPI_access_type_e access_type,
int pdu_session_id,
char *new_smf_instance_id
- );
+);
void OpenAPI_deregistration_data_free(OpenAPI_deregistration_data_t *deregistration_data);
OpenAPI_deregistration_data_t *OpenAPI_deregistration_data_parseFromJSON(cJSON *deregistration_dataJSON);
cJSON *OpenAPI_deregistration_data_convertToJSON(OpenAPI_deregistration_data_t *deregistration_data);
diff --git a/lib/sbi/openapi/model/deregistration_info.c b/lib/sbi/openapi/model/deregistration_info.c
new file mode 100644
index 000000000..6257c44ae
--- /dev/null
+++ b/lib/sbi/openapi/model/deregistration_info.c
@@ -0,0 +1,126 @@
+
+#include
+#include
+#include
+#include "deregistration_info.h"
+
+OpenAPI_deregistration_info_t *OpenAPI_deregistration_info_create(
+ char *supi,
+ char *supported_features
+)
+{
+ OpenAPI_deregistration_info_t *deregistration_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_deregistration_info_t));
+ if (!deregistration_info_local_var) {
+ return NULL;
+ }
+ deregistration_info_local_var->supi = supi;
+ deregistration_info_local_var->supported_features = supported_features;
+
+ return deregistration_info_local_var;
+}
+
+void OpenAPI_deregistration_info_free(OpenAPI_deregistration_info_t *deregistration_info)
+{
+ if (NULL == deregistration_info) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ ogs_free(deregistration_info->supi);
+ ogs_free(deregistration_info->supported_features);
+ ogs_free(deregistration_info);
+}
+
+cJSON *OpenAPI_deregistration_info_convertToJSON(OpenAPI_deregistration_info_t *deregistration_info)
+{
+ cJSON *item = NULL;
+
+ if (deregistration_info == NULL) {
+ ogs_error("OpenAPI_deregistration_info_convertToJSON() failed [DeregistrationInfo]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (cJSON_AddStringToObject(item, "supi", deregistration_info->supi) == NULL) {
+ ogs_error("OpenAPI_deregistration_info_convertToJSON() failed [supi]");
+ goto end;
+ }
+
+ if (deregistration_info->supported_features) {
+ if (cJSON_AddStringToObject(item, "supportedFeatures", deregistration_info->supported_features) == NULL) {
+ ogs_error("OpenAPI_deregistration_info_convertToJSON() failed [supported_features]");
+ goto end;
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_deregistration_info_t *OpenAPI_deregistration_info_parseFromJSON(cJSON *deregistration_infoJSON)
+{
+ OpenAPI_deregistration_info_t *deregistration_info_local_var = NULL;
+ cJSON *supi = cJSON_GetObjectItemCaseSensitive(deregistration_infoJSON, "supi");
+ if (!supi) {
+ ogs_error("OpenAPI_deregistration_info_parseFromJSON() failed [supi]");
+ goto end;
+ }
+
+
+ if (!cJSON_IsString(supi)) {
+ ogs_error("OpenAPI_deregistration_info_parseFromJSON() failed [supi]");
+ goto end;
+ }
+
+ cJSON *supported_features = cJSON_GetObjectItemCaseSensitive(deregistration_infoJSON, "supportedFeatures");
+
+ if (supported_features) {
+ if (!cJSON_IsString(supported_features)) {
+ ogs_error("OpenAPI_deregistration_info_parseFromJSON() failed [supported_features]");
+ goto end;
+ }
+ }
+
+ deregistration_info_local_var = OpenAPI_deregistration_info_create (
+ ogs_strdup_or_assert(supi->valuestring),
+ supported_features ? ogs_strdup_or_assert(supported_features->valuestring) : NULL
+ );
+
+ return deregistration_info_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_deregistration_info_t *OpenAPI_deregistration_info_copy(OpenAPI_deregistration_info_t *dst, OpenAPI_deregistration_info_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_deregistration_info_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_deregistration_info_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_deregistration_info_free(dst);
+ dst = OpenAPI_deregistration_info_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/deregistration_info.h b/lib/sbi/openapi/model/deregistration_info.h
new file mode 100644
index 000000000..87bd4b03c
--- /dev/null
+++ b/lib/sbi/openapi/model/deregistration_info.h
@@ -0,0 +1,40 @@
+/*
+ * deregistration_info.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_deregistration_info_H_
+#define _OpenAPI_deregistration_info_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_deregistration_info_s OpenAPI_deregistration_info_t;
+typedef struct OpenAPI_deregistration_info_s {
+ char *supi;
+ char *supported_features;
+} OpenAPI_deregistration_info_t;
+
+OpenAPI_deregistration_info_t *OpenAPI_deregistration_info_create(
+ char *supi,
+ char *supported_features
+);
+void OpenAPI_deregistration_info_free(OpenAPI_deregistration_info_t *deregistration_info);
+OpenAPI_deregistration_info_t *OpenAPI_deregistration_info_parseFromJSON(cJSON *deregistration_infoJSON);
+cJSON *OpenAPI_deregistration_info_convertToJSON(OpenAPI_deregistration_info_t *deregistration_info);
+OpenAPI_deregistration_info_t *OpenAPI_deregistration_info_copy(OpenAPI_deregistration_info_t *dst, OpenAPI_deregistration_info_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_deregistration_info_H_ */
+
diff --git a/lib/sbi/openapi/model/deregistration_reason.h b/lib/sbi/openapi/model/deregistration_reason.h
index 150fc15ce..cf2ed170b 100644
--- a/lib/sbi/openapi/model/deregistration_reason.h
+++ b/lib/sbi/openapi/model/deregistration_reason.h
@@ -1,7 +1,7 @@
/*
* deregistration_reason.h
*
- *
+ *
*/
#ifndef _OpenAPI_deregistration_reason_H_
diff --git a/lib/sbi/openapi/model/dl_data_delivery_status.h b/lib/sbi/openapi/model/dl_data_delivery_status.h
index dff3f7def..ebd440b17 100644
--- a/lib/sbi/openapi/model/dl_data_delivery_status.h
+++ b/lib/sbi/openapi/model/dl_data_delivery_status.h
@@ -1,7 +1,7 @@
/*
* dl_data_delivery_status.h
*
- *
+ *
*/
#ifndef _OpenAPI_dl_data_delivery_status_H_
diff --git a/lib/sbi/openapi/model/dnai_change_type.h b/lib/sbi/openapi/model/dnai_change_type.h
index a4d8b3a87..460e04f5d 100644
--- a/lib/sbi/openapi/model/dnai_change_type.h
+++ b/lib/sbi/openapi/model/dnai_change_type.h
@@ -1,7 +1,7 @@
/*
* dnai_change_type.h
*
- *
+ *
*/
#ifndef _OpenAPI_dnai_change_type_H_
diff --git a/lib/sbi/openapi/model/dnai_information.c b/lib/sbi/openapi/model/dnai_information.c
index 84cd94f6a..fd5053d28 100644
--- a/lib/sbi/openapi/model/dnai_information.c
+++ b/lib/sbi/openapi/model/dnai_information.c
@@ -8,7 +8,7 @@ OpenAPI_dnai_information_t *OpenAPI_dnai_information_create(
char *dnai,
int no_dnai_change_ind,
int no_local_psa_change_ind
- )
+)
{
OpenAPI_dnai_information_t *dnai_information_local_var = OpenAPI_malloc(sizeof(OpenAPI_dnai_information_t));
if (!dnai_information_local_var) {
@@ -47,17 +47,17 @@ cJSON *OpenAPI_dnai_information_convertToJSON(OpenAPI_dnai_information_t *dnai_i
}
if (dnai_information->no_dnai_change_ind) {
- if (cJSON_AddBoolToObject(item, "noDnaiChangeInd", dnai_information->no_dnai_change_ind) == NULL) {
- ogs_error("OpenAPI_dnai_information_convertToJSON() failed [no_dnai_change_ind]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "noDnaiChangeInd", dnai_information->no_dnai_change_ind) == NULL) {
+ ogs_error("OpenAPI_dnai_information_convertToJSON() failed [no_dnai_change_ind]");
+ goto end;
+ }
}
if (dnai_information->no_local_psa_change_ind) {
- if (cJSON_AddBoolToObject(item, "noLocalPsaChangeInd", dnai_information->no_local_psa_change_ind) == NULL) {
- ogs_error("OpenAPI_dnai_information_convertToJSON() failed [no_local_psa_change_ind]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "noLocalPsaChangeInd", dnai_information->no_local_psa_change_ind) == NULL) {
+ ogs_error("OpenAPI_dnai_information_convertToJSON() failed [no_local_psa_change_ind]");
+ goto end;
+ }
}
end:
@@ -73,7 +73,7 @@ OpenAPI_dnai_information_t *OpenAPI_dnai_information_parseFromJSON(cJSON *dnai_i
goto end;
}
-
+
if (!cJSON_IsString(dnai)) {
ogs_error("OpenAPI_dnai_information_parseFromJSON() failed [dnai]");
goto end;
@@ -81,27 +81,27 @@ OpenAPI_dnai_information_t *OpenAPI_dnai_information_parseFromJSON(cJSON *dnai_i
cJSON *no_dnai_change_ind = cJSON_GetObjectItemCaseSensitive(dnai_informationJSON, "noDnaiChangeInd");
- if (no_dnai_change_ind) {
- if (!cJSON_IsBool(no_dnai_change_ind)) {
- ogs_error("OpenAPI_dnai_information_parseFromJSON() failed [no_dnai_change_ind]");
- goto end;
- }
+ if (no_dnai_change_ind) {
+ if (!cJSON_IsBool(no_dnai_change_ind)) {
+ ogs_error("OpenAPI_dnai_information_parseFromJSON() failed [no_dnai_change_ind]");
+ goto end;
+ }
}
cJSON *no_local_psa_change_ind = cJSON_GetObjectItemCaseSensitive(dnai_informationJSON, "noLocalPsaChangeInd");
- if (no_local_psa_change_ind) {
- if (!cJSON_IsBool(no_local_psa_change_ind)) {
- ogs_error("OpenAPI_dnai_information_parseFromJSON() failed [no_local_psa_change_ind]");
- goto end;
- }
+ if (no_local_psa_change_ind) {
+ if (!cJSON_IsBool(no_local_psa_change_ind)) {
+ ogs_error("OpenAPI_dnai_information_parseFromJSON() failed [no_local_psa_change_ind]");
+ goto end;
+ }
}
dnai_information_local_var = OpenAPI_dnai_information_create (
ogs_strdup_or_assert(dnai->valuestring),
no_dnai_change_ind ? no_dnai_change_ind->valueint : 0,
no_local_psa_change_ind ? no_local_psa_change_ind->valueint : 0
- );
+ );
return dnai_information_local_var;
end:
diff --git a/lib/sbi/openapi/model/dnai_information.h b/lib/sbi/openapi/model/dnai_information.h
index 1c4bc58dd..2708f0451 100644
--- a/lib/sbi/openapi/model/dnai_information.h
+++ b/lib/sbi/openapi/model/dnai_information.h
@@ -1,7 +1,7 @@
/*
* dnai_information.h
*
- *
+ *
*/
#ifndef _OpenAPI_dnai_information_H_
@@ -28,7 +28,7 @@ OpenAPI_dnai_information_t *OpenAPI_dnai_information_create(
char *dnai,
int no_dnai_change_ind,
int no_local_psa_change_ind
- );
+);
void OpenAPI_dnai_information_free(OpenAPI_dnai_information_t *dnai_information);
OpenAPI_dnai_information_t *OpenAPI_dnai_information_parseFromJSON(cJSON *dnai_informationJSON);
cJSON *OpenAPI_dnai_information_convertToJSON(OpenAPI_dnai_information_t *dnai_information);
diff --git a/lib/sbi/openapi/model/dnf.c b/lib/sbi/openapi/model/dnf.c
index c4d45460d..b91b97de0 100644
--- a/lib/sbi/openapi/model/dnf.c
+++ b/lib/sbi/openapi/model/dnf.c
@@ -6,7 +6,7 @@
OpenAPI_dnf_t *OpenAPI_dnf_create(
OpenAPI_list_t *dnf_units
- )
+)
{
OpenAPI_dnf_t *dnf_local_var = OpenAPI_malloc(sizeof(OpenAPI_dnf_t));
if (!dnf_local_var) {
@@ -72,9 +72,9 @@ OpenAPI_dnf_t *OpenAPI_dnf_parseFromJSON(cJSON *dnfJSON)
}
OpenAPI_list_t *dnf_unitsList;
-
+
cJSON *dnf_units_local_nonprimitive;
- if (!cJSON_IsArray(dnf_units)) {
+ if (!cJSON_IsArray(dnf_units)){
ogs_error("OpenAPI_dnf_parseFromJSON() failed [dnf_units]");
goto end;
}
@@ -93,7 +93,7 @@ OpenAPI_dnf_t *OpenAPI_dnf_parseFromJSON(cJSON *dnfJSON)
dnf_local_var = OpenAPI_dnf_create (
dnf_unitsList
- );
+ );
return dnf_local_var;
end:
diff --git a/lib/sbi/openapi/model/dnf.h b/lib/sbi/openapi/model/dnf.h
index 82459ce5e..df6f2d178 100644
--- a/lib/sbi/openapi/model/dnf.h
+++ b/lib/sbi/openapi/model/dnf.h
@@ -1,7 +1,7 @@
/*
* dnf.h
*
- *
+ *
*/
#ifndef _OpenAPI_dnf_H_
@@ -25,7 +25,7 @@ typedef struct OpenAPI_dnf_s {
OpenAPI_dnf_t *OpenAPI_dnf_create(
OpenAPI_list_t *dnf_units
- );
+);
void OpenAPI_dnf_free(OpenAPI_dnf_t *dnf);
OpenAPI_dnf_t *OpenAPI_dnf_parseFromJSON(cJSON *dnfJSON);
cJSON *OpenAPI_dnf_convertToJSON(OpenAPI_dnf_t *dnf);
diff --git a/lib/sbi/openapi/model/dnf_unit.c b/lib/sbi/openapi/model/dnf_unit.c
index 36030987d..5a1bd9644 100644
--- a/lib/sbi/openapi/model/dnf_unit.c
+++ b/lib/sbi/openapi/model/dnf_unit.c
@@ -6,7 +6,7 @@
OpenAPI_dnf_unit_t *OpenAPI_dnf_unit_create(
OpenAPI_list_t *dnf_unit
- )
+)
{
OpenAPI_dnf_unit_t *dnf_unit_local_var = OpenAPI_malloc(sizeof(OpenAPI_dnf_unit_t));
if (!dnf_unit_local_var) {
@@ -72,9 +72,9 @@ OpenAPI_dnf_unit_t *OpenAPI_dnf_unit_parseFromJSON(cJSON *dnf_unitJSON)
}
OpenAPI_list_t *dnf_unitList;
-
+
cJSON *dnf_unit_local_nonprimitive;
- if (!cJSON_IsArray(dnf_unit)) {
+ if (!cJSON_IsArray(dnf_unit)){
ogs_error("OpenAPI_dnf_unit_parseFromJSON() failed [dnf_unit]");
goto end;
}
@@ -93,7 +93,7 @@ OpenAPI_dnf_unit_t *OpenAPI_dnf_unit_parseFromJSON(cJSON *dnf_unitJSON)
dnf_unit_local_var = OpenAPI_dnf_unit_create (
dnf_unitList
- );
+ );
return dnf_unit_local_var;
end:
diff --git a/lib/sbi/openapi/model/dnf_unit.h b/lib/sbi/openapi/model/dnf_unit.h
index 0e6641eda..c5cd9c82c 100644
--- a/lib/sbi/openapi/model/dnf_unit.h
+++ b/lib/sbi/openapi/model/dnf_unit.h
@@ -1,7 +1,7 @@
/*
* dnf_unit.h
*
- *
+ *
*/
#ifndef _OpenAPI_dnf_unit_H_
@@ -25,7 +25,7 @@ typedef struct OpenAPI_dnf_unit_s {
OpenAPI_dnf_unit_t *OpenAPI_dnf_unit_create(
OpenAPI_list_t *dnf_unit
- );
+);
void OpenAPI_dnf_unit_free(OpenAPI_dnf_unit_t *dnf_unit);
OpenAPI_dnf_unit_t *OpenAPI_dnf_unit_parseFromJSON(cJSON *dnf_unitJSON);
cJSON *OpenAPI_dnf_unit_convertToJSON(OpenAPI_dnf_unit_t *dnf_unit);
diff --git a/lib/sbi/openapi/model/dnn_configuration.c b/lib/sbi/openapi/model/dnn_configuration.c
index 017bfe8db..a5b5f2740 100644
--- a/lib/sbi/openapi/model/dnn_configuration.c
+++ b/lib/sbi/openapi/model/dnn_configuration.c
@@ -23,8 +23,9 @@ OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_create(
int atsss_allowed,
int secondary_auth,
int dn_aaa_ip_address_allocation,
- OpenAPI_ip_address_t *dn_aaa_address
- )
+ OpenAPI_ip_address_t *dn_aaa_address,
+ char *iptv_acc_ctrl_info
+)
{
OpenAPI_dnn_configuration_t *dnn_configuration_local_var = OpenAPI_malloc(sizeof(OpenAPI_dnn_configuration_t));
if (!dnn_configuration_local_var) {
@@ -49,6 +50,7 @@ OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_create(
dnn_configuration_local_var->secondary_auth = secondary_auth;
dnn_configuration_local_var->dn_aaa_ip_address_allocation = dn_aaa_ip_address_allocation;
dnn_configuration_local_var->dn_aaa_address = dn_aaa_address;
+ dnn_configuration_local_var->iptv_acc_ctrl_info = iptv_acc_ctrl_info;
return dnn_configuration_local_var;
}
@@ -81,6 +83,7 @@ void OpenAPI_dnn_configuration_free(OpenAPI_dnn_configuration_t *dnn_configurati
}
OpenAPI_list_free(dnn_configuration->ipv6_frame_route_list);
OpenAPI_ip_address_free(dnn_configuration->dn_aaa_address);
+ ogs_free(dnn_configuration->iptv_acc_ctrl_info);
ogs_free(dnn_configuration);
}
@@ -117,197 +120,204 @@ cJSON *OpenAPI_dnn_configuration_convertToJSON(OpenAPI_dnn_configuration_t *dnn_
}
if (dnn_configuration->iwk_eps_ind) {
- if (cJSON_AddBoolToObject(item, "iwkEpsInd", dnn_configuration->iwk_eps_ind) == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [iwk_eps_ind]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "iwkEpsInd", dnn_configuration->iwk_eps_ind) == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [iwk_eps_ind]");
+ goto end;
+ }
}
if (dnn_configuration->_5g_qos_profile) {
- cJSON *_5g_qos_profile_local_JSON = OpenAPI_subscribed_default_qos_convertToJSON(dnn_configuration->_5g_qos_profile);
- if (_5g_qos_profile_local_JSON == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [_5g_qos_profile]");
- goto end;
- }
- cJSON_AddItemToObject(item, "5gQosProfile", _5g_qos_profile_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [_5g_qos_profile]");
- goto end;
- }
+ cJSON *_5g_qos_profile_local_JSON = OpenAPI_subscribed_default_qos_convertToJSON(dnn_configuration->_5g_qos_profile);
+ if (_5g_qos_profile_local_JSON == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [_5g_qos_profile]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "5gQosProfile", _5g_qos_profile_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [_5g_qos_profile]");
+ goto end;
+ }
}
if (dnn_configuration->session_ambr) {
- cJSON *session_ambr_local_JSON = OpenAPI_ambr_convertToJSON(dnn_configuration->session_ambr);
- if (session_ambr_local_JSON == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [session_ambr]");
- goto end;
- }
- cJSON_AddItemToObject(item, "sessionAmbr", session_ambr_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [session_ambr]");
- goto end;
- }
+ cJSON *session_ambr_local_JSON = OpenAPI_ambr_convertToJSON(dnn_configuration->session_ambr);
+ if (session_ambr_local_JSON == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [session_ambr]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "sessionAmbr", session_ambr_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [session_ambr]");
+ goto end;
+ }
}
if (dnn_configuration->_3gpp_charging_characteristics) {
- if (cJSON_AddStringToObject(item, "3gppChargingCharacteristics", dnn_configuration->_3gpp_charging_characteristics) == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [_3gpp_charging_characteristics]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "3gppChargingCharacteristics", dnn_configuration->_3gpp_charging_characteristics) == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [_3gpp_charging_characteristics]");
+ goto end;
+ }
}
if (dnn_configuration->static_ip_address) {
- cJSON *static_ip_addressList = cJSON_AddArrayToObject(item, "staticIpAddress");
- if (static_ip_addressList == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [static_ip_address]");
- goto end;
- }
+ cJSON *static_ip_addressList = cJSON_AddArrayToObject(item, "staticIpAddress");
+ if (static_ip_addressList == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [static_ip_address]");
+ goto end;
+ }
- OpenAPI_lnode_t *static_ip_address_node;
- if (dnn_configuration->static_ip_address) {
- OpenAPI_list_for_each(dnn_configuration->static_ip_address, static_ip_address_node) {
- cJSON *itemLocal = OpenAPI_ip_address_convertToJSON(static_ip_address_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [static_ip_address]");
- goto end;
- }
- cJSON_AddItemToArray(static_ip_addressList, itemLocal);
+ OpenAPI_lnode_t *static_ip_address_node;
+ if (dnn_configuration->static_ip_address) {
+ OpenAPI_list_for_each(dnn_configuration->static_ip_address, static_ip_address_node) {
+ cJSON *itemLocal = OpenAPI_ip_address_convertToJSON(static_ip_address_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [static_ip_address]");
+ goto end;
}
+ cJSON_AddItemToArray(static_ip_addressList, itemLocal);
}
}
+ }
if (dnn_configuration->up_security) {
- cJSON *up_security_local_JSON = OpenAPI_up_security_convertToJSON(dnn_configuration->up_security);
- if (up_security_local_JSON == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [up_security]");
- goto end;
- }
- cJSON_AddItemToObject(item, "upSecurity", up_security_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [up_security]");
- goto end;
- }
+ cJSON *up_security_local_JSON = OpenAPI_up_security_convertToJSON(dnn_configuration->up_security);
+ if (up_security_local_JSON == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [up_security]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "upSecurity", up_security_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [up_security]");
+ goto end;
+ }
}
if (dnn_configuration->pdu_session_continuity_ind) {
- if (cJSON_AddStringToObject(item, "pduSessionContinuityInd", OpenAPI_pdu_session_continuity_ind_ToString(dnn_configuration->pdu_session_continuity_ind)) == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [pdu_session_continuity_ind]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "pduSessionContinuityInd", OpenAPI_pdu_session_continuity_ind_ToString(dnn_configuration->pdu_session_continuity_ind)) == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [pdu_session_continuity_ind]");
+ goto end;
+ }
}
if (dnn_configuration->nidd_nef_id) {
- if (cJSON_AddStringToObject(item, "niddNefId", dnn_configuration->nidd_nef_id) == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [nidd_nef_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "niddNefId", dnn_configuration->nidd_nef_id) == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [nidd_nef_id]");
+ goto end;
+ }
}
if (dnn_configuration->nidd_info) {
- cJSON *nidd_info_local_JSON = OpenAPI_nidd_information_convertToJSON(dnn_configuration->nidd_info);
- if (nidd_info_local_JSON == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [nidd_info]");
- goto end;
- }
- cJSON_AddItemToObject(item, "niddInfo", nidd_info_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [nidd_info]");
- goto end;
- }
+ cJSON *nidd_info_local_JSON = OpenAPI_nidd_information_convertToJSON(dnn_configuration->nidd_info);
+ if (nidd_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [nidd_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "niddInfo", nidd_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [nidd_info]");
+ goto end;
+ }
}
if (dnn_configuration->redundant_session_allowed) {
- if (cJSON_AddBoolToObject(item, "redundantSessionAllowed", dnn_configuration->redundant_session_allowed) == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [redundant_session_allowed]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "redundantSessionAllowed", dnn_configuration->redundant_session_allowed) == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [redundant_session_allowed]");
+ goto end;
+ }
}
if (dnn_configuration->acs_info) {
- cJSON *acs_info_local_JSON = OpenAPI_acs_info_convertToJSON(dnn_configuration->acs_info);
- if (acs_info_local_JSON == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [acs_info]");
- goto end;
- }
- cJSON_AddItemToObject(item, "acsInfo", acs_info_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [acs_info]");
- goto end;
- }
+ cJSON *acs_info_local_JSON = OpenAPI_acs_info_convertToJSON(dnn_configuration->acs_info);
+ if (acs_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [acs_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "acsInfo", acs_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [acs_info]");
+ goto end;
+ }
}
if (dnn_configuration->ipv4_frame_route_list) {
- cJSON *ipv4_frame_route_listList = cJSON_AddArrayToObject(item, "ipv4FrameRouteList");
- if (ipv4_frame_route_listList == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [ipv4_frame_route_list]");
- goto end;
- }
+ cJSON *ipv4_frame_route_listList = cJSON_AddArrayToObject(item, "ipv4FrameRouteList");
+ if (ipv4_frame_route_listList == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [ipv4_frame_route_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *ipv4_frame_route_list_node;
- if (dnn_configuration->ipv4_frame_route_list) {
- OpenAPI_list_for_each(dnn_configuration->ipv4_frame_route_list, ipv4_frame_route_list_node) {
- cJSON *itemLocal = OpenAPI_frame_route_info_convertToJSON(ipv4_frame_route_list_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [ipv4_frame_route_list]");
- goto end;
- }
- cJSON_AddItemToArray(ipv4_frame_route_listList, itemLocal);
+ OpenAPI_lnode_t *ipv4_frame_route_list_node;
+ if (dnn_configuration->ipv4_frame_route_list) {
+ OpenAPI_list_for_each(dnn_configuration->ipv4_frame_route_list, ipv4_frame_route_list_node) {
+ cJSON *itemLocal = OpenAPI_frame_route_info_convertToJSON(ipv4_frame_route_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [ipv4_frame_route_list]");
+ goto end;
}
+ cJSON_AddItemToArray(ipv4_frame_route_listList, itemLocal);
}
}
+ }
if (dnn_configuration->ipv6_frame_route_list) {
- cJSON *ipv6_frame_route_listList = cJSON_AddArrayToObject(item, "ipv6FrameRouteList");
- if (ipv6_frame_route_listList == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [ipv6_frame_route_list]");
- goto end;
- }
+ cJSON *ipv6_frame_route_listList = cJSON_AddArrayToObject(item, "ipv6FrameRouteList");
+ if (ipv6_frame_route_listList == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [ipv6_frame_route_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *ipv6_frame_route_list_node;
- if (dnn_configuration->ipv6_frame_route_list) {
- OpenAPI_list_for_each(dnn_configuration->ipv6_frame_route_list, ipv6_frame_route_list_node) {
- cJSON *itemLocal = OpenAPI_frame_route_info_convertToJSON(ipv6_frame_route_list_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [ipv6_frame_route_list]");
- goto end;
- }
- cJSON_AddItemToArray(ipv6_frame_route_listList, itemLocal);
+ OpenAPI_lnode_t *ipv6_frame_route_list_node;
+ if (dnn_configuration->ipv6_frame_route_list) {
+ OpenAPI_list_for_each(dnn_configuration->ipv6_frame_route_list, ipv6_frame_route_list_node) {
+ cJSON *itemLocal = OpenAPI_frame_route_info_convertToJSON(ipv6_frame_route_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [ipv6_frame_route_list]");
+ goto end;
}
+ cJSON_AddItemToArray(ipv6_frame_route_listList, itemLocal);
}
}
+ }
if (dnn_configuration->atsss_allowed) {
- if (cJSON_AddBoolToObject(item, "atsssAllowed", dnn_configuration->atsss_allowed) == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [atsss_allowed]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "atsssAllowed", dnn_configuration->atsss_allowed) == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [atsss_allowed]");
+ goto end;
+ }
}
if (dnn_configuration->secondary_auth) {
- if (cJSON_AddBoolToObject(item, "secondaryAuth", dnn_configuration->secondary_auth) == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [secondary_auth]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "secondaryAuth", dnn_configuration->secondary_auth) == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [secondary_auth]");
+ goto end;
+ }
}
if (dnn_configuration->dn_aaa_ip_address_allocation) {
- if (cJSON_AddBoolToObject(item, "dnAaaIpAddressAllocation", dnn_configuration->dn_aaa_ip_address_allocation) == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [dn_aaa_ip_address_allocation]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "dnAaaIpAddressAllocation", dnn_configuration->dn_aaa_ip_address_allocation) == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [dn_aaa_ip_address_allocation]");
+ goto end;
+ }
}
if (dnn_configuration->dn_aaa_address) {
- cJSON *dn_aaa_address_local_JSON = OpenAPI_ip_address_convertToJSON(dnn_configuration->dn_aaa_address);
- if (dn_aaa_address_local_JSON == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [dn_aaa_address]");
- goto end;
- }
- cJSON_AddItemToObject(item, "dnAaaAddress", dn_aaa_address_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [dn_aaa_address]");
- goto end;
- }
+ cJSON *dn_aaa_address_local_JSON = OpenAPI_ip_address_convertToJSON(dnn_configuration->dn_aaa_address);
+ if (dn_aaa_address_local_JSON == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [dn_aaa_address]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "dnAaaAddress", dn_aaa_address_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [dn_aaa_address]");
+ goto end;
+ }
+ }
+
+ if (dnn_configuration->iptv_acc_ctrl_info) {
+ if (cJSON_AddStringToObject(item, "iptvAccCtrlInfo", dnn_configuration->iptv_acc_ctrl_info) == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [iptv_acc_ctrl_info]");
+ goto end;
+ }
}
end:
@@ -324,7 +334,7 @@ OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_parseFromJSON(cJSON *dnn_
}
OpenAPI_pdu_session_types_t *pdu_session_types_local_nonprim = NULL;
-
+
pdu_session_types_local_nonprim = OpenAPI_pdu_session_types_parseFromJSON(pdu_session_types);
cJSON *ssc_modes = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "sscModes");
@@ -334,192 +344,201 @@ OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_parseFromJSON(cJSON *dnn_
}
OpenAPI_ssc_modes_t *ssc_modes_local_nonprim = NULL;
-
+
ssc_modes_local_nonprim = OpenAPI_ssc_modes_parseFromJSON(ssc_modes);
cJSON *iwk_eps_ind = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "iwkEpsInd");
- if (iwk_eps_ind) {
- if (!cJSON_IsBool(iwk_eps_ind)) {
- ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [iwk_eps_ind]");
- goto end;
- }
+ if (iwk_eps_ind) {
+ if (!cJSON_IsBool(iwk_eps_ind)) {
+ ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [iwk_eps_ind]");
+ goto end;
+ }
}
cJSON *_5g_qos_profile = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "5gQosProfile");
OpenAPI_subscribed_default_qos_t *_5g_qos_profile_local_nonprim = NULL;
- if (_5g_qos_profile) {
- _5g_qos_profile_local_nonprim = OpenAPI_subscribed_default_qos_parseFromJSON(_5g_qos_profile);
+ if (_5g_qos_profile) {
+ _5g_qos_profile_local_nonprim = OpenAPI_subscribed_default_qos_parseFromJSON(_5g_qos_profile);
}
cJSON *session_ambr = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "sessionAmbr");
OpenAPI_ambr_t *session_ambr_local_nonprim = NULL;
- if (session_ambr) {
- session_ambr_local_nonprim = OpenAPI_ambr_parseFromJSON(session_ambr);
+ if (session_ambr) {
+ session_ambr_local_nonprim = OpenAPI_ambr_parseFromJSON(session_ambr);
}
cJSON *_3gpp_charging_characteristics = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "3gppChargingCharacteristics");
- if (_3gpp_charging_characteristics) {
- if (!cJSON_IsString(_3gpp_charging_characteristics)) {
- ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [_3gpp_charging_characteristics]");
- goto end;
- }
+ if (_3gpp_charging_characteristics) {
+ if (!cJSON_IsString(_3gpp_charging_characteristics)) {
+ ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [_3gpp_charging_characteristics]");
+ goto end;
+ }
}
cJSON *static_ip_address = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "staticIpAddress");
OpenAPI_list_t *static_ip_addressList;
- if (static_ip_address) {
- cJSON *static_ip_address_local_nonprimitive;
- if (!cJSON_IsArray(static_ip_address)) {
+ if (static_ip_address) {
+ cJSON *static_ip_address_local_nonprimitive;
+ if (!cJSON_IsArray(static_ip_address)){
+ ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [static_ip_address]");
+ goto end;
+ }
+
+ static_ip_addressList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(static_ip_address_local_nonprimitive, static_ip_address ) {
+ if (!cJSON_IsObject(static_ip_address_local_nonprimitive)) {
ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [static_ip_address]");
goto end;
}
+ OpenAPI_ip_address_t *static_ip_addressItem = OpenAPI_ip_address_parseFromJSON(static_ip_address_local_nonprimitive);
- static_ip_addressList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(static_ip_address_local_nonprimitive, static_ip_address ) {
- if (!cJSON_IsObject(static_ip_address_local_nonprimitive)) {
- ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [static_ip_address]");
- goto end;
- }
- OpenAPI_ip_address_t *static_ip_addressItem = OpenAPI_ip_address_parseFromJSON(static_ip_address_local_nonprimitive);
-
- OpenAPI_list_add(static_ip_addressList, static_ip_addressItem);
- }
+ OpenAPI_list_add(static_ip_addressList, static_ip_addressItem);
+ }
}
cJSON *up_security = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "upSecurity");
OpenAPI_up_security_t *up_security_local_nonprim = NULL;
- if (up_security) {
- up_security_local_nonprim = OpenAPI_up_security_parseFromJSON(up_security);
+ if (up_security) {
+ up_security_local_nonprim = OpenAPI_up_security_parseFromJSON(up_security);
}
cJSON *pdu_session_continuity_ind = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "pduSessionContinuityInd");
OpenAPI_pdu_session_continuity_ind_e pdu_session_continuity_indVariable;
- if (pdu_session_continuity_ind) {
- if (!cJSON_IsString(pdu_session_continuity_ind)) {
- ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [pdu_session_continuity_ind]");
- goto end;
- }
- pdu_session_continuity_indVariable = OpenAPI_pdu_session_continuity_ind_FromString(pdu_session_continuity_ind->valuestring);
+ if (pdu_session_continuity_ind) {
+ if (!cJSON_IsString(pdu_session_continuity_ind)) {
+ ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [pdu_session_continuity_ind]");
+ goto end;
+ }
+ pdu_session_continuity_indVariable = OpenAPI_pdu_session_continuity_ind_FromString(pdu_session_continuity_ind->valuestring);
}
cJSON *nidd_nef_id = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "niddNefId");
- if (nidd_nef_id) {
- if (!cJSON_IsString(nidd_nef_id)) {
- ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [nidd_nef_id]");
- goto end;
- }
+ if (nidd_nef_id) {
+ if (!cJSON_IsString(nidd_nef_id)) {
+ ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [nidd_nef_id]");
+ goto end;
+ }
}
cJSON *nidd_info = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "niddInfo");
OpenAPI_nidd_information_t *nidd_info_local_nonprim = NULL;
- if (nidd_info) {
- nidd_info_local_nonprim = OpenAPI_nidd_information_parseFromJSON(nidd_info);
+ if (nidd_info) {
+ nidd_info_local_nonprim = OpenAPI_nidd_information_parseFromJSON(nidd_info);
}
cJSON *redundant_session_allowed = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "redundantSessionAllowed");
- if (redundant_session_allowed) {
- if (!cJSON_IsBool(redundant_session_allowed)) {
- ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [redundant_session_allowed]");
- goto end;
- }
+ if (redundant_session_allowed) {
+ if (!cJSON_IsBool(redundant_session_allowed)) {
+ ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [redundant_session_allowed]");
+ goto end;
+ }
}
cJSON *acs_info = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "acsInfo");
OpenAPI_acs_info_t *acs_info_local_nonprim = NULL;
- if (acs_info) {
- acs_info_local_nonprim = OpenAPI_acs_info_parseFromJSON(acs_info);
+ if (acs_info) {
+ acs_info_local_nonprim = OpenAPI_acs_info_parseFromJSON(acs_info);
}
cJSON *ipv4_frame_route_list = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "ipv4FrameRouteList");
OpenAPI_list_t *ipv4_frame_route_listList;
- if (ipv4_frame_route_list) {
- cJSON *ipv4_frame_route_list_local_nonprimitive;
- if (!cJSON_IsArray(ipv4_frame_route_list)) {
+ if (ipv4_frame_route_list) {
+ cJSON *ipv4_frame_route_list_local_nonprimitive;
+ if (!cJSON_IsArray(ipv4_frame_route_list)){
+ ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [ipv4_frame_route_list]");
+ goto end;
+ }
+
+ ipv4_frame_route_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(ipv4_frame_route_list_local_nonprimitive, ipv4_frame_route_list ) {
+ if (!cJSON_IsObject(ipv4_frame_route_list_local_nonprimitive)) {
ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [ipv4_frame_route_list]");
goto end;
}
+ OpenAPI_frame_route_info_t *ipv4_frame_route_listItem = OpenAPI_frame_route_info_parseFromJSON(ipv4_frame_route_list_local_nonprimitive);
- ipv4_frame_route_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(ipv4_frame_route_list_local_nonprimitive, ipv4_frame_route_list ) {
- if (!cJSON_IsObject(ipv4_frame_route_list_local_nonprimitive)) {
- ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [ipv4_frame_route_list]");
- goto end;
- }
- OpenAPI_frame_route_info_t *ipv4_frame_route_listItem = OpenAPI_frame_route_info_parseFromJSON(ipv4_frame_route_list_local_nonprimitive);
-
- OpenAPI_list_add(ipv4_frame_route_listList, ipv4_frame_route_listItem);
- }
+ OpenAPI_list_add(ipv4_frame_route_listList, ipv4_frame_route_listItem);
+ }
}
cJSON *ipv6_frame_route_list = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "ipv6FrameRouteList");
OpenAPI_list_t *ipv6_frame_route_listList;
- if (ipv6_frame_route_list) {
- cJSON *ipv6_frame_route_list_local_nonprimitive;
- if (!cJSON_IsArray(ipv6_frame_route_list)) {
+ if (ipv6_frame_route_list) {
+ cJSON *ipv6_frame_route_list_local_nonprimitive;
+ if (!cJSON_IsArray(ipv6_frame_route_list)){
+ ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [ipv6_frame_route_list]");
+ goto end;
+ }
+
+ ipv6_frame_route_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(ipv6_frame_route_list_local_nonprimitive, ipv6_frame_route_list ) {
+ if (!cJSON_IsObject(ipv6_frame_route_list_local_nonprimitive)) {
ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [ipv6_frame_route_list]");
goto end;
}
+ OpenAPI_frame_route_info_t *ipv6_frame_route_listItem = OpenAPI_frame_route_info_parseFromJSON(ipv6_frame_route_list_local_nonprimitive);
- ipv6_frame_route_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(ipv6_frame_route_list_local_nonprimitive, ipv6_frame_route_list ) {
- if (!cJSON_IsObject(ipv6_frame_route_list_local_nonprimitive)) {
- ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [ipv6_frame_route_list]");
- goto end;
- }
- OpenAPI_frame_route_info_t *ipv6_frame_route_listItem = OpenAPI_frame_route_info_parseFromJSON(ipv6_frame_route_list_local_nonprimitive);
-
- OpenAPI_list_add(ipv6_frame_route_listList, ipv6_frame_route_listItem);
- }
+ OpenAPI_list_add(ipv6_frame_route_listList, ipv6_frame_route_listItem);
+ }
}
cJSON *atsss_allowed = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "atsssAllowed");
- if (atsss_allowed) {
- if (!cJSON_IsBool(atsss_allowed)) {
- ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [atsss_allowed]");
- goto end;
- }
+ if (atsss_allowed) {
+ if (!cJSON_IsBool(atsss_allowed)) {
+ ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [atsss_allowed]");
+ goto end;
+ }
}
cJSON *secondary_auth = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "secondaryAuth");
- if (secondary_auth) {
- if (!cJSON_IsBool(secondary_auth)) {
- ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [secondary_auth]");
- goto end;
- }
+ if (secondary_auth) {
+ if (!cJSON_IsBool(secondary_auth)) {
+ ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [secondary_auth]");
+ goto end;
+ }
}
cJSON *dn_aaa_ip_address_allocation = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "dnAaaIpAddressAllocation");
- if (dn_aaa_ip_address_allocation) {
- if (!cJSON_IsBool(dn_aaa_ip_address_allocation)) {
- ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [dn_aaa_ip_address_allocation]");
- goto end;
- }
+ if (dn_aaa_ip_address_allocation) {
+ if (!cJSON_IsBool(dn_aaa_ip_address_allocation)) {
+ ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [dn_aaa_ip_address_allocation]");
+ goto end;
+ }
}
cJSON *dn_aaa_address = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "dnAaaAddress");
OpenAPI_ip_address_t *dn_aaa_address_local_nonprim = NULL;
- if (dn_aaa_address) {
- dn_aaa_address_local_nonprim = OpenAPI_ip_address_parseFromJSON(dn_aaa_address);
+ if (dn_aaa_address) {
+ dn_aaa_address_local_nonprim = OpenAPI_ip_address_parseFromJSON(dn_aaa_address);
+ }
+
+ cJSON *iptv_acc_ctrl_info = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "iptvAccCtrlInfo");
+
+ if (iptv_acc_ctrl_info) {
+ if (!cJSON_IsString(iptv_acc_ctrl_info)) {
+ ogs_error("OpenAPI_dnn_configuration_parseFromJSON() failed [iptv_acc_ctrl_info]");
+ goto end;
+ }
}
dnn_configuration_local_var = OpenAPI_dnn_configuration_create (
@@ -541,8 +560,9 @@ OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_parseFromJSON(cJSON *dnn_
atsss_allowed ? atsss_allowed->valueint : 0,
secondary_auth ? secondary_auth->valueint : 0,
dn_aaa_ip_address_allocation ? dn_aaa_ip_address_allocation->valueint : 0,
- dn_aaa_address ? dn_aaa_address_local_nonprim : NULL
- );
+ dn_aaa_address ? dn_aaa_address_local_nonprim : NULL,
+ iptv_acc_ctrl_info ? ogs_strdup_or_assert(iptv_acc_ctrl_info->valuestring) : NULL
+ );
return dnn_configuration_local_var;
end:
diff --git a/lib/sbi/openapi/model/dnn_configuration.h b/lib/sbi/openapi/model/dnn_configuration.h
index 5980cade2..19075b9c5 100644
--- a/lib/sbi/openapi/model/dnn_configuration.h
+++ b/lib/sbi/openapi/model/dnn_configuration.h
@@ -1,7 +1,7 @@
/*
* dnn_configuration.h
*
- *
+ *
*/
#ifndef _OpenAPI_dnn_configuration_H_
@@ -48,6 +48,7 @@ typedef struct OpenAPI_dnn_configuration_s {
int secondary_auth;
int dn_aaa_ip_address_allocation;
struct OpenAPI_ip_address_s *dn_aaa_address;
+ char *iptv_acc_ctrl_info;
} OpenAPI_dnn_configuration_t;
OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_create(
@@ -69,8 +70,9 @@ OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_create(
int atsss_allowed,
int secondary_auth,
int dn_aaa_ip_address_allocation,
- OpenAPI_ip_address_t *dn_aaa_address
- );
+ OpenAPI_ip_address_t *dn_aaa_address,
+ char *iptv_acc_ctrl_info
+);
void OpenAPI_dnn_configuration_free(OpenAPI_dnn_configuration_t *dnn_configuration);
OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_parseFromJSON(cJSON *dnn_configurationJSON);
cJSON *OpenAPI_dnn_configuration_convertToJSON(OpenAPI_dnn_configuration_t *dnn_configuration);
diff --git a/lib/sbi/openapi/model/dnn_configuration_1.c b/lib/sbi/openapi/model/dnn_configuration_1.c
new file mode 100644
index 000000000..d193e3065
--- /dev/null
+++ b/lib/sbi/openapi/model/dnn_configuration_1.c
@@ -0,0 +1,605 @@
+
+#include
+#include
+#include
+#include "dnn_configuration_1.h"
+
+OpenAPI_dnn_configuration_1_t *OpenAPI_dnn_configuration_1_create(
+ OpenAPI_pdu_session_types_1_t *pdu_session_types,
+ OpenAPI_ssc_modes_1_t *ssc_modes,
+ int iwk_eps_ind,
+ OpenAPI_subscribed_default_qos_1_t *_5g_qos_profile,
+ OpenAPI_ambr_1_t *session_ambr,
+ char *_3gpp_charging_characteristics,
+ OpenAPI_list_t *static_ip_address,
+ OpenAPI_up_security_1_t *up_security,
+ OpenAPI_pdu_session_continuity_ind_e pdu_session_continuity_ind,
+ char *nidd_nef_id,
+ OpenAPI_nidd_information_1_t *nidd_info,
+ int redundant_session_allowed,
+ OpenAPI_acs_info_1_t *acs_info,
+ OpenAPI_list_t *ipv4_frame_route_list,
+ OpenAPI_list_t *ipv6_frame_route_list,
+ int atsss_allowed,
+ int secondary_auth,
+ int dn_aaa_ip_address_allocation,
+ OpenAPI_ip_address_1_t *dn_aaa_address,
+ char *iptv_acc_ctrl_info
+)
+{
+ OpenAPI_dnn_configuration_1_t *dnn_configuration_1_local_var = OpenAPI_malloc(sizeof(OpenAPI_dnn_configuration_1_t));
+ if (!dnn_configuration_1_local_var) {
+ return NULL;
+ }
+ dnn_configuration_1_local_var->pdu_session_types = pdu_session_types;
+ dnn_configuration_1_local_var->ssc_modes = ssc_modes;
+ dnn_configuration_1_local_var->iwk_eps_ind = iwk_eps_ind;
+ dnn_configuration_1_local_var->_5g_qos_profile = _5g_qos_profile;
+ dnn_configuration_1_local_var->session_ambr = session_ambr;
+ dnn_configuration_1_local_var->_3gpp_charging_characteristics = _3gpp_charging_characteristics;
+ dnn_configuration_1_local_var->static_ip_address = static_ip_address;
+ dnn_configuration_1_local_var->up_security = up_security;
+ dnn_configuration_1_local_var->pdu_session_continuity_ind = pdu_session_continuity_ind;
+ dnn_configuration_1_local_var->nidd_nef_id = nidd_nef_id;
+ dnn_configuration_1_local_var->nidd_info = nidd_info;
+ dnn_configuration_1_local_var->redundant_session_allowed = redundant_session_allowed;
+ dnn_configuration_1_local_var->acs_info = acs_info;
+ dnn_configuration_1_local_var->ipv4_frame_route_list = ipv4_frame_route_list;
+ dnn_configuration_1_local_var->ipv6_frame_route_list = ipv6_frame_route_list;
+ dnn_configuration_1_local_var->atsss_allowed = atsss_allowed;
+ dnn_configuration_1_local_var->secondary_auth = secondary_auth;
+ dnn_configuration_1_local_var->dn_aaa_ip_address_allocation = dn_aaa_ip_address_allocation;
+ dnn_configuration_1_local_var->dn_aaa_address = dn_aaa_address;
+ dnn_configuration_1_local_var->iptv_acc_ctrl_info = iptv_acc_ctrl_info;
+
+ return dnn_configuration_1_local_var;
+}
+
+void OpenAPI_dnn_configuration_1_free(OpenAPI_dnn_configuration_1_t *dnn_configuration_1)
+{
+ if (NULL == dnn_configuration_1) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ OpenAPI_pdu_session_types_1_free(dnn_configuration_1->pdu_session_types);
+ OpenAPI_ssc_modes_1_free(dnn_configuration_1->ssc_modes);
+ OpenAPI_subscribed_default_qos_1_free(dnn_configuration_1->_5g_qos_profile);
+ OpenAPI_ambr_1_free(dnn_configuration_1->session_ambr);
+ ogs_free(dnn_configuration_1->_3gpp_charging_characteristics);
+ OpenAPI_list_for_each(dnn_configuration_1->static_ip_address, node) {
+ OpenAPI_ip_address_1_free(node->data);
+ }
+ OpenAPI_list_free(dnn_configuration_1->static_ip_address);
+ OpenAPI_up_security_1_free(dnn_configuration_1->up_security);
+ ogs_free(dnn_configuration_1->nidd_nef_id);
+ OpenAPI_nidd_information_1_free(dnn_configuration_1->nidd_info);
+ OpenAPI_acs_info_1_free(dnn_configuration_1->acs_info);
+ OpenAPI_list_for_each(dnn_configuration_1->ipv4_frame_route_list, node) {
+ OpenAPI_frame_route_info_1_free(node->data);
+ }
+ OpenAPI_list_free(dnn_configuration_1->ipv4_frame_route_list);
+ OpenAPI_list_for_each(dnn_configuration_1->ipv6_frame_route_list, node) {
+ OpenAPI_frame_route_info_1_free(node->data);
+ }
+ OpenAPI_list_free(dnn_configuration_1->ipv6_frame_route_list);
+ OpenAPI_ip_address_1_free(dnn_configuration_1->dn_aaa_address);
+ ogs_free(dnn_configuration_1->iptv_acc_ctrl_info);
+ ogs_free(dnn_configuration_1);
+}
+
+cJSON *OpenAPI_dnn_configuration_1_convertToJSON(OpenAPI_dnn_configuration_1_t *dnn_configuration_1)
+{
+ cJSON *item = NULL;
+
+ if (dnn_configuration_1 == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [DnnConfiguration_1]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ cJSON *pdu_session_types_local_JSON = OpenAPI_pdu_session_types_1_convertToJSON(dnn_configuration_1->pdu_session_types);
+ if (pdu_session_types_local_JSON == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [pdu_session_types]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "pduSessionTypes", pdu_session_types_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [pdu_session_types]");
+ goto end;
+ }
+
+ cJSON *ssc_modes_local_JSON = OpenAPI_ssc_modes_1_convertToJSON(dnn_configuration_1->ssc_modes);
+ if (ssc_modes_local_JSON == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [ssc_modes]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "sscModes", ssc_modes_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [ssc_modes]");
+ goto end;
+ }
+
+ if (dnn_configuration_1->iwk_eps_ind) {
+ if (cJSON_AddBoolToObject(item, "iwkEpsInd", dnn_configuration_1->iwk_eps_ind) == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [iwk_eps_ind]");
+ goto end;
+ }
+ }
+
+ if (dnn_configuration_1->_5g_qos_profile) {
+ cJSON *_5g_qos_profile_local_JSON = OpenAPI_subscribed_default_qos_1_convertToJSON(dnn_configuration_1->_5g_qos_profile);
+ if (_5g_qos_profile_local_JSON == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [_5g_qos_profile]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "5gQosProfile", _5g_qos_profile_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [_5g_qos_profile]");
+ goto end;
+ }
+ }
+
+ if (dnn_configuration_1->session_ambr) {
+ cJSON *session_ambr_local_JSON = OpenAPI_ambr_1_convertToJSON(dnn_configuration_1->session_ambr);
+ if (session_ambr_local_JSON == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [session_ambr]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "sessionAmbr", session_ambr_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [session_ambr]");
+ goto end;
+ }
+ }
+
+ if (dnn_configuration_1->_3gpp_charging_characteristics) {
+ if (cJSON_AddStringToObject(item, "3gppChargingCharacteristics", dnn_configuration_1->_3gpp_charging_characteristics) == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [_3gpp_charging_characteristics]");
+ goto end;
+ }
+ }
+
+ if (dnn_configuration_1->static_ip_address) {
+ cJSON *static_ip_addressList = cJSON_AddArrayToObject(item, "staticIpAddress");
+ if (static_ip_addressList == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [static_ip_address]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *static_ip_address_node;
+ if (dnn_configuration_1->static_ip_address) {
+ OpenAPI_list_for_each(dnn_configuration_1->static_ip_address, static_ip_address_node) {
+ cJSON *itemLocal = OpenAPI_ip_address_1_convertToJSON(static_ip_address_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [static_ip_address]");
+ goto end;
+ }
+ cJSON_AddItemToArray(static_ip_addressList, itemLocal);
+ }
+ }
+ }
+
+ if (dnn_configuration_1->up_security) {
+ cJSON *up_security_local_JSON = OpenAPI_up_security_1_convertToJSON(dnn_configuration_1->up_security);
+ if (up_security_local_JSON == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [up_security]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "upSecurity", up_security_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [up_security]");
+ goto end;
+ }
+ }
+
+ if (dnn_configuration_1->pdu_session_continuity_ind) {
+ if (cJSON_AddStringToObject(item, "pduSessionContinuityInd", OpenAPI_pdu_session_continuity_ind_ToString(dnn_configuration_1->pdu_session_continuity_ind)) == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [pdu_session_continuity_ind]");
+ goto end;
+ }
+ }
+
+ if (dnn_configuration_1->nidd_nef_id) {
+ if (cJSON_AddStringToObject(item, "niddNefId", dnn_configuration_1->nidd_nef_id) == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [nidd_nef_id]");
+ goto end;
+ }
+ }
+
+ if (dnn_configuration_1->nidd_info) {
+ cJSON *nidd_info_local_JSON = OpenAPI_nidd_information_1_convertToJSON(dnn_configuration_1->nidd_info);
+ if (nidd_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [nidd_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "niddInfo", nidd_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [nidd_info]");
+ goto end;
+ }
+ }
+
+ if (dnn_configuration_1->redundant_session_allowed) {
+ if (cJSON_AddBoolToObject(item, "redundantSessionAllowed", dnn_configuration_1->redundant_session_allowed) == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [redundant_session_allowed]");
+ goto end;
+ }
+ }
+
+ if (dnn_configuration_1->acs_info) {
+ cJSON *acs_info_local_JSON = OpenAPI_acs_info_1_convertToJSON(dnn_configuration_1->acs_info);
+ if (acs_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [acs_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "acsInfo", acs_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [acs_info]");
+ goto end;
+ }
+ }
+
+ if (dnn_configuration_1->ipv4_frame_route_list) {
+ cJSON *ipv4_frame_route_listList = cJSON_AddArrayToObject(item, "ipv4FrameRouteList");
+ if (ipv4_frame_route_listList == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [ipv4_frame_route_list]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *ipv4_frame_route_list_node;
+ if (dnn_configuration_1->ipv4_frame_route_list) {
+ OpenAPI_list_for_each(dnn_configuration_1->ipv4_frame_route_list, ipv4_frame_route_list_node) {
+ cJSON *itemLocal = OpenAPI_frame_route_info_1_convertToJSON(ipv4_frame_route_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [ipv4_frame_route_list]");
+ goto end;
+ }
+ cJSON_AddItemToArray(ipv4_frame_route_listList, itemLocal);
+ }
+ }
+ }
+
+ if (dnn_configuration_1->ipv6_frame_route_list) {
+ cJSON *ipv6_frame_route_listList = cJSON_AddArrayToObject(item, "ipv6FrameRouteList");
+ if (ipv6_frame_route_listList == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [ipv6_frame_route_list]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *ipv6_frame_route_list_node;
+ if (dnn_configuration_1->ipv6_frame_route_list) {
+ OpenAPI_list_for_each(dnn_configuration_1->ipv6_frame_route_list, ipv6_frame_route_list_node) {
+ cJSON *itemLocal = OpenAPI_frame_route_info_1_convertToJSON(ipv6_frame_route_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [ipv6_frame_route_list]");
+ goto end;
+ }
+ cJSON_AddItemToArray(ipv6_frame_route_listList, itemLocal);
+ }
+ }
+ }
+
+ if (dnn_configuration_1->atsss_allowed) {
+ if (cJSON_AddBoolToObject(item, "atsssAllowed", dnn_configuration_1->atsss_allowed) == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [atsss_allowed]");
+ goto end;
+ }
+ }
+
+ if (dnn_configuration_1->secondary_auth) {
+ if (cJSON_AddBoolToObject(item, "secondaryAuth", dnn_configuration_1->secondary_auth) == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [secondary_auth]");
+ goto end;
+ }
+ }
+
+ if (dnn_configuration_1->dn_aaa_ip_address_allocation) {
+ if (cJSON_AddBoolToObject(item, "dnAaaIpAddressAllocation", dnn_configuration_1->dn_aaa_ip_address_allocation) == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [dn_aaa_ip_address_allocation]");
+ goto end;
+ }
+ }
+
+ if (dnn_configuration_1->dn_aaa_address) {
+ cJSON *dn_aaa_address_local_JSON = OpenAPI_ip_address_1_convertToJSON(dnn_configuration_1->dn_aaa_address);
+ if (dn_aaa_address_local_JSON == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [dn_aaa_address]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "dnAaaAddress", dn_aaa_address_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [dn_aaa_address]");
+ goto end;
+ }
+ }
+
+ if (dnn_configuration_1->iptv_acc_ctrl_info) {
+ if (cJSON_AddStringToObject(item, "iptvAccCtrlInfo", dnn_configuration_1->iptv_acc_ctrl_info) == NULL) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed [iptv_acc_ctrl_info]");
+ goto end;
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_dnn_configuration_1_t *OpenAPI_dnn_configuration_1_parseFromJSON(cJSON *dnn_configuration_1JSON)
+{
+ OpenAPI_dnn_configuration_1_t *dnn_configuration_1_local_var = NULL;
+ cJSON *pdu_session_types = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "pduSessionTypes");
+ if (!pdu_session_types) {
+ ogs_error("OpenAPI_dnn_configuration_1_parseFromJSON() failed [pdu_session_types]");
+ goto end;
+ }
+
+ OpenAPI_pdu_session_types_1_t *pdu_session_types_local_nonprim = NULL;
+
+ pdu_session_types_local_nonprim = OpenAPI_pdu_session_types_1_parseFromJSON(pdu_session_types);
+
+ cJSON *ssc_modes = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "sscModes");
+ if (!ssc_modes) {
+ ogs_error("OpenAPI_dnn_configuration_1_parseFromJSON() failed [ssc_modes]");
+ goto end;
+ }
+
+ OpenAPI_ssc_modes_1_t *ssc_modes_local_nonprim = NULL;
+
+ ssc_modes_local_nonprim = OpenAPI_ssc_modes_1_parseFromJSON(ssc_modes);
+
+ cJSON *iwk_eps_ind = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "iwkEpsInd");
+
+ if (iwk_eps_ind) {
+ if (!cJSON_IsBool(iwk_eps_ind)) {
+ ogs_error("OpenAPI_dnn_configuration_1_parseFromJSON() failed [iwk_eps_ind]");
+ goto end;
+ }
+ }
+
+ cJSON *_5g_qos_profile = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "5gQosProfile");
+
+ OpenAPI_subscribed_default_qos_1_t *_5g_qos_profile_local_nonprim = NULL;
+ if (_5g_qos_profile) {
+ _5g_qos_profile_local_nonprim = OpenAPI_subscribed_default_qos_1_parseFromJSON(_5g_qos_profile);
+ }
+
+ cJSON *session_ambr = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "sessionAmbr");
+
+ OpenAPI_ambr_1_t *session_ambr_local_nonprim = NULL;
+ if (session_ambr) {
+ session_ambr_local_nonprim = OpenAPI_ambr_1_parseFromJSON(session_ambr);
+ }
+
+ cJSON *_3gpp_charging_characteristics = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "3gppChargingCharacteristics");
+
+ if (_3gpp_charging_characteristics) {
+ if (!cJSON_IsString(_3gpp_charging_characteristics)) {
+ ogs_error("OpenAPI_dnn_configuration_1_parseFromJSON() failed [_3gpp_charging_characteristics]");
+ goto end;
+ }
+ }
+
+ cJSON *static_ip_address = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "staticIpAddress");
+
+ OpenAPI_list_t *static_ip_addressList;
+ if (static_ip_address) {
+ cJSON *static_ip_address_local_nonprimitive;
+ if (!cJSON_IsArray(static_ip_address)){
+ ogs_error("OpenAPI_dnn_configuration_1_parseFromJSON() failed [static_ip_address]");
+ goto end;
+ }
+
+ static_ip_addressList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(static_ip_address_local_nonprimitive, static_ip_address ) {
+ if (!cJSON_IsObject(static_ip_address_local_nonprimitive)) {
+ ogs_error("OpenAPI_dnn_configuration_1_parseFromJSON() failed [static_ip_address]");
+ goto end;
+ }
+ OpenAPI_ip_address_1_t *static_ip_addressItem = OpenAPI_ip_address_1_parseFromJSON(static_ip_address_local_nonprimitive);
+
+ OpenAPI_list_add(static_ip_addressList, static_ip_addressItem);
+ }
+ }
+
+ cJSON *up_security = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "upSecurity");
+
+ OpenAPI_up_security_1_t *up_security_local_nonprim = NULL;
+ if (up_security) {
+ up_security_local_nonprim = OpenAPI_up_security_1_parseFromJSON(up_security);
+ }
+
+ cJSON *pdu_session_continuity_ind = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "pduSessionContinuityInd");
+
+ OpenAPI_pdu_session_continuity_ind_e pdu_session_continuity_indVariable;
+ if (pdu_session_continuity_ind) {
+ if (!cJSON_IsString(pdu_session_continuity_ind)) {
+ ogs_error("OpenAPI_dnn_configuration_1_parseFromJSON() failed [pdu_session_continuity_ind]");
+ goto end;
+ }
+ pdu_session_continuity_indVariable = OpenAPI_pdu_session_continuity_ind_FromString(pdu_session_continuity_ind->valuestring);
+ }
+
+ cJSON *nidd_nef_id = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "niddNefId");
+
+ if (nidd_nef_id) {
+ if (!cJSON_IsString(nidd_nef_id)) {
+ ogs_error("OpenAPI_dnn_configuration_1_parseFromJSON() failed [nidd_nef_id]");
+ goto end;
+ }
+ }
+
+ cJSON *nidd_info = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "niddInfo");
+
+ OpenAPI_nidd_information_1_t *nidd_info_local_nonprim = NULL;
+ if (nidd_info) {
+ nidd_info_local_nonprim = OpenAPI_nidd_information_1_parseFromJSON(nidd_info);
+ }
+
+ cJSON *redundant_session_allowed = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "redundantSessionAllowed");
+
+ if (redundant_session_allowed) {
+ if (!cJSON_IsBool(redundant_session_allowed)) {
+ ogs_error("OpenAPI_dnn_configuration_1_parseFromJSON() failed [redundant_session_allowed]");
+ goto end;
+ }
+ }
+
+ cJSON *acs_info = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "acsInfo");
+
+ OpenAPI_acs_info_1_t *acs_info_local_nonprim = NULL;
+ if (acs_info) {
+ acs_info_local_nonprim = OpenAPI_acs_info_1_parseFromJSON(acs_info);
+ }
+
+ cJSON *ipv4_frame_route_list = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "ipv4FrameRouteList");
+
+ OpenAPI_list_t *ipv4_frame_route_listList;
+ if (ipv4_frame_route_list) {
+ cJSON *ipv4_frame_route_list_local_nonprimitive;
+ if (!cJSON_IsArray(ipv4_frame_route_list)){
+ ogs_error("OpenAPI_dnn_configuration_1_parseFromJSON() failed [ipv4_frame_route_list]");
+ goto end;
+ }
+
+ ipv4_frame_route_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(ipv4_frame_route_list_local_nonprimitive, ipv4_frame_route_list ) {
+ if (!cJSON_IsObject(ipv4_frame_route_list_local_nonprimitive)) {
+ ogs_error("OpenAPI_dnn_configuration_1_parseFromJSON() failed [ipv4_frame_route_list]");
+ goto end;
+ }
+ OpenAPI_frame_route_info_1_t *ipv4_frame_route_listItem = OpenAPI_frame_route_info_1_parseFromJSON(ipv4_frame_route_list_local_nonprimitive);
+
+ OpenAPI_list_add(ipv4_frame_route_listList, ipv4_frame_route_listItem);
+ }
+ }
+
+ cJSON *ipv6_frame_route_list = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "ipv6FrameRouteList");
+
+ OpenAPI_list_t *ipv6_frame_route_listList;
+ if (ipv6_frame_route_list) {
+ cJSON *ipv6_frame_route_list_local_nonprimitive;
+ if (!cJSON_IsArray(ipv6_frame_route_list)){
+ ogs_error("OpenAPI_dnn_configuration_1_parseFromJSON() failed [ipv6_frame_route_list]");
+ goto end;
+ }
+
+ ipv6_frame_route_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(ipv6_frame_route_list_local_nonprimitive, ipv6_frame_route_list ) {
+ if (!cJSON_IsObject(ipv6_frame_route_list_local_nonprimitive)) {
+ ogs_error("OpenAPI_dnn_configuration_1_parseFromJSON() failed [ipv6_frame_route_list]");
+ goto end;
+ }
+ OpenAPI_frame_route_info_1_t *ipv6_frame_route_listItem = OpenAPI_frame_route_info_1_parseFromJSON(ipv6_frame_route_list_local_nonprimitive);
+
+ OpenAPI_list_add(ipv6_frame_route_listList, ipv6_frame_route_listItem);
+ }
+ }
+
+ cJSON *atsss_allowed = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "atsssAllowed");
+
+ if (atsss_allowed) {
+ if (!cJSON_IsBool(atsss_allowed)) {
+ ogs_error("OpenAPI_dnn_configuration_1_parseFromJSON() failed [atsss_allowed]");
+ goto end;
+ }
+ }
+
+ cJSON *secondary_auth = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "secondaryAuth");
+
+ if (secondary_auth) {
+ if (!cJSON_IsBool(secondary_auth)) {
+ ogs_error("OpenAPI_dnn_configuration_1_parseFromJSON() failed [secondary_auth]");
+ goto end;
+ }
+ }
+
+ cJSON *dn_aaa_ip_address_allocation = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "dnAaaIpAddressAllocation");
+
+ if (dn_aaa_ip_address_allocation) {
+ if (!cJSON_IsBool(dn_aaa_ip_address_allocation)) {
+ ogs_error("OpenAPI_dnn_configuration_1_parseFromJSON() failed [dn_aaa_ip_address_allocation]");
+ goto end;
+ }
+ }
+
+ cJSON *dn_aaa_address = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "dnAaaAddress");
+
+ OpenAPI_ip_address_1_t *dn_aaa_address_local_nonprim = NULL;
+ if (dn_aaa_address) {
+ dn_aaa_address_local_nonprim = OpenAPI_ip_address_1_parseFromJSON(dn_aaa_address);
+ }
+
+ cJSON *iptv_acc_ctrl_info = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "iptvAccCtrlInfo");
+
+ if (iptv_acc_ctrl_info) {
+ if (!cJSON_IsString(iptv_acc_ctrl_info)) {
+ ogs_error("OpenAPI_dnn_configuration_1_parseFromJSON() failed [iptv_acc_ctrl_info]");
+ goto end;
+ }
+ }
+
+ dnn_configuration_1_local_var = OpenAPI_dnn_configuration_1_create (
+ pdu_session_types_local_nonprim,
+ ssc_modes_local_nonprim,
+ iwk_eps_ind ? iwk_eps_ind->valueint : 0,
+ _5g_qos_profile ? _5g_qos_profile_local_nonprim : NULL,
+ session_ambr ? session_ambr_local_nonprim : NULL,
+ _3gpp_charging_characteristics ? ogs_strdup_or_assert(_3gpp_charging_characteristics->valuestring) : NULL,
+ static_ip_address ? static_ip_addressList : NULL,
+ up_security ? up_security_local_nonprim : NULL,
+ pdu_session_continuity_ind ? pdu_session_continuity_indVariable : 0,
+ nidd_nef_id ? ogs_strdup_or_assert(nidd_nef_id->valuestring) : NULL,
+ nidd_info ? nidd_info_local_nonprim : NULL,
+ redundant_session_allowed ? redundant_session_allowed->valueint : 0,
+ acs_info ? acs_info_local_nonprim : NULL,
+ ipv4_frame_route_list ? ipv4_frame_route_listList : NULL,
+ ipv6_frame_route_list ? ipv6_frame_route_listList : NULL,
+ atsss_allowed ? atsss_allowed->valueint : 0,
+ secondary_auth ? secondary_auth->valueint : 0,
+ dn_aaa_ip_address_allocation ? dn_aaa_ip_address_allocation->valueint : 0,
+ dn_aaa_address ? dn_aaa_address_local_nonprim : NULL,
+ iptv_acc_ctrl_info ? ogs_strdup_or_assert(iptv_acc_ctrl_info->valuestring) : NULL
+ );
+
+ return dnn_configuration_1_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_dnn_configuration_1_t *OpenAPI_dnn_configuration_1_copy(OpenAPI_dnn_configuration_1_t *dst, OpenAPI_dnn_configuration_1_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_dnn_configuration_1_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_dnn_configuration_1_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_dnn_configuration_1_free(dst);
+ dst = OpenAPI_dnn_configuration_1_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/dnn_configuration_1.h b/lib/sbi/openapi/model/dnn_configuration_1.h
new file mode 100644
index 000000000..da88c0498
--- /dev/null
+++ b/lib/sbi/openapi/model/dnn_configuration_1.h
@@ -0,0 +1,86 @@
+/*
+ * dnn_configuration_1.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_dnn_configuration_1_H_
+#define _OpenAPI_dnn_configuration_1_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+#include "acs_info_1.h"
+#include "ambr_1.h"
+#include "frame_route_info_1.h"
+#include "ip_address_1.h"
+#include "nidd_information_1.h"
+#include "pdu_session_continuity_ind.h"
+#include "pdu_session_types_1.h"
+#include "ssc_modes_1.h"
+#include "subscribed_default_qos_1.h"
+#include "up_security_1.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_dnn_configuration_1_s OpenAPI_dnn_configuration_1_t;
+typedef struct OpenAPI_dnn_configuration_1_s {
+ struct OpenAPI_pdu_session_types_1_s *pdu_session_types;
+ struct OpenAPI_ssc_modes_1_s *ssc_modes;
+ int iwk_eps_ind;
+ struct OpenAPI_subscribed_default_qos_1_s *_5g_qos_profile;
+ struct OpenAPI_ambr_1_s *session_ambr;
+ char *_3gpp_charging_characteristics;
+ OpenAPI_list_t *static_ip_address;
+ struct OpenAPI_up_security_1_s *up_security;
+ OpenAPI_pdu_session_continuity_ind_e pdu_session_continuity_ind;
+ char *nidd_nef_id;
+ struct OpenAPI_nidd_information_1_s *nidd_info;
+ int redundant_session_allowed;
+ struct OpenAPI_acs_info_1_s *acs_info;
+ OpenAPI_list_t *ipv4_frame_route_list;
+ OpenAPI_list_t *ipv6_frame_route_list;
+ int atsss_allowed;
+ int secondary_auth;
+ int dn_aaa_ip_address_allocation;
+ struct OpenAPI_ip_address_1_s *dn_aaa_address;
+ char *iptv_acc_ctrl_info;
+} OpenAPI_dnn_configuration_1_t;
+
+OpenAPI_dnn_configuration_1_t *OpenAPI_dnn_configuration_1_create(
+ OpenAPI_pdu_session_types_1_t *pdu_session_types,
+ OpenAPI_ssc_modes_1_t *ssc_modes,
+ int iwk_eps_ind,
+ OpenAPI_subscribed_default_qos_1_t *_5g_qos_profile,
+ OpenAPI_ambr_1_t *session_ambr,
+ char *_3gpp_charging_characteristics,
+ OpenAPI_list_t *static_ip_address,
+ OpenAPI_up_security_1_t *up_security,
+ OpenAPI_pdu_session_continuity_ind_e pdu_session_continuity_ind,
+ char *nidd_nef_id,
+ OpenAPI_nidd_information_1_t *nidd_info,
+ int redundant_session_allowed,
+ OpenAPI_acs_info_1_t *acs_info,
+ OpenAPI_list_t *ipv4_frame_route_list,
+ OpenAPI_list_t *ipv6_frame_route_list,
+ int atsss_allowed,
+ int secondary_auth,
+ int dn_aaa_ip_address_allocation,
+ OpenAPI_ip_address_1_t *dn_aaa_address,
+ char *iptv_acc_ctrl_info
+);
+void OpenAPI_dnn_configuration_1_free(OpenAPI_dnn_configuration_1_t *dnn_configuration_1);
+OpenAPI_dnn_configuration_1_t *OpenAPI_dnn_configuration_1_parseFromJSON(cJSON *dnn_configuration_1JSON);
+cJSON *OpenAPI_dnn_configuration_1_convertToJSON(OpenAPI_dnn_configuration_1_t *dnn_configuration_1);
+OpenAPI_dnn_configuration_1_t *OpenAPI_dnn_configuration_1_copy(OpenAPI_dnn_configuration_1_t *dst, OpenAPI_dnn_configuration_1_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_dnn_configuration_1_H_ */
+
diff --git a/lib/sbi/openapi/model/dnn_info.c b/lib/sbi/openapi/model/dnn_info.c
index 14ed450d4..cd46b114a 100644
--- a/lib/sbi/openapi/model/dnn_info.c
+++ b/lib/sbi/openapi/model/dnn_info.c
@@ -13,7 +13,7 @@ OpenAPI_dnn_info_t *OpenAPI_dnn_info_create(
int invoke_nef_ind,
OpenAPI_list_t *smf_list,
int same_smf_ind
- )
+)
{
OpenAPI_dnn_info_t *dnn_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_dnn_info_t));
if (!dnn_info_local_var) {
@@ -61,61 +61,61 @@ cJSON *OpenAPI_dnn_info_convertToJSON(OpenAPI_dnn_info_t *dnn_info)
}
if (dnn_info->default_dnn_indicator) {
- if (cJSON_AddBoolToObject(item, "defaultDnnIndicator", dnn_info->default_dnn_indicator) == NULL) {
- ogs_error("OpenAPI_dnn_info_convertToJSON() failed [default_dnn_indicator]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "defaultDnnIndicator", dnn_info->default_dnn_indicator) == NULL) {
+ ogs_error("OpenAPI_dnn_info_convertToJSON() failed [default_dnn_indicator]");
+ goto end;
+ }
}
if (dnn_info->lbo_roaming_allowed) {
- if (cJSON_AddBoolToObject(item, "lboRoamingAllowed", dnn_info->lbo_roaming_allowed) == NULL) {
- ogs_error("OpenAPI_dnn_info_convertToJSON() failed [lbo_roaming_allowed]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "lboRoamingAllowed", dnn_info->lbo_roaming_allowed) == NULL) {
+ ogs_error("OpenAPI_dnn_info_convertToJSON() failed [lbo_roaming_allowed]");
+ goto end;
+ }
}
if (dnn_info->iwk_eps_ind) {
- if (cJSON_AddBoolToObject(item, "iwkEpsInd", dnn_info->iwk_eps_ind) == NULL) {
- ogs_error("OpenAPI_dnn_info_convertToJSON() failed [iwk_eps_ind]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "iwkEpsInd", dnn_info->iwk_eps_ind) == NULL) {
+ ogs_error("OpenAPI_dnn_info_convertToJSON() failed [iwk_eps_ind]");
+ goto end;
+ }
}
if (dnn_info->dnn_barred) {
- if (cJSON_AddBoolToObject(item, "dnnBarred", dnn_info->dnn_barred) == NULL) {
- ogs_error("OpenAPI_dnn_info_convertToJSON() failed [dnn_barred]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "dnnBarred", dnn_info->dnn_barred) == NULL) {
+ ogs_error("OpenAPI_dnn_info_convertToJSON() failed [dnn_barred]");
+ goto end;
+ }
}
if (dnn_info->invoke_nef_ind) {
- if (cJSON_AddBoolToObject(item, "invokeNefInd", dnn_info->invoke_nef_ind) == NULL) {
- ogs_error("OpenAPI_dnn_info_convertToJSON() failed [invoke_nef_ind]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "invokeNefInd", dnn_info->invoke_nef_ind) == NULL) {
+ ogs_error("OpenAPI_dnn_info_convertToJSON() failed [invoke_nef_ind]");
+ goto end;
+ }
}
if (dnn_info->smf_list) {
- cJSON *smf_list = cJSON_AddArrayToObject(item, "smfList");
- if (smf_list == NULL) {
- ogs_error("OpenAPI_dnn_info_convertToJSON() failed [smf_list]");
- goto end;
- }
+ cJSON *smf_list = cJSON_AddArrayToObject(item, "smfList");
+ if (smf_list == NULL) {
+ ogs_error("OpenAPI_dnn_info_convertToJSON() failed [smf_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *smf_list_node;
- OpenAPI_list_for_each(dnn_info->smf_list, smf_list_node) {
- if (cJSON_AddStringToObject(smf_list, "", (char*)smf_list_node->data) == NULL) {
- ogs_error("OpenAPI_dnn_info_convertToJSON() failed [smf_list]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *smf_list_node;
+ OpenAPI_list_for_each(dnn_info->smf_list, smf_list_node) {
+ if (cJSON_AddStringToObject(smf_list, "", (char*)smf_list_node->data) == NULL) {
+ ogs_error("OpenAPI_dnn_info_convertToJSON() failed [smf_list]");
+ goto end;
+ }
+ }
}
if (dnn_info->same_smf_ind) {
- if (cJSON_AddBoolToObject(item, "sameSmfInd", dnn_info->same_smf_ind) == NULL) {
- ogs_error("OpenAPI_dnn_info_convertToJSON() failed [same_smf_ind]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "sameSmfInd", dnn_info->same_smf_ind) == NULL) {
+ ogs_error("OpenAPI_dnn_info_convertToJSON() failed [same_smf_ind]");
+ goto end;
+ }
}
end:
@@ -131,7 +131,7 @@ OpenAPI_dnn_info_t *OpenAPI_dnn_info_parseFromJSON(cJSON *dnn_infoJSON)
goto end;
}
-
+
if (!cJSON_IsString(dnn)) {
ogs_error("OpenAPI_dnn_info_parseFromJSON() failed [dnn]");
goto end;
@@ -139,76 +139,76 @@ OpenAPI_dnn_info_t *OpenAPI_dnn_info_parseFromJSON(cJSON *dnn_infoJSON)
cJSON *default_dnn_indicator = cJSON_GetObjectItemCaseSensitive(dnn_infoJSON, "defaultDnnIndicator");
- if (default_dnn_indicator) {
- if (!cJSON_IsBool(default_dnn_indicator)) {
- ogs_error("OpenAPI_dnn_info_parseFromJSON() failed [default_dnn_indicator]");
- goto end;
- }
+ if (default_dnn_indicator) {
+ if (!cJSON_IsBool(default_dnn_indicator)) {
+ ogs_error("OpenAPI_dnn_info_parseFromJSON() failed [default_dnn_indicator]");
+ goto end;
+ }
}
cJSON *lbo_roaming_allowed = cJSON_GetObjectItemCaseSensitive(dnn_infoJSON, "lboRoamingAllowed");
- if (lbo_roaming_allowed) {
- if (!cJSON_IsBool(lbo_roaming_allowed)) {
- ogs_error("OpenAPI_dnn_info_parseFromJSON() failed [lbo_roaming_allowed]");
- goto end;
- }
+ if (lbo_roaming_allowed) {
+ if (!cJSON_IsBool(lbo_roaming_allowed)) {
+ ogs_error("OpenAPI_dnn_info_parseFromJSON() failed [lbo_roaming_allowed]");
+ goto end;
+ }
}
cJSON *iwk_eps_ind = cJSON_GetObjectItemCaseSensitive(dnn_infoJSON, "iwkEpsInd");
- if (iwk_eps_ind) {
- if (!cJSON_IsBool(iwk_eps_ind)) {
- ogs_error("OpenAPI_dnn_info_parseFromJSON() failed [iwk_eps_ind]");
- goto end;
- }
+ if (iwk_eps_ind) {
+ if (!cJSON_IsBool(iwk_eps_ind)) {
+ ogs_error("OpenAPI_dnn_info_parseFromJSON() failed [iwk_eps_ind]");
+ goto end;
+ }
}
cJSON *dnn_barred = cJSON_GetObjectItemCaseSensitive(dnn_infoJSON, "dnnBarred");
- if (dnn_barred) {
- if (!cJSON_IsBool(dnn_barred)) {
- ogs_error("OpenAPI_dnn_info_parseFromJSON() failed [dnn_barred]");
- goto end;
- }
+ if (dnn_barred) {
+ if (!cJSON_IsBool(dnn_barred)) {
+ ogs_error("OpenAPI_dnn_info_parseFromJSON() failed [dnn_barred]");
+ goto end;
+ }
}
cJSON *invoke_nef_ind = cJSON_GetObjectItemCaseSensitive(dnn_infoJSON, "invokeNefInd");
- if (invoke_nef_ind) {
- if (!cJSON_IsBool(invoke_nef_ind)) {
- ogs_error("OpenAPI_dnn_info_parseFromJSON() failed [invoke_nef_ind]");
- goto end;
- }
+ if (invoke_nef_ind) {
+ if (!cJSON_IsBool(invoke_nef_ind)) {
+ ogs_error("OpenAPI_dnn_info_parseFromJSON() failed [invoke_nef_ind]");
+ goto end;
+ }
}
cJSON *smf_list = cJSON_GetObjectItemCaseSensitive(dnn_infoJSON, "smfList");
OpenAPI_list_t *smf_listList;
- if (smf_list) {
- cJSON *smf_list_local;
- if (!cJSON_IsArray(smf_list)) {
- ogs_error("OpenAPI_dnn_info_parseFromJSON() failed [smf_list]");
- goto end;
- }
- smf_listList = OpenAPI_list_create();
+ if (smf_list) {
+ cJSON *smf_list_local;
+ if (!cJSON_IsArray(smf_list)) {
+ ogs_error("OpenAPI_dnn_info_parseFromJSON() failed [smf_list]");
+ goto end;
+ }
+ smf_listList = OpenAPI_list_create();
- cJSON_ArrayForEach(smf_list_local, smf_list) {
- if (!cJSON_IsString(smf_list_local)) {
- ogs_error("OpenAPI_dnn_info_parseFromJSON() failed [smf_list]");
- goto end;
- }
- OpenAPI_list_add(smf_listList, ogs_strdup_or_assert(smf_list_local->valuestring));
- }
+ cJSON_ArrayForEach(smf_list_local, smf_list) {
+ if (!cJSON_IsString(smf_list_local)) {
+ ogs_error("OpenAPI_dnn_info_parseFromJSON() failed [smf_list]");
+ goto end;
+ }
+ OpenAPI_list_add(smf_listList , ogs_strdup_or_assert(smf_list_local->valuestring));
+ }
}
cJSON *same_smf_ind = cJSON_GetObjectItemCaseSensitive(dnn_infoJSON, "sameSmfInd");
- if (same_smf_ind) {
- if (!cJSON_IsBool(same_smf_ind)) {
- ogs_error("OpenAPI_dnn_info_parseFromJSON() failed [same_smf_ind]");
- goto end;
- }
+ if (same_smf_ind) {
+ if (!cJSON_IsBool(same_smf_ind)) {
+ ogs_error("OpenAPI_dnn_info_parseFromJSON() failed [same_smf_ind]");
+ goto end;
+ }
}
dnn_info_local_var = OpenAPI_dnn_info_create (
@@ -220,7 +220,7 @@ OpenAPI_dnn_info_t *OpenAPI_dnn_info_parseFromJSON(cJSON *dnn_infoJSON)
invoke_nef_ind ? invoke_nef_ind->valueint : 0,
smf_list ? smf_listList : NULL,
same_smf_ind ? same_smf_ind->valueint : 0
- );
+ );
return dnn_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/dnn_info.h b/lib/sbi/openapi/model/dnn_info.h
index 437cb8d8d..21a59509b 100644
--- a/lib/sbi/openapi/model/dnn_info.h
+++ b/lib/sbi/openapi/model/dnn_info.h
@@ -1,7 +1,7 @@
/*
* dnn_info.h
*
- *
+ *
*/
#ifndef _OpenAPI_dnn_info_H_
@@ -38,7 +38,7 @@ OpenAPI_dnn_info_t *OpenAPI_dnn_info_create(
int invoke_nef_ind,
OpenAPI_list_t *smf_list,
int same_smf_ind
- );
+);
void OpenAPI_dnn_info_free(OpenAPI_dnn_info_t *dnn_info);
OpenAPI_dnn_info_t *OpenAPI_dnn_info_parseFromJSON(cJSON *dnn_infoJSON);
cJSON *OpenAPI_dnn_info_convertToJSON(OpenAPI_dnn_info_t *dnn_info);
diff --git a/lib/sbi/openapi/model/dnn_route_selection_descriptor.c b/lib/sbi/openapi/model/dnn_route_selection_descriptor.c
index 0b9a7bde4..3eadf9de5 100644
--- a/lib/sbi/openapi/model/dnn_route_selection_descriptor.c
+++ b/lib/sbi/openapi/model/dnn_route_selection_descriptor.c
@@ -7,8 +7,9 @@
OpenAPI_dnn_route_selection_descriptor_t *OpenAPI_dnn_route_selection_descriptor_create(
char *dnn,
OpenAPI_list_t *ssc_modes,
- OpenAPI_list_t *pdu_sess_types
- )
+ OpenAPI_list_t *pdu_sess_types,
+ int atsss_info
+)
{
OpenAPI_dnn_route_selection_descriptor_t *dnn_route_selection_descriptor_local_var = OpenAPI_malloc(sizeof(OpenAPI_dnn_route_selection_descriptor_t));
if (!dnn_route_selection_descriptor_local_var) {
@@ -17,6 +18,7 @@ OpenAPI_dnn_route_selection_descriptor_t *OpenAPI_dnn_route_selection_descriptor
dnn_route_selection_descriptor_local_var->dnn = dnn;
dnn_route_selection_descriptor_local_var->ssc_modes = ssc_modes;
dnn_route_selection_descriptor_local_var->pdu_sess_types = pdu_sess_types;
+ dnn_route_selection_descriptor_local_var->atsss_info = atsss_info;
return dnn_route_selection_descriptor_local_var;
}
@@ -49,33 +51,40 @@ cJSON *OpenAPI_dnn_route_selection_descriptor_convertToJSON(OpenAPI_dnn_route_se
}
if (dnn_route_selection_descriptor->ssc_modes) {
- cJSON *ssc_modes = cJSON_AddArrayToObject(item, "sscModes");
- if (ssc_modes == NULL) {
+ cJSON *ssc_modes = cJSON_AddArrayToObject(item, "sscModes");
+ if (ssc_modes == NULL) {
+ ogs_error("OpenAPI_dnn_route_selection_descriptor_convertToJSON() failed [ssc_modes]");
+ goto end;
+ }
+ OpenAPI_lnode_t *ssc_modes_node;
+ OpenAPI_list_for_each(dnn_route_selection_descriptor->ssc_modes, ssc_modes_node) {
+ if (cJSON_AddStringToObject(ssc_modes, "", OpenAPI_ssc_mode_ToString((intptr_t)ssc_modes_node->data)) == NULL) {
ogs_error("OpenAPI_dnn_route_selection_descriptor_convertToJSON() failed [ssc_modes]");
goto end;
}
- OpenAPI_lnode_t *ssc_modes_node;
- OpenAPI_list_for_each(dnn_route_selection_descriptor->ssc_modes, ssc_modes_node) {
- if (cJSON_AddStringToObject(ssc_modes, "", OpenAPI_ssc_mode_ToString((intptr_t)ssc_modes_node->data)) == NULL) {
- ogs_error("OpenAPI_dnn_route_selection_descriptor_convertToJSON() failed [ssc_modes]");
- goto end;
- }
- }
+ }
}
if (dnn_route_selection_descriptor->pdu_sess_types) {
- cJSON *pdu_sess_types = cJSON_AddArrayToObject(item, "pduSessTypes");
- if (pdu_sess_types == NULL) {
+ cJSON *pdu_sess_types = cJSON_AddArrayToObject(item, "pduSessTypes");
+ if (pdu_sess_types == NULL) {
+ ogs_error("OpenAPI_dnn_route_selection_descriptor_convertToJSON() failed [pdu_sess_types]");
+ goto end;
+ }
+ OpenAPI_lnode_t *pdu_sess_types_node;
+ OpenAPI_list_for_each(dnn_route_selection_descriptor->pdu_sess_types, pdu_sess_types_node) {
+ if (cJSON_AddStringToObject(pdu_sess_types, "", OpenAPI_pdu_session_type_ToString((intptr_t)pdu_sess_types_node->data)) == NULL) {
ogs_error("OpenAPI_dnn_route_selection_descriptor_convertToJSON() failed [pdu_sess_types]");
goto end;
}
- OpenAPI_lnode_t *pdu_sess_types_node;
- OpenAPI_list_for_each(dnn_route_selection_descriptor->pdu_sess_types, pdu_sess_types_node) {
- if (cJSON_AddStringToObject(pdu_sess_types, "", OpenAPI_pdu_session_type_ToString((intptr_t)pdu_sess_types_node->data)) == NULL) {
- ogs_error("OpenAPI_dnn_route_selection_descriptor_convertToJSON() failed [pdu_sess_types]");
- goto end;
- }
- }
+ }
+ }
+
+ if (dnn_route_selection_descriptor->atsss_info) {
+ if (cJSON_AddBoolToObject(item, "atsssInfo", dnn_route_selection_descriptor->atsss_info) == NULL) {
+ ogs_error("OpenAPI_dnn_route_selection_descriptor_convertToJSON() failed [atsss_info]");
+ goto end;
+ }
}
end:
@@ -91,7 +100,7 @@ OpenAPI_dnn_route_selection_descriptor_t *OpenAPI_dnn_route_selection_descriptor
goto end;
}
-
+
if (!cJSON_IsString(dnn)) {
ogs_error("OpenAPI_dnn_route_selection_descriptor_parseFromJSON() failed [dnn]");
goto end;
@@ -100,52 +109,62 @@ OpenAPI_dnn_route_selection_descriptor_t *OpenAPI_dnn_route_selection_descriptor
cJSON *ssc_modes = cJSON_GetObjectItemCaseSensitive(dnn_route_selection_descriptorJSON, "sscModes");
OpenAPI_list_t *ssc_modesList;
- if (ssc_modes) {
- cJSON *ssc_modes_local_nonprimitive;
- if (!cJSON_IsArray(ssc_modes)) {
+ if (ssc_modes) {
+ cJSON *ssc_modes_local_nonprimitive;
+ if (!cJSON_IsArray(ssc_modes)) {
+ ogs_error("OpenAPI_dnn_route_selection_descriptor_parseFromJSON() failed [ssc_modes]");
+ goto end;
+ }
+
+ ssc_modesList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(ssc_modes_local_nonprimitive, ssc_modes ) {
+ if (!cJSON_IsString(ssc_modes_local_nonprimitive)){
ogs_error("OpenAPI_dnn_route_selection_descriptor_parseFromJSON() failed [ssc_modes]");
goto end;
}
- ssc_modesList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(ssc_modes_local_nonprimitive, ssc_modes ) {
- if (!cJSON_IsString(ssc_modes_local_nonprimitive)) {
- ogs_error("OpenAPI_dnn_route_selection_descriptor_parseFromJSON() failed [ssc_modes]");
- goto end;
- }
-
- OpenAPI_list_add(ssc_modesList, (void *)OpenAPI_ssc_mode_FromString(ssc_modes_local_nonprimitive->valuestring));
- }
+ OpenAPI_list_add(ssc_modesList, (void *)OpenAPI_ssc_mode_FromString(ssc_modes_local_nonprimitive->valuestring));
+ }
}
cJSON *pdu_sess_types = cJSON_GetObjectItemCaseSensitive(dnn_route_selection_descriptorJSON, "pduSessTypes");
OpenAPI_list_t *pdu_sess_typesList;
- if (pdu_sess_types) {
- cJSON *pdu_sess_types_local_nonprimitive;
- if (!cJSON_IsArray(pdu_sess_types)) {
+ if (pdu_sess_types) {
+ cJSON *pdu_sess_types_local_nonprimitive;
+ if (!cJSON_IsArray(pdu_sess_types)) {
+ ogs_error("OpenAPI_dnn_route_selection_descriptor_parseFromJSON() failed [pdu_sess_types]");
+ goto end;
+ }
+
+ pdu_sess_typesList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(pdu_sess_types_local_nonprimitive, pdu_sess_types ) {
+ if (!cJSON_IsString(pdu_sess_types_local_nonprimitive)){
ogs_error("OpenAPI_dnn_route_selection_descriptor_parseFromJSON() failed [pdu_sess_types]");
goto end;
}
- pdu_sess_typesList = OpenAPI_list_create();
+ OpenAPI_list_add(pdu_sess_typesList, (void *)OpenAPI_pdu_session_type_FromString(pdu_sess_types_local_nonprimitive->valuestring));
+ }
+ }
- cJSON_ArrayForEach(pdu_sess_types_local_nonprimitive, pdu_sess_types ) {
- if (!cJSON_IsString(pdu_sess_types_local_nonprimitive)) {
- ogs_error("OpenAPI_dnn_route_selection_descriptor_parseFromJSON() failed [pdu_sess_types]");
- goto end;
- }
+ cJSON *atsss_info = cJSON_GetObjectItemCaseSensitive(dnn_route_selection_descriptorJSON, "atsssInfo");
- OpenAPI_list_add(pdu_sess_typesList, (void *)OpenAPI_pdu_session_type_FromString(pdu_sess_types_local_nonprimitive->valuestring));
- }
+ if (atsss_info) {
+ if (!cJSON_IsBool(atsss_info)) {
+ ogs_error("OpenAPI_dnn_route_selection_descriptor_parseFromJSON() failed [atsss_info]");
+ goto end;
+ }
}
dnn_route_selection_descriptor_local_var = OpenAPI_dnn_route_selection_descriptor_create (
ogs_strdup_or_assert(dnn->valuestring),
ssc_modes ? ssc_modesList : NULL,
- pdu_sess_types ? pdu_sess_typesList : NULL
- );
+ pdu_sess_types ? pdu_sess_typesList : NULL,
+ atsss_info ? atsss_info->valueint : 0
+ );
return dnn_route_selection_descriptor_local_var;
end:
diff --git a/lib/sbi/openapi/model/dnn_route_selection_descriptor.h b/lib/sbi/openapi/model/dnn_route_selection_descriptor.h
index 90ae94b65..05ab68e49 100644
--- a/lib/sbi/openapi/model/dnn_route_selection_descriptor.h
+++ b/lib/sbi/openapi/model/dnn_route_selection_descriptor.h
@@ -1,7 +1,7 @@
/*
* dnn_route_selection_descriptor.h
*
- * Contains the route selector parameters (PDU session types and SSC modes) per DNN
+ * Contains the route selector parameters (PDU session types, SSC modes and ATSSS information) per DNN
*/
#ifndef _OpenAPI_dnn_route_selection_descriptor_H_
@@ -24,13 +24,15 @@ typedef struct OpenAPI_dnn_route_selection_descriptor_s {
char *dnn;
OpenAPI_list_t *ssc_modes;
OpenAPI_list_t *pdu_sess_types;
+ int atsss_info;
} OpenAPI_dnn_route_selection_descriptor_t;
OpenAPI_dnn_route_selection_descriptor_t *OpenAPI_dnn_route_selection_descriptor_create(
char *dnn,
OpenAPI_list_t *ssc_modes,
- OpenAPI_list_t *pdu_sess_types
- );
+ OpenAPI_list_t *pdu_sess_types,
+ int atsss_info
+);
void OpenAPI_dnn_route_selection_descriptor_free(OpenAPI_dnn_route_selection_descriptor_t *dnn_route_selection_descriptor);
OpenAPI_dnn_route_selection_descriptor_t *OpenAPI_dnn_route_selection_descriptor_parseFromJSON(cJSON *dnn_route_selection_descriptorJSON);
cJSON *OpenAPI_dnn_route_selection_descriptor_convertToJSON(OpenAPI_dnn_route_selection_descriptor_t *dnn_route_selection_descriptor);
diff --git a/lib/sbi/openapi/model/dnn_selection_mode.h b/lib/sbi/openapi/model/dnn_selection_mode.h
index 576528ef0..5843cad6e 100644
--- a/lib/sbi/openapi/model/dnn_selection_mode.h
+++ b/lib/sbi/openapi/model/dnn_selection_mode.h
@@ -1,7 +1,7 @@
/*
* dnn_selection_mode.h
*
- *
+ *
*/
#ifndef _OpenAPI_dnn_selection_mode_H_
diff --git a/lib/sbi/openapi/model/dnn_smf_info_item.c b/lib/sbi/openapi/model/dnn_smf_info_item.c
index 780a87785..7f99afa1d 100644
--- a/lib/sbi/openapi/model/dnn_smf_info_item.c
+++ b/lib/sbi/openapi/model/dnn_smf_info_item.c
@@ -6,7 +6,7 @@
OpenAPI_dnn_smf_info_item_t *OpenAPI_dnn_smf_info_item_create(
char *dnn
- )
+)
{
OpenAPI_dnn_smf_info_item_t *dnn_smf_info_item_local_var = OpenAPI_malloc(sizeof(OpenAPI_dnn_smf_info_item_t));
if (!dnn_smf_info_item_local_var) {
@@ -55,7 +55,7 @@ OpenAPI_dnn_smf_info_item_t *OpenAPI_dnn_smf_info_item_parseFromJSON(cJSON *dnn_
goto end;
}
-
+
if (!cJSON_IsString(dnn)) {
ogs_error("OpenAPI_dnn_smf_info_item_parseFromJSON() failed [dnn]");
goto end;
@@ -63,7 +63,7 @@ OpenAPI_dnn_smf_info_item_t *OpenAPI_dnn_smf_info_item_parseFromJSON(cJSON *dnn_
dnn_smf_info_item_local_var = OpenAPI_dnn_smf_info_item_create (
ogs_strdup_or_assert(dnn->valuestring)
- );
+ );
return dnn_smf_info_item_local_var;
end:
diff --git a/lib/sbi/openapi/model/dnn_smf_info_item.h b/lib/sbi/openapi/model/dnn_smf_info_item.h
index 128f058e4..299f3daa3 100644
--- a/lib/sbi/openapi/model/dnn_smf_info_item.h
+++ b/lib/sbi/openapi/model/dnn_smf_info_item.h
@@ -24,7 +24,7 @@ typedef struct OpenAPI_dnn_smf_info_item_s {
OpenAPI_dnn_smf_info_item_t *OpenAPI_dnn_smf_info_item_create(
char *dnn
- );
+);
void OpenAPI_dnn_smf_info_item_free(OpenAPI_dnn_smf_info_item_t *dnn_smf_info_item);
OpenAPI_dnn_smf_info_item_t *OpenAPI_dnn_smf_info_item_parseFromJSON(cJSON *dnn_smf_info_itemJSON);
cJSON *OpenAPI_dnn_smf_info_item_convertToJSON(OpenAPI_dnn_smf_info_item_t *dnn_smf_info_item);
diff --git a/lib/sbi/openapi/model/dnn_upf_info_item.c b/lib/sbi/openapi/model/dnn_upf_info_item.c
index ae5e5a689..30bf86aca 100644
--- a/lib/sbi/openapi/model/dnn_upf_info_item.c
+++ b/lib/sbi/openapi/model/dnn_upf_info_item.c
@@ -9,8 +9,9 @@ OpenAPI_dnn_upf_info_item_t *OpenAPI_dnn_upf_info_item_create(
OpenAPI_list_t *dnai_list,
OpenAPI_list_t *pdu_session_types,
OpenAPI_list_t *ipv4_address_ranges,
- OpenAPI_list_t *ipv6_prefix_ranges
- )
+ OpenAPI_list_t *ipv6_prefix_ranges,
+ OpenAPI_list_t* dnai_nw_instance_list
+)
{
OpenAPI_dnn_upf_info_item_t *dnn_upf_info_item_local_var = OpenAPI_malloc(sizeof(OpenAPI_dnn_upf_info_item_t));
if (!dnn_upf_info_item_local_var) {
@@ -21,6 +22,7 @@ OpenAPI_dnn_upf_info_item_t *OpenAPI_dnn_upf_info_item_create(
dnn_upf_info_item_local_var->pdu_session_types = pdu_session_types;
dnn_upf_info_item_local_var->ipv4_address_ranges = ipv4_address_ranges;
dnn_upf_info_item_local_var->ipv6_prefix_ranges = ipv6_prefix_ranges;
+ dnn_upf_info_item_local_var->dnai_nw_instance_list = dnai_nw_instance_list;
return dnn_upf_info_item_local_var;
}
@@ -45,6 +47,12 @@ void OpenAPI_dnn_upf_info_item_free(OpenAPI_dnn_upf_info_item_t *dnn_upf_info_it
OpenAPI_ipv6_prefix_range_free(node->data);
}
OpenAPI_list_free(dnn_upf_info_item->ipv6_prefix_ranges);
+ OpenAPI_list_for_each(dnn_upf_info_item->dnai_nw_instance_list, node) {
+ OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)node->data;
+ ogs_free(localKeyValue->value);
+ ogs_free(localKeyValue);
+ }
+ OpenAPI_list_free(dnn_upf_info_item->dnai_nw_instance_list);
ogs_free(dnn_upf_info_item);
}
@@ -64,72 +72,87 @@ cJSON *OpenAPI_dnn_upf_info_item_convertToJSON(OpenAPI_dnn_upf_info_item_t *dnn_
}
if (dnn_upf_info_item->dnai_list) {
- cJSON *dnai_list = cJSON_AddArrayToObject(item, "dnaiList");
- if (dnai_list == NULL) {
- ogs_error("OpenAPI_dnn_upf_info_item_convertToJSON() failed [dnai_list]");
- goto end;
- }
+ cJSON *dnai_list = cJSON_AddArrayToObject(item, "dnaiList");
+ if (dnai_list == NULL) {
+ ogs_error("OpenAPI_dnn_upf_info_item_convertToJSON() failed [dnai_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *dnai_list_node;
- OpenAPI_list_for_each(dnn_upf_info_item->dnai_list, dnai_list_node) {
- if (cJSON_AddStringToObject(dnai_list, "", (char*)dnai_list_node->data) == NULL) {
- ogs_error("OpenAPI_dnn_upf_info_item_convertToJSON() failed [dnai_list]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *dnai_list_node;
+ OpenAPI_list_for_each(dnn_upf_info_item->dnai_list, dnai_list_node) {
+ if (cJSON_AddStringToObject(dnai_list, "", (char*)dnai_list_node->data) == NULL) {
+ ogs_error("OpenAPI_dnn_upf_info_item_convertToJSON() failed [dnai_list]");
+ goto end;
+ }
+ }
}
if (dnn_upf_info_item->pdu_session_types) {
- cJSON *pdu_session_types = cJSON_AddArrayToObject(item, "pduSessionTypes");
- if (pdu_session_types == NULL) {
+ cJSON *pdu_session_types = cJSON_AddArrayToObject(item, "pduSessionTypes");
+ if (pdu_session_types == NULL) {
+ ogs_error("OpenAPI_dnn_upf_info_item_convertToJSON() failed [pdu_session_types]");
+ goto end;
+ }
+ OpenAPI_lnode_t *pdu_session_types_node;
+ OpenAPI_list_for_each(dnn_upf_info_item->pdu_session_types, pdu_session_types_node) {
+ if (cJSON_AddStringToObject(pdu_session_types, "", OpenAPI_pdu_session_type_ToString((intptr_t)pdu_session_types_node->data)) == NULL) {
ogs_error("OpenAPI_dnn_upf_info_item_convertToJSON() failed [pdu_session_types]");
goto end;
}
- OpenAPI_lnode_t *pdu_session_types_node;
- OpenAPI_list_for_each(dnn_upf_info_item->pdu_session_types, pdu_session_types_node) {
- if (cJSON_AddStringToObject(pdu_session_types, "", OpenAPI_pdu_session_type_ToString((intptr_t)pdu_session_types_node->data)) == NULL) {
- ogs_error("OpenAPI_dnn_upf_info_item_convertToJSON() failed [pdu_session_types]");
- goto end;
- }
- }
+ }
}
if (dnn_upf_info_item->ipv4_address_ranges) {
- cJSON *ipv4_address_rangesList = cJSON_AddArrayToObject(item, "ipv4AddressRanges");
- if (ipv4_address_rangesList == NULL) {
- ogs_error("OpenAPI_dnn_upf_info_item_convertToJSON() failed [ipv4_address_ranges]");
- goto end;
- }
+ cJSON *ipv4_address_rangesList = cJSON_AddArrayToObject(item, "ipv4AddressRanges");
+ if (ipv4_address_rangesList == NULL) {
+ ogs_error("OpenAPI_dnn_upf_info_item_convertToJSON() failed [ipv4_address_ranges]");
+ goto end;
+ }
- OpenAPI_lnode_t *ipv4_address_ranges_node;
- if (dnn_upf_info_item->ipv4_address_ranges) {
- OpenAPI_list_for_each(dnn_upf_info_item->ipv4_address_ranges, ipv4_address_ranges_node) {
- cJSON *itemLocal = OpenAPI_ipv4_address_range_convertToJSON(ipv4_address_ranges_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_dnn_upf_info_item_convertToJSON() failed [ipv4_address_ranges]");
- goto end;
- }
- cJSON_AddItemToArray(ipv4_address_rangesList, itemLocal);
+ OpenAPI_lnode_t *ipv4_address_ranges_node;
+ if (dnn_upf_info_item->ipv4_address_ranges) {
+ OpenAPI_list_for_each(dnn_upf_info_item->ipv4_address_ranges, ipv4_address_ranges_node) {
+ cJSON *itemLocal = OpenAPI_ipv4_address_range_convertToJSON(ipv4_address_ranges_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_dnn_upf_info_item_convertToJSON() failed [ipv4_address_ranges]");
+ goto end;
}
+ cJSON_AddItemToArray(ipv4_address_rangesList, itemLocal);
}
}
+ }
if (dnn_upf_info_item->ipv6_prefix_ranges) {
- cJSON *ipv6_prefix_rangesList = cJSON_AddArrayToObject(item, "ipv6PrefixRanges");
- if (ipv6_prefix_rangesList == NULL) {
- ogs_error("OpenAPI_dnn_upf_info_item_convertToJSON() failed [ipv6_prefix_ranges]");
- goto end;
- }
+ cJSON *ipv6_prefix_rangesList = cJSON_AddArrayToObject(item, "ipv6PrefixRanges");
+ if (ipv6_prefix_rangesList == NULL) {
+ ogs_error("OpenAPI_dnn_upf_info_item_convertToJSON() failed [ipv6_prefix_ranges]");
+ goto end;
+ }
- OpenAPI_lnode_t *ipv6_prefix_ranges_node;
- if (dnn_upf_info_item->ipv6_prefix_ranges) {
- OpenAPI_list_for_each(dnn_upf_info_item->ipv6_prefix_ranges, ipv6_prefix_ranges_node) {
- cJSON *itemLocal = OpenAPI_ipv6_prefix_range_convertToJSON(ipv6_prefix_ranges_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_dnn_upf_info_item_convertToJSON() failed [ipv6_prefix_ranges]");
- goto end;
- }
- cJSON_AddItemToArray(ipv6_prefix_rangesList, itemLocal);
+ OpenAPI_lnode_t *ipv6_prefix_ranges_node;
+ if (dnn_upf_info_item->ipv6_prefix_ranges) {
+ OpenAPI_list_for_each(dnn_upf_info_item->ipv6_prefix_ranges, ipv6_prefix_ranges_node) {
+ cJSON *itemLocal = OpenAPI_ipv6_prefix_range_convertToJSON(ipv6_prefix_ranges_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_dnn_upf_info_item_convertToJSON() failed [ipv6_prefix_ranges]");
+ goto end;
+ }
+ cJSON_AddItemToArray(ipv6_prefix_rangesList, itemLocal);
+ }
+ }
+ }
+
+ if (dnn_upf_info_item->dnai_nw_instance_list) {
+ cJSON *dnai_nw_instance_list = cJSON_AddObjectToObject(item, "dnaiNwInstanceList");
+ if (dnai_nw_instance_list == NULL) {
+ ogs_error("OpenAPI_dnn_upf_info_item_convertToJSON() failed [dnai_nw_instance_list]");
+ goto end;
+ }
+ cJSON *localMapObject = dnai_nw_instance_list;
+ OpenAPI_lnode_t *dnai_nw_instance_list_node;
+ if (dnn_upf_info_item->dnai_nw_instance_list) {
+ OpenAPI_list_for_each(dnn_upf_info_item->dnai_nw_instance_list, dnai_nw_instance_list_node) {
+ OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)dnai_nw_instance_list_node->data;
}
}
}
@@ -147,7 +170,7 @@ OpenAPI_dnn_upf_info_item_t *OpenAPI_dnn_upf_info_item_parseFromJSON(cJSON *dnn_
goto end;
}
-
+
if (!cJSON_IsString(dnn)) {
ogs_error("OpenAPI_dnn_upf_info_item_parseFromJSON() failed [dnn]");
goto end;
@@ -156,89 +179,106 @@ OpenAPI_dnn_upf_info_item_t *OpenAPI_dnn_upf_info_item_parseFromJSON(cJSON *dnn_
cJSON *dnai_list = cJSON_GetObjectItemCaseSensitive(dnn_upf_info_itemJSON, "dnaiList");
OpenAPI_list_t *dnai_listList;
- if (dnai_list) {
- cJSON *dnai_list_local;
- if (!cJSON_IsArray(dnai_list)) {
- ogs_error("OpenAPI_dnn_upf_info_item_parseFromJSON() failed [dnai_list]");
- goto end;
- }
- dnai_listList = OpenAPI_list_create();
+ if (dnai_list) {
+ cJSON *dnai_list_local;
+ if (!cJSON_IsArray(dnai_list)) {
+ ogs_error("OpenAPI_dnn_upf_info_item_parseFromJSON() failed [dnai_list]");
+ goto end;
+ }
+ dnai_listList = OpenAPI_list_create();
- cJSON_ArrayForEach(dnai_list_local, dnai_list) {
- if (!cJSON_IsString(dnai_list_local)) {
- ogs_error("OpenAPI_dnn_upf_info_item_parseFromJSON() failed [dnai_list]");
- goto end;
- }
- OpenAPI_list_add(dnai_listList, ogs_strdup_or_assert(dnai_list_local->valuestring));
- }
+ cJSON_ArrayForEach(dnai_list_local, dnai_list) {
+ if (!cJSON_IsString(dnai_list_local)) {
+ ogs_error("OpenAPI_dnn_upf_info_item_parseFromJSON() failed [dnai_list]");
+ goto end;
+ }
+ OpenAPI_list_add(dnai_listList , ogs_strdup_or_assert(dnai_list_local->valuestring));
+ }
}
cJSON *pdu_session_types = cJSON_GetObjectItemCaseSensitive(dnn_upf_info_itemJSON, "pduSessionTypes");
OpenAPI_list_t *pdu_session_typesList;
- if (pdu_session_types) {
- cJSON *pdu_session_types_local_nonprimitive;
- if (!cJSON_IsArray(pdu_session_types)) {
+ if (pdu_session_types) {
+ cJSON *pdu_session_types_local_nonprimitive;
+ if (!cJSON_IsArray(pdu_session_types)) {
+ ogs_error("OpenAPI_dnn_upf_info_item_parseFromJSON() failed [pdu_session_types]");
+ goto end;
+ }
+
+ pdu_session_typesList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(pdu_session_types_local_nonprimitive, pdu_session_types ) {
+ if (!cJSON_IsString(pdu_session_types_local_nonprimitive)){
ogs_error("OpenAPI_dnn_upf_info_item_parseFromJSON() failed [pdu_session_types]");
goto end;
}
- pdu_session_typesList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(pdu_session_types_local_nonprimitive, pdu_session_types ) {
- if (!cJSON_IsString(pdu_session_types_local_nonprimitive)) {
- ogs_error("OpenAPI_dnn_upf_info_item_parseFromJSON() failed [pdu_session_types]");
- goto end;
- }
-
- OpenAPI_list_add(pdu_session_typesList, (void *)OpenAPI_pdu_session_type_FromString(pdu_session_types_local_nonprimitive->valuestring));
- }
+ OpenAPI_list_add(pdu_session_typesList, (void *)OpenAPI_pdu_session_type_FromString(pdu_session_types_local_nonprimitive->valuestring));
+ }
}
cJSON *ipv4_address_ranges = cJSON_GetObjectItemCaseSensitive(dnn_upf_info_itemJSON, "ipv4AddressRanges");
OpenAPI_list_t *ipv4_address_rangesList;
- if (ipv4_address_ranges) {
- cJSON *ipv4_address_ranges_local_nonprimitive;
- if (!cJSON_IsArray(ipv4_address_ranges)) {
+ if (ipv4_address_ranges) {
+ cJSON *ipv4_address_ranges_local_nonprimitive;
+ if (!cJSON_IsArray(ipv4_address_ranges)){
+ ogs_error("OpenAPI_dnn_upf_info_item_parseFromJSON() failed [ipv4_address_ranges]");
+ goto end;
+ }
+
+ ipv4_address_rangesList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(ipv4_address_ranges_local_nonprimitive, ipv4_address_ranges ) {
+ if (!cJSON_IsObject(ipv4_address_ranges_local_nonprimitive)) {
ogs_error("OpenAPI_dnn_upf_info_item_parseFromJSON() failed [ipv4_address_ranges]");
goto end;
}
+ OpenAPI_ipv4_address_range_t *ipv4_address_rangesItem = OpenAPI_ipv4_address_range_parseFromJSON(ipv4_address_ranges_local_nonprimitive);
- ipv4_address_rangesList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(ipv4_address_ranges_local_nonprimitive, ipv4_address_ranges ) {
- if (!cJSON_IsObject(ipv4_address_ranges_local_nonprimitive)) {
- ogs_error("OpenAPI_dnn_upf_info_item_parseFromJSON() failed [ipv4_address_ranges]");
- goto end;
- }
- OpenAPI_ipv4_address_range_t *ipv4_address_rangesItem = OpenAPI_ipv4_address_range_parseFromJSON(ipv4_address_ranges_local_nonprimitive);
-
- OpenAPI_list_add(ipv4_address_rangesList, ipv4_address_rangesItem);
- }
+ OpenAPI_list_add(ipv4_address_rangesList, ipv4_address_rangesItem);
+ }
}
cJSON *ipv6_prefix_ranges = cJSON_GetObjectItemCaseSensitive(dnn_upf_info_itemJSON, "ipv6PrefixRanges");
OpenAPI_list_t *ipv6_prefix_rangesList;
- if (ipv6_prefix_ranges) {
- cJSON *ipv6_prefix_ranges_local_nonprimitive;
- if (!cJSON_IsArray(ipv6_prefix_ranges)) {
+ if (ipv6_prefix_ranges) {
+ cJSON *ipv6_prefix_ranges_local_nonprimitive;
+ if (!cJSON_IsArray(ipv6_prefix_ranges)){
+ ogs_error("OpenAPI_dnn_upf_info_item_parseFromJSON() failed [ipv6_prefix_ranges]");
+ goto end;
+ }
+
+ ipv6_prefix_rangesList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(ipv6_prefix_ranges_local_nonprimitive, ipv6_prefix_ranges ) {
+ if (!cJSON_IsObject(ipv6_prefix_ranges_local_nonprimitive)) {
ogs_error("OpenAPI_dnn_upf_info_item_parseFromJSON() failed [ipv6_prefix_ranges]");
goto end;
}
+ OpenAPI_ipv6_prefix_range_t *ipv6_prefix_rangesItem = OpenAPI_ipv6_prefix_range_parseFromJSON(ipv6_prefix_ranges_local_nonprimitive);
- ipv6_prefix_rangesList = OpenAPI_list_create();
+ OpenAPI_list_add(ipv6_prefix_rangesList, ipv6_prefix_rangesItem);
+ }
+ }
- cJSON_ArrayForEach(ipv6_prefix_ranges_local_nonprimitive, ipv6_prefix_ranges ) {
- if (!cJSON_IsObject(ipv6_prefix_ranges_local_nonprimitive)) {
- ogs_error("OpenAPI_dnn_upf_info_item_parseFromJSON() failed [ipv6_prefix_ranges]");
- goto end;
- }
- OpenAPI_ipv6_prefix_range_t *ipv6_prefix_rangesItem = OpenAPI_ipv6_prefix_range_parseFromJSON(ipv6_prefix_ranges_local_nonprimitive);
+ cJSON *dnai_nw_instance_list = cJSON_GetObjectItemCaseSensitive(dnn_upf_info_itemJSON, "dnaiNwInstanceList");
- OpenAPI_list_add(ipv6_prefix_rangesList, ipv6_prefix_rangesItem);
- }
+ OpenAPI_list_t *dnai_nw_instance_listList;
+ if (dnai_nw_instance_list) {
+ cJSON *dnai_nw_instance_list_local_map;
+ if (!cJSON_IsObject(dnai_nw_instance_list)) {
+ ogs_error("OpenAPI_dnn_upf_info_item_parseFromJSON() failed [dnai_nw_instance_list]");
+ goto end;
+ }
+ dnai_nw_instance_listList = OpenAPI_list_create();
+ OpenAPI_map_t *localMapKeyPair = NULL;
+ cJSON_ArrayForEach(dnai_nw_instance_list_local_map, dnai_nw_instance_list) {
+ cJSON *localMapObject = dnai_nw_instance_list_local_map;
+ OpenAPI_list_add(dnai_nw_instance_listList , localMapKeyPair);
+ }
}
dnn_upf_info_item_local_var = OpenAPI_dnn_upf_info_item_create (
@@ -246,8 +286,9 @@ OpenAPI_dnn_upf_info_item_t *OpenAPI_dnn_upf_info_item_parseFromJSON(cJSON *dnn_
dnai_list ? dnai_listList : NULL,
pdu_session_types ? pdu_session_typesList : NULL,
ipv4_address_ranges ? ipv4_address_rangesList : NULL,
- ipv6_prefix_ranges ? ipv6_prefix_rangesList : NULL
- );
+ ipv6_prefix_ranges ? ipv6_prefix_rangesList : NULL,
+ dnai_nw_instance_list ? dnai_nw_instance_listList : NULL
+ );
return dnn_upf_info_item_local_var;
end:
diff --git a/lib/sbi/openapi/model/dnn_upf_info_item.h b/lib/sbi/openapi/model/dnn_upf_info_item.h
index d409fcbf2..3f4a0b624 100644
--- a/lib/sbi/openapi/model/dnn_upf_info_item.h
+++ b/lib/sbi/openapi/model/dnn_upf_info_item.h
@@ -27,6 +27,7 @@ typedef struct OpenAPI_dnn_upf_info_item_s {
OpenAPI_list_t *pdu_session_types;
OpenAPI_list_t *ipv4_address_ranges;
OpenAPI_list_t *ipv6_prefix_ranges;
+ OpenAPI_list_t* dnai_nw_instance_list;
} OpenAPI_dnn_upf_info_item_t;
OpenAPI_dnn_upf_info_item_t *OpenAPI_dnn_upf_info_item_create(
@@ -34,8 +35,9 @@ OpenAPI_dnn_upf_info_item_t *OpenAPI_dnn_upf_info_item_create(
OpenAPI_list_t *dnai_list,
OpenAPI_list_t *pdu_session_types,
OpenAPI_list_t *ipv4_address_ranges,
- OpenAPI_list_t *ipv6_prefix_ranges
- );
+ OpenAPI_list_t *ipv6_prefix_ranges,
+ OpenAPI_list_t* dnai_nw_instance_list
+);
void OpenAPI_dnn_upf_info_item_free(OpenAPI_dnn_upf_info_item_t *dnn_upf_info_item);
OpenAPI_dnn_upf_info_item_t *OpenAPI_dnn_upf_info_item_parseFromJSON(cJSON *dnn_upf_info_itemJSON);
cJSON *OpenAPI_dnn_upf_info_item_convertToJSON(OpenAPI_dnn_upf_info_item_t *dnn_upf_info_item);
diff --git a/lib/sbi/openapi/model/domain_name_protocol.c b/lib/sbi/openapi/model/domain_name_protocol.c
index c79b800dd..9897d605d 100644
--- a/lib/sbi/openapi/model/domain_name_protocol.c
+++ b/lib/sbi/openapi/model/domain_name_protocol.c
@@ -5,7 +5,7 @@
#include "domain_name_protocol.h"
OpenAPI_domain_name_protocol_t *OpenAPI_domain_name_protocol_create(
- )
+)
{
OpenAPI_domain_name_protocol_t *domain_name_protocol_local_var = OpenAPI_malloc(sizeof(OpenAPI_domain_name_protocol_t));
if (!domain_name_protocol_local_var) {
@@ -42,7 +42,7 @@ OpenAPI_domain_name_protocol_t *OpenAPI_domain_name_protocol_parseFromJSON(cJSON
{
OpenAPI_domain_name_protocol_t *domain_name_protocol_local_var = NULL;
domain_name_protocol_local_var = OpenAPI_domain_name_protocol_create (
- );
+ );
return domain_name_protocol_local_var;
end:
diff --git a/lib/sbi/openapi/model/domain_name_protocol.h b/lib/sbi/openapi/model/domain_name_protocol.h
index 1e3d83dd0..136558627 100644
--- a/lib/sbi/openapi/model/domain_name_protocol.h
+++ b/lib/sbi/openapi/model/domain_name_protocol.h
@@ -1,7 +1,7 @@
/*
* domain_name_protocol.h
*
- * Possible values are - DNS_QNAME: Identifies the DNS protocol and the question name in DNS query. - TLS_SNI: Identifies the Server Name Indication in TLS ClientHello message. - TLS_SAN: Identifies the Subject Alternative Name in TLS ServerCertificate message. - TLS_SCN: Identifies the Subject Common Name in TLS ServerCertificate message.
+ * Possible values are - DNS_QNAME: Identifies the DNS protocol and the question name in DNS query. - TLS_SNI: Identifies the Server Name Indication in TLS ClientHello message. - TLS_SAN: Identifies the Subject Alternative Name in TLS ServerCertificate message. - TLS_SCN: Identifies the Subject Common Name in TLS ServerCertificate message.
*/
#ifndef _OpenAPI_domain_name_protocol_H_
@@ -12,6 +12,7 @@
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
+#include "domain_name_protocol_any_of.h"
#ifdef __cplusplus
extern "C" {
@@ -22,7 +23,7 @@ typedef struct OpenAPI_domain_name_protocol_s {
} OpenAPI_domain_name_protocol_t;
OpenAPI_domain_name_protocol_t *OpenAPI_domain_name_protocol_create(
- );
+);
void OpenAPI_domain_name_protocol_free(OpenAPI_domain_name_protocol_t *domain_name_protocol);
OpenAPI_domain_name_protocol_t *OpenAPI_domain_name_protocol_parseFromJSON(cJSON *domain_name_protocolJSON);
cJSON *OpenAPI_domain_name_protocol_convertToJSON(OpenAPI_domain_name_protocol_t *domain_name_protocol);
diff --git a/lib/sbi/openapi/model/domain_name_protocol_any_of.c b/lib/sbi/openapi/model/domain_name_protocol_any_of.c
new file mode 100644
index 000000000..76a80bcdf
--- /dev/null
+++ b/lib/sbi/openapi/model/domain_name_protocol_any_of.c
@@ -0,0 +1,30 @@
+
+#include
+#include
+#include
+#include "domain_name_protocol_any_of.h"
+
+char* OpenAPI_domain_name_protocol_any_of_ToString(OpenAPI_domain_name_protocol_any_of_e domain_name_protocol_any_of)
+{
+ const char *domain_name_protocol_any_ofArray[] = { "NULL", "DNS_QNAME", "TLS_SNI", "TLS_SAN", "TSL_SCN" };
+ size_t sizeofArray = sizeof(domain_name_protocol_any_ofArray) / sizeof(domain_name_protocol_any_ofArray[0]);
+ if (domain_name_protocol_any_of < sizeofArray)
+ return (char *)domain_name_protocol_any_ofArray[domain_name_protocol_any_of];
+ else
+ return (char *)"Unknown";
+}
+
+OpenAPI_domain_name_protocol_any_of_e OpenAPI_domain_name_protocol_any_of_FromString(char* domain_name_protocol_any_of)
+{
+ int stringToReturn = 0;
+ const char *domain_name_protocol_any_ofArray[] = { "NULL", "DNS_QNAME", "TLS_SNI", "TLS_SAN", "TSL_SCN" };
+ size_t sizeofArray = sizeof(domain_name_protocol_any_ofArray) / sizeof(domain_name_protocol_any_ofArray[0]);
+ while (stringToReturn < sizeofArray) {
+ if (strcmp(domain_name_protocol_any_of, domain_name_protocol_any_ofArray[stringToReturn]) == 0) {
+ return stringToReturn;
+ }
+ stringToReturn++;
+ }
+ return 0;
+}
+
diff --git a/lib/sbi/openapi/model/domain_name_protocol_any_of.h b/lib/sbi/openapi/model/domain_name_protocol_any_of.h
new file mode 100644
index 000000000..3d3540290
--- /dev/null
+++ b/lib/sbi/openapi/model/domain_name_protocol_any_of.h
@@ -0,0 +1,31 @@
+/*
+ * domain_name_protocol_any_of.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_domain_name_protocol_any_of_H_
+#define _OpenAPI_domain_name_protocol_any_of_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum { OpenAPI_domain_name_protocol_any_of_NULL = 0, OpenAPI_domain_name_protocol_any_of_DNS_QNAME, OpenAPI_domain_name_protocol_any_of_TLS_SNI, OpenAPI_domain_name_protocol_any_of_TLS_SAN, OpenAPI_domain_name_protocol_any_of_TSL_SCN } OpenAPI_domain_name_protocol_any_of_e;
+
+char* OpenAPI_domain_name_protocol_any_of_ToString(OpenAPI_domain_name_protocol_any_of_e domain_name_protocol_any_of);
+
+OpenAPI_domain_name_protocol_any_of_e OpenAPI_domain_name_protocol_any_of_FromString(char* domain_name_protocol_any_of);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_domain_name_protocol_any_of_H_ */
+
diff --git a/lib/sbi/openapi/model/downlink_data_notification_control.c b/lib/sbi/openapi/model/downlink_data_notification_control.c
new file mode 100644
index 000000000..4217348de
--- /dev/null
+++ b/lib/sbi/openapi/model/downlink_data_notification_control.c
@@ -0,0 +1,167 @@
+
+#include
+#include
+#include
+#include "downlink_data_notification_control.h"
+
+OpenAPI_downlink_data_notification_control_t *OpenAPI_downlink_data_notification_control_create(
+ OpenAPI_list_t *notif_ctrl_inds,
+ OpenAPI_list_t *types_of_notif
+)
+{
+ OpenAPI_downlink_data_notification_control_t *downlink_data_notification_control_local_var = OpenAPI_malloc(sizeof(OpenAPI_downlink_data_notification_control_t));
+ if (!downlink_data_notification_control_local_var) {
+ return NULL;
+ }
+ downlink_data_notification_control_local_var->notif_ctrl_inds = notif_ctrl_inds;
+ downlink_data_notification_control_local_var->types_of_notif = types_of_notif;
+
+ return downlink_data_notification_control_local_var;
+}
+
+void OpenAPI_downlink_data_notification_control_free(OpenAPI_downlink_data_notification_control_t *downlink_data_notification_control)
+{
+ if (NULL == downlink_data_notification_control) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ OpenAPI_list_free(downlink_data_notification_control->notif_ctrl_inds);
+ OpenAPI_list_free(downlink_data_notification_control->types_of_notif);
+ ogs_free(downlink_data_notification_control);
+}
+
+cJSON *OpenAPI_downlink_data_notification_control_convertToJSON(OpenAPI_downlink_data_notification_control_t *downlink_data_notification_control)
+{
+ cJSON *item = NULL;
+
+ if (downlink_data_notification_control == NULL) {
+ ogs_error("OpenAPI_downlink_data_notification_control_convertToJSON() failed [DownlinkDataNotificationControl]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (downlink_data_notification_control->notif_ctrl_inds) {
+ cJSON *notif_ctrl_inds = cJSON_AddArrayToObject(item, "notifCtrlInds");
+ if (notif_ctrl_inds == NULL) {
+ ogs_error("OpenAPI_downlink_data_notification_control_convertToJSON() failed [notif_ctrl_inds]");
+ goto end;
+ }
+ OpenAPI_lnode_t *notif_ctrl_inds_node;
+ OpenAPI_list_for_each(downlink_data_notification_control->notif_ctrl_inds, notif_ctrl_inds_node) {
+ if (cJSON_AddStringToObject(notif_ctrl_inds, "", OpenAPI_notification_control_indication_ToString((intptr_t)notif_ctrl_inds_node->data)) == NULL) {
+ ogs_error("OpenAPI_downlink_data_notification_control_convertToJSON() failed [notif_ctrl_inds]");
+ goto end;
+ }
+ }
+ }
+
+ if (downlink_data_notification_control->types_of_notif) {
+ cJSON *types_of_notif = cJSON_AddArrayToObject(item, "typesOfNotif");
+ if (types_of_notif == NULL) {
+ ogs_error("OpenAPI_downlink_data_notification_control_convertToJSON() failed [types_of_notif]");
+ goto end;
+ }
+ OpenAPI_lnode_t *types_of_notif_node;
+ OpenAPI_list_for_each(downlink_data_notification_control->types_of_notif, types_of_notif_node) {
+ if (cJSON_AddStringToObject(types_of_notif, "", OpenAPI_dl_data_delivery_status_ToString((intptr_t)types_of_notif_node->data)) == NULL) {
+ ogs_error("OpenAPI_downlink_data_notification_control_convertToJSON() failed [types_of_notif]");
+ goto end;
+ }
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_downlink_data_notification_control_t *OpenAPI_downlink_data_notification_control_parseFromJSON(cJSON *downlink_data_notification_controlJSON)
+{
+ OpenAPI_downlink_data_notification_control_t *downlink_data_notification_control_local_var = NULL;
+ cJSON *notif_ctrl_inds = cJSON_GetObjectItemCaseSensitive(downlink_data_notification_controlJSON, "notifCtrlInds");
+
+ OpenAPI_list_t *notif_ctrl_indsList;
+ if (notif_ctrl_inds) {
+ cJSON *notif_ctrl_inds_local_nonprimitive;
+ if (!cJSON_IsArray(notif_ctrl_inds)) {
+ ogs_error("OpenAPI_downlink_data_notification_control_parseFromJSON() failed [notif_ctrl_inds]");
+ goto end;
+ }
+
+ notif_ctrl_indsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(notif_ctrl_inds_local_nonprimitive, notif_ctrl_inds ) {
+ if (!cJSON_IsString(notif_ctrl_inds_local_nonprimitive)){
+ ogs_error("OpenAPI_downlink_data_notification_control_parseFromJSON() failed [notif_ctrl_inds]");
+ goto end;
+ }
+
+ OpenAPI_list_add(notif_ctrl_indsList, (void *)OpenAPI_notification_control_indication_FromString(notif_ctrl_inds_local_nonprimitive->valuestring));
+ }
+ }
+
+ cJSON *types_of_notif = cJSON_GetObjectItemCaseSensitive(downlink_data_notification_controlJSON, "typesOfNotif");
+
+ OpenAPI_list_t *types_of_notifList;
+ if (types_of_notif) {
+ cJSON *types_of_notif_local_nonprimitive;
+ if (!cJSON_IsArray(types_of_notif)) {
+ ogs_error("OpenAPI_downlink_data_notification_control_parseFromJSON() failed [types_of_notif]");
+ goto end;
+ }
+
+ types_of_notifList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(types_of_notif_local_nonprimitive, types_of_notif ) {
+ if (!cJSON_IsString(types_of_notif_local_nonprimitive)){
+ ogs_error("OpenAPI_downlink_data_notification_control_parseFromJSON() failed [types_of_notif]");
+ goto end;
+ }
+
+ OpenAPI_list_add(types_of_notifList, (void *)OpenAPI_dl_data_delivery_status_FromString(types_of_notif_local_nonprimitive->valuestring));
+ }
+ }
+
+ downlink_data_notification_control_local_var = OpenAPI_downlink_data_notification_control_create (
+ notif_ctrl_inds ? notif_ctrl_indsList : NULL,
+ types_of_notif ? types_of_notifList : NULL
+ );
+
+ return downlink_data_notification_control_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_downlink_data_notification_control_t *OpenAPI_downlink_data_notification_control_copy(OpenAPI_downlink_data_notification_control_t *dst, OpenAPI_downlink_data_notification_control_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_downlink_data_notification_control_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_downlink_data_notification_control_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_downlink_data_notification_control_free(dst);
+ dst = OpenAPI_downlink_data_notification_control_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/downlink_data_notification_control.h b/lib/sbi/openapi/model/downlink_data_notification_control.h
new file mode 100644
index 000000000..455d93182
--- /dev/null
+++ b/lib/sbi/openapi/model/downlink_data_notification_control.h
@@ -0,0 +1,42 @@
+/*
+ * downlink_data_notification_control.h
+ *
+ * Contains the downlink data notification control information.
+ */
+
+#ifndef _OpenAPI_downlink_data_notification_control_H_
+#define _OpenAPI_downlink_data_notification_control_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+#include "dl_data_delivery_status.h"
+#include "notification_control_indication.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_downlink_data_notification_control_s OpenAPI_downlink_data_notification_control_t;
+typedef struct OpenAPI_downlink_data_notification_control_s {
+ OpenAPI_list_t *notif_ctrl_inds;
+ OpenAPI_list_t *types_of_notif;
+} OpenAPI_downlink_data_notification_control_t;
+
+OpenAPI_downlink_data_notification_control_t *OpenAPI_downlink_data_notification_control_create(
+ OpenAPI_list_t *notif_ctrl_inds,
+ OpenAPI_list_t *types_of_notif
+);
+void OpenAPI_downlink_data_notification_control_free(OpenAPI_downlink_data_notification_control_t *downlink_data_notification_control);
+OpenAPI_downlink_data_notification_control_t *OpenAPI_downlink_data_notification_control_parseFromJSON(cJSON *downlink_data_notification_controlJSON);
+cJSON *OpenAPI_downlink_data_notification_control_convertToJSON(OpenAPI_downlink_data_notification_control_t *downlink_data_notification_control);
+OpenAPI_downlink_data_notification_control_t *OpenAPI_downlink_data_notification_control_copy(OpenAPI_downlink_data_notification_control_t *dst, OpenAPI_downlink_data_notification_control_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_downlink_data_notification_control_H_ */
+
diff --git a/lib/sbi/openapi/model/downlink_data_notification_control_rm.c b/lib/sbi/openapi/model/downlink_data_notification_control_rm.c
new file mode 100644
index 000000000..60d8adcd2
--- /dev/null
+++ b/lib/sbi/openapi/model/downlink_data_notification_control_rm.c
@@ -0,0 +1,167 @@
+
+#include
+#include
+#include
+#include "downlink_data_notification_control_rm.h"
+
+OpenAPI_downlink_data_notification_control_rm_t *OpenAPI_downlink_data_notification_control_rm_create(
+ OpenAPI_list_t *notif_ctrl_inds,
+ OpenAPI_list_t *types_of_notif
+)
+{
+ OpenAPI_downlink_data_notification_control_rm_t *downlink_data_notification_control_rm_local_var = OpenAPI_malloc(sizeof(OpenAPI_downlink_data_notification_control_rm_t));
+ if (!downlink_data_notification_control_rm_local_var) {
+ return NULL;
+ }
+ downlink_data_notification_control_rm_local_var->notif_ctrl_inds = notif_ctrl_inds;
+ downlink_data_notification_control_rm_local_var->types_of_notif = types_of_notif;
+
+ return downlink_data_notification_control_rm_local_var;
+}
+
+void OpenAPI_downlink_data_notification_control_rm_free(OpenAPI_downlink_data_notification_control_rm_t *downlink_data_notification_control_rm)
+{
+ if (NULL == downlink_data_notification_control_rm) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ OpenAPI_list_free(downlink_data_notification_control_rm->notif_ctrl_inds);
+ OpenAPI_list_free(downlink_data_notification_control_rm->types_of_notif);
+ ogs_free(downlink_data_notification_control_rm);
+}
+
+cJSON *OpenAPI_downlink_data_notification_control_rm_convertToJSON(OpenAPI_downlink_data_notification_control_rm_t *downlink_data_notification_control_rm)
+{
+ cJSON *item = NULL;
+
+ if (downlink_data_notification_control_rm == NULL) {
+ ogs_error("OpenAPI_downlink_data_notification_control_rm_convertToJSON() failed [DownlinkDataNotificationControlRm]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (downlink_data_notification_control_rm->notif_ctrl_inds) {
+ cJSON *notif_ctrl_inds = cJSON_AddArrayToObject(item, "notifCtrlInds");
+ if (notif_ctrl_inds == NULL) {
+ ogs_error("OpenAPI_downlink_data_notification_control_rm_convertToJSON() failed [notif_ctrl_inds]");
+ goto end;
+ }
+ OpenAPI_lnode_t *notif_ctrl_inds_node;
+ OpenAPI_list_for_each(downlink_data_notification_control_rm->notif_ctrl_inds, notif_ctrl_inds_node) {
+ if (cJSON_AddStringToObject(notif_ctrl_inds, "", OpenAPI_notification_control_indication_ToString((intptr_t)notif_ctrl_inds_node->data)) == NULL) {
+ ogs_error("OpenAPI_downlink_data_notification_control_rm_convertToJSON() failed [notif_ctrl_inds]");
+ goto end;
+ }
+ }
+ }
+
+ if (downlink_data_notification_control_rm->types_of_notif) {
+ cJSON *types_of_notif = cJSON_AddArrayToObject(item, "typesOfNotif");
+ if (types_of_notif == NULL) {
+ ogs_error("OpenAPI_downlink_data_notification_control_rm_convertToJSON() failed [types_of_notif]");
+ goto end;
+ }
+ OpenAPI_lnode_t *types_of_notif_node;
+ OpenAPI_list_for_each(downlink_data_notification_control_rm->types_of_notif, types_of_notif_node) {
+ if (cJSON_AddStringToObject(types_of_notif, "", OpenAPI_dl_data_delivery_status_ToString((intptr_t)types_of_notif_node->data)) == NULL) {
+ ogs_error("OpenAPI_downlink_data_notification_control_rm_convertToJSON() failed [types_of_notif]");
+ goto end;
+ }
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_downlink_data_notification_control_rm_t *OpenAPI_downlink_data_notification_control_rm_parseFromJSON(cJSON *downlink_data_notification_control_rmJSON)
+{
+ OpenAPI_downlink_data_notification_control_rm_t *downlink_data_notification_control_rm_local_var = NULL;
+ cJSON *notif_ctrl_inds = cJSON_GetObjectItemCaseSensitive(downlink_data_notification_control_rmJSON, "notifCtrlInds");
+
+ OpenAPI_list_t *notif_ctrl_indsList;
+ if (notif_ctrl_inds) {
+ cJSON *notif_ctrl_inds_local_nonprimitive;
+ if (!cJSON_IsArray(notif_ctrl_inds)) {
+ ogs_error("OpenAPI_downlink_data_notification_control_rm_parseFromJSON() failed [notif_ctrl_inds]");
+ goto end;
+ }
+
+ notif_ctrl_indsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(notif_ctrl_inds_local_nonprimitive, notif_ctrl_inds ) {
+ if (!cJSON_IsString(notif_ctrl_inds_local_nonprimitive)){
+ ogs_error("OpenAPI_downlink_data_notification_control_rm_parseFromJSON() failed [notif_ctrl_inds]");
+ goto end;
+ }
+
+ OpenAPI_list_add(notif_ctrl_indsList, (void *)OpenAPI_notification_control_indication_FromString(notif_ctrl_inds_local_nonprimitive->valuestring));
+ }
+ }
+
+ cJSON *types_of_notif = cJSON_GetObjectItemCaseSensitive(downlink_data_notification_control_rmJSON, "typesOfNotif");
+
+ OpenAPI_list_t *types_of_notifList;
+ if (types_of_notif) {
+ cJSON *types_of_notif_local_nonprimitive;
+ if (!cJSON_IsArray(types_of_notif)) {
+ ogs_error("OpenAPI_downlink_data_notification_control_rm_parseFromJSON() failed [types_of_notif]");
+ goto end;
+ }
+
+ types_of_notifList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(types_of_notif_local_nonprimitive, types_of_notif ) {
+ if (!cJSON_IsString(types_of_notif_local_nonprimitive)){
+ ogs_error("OpenAPI_downlink_data_notification_control_rm_parseFromJSON() failed [types_of_notif]");
+ goto end;
+ }
+
+ OpenAPI_list_add(types_of_notifList, (void *)OpenAPI_dl_data_delivery_status_FromString(types_of_notif_local_nonprimitive->valuestring));
+ }
+ }
+
+ downlink_data_notification_control_rm_local_var = OpenAPI_downlink_data_notification_control_rm_create (
+ notif_ctrl_inds ? notif_ctrl_indsList : NULL,
+ types_of_notif ? types_of_notifList : NULL
+ );
+
+ return downlink_data_notification_control_rm_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_downlink_data_notification_control_rm_t *OpenAPI_downlink_data_notification_control_rm_copy(OpenAPI_downlink_data_notification_control_rm_t *dst, OpenAPI_downlink_data_notification_control_rm_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_downlink_data_notification_control_rm_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_downlink_data_notification_control_rm_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_downlink_data_notification_control_rm_free(dst);
+ dst = OpenAPI_downlink_data_notification_control_rm_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/downlink_data_notification_control_rm.h b/lib/sbi/openapi/model/downlink_data_notification_control_rm.h
new file mode 100644
index 000000000..40c47e536
--- /dev/null
+++ b/lib/sbi/openapi/model/downlink_data_notification_control_rm.h
@@ -0,0 +1,42 @@
+/*
+ * downlink_data_notification_control_rm.h
+ *
+ * this data type is defined in the same way as the DownlinkDataNotificationControl data type, but with the OpenAPI nullable property set to true.
+ */
+
+#ifndef _OpenAPI_downlink_data_notification_control_rm_H_
+#define _OpenAPI_downlink_data_notification_control_rm_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+#include "dl_data_delivery_status.h"
+#include "notification_control_indication.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_downlink_data_notification_control_rm_s OpenAPI_downlink_data_notification_control_rm_t;
+typedef struct OpenAPI_downlink_data_notification_control_rm_s {
+ OpenAPI_list_t *notif_ctrl_inds;
+ OpenAPI_list_t *types_of_notif;
+} OpenAPI_downlink_data_notification_control_rm_t;
+
+OpenAPI_downlink_data_notification_control_rm_t *OpenAPI_downlink_data_notification_control_rm_create(
+ OpenAPI_list_t *notif_ctrl_inds,
+ OpenAPI_list_t *types_of_notif
+);
+void OpenAPI_downlink_data_notification_control_rm_free(OpenAPI_downlink_data_notification_control_rm_t *downlink_data_notification_control_rm);
+OpenAPI_downlink_data_notification_control_rm_t *OpenAPI_downlink_data_notification_control_rm_parseFromJSON(cJSON *downlink_data_notification_control_rmJSON);
+cJSON *OpenAPI_downlink_data_notification_control_rm_convertToJSON(OpenAPI_downlink_data_notification_control_rm_t *downlink_data_notification_control_rm);
+OpenAPI_downlink_data_notification_control_rm_t *OpenAPI_downlink_data_notification_control_rm_copy(OpenAPI_downlink_data_notification_control_rm_t *dst, OpenAPI_downlink_data_notification_control_rm_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_downlink_data_notification_control_rm_H_ */
+
diff --git a/lib/sbi/openapi/model/dynamic5_qi.c b/lib/sbi/openapi/model/dynamic5_qi.c
index 21a306e6c..d8d60394d 100644
--- a/lib/sbi/openapi/model/dynamic5_qi.c
+++ b/lib/sbi/openapi/model/dynamic5_qi.c
@@ -5,7 +5,7 @@
#include "dynamic5_qi.h"
OpenAPI_dynamic5_qi_t *OpenAPI_dynamic5_qi_create(
- OpenAPI_qos_resource_type_t *resource_type,
+ OpenAPI_qos_resource_type_e resource_type,
int priority_level,
int packet_delay_budget,
char *packet_err_rate,
@@ -15,7 +15,7 @@ OpenAPI_dynamic5_qi_t *OpenAPI_dynamic5_qi_create(
int ext_packet_del_budget,
int cn_packet_delay_budget_dl,
int cn_packet_delay_budget_ul
- )
+)
{
OpenAPI_dynamic5_qi_t *dynamic5_qi_local_var = OpenAPI_malloc(sizeof(OpenAPI_dynamic5_qi_t));
if (!dynamic5_qi_local_var) {
@@ -41,7 +41,6 @@ void OpenAPI_dynamic5_qi_free(OpenAPI_dynamic5_qi_t *dynamic5_qi)
return;
}
OpenAPI_lnode_t *node;
- OpenAPI_qos_resource_type_free(dynamic5_qi->resource_type);
ogs_free(dynamic5_qi->packet_err_rate);
ogs_free(dynamic5_qi);
}
@@ -56,13 +55,7 @@ cJSON *OpenAPI_dynamic5_qi_convertToJSON(OpenAPI_dynamic5_qi_t *dynamic5_qi)
}
item = cJSON_CreateObject();
- cJSON *resource_type_local_JSON = OpenAPI_qos_resource_type_convertToJSON(dynamic5_qi->resource_type);
- if (resource_type_local_JSON == NULL) {
- ogs_error("OpenAPI_dynamic5_qi_convertToJSON() failed [resource_type]");
- goto end;
- }
- cJSON_AddItemToObject(item, "resourceType", resource_type_local_JSON);
- if (item->child == NULL) {
+ if (cJSON_AddStringToObject(item, "resourceType", OpenAPI_qos_resource_type_ToString(dynamic5_qi->resource_type)) == NULL) {
ogs_error("OpenAPI_dynamic5_qi_convertToJSON() failed [resource_type]");
goto end;
}
@@ -83,45 +76,45 @@ cJSON *OpenAPI_dynamic5_qi_convertToJSON(OpenAPI_dynamic5_qi_t *dynamic5_qi)
}
if (dynamic5_qi->aver_window) {
- if (cJSON_AddNumberToObject(item, "averWindow", dynamic5_qi->aver_window) == NULL) {
- ogs_error("OpenAPI_dynamic5_qi_convertToJSON() failed [aver_window]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "averWindow", dynamic5_qi->aver_window) == NULL) {
+ ogs_error("OpenAPI_dynamic5_qi_convertToJSON() failed [aver_window]");
+ goto end;
+ }
}
if (dynamic5_qi->max_data_burst_vol) {
- if (cJSON_AddNumberToObject(item, "maxDataBurstVol", dynamic5_qi->max_data_burst_vol) == NULL) {
- ogs_error("OpenAPI_dynamic5_qi_convertToJSON() failed [max_data_burst_vol]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "maxDataBurstVol", dynamic5_qi->max_data_burst_vol) == NULL) {
+ ogs_error("OpenAPI_dynamic5_qi_convertToJSON() failed [max_data_burst_vol]");
+ goto end;
+ }
}
if (dynamic5_qi->ext_max_data_burst_vol) {
- if (cJSON_AddNumberToObject(item, "extMaxDataBurstVol", dynamic5_qi->ext_max_data_burst_vol) == NULL) {
- ogs_error("OpenAPI_dynamic5_qi_convertToJSON() failed [ext_max_data_burst_vol]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "extMaxDataBurstVol", dynamic5_qi->ext_max_data_burst_vol) == NULL) {
+ ogs_error("OpenAPI_dynamic5_qi_convertToJSON() failed [ext_max_data_burst_vol]");
+ goto end;
+ }
}
if (dynamic5_qi->ext_packet_del_budget) {
- if (cJSON_AddNumberToObject(item, "extPacketDelBudget", dynamic5_qi->ext_packet_del_budget) == NULL) {
- ogs_error("OpenAPI_dynamic5_qi_convertToJSON() failed [ext_packet_del_budget]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "extPacketDelBudget", dynamic5_qi->ext_packet_del_budget) == NULL) {
+ ogs_error("OpenAPI_dynamic5_qi_convertToJSON() failed [ext_packet_del_budget]");
+ goto end;
+ }
}
if (dynamic5_qi->cn_packet_delay_budget_dl) {
- if (cJSON_AddNumberToObject(item, "cnPacketDelayBudgetDl", dynamic5_qi->cn_packet_delay_budget_dl) == NULL) {
- ogs_error("OpenAPI_dynamic5_qi_convertToJSON() failed [cn_packet_delay_budget_dl]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "cnPacketDelayBudgetDl", dynamic5_qi->cn_packet_delay_budget_dl) == NULL) {
+ ogs_error("OpenAPI_dynamic5_qi_convertToJSON() failed [cn_packet_delay_budget_dl]");
+ goto end;
+ }
}
if (dynamic5_qi->cn_packet_delay_budget_ul) {
- if (cJSON_AddNumberToObject(item, "cnPacketDelayBudgetUl", dynamic5_qi->cn_packet_delay_budget_ul) == NULL) {
- ogs_error("OpenAPI_dynamic5_qi_convertToJSON() failed [cn_packet_delay_budget_ul]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "cnPacketDelayBudgetUl", dynamic5_qi->cn_packet_delay_budget_ul) == NULL) {
+ ogs_error("OpenAPI_dynamic5_qi_convertToJSON() failed [cn_packet_delay_budget_ul]");
+ goto end;
+ }
}
end:
@@ -137,9 +130,13 @@ OpenAPI_dynamic5_qi_t *OpenAPI_dynamic5_qi_parseFromJSON(cJSON *dynamic5_qiJSON)
goto end;
}
- OpenAPI_qos_resource_type_t *resource_type_local_nonprim = NULL;
-
- resource_type_local_nonprim = OpenAPI_qos_resource_type_parseFromJSON(resource_type);
+ OpenAPI_qos_resource_type_e resource_typeVariable;
+
+ if (!cJSON_IsString(resource_type)) {
+ ogs_error("OpenAPI_dynamic5_qi_parseFromJSON() failed [resource_type]");
+ goto end;
+ }
+ resource_typeVariable = OpenAPI_qos_resource_type_FromString(resource_type->valuestring);
cJSON *priority_level = cJSON_GetObjectItemCaseSensitive(dynamic5_qiJSON, "priorityLevel");
if (!priority_level) {
@@ -147,7 +144,7 @@ OpenAPI_dynamic5_qi_t *OpenAPI_dynamic5_qi_parseFromJSON(cJSON *dynamic5_qiJSON)
goto end;
}
-
+
if (!cJSON_IsNumber(priority_level)) {
ogs_error("OpenAPI_dynamic5_qi_parseFromJSON() failed [priority_level]");
goto end;
@@ -159,7 +156,7 @@ OpenAPI_dynamic5_qi_t *OpenAPI_dynamic5_qi_parseFromJSON(cJSON *dynamic5_qiJSON)
goto end;
}
-
+
if (!cJSON_IsNumber(packet_delay_budget)) {
ogs_error("OpenAPI_dynamic5_qi_parseFromJSON() failed [packet_delay_budget]");
goto end;
@@ -171,7 +168,7 @@ OpenAPI_dynamic5_qi_t *OpenAPI_dynamic5_qi_parseFromJSON(cJSON *dynamic5_qiJSON)
goto end;
}
-
+
if (!cJSON_IsString(packet_err_rate)) {
ogs_error("OpenAPI_dynamic5_qi_parseFromJSON() failed [packet_err_rate]");
goto end;
@@ -179,60 +176,60 @@ OpenAPI_dynamic5_qi_t *OpenAPI_dynamic5_qi_parseFromJSON(cJSON *dynamic5_qiJSON)
cJSON *aver_window = cJSON_GetObjectItemCaseSensitive(dynamic5_qiJSON, "averWindow");
- if (aver_window) {
- if (!cJSON_IsNumber(aver_window)) {
- ogs_error("OpenAPI_dynamic5_qi_parseFromJSON() failed [aver_window]");
- goto end;
- }
+ if (aver_window) {
+ if (!cJSON_IsNumber(aver_window)) {
+ ogs_error("OpenAPI_dynamic5_qi_parseFromJSON() failed [aver_window]");
+ goto end;
+ }
}
cJSON *max_data_burst_vol = cJSON_GetObjectItemCaseSensitive(dynamic5_qiJSON, "maxDataBurstVol");
- if (max_data_burst_vol) {
- if (!cJSON_IsNumber(max_data_burst_vol)) {
- ogs_error("OpenAPI_dynamic5_qi_parseFromJSON() failed [max_data_burst_vol]");
- goto end;
- }
+ if (max_data_burst_vol) {
+ if (!cJSON_IsNumber(max_data_burst_vol)) {
+ ogs_error("OpenAPI_dynamic5_qi_parseFromJSON() failed [max_data_burst_vol]");
+ goto end;
+ }
}
cJSON *ext_max_data_burst_vol = cJSON_GetObjectItemCaseSensitive(dynamic5_qiJSON, "extMaxDataBurstVol");
- if (ext_max_data_burst_vol) {
- if (!cJSON_IsNumber(ext_max_data_burst_vol)) {
- ogs_error("OpenAPI_dynamic5_qi_parseFromJSON() failed [ext_max_data_burst_vol]");
- goto end;
- }
+ if (ext_max_data_burst_vol) {
+ if (!cJSON_IsNumber(ext_max_data_burst_vol)) {
+ ogs_error("OpenAPI_dynamic5_qi_parseFromJSON() failed [ext_max_data_burst_vol]");
+ goto end;
+ }
}
cJSON *ext_packet_del_budget = cJSON_GetObjectItemCaseSensitive(dynamic5_qiJSON, "extPacketDelBudget");
- if (ext_packet_del_budget) {
- if (!cJSON_IsNumber(ext_packet_del_budget)) {
- ogs_error("OpenAPI_dynamic5_qi_parseFromJSON() failed [ext_packet_del_budget]");
- goto end;
- }
+ if (ext_packet_del_budget) {
+ if (!cJSON_IsNumber(ext_packet_del_budget)) {
+ ogs_error("OpenAPI_dynamic5_qi_parseFromJSON() failed [ext_packet_del_budget]");
+ goto end;
+ }
}
cJSON *cn_packet_delay_budget_dl = cJSON_GetObjectItemCaseSensitive(dynamic5_qiJSON, "cnPacketDelayBudgetDl");
- if (cn_packet_delay_budget_dl) {
- if (!cJSON_IsNumber(cn_packet_delay_budget_dl)) {
- ogs_error("OpenAPI_dynamic5_qi_parseFromJSON() failed [cn_packet_delay_budget_dl]");
- goto end;
- }
+ if (cn_packet_delay_budget_dl) {
+ if (!cJSON_IsNumber(cn_packet_delay_budget_dl)) {
+ ogs_error("OpenAPI_dynamic5_qi_parseFromJSON() failed [cn_packet_delay_budget_dl]");
+ goto end;
+ }
}
cJSON *cn_packet_delay_budget_ul = cJSON_GetObjectItemCaseSensitive(dynamic5_qiJSON, "cnPacketDelayBudgetUl");
- if (cn_packet_delay_budget_ul) {
- if (!cJSON_IsNumber(cn_packet_delay_budget_ul)) {
- ogs_error("OpenAPI_dynamic5_qi_parseFromJSON() failed [cn_packet_delay_budget_ul]");
- goto end;
- }
+ if (cn_packet_delay_budget_ul) {
+ if (!cJSON_IsNumber(cn_packet_delay_budget_ul)) {
+ ogs_error("OpenAPI_dynamic5_qi_parseFromJSON() failed [cn_packet_delay_budget_ul]");
+ goto end;
+ }
}
dynamic5_qi_local_var = OpenAPI_dynamic5_qi_create (
- resource_type_local_nonprim,
+ resource_typeVariable,
priority_level->valuedouble,
packet_delay_budget->valuedouble,
ogs_strdup_or_assert(packet_err_rate->valuestring),
@@ -242,7 +239,7 @@ OpenAPI_dynamic5_qi_t *OpenAPI_dynamic5_qi_parseFromJSON(cJSON *dynamic5_qiJSON)
ext_packet_del_budget ? ext_packet_del_budget->valuedouble : 0,
cn_packet_delay_budget_dl ? cn_packet_delay_budget_dl->valuedouble : 0,
cn_packet_delay_budget_ul ? cn_packet_delay_budget_ul->valuedouble : 0
- );
+ );
return dynamic5_qi_local_var;
end:
diff --git a/lib/sbi/openapi/model/dynamic5_qi.h b/lib/sbi/openapi/model/dynamic5_qi.h
index b8c6681d2..98a6596ca 100644
--- a/lib/sbi/openapi/model/dynamic5_qi.h
+++ b/lib/sbi/openapi/model/dynamic5_qi.h
@@ -1,7 +1,7 @@
/*
* dynamic5_qi.h
*
- *
+ *
*/
#ifndef _OpenAPI_dynamic5_qi_H_
@@ -20,7 +20,7 @@ extern "C" {
typedef struct OpenAPI_dynamic5_qi_s OpenAPI_dynamic5_qi_t;
typedef struct OpenAPI_dynamic5_qi_s {
- struct OpenAPI_qos_resource_type_s *resource_type;
+ OpenAPI_qos_resource_type_e resource_type;
int priority_level;
int packet_delay_budget;
char *packet_err_rate;
@@ -33,7 +33,7 @@ typedef struct OpenAPI_dynamic5_qi_s {
} OpenAPI_dynamic5_qi_t;
OpenAPI_dynamic5_qi_t *OpenAPI_dynamic5_qi_create(
- OpenAPI_qos_resource_type_t *resource_type,
+ OpenAPI_qos_resource_type_e resource_type,
int priority_level,
int packet_delay_budget,
char *packet_err_rate,
@@ -43,7 +43,7 @@ OpenAPI_dynamic5_qi_t *OpenAPI_dynamic5_qi_create(
int ext_packet_del_budget,
int cn_packet_delay_budget_dl,
int cn_packet_delay_budget_ul
- );
+);
void OpenAPI_dynamic5_qi_free(OpenAPI_dynamic5_qi_t *dynamic5_qi);
OpenAPI_dynamic5_qi_t *OpenAPI_dynamic5_qi_parseFromJSON(cJSON *dynamic5_qiJSON);
cJSON *OpenAPI_dynamic5_qi_convertToJSON(OpenAPI_dynamic5_qi_t *dynamic5_qi);
diff --git a/lib/sbi/openapi/model/eap_session.c b/lib/sbi/openapi/model/eap_session.c
index b35ed12f7..5d91ac02d 100644
--- a/lib/sbi/openapi/model/eap_session.c
+++ b/lib/sbi/openapi/model/eap_session.c
@@ -9,8 +9,9 @@ OpenAPI_eap_session_t *OpenAPI_eap_session_create(
char *k_seaf,
OpenAPI_list_t* _links,
OpenAPI_auth_result_e auth_result,
- char *supi
- )
+ char *supi,
+ char *supported_features
+)
{
OpenAPI_eap_session_t *eap_session_local_var = OpenAPI_malloc(sizeof(OpenAPI_eap_session_t));
if (!eap_session_local_var) {
@@ -21,6 +22,7 @@ OpenAPI_eap_session_t *OpenAPI_eap_session_create(
eap_session_local_var->_links = _links;
eap_session_local_var->auth_result = auth_result;
eap_session_local_var->supi = supi;
+ eap_session_local_var->supported_features = supported_features;
return eap_session_local_var;
}
@@ -40,6 +42,7 @@ void OpenAPI_eap_session_free(OpenAPI_eap_session_t *eap_session)
}
OpenAPI_list_free(eap_session->_links);
ogs_free(eap_session->supi);
+ ogs_free(eap_session->supported_features);
ogs_free(eap_session);
}
@@ -59,45 +62,52 @@ cJSON *OpenAPI_eap_session_convertToJSON(OpenAPI_eap_session_t *eap_session)
}
if (eap_session->k_seaf) {
- if (cJSON_AddStringToObject(item, "kSeaf", eap_session->k_seaf) == NULL) {
- ogs_error("OpenAPI_eap_session_convertToJSON() failed [k_seaf]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "kSeaf", eap_session->k_seaf) == NULL) {
+ ogs_error("OpenAPI_eap_session_convertToJSON() failed [k_seaf]");
+ goto end;
+ }
}
if (eap_session->_links) {
- cJSON *_links = cJSON_AddObjectToObject(item, "_links");
- if (_links == NULL) {
+ cJSON *_links = cJSON_AddObjectToObject(item, "_links");
+ if (_links == NULL) {
+ ogs_error("OpenAPI_eap_session_convertToJSON() failed [_links]");
+ goto end;
+ }
+ cJSON *localMapObject = _links;
+ OpenAPI_lnode_t *_links_node;
+ if (eap_session->_links) {
+ OpenAPI_list_for_each(eap_session->_links, _links_node) {
+ OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)_links_node->data;
+ cJSON *itemLocal = OpenAPI_links_value_schema_convertToJSON(localKeyValue->value);
+ if (itemLocal == NULL) {
ogs_error("OpenAPI_eap_session_convertToJSON() failed [_links]");
goto end;
}
- cJSON *localMapObject = _links;
- OpenAPI_lnode_t *_links_node;
- if (eap_session->_links) {
- OpenAPI_list_for_each(eap_session->_links, _links_node) {
- OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)_links_node->data;
- cJSON *itemLocal = OpenAPI_links_value_schema_convertToJSON(localKeyValue->value);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_eap_session_convertToJSON() failed [_links]");
- goto end;
- }
- cJSON_AddItemToObject(_links, localKeyValue->key, itemLocal);
+ cJSON_AddItemToObject(_links, localKeyValue->key, itemLocal);
}
}
}
if (eap_session->auth_result) {
- if (cJSON_AddStringToObject(item, "authResult", OpenAPI_auth_result_ToString(eap_session->auth_result)) == NULL) {
- ogs_error("OpenAPI_eap_session_convertToJSON() failed [auth_result]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "authResult", OpenAPI_auth_result_ToString(eap_session->auth_result)) == NULL) {
+ ogs_error("OpenAPI_eap_session_convertToJSON() failed [auth_result]");
+ goto end;
+ }
}
if (eap_session->supi) {
- if (cJSON_AddStringToObject(item, "supi", eap_session->supi) == NULL) {
- ogs_error("OpenAPI_eap_session_convertToJSON() failed [supi]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "supi", eap_session->supi) == NULL) {
+ ogs_error("OpenAPI_eap_session_convertToJSON() failed [supi]");
+ goto end;
+ }
+ }
+
+ if (eap_session->supported_features) {
+ if (cJSON_AddStringToObject(item, "supportedFeatures", eap_session->supported_features) == NULL) {
+ ogs_error("OpenAPI_eap_session_convertToJSON() failed [supported_features]");
+ goto end;
+ }
}
end:
@@ -113,7 +123,7 @@ OpenAPI_eap_session_t *OpenAPI_eap_session_parseFromJSON(cJSON *eap_sessionJSON)
goto end;
}
-
+
if (!cJSON_IsString(eap_payload)) {
ogs_error("OpenAPI_eap_session_parseFromJSON() failed [eap_payload]");
goto end;
@@ -121,54 +131,63 @@ OpenAPI_eap_session_t *OpenAPI_eap_session_parseFromJSON(cJSON *eap_sessionJSON)
cJSON *k_seaf = cJSON_GetObjectItemCaseSensitive(eap_sessionJSON, "kSeaf");
- if (k_seaf) {
- if (!cJSON_IsString(k_seaf)) {
- ogs_error("OpenAPI_eap_session_parseFromJSON() failed [k_seaf]");
- goto end;
- }
+ if (k_seaf) {
+ if (!cJSON_IsString(k_seaf)) {
+ ogs_error("OpenAPI_eap_session_parseFromJSON() failed [k_seaf]");
+ goto end;
+ }
}
cJSON *_links = cJSON_GetObjectItemCaseSensitive(eap_sessionJSON, "_links");
OpenAPI_list_t *_linksList;
- if (_links) {
- cJSON *_links_local_map;
- if (!cJSON_IsObject(_links)) {
+ if (_links) {
+ cJSON *_links_local_map;
+ if (!cJSON_IsObject(_links)) {
+ ogs_error("OpenAPI_eap_session_parseFromJSON() failed [_links]");
+ goto end;
+ }
+ _linksList = OpenAPI_list_create();
+ OpenAPI_map_t *localMapKeyPair = NULL;
+ cJSON_ArrayForEach(_links_local_map, _links) {
+ cJSON *localMapObject = _links_local_map;
+ if (!cJSON_IsObject(_links_local_map)) {
ogs_error("OpenAPI_eap_session_parseFromJSON() failed [_links]");
goto end;
}
- _linksList = OpenAPI_list_create();
- OpenAPI_map_t *localMapKeyPair = NULL;
- cJSON_ArrayForEach(_links_local_map, _links) {
- cJSON *localMapObject = _links_local_map;
- if (!cJSON_IsObject(_links_local_map)) {
- ogs_error("OpenAPI_eap_session_parseFromJSON() failed [_links]");
- goto end;
- }
- localMapKeyPair = OpenAPI_map_create(
- localMapObject->string, OpenAPI_links_value_schema_parseFromJSON(localMapObject));
- OpenAPI_list_add(_linksList, localMapKeyPair);
- }
+ localMapKeyPair = OpenAPI_map_create(
+ localMapObject->string, OpenAPI_links_value_schema_parseFromJSON(localMapObject));
+ OpenAPI_list_add(_linksList , localMapKeyPair);
+ }
}
cJSON *auth_result = cJSON_GetObjectItemCaseSensitive(eap_sessionJSON, "authResult");
OpenAPI_auth_result_e auth_resultVariable;
- if (auth_result) {
- if (!cJSON_IsString(auth_result)) {
- ogs_error("OpenAPI_eap_session_parseFromJSON() failed [auth_result]");
- goto end;
- }
- auth_resultVariable = OpenAPI_auth_result_FromString(auth_result->valuestring);
+ if (auth_result) {
+ if (!cJSON_IsString(auth_result)) {
+ ogs_error("OpenAPI_eap_session_parseFromJSON() failed [auth_result]");
+ goto end;
+ }
+ auth_resultVariable = OpenAPI_auth_result_FromString(auth_result->valuestring);
}
cJSON *supi = cJSON_GetObjectItemCaseSensitive(eap_sessionJSON, "supi");
- if (supi) {
- if (!cJSON_IsString(supi)) {
- ogs_error("OpenAPI_eap_session_parseFromJSON() failed [supi]");
- goto end;
- }
+ if (supi) {
+ if (!cJSON_IsString(supi)) {
+ ogs_error("OpenAPI_eap_session_parseFromJSON() failed [supi]");
+ goto end;
+ }
+ }
+
+ cJSON *supported_features = cJSON_GetObjectItemCaseSensitive(eap_sessionJSON, "supportedFeatures");
+
+ if (supported_features) {
+ if (!cJSON_IsString(supported_features)) {
+ ogs_error("OpenAPI_eap_session_parseFromJSON() failed [supported_features]");
+ goto end;
+ }
}
eap_session_local_var = OpenAPI_eap_session_create (
@@ -176,8 +195,9 @@ OpenAPI_eap_session_t *OpenAPI_eap_session_parseFromJSON(cJSON *eap_sessionJSON)
k_seaf ? ogs_strdup_or_assert(k_seaf->valuestring) : NULL,
_links ? _linksList : NULL,
auth_result ? auth_resultVariable : 0,
- supi ? ogs_strdup_or_assert(supi->valuestring) : NULL
- );
+ supi ? ogs_strdup_or_assert(supi->valuestring) : NULL,
+ supported_features ? ogs_strdup_or_assert(supported_features->valuestring) : NULL
+ );
return eap_session_local_var;
end:
diff --git a/lib/sbi/openapi/model/eap_session.h b/lib/sbi/openapi/model/eap_session.h
index b7bf9b420..e0378b3a8 100644
--- a/lib/sbi/openapi/model/eap_session.h
+++ b/lib/sbi/openapi/model/eap_session.h
@@ -1,7 +1,7 @@
/*
* eap_session.h
*
- *
+ *
*/
#ifndef _OpenAPI_eap_session_H_
@@ -26,6 +26,7 @@ typedef struct OpenAPI_eap_session_s {
OpenAPI_list_t* _links;
OpenAPI_auth_result_e auth_result;
char *supi;
+ char *supported_features;
} OpenAPI_eap_session_t;
OpenAPI_eap_session_t *OpenAPI_eap_session_create(
@@ -33,8 +34,9 @@ OpenAPI_eap_session_t *OpenAPI_eap_session_create(
char *k_seaf,
OpenAPI_list_t* _links,
OpenAPI_auth_result_e auth_result,
- char *supi
- );
+ char *supi,
+ char *supported_features
+);
void OpenAPI_eap_session_free(OpenAPI_eap_session_t *eap_session);
OpenAPI_eap_session_t *OpenAPI_eap_session_parseFromJSON(cJSON *eap_sessionJSON);
cJSON *OpenAPI_eap_session_convertToJSON(OpenAPI_eap_session_t *eap_session);
diff --git a/lib/sbi/openapi/model/ebi_arp_mapping.c b/lib/sbi/openapi/model/ebi_arp_mapping.c
index 04ad52356..843e24322 100644
--- a/lib/sbi/openapi/model/ebi_arp_mapping.c
+++ b/lib/sbi/openapi/model/ebi_arp_mapping.c
@@ -7,7 +7,7 @@
OpenAPI_ebi_arp_mapping_t *OpenAPI_ebi_arp_mapping_create(
int eps_bearer_id,
OpenAPI_arp_t *arp
- )
+)
{
OpenAPI_ebi_arp_mapping_t *ebi_arp_mapping_local_var = OpenAPI_malloc(sizeof(OpenAPI_ebi_arp_mapping_t));
if (!ebi_arp_mapping_local_var) {
@@ -68,7 +68,7 @@ OpenAPI_ebi_arp_mapping_t *OpenAPI_ebi_arp_mapping_parseFromJSON(cJSON *ebi_arp_
goto end;
}
-
+
if (!cJSON_IsNumber(eps_bearer_id)) {
ogs_error("OpenAPI_ebi_arp_mapping_parseFromJSON() failed [eps_bearer_id]");
goto end;
@@ -81,13 +81,13 @@ OpenAPI_ebi_arp_mapping_t *OpenAPI_ebi_arp_mapping_parseFromJSON(cJSON *ebi_arp_
}
OpenAPI_arp_t *arp_local_nonprim = NULL;
-
+
arp_local_nonprim = OpenAPI_arp_parseFromJSON(arp);
ebi_arp_mapping_local_var = OpenAPI_ebi_arp_mapping_create (
eps_bearer_id->valuedouble,
arp_local_nonprim
- );
+ );
return ebi_arp_mapping_local_var;
end:
diff --git a/lib/sbi/openapi/model/ebi_arp_mapping.h b/lib/sbi/openapi/model/ebi_arp_mapping.h
index f066e3246..dd90a03f4 100644
--- a/lib/sbi/openapi/model/ebi_arp_mapping.h
+++ b/lib/sbi/openapi/model/ebi_arp_mapping.h
@@ -1,7 +1,7 @@
/*
* ebi_arp_mapping.h
*
- *
+ *
*/
#ifndef _OpenAPI_ebi_arp_mapping_H_
@@ -27,7 +27,7 @@ typedef struct OpenAPI_ebi_arp_mapping_s {
OpenAPI_ebi_arp_mapping_t *OpenAPI_ebi_arp_mapping_create(
int eps_bearer_id,
OpenAPI_arp_t *arp
- );
+);
void OpenAPI_ebi_arp_mapping_free(OpenAPI_ebi_arp_mapping_t *ebi_arp_mapping);
OpenAPI_ebi_arp_mapping_t *OpenAPI_ebi_arp_mapping_parseFromJSON(cJSON *ebi_arp_mappingJSON);
cJSON *OpenAPI_ebi_arp_mapping_convertToJSON(OpenAPI_ebi_arp_mapping_t *ebi_arp_mapping);
diff --git a/lib/sbi/openapi/model/ec_restriction.c b/lib/sbi/openapi/model/ec_restriction.c
index 46967fc1d..2dea67783 100644
--- a/lib/sbi/openapi/model/ec_restriction.c
+++ b/lib/sbi/openapi/model/ec_restriction.c
@@ -9,7 +9,7 @@ OpenAPI_ec_restriction_t *OpenAPI_ec_restriction_create(
int reference_id,
OpenAPI_list_t *plmn_ec_infos,
char *mtc_provider_information
- )
+)
{
OpenAPI_ec_restriction_t *ec_restriction_local_var = OpenAPI_malloc(sizeof(OpenAPI_ec_restriction_t));
if (!ec_restriction_local_var) {
@@ -59,30 +59,30 @@ cJSON *OpenAPI_ec_restriction_convertToJSON(OpenAPI_ec_restriction_t *ec_restric
}
if (ec_restriction->plmn_ec_infos) {
- cJSON *plmn_ec_infosList = cJSON_AddArrayToObject(item, "plmnEcInfos");
- if (plmn_ec_infosList == NULL) {
- ogs_error("OpenAPI_ec_restriction_convertToJSON() failed [plmn_ec_infos]");
- goto end;
- }
+ cJSON *plmn_ec_infosList = cJSON_AddArrayToObject(item, "plmnEcInfos");
+ if (plmn_ec_infosList == NULL) {
+ ogs_error("OpenAPI_ec_restriction_convertToJSON() failed [plmn_ec_infos]");
+ goto end;
+ }
- OpenAPI_lnode_t *plmn_ec_infos_node;
- if (ec_restriction->plmn_ec_infos) {
- OpenAPI_list_for_each(ec_restriction->plmn_ec_infos, plmn_ec_infos_node) {
- cJSON *itemLocal = OpenAPI_plmn_ec_info_convertToJSON(plmn_ec_infos_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_ec_restriction_convertToJSON() failed [plmn_ec_infos]");
- goto end;
- }
- cJSON_AddItemToArray(plmn_ec_infosList, itemLocal);
+ OpenAPI_lnode_t *plmn_ec_infos_node;
+ if (ec_restriction->plmn_ec_infos) {
+ OpenAPI_list_for_each(ec_restriction->plmn_ec_infos, plmn_ec_infos_node) {
+ cJSON *itemLocal = OpenAPI_plmn_ec_info_convertToJSON(plmn_ec_infos_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_ec_restriction_convertToJSON() failed [plmn_ec_infos]");
+ goto end;
}
+ cJSON_AddItemToArray(plmn_ec_infosList, itemLocal);
}
}
+ }
if (ec_restriction->mtc_provider_information) {
- if (cJSON_AddStringToObject(item, "mtcProviderInformation", ec_restriction->mtc_provider_information) == NULL) {
- ogs_error("OpenAPI_ec_restriction_convertToJSON() failed [mtc_provider_information]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "mtcProviderInformation", ec_restriction->mtc_provider_information) == NULL) {
+ ogs_error("OpenAPI_ec_restriction_convertToJSON() failed [mtc_provider_information]");
+ goto end;
+ }
}
end:
@@ -98,7 +98,7 @@ OpenAPI_ec_restriction_t *OpenAPI_ec_restriction_parseFromJSON(cJSON *ec_restric
goto end;
}
-
+
if (!cJSON_IsString(af_instance_id)) {
ogs_error("OpenAPI_ec_restriction_parseFromJSON() failed [af_instance_id]");
goto end;
@@ -110,7 +110,7 @@ OpenAPI_ec_restriction_t *OpenAPI_ec_restriction_parseFromJSON(cJSON *ec_restric
goto end;
}
-
+
if (!cJSON_IsNumber(reference_id)) {
ogs_error("OpenAPI_ec_restriction_parseFromJSON() failed [reference_id]");
goto end;
@@ -119,33 +119,33 @@ OpenAPI_ec_restriction_t *OpenAPI_ec_restriction_parseFromJSON(cJSON *ec_restric
cJSON *plmn_ec_infos = cJSON_GetObjectItemCaseSensitive(ec_restrictionJSON, "plmnEcInfos");
OpenAPI_list_t *plmn_ec_infosList;
- if (plmn_ec_infos) {
- cJSON *plmn_ec_infos_local_nonprimitive;
- if (!cJSON_IsArray(plmn_ec_infos)) {
+ if (plmn_ec_infos) {
+ cJSON *plmn_ec_infos_local_nonprimitive;
+ if (!cJSON_IsArray(plmn_ec_infos)){
+ ogs_error("OpenAPI_ec_restriction_parseFromJSON() failed [plmn_ec_infos]");
+ goto end;
+ }
+
+ plmn_ec_infosList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(plmn_ec_infos_local_nonprimitive, plmn_ec_infos ) {
+ if (!cJSON_IsObject(plmn_ec_infos_local_nonprimitive)) {
ogs_error("OpenAPI_ec_restriction_parseFromJSON() failed [plmn_ec_infos]");
goto end;
}
+ OpenAPI_plmn_ec_info_t *plmn_ec_infosItem = OpenAPI_plmn_ec_info_parseFromJSON(plmn_ec_infos_local_nonprimitive);
- plmn_ec_infosList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(plmn_ec_infos_local_nonprimitive, plmn_ec_infos ) {
- if (!cJSON_IsObject(plmn_ec_infos_local_nonprimitive)) {
- ogs_error("OpenAPI_ec_restriction_parseFromJSON() failed [plmn_ec_infos]");
- goto end;
- }
- OpenAPI_plmn_ec_info_t *plmn_ec_infosItem = OpenAPI_plmn_ec_info_parseFromJSON(plmn_ec_infos_local_nonprimitive);
-
- OpenAPI_list_add(plmn_ec_infosList, plmn_ec_infosItem);
- }
+ OpenAPI_list_add(plmn_ec_infosList, plmn_ec_infosItem);
+ }
}
cJSON *mtc_provider_information = cJSON_GetObjectItemCaseSensitive(ec_restrictionJSON, "mtcProviderInformation");
- if (mtc_provider_information) {
- if (!cJSON_IsString(mtc_provider_information)) {
- ogs_error("OpenAPI_ec_restriction_parseFromJSON() failed [mtc_provider_information]");
- goto end;
- }
+ if (mtc_provider_information) {
+ if (!cJSON_IsString(mtc_provider_information)) {
+ ogs_error("OpenAPI_ec_restriction_parseFromJSON() failed [mtc_provider_information]");
+ goto end;
+ }
}
ec_restriction_local_var = OpenAPI_ec_restriction_create (
@@ -153,7 +153,7 @@ OpenAPI_ec_restriction_t *OpenAPI_ec_restriction_parseFromJSON(cJSON *ec_restric
reference_id->valuedouble,
plmn_ec_infos ? plmn_ec_infosList : NULL,
mtc_provider_information ? ogs_strdup_or_assert(mtc_provider_information->valuestring) : NULL
- );
+ );
return ec_restriction_local_var;
end:
diff --git a/lib/sbi/openapi/model/ec_restriction.h b/lib/sbi/openapi/model/ec_restriction.h
index 45130392a..22630dc8b 100644
--- a/lib/sbi/openapi/model/ec_restriction.h
+++ b/lib/sbi/openapi/model/ec_restriction.h
@@ -1,7 +1,7 @@
/*
* ec_restriction.h
*
- *
+ *
*/
#ifndef _OpenAPI_ec_restriction_H_
@@ -31,7 +31,7 @@ OpenAPI_ec_restriction_t *OpenAPI_ec_restriction_create(
int reference_id,
OpenAPI_list_t *plmn_ec_infos,
char *mtc_provider_information
- );
+);
void OpenAPI_ec_restriction_free(OpenAPI_ec_restriction_t *ec_restriction);
OpenAPI_ec_restriction_t *OpenAPI_ec_restriction_parseFromJSON(cJSON *ec_restrictionJSON);
cJSON *OpenAPI_ec_restriction_convertToJSON(OpenAPI_ec_restriction_t *ec_restriction);
diff --git a/lib/sbi/openapi/model/ec_restriction_data_wb.c b/lib/sbi/openapi/model/ec_restriction_data_wb.c
index da7864f4c..2f370c901 100644
--- a/lib/sbi/openapi/model/ec_restriction_data_wb.c
+++ b/lib/sbi/openapi/model/ec_restriction_data_wb.c
@@ -7,7 +7,7 @@
OpenAPI_ec_restriction_data_wb_t *OpenAPI_ec_restriction_data_wb_create(
int ec_mode_a_restricted,
int ec_mode_b_restricted
- )
+)
{
OpenAPI_ec_restriction_data_wb_t *ec_restriction_data_wb_local_var = OpenAPI_malloc(sizeof(OpenAPI_ec_restriction_data_wb_t));
if (!ec_restriction_data_wb_local_var) {
@@ -39,17 +39,15 @@ cJSON *OpenAPI_ec_restriction_data_wb_convertToJSON(OpenAPI_ec_restriction_data_
item = cJSON_CreateObject();
if (ec_restriction_data_wb->ec_mode_a_restricted) {
- if (cJSON_AddBoolToObject(item, "ecModeARestricted", ec_restriction_data_wb->ec_mode_a_restricted) == NULL) {
- ogs_error("OpenAPI_ec_restriction_data_wb_convertToJSON() failed [ec_mode_a_restricted]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "ecModeARestricted", ec_restriction_data_wb->ec_mode_a_restricted) == NULL) {
+ ogs_error("OpenAPI_ec_restriction_data_wb_convertToJSON() failed [ec_mode_a_restricted]");
+ goto end;
+ }
}
- if (ec_restriction_data_wb->ec_mode_b_restricted) {
- if (cJSON_AddBoolToObject(item, "ecModeBRestricted", ec_restriction_data_wb->ec_mode_b_restricted) == NULL) {
- ogs_error("OpenAPI_ec_restriction_data_wb_convertToJSON() failed [ec_mode_b_restricted]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "ecModeBRestricted", ec_restriction_data_wb->ec_mode_b_restricted) == NULL) {
+ ogs_error("OpenAPI_ec_restriction_data_wb_convertToJSON() failed [ec_mode_b_restricted]");
+ goto end;
}
end:
@@ -61,26 +59,29 @@ OpenAPI_ec_restriction_data_wb_t *OpenAPI_ec_restriction_data_wb_parseFromJSON(c
OpenAPI_ec_restriction_data_wb_t *ec_restriction_data_wb_local_var = NULL;
cJSON *ec_mode_a_restricted = cJSON_GetObjectItemCaseSensitive(ec_restriction_data_wbJSON, "ecModeARestricted");
- if (ec_mode_a_restricted) {
- if (!cJSON_IsBool(ec_mode_a_restricted)) {
- ogs_error("OpenAPI_ec_restriction_data_wb_parseFromJSON() failed [ec_mode_a_restricted]");
- goto end;
- }
+ if (ec_mode_a_restricted) {
+ if (!cJSON_IsBool(ec_mode_a_restricted)) {
+ ogs_error("OpenAPI_ec_restriction_data_wb_parseFromJSON() failed [ec_mode_a_restricted]");
+ goto end;
+ }
}
cJSON *ec_mode_b_restricted = cJSON_GetObjectItemCaseSensitive(ec_restriction_data_wbJSON, "ecModeBRestricted");
+ if (!ec_mode_b_restricted) {
+ ogs_error("OpenAPI_ec_restriction_data_wb_parseFromJSON() failed [ec_mode_b_restricted]");
+ goto end;
+ }
- if (ec_mode_b_restricted) {
- if (!cJSON_IsBool(ec_mode_b_restricted)) {
- ogs_error("OpenAPI_ec_restriction_data_wb_parseFromJSON() failed [ec_mode_b_restricted]");
- goto end;
- }
+
+ if (!cJSON_IsBool(ec_mode_b_restricted)) {
+ ogs_error("OpenAPI_ec_restriction_data_wb_parseFromJSON() failed [ec_mode_b_restricted]");
+ goto end;
}
ec_restriction_data_wb_local_var = OpenAPI_ec_restriction_data_wb_create (
ec_mode_a_restricted ? ec_mode_a_restricted->valueint : 0,
- ec_mode_b_restricted ? ec_mode_b_restricted->valueint : 0
- );
+ ec_mode_b_restricted->valueint
+ );
return ec_restriction_data_wb_local_var;
end:
diff --git a/lib/sbi/openapi/model/ec_restriction_data_wb.h b/lib/sbi/openapi/model/ec_restriction_data_wb.h
index 2f2c7dcf6..04ac7969e 100644
--- a/lib/sbi/openapi/model/ec_restriction_data_wb.h
+++ b/lib/sbi/openapi/model/ec_restriction_data_wb.h
@@ -1,7 +1,7 @@
/*
* ec_restriction_data_wb.h
*
- *
+ *
*/
#ifndef _OpenAPI_ec_restriction_data_wb_H_
@@ -26,7 +26,7 @@ typedef struct OpenAPI_ec_restriction_data_wb_s {
OpenAPI_ec_restriction_data_wb_t *OpenAPI_ec_restriction_data_wb_create(
int ec_mode_a_restricted,
int ec_mode_b_restricted
- );
+);
void OpenAPI_ec_restriction_data_wb_free(OpenAPI_ec_restriction_data_wb_t *ec_restriction_data_wb);
OpenAPI_ec_restriction_data_wb_t *OpenAPI_ec_restriction_data_wb_parseFromJSON(cJSON *ec_restriction_data_wbJSON);
cJSON *OpenAPI_ec_restriction_data_wb_convertToJSON(OpenAPI_ec_restriction_data_wb_t *ec_restriction_data_wb);
diff --git a/lib/sbi/openapi/model/ecgi.c b/lib/sbi/openapi/model/ecgi.c
index b69a7e94e..84ac6a29c 100644
--- a/lib/sbi/openapi/model/ecgi.c
+++ b/lib/sbi/openapi/model/ecgi.c
@@ -8,7 +8,7 @@ OpenAPI_ecgi_t *OpenAPI_ecgi_create(
OpenAPI_plmn_id_t *plmn_id,
char *eutra_cell_id,
char *nid
- )
+)
{
OpenAPI_ecgi_t *ecgi_local_var = OpenAPI_malloc(sizeof(OpenAPI_ecgi_t));
if (!ecgi_local_var) {
@@ -60,10 +60,10 @@ cJSON *OpenAPI_ecgi_convertToJSON(OpenAPI_ecgi_t *ecgi)
}
if (ecgi->nid) {
- if (cJSON_AddStringToObject(item, "nid", ecgi->nid) == NULL) {
- ogs_error("OpenAPI_ecgi_convertToJSON() failed [nid]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "nid", ecgi->nid) == NULL) {
+ ogs_error("OpenAPI_ecgi_convertToJSON() failed [nid]");
+ goto end;
+ }
}
end:
@@ -80,7 +80,7 @@ OpenAPI_ecgi_t *OpenAPI_ecgi_parseFromJSON(cJSON *ecgiJSON)
}
OpenAPI_plmn_id_t *plmn_id_local_nonprim = NULL;
-
+
plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id);
cJSON *eutra_cell_id = cJSON_GetObjectItemCaseSensitive(ecgiJSON, "eutraCellId");
@@ -89,7 +89,7 @@ OpenAPI_ecgi_t *OpenAPI_ecgi_parseFromJSON(cJSON *ecgiJSON)
goto end;
}
-
+
if (!cJSON_IsString(eutra_cell_id)) {
ogs_error("OpenAPI_ecgi_parseFromJSON() failed [eutra_cell_id]");
goto end;
@@ -97,18 +97,18 @@ OpenAPI_ecgi_t *OpenAPI_ecgi_parseFromJSON(cJSON *ecgiJSON)
cJSON *nid = cJSON_GetObjectItemCaseSensitive(ecgiJSON, "nid");
- if (nid) {
- if (!cJSON_IsString(nid)) {
- ogs_error("OpenAPI_ecgi_parseFromJSON() failed [nid]");
- goto end;
- }
+ if (nid) {
+ if (!cJSON_IsString(nid)) {
+ ogs_error("OpenAPI_ecgi_parseFromJSON() failed [nid]");
+ goto end;
+ }
}
ecgi_local_var = OpenAPI_ecgi_create (
plmn_id_local_nonprim,
ogs_strdup_or_assert(eutra_cell_id->valuestring),
nid ? ogs_strdup_or_assert(nid->valuestring) : NULL
- );
+ );
return ecgi_local_var;
end:
diff --git a/lib/sbi/openapi/model/ecgi.h b/lib/sbi/openapi/model/ecgi.h
index 8881671c8..d41920383 100644
--- a/lib/sbi/openapi/model/ecgi.h
+++ b/lib/sbi/openapi/model/ecgi.h
@@ -1,7 +1,7 @@
/*
* ecgi.h
*
- *
+ *
*/
#ifndef _OpenAPI_ecgi_H_
@@ -29,7 +29,7 @@ OpenAPI_ecgi_t *OpenAPI_ecgi_create(
OpenAPI_plmn_id_t *plmn_id,
char *eutra_cell_id,
char *nid
- );
+);
void OpenAPI_ecgi_free(OpenAPI_ecgi_t *ecgi);
OpenAPI_ecgi_t *OpenAPI_ecgi_parseFromJSON(cJSON *ecgiJSON);
cJSON *OpenAPI_ecgi_convertToJSON(OpenAPI_ecgi_t *ecgi);
diff --git a/lib/sbi/openapi/model/ecgi_1.c b/lib/sbi/openapi/model/ecgi_1.c
new file mode 100644
index 000000000..50cb4428d
--- /dev/null
+++ b/lib/sbi/openapi/model/ecgi_1.c
@@ -0,0 +1,151 @@
+
+#include
+#include
+#include
+#include "ecgi_1.h"
+
+OpenAPI_ecgi_1_t *OpenAPI_ecgi_1_create(
+ OpenAPI_plmn_id_1_t *plmn_id,
+ char *eutra_cell_id,
+ char *nid
+)
+{
+ OpenAPI_ecgi_1_t *ecgi_1_local_var = OpenAPI_malloc(sizeof(OpenAPI_ecgi_1_t));
+ if (!ecgi_1_local_var) {
+ return NULL;
+ }
+ ecgi_1_local_var->plmn_id = plmn_id;
+ ecgi_1_local_var->eutra_cell_id = eutra_cell_id;
+ ecgi_1_local_var->nid = nid;
+
+ return ecgi_1_local_var;
+}
+
+void OpenAPI_ecgi_1_free(OpenAPI_ecgi_1_t *ecgi_1)
+{
+ if (NULL == ecgi_1) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ OpenAPI_plmn_id_1_free(ecgi_1->plmn_id);
+ ogs_free(ecgi_1->eutra_cell_id);
+ ogs_free(ecgi_1->nid);
+ ogs_free(ecgi_1);
+}
+
+cJSON *OpenAPI_ecgi_1_convertToJSON(OpenAPI_ecgi_1_t *ecgi_1)
+{
+ cJSON *item = NULL;
+
+ if (ecgi_1 == NULL) {
+ ogs_error("OpenAPI_ecgi_1_convertToJSON() failed [Ecgi_1]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ cJSON *plmn_id_local_JSON = OpenAPI_plmn_id_1_convertToJSON(ecgi_1->plmn_id);
+ if (plmn_id_local_JSON == NULL) {
+ ogs_error("OpenAPI_ecgi_1_convertToJSON() failed [plmn_id]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "plmnId", plmn_id_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_ecgi_1_convertToJSON() failed [plmn_id]");
+ goto end;
+ }
+
+ if (cJSON_AddStringToObject(item, "eutraCellId", ecgi_1->eutra_cell_id) == NULL) {
+ ogs_error("OpenAPI_ecgi_1_convertToJSON() failed [eutra_cell_id]");
+ goto end;
+ }
+
+ if (ecgi_1->nid) {
+ if (cJSON_AddStringToObject(item, "nid", ecgi_1->nid) == NULL) {
+ ogs_error("OpenAPI_ecgi_1_convertToJSON() failed [nid]");
+ goto end;
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_ecgi_1_t *OpenAPI_ecgi_1_parseFromJSON(cJSON *ecgi_1JSON)
+{
+ OpenAPI_ecgi_1_t *ecgi_1_local_var = NULL;
+ cJSON *plmn_id = cJSON_GetObjectItemCaseSensitive(ecgi_1JSON, "plmnId");
+ if (!plmn_id) {
+ ogs_error("OpenAPI_ecgi_1_parseFromJSON() failed [plmn_id]");
+ goto end;
+ }
+
+ OpenAPI_plmn_id_1_t *plmn_id_local_nonprim = NULL;
+
+ plmn_id_local_nonprim = OpenAPI_plmn_id_1_parseFromJSON(plmn_id);
+
+ cJSON *eutra_cell_id = cJSON_GetObjectItemCaseSensitive(ecgi_1JSON, "eutraCellId");
+ if (!eutra_cell_id) {
+ ogs_error("OpenAPI_ecgi_1_parseFromJSON() failed [eutra_cell_id]");
+ goto end;
+ }
+
+
+ if (!cJSON_IsString(eutra_cell_id)) {
+ ogs_error("OpenAPI_ecgi_1_parseFromJSON() failed [eutra_cell_id]");
+ goto end;
+ }
+
+ cJSON *nid = cJSON_GetObjectItemCaseSensitive(ecgi_1JSON, "nid");
+
+ if (nid) {
+ if (!cJSON_IsString(nid)) {
+ ogs_error("OpenAPI_ecgi_1_parseFromJSON() failed [nid]");
+ goto end;
+ }
+ }
+
+ ecgi_1_local_var = OpenAPI_ecgi_1_create (
+ plmn_id_local_nonprim,
+ ogs_strdup_or_assert(eutra_cell_id->valuestring),
+ nid ? ogs_strdup_or_assert(nid->valuestring) : NULL
+ );
+
+ return ecgi_1_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_ecgi_1_t *OpenAPI_ecgi_1_copy(OpenAPI_ecgi_1_t *dst, OpenAPI_ecgi_1_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_ecgi_1_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_ecgi_1_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_ecgi_1_free(dst);
+ dst = OpenAPI_ecgi_1_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/ecgi_1.h b/lib/sbi/openapi/model/ecgi_1.h
new file mode 100644
index 000000000..f90c1336c
--- /dev/null
+++ b/lib/sbi/openapi/model/ecgi_1.h
@@ -0,0 +1,43 @@
+/*
+ * ecgi_1.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_ecgi_1_H_
+#define _OpenAPI_ecgi_1_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+#include "plmn_id_1.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_ecgi_1_s OpenAPI_ecgi_1_t;
+typedef struct OpenAPI_ecgi_1_s {
+ struct OpenAPI_plmn_id_1_s *plmn_id;
+ char *eutra_cell_id;
+ char *nid;
+} OpenAPI_ecgi_1_t;
+
+OpenAPI_ecgi_1_t *OpenAPI_ecgi_1_create(
+ OpenAPI_plmn_id_1_t *plmn_id,
+ char *eutra_cell_id,
+ char *nid
+);
+void OpenAPI_ecgi_1_free(OpenAPI_ecgi_1_t *ecgi_1);
+OpenAPI_ecgi_1_t *OpenAPI_ecgi_1_parseFromJSON(cJSON *ecgi_1JSON);
+cJSON *OpenAPI_ecgi_1_convertToJSON(OpenAPI_ecgi_1_t *ecgi_1);
+OpenAPI_ecgi_1_t *OpenAPI_ecgi_1_copy(OpenAPI_ecgi_1_t *dst, OpenAPI_ecgi_1_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_ecgi_1_H_ */
+
diff --git a/lib/sbi/openapi/model/edrx_parameters.c b/lib/sbi/openapi/model/edrx_parameters.c
index 80ca2198c..65c362d96 100644
--- a/lib/sbi/openapi/model/edrx_parameters.c
+++ b/lib/sbi/openapi/model/edrx_parameters.c
@@ -7,7 +7,7 @@
OpenAPI_edrx_parameters_t *OpenAPI_edrx_parameters_create(
OpenAPI_rat_type_e rat_type,
char *edrx_value
- )
+)
{
OpenAPI_edrx_parameters_t *edrx_parameters_local_var = OpenAPI_malloc(sizeof(OpenAPI_edrx_parameters_t));
if (!edrx_parameters_local_var) {
@@ -63,7 +63,7 @@ OpenAPI_edrx_parameters_t *OpenAPI_edrx_parameters_parseFromJSON(cJSON *edrx_par
}
OpenAPI_rat_type_e rat_typeVariable;
-
+
if (!cJSON_IsString(rat_type)) {
ogs_error("OpenAPI_edrx_parameters_parseFromJSON() failed [rat_type]");
goto end;
@@ -76,7 +76,7 @@ OpenAPI_edrx_parameters_t *OpenAPI_edrx_parameters_parseFromJSON(cJSON *edrx_par
goto end;
}
-
+
if (!cJSON_IsString(edrx_value)) {
ogs_error("OpenAPI_edrx_parameters_parseFromJSON() failed [edrx_value]");
goto end;
@@ -85,7 +85,7 @@ OpenAPI_edrx_parameters_t *OpenAPI_edrx_parameters_parseFromJSON(cJSON *edrx_par
edrx_parameters_local_var = OpenAPI_edrx_parameters_create (
rat_typeVariable,
ogs_strdup_or_assert(edrx_value->valuestring)
- );
+ );
return edrx_parameters_local_var;
end:
diff --git a/lib/sbi/openapi/model/edrx_parameters.h b/lib/sbi/openapi/model/edrx_parameters.h
index b2bf845ca..fff109ce9 100644
--- a/lib/sbi/openapi/model/edrx_parameters.h
+++ b/lib/sbi/openapi/model/edrx_parameters.h
@@ -1,7 +1,7 @@
/*
* edrx_parameters.h
*
- *
+ *
*/
#ifndef _OpenAPI_edrx_parameters_H_
@@ -27,7 +27,7 @@ typedef struct OpenAPI_edrx_parameters_s {
OpenAPI_edrx_parameters_t *OpenAPI_edrx_parameters_create(
OpenAPI_rat_type_e rat_type,
char *edrx_value
- );
+);
void OpenAPI_edrx_parameters_free(OpenAPI_edrx_parameters_t *edrx_parameters);
OpenAPI_edrx_parameters_t *OpenAPI_edrx_parameters_parseFromJSON(cJSON *edrx_parametersJSON);
cJSON *OpenAPI_edrx_parameters_convertToJSON(OpenAPI_edrx_parameters_t *edrx_parameters);
diff --git a/lib/sbi/openapi/model/edrx_parameters_1.c b/lib/sbi/openapi/model/edrx_parameters_1.c
new file mode 100644
index 000000000..01aaeae99
--- /dev/null
+++ b/lib/sbi/openapi/model/edrx_parameters_1.c
@@ -0,0 +1,128 @@
+
+#include
+#include
+#include
+#include "edrx_parameters_1.h"
+
+OpenAPI_edrx_parameters_1_t *OpenAPI_edrx_parameters_1_create(
+ OpenAPI_rat_type_e rat_type,
+ char *edrx_value
+)
+{
+ OpenAPI_edrx_parameters_1_t *edrx_parameters_1_local_var = OpenAPI_malloc(sizeof(OpenAPI_edrx_parameters_1_t));
+ if (!edrx_parameters_1_local_var) {
+ return NULL;
+ }
+ edrx_parameters_1_local_var->rat_type = rat_type;
+ edrx_parameters_1_local_var->edrx_value = edrx_value;
+
+ return edrx_parameters_1_local_var;
+}
+
+void OpenAPI_edrx_parameters_1_free(OpenAPI_edrx_parameters_1_t *edrx_parameters_1)
+{
+ if (NULL == edrx_parameters_1) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ ogs_free(edrx_parameters_1->edrx_value);
+ ogs_free(edrx_parameters_1);
+}
+
+cJSON *OpenAPI_edrx_parameters_1_convertToJSON(OpenAPI_edrx_parameters_1_t *edrx_parameters_1)
+{
+ cJSON *item = NULL;
+
+ if (edrx_parameters_1 == NULL) {
+ ogs_error("OpenAPI_edrx_parameters_1_convertToJSON() failed [EdrxParameters_1]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (cJSON_AddStringToObject(item, "ratType", OpenAPI_rat_type_ToString(edrx_parameters_1->rat_type)) == NULL) {
+ ogs_error("OpenAPI_edrx_parameters_1_convertToJSON() failed [rat_type]");
+ goto end;
+ }
+
+ if (cJSON_AddStringToObject(item, "edrxValue", edrx_parameters_1->edrx_value) == NULL) {
+ ogs_error("OpenAPI_edrx_parameters_1_convertToJSON() failed [edrx_value]");
+ goto end;
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_edrx_parameters_1_t *OpenAPI_edrx_parameters_1_parseFromJSON(cJSON *edrx_parameters_1JSON)
+{
+ OpenAPI_edrx_parameters_1_t *edrx_parameters_1_local_var = NULL;
+ cJSON *rat_type = cJSON_GetObjectItemCaseSensitive(edrx_parameters_1JSON, "ratType");
+ if (!rat_type) {
+ ogs_error("OpenAPI_edrx_parameters_1_parseFromJSON() failed [rat_type]");
+ goto end;
+ }
+
+ OpenAPI_rat_type_e rat_typeVariable;
+
+ if (!cJSON_IsString(rat_type)) {
+ ogs_error("OpenAPI_edrx_parameters_1_parseFromJSON() failed [rat_type]");
+ goto end;
+ }
+ rat_typeVariable = OpenAPI_rat_type_FromString(rat_type->valuestring);
+
+ cJSON *edrx_value = cJSON_GetObjectItemCaseSensitive(edrx_parameters_1JSON, "edrxValue");
+ if (!edrx_value) {
+ ogs_error("OpenAPI_edrx_parameters_1_parseFromJSON() failed [edrx_value]");
+ goto end;
+ }
+
+
+ if (!cJSON_IsString(edrx_value)) {
+ ogs_error("OpenAPI_edrx_parameters_1_parseFromJSON() failed [edrx_value]");
+ goto end;
+ }
+
+ edrx_parameters_1_local_var = OpenAPI_edrx_parameters_1_create (
+ rat_typeVariable,
+ ogs_strdup_or_assert(edrx_value->valuestring)
+ );
+
+ return edrx_parameters_1_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_edrx_parameters_1_t *OpenAPI_edrx_parameters_1_copy(OpenAPI_edrx_parameters_1_t *dst, OpenAPI_edrx_parameters_1_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_edrx_parameters_1_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_edrx_parameters_1_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_edrx_parameters_1_free(dst);
+ dst = OpenAPI_edrx_parameters_1_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/edrx_parameters_1.h b/lib/sbi/openapi/model/edrx_parameters_1.h
new file mode 100644
index 000000000..f9d77aa8a
--- /dev/null
+++ b/lib/sbi/openapi/model/edrx_parameters_1.h
@@ -0,0 +1,41 @@
+/*
+ * edrx_parameters_1.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_edrx_parameters_1_H_
+#define _OpenAPI_edrx_parameters_1_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+#include "rat_type.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_edrx_parameters_1_s OpenAPI_edrx_parameters_1_t;
+typedef struct OpenAPI_edrx_parameters_1_s {
+ OpenAPI_rat_type_e rat_type;
+ char *edrx_value;
+} OpenAPI_edrx_parameters_1_t;
+
+OpenAPI_edrx_parameters_1_t *OpenAPI_edrx_parameters_1_create(
+ OpenAPI_rat_type_e rat_type,
+ char *edrx_value
+);
+void OpenAPI_edrx_parameters_1_free(OpenAPI_edrx_parameters_1_t *edrx_parameters_1);
+OpenAPI_edrx_parameters_1_t *OpenAPI_edrx_parameters_1_parseFromJSON(cJSON *edrx_parameters_1JSON);
+cJSON *OpenAPI_edrx_parameters_1_convertToJSON(OpenAPI_edrx_parameters_1_t *edrx_parameters_1);
+OpenAPI_edrx_parameters_1_t *OpenAPI_edrx_parameters_1_copy(OpenAPI_edrx_parameters_1_t *dst, OpenAPI_edrx_parameters_1_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_edrx_parameters_1_H_ */
+
diff --git a/lib/sbi/openapi/model/ee_group_profile_data.c b/lib/sbi/openapi/model/ee_group_profile_data.c
new file mode 100644
index 000000000..ae601bfe1
--- /dev/null
+++ b/lib/sbi/openapi/model/ee_group_profile_data.c
@@ -0,0 +1,196 @@
+
+#include
+#include
+#include
+#include "ee_group_profile_data.h"
+
+OpenAPI_ee_group_profile_data_t *OpenAPI_ee_group_profile_data_create(
+ OpenAPI_list_t *restricted_event_types,
+ OpenAPI_list_t* allowed_mtc_provider,
+ char *supported_features
+)
+{
+ OpenAPI_ee_group_profile_data_t *ee_group_profile_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_ee_group_profile_data_t));
+ if (!ee_group_profile_data_local_var) {
+ return NULL;
+ }
+ ee_group_profile_data_local_var->restricted_event_types = restricted_event_types;
+ ee_group_profile_data_local_var->allowed_mtc_provider = allowed_mtc_provider;
+ ee_group_profile_data_local_var->supported_features = supported_features;
+
+ return ee_group_profile_data_local_var;
+}
+
+void OpenAPI_ee_group_profile_data_free(OpenAPI_ee_group_profile_data_t *ee_group_profile_data)
+{
+ if (NULL == ee_group_profile_data) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ OpenAPI_list_for_each(ee_group_profile_data->restricted_event_types, node) {
+ OpenAPI_event_type_free(node->data);
+ }
+ OpenAPI_list_free(ee_group_profile_data->restricted_event_types);
+ OpenAPI_list_for_each(ee_group_profile_data->allowed_mtc_provider, node) {
+ OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)node->data;
+ ogs_free(localKeyValue->value);
+ ogs_free(localKeyValue);
+ }
+ OpenAPI_list_free(ee_group_profile_data->allowed_mtc_provider);
+ ogs_free(ee_group_profile_data->supported_features);
+ ogs_free(ee_group_profile_data);
+}
+
+cJSON *OpenAPI_ee_group_profile_data_convertToJSON(OpenAPI_ee_group_profile_data_t *ee_group_profile_data)
+{
+ cJSON *item = NULL;
+
+ if (ee_group_profile_data == NULL) {
+ ogs_error("OpenAPI_ee_group_profile_data_convertToJSON() failed [EeGroupProfileData]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (ee_group_profile_data->restricted_event_types) {
+ cJSON *restricted_event_typesList = cJSON_AddArrayToObject(item, "restrictedEventTypes");
+ if (restricted_event_typesList == NULL) {
+ ogs_error("OpenAPI_ee_group_profile_data_convertToJSON() failed [restricted_event_types]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *restricted_event_types_node;
+ if (ee_group_profile_data->restricted_event_types) {
+ OpenAPI_list_for_each(ee_group_profile_data->restricted_event_types, restricted_event_types_node) {
+ cJSON *itemLocal = OpenAPI_event_type_convertToJSON(restricted_event_types_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_ee_group_profile_data_convertToJSON() failed [restricted_event_types]");
+ goto end;
+ }
+ cJSON_AddItemToArray(restricted_event_typesList, itemLocal);
+ }
+ }
+ }
+
+ if (ee_group_profile_data->allowed_mtc_provider) {
+ cJSON *allowed_mtc_provider = cJSON_AddObjectToObject(item, "allowedMtcProvider");
+ if (allowed_mtc_provider == NULL) {
+ ogs_error("OpenAPI_ee_group_profile_data_convertToJSON() failed [allowed_mtc_provider]");
+ goto end;
+ }
+ cJSON *localMapObject = allowed_mtc_provider;
+ OpenAPI_lnode_t *allowed_mtc_provider_node;
+ if (ee_group_profile_data->allowed_mtc_provider) {
+ OpenAPI_list_for_each(ee_group_profile_data->allowed_mtc_provider, allowed_mtc_provider_node) {
+ OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)allowed_mtc_provider_node->data;
+ }
+ }
+ }
+
+ if (ee_group_profile_data->supported_features) {
+ if (cJSON_AddStringToObject(item, "supportedFeatures", ee_group_profile_data->supported_features) == NULL) {
+ ogs_error("OpenAPI_ee_group_profile_data_convertToJSON() failed [supported_features]");
+ goto end;
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_ee_group_profile_data_t *OpenAPI_ee_group_profile_data_parseFromJSON(cJSON *ee_group_profile_dataJSON)
+{
+ OpenAPI_ee_group_profile_data_t *ee_group_profile_data_local_var = NULL;
+ cJSON *restricted_event_types = cJSON_GetObjectItemCaseSensitive(ee_group_profile_dataJSON, "restrictedEventTypes");
+
+ OpenAPI_list_t *restricted_event_typesList;
+ if (restricted_event_types) {
+ cJSON *restricted_event_types_local_nonprimitive;
+ if (!cJSON_IsArray(restricted_event_types)){
+ ogs_error("OpenAPI_ee_group_profile_data_parseFromJSON() failed [restricted_event_types]");
+ goto end;
+ }
+
+ restricted_event_typesList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(restricted_event_types_local_nonprimitive, restricted_event_types ) {
+ if (!cJSON_IsObject(restricted_event_types_local_nonprimitive)) {
+ ogs_error("OpenAPI_ee_group_profile_data_parseFromJSON() failed [restricted_event_types]");
+ goto end;
+ }
+ OpenAPI_event_type_t *restricted_event_typesItem = OpenAPI_event_type_parseFromJSON(restricted_event_types_local_nonprimitive);
+
+ OpenAPI_list_add(restricted_event_typesList, restricted_event_typesItem);
+ }
+ }
+
+ cJSON *allowed_mtc_provider = cJSON_GetObjectItemCaseSensitive(ee_group_profile_dataJSON, "allowedMtcProvider");
+
+ OpenAPI_list_t *allowed_mtc_providerList;
+ if (allowed_mtc_provider) {
+ cJSON *allowed_mtc_provider_local_map;
+ if (!cJSON_IsObject(allowed_mtc_provider)) {
+ ogs_error("OpenAPI_ee_group_profile_data_parseFromJSON() failed [allowed_mtc_provider]");
+ goto end;
+ }
+ allowed_mtc_providerList = OpenAPI_list_create();
+ OpenAPI_map_t *localMapKeyPair = NULL;
+ cJSON_ArrayForEach(allowed_mtc_provider_local_map, allowed_mtc_provider) {
+ cJSON *localMapObject = allowed_mtc_provider_local_map;
+ OpenAPI_list_add(allowed_mtc_providerList , localMapKeyPair);
+ }
+ }
+
+ cJSON *supported_features = cJSON_GetObjectItemCaseSensitive(ee_group_profile_dataJSON, "supportedFeatures");
+
+ if (supported_features) {
+ if (!cJSON_IsString(supported_features)) {
+ ogs_error("OpenAPI_ee_group_profile_data_parseFromJSON() failed [supported_features]");
+ goto end;
+ }
+ }
+
+ ee_group_profile_data_local_var = OpenAPI_ee_group_profile_data_create (
+ restricted_event_types ? restricted_event_typesList : NULL,
+ allowed_mtc_provider ? allowed_mtc_providerList : NULL,
+ supported_features ? ogs_strdup_or_assert(supported_features->valuestring) : NULL
+ );
+
+ return ee_group_profile_data_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_ee_group_profile_data_t *OpenAPI_ee_group_profile_data_copy(OpenAPI_ee_group_profile_data_t *dst, OpenAPI_ee_group_profile_data_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_ee_group_profile_data_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_ee_group_profile_data_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_ee_group_profile_data_free(dst);
+ dst = OpenAPI_ee_group_profile_data_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/ee_group_profile_data.h b/lib/sbi/openapi/model/ee_group_profile_data.h
new file mode 100644
index 000000000..cd45cbd11
--- /dev/null
+++ b/lib/sbi/openapi/model/ee_group_profile_data.h
@@ -0,0 +1,44 @@
+/*
+ * ee_group_profile_data.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_ee_group_profile_data_H_
+#define _OpenAPI_ee_group_profile_data_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+#include "event_type.h"
+#include "mtc_provider.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_ee_group_profile_data_s OpenAPI_ee_group_profile_data_t;
+typedef struct OpenAPI_ee_group_profile_data_s {
+ OpenAPI_list_t *restricted_event_types;
+ OpenAPI_list_t* allowed_mtc_provider;
+ char *supported_features;
+} OpenAPI_ee_group_profile_data_t;
+
+OpenAPI_ee_group_profile_data_t *OpenAPI_ee_group_profile_data_create(
+ OpenAPI_list_t *restricted_event_types,
+ OpenAPI_list_t* allowed_mtc_provider,
+ char *supported_features
+);
+void OpenAPI_ee_group_profile_data_free(OpenAPI_ee_group_profile_data_t *ee_group_profile_data);
+OpenAPI_ee_group_profile_data_t *OpenAPI_ee_group_profile_data_parseFromJSON(cJSON *ee_group_profile_dataJSON);
+cJSON *OpenAPI_ee_group_profile_data_convertToJSON(OpenAPI_ee_group_profile_data_t *ee_group_profile_data);
+OpenAPI_ee_group_profile_data_t *OpenAPI_ee_group_profile_data_copy(OpenAPI_ee_group_profile_data_t *dst, OpenAPI_ee_group_profile_data_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_ee_group_profile_data_H_ */
+
diff --git a/lib/sbi/openapi/model/ee_profile_data.c b/lib/sbi/openapi/model/ee_profile_data.c
index db88472a7..a18b34a8b 100644
--- a/lib/sbi/openapi/model/ee_profile_data.c
+++ b/lib/sbi/openapi/model/ee_profile_data.c
@@ -6,8 +6,9 @@
OpenAPI_ee_profile_data_t *OpenAPI_ee_profile_data_create(
OpenAPI_list_t *restricted_event_types,
- char *supported_features
- )
+ char *supported_features,
+ OpenAPI_list_t* allowed_mtc_provider
+)
{
OpenAPI_ee_profile_data_t *ee_profile_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_ee_profile_data_t));
if (!ee_profile_data_local_var) {
@@ -15,6 +16,7 @@ OpenAPI_ee_profile_data_t *OpenAPI_ee_profile_data_create(
}
ee_profile_data_local_var->restricted_event_types = restricted_event_types;
ee_profile_data_local_var->supported_features = supported_features;
+ ee_profile_data_local_var->allowed_mtc_provider = allowed_mtc_provider;
return ee_profile_data_local_var;
}
@@ -30,6 +32,12 @@ void OpenAPI_ee_profile_data_free(OpenAPI_ee_profile_data_t *ee_profile_data)
}
OpenAPI_list_free(ee_profile_data->restricted_event_types);
ogs_free(ee_profile_data->supported_features);
+ OpenAPI_list_for_each(ee_profile_data->allowed_mtc_provider, node) {
+ OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)node->data;
+ ogs_free(localKeyValue->value);
+ ogs_free(localKeyValue);
+ }
+ OpenAPI_list_free(ee_profile_data->allowed_mtc_provider);
ogs_free(ee_profile_data);
}
@@ -44,29 +52,44 @@ cJSON *OpenAPI_ee_profile_data_convertToJSON(OpenAPI_ee_profile_data_t *ee_profi
item = cJSON_CreateObject();
if (ee_profile_data->restricted_event_types) {
- cJSON *restricted_event_typesList = cJSON_AddArrayToObject(item, "restrictedEventTypes");
- if (restricted_event_typesList == NULL) {
- ogs_error("OpenAPI_ee_profile_data_convertToJSON() failed [restricted_event_types]");
- goto end;
- }
+ cJSON *restricted_event_typesList = cJSON_AddArrayToObject(item, "restrictedEventTypes");
+ if (restricted_event_typesList == NULL) {
+ ogs_error("OpenAPI_ee_profile_data_convertToJSON() failed [restricted_event_types]");
+ goto end;
+ }
- OpenAPI_lnode_t *restricted_event_types_node;
- if (ee_profile_data->restricted_event_types) {
- OpenAPI_list_for_each(ee_profile_data->restricted_event_types, restricted_event_types_node) {
- cJSON *itemLocal = OpenAPI_event_type_convertToJSON(restricted_event_types_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_ee_profile_data_convertToJSON() failed [restricted_event_types]");
- goto end;
- }
- cJSON_AddItemToArray(restricted_event_typesList, itemLocal);
+ OpenAPI_lnode_t *restricted_event_types_node;
+ if (ee_profile_data->restricted_event_types) {
+ OpenAPI_list_for_each(ee_profile_data->restricted_event_types, restricted_event_types_node) {
+ cJSON *itemLocal = OpenAPI_event_type_convertToJSON(restricted_event_types_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_ee_profile_data_convertToJSON() failed [restricted_event_types]");
+ goto end;
}
+ cJSON_AddItemToArray(restricted_event_typesList, itemLocal);
}
}
+ }
if (ee_profile_data->supported_features) {
- if (cJSON_AddStringToObject(item, "supportedFeatures", ee_profile_data->supported_features) == NULL) {
- ogs_error("OpenAPI_ee_profile_data_convertToJSON() failed [supported_features]");
- goto end;
+ if (cJSON_AddStringToObject(item, "supportedFeatures", ee_profile_data->supported_features) == NULL) {
+ ogs_error("OpenAPI_ee_profile_data_convertToJSON() failed [supported_features]");
+ goto end;
+ }
+ }
+
+ if (ee_profile_data->allowed_mtc_provider) {
+ cJSON *allowed_mtc_provider = cJSON_AddObjectToObject(item, "allowedMtcProvider");
+ if (allowed_mtc_provider == NULL) {
+ ogs_error("OpenAPI_ee_profile_data_convertToJSON() failed [allowed_mtc_provider]");
+ goto end;
+ }
+ cJSON *localMapObject = allowed_mtc_provider;
+ OpenAPI_lnode_t *allowed_mtc_provider_node;
+ if (ee_profile_data->allowed_mtc_provider) {
+ OpenAPI_list_for_each(ee_profile_data->allowed_mtc_provider, allowed_mtc_provider_node) {
+ OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)allowed_mtc_provider_node->data;
+ }
}
}
@@ -80,39 +103,57 @@ OpenAPI_ee_profile_data_t *OpenAPI_ee_profile_data_parseFromJSON(cJSON *ee_profi
cJSON *restricted_event_types = cJSON_GetObjectItemCaseSensitive(ee_profile_dataJSON, "restrictedEventTypes");
OpenAPI_list_t *restricted_event_typesList;
- if (restricted_event_types) {
- cJSON *restricted_event_types_local_nonprimitive;
- if (!cJSON_IsArray(restricted_event_types)) {
+ if (restricted_event_types) {
+ cJSON *restricted_event_types_local_nonprimitive;
+ if (!cJSON_IsArray(restricted_event_types)){
+ ogs_error("OpenAPI_ee_profile_data_parseFromJSON() failed [restricted_event_types]");
+ goto end;
+ }
+
+ restricted_event_typesList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(restricted_event_types_local_nonprimitive, restricted_event_types ) {
+ if (!cJSON_IsObject(restricted_event_types_local_nonprimitive)) {
ogs_error("OpenAPI_ee_profile_data_parseFromJSON() failed [restricted_event_types]");
goto end;
}
+ OpenAPI_event_type_t *restricted_event_typesItem = OpenAPI_event_type_parseFromJSON(restricted_event_types_local_nonprimitive);
- restricted_event_typesList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(restricted_event_types_local_nonprimitive, restricted_event_types ) {
- if (!cJSON_IsObject(restricted_event_types_local_nonprimitive)) {
- ogs_error("OpenAPI_ee_profile_data_parseFromJSON() failed [restricted_event_types]");
- goto end;
- }
- OpenAPI_event_type_t *restricted_event_typesItem = OpenAPI_event_type_parseFromJSON(restricted_event_types_local_nonprimitive);
-
- OpenAPI_list_add(restricted_event_typesList, restricted_event_typesItem);
- }
+ OpenAPI_list_add(restricted_event_typesList, restricted_event_typesItem);
+ }
}
cJSON *supported_features = cJSON_GetObjectItemCaseSensitive(ee_profile_dataJSON, "supportedFeatures");
- if (supported_features) {
- if (!cJSON_IsString(supported_features)) {
- ogs_error("OpenAPI_ee_profile_data_parseFromJSON() failed [supported_features]");
- goto end;
- }
+ if (supported_features) {
+ if (!cJSON_IsString(supported_features)) {
+ ogs_error("OpenAPI_ee_profile_data_parseFromJSON() failed [supported_features]");
+ goto end;
+ }
+ }
+
+ cJSON *allowed_mtc_provider = cJSON_GetObjectItemCaseSensitive(ee_profile_dataJSON, "allowedMtcProvider");
+
+ OpenAPI_list_t *allowed_mtc_providerList;
+ if (allowed_mtc_provider) {
+ cJSON *allowed_mtc_provider_local_map;
+ if (!cJSON_IsObject(allowed_mtc_provider)) {
+ ogs_error("OpenAPI_ee_profile_data_parseFromJSON() failed [allowed_mtc_provider]");
+ goto end;
+ }
+ allowed_mtc_providerList = OpenAPI_list_create();
+ OpenAPI_map_t *localMapKeyPair = NULL;
+ cJSON_ArrayForEach(allowed_mtc_provider_local_map, allowed_mtc_provider) {
+ cJSON *localMapObject = allowed_mtc_provider_local_map;
+ OpenAPI_list_add(allowed_mtc_providerList , localMapKeyPair);
+ }
}
ee_profile_data_local_var = OpenAPI_ee_profile_data_create (
restricted_event_types ? restricted_event_typesList : NULL,
- supported_features ? ogs_strdup_or_assert(supported_features->valuestring) : NULL
- );
+ supported_features ? ogs_strdup_or_assert(supported_features->valuestring) : NULL,
+ allowed_mtc_provider ? allowed_mtc_providerList : NULL
+ );
return ee_profile_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/ee_profile_data.h b/lib/sbi/openapi/model/ee_profile_data.h
index 2d2a92dde..ee6009da0 100644
--- a/lib/sbi/openapi/model/ee_profile_data.h
+++ b/lib/sbi/openapi/model/ee_profile_data.h
@@ -1,7 +1,7 @@
/*
* ee_profile_data.h
*
- *
+ *
*/
#ifndef _OpenAPI_ee_profile_data_H_
@@ -13,6 +13,7 @@
#include "../include/keyValuePair.h"
#include "../include/binary.h"
#include "event_type.h"
+#include "mtc_provider.h"
#ifdef __cplusplus
extern "C" {
@@ -22,12 +23,14 @@ typedef struct OpenAPI_ee_profile_data_s OpenAPI_ee_profile_data_t;
typedef struct OpenAPI_ee_profile_data_s {
OpenAPI_list_t *restricted_event_types;
char *supported_features;
+ OpenAPI_list_t* allowed_mtc_provider;
} OpenAPI_ee_profile_data_t;
OpenAPI_ee_profile_data_t *OpenAPI_ee_profile_data_create(
OpenAPI_list_t *restricted_event_types,
- char *supported_features
- );
+ char *supported_features,
+ OpenAPI_list_t* allowed_mtc_provider
+);
void OpenAPI_ee_profile_data_free(OpenAPI_ee_profile_data_t *ee_profile_data);
OpenAPI_ee_profile_data_t *OpenAPI_ee_profile_data_parseFromJSON(cJSON *ee_profile_dataJSON);
cJSON *OpenAPI_ee_profile_data_convertToJSON(OpenAPI_ee_profile_data_t *ee_profile_data);
diff --git a/lib/sbi/openapi/model/ee_subscription.c b/lib/sbi/openapi/model/ee_subscription.c
index e81be8dd5..38213f278 100644
--- a/lib/sbi/openapi/model/ee_subscription.c
+++ b/lib/sbi/openapi/model/ee_subscription.c
@@ -15,7 +15,7 @@ OpenAPI_ee_subscription_t *OpenAPI_ee_subscription_create(
char *scef_diam_host,
char *scef_diam_realm,
char *notify_correlation_id
- )
+)
{
OpenAPI_ee_subscription_t *ee_subscription_local_var = OpenAPI_malloc(sizeof(OpenAPI_ee_subscription_t));
if (!ee_subscription_local_var) {
@@ -83,81 +83,81 @@ cJSON *OpenAPI_ee_subscription_convertToJSON(OpenAPI_ee_subscription_t *ee_subsc
if (ee_subscription->monitoring_configurations) {
OpenAPI_list_for_each(ee_subscription->monitoring_configurations, monitoring_configurations_node) {
OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)monitoring_configurations_node->data;
- cJSON *itemLocal = OpenAPI_monitoring_configuration_convertToJSON(localKeyValue->value);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [monitoring_configurations]");
- goto end;
- }
- cJSON_AddItemToObject(monitoring_configurations, localKeyValue->key, itemLocal);
+ cJSON *itemLocal = OpenAPI_monitoring_configuration_convertToJSON(localKeyValue->value);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [monitoring_configurations]");
+ goto end;
+ }
+ cJSON_AddItemToObject(monitoring_configurations, localKeyValue->key, itemLocal);
+ }
}
- }
if (ee_subscription->reporting_options) {
- cJSON *reporting_options_local_JSON = OpenAPI_reporting_options_convertToJSON(ee_subscription->reporting_options);
- if (reporting_options_local_JSON == NULL) {
- ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [reporting_options]");
- goto end;
- }
- cJSON_AddItemToObject(item, "reportingOptions", reporting_options_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [reporting_options]");
- goto end;
- }
+ cJSON *reporting_options_local_JSON = OpenAPI_reporting_options_convertToJSON(ee_subscription->reporting_options);
+ if (reporting_options_local_JSON == NULL) {
+ ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [reporting_options]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "reportingOptions", reporting_options_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [reporting_options]");
+ goto end;
+ }
}
if (ee_subscription->supported_features) {
- if (cJSON_AddStringToObject(item, "supportedFeatures", ee_subscription->supported_features) == NULL) {
- ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [supported_features]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "supportedFeatures", ee_subscription->supported_features) == NULL) {
+ ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [supported_features]");
+ goto end;
+ }
}
if (ee_subscription->subscription_id) {
- if (cJSON_AddStringToObject(item, "subscriptionId", ee_subscription->subscription_id) == NULL) {
- ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [subscription_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "subscriptionId", ee_subscription->subscription_id) == NULL) {
+ ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [subscription_id]");
+ goto end;
+ }
}
if (ee_subscription->context_info) {
- cJSON *context_info_local_JSON = OpenAPI_context_info_convertToJSON(ee_subscription->context_info);
- if (context_info_local_JSON == NULL) {
- ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [context_info]");
- goto end;
- }
- cJSON_AddItemToObject(item, "contextInfo", context_info_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [context_info]");
- goto end;
- }
+ cJSON *context_info_local_JSON = OpenAPI_context_info_convertToJSON(ee_subscription->context_info);
+ if (context_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [context_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "contextInfo", context_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [context_info]");
+ goto end;
+ }
}
if (ee_subscription->epc_applied_ind) {
- if (cJSON_AddBoolToObject(item, "epcAppliedInd", ee_subscription->epc_applied_ind) == NULL) {
- ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [epc_applied_ind]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "epcAppliedInd", ee_subscription->epc_applied_ind) == NULL) {
+ ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [epc_applied_ind]");
+ goto end;
+ }
}
if (ee_subscription->scef_diam_host) {
- if (cJSON_AddStringToObject(item, "scefDiamHost", ee_subscription->scef_diam_host) == NULL) {
- ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [scef_diam_host]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "scefDiamHost", ee_subscription->scef_diam_host) == NULL) {
+ ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [scef_diam_host]");
+ goto end;
+ }
}
if (ee_subscription->scef_diam_realm) {
- if (cJSON_AddStringToObject(item, "scefDiamRealm", ee_subscription->scef_diam_realm) == NULL) {
- ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [scef_diam_realm]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "scefDiamRealm", ee_subscription->scef_diam_realm) == NULL) {
+ ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [scef_diam_realm]");
+ goto end;
+ }
}
if (ee_subscription->notify_correlation_id) {
- if (cJSON_AddStringToObject(item, "notifyCorrelationId", ee_subscription->notify_correlation_id) == NULL) {
- ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [notify_correlation_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "notifyCorrelationId", ee_subscription->notify_correlation_id) == NULL) {
+ ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [notify_correlation_id]");
+ goto end;
+ }
}
end:
@@ -173,7 +173,7 @@ OpenAPI_ee_subscription_t *OpenAPI_ee_subscription_parseFromJSON(cJSON *ee_subsc
goto end;
}
-
+
if (!cJSON_IsString(callback_reference)) {
ogs_error("OpenAPI_ee_subscription_parseFromJSON() failed [callback_reference]");
goto end;
@@ -186,7 +186,7 @@ OpenAPI_ee_subscription_t *OpenAPI_ee_subscription_parseFromJSON(cJSON *ee_subsc
}
OpenAPI_list_t *monitoring_configurationsList;
-
+
cJSON *monitoring_configurations_local_map;
if (!cJSON_IsObject(monitoring_configurations)) {
ogs_error("OpenAPI_ee_subscription_parseFromJSON() failed [monitoring_configurations]");
@@ -202,75 +202,75 @@ OpenAPI_ee_subscription_t *OpenAPI_ee_subscription_parseFromJSON(cJSON *ee_subsc
}
localMapKeyPair = OpenAPI_map_create(
localMapObject->string, OpenAPI_monitoring_configuration_parseFromJSON(localMapObject));
- OpenAPI_list_add(monitoring_configurationsList, localMapKeyPair);
+ OpenAPI_list_add(monitoring_configurationsList , localMapKeyPair);
}
cJSON *reporting_options = cJSON_GetObjectItemCaseSensitive(ee_subscriptionJSON, "reportingOptions");
OpenAPI_reporting_options_t *reporting_options_local_nonprim = NULL;
- if (reporting_options) {
- reporting_options_local_nonprim = OpenAPI_reporting_options_parseFromJSON(reporting_options);
+ if (reporting_options) {
+ reporting_options_local_nonprim = OpenAPI_reporting_options_parseFromJSON(reporting_options);
}
cJSON *supported_features = cJSON_GetObjectItemCaseSensitive(ee_subscriptionJSON, "supportedFeatures");
- if (supported_features) {
- if (!cJSON_IsString(supported_features)) {
- ogs_error("OpenAPI_ee_subscription_parseFromJSON() failed [supported_features]");
- goto end;
- }
+ if (supported_features) {
+ if (!cJSON_IsString(supported_features)) {
+ ogs_error("OpenAPI_ee_subscription_parseFromJSON() failed [supported_features]");
+ goto end;
+ }
}
cJSON *subscription_id = cJSON_GetObjectItemCaseSensitive(ee_subscriptionJSON, "subscriptionId");
- if (subscription_id) {
- if (!cJSON_IsString(subscription_id)) {
- ogs_error("OpenAPI_ee_subscription_parseFromJSON() failed [subscription_id]");
- goto end;
- }
+ if (subscription_id) {
+ if (!cJSON_IsString(subscription_id)) {
+ ogs_error("OpenAPI_ee_subscription_parseFromJSON() failed [subscription_id]");
+ goto end;
+ }
}
cJSON *context_info = cJSON_GetObjectItemCaseSensitive(ee_subscriptionJSON, "contextInfo");
OpenAPI_context_info_t *context_info_local_nonprim = NULL;
- if (context_info) {
- context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info);
+ if (context_info) {
+ context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info);
}
cJSON *epc_applied_ind = cJSON_GetObjectItemCaseSensitive(ee_subscriptionJSON, "epcAppliedInd");
- if (epc_applied_ind) {
- if (!cJSON_IsBool(epc_applied_ind)) {
- ogs_error("OpenAPI_ee_subscription_parseFromJSON() failed [epc_applied_ind]");
- goto end;
- }
+ if (epc_applied_ind) {
+ if (!cJSON_IsBool(epc_applied_ind)) {
+ ogs_error("OpenAPI_ee_subscription_parseFromJSON() failed [epc_applied_ind]");
+ goto end;
+ }
}
cJSON *scef_diam_host = cJSON_GetObjectItemCaseSensitive(ee_subscriptionJSON, "scefDiamHost");
- if (scef_diam_host) {
- if (!cJSON_IsString(scef_diam_host)) {
- ogs_error("OpenAPI_ee_subscription_parseFromJSON() failed [scef_diam_host]");
- goto end;
- }
+ if (scef_diam_host) {
+ if (!cJSON_IsString(scef_diam_host)) {
+ ogs_error("OpenAPI_ee_subscription_parseFromJSON() failed [scef_diam_host]");
+ goto end;
+ }
}
cJSON *scef_diam_realm = cJSON_GetObjectItemCaseSensitive(ee_subscriptionJSON, "scefDiamRealm");
- if (scef_diam_realm) {
- if (!cJSON_IsString(scef_diam_realm)) {
- ogs_error("OpenAPI_ee_subscription_parseFromJSON() failed [scef_diam_realm]");
- goto end;
- }
+ if (scef_diam_realm) {
+ if (!cJSON_IsString(scef_diam_realm)) {
+ ogs_error("OpenAPI_ee_subscription_parseFromJSON() failed [scef_diam_realm]");
+ goto end;
+ }
}
cJSON *notify_correlation_id = cJSON_GetObjectItemCaseSensitive(ee_subscriptionJSON, "notifyCorrelationId");
- if (notify_correlation_id) {
- if (!cJSON_IsString(notify_correlation_id)) {
- ogs_error("OpenAPI_ee_subscription_parseFromJSON() failed [notify_correlation_id]");
- goto end;
- }
+ if (notify_correlation_id) {
+ if (!cJSON_IsString(notify_correlation_id)) {
+ ogs_error("OpenAPI_ee_subscription_parseFromJSON() failed [notify_correlation_id]");
+ goto end;
+ }
}
ee_subscription_local_var = OpenAPI_ee_subscription_create (
@@ -284,7 +284,7 @@ OpenAPI_ee_subscription_t *OpenAPI_ee_subscription_parseFromJSON(cJSON *ee_subsc
scef_diam_host ? ogs_strdup_or_assert(scef_diam_host->valuestring) : NULL,
scef_diam_realm ? ogs_strdup_or_assert(scef_diam_realm->valuestring) : NULL,
notify_correlation_id ? ogs_strdup_or_assert(notify_correlation_id->valuestring) : NULL
- );
+ );
return ee_subscription_local_var;
end:
diff --git a/lib/sbi/openapi/model/ee_subscription.h b/lib/sbi/openapi/model/ee_subscription.h
index 8a506eb25..da90f5c69 100644
--- a/lib/sbi/openapi/model/ee_subscription.h
+++ b/lib/sbi/openapi/model/ee_subscription.h
@@ -1,7 +1,7 @@
/*
* ee_subscription.h
*
- *
+ *
*/
#ifndef _OpenAPI_ee_subscription_H_
@@ -45,7 +45,7 @@ OpenAPI_ee_subscription_t *OpenAPI_ee_subscription_create(
char *scef_diam_host,
char *scef_diam_realm,
char *notify_correlation_id
- );
+);
void OpenAPI_ee_subscription_free(OpenAPI_ee_subscription_t *ee_subscription);
OpenAPI_ee_subscription_t *OpenAPI_ee_subscription_parseFromJSON(cJSON *ee_subscriptionJSON);
cJSON *OpenAPI_ee_subscription_convertToJSON(OpenAPI_ee_subscription_t *ee_subscription);
diff --git a/lib/sbi/openapi/model/ellipsoid_arc.c b/lib/sbi/openapi/model/ellipsoid_arc.c
index 783d3f082..99440d3eb 100644
--- a/lib/sbi/openapi/model/ellipsoid_arc.c
+++ b/lib/sbi/openapi/model/ellipsoid_arc.c
@@ -12,7 +12,7 @@ OpenAPI_ellipsoid_arc_t *OpenAPI_ellipsoid_arc_create(
int offset_angle,
int included_angle,
int confidence
- )
+)
{
OpenAPI_ellipsoid_arc_t *ellipsoid_arc_local_var = OpenAPI_malloc(sizeof(OpenAPI_ellipsoid_arc_t));
if (!ellipsoid_arc_local_var) {
@@ -111,7 +111,7 @@ OpenAPI_ellipsoid_arc_t *OpenAPI_ellipsoid_arc_parseFromJSON(cJSON *ellipsoid_ar
}
OpenAPI_supported_gad_shapes_t *shape_local_nonprim = NULL;
-
+
shape_local_nonprim = OpenAPI_supported_gad_shapes_parseFromJSON(shape);
cJSON *point = cJSON_GetObjectItemCaseSensitive(ellipsoid_arcJSON, "point");
@@ -121,7 +121,7 @@ OpenAPI_ellipsoid_arc_t *OpenAPI_ellipsoid_arc_parseFromJSON(cJSON *ellipsoid_ar
}
OpenAPI_geographical_coordinates_t *point_local_nonprim = NULL;
-
+
point_local_nonprim = OpenAPI_geographical_coordinates_parseFromJSON(point);
cJSON *inner_radius = cJSON_GetObjectItemCaseSensitive(ellipsoid_arcJSON, "innerRadius");
@@ -130,7 +130,7 @@ OpenAPI_ellipsoid_arc_t *OpenAPI_ellipsoid_arc_parseFromJSON(cJSON *ellipsoid_ar
goto end;
}
-
+
if (!cJSON_IsNumber(inner_radius)) {
ogs_error("OpenAPI_ellipsoid_arc_parseFromJSON() failed [inner_radius]");
goto end;
@@ -142,7 +142,7 @@ OpenAPI_ellipsoid_arc_t *OpenAPI_ellipsoid_arc_parseFromJSON(cJSON *ellipsoid_ar
goto end;
}
-
+
if (!cJSON_IsNumber(uncertainty_radius)) {
ogs_error("OpenAPI_ellipsoid_arc_parseFromJSON() failed [uncertainty_radius]");
goto end;
@@ -154,7 +154,7 @@ OpenAPI_ellipsoid_arc_t *OpenAPI_ellipsoid_arc_parseFromJSON(cJSON *ellipsoid_ar
goto end;
}
-
+
if (!cJSON_IsNumber(offset_angle)) {
ogs_error("OpenAPI_ellipsoid_arc_parseFromJSON() failed [offset_angle]");
goto end;
@@ -166,7 +166,7 @@ OpenAPI_ellipsoid_arc_t *OpenAPI_ellipsoid_arc_parseFromJSON(cJSON *ellipsoid_ar
goto end;
}
-
+
if (!cJSON_IsNumber(included_angle)) {
ogs_error("OpenAPI_ellipsoid_arc_parseFromJSON() failed [included_angle]");
goto end;
@@ -178,7 +178,7 @@ OpenAPI_ellipsoid_arc_t *OpenAPI_ellipsoid_arc_parseFromJSON(cJSON *ellipsoid_ar
goto end;
}
-
+
if (!cJSON_IsNumber(confidence)) {
ogs_error("OpenAPI_ellipsoid_arc_parseFromJSON() failed [confidence]");
goto end;
@@ -192,7 +192,7 @@ OpenAPI_ellipsoid_arc_t *OpenAPI_ellipsoid_arc_parseFromJSON(cJSON *ellipsoid_ar
offset_angle->valuedouble,
included_angle->valuedouble,
confidence->valuedouble
- );
+ );
return ellipsoid_arc_local_var;
end:
diff --git a/lib/sbi/openapi/model/ellipsoid_arc.h b/lib/sbi/openapi/model/ellipsoid_arc.h
index 2f3895955..6aa796f90 100644
--- a/lib/sbi/openapi/model/ellipsoid_arc.h
+++ b/lib/sbi/openapi/model/ellipsoid_arc.h
@@ -1,7 +1,7 @@
/*
* ellipsoid_arc.h
*
- *
+ *
*/
#ifndef _OpenAPI_ellipsoid_arc_H_
@@ -40,7 +40,7 @@ OpenAPI_ellipsoid_arc_t *OpenAPI_ellipsoid_arc_create(
int offset_angle,
int included_angle,
int confidence
- );
+);
void OpenAPI_ellipsoid_arc_free(OpenAPI_ellipsoid_arc_t *ellipsoid_arc);
OpenAPI_ellipsoid_arc_t *OpenAPI_ellipsoid_arc_parseFromJSON(cJSON *ellipsoid_arcJSON);
cJSON *OpenAPI_ellipsoid_arc_convertToJSON(OpenAPI_ellipsoid_arc_t *ellipsoid_arc);
diff --git a/lib/sbi/openapi/model/ellipsoid_arc_all_of.c b/lib/sbi/openapi/model/ellipsoid_arc_all_of.c
index 8a543761b..79d47fd8a 100644
--- a/lib/sbi/openapi/model/ellipsoid_arc_all_of.c
+++ b/lib/sbi/openapi/model/ellipsoid_arc_all_of.c
@@ -11,7 +11,7 @@ OpenAPI_ellipsoid_arc_all_of_t *OpenAPI_ellipsoid_arc_all_of_create(
int offset_angle,
int included_angle,
int confidence
- )
+)
{
OpenAPI_ellipsoid_arc_all_of_t *ellipsoid_arc_all_of_local_var = OpenAPI_malloc(sizeof(OpenAPI_ellipsoid_arc_all_of_t));
if (!ellipsoid_arc_all_of_local_var) {
@@ -97,7 +97,7 @@ OpenAPI_ellipsoid_arc_all_of_t *OpenAPI_ellipsoid_arc_all_of_parseFromJSON(cJSON
}
OpenAPI_geographical_coordinates_t *point_local_nonprim = NULL;
-
+
point_local_nonprim = OpenAPI_geographical_coordinates_parseFromJSON(point);
cJSON *inner_radius = cJSON_GetObjectItemCaseSensitive(ellipsoid_arc_all_ofJSON, "innerRadius");
@@ -106,7 +106,7 @@ OpenAPI_ellipsoid_arc_all_of_t *OpenAPI_ellipsoid_arc_all_of_parseFromJSON(cJSON
goto end;
}
-
+
if (!cJSON_IsNumber(inner_radius)) {
ogs_error("OpenAPI_ellipsoid_arc_all_of_parseFromJSON() failed [inner_radius]");
goto end;
@@ -118,7 +118,7 @@ OpenAPI_ellipsoid_arc_all_of_t *OpenAPI_ellipsoid_arc_all_of_parseFromJSON(cJSON
goto end;
}
-
+
if (!cJSON_IsNumber(uncertainty_radius)) {
ogs_error("OpenAPI_ellipsoid_arc_all_of_parseFromJSON() failed [uncertainty_radius]");
goto end;
@@ -130,7 +130,7 @@ OpenAPI_ellipsoid_arc_all_of_t *OpenAPI_ellipsoid_arc_all_of_parseFromJSON(cJSON
goto end;
}
-
+
if (!cJSON_IsNumber(offset_angle)) {
ogs_error("OpenAPI_ellipsoid_arc_all_of_parseFromJSON() failed [offset_angle]");
goto end;
@@ -142,7 +142,7 @@ OpenAPI_ellipsoid_arc_all_of_t *OpenAPI_ellipsoid_arc_all_of_parseFromJSON(cJSON
goto end;
}
-
+
if (!cJSON_IsNumber(included_angle)) {
ogs_error("OpenAPI_ellipsoid_arc_all_of_parseFromJSON() failed [included_angle]");
goto end;
@@ -154,7 +154,7 @@ OpenAPI_ellipsoid_arc_all_of_t *OpenAPI_ellipsoid_arc_all_of_parseFromJSON(cJSON
goto end;
}
-
+
if (!cJSON_IsNumber(confidence)) {
ogs_error("OpenAPI_ellipsoid_arc_all_of_parseFromJSON() failed [confidence]");
goto end;
@@ -167,7 +167,7 @@ OpenAPI_ellipsoid_arc_all_of_t *OpenAPI_ellipsoid_arc_all_of_parseFromJSON(cJSON
offset_angle->valuedouble,
included_angle->valuedouble,
confidence->valuedouble
- );
+ );
return ellipsoid_arc_all_of_local_var;
end:
diff --git a/lib/sbi/openapi/model/ellipsoid_arc_all_of.h b/lib/sbi/openapi/model/ellipsoid_arc_all_of.h
index 5f3b20e1e..ef7f51da3 100644
--- a/lib/sbi/openapi/model/ellipsoid_arc_all_of.h
+++ b/lib/sbi/openapi/model/ellipsoid_arc_all_of.h
@@ -1,7 +1,7 @@
/*
* ellipsoid_arc_all_of.h
*
- *
+ *
*/
#ifndef _OpenAPI_ellipsoid_arc_all_of_H_
@@ -35,7 +35,7 @@ OpenAPI_ellipsoid_arc_all_of_t *OpenAPI_ellipsoid_arc_all_of_create(
int offset_angle,
int included_angle,
int confidence
- );
+);
void OpenAPI_ellipsoid_arc_all_of_free(OpenAPI_ellipsoid_arc_all_of_t *ellipsoid_arc_all_of);
OpenAPI_ellipsoid_arc_all_of_t *OpenAPI_ellipsoid_arc_all_of_parseFromJSON(cJSON *ellipsoid_arc_all_ofJSON);
cJSON *OpenAPI_ellipsoid_arc_all_of_convertToJSON(OpenAPI_ellipsoid_arc_all_of_t *ellipsoid_arc_all_of);
diff --git a/lib/sbi/openapi/model/emergency_info.c b/lib/sbi/openapi/model/emergency_info.c
index 514fd2846..51f516037 100644
--- a/lib/sbi/openapi/model/emergency_info.c
+++ b/lib/sbi/openapi/model/emergency_info.c
@@ -9,7 +9,7 @@ OpenAPI_emergency_info_t *OpenAPI_emergency_info_create(
OpenAPI_ip_address_t *pgw_ip_address,
char *smf_instance_id,
int epdg_ind
- )
+)
{
OpenAPI_emergency_info_t *emergency_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_emergency_info_t));
if (!emergency_info_local_var) {
@@ -46,37 +46,37 @@ cJSON *OpenAPI_emergency_info_convertToJSON(OpenAPI_emergency_info_t *emergency_
item = cJSON_CreateObject();
if (emergency_info->pgw_fqdn) {
- if (cJSON_AddStringToObject(item, "pgwFqdn", emergency_info->pgw_fqdn) == NULL) {
- ogs_error("OpenAPI_emergency_info_convertToJSON() failed [pgw_fqdn]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "pgwFqdn", emergency_info->pgw_fqdn) == NULL) {
+ ogs_error("OpenAPI_emergency_info_convertToJSON() failed [pgw_fqdn]");
+ goto end;
+ }
}
if (emergency_info->pgw_ip_address) {
- cJSON *pgw_ip_address_local_JSON = OpenAPI_ip_address_convertToJSON(emergency_info->pgw_ip_address);
- if (pgw_ip_address_local_JSON == NULL) {
- ogs_error("OpenAPI_emergency_info_convertToJSON() failed [pgw_ip_address]");
- goto end;
- }
- cJSON_AddItemToObject(item, "pgwIpAddress", pgw_ip_address_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_emergency_info_convertToJSON() failed [pgw_ip_address]");
- goto end;
- }
+ cJSON *pgw_ip_address_local_JSON = OpenAPI_ip_address_convertToJSON(emergency_info->pgw_ip_address);
+ if (pgw_ip_address_local_JSON == NULL) {
+ ogs_error("OpenAPI_emergency_info_convertToJSON() failed [pgw_ip_address]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "pgwIpAddress", pgw_ip_address_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_emergency_info_convertToJSON() failed [pgw_ip_address]");
+ goto end;
+ }
}
if (emergency_info->smf_instance_id) {
- if (cJSON_AddStringToObject(item, "smfInstanceId", emergency_info->smf_instance_id) == NULL) {
- ogs_error("OpenAPI_emergency_info_convertToJSON() failed [smf_instance_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "smfInstanceId", emergency_info->smf_instance_id) == NULL) {
+ ogs_error("OpenAPI_emergency_info_convertToJSON() failed [smf_instance_id]");
+ goto end;
+ }
}
if (emergency_info->epdg_ind) {
- if (cJSON_AddBoolToObject(item, "epdgInd", emergency_info->epdg_ind) == NULL) {
- ogs_error("OpenAPI_emergency_info_convertToJSON() failed [epdg_ind]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "epdgInd", emergency_info->epdg_ind) == NULL) {
+ ogs_error("OpenAPI_emergency_info_convertToJSON() failed [epdg_ind]");
+ goto end;
+ }
}
end:
@@ -88,36 +88,36 @@ OpenAPI_emergency_info_t *OpenAPI_emergency_info_parseFromJSON(cJSON *emergency_
OpenAPI_emergency_info_t *emergency_info_local_var = NULL;
cJSON *pgw_fqdn = cJSON_GetObjectItemCaseSensitive(emergency_infoJSON, "pgwFqdn");
- if (pgw_fqdn) {
- if (!cJSON_IsString(pgw_fqdn)) {
- ogs_error("OpenAPI_emergency_info_parseFromJSON() failed [pgw_fqdn]");
- goto end;
- }
+ if (pgw_fqdn) {
+ if (!cJSON_IsString(pgw_fqdn)) {
+ ogs_error("OpenAPI_emergency_info_parseFromJSON() failed [pgw_fqdn]");
+ goto end;
+ }
}
cJSON *pgw_ip_address = cJSON_GetObjectItemCaseSensitive(emergency_infoJSON, "pgwIpAddress");
OpenAPI_ip_address_t *pgw_ip_address_local_nonprim = NULL;
- if (pgw_ip_address) {
- pgw_ip_address_local_nonprim = OpenAPI_ip_address_parseFromJSON(pgw_ip_address);
+ if (pgw_ip_address) {
+ pgw_ip_address_local_nonprim = OpenAPI_ip_address_parseFromJSON(pgw_ip_address);
}
cJSON *smf_instance_id = cJSON_GetObjectItemCaseSensitive(emergency_infoJSON, "smfInstanceId");
- if (smf_instance_id) {
- if (!cJSON_IsString(smf_instance_id)) {
- ogs_error("OpenAPI_emergency_info_parseFromJSON() failed [smf_instance_id]");
- goto end;
- }
+ if (smf_instance_id) {
+ if (!cJSON_IsString(smf_instance_id)) {
+ ogs_error("OpenAPI_emergency_info_parseFromJSON() failed [smf_instance_id]");
+ goto end;
+ }
}
cJSON *epdg_ind = cJSON_GetObjectItemCaseSensitive(emergency_infoJSON, "epdgInd");
- if (epdg_ind) {
- if (!cJSON_IsBool(epdg_ind)) {
- ogs_error("OpenAPI_emergency_info_parseFromJSON() failed [epdg_ind]");
- goto end;
- }
+ if (epdg_ind) {
+ if (!cJSON_IsBool(epdg_ind)) {
+ ogs_error("OpenAPI_emergency_info_parseFromJSON() failed [epdg_ind]");
+ goto end;
+ }
}
emergency_info_local_var = OpenAPI_emergency_info_create (
@@ -125,7 +125,7 @@ OpenAPI_emergency_info_t *OpenAPI_emergency_info_parseFromJSON(cJSON *emergency_
pgw_ip_address ? pgw_ip_address_local_nonprim : NULL,
smf_instance_id ? ogs_strdup_or_assert(smf_instance_id->valuestring) : NULL,
epdg_ind ? epdg_ind->valueint : 0
- );
+ );
return emergency_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/emergency_info.h b/lib/sbi/openapi/model/emergency_info.h
index ec9f29f99..a8648297d 100644
--- a/lib/sbi/openapi/model/emergency_info.h
+++ b/lib/sbi/openapi/model/emergency_info.h
@@ -1,7 +1,7 @@
/*
* emergency_info.h
*
- *
+ *
*/
#ifndef _OpenAPI_emergency_info_H_
@@ -31,7 +31,7 @@ OpenAPI_emergency_info_t *OpenAPI_emergency_info_create(
OpenAPI_ip_address_t *pgw_ip_address,
char *smf_instance_id,
int epdg_ind
- );
+);
void OpenAPI_emergency_info_free(OpenAPI_emergency_info_t *emergency_info);
OpenAPI_emergency_info_t *OpenAPI_emergency_info_parseFromJSON(cJSON *emergency_infoJSON);
cJSON *OpenAPI_emergency_info_convertToJSON(OpenAPI_emergency_info_t *emergency_info);
diff --git a/lib/sbi/openapi/model/emergency_info_1.c b/lib/sbi/openapi/model/emergency_info_1.c
new file mode 100644
index 000000000..04bb551be
--- /dev/null
+++ b/lib/sbi/openapi/model/emergency_info_1.c
@@ -0,0 +1,168 @@
+
+#include
+#include
+#include
+#include "emergency_info_1.h"
+
+OpenAPI_emergency_info_1_t *OpenAPI_emergency_info_1_create(
+ char *pgw_fqdn,
+ OpenAPI_ip_address_1_t *pgw_ip_address,
+ char *smf_instance_id,
+ int epdg_ind
+)
+{
+ OpenAPI_emergency_info_1_t *emergency_info_1_local_var = OpenAPI_malloc(sizeof(OpenAPI_emergency_info_1_t));
+ if (!emergency_info_1_local_var) {
+ return NULL;
+ }
+ emergency_info_1_local_var->pgw_fqdn = pgw_fqdn;
+ emergency_info_1_local_var->pgw_ip_address = pgw_ip_address;
+ emergency_info_1_local_var->smf_instance_id = smf_instance_id;
+ emergency_info_1_local_var->epdg_ind = epdg_ind;
+
+ return emergency_info_1_local_var;
+}
+
+void OpenAPI_emergency_info_1_free(OpenAPI_emergency_info_1_t *emergency_info_1)
+{
+ if (NULL == emergency_info_1) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ ogs_free(emergency_info_1->pgw_fqdn);
+ OpenAPI_ip_address_1_free(emergency_info_1->pgw_ip_address);
+ ogs_free(emergency_info_1->smf_instance_id);
+ ogs_free(emergency_info_1);
+}
+
+cJSON *OpenAPI_emergency_info_1_convertToJSON(OpenAPI_emergency_info_1_t *emergency_info_1)
+{
+ cJSON *item = NULL;
+
+ if (emergency_info_1 == NULL) {
+ ogs_error("OpenAPI_emergency_info_1_convertToJSON() failed [EmergencyInfo_1]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (emergency_info_1->pgw_fqdn) {
+ if (cJSON_AddStringToObject(item, "pgwFqdn", emergency_info_1->pgw_fqdn) == NULL) {
+ ogs_error("OpenAPI_emergency_info_1_convertToJSON() failed [pgw_fqdn]");
+ goto end;
+ }
+ }
+
+ if (emergency_info_1->pgw_ip_address) {
+ cJSON *pgw_ip_address_local_JSON = OpenAPI_ip_address_1_convertToJSON(emergency_info_1->pgw_ip_address);
+ if (pgw_ip_address_local_JSON == NULL) {
+ ogs_error("OpenAPI_emergency_info_1_convertToJSON() failed [pgw_ip_address]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "pgwIpAddress", pgw_ip_address_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_emergency_info_1_convertToJSON() failed [pgw_ip_address]");
+ goto end;
+ }
+ }
+
+ if (emergency_info_1->smf_instance_id) {
+ if (cJSON_AddStringToObject(item, "smfInstanceId", emergency_info_1->smf_instance_id) == NULL) {
+ ogs_error("OpenAPI_emergency_info_1_convertToJSON() failed [smf_instance_id]");
+ goto end;
+ }
+ }
+
+ if (emergency_info_1->epdg_ind) {
+ if (cJSON_AddBoolToObject(item, "epdgInd", emergency_info_1->epdg_ind) == NULL) {
+ ogs_error("OpenAPI_emergency_info_1_convertToJSON() failed [epdg_ind]");
+ goto end;
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_emergency_info_1_t *OpenAPI_emergency_info_1_parseFromJSON(cJSON *emergency_info_1JSON)
+{
+ OpenAPI_emergency_info_1_t *emergency_info_1_local_var = NULL;
+ cJSON *pgw_fqdn = cJSON_GetObjectItemCaseSensitive(emergency_info_1JSON, "pgwFqdn");
+
+ if (pgw_fqdn) {
+ if (!cJSON_IsString(pgw_fqdn)) {
+ ogs_error("OpenAPI_emergency_info_1_parseFromJSON() failed [pgw_fqdn]");
+ goto end;
+ }
+ }
+
+ cJSON *pgw_ip_address = cJSON_GetObjectItemCaseSensitive(emergency_info_1JSON, "pgwIpAddress");
+
+ OpenAPI_ip_address_1_t *pgw_ip_address_local_nonprim = NULL;
+ if (pgw_ip_address) {
+ pgw_ip_address_local_nonprim = OpenAPI_ip_address_1_parseFromJSON(pgw_ip_address);
+ }
+
+ cJSON *smf_instance_id = cJSON_GetObjectItemCaseSensitive(emergency_info_1JSON, "smfInstanceId");
+
+ if (smf_instance_id) {
+ if (!cJSON_IsString(smf_instance_id)) {
+ ogs_error("OpenAPI_emergency_info_1_parseFromJSON() failed [smf_instance_id]");
+ goto end;
+ }
+ }
+
+ cJSON *epdg_ind = cJSON_GetObjectItemCaseSensitive(emergency_info_1JSON, "epdgInd");
+
+ if (epdg_ind) {
+ if (!cJSON_IsBool(epdg_ind)) {
+ ogs_error("OpenAPI_emergency_info_1_parseFromJSON() failed [epdg_ind]");
+ goto end;
+ }
+ }
+
+ emergency_info_1_local_var = OpenAPI_emergency_info_1_create (
+ pgw_fqdn ? ogs_strdup_or_assert(pgw_fqdn->valuestring) : NULL,
+ pgw_ip_address ? pgw_ip_address_local_nonprim : NULL,
+ smf_instance_id ? ogs_strdup_or_assert(smf_instance_id->valuestring) : NULL,
+ epdg_ind ? epdg_ind->valueint : 0
+ );
+
+ return emergency_info_1_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_emergency_info_1_t *OpenAPI_emergency_info_1_copy(OpenAPI_emergency_info_1_t *dst, OpenAPI_emergency_info_1_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_emergency_info_1_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_emergency_info_1_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_emergency_info_1_free(dst);
+ dst = OpenAPI_emergency_info_1_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/emergency_info_1.h b/lib/sbi/openapi/model/emergency_info_1.h
new file mode 100644
index 000000000..8a67e8bab
--- /dev/null
+++ b/lib/sbi/openapi/model/emergency_info_1.h
@@ -0,0 +1,45 @@
+/*
+ * emergency_info_1.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_emergency_info_1_H_
+#define _OpenAPI_emergency_info_1_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+#include "ip_address_1.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_emergency_info_1_s OpenAPI_emergency_info_1_t;
+typedef struct OpenAPI_emergency_info_1_s {
+ char *pgw_fqdn;
+ struct OpenAPI_ip_address_1_s *pgw_ip_address;
+ char *smf_instance_id;
+ int epdg_ind;
+} OpenAPI_emergency_info_1_t;
+
+OpenAPI_emergency_info_1_t *OpenAPI_emergency_info_1_create(
+ char *pgw_fqdn,
+ OpenAPI_ip_address_1_t *pgw_ip_address,
+ char *smf_instance_id,
+ int epdg_ind
+);
+void OpenAPI_emergency_info_1_free(OpenAPI_emergency_info_1_t *emergency_info_1);
+OpenAPI_emergency_info_1_t *OpenAPI_emergency_info_1_parseFromJSON(cJSON *emergency_info_1JSON);
+cJSON *OpenAPI_emergency_info_1_convertToJSON(OpenAPI_emergency_info_1_t *emergency_info_1);
+OpenAPI_emergency_info_1_t *OpenAPI_emergency_info_1_copy(OpenAPI_emergency_info_1_t *dst, OpenAPI_emergency_info_1_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_emergency_info_1_H_ */
+
diff --git a/lib/sbi/openapi/model/enhanced_coverage_restriction_data.c b/lib/sbi/openapi/model/enhanced_coverage_restriction_data.c
index d76e52405..518254395 100644
--- a/lib/sbi/openapi/model/enhanced_coverage_restriction_data.c
+++ b/lib/sbi/openapi/model/enhanced_coverage_restriction_data.c
@@ -6,7 +6,7 @@
OpenAPI_enhanced_coverage_restriction_data_t *OpenAPI_enhanced_coverage_restriction_data_create(
OpenAPI_list_t *plmn_ec_info_list
- )
+)
{
OpenAPI_enhanced_coverage_restriction_data_t *enhanced_coverage_restriction_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_enhanced_coverage_restriction_data_t));
if (!enhanced_coverage_restriction_data_local_var) {
@@ -41,24 +41,24 @@ cJSON *OpenAPI_enhanced_coverage_restriction_data_convertToJSON(OpenAPI_enhanced
item = cJSON_CreateObject();
if (enhanced_coverage_restriction_data->plmn_ec_info_list) {
- cJSON *plmn_ec_info_listList = cJSON_AddArrayToObject(item, "plmnEcInfoList");
- if (plmn_ec_info_listList == NULL) {
- ogs_error("OpenAPI_enhanced_coverage_restriction_data_convertToJSON() failed [plmn_ec_info_list]");
- goto end;
- }
+ cJSON *plmn_ec_info_listList = cJSON_AddArrayToObject(item, "plmnEcInfoList");
+ if (plmn_ec_info_listList == NULL) {
+ ogs_error("OpenAPI_enhanced_coverage_restriction_data_convertToJSON() failed [plmn_ec_info_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *plmn_ec_info_list_node;
- if (enhanced_coverage_restriction_data->plmn_ec_info_list) {
- OpenAPI_list_for_each(enhanced_coverage_restriction_data->plmn_ec_info_list, plmn_ec_info_list_node) {
- cJSON *itemLocal = OpenAPI_plmn_ec_info_convertToJSON(plmn_ec_info_list_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_enhanced_coverage_restriction_data_convertToJSON() failed [plmn_ec_info_list]");
- goto end;
- }
- cJSON_AddItemToArray(plmn_ec_info_listList, itemLocal);
+ OpenAPI_lnode_t *plmn_ec_info_list_node;
+ if (enhanced_coverage_restriction_data->plmn_ec_info_list) {
+ OpenAPI_list_for_each(enhanced_coverage_restriction_data->plmn_ec_info_list, plmn_ec_info_list_node) {
+ cJSON *itemLocal = OpenAPI_plmn_ec_info_convertToJSON(plmn_ec_info_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_enhanced_coverage_restriction_data_convertToJSON() failed [plmn_ec_info_list]");
+ goto end;
}
+ cJSON_AddItemToArray(plmn_ec_info_listList, itemLocal);
}
}
+ }
end:
return item;
@@ -70,29 +70,29 @@ OpenAPI_enhanced_coverage_restriction_data_t *OpenAPI_enhanced_coverage_restrict
cJSON *plmn_ec_info_list = cJSON_GetObjectItemCaseSensitive(enhanced_coverage_restriction_dataJSON, "plmnEcInfoList");
OpenAPI_list_t *plmn_ec_info_listList;
- if (plmn_ec_info_list) {
- cJSON *plmn_ec_info_list_local_nonprimitive;
- if (!cJSON_IsArray(plmn_ec_info_list)) {
+ if (plmn_ec_info_list) {
+ cJSON *plmn_ec_info_list_local_nonprimitive;
+ if (!cJSON_IsArray(plmn_ec_info_list)){
+ ogs_error("OpenAPI_enhanced_coverage_restriction_data_parseFromJSON() failed [plmn_ec_info_list]");
+ goto end;
+ }
+
+ plmn_ec_info_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(plmn_ec_info_list_local_nonprimitive, plmn_ec_info_list ) {
+ if (!cJSON_IsObject(plmn_ec_info_list_local_nonprimitive)) {
ogs_error("OpenAPI_enhanced_coverage_restriction_data_parseFromJSON() failed [plmn_ec_info_list]");
goto end;
}
+ OpenAPI_plmn_ec_info_t *plmn_ec_info_listItem = OpenAPI_plmn_ec_info_parseFromJSON(plmn_ec_info_list_local_nonprimitive);
- plmn_ec_info_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(plmn_ec_info_list_local_nonprimitive, plmn_ec_info_list ) {
- if (!cJSON_IsObject(plmn_ec_info_list_local_nonprimitive)) {
- ogs_error("OpenAPI_enhanced_coverage_restriction_data_parseFromJSON() failed [plmn_ec_info_list]");
- goto end;
- }
- OpenAPI_plmn_ec_info_t *plmn_ec_info_listItem = OpenAPI_plmn_ec_info_parseFromJSON(plmn_ec_info_list_local_nonprimitive);
-
- OpenAPI_list_add(plmn_ec_info_listList, plmn_ec_info_listItem);
- }
+ OpenAPI_list_add(plmn_ec_info_listList, plmn_ec_info_listItem);
+ }
}
enhanced_coverage_restriction_data_local_var = OpenAPI_enhanced_coverage_restriction_data_create (
plmn_ec_info_list ? plmn_ec_info_listList : NULL
- );
+ );
return enhanced_coverage_restriction_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/enhanced_coverage_restriction_data.h b/lib/sbi/openapi/model/enhanced_coverage_restriction_data.h
index c82b082d5..ba9ff7ddf 100644
--- a/lib/sbi/openapi/model/enhanced_coverage_restriction_data.h
+++ b/lib/sbi/openapi/model/enhanced_coverage_restriction_data.h
@@ -1,7 +1,7 @@
/*
* enhanced_coverage_restriction_data.h
*
- *
+ *
*/
#ifndef _OpenAPI_enhanced_coverage_restriction_data_H_
@@ -25,7 +25,7 @@ typedef struct OpenAPI_enhanced_coverage_restriction_data_s {
OpenAPI_enhanced_coverage_restriction_data_t *OpenAPI_enhanced_coverage_restriction_data_create(
OpenAPI_list_t *plmn_ec_info_list
- );
+);
void OpenAPI_enhanced_coverage_restriction_data_free(OpenAPI_enhanced_coverage_restriction_data_t *enhanced_coverage_restriction_data);
OpenAPI_enhanced_coverage_restriction_data_t *OpenAPI_enhanced_coverage_restriction_data_parseFromJSON(cJSON *enhanced_coverage_restriction_dataJSON);
cJSON *OpenAPI_enhanced_coverage_restriction_data_convertToJSON(OpenAPI_enhanced_coverage_restriction_data_t *enhanced_coverage_restriction_data);
diff --git a/lib/sbi/openapi/model/eps_bearer_info.c b/lib/sbi/openapi/model/eps_bearer_info.c
index a894e0419..8d890c660 100644
--- a/lib/sbi/openapi/model/eps_bearer_info.c
+++ b/lib/sbi/openapi/model/eps_bearer_info.c
@@ -8,7 +8,7 @@ OpenAPI_eps_bearer_info_t *OpenAPI_eps_bearer_info_create(
int ebi,
char pgw_s8u_fteid,
char bearer_level_qo_s
- )
+)
{
OpenAPI_eps_bearer_info_t *eps_bearer_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_eps_bearer_info_t));
if (!eps_bearer_info_local_var) {
@@ -68,7 +68,7 @@ OpenAPI_eps_bearer_info_t *OpenAPI_eps_bearer_info_parseFromJSON(cJSON *eps_bear
goto end;
}
-
+
if (!cJSON_IsNumber(ebi)) {
ogs_error("OpenAPI_eps_bearer_info_parseFromJSON() failed [ebi]");
goto end;
@@ -80,7 +80,7 @@ OpenAPI_eps_bearer_info_t *OpenAPI_eps_bearer_info_parseFromJSON(cJSON *eps_bear
goto end;
}
-
+
if (!cJSON_IsNumber(pgw_s8u_fteid)) {
ogs_error("OpenAPI_eps_bearer_info_parseFromJSON() failed [pgw_s8u_fteid]");
goto end;
@@ -92,7 +92,7 @@ OpenAPI_eps_bearer_info_t *OpenAPI_eps_bearer_info_parseFromJSON(cJSON *eps_bear
goto end;
}
-
+
if (!cJSON_IsNumber(bearer_level_qo_s)) {
ogs_error("OpenAPI_eps_bearer_info_parseFromJSON() failed [bearer_level_qo_s]");
goto end;
@@ -102,7 +102,7 @@ OpenAPI_eps_bearer_info_t *OpenAPI_eps_bearer_info_parseFromJSON(cJSON *eps_bear
ebi->valuedouble,
pgw_s8u_fteid->valueint,
bearer_level_qo_s->valueint
- );
+ );
return eps_bearer_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/eps_bearer_info.h b/lib/sbi/openapi/model/eps_bearer_info.h
index 18faa622f..9a7e37f3c 100644
--- a/lib/sbi/openapi/model/eps_bearer_info.h
+++ b/lib/sbi/openapi/model/eps_bearer_info.h
@@ -1,7 +1,7 @@
/*
* eps_bearer_info.h
*
- *
+ *
*/
#ifndef _OpenAPI_eps_bearer_info_H_
@@ -28,7 +28,7 @@ OpenAPI_eps_bearer_info_t *OpenAPI_eps_bearer_info_create(
int ebi,
char pgw_s8u_fteid,
char bearer_level_qo_s
- );
+);
void OpenAPI_eps_bearer_info_free(OpenAPI_eps_bearer_info_t *eps_bearer_info);
OpenAPI_eps_bearer_info_t *OpenAPI_eps_bearer_info_parseFromJSON(cJSON *eps_bearer_infoJSON);
cJSON *OpenAPI_eps_bearer_info_convertToJSON(OpenAPI_eps_bearer_info_t *eps_bearer_info);
diff --git a/lib/sbi/openapi/model/eps_interworking_indication.h b/lib/sbi/openapi/model/eps_interworking_indication.h
index 5e4d80621..214a414cc 100644
--- a/lib/sbi/openapi/model/eps_interworking_indication.h
+++ b/lib/sbi/openapi/model/eps_interworking_indication.h
@@ -1,7 +1,7 @@
/*
* eps_interworking_indication.h
*
- *
+ *
*/
#ifndef _OpenAPI_eps_interworking_indication_H_
diff --git a/lib/sbi/openapi/model/eps_interworking_info.c b/lib/sbi/openapi/model/eps_interworking_info.c
index 4a2aee6f9..a813c3857 100644
--- a/lib/sbi/openapi/model/eps_interworking_info.c
+++ b/lib/sbi/openapi/model/eps_interworking_info.c
@@ -6,7 +6,7 @@
OpenAPI_eps_interworking_info_t *OpenAPI_eps_interworking_info_create(
OpenAPI_list_t* eps_iwk_pgws
- )
+)
{
OpenAPI_eps_interworking_info_t *eps_interworking_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_eps_interworking_info_t));
if (!eps_interworking_info_local_var) {
@@ -43,22 +43,22 @@ cJSON *OpenAPI_eps_interworking_info_convertToJSON(OpenAPI_eps_interworking_info
item = cJSON_CreateObject();
if (eps_interworking_info->eps_iwk_pgws) {
- cJSON *eps_iwk_pgws = cJSON_AddObjectToObject(item, "epsIwkPgws");
- if (eps_iwk_pgws == NULL) {
+ cJSON *eps_iwk_pgws = cJSON_AddObjectToObject(item, "epsIwkPgws");
+ if (eps_iwk_pgws == NULL) {
+ ogs_error("OpenAPI_eps_interworking_info_convertToJSON() failed [eps_iwk_pgws]");
+ goto end;
+ }
+ cJSON *localMapObject = eps_iwk_pgws;
+ OpenAPI_lnode_t *eps_iwk_pgws_node;
+ if (eps_interworking_info->eps_iwk_pgws) {
+ OpenAPI_list_for_each(eps_interworking_info->eps_iwk_pgws, eps_iwk_pgws_node) {
+ OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)eps_iwk_pgws_node->data;
+ cJSON *itemLocal = OpenAPI_eps_iwk_pgw_convertToJSON(localKeyValue->value);
+ if (itemLocal == NULL) {
ogs_error("OpenAPI_eps_interworking_info_convertToJSON() failed [eps_iwk_pgws]");
goto end;
}
- cJSON *localMapObject = eps_iwk_pgws;
- OpenAPI_lnode_t *eps_iwk_pgws_node;
- if (eps_interworking_info->eps_iwk_pgws) {
- OpenAPI_list_for_each(eps_interworking_info->eps_iwk_pgws, eps_iwk_pgws_node) {
- OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)eps_iwk_pgws_node->data;
- cJSON *itemLocal = OpenAPI_eps_iwk_pgw_convertToJSON(localKeyValue->value);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_eps_interworking_info_convertToJSON() failed [eps_iwk_pgws]");
- goto end;
- }
- cJSON_AddItemToObject(eps_iwk_pgws, localKeyValue->key, itemLocal);
+ cJSON_AddItemToObject(eps_iwk_pgws, localKeyValue->key, itemLocal);
}
}
}
@@ -73,29 +73,29 @@ OpenAPI_eps_interworking_info_t *OpenAPI_eps_interworking_info_parseFromJSON(cJS
cJSON *eps_iwk_pgws = cJSON_GetObjectItemCaseSensitive(eps_interworking_infoJSON, "epsIwkPgws");
OpenAPI_list_t *eps_iwk_pgwsList;
- if (eps_iwk_pgws) {
- cJSON *eps_iwk_pgws_local_map;
- if (!cJSON_IsObject(eps_iwk_pgws)) {
+ if (eps_iwk_pgws) {
+ cJSON *eps_iwk_pgws_local_map;
+ if (!cJSON_IsObject(eps_iwk_pgws)) {
+ ogs_error("OpenAPI_eps_interworking_info_parseFromJSON() failed [eps_iwk_pgws]");
+ goto end;
+ }
+ eps_iwk_pgwsList = OpenAPI_list_create();
+ OpenAPI_map_t *localMapKeyPair = NULL;
+ cJSON_ArrayForEach(eps_iwk_pgws_local_map, eps_iwk_pgws) {
+ cJSON *localMapObject = eps_iwk_pgws_local_map;
+ if (!cJSON_IsObject(eps_iwk_pgws_local_map)) {
ogs_error("OpenAPI_eps_interworking_info_parseFromJSON() failed [eps_iwk_pgws]");
goto end;
}
- eps_iwk_pgwsList = OpenAPI_list_create();
- OpenAPI_map_t *localMapKeyPair = NULL;
- cJSON_ArrayForEach(eps_iwk_pgws_local_map, eps_iwk_pgws) {
- cJSON *localMapObject = eps_iwk_pgws_local_map;
- if (!cJSON_IsObject(eps_iwk_pgws_local_map)) {
- ogs_error("OpenAPI_eps_interworking_info_parseFromJSON() failed [eps_iwk_pgws]");
- goto end;
- }
- localMapKeyPair = OpenAPI_map_create(
- localMapObject->string, OpenAPI_eps_iwk_pgw_parseFromJSON(localMapObject));
- OpenAPI_list_add(eps_iwk_pgwsList, localMapKeyPair);
- }
+ localMapKeyPair = OpenAPI_map_create(
+ localMapObject->string, OpenAPI_eps_iwk_pgw_parseFromJSON(localMapObject));
+ OpenAPI_list_add(eps_iwk_pgwsList , localMapKeyPair);
+ }
}
eps_interworking_info_local_var = OpenAPI_eps_interworking_info_create (
eps_iwk_pgws ? eps_iwk_pgwsList : NULL
- );
+ );
return eps_interworking_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/eps_interworking_info.h b/lib/sbi/openapi/model/eps_interworking_info.h
index 7268cb6c6..b86e59e78 100644
--- a/lib/sbi/openapi/model/eps_interworking_info.h
+++ b/lib/sbi/openapi/model/eps_interworking_info.h
@@ -1,7 +1,7 @@
/*
* eps_interworking_info.h
*
- *
+ *
*/
#ifndef _OpenAPI_eps_interworking_info_H_
@@ -25,7 +25,7 @@ typedef struct OpenAPI_eps_interworking_info_s {
OpenAPI_eps_interworking_info_t *OpenAPI_eps_interworking_info_create(
OpenAPI_list_t* eps_iwk_pgws
- );
+);
void OpenAPI_eps_interworking_info_free(OpenAPI_eps_interworking_info_t *eps_interworking_info);
OpenAPI_eps_interworking_info_t *OpenAPI_eps_interworking_info_parseFromJSON(cJSON *eps_interworking_infoJSON);
cJSON *OpenAPI_eps_interworking_info_convertToJSON(OpenAPI_eps_interworking_info_t *eps_interworking_info);
diff --git a/lib/sbi/openapi/model/eps_iwk_pgw.c b/lib/sbi/openapi/model/eps_iwk_pgw.c
index cca03dee2..f2f7deb8b 100644
--- a/lib/sbi/openapi/model/eps_iwk_pgw.c
+++ b/lib/sbi/openapi/model/eps_iwk_pgw.c
@@ -7,7 +7,7 @@
OpenAPI_eps_iwk_pgw_t *OpenAPI_eps_iwk_pgw_create(
char *pgw_fqdn,
char *smf_instance_id
- )
+)
{
OpenAPI_eps_iwk_pgw_t *eps_iwk_pgw_local_var = OpenAPI_malloc(sizeof(OpenAPI_eps_iwk_pgw_t));
if (!eps_iwk_pgw_local_var) {
@@ -63,7 +63,7 @@ OpenAPI_eps_iwk_pgw_t *OpenAPI_eps_iwk_pgw_parseFromJSON(cJSON *eps_iwk_pgwJSON)
goto end;
}
-
+
if (!cJSON_IsString(pgw_fqdn)) {
ogs_error("OpenAPI_eps_iwk_pgw_parseFromJSON() failed [pgw_fqdn]");
goto end;
@@ -75,7 +75,7 @@ OpenAPI_eps_iwk_pgw_t *OpenAPI_eps_iwk_pgw_parseFromJSON(cJSON *eps_iwk_pgwJSON)
goto end;
}
-
+
if (!cJSON_IsString(smf_instance_id)) {
ogs_error("OpenAPI_eps_iwk_pgw_parseFromJSON() failed [smf_instance_id]");
goto end;
@@ -84,7 +84,7 @@ OpenAPI_eps_iwk_pgw_t *OpenAPI_eps_iwk_pgw_parseFromJSON(cJSON *eps_iwk_pgwJSON)
eps_iwk_pgw_local_var = OpenAPI_eps_iwk_pgw_create (
ogs_strdup_or_assert(pgw_fqdn->valuestring),
ogs_strdup_or_assert(smf_instance_id->valuestring)
- );
+ );
return eps_iwk_pgw_local_var;
end:
diff --git a/lib/sbi/openapi/model/eps_iwk_pgw.h b/lib/sbi/openapi/model/eps_iwk_pgw.h
index 9b4b08628..b74ef76d8 100644
--- a/lib/sbi/openapi/model/eps_iwk_pgw.h
+++ b/lib/sbi/openapi/model/eps_iwk_pgw.h
@@ -1,7 +1,7 @@
/*
* eps_iwk_pgw.h
*
- *
+ *
*/
#ifndef _OpenAPI_eps_iwk_pgw_H_
@@ -26,7 +26,7 @@ typedef struct OpenAPI_eps_iwk_pgw_s {
OpenAPI_eps_iwk_pgw_t *OpenAPI_eps_iwk_pgw_create(
char *pgw_fqdn,
char *smf_instance_id
- );
+);
void OpenAPI_eps_iwk_pgw_free(OpenAPI_eps_iwk_pgw_t *eps_iwk_pgw);
OpenAPI_eps_iwk_pgw_t *OpenAPI_eps_iwk_pgw_parseFromJSON(cJSON *eps_iwk_pgwJSON);
cJSON *OpenAPI_eps_iwk_pgw_convertToJSON(OpenAPI_eps_iwk_pgw_t *eps_iwk_pgw);
diff --git a/lib/sbi/openapi/model/eps_nas_ciphering_algorithm.c b/lib/sbi/openapi/model/eps_nas_ciphering_algorithm.c
new file mode 100644
index 000000000..755accf1b
--- /dev/null
+++ b/lib/sbi/openapi/model/eps_nas_ciphering_algorithm.c
@@ -0,0 +1,30 @@
+
+#include
+#include
+#include
+#include "eps_nas_ciphering_algorithm.h"
+
+char* OpenAPI_eps_nas_ciphering_algorithm_ToString(OpenAPI_eps_nas_ciphering_algorithm_e eps_nas_ciphering_algorithm)
+{
+ const char *eps_nas_ciphering_algorithmArray[] = { "NULL", "EEA0", "EEA1", "EEA2", "EEA3" };
+ size_t sizeofArray = sizeof(eps_nas_ciphering_algorithmArray) / sizeof(eps_nas_ciphering_algorithmArray[0]);
+ if (eps_nas_ciphering_algorithm < sizeofArray)
+ return (char *)eps_nas_ciphering_algorithmArray[eps_nas_ciphering_algorithm];
+ else
+ return (char *)"Unknown";
+}
+
+OpenAPI_eps_nas_ciphering_algorithm_e OpenAPI_eps_nas_ciphering_algorithm_FromString(char* eps_nas_ciphering_algorithm)
+{
+ int stringToReturn = 0;
+ const char *eps_nas_ciphering_algorithmArray[] = { "NULL", "EEA0", "EEA1", "EEA2", "EEA3" };
+ size_t sizeofArray = sizeof(eps_nas_ciphering_algorithmArray) / sizeof(eps_nas_ciphering_algorithmArray[0]);
+ while (stringToReturn < sizeofArray) {
+ if (strcmp(eps_nas_ciphering_algorithm, eps_nas_ciphering_algorithmArray[stringToReturn]) == 0) {
+ return stringToReturn;
+ }
+ stringToReturn++;
+ }
+ return 0;
+}
+
diff --git a/lib/sbi/openapi/model/eps_nas_ciphering_algorithm.h b/lib/sbi/openapi/model/eps_nas_ciphering_algorithm.h
new file mode 100644
index 000000000..fe0ead4d1
--- /dev/null
+++ b/lib/sbi/openapi/model/eps_nas_ciphering_algorithm.h
@@ -0,0 +1,31 @@
+/*
+ * eps_nas_ciphering_algorithm.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_eps_nas_ciphering_algorithm_H_
+#define _OpenAPI_eps_nas_ciphering_algorithm_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum { OpenAPI_eps_nas_ciphering_algorithm_NULL = 0, OpenAPI_eps_nas_ciphering_algorithm_EEA0, OpenAPI_eps_nas_ciphering_algorithm_EEA1, OpenAPI_eps_nas_ciphering_algorithm_EEA2, OpenAPI_eps_nas_ciphering_algorithm_EEA3 } OpenAPI_eps_nas_ciphering_algorithm_e;
+
+char* OpenAPI_eps_nas_ciphering_algorithm_ToString(OpenAPI_eps_nas_ciphering_algorithm_e eps_nas_ciphering_algorithm);
+
+OpenAPI_eps_nas_ciphering_algorithm_e OpenAPI_eps_nas_ciphering_algorithm_FromString(char* eps_nas_ciphering_algorithm);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_eps_nas_ciphering_algorithm_H_ */
+
diff --git a/lib/sbi/openapi/model/eps_nas_integrity_algorithm.c b/lib/sbi/openapi/model/eps_nas_integrity_algorithm.c
new file mode 100644
index 000000000..7b7b5f011
--- /dev/null
+++ b/lib/sbi/openapi/model/eps_nas_integrity_algorithm.c
@@ -0,0 +1,30 @@
+
+#include
+#include
+#include
+#include "eps_nas_integrity_algorithm.h"
+
+char* OpenAPI_eps_nas_integrity_algorithm_ToString(OpenAPI_eps_nas_integrity_algorithm_e eps_nas_integrity_algorithm)
+{
+ const char *eps_nas_integrity_algorithmArray[] = { "NULL", "EIA0", "EIA1", "EIA2", "EIA3" };
+ size_t sizeofArray = sizeof(eps_nas_integrity_algorithmArray) / sizeof(eps_nas_integrity_algorithmArray[0]);
+ if (eps_nas_integrity_algorithm < sizeofArray)
+ return (char *)eps_nas_integrity_algorithmArray[eps_nas_integrity_algorithm];
+ else
+ return (char *)"Unknown";
+}
+
+OpenAPI_eps_nas_integrity_algorithm_e OpenAPI_eps_nas_integrity_algorithm_FromString(char* eps_nas_integrity_algorithm)
+{
+ int stringToReturn = 0;
+ const char *eps_nas_integrity_algorithmArray[] = { "NULL", "EIA0", "EIA1", "EIA2", "EIA3" };
+ size_t sizeofArray = sizeof(eps_nas_integrity_algorithmArray) / sizeof(eps_nas_integrity_algorithmArray[0]);
+ while (stringToReturn < sizeofArray) {
+ if (strcmp(eps_nas_integrity_algorithm, eps_nas_integrity_algorithmArray[stringToReturn]) == 0) {
+ return stringToReturn;
+ }
+ stringToReturn++;
+ }
+ return 0;
+}
+
diff --git a/lib/sbi/openapi/model/eps_nas_integrity_algorithm.h b/lib/sbi/openapi/model/eps_nas_integrity_algorithm.h
new file mode 100644
index 000000000..46b707a02
--- /dev/null
+++ b/lib/sbi/openapi/model/eps_nas_integrity_algorithm.h
@@ -0,0 +1,31 @@
+/*
+ * eps_nas_integrity_algorithm.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_eps_nas_integrity_algorithm_H_
+#define _OpenAPI_eps_nas_integrity_algorithm_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum { OpenAPI_eps_nas_integrity_algorithm_NULL = 0, OpenAPI_eps_nas_integrity_algorithm_EIA0, OpenAPI_eps_nas_integrity_algorithm_EIA1, OpenAPI_eps_nas_integrity_algorithm_EIA2, OpenAPI_eps_nas_integrity_algorithm_EIA3 } OpenAPI_eps_nas_integrity_algorithm_e;
+
+char* OpenAPI_eps_nas_integrity_algorithm_ToString(OpenAPI_eps_nas_integrity_algorithm_e eps_nas_integrity_algorithm);
+
+OpenAPI_eps_nas_integrity_algorithm_e OpenAPI_eps_nas_integrity_algorithm_FromString(char* eps_nas_integrity_algorithm);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_eps_nas_integrity_algorithm_H_ */
+
diff --git a/lib/sbi/openapi/model/eps_nas_security_mode.c b/lib/sbi/openapi/model/eps_nas_security_mode.c
new file mode 100644
index 000000000..3ebaba42d
--- /dev/null
+++ b/lib/sbi/openapi/model/eps_nas_security_mode.c
@@ -0,0 +1,129 @@
+
+#include
+#include
+#include
+#include "eps_nas_security_mode.h"
+
+OpenAPI_eps_nas_security_mode_t *OpenAPI_eps_nas_security_mode_create(
+ OpenAPI_eps_nas_integrity_algorithm_e integrity_algorithm,
+ OpenAPI_eps_nas_ciphering_algorithm_e ciphering_algorithm
+)
+{
+ OpenAPI_eps_nas_security_mode_t *eps_nas_security_mode_local_var = OpenAPI_malloc(sizeof(OpenAPI_eps_nas_security_mode_t));
+ if (!eps_nas_security_mode_local_var) {
+ return NULL;
+ }
+ eps_nas_security_mode_local_var->integrity_algorithm = integrity_algorithm;
+ eps_nas_security_mode_local_var->ciphering_algorithm = ciphering_algorithm;
+
+ return eps_nas_security_mode_local_var;
+}
+
+void OpenAPI_eps_nas_security_mode_free(OpenAPI_eps_nas_security_mode_t *eps_nas_security_mode)
+{
+ if (NULL == eps_nas_security_mode) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ ogs_free(eps_nas_security_mode);
+}
+
+cJSON *OpenAPI_eps_nas_security_mode_convertToJSON(OpenAPI_eps_nas_security_mode_t *eps_nas_security_mode)
+{
+ cJSON *item = NULL;
+
+ if (eps_nas_security_mode == NULL) {
+ ogs_error("OpenAPI_eps_nas_security_mode_convertToJSON() failed [EpsNasSecurityMode]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (cJSON_AddStringToObject(item, "integrityAlgorithm", OpenAPI_eps_nas_integrity_algorithm_ToString(eps_nas_security_mode->integrity_algorithm)) == NULL) {
+ ogs_error("OpenAPI_eps_nas_security_mode_convertToJSON() failed [integrity_algorithm]");
+ goto end;
+ }
+
+ if (cJSON_AddStringToObject(item, "cipheringAlgorithm", OpenAPI_eps_nas_ciphering_algorithm_ToString(eps_nas_security_mode->ciphering_algorithm)) == NULL) {
+ ogs_error("OpenAPI_eps_nas_security_mode_convertToJSON() failed [ciphering_algorithm]");
+ goto end;
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_eps_nas_security_mode_t *OpenAPI_eps_nas_security_mode_parseFromJSON(cJSON *eps_nas_security_modeJSON)
+{
+ OpenAPI_eps_nas_security_mode_t *eps_nas_security_mode_local_var = NULL;
+ cJSON *integrity_algorithm = cJSON_GetObjectItemCaseSensitive(eps_nas_security_modeJSON, "integrityAlgorithm");
+ if (!integrity_algorithm) {
+ ogs_error("OpenAPI_eps_nas_security_mode_parseFromJSON() failed [integrity_algorithm]");
+ goto end;
+ }
+
+ OpenAPI_eps_nas_integrity_algorithm_e integrity_algorithmVariable;
+
+ if (!cJSON_IsString(integrity_algorithm)) {
+ ogs_error("OpenAPI_eps_nas_security_mode_parseFromJSON() failed [integrity_algorithm]");
+ goto end;
+ }
+ integrity_algorithmVariable = OpenAPI_eps_nas_integrity_algorithm_FromString(integrity_algorithm->valuestring);
+
+ cJSON *ciphering_algorithm = cJSON_GetObjectItemCaseSensitive(eps_nas_security_modeJSON, "cipheringAlgorithm");
+ if (!ciphering_algorithm) {
+ ogs_error("OpenAPI_eps_nas_security_mode_parseFromJSON() failed [ciphering_algorithm]");
+ goto end;
+ }
+
+ OpenAPI_eps_nas_ciphering_algorithm_e ciphering_algorithmVariable;
+
+ if (!cJSON_IsString(ciphering_algorithm)) {
+ ogs_error("OpenAPI_eps_nas_security_mode_parseFromJSON() failed [ciphering_algorithm]");
+ goto end;
+ }
+ ciphering_algorithmVariable = OpenAPI_eps_nas_ciphering_algorithm_FromString(ciphering_algorithm->valuestring);
+
+ eps_nas_security_mode_local_var = OpenAPI_eps_nas_security_mode_create (
+ integrity_algorithmVariable,
+ ciphering_algorithmVariable
+ );
+
+ return eps_nas_security_mode_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_eps_nas_security_mode_t *OpenAPI_eps_nas_security_mode_copy(OpenAPI_eps_nas_security_mode_t *dst, OpenAPI_eps_nas_security_mode_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_eps_nas_security_mode_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_eps_nas_security_mode_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_eps_nas_security_mode_free(dst);
+ dst = OpenAPI_eps_nas_security_mode_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/eps_nas_security_mode.h b/lib/sbi/openapi/model/eps_nas_security_mode.h
new file mode 100644
index 000000000..815435165
--- /dev/null
+++ b/lib/sbi/openapi/model/eps_nas_security_mode.h
@@ -0,0 +1,42 @@
+/*
+ * eps_nas_security_mode.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_eps_nas_security_mode_H_
+#define _OpenAPI_eps_nas_security_mode_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+#include "eps_nas_ciphering_algorithm.h"
+#include "eps_nas_integrity_algorithm.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_eps_nas_security_mode_s OpenAPI_eps_nas_security_mode_t;
+typedef struct OpenAPI_eps_nas_security_mode_s {
+ OpenAPI_eps_nas_integrity_algorithm_e integrity_algorithm;
+ OpenAPI_eps_nas_ciphering_algorithm_e ciphering_algorithm;
+} OpenAPI_eps_nas_security_mode_t;
+
+OpenAPI_eps_nas_security_mode_t *OpenAPI_eps_nas_security_mode_create(
+ OpenAPI_eps_nas_integrity_algorithm_e integrity_algorithm,
+ OpenAPI_eps_nas_ciphering_algorithm_e ciphering_algorithm
+);
+void OpenAPI_eps_nas_security_mode_free(OpenAPI_eps_nas_security_mode_t *eps_nas_security_mode);
+OpenAPI_eps_nas_security_mode_t *OpenAPI_eps_nas_security_mode_parseFromJSON(cJSON *eps_nas_security_modeJSON);
+cJSON *OpenAPI_eps_nas_security_mode_convertToJSON(OpenAPI_eps_nas_security_mode_t *eps_nas_security_mode);
+OpenAPI_eps_nas_security_mode_t *OpenAPI_eps_nas_security_mode_copy(OpenAPI_eps_nas_security_mode_t *dst, OpenAPI_eps_nas_security_mode_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_eps_nas_security_mode_H_ */
+
diff --git a/lib/sbi/openapi/model/eps_pdn_cnx_info.c b/lib/sbi/openapi/model/eps_pdn_cnx_info.c
index c1d7b521f..50c768002 100644
--- a/lib/sbi/openapi/model/eps_pdn_cnx_info.c
+++ b/lib/sbi/openapi/model/eps_pdn_cnx_info.c
@@ -8,7 +8,7 @@ OpenAPI_eps_pdn_cnx_info_t *OpenAPI_eps_pdn_cnx_info_create(
char pgw_s8c_fteid,
char pgw_node_name,
int linked_bearer_id
- )
+)
{
OpenAPI_eps_pdn_cnx_info_t *eps_pdn_cnx_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_eps_pdn_cnx_info_t));
if (!eps_pdn_cnx_info_local_var) {
@@ -46,17 +46,17 @@ cJSON *OpenAPI_eps_pdn_cnx_info_convertToJSON(OpenAPI_eps_pdn_cnx_info_t *eps_pd
}
if (eps_pdn_cnx_info->pgw_node_name) {
- if (cJSON_AddNumberToObject(item, "pgwNodeName", eps_pdn_cnx_info->pgw_node_name) == NULL) {
- ogs_error("OpenAPI_eps_pdn_cnx_info_convertToJSON() failed [pgw_node_name]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "pgwNodeName", eps_pdn_cnx_info->pgw_node_name) == NULL) {
+ ogs_error("OpenAPI_eps_pdn_cnx_info_convertToJSON() failed [pgw_node_name]");
+ goto end;
+ }
}
if (eps_pdn_cnx_info->linked_bearer_id) {
- if (cJSON_AddNumberToObject(item, "linkedBearerId", eps_pdn_cnx_info->linked_bearer_id) == NULL) {
- ogs_error("OpenAPI_eps_pdn_cnx_info_convertToJSON() failed [linked_bearer_id]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "linkedBearerId", eps_pdn_cnx_info->linked_bearer_id) == NULL) {
+ ogs_error("OpenAPI_eps_pdn_cnx_info_convertToJSON() failed [linked_bearer_id]");
+ goto end;
+ }
}
end:
@@ -72,7 +72,7 @@ OpenAPI_eps_pdn_cnx_info_t *OpenAPI_eps_pdn_cnx_info_parseFromJSON(cJSON *eps_pd
goto end;
}
-
+
if (!cJSON_IsNumber(pgw_s8c_fteid)) {
ogs_error("OpenAPI_eps_pdn_cnx_info_parseFromJSON() failed [pgw_s8c_fteid]");
goto end;
@@ -80,27 +80,27 @@ OpenAPI_eps_pdn_cnx_info_t *OpenAPI_eps_pdn_cnx_info_parseFromJSON(cJSON *eps_pd
cJSON *pgw_node_name = cJSON_GetObjectItemCaseSensitive(eps_pdn_cnx_infoJSON, "pgwNodeName");
- if (pgw_node_name) {
- if (!cJSON_IsNumber(pgw_node_name)) {
- ogs_error("OpenAPI_eps_pdn_cnx_info_parseFromJSON() failed [pgw_node_name]");
- goto end;
- }
+ if (pgw_node_name) {
+ if (!cJSON_IsNumber(pgw_node_name)) {
+ ogs_error("OpenAPI_eps_pdn_cnx_info_parseFromJSON() failed [pgw_node_name]");
+ goto end;
+ }
}
cJSON *linked_bearer_id = cJSON_GetObjectItemCaseSensitive(eps_pdn_cnx_infoJSON, "linkedBearerId");
- if (linked_bearer_id) {
- if (!cJSON_IsNumber(linked_bearer_id)) {
- ogs_error("OpenAPI_eps_pdn_cnx_info_parseFromJSON() failed [linked_bearer_id]");
- goto end;
- }
+ if (linked_bearer_id) {
+ if (!cJSON_IsNumber(linked_bearer_id)) {
+ ogs_error("OpenAPI_eps_pdn_cnx_info_parseFromJSON() failed [linked_bearer_id]");
+ goto end;
+ }
}
eps_pdn_cnx_info_local_var = OpenAPI_eps_pdn_cnx_info_create (
pgw_s8c_fteid->valueint,
pgw_node_name ? pgw_node_name->valueint : 0,
linked_bearer_id ? linked_bearer_id->valuedouble : 0
- );
+ );
return eps_pdn_cnx_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/eps_pdn_cnx_info.h b/lib/sbi/openapi/model/eps_pdn_cnx_info.h
index bb44509f6..5d06ba1d0 100644
--- a/lib/sbi/openapi/model/eps_pdn_cnx_info.h
+++ b/lib/sbi/openapi/model/eps_pdn_cnx_info.h
@@ -1,7 +1,7 @@
/*
* eps_pdn_cnx_info.h
*
- *
+ *
*/
#ifndef _OpenAPI_eps_pdn_cnx_info_H_
@@ -28,7 +28,7 @@ OpenAPI_eps_pdn_cnx_info_t *OpenAPI_eps_pdn_cnx_info_create(
char pgw_s8c_fteid,
char pgw_node_name,
int linked_bearer_id
- );
+);
void OpenAPI_eps_pdn_cnx_info_free(OpenAPI_eps_pdn_cnx_info_t *eps_pdn_cnx_info);
OpenAPI_eps_pdn_cnx_info_t *OpenAPI_eps_pdn_cnx_info_parseFromJSON(cJSON *eps_pdn_cnx_infoJSON);
cJSON *OpenAPI_eps_pdn_cnx_info_convertToJSON(OpenAPI_eps_pdn_cnx_info_t *eps_pdn_cnx_info);
diff --git a/lib/sbi/openapi/model/error_report.c b/lib/sbi/openapi/model/error_report.c
index 161895a1c..3ddf80a24 100644
--- a/lib/sbi/openapi/model/error_report.c
+++ b/lib/sbi/openapi/model/error_report.c
@@ -7,8 +7,10 @@
OpenAPI_error_report_t *OpenAPI_error_report_create(
OpenAPI_problem_details_t *error,
OpenAPI_list_t *rule_reports,
- OpenAPI_list_t *sess_rule_reports
- )
+ OpenAPI_list_t *sess_rule_reports,
+ OpenAPI_list_t *pol_dec_failure_reports,
+ char *alt_qos_param_id
+)
{
OpenAPI_error_report_t *error_report_local_var = OpenAPI_malloc(sizeof(OpenAPI_error_report_t));
if (!error_report_local_var) {
@@ -17,6 +19,8 @@ OpenAPI_error_report_t *OpenAPI_error_report_create(
error_report_local_var->error = error;
error_report_local_var->rule_reports = rule_reports;
error_report_local_var->sess_rule_reports = sess_rule_reports;
+ error_report_local_var->pol_dec_failure_reports = pol_dec_failure_reports;
+ error_report_local_var->alt_qos_param_id = alt_qos_param_id;
return error_report_local_var;
}
@@ -36,6 +40,8 @@ void OpenAPI_error_report_free(OpenAPI_error_report_t *error_report)
OpenAPI_session_rule_report_free(node->data);
}
OpenAPI_list_free(error_report->sess_rule_reports);
+ OpenAPI_list_free(error_report->pol_dec_failure_reports);
+ ogs_free(error_report->alt_qos_param_id);
ogs_free(error_report);
}
@@ -50,56 +56,78 @@ cJSON *OpenAPI_error_report_convertToJSON(OpenAPI_error_report_t *error_report)
item = cJSON_CreateObject();
if (error_report->error) {
- cJSON *error_local_JSON = OpenAPI_problem_details_convertToJSON(error_report->error);
- if (error_local_JSON == NULL) {
- ogs_error("OpenAPI_error_report_convertToJSON() failed [error]");
- goto end;
- }
- cJSON_AddItemToObject(item, "error", error_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_error_report_convertToJSON() failed [error]");
- goto end;
- }
+ cJSON *error_local_JSON = OpenAPI_problem_details_convertToJSON(error_report->error);
+ if (error_local_JSON == NULL) {
+ ogs_error("OpenAPI_error_report_convertToJSON() failed [error]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "error", error_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_error_report_convertToJSON() failed [error]");
+ goto end;
+ }
}
if (error_report->rule_reports) {
- cJSON *rule_reportsList = cJSON_AddArrayToObject(item, "ruleReports");
- if (rule_reportsList == NULL) {
- ogs_error("OpenAPI_error_report_convertToJSON() failed [rule_reports]");
- goto end;
- }
+ cJSON *rule_reportsList = cJSON_AddArrayToObject(item, "ruleReports");
+ if (rule_reportsList == NULL) {
+ ogs_error("OpenAPI_error_report_convertToJSON() failed [rule_reports]");
+ goto end;
+ }
- OpenAPI_lnode_t *rule_reports_node;
- if (error_report->rule_reports) {
- OpenAPI_list_for_each(error_report->rule_reports, rule_reports_node) {
- cJSON *itemLocal = OpenAPI_rule_report_convertToJSON(rule_reports_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_error_report_convertToJSON() failed [rule_reports]");
- goto end;
- }
- cJSON_AddItemToArray(rule_reportsList, itemLocal);
+ OpenAPI_lnode_t *rule_reports_node;
+ if (error_report->rule_reports) {
+ OpenAPI_list_for_each(error_report->rule_reports, rule_reports_node) {
+ cJSON *itemLocal = OpenAPI_rule_report_convertToJSON(rule_reports_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_error_report_convertToJSON() failed [rule_reports]");
+ goto end;
}
+ cJSON_AddItemToArray(rule_reportsList, itemLocal);
}
}
+ }
if (error_report->sess_rule_reports) {
- cJSON *sess_rule_reportsList = cJSON_AddArrayToObject(item, "sessRuleReports");
- if (sess_rule_reportsList == NULL) {
- ogs_error("OpenAPI_error_report_convertToJSON() failed [sess_rule_reports]");
+ cJSON *sess_rule_reportsList = cJSON_AddArrayToObject(item, "sessRuleReports");
+ if (sess_rule_reportsList == NULL) {
+ ogs_error("OpenAPI_error_report_convertToJSON() failed [sess_rule_reports]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *sess_rule_reports_node;
+ if (error_report->sess_rule_reports) {
+ OpenAPI_list_for_each(error_report->sess_rule_reports, sess_rule_reports_node) {
+ cJSON *itemLocal = OpenAPI_session_rule_report_convertToJSON(sess_rule_reports_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_error_report_convertToJSON() failed [sess_rule_reports]");
+ goto end;
+ }
+ cJSON_AddItemToArray(sess_rule_reportsList, itemLocal);
+ }
+ }
+ }
+
+ if (error_report->pol_dec_failure_reports) {
+ cJSON *pol_dec_failure_reports = cJSON_AddArrayToObject(item, "polDecFailureReports");
+ if (pol_dec_failure_reports == NULL) {
+ ogs_error("OpenAPI_error_report_convertToJSON() failed [pol_dec_failure_reports]");
+ goto end;
+ }
+ OpenAPI_lnode_t *pol_dec_failure_reports_node;
+ OpenAPI_list_for_each(error_report->pol_dec_failure_reports, pol_dec_failure_reports_node) {
+ if (cJSON_AddStringToObject(pol_dec_failure_reports, "", OpenAPI_policy_decision_failure_code_ToString((intptr_t)pol_dec_failure_reports_node->data)) == NULL) {
+ ogs_error("OpenAPI_error_report_convertToJSON() failed [pol_dec_failure_reports]");
goto end;
}
+ }
+ }
- OpenAPI_lnode_t *sess_rule_reports_node;
- if (error_report->sess_rule_reports) {
- OpenAPI_list_for_each(error_report->sess_rule_reports, sess_rule_reports_node) {
- cJSON *itemLocal = OpenAPI_session_rule_report_convertToJSON(sess_rule_reports_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_error_report_convertToJSON() failed [sess_rule_reports]");
- goto end;
- }
- cJSON_AddItemToArray(sess_rule_reportsList, itemLocal);
- }
- }
+ if (error_report->alt_qos_param_id) {
+ if (cJSON_AddStringToObject(item, "altQosParamId", error_report->alt_qos_param_id) == NULL) {
+ ogs_error("OpenAPI_error_report_convertToJSON() failed [alt_qos_param_id]");
+ goto end;
+ }
}
end:
@@ -112,61 +140,94 @@ OpenAPI_error_report_t *OpenAPI_error_report_parseFromJSON(cJSON *error_reportJS
cJSON *error = cJSON_GetObjectItemCaseSensitive(error_reportJSON, "error");
OpenAPI_problem_details_t *error_local_nonprim = NULL;
- if (error) {
- error_local_nonprim = OpenAPI_problem_details_parseFromJSON(error);
+ if (error) {
+ error_local_nonprim = OpenAPI_problem_details_parseFromJSON(error);
}
cJSON *rule_reports = cJSON_GetObjectItemCaseSensitive(error_reportJSON, "ruleReports");
OpenAPI_list_t *rule_reportsList;
- if (rule_reports) {
- cJSON *rule_reports_local_nonprimitive;
- if (!cJSON_IsArray(rule_reports)) {
+ if (rule_reports) {
+ cJSON *rule_reports_local_nonprimitive;
+ if (!cJSON_IsArray(rule_reports)){
+ ogs_error("OpenAPI_error_report_parseFromJSON() failed [rule_reports]");
+ goto end;
+ }
+
+ rule_reportsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(rule_reports_local_nonprimitive, rule_reports ) {
+ if (!cJSON_IsObject(rule_reports_local_nonprimitive)) {
ogs_error("OpenAPI_error_report_parseFromJSON() failed [rule_reports]");
goto end;
}
+ OpenAPI_rule_report_t *rule_reportsItem = OpenAPI_rule_report_parseFromJSON(rule_reports_local_nonprimitive);
- rule_reportsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(rule_reports_local_nonprimitive, rule_reports ) {
- if (!cJSON_IsObject(rule_reports_local_nonprimitive)) {
- ogs_error("OpenAPI_error_report_parseFromJSON() failed [rule_reports]");
- goto end;
- }
- OpenAPI_rule_report_t *rule_reportsItem = OpenAPI_rule_report_parseFromJSON(rule_reports_local_nonprimitive);
-
- OpenAPI_list_add(rule_reportsList, rule_reportsItem);
- }
+ OpenAPI_list_add(rule_reportsList, rule_reportsItem);
+ }
}
cJSON *sess_rule_reports = cJSON_GetObjectItemCaseSensitive(error_reportJSON, "sessRuleReports");
OpenAPI_list_t *sess_rule_reportsList;
- if (sess_rule_reports) {
- cJSON *sess_rule_reports_local_nonprimitive;
- if (!cJSON_IsArray(sess_rule_reports)) {
+ if (sess_rule_reports) {
+ cJSON *sess_rule_reports_local_nonprimitive;
+ if (!cJSON_IsArray(sess_rule_reports)){
+ ogs_error("OpenAPI_error_report_parseFromJSON() failed [sess_rule_reports]");
+ goto end;
+ }
+
+ sess_rule_reportsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(sess_rule_reports_local_nonprimitive, sess_rule_reports ) {
+ if (!cJSON_IsObject(sess_rule_reports_local_nonprimitive)) {
ogs_error("OpenAPI_error_report_parseFromJSON() failed [sess_rule_reports]");
goto end;
}
+ OpenAPI_session_rule_report_t *sess_rule_reportsItem = OpenAPI_session_rule_report_parseFromJSON(sess_rule_reports_local_nonprimitive);
- sess_rule_reportsList = OpenAPI_list_create();
+ OpenAPI_list_add(sess_rule_reportsList, sess_rule_reportsItem);
+ }
+ }
- cJSON_ArrayForEach(sess_rule_reports_local_nonprimitive, sess_rule_reports ) {
- if (!cJSON_IsObject(sess_rule_reports_local_nonprimitive)) {
- ogs_error("OpenAPI_error_report_parseFromJSON() failed [sess_rule_reports]");
- goto end;
- }
- OpenAPI_session_rule_report_t *sess_rule_reportsItem = OpenAPI_session_rule_report_parseFromJSON(sess_rule_reports_local_nonprimitive);
+ cJSON *pol_dec_failure_reports = cJSON_GetObjectItemCaseSensitive(error_reportJSON, "polDecFailureReports");
- OpenAPI_list_add(sess_rule_reportsList, sess_rule_reportsItem);
+ OpenAPI_list_t *pol_dec_failure_reportsList;
+ if (pol_dec_failure_reports) {
+ cJSON *pol_dec_failure_reports_local_nonprimitive;
+ if (!cJSON_IsArray(pol_dec_failure_reports)) {
+ ogs_error("OpenAPI_error_report_parseFromJSON() failed [pol_dec_failure_reports]");
+ goto end;
+ }
+
+ pol_dec_failure_reportsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(pol_dec_failure_reports_local_nonprimitive, pol_dec_failure_reports ) {
+ if (!cJSON_IsString(pol_dec_failure_reports_local_nonprimitive)){
+ ogs_error("OpenAPI_error_report_parseFromJSON() failed [pol_dec_failure_reports]");
+ goto end;
}
+
+ OpenAPI_list_add(pol_dec_failure_reportsList, (void *)OpenAPI_policy_decision_failure_code_FromString(pol_dec_failure_reports_local_nonprimitive->valuestring));
+ }
+ }
+
+ cJSON *alt_qos_param_id = cJSON_GetObjectItemCaseSensitive(error_reportJSON, "altQosParamId");
+
+ if (alt_qos_param_id) {
+ if (!cJSON_IsString(alt_qos_param_id)) {
+ ogs_error("OpenAPI_error_report_parseFromJSON() failed [alt_qos_param_id]");
+ goto end;
+ }
}
error_report_local_var = OpenAPI_error_report_create (
error ? error_local_nonprim : NULL,
rule_reports ? rule_reportsList : NULL,
- sess_rule_reports ? sess_rule_reportsList : NULL
- );
+ sess_rule_reports ? sess_rule_reportsList : NULL,
+ pol_dec_failure_reports ? pol_dec_failure_reportsList : NULL,
+ alt_qos_param_id ? ogs_strdup_or_assert(alt_qos_param_id->valuestring) : NULL
+ );
return error_report_local_var;
end:
diff --git a/lib/sbi/openapi/model/error_report.h b/lib/sbi/openapi/model/error_report.h
index 0fd986fb0..e64f9835a 100644
--- a/lib/sbi/openapi/model/error_report.h
+++ b/lib/sbi/openapi/model/error_report.h
@@ -1,7 +1,7 @@
/*
* error_report.h
*
- *
+ *
*/
#ifndef _OpenAPI_error_report_H_
@@ -12,6 +12,7 @@
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
+#include "policy_decision_failure_code.h"
#include "problem_details.h"
#include "rule_report.h"
#include "session_rule_report.h"
@@ -25,13 +26,17 @@ typedef struct OpenAPI_error_report_s {
struct OpenAPI_problem_details_s *error;
OpenAPI_list_t *rule_reports;
OpenAPI_list_t *sess_rule_reports;
+ OpenAPI_list_t *pol_dec_failure_reports;
+ char *alt_qos_param_id;
} OpenAPI_error_report_t;
OpenAPI_error_report_t *OpenAPI_error_report_create(
OpenAPI_problem_details_t *error,
OpenAPI_list_t *rule_reports,
- OpenAPI_list_t *sess_rule_reports
- );
+ OpenAPI_list_t *sess_rule_reports,
+ OpenAPI_list_t *pol_dec_failure_reports,
+ char *alt_qos_param_id
+);
void OpenAPI_error_report_free(OpenAPI_error_report_t *error_report);
OpenAPI_error_report_t *OpenAPI_error_report_parseFromJSON(cJSON *error_reportJSON);
cJSON *OpenAPI_error_report_convertToJSON(OpenAPI_error_report_t *error_report);
diff --git a/lib/sbi/openapi/model/eth_flow_description.c b/lib/sbi/openapi/model/eth_flow_description.c
index b50294dc9..cfb40466e 100644
--- a/lib/sbi/openapi/model/eth_flow_description.c
+++ b/lib/sbi/openapi/model/eth_flow_description.c
@@ -13,7 +13,7 @@ OpenAPI_eth_flow_description_t *OpenAPI_eth_flow_description_create(
OpenAPI_list_t *vlan_tags,
char *src_mac_addr_end,
char *dest_mac_addr_end
- )
+)
{
OpenAPI_eth_flow_description_t *eth_flow_description_local_var = OpenAPI_malloc(sizeof(OpenAPI_eth_flow_description_t));
if (!eth_flow_description_local_var) {
@@ -61,10 +61,10 @@ cJSON *OpenAPI_eth_flow_description_convertToJSON(OpenAPI_eth_flow_description_t
item = cJSON_CreateObject();
if (eth_flow_description->dest_mac_addr) {
- if (cJSON_AddStringToObject(item, "destMacAddr", eth_flow_description->dest_mac_addr) == NULL) {
- ogs_error("OpenAPI_eth_flow_description_convertToJSON() failed [dest_mac_addr]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "destMacAddr", eth_flow_description->dest_mac_addr) == NULL) {
+ ogs_error("OpenAPI_eth_flow_description_convertToJSON() failed [dest_mac_addr]");
+ goto end;
+ }
}
if (cJSON_AddStringToObject(item, "ethType", eth_flow_description->eth_type) == NULL) {
@@ -73,54 +73,54 @@ cJSON *OpenAPI_eth_flow_description_convertToJSON(OpenAPI_eth_flow_description_t
}
if (eth_flow_description->f_desc) {
- if (cJSON_AddStringToObject(item, "fDesc", eth_flow_description->f_desc) == NULL) {
- ogs_error("OpenAPI_eth_flow_description_convertToJSON() failed [f_desc]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "fDesc", eth_flow_description->f_desc) == NULL) {
+ ogs_error("OpenAPI_eth_flow_description_convertToJSON() failed [f_desc]");
+ goto end;
+ }
}
if (eth_flow_description->f_dir) {
- if (cJSON_AddStringToObject(item, "fDir", OpenAPI_flow_direction_ToString(eth_flow_description->f_dir)) == NULL) {
- ogs_error("OpenAPI_eth_flow_description_convertToJSON() failed [f_dir]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "fDir", OpenAPI_flow_direction_ToString(eth_flow_description->f_dir)) == NULL) {
+ ogs_error("OpenAPI_eth_flow_description_convertToJSON() failed [f_dir]");
+ goto end;
+ }
}
if (eth_flow_description->source_mac_addr) {
- if (cJSON_AddStringToObject(item, "sourceMacAddr", eth_flow_description->source_mac_addr) == NULL) {
- ogs_error("OpenAPI_eth_flow_description_convertToJSON() failed [source_mac_addr]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "sourceMacAddr", eth_flow_description->source_mac_addr) == NULL) {
+ ogs_error("OpenAPI_eth_flow_description_convertToJSON() failed [source_mac_addr]");
+ goto end;
+ }
}
if (eth_flow_description->vlan_tags) {
- cJSON *vlan_tags = cJSON_AddArrayToObject(item, "vlanTags");
- if (vlan_tags == NULL) {
- ogs_error("OpenAPI_eth_flow_description_convertToJSON() failed [vlan_tags]");
- goto end;
- }
+ cJSON *vlan_tags = cJSON_AddArrayToObject(item, "vlanTags");
+ if (vlan_tags == NULL) {
+ ogs_error("OpenAPI_eth_flow_description_convertToJSON() failed [vlan_tags]");
+ goto end;
+ }
- OpenAPI_lnode_t *vlan_tags_node;
- OpenAPI_list_for_each(eth_flow_description->vlan_tags, vlan_tags_node) {
- if (cJSON_AddStringToObject(vlan_tags, "", (char*)vlan_tags_node->data) == NULL) {
- ogs_error("OpenAPI_eth_flow_description_convertToJSON() failed [vlan_tags]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *vlan_tags_node;
+ OpenAPI_list_for_each(eth_flow_description->vlan_tags, vlan_tags_node) {
+ if (cJSON_AddStringToObject(vlan_tags, "", (char*)vlan_tags_node->data) == NULL) {
+ ogs_error("OpenAPI_eth_flow_description_convertToJSON() failed [vlan_tags]");
+ goto end;
+ }
+ }
}
if (eth_flow_description->src_mac_addr_end) {
- if (cJSON_AddStringToObject(item, "srcMacAddrEnd", eth_flow_description->src_mac_addr_end) == NULL) {
- ogs_error("OpenAPI_eth_flow_description_convertToJSON() failed [src_mac_addr_end]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "srcMacAddrEnd", eth_flow_description->src_mac_addr_end) == NULL) {
+ ogs_error("OpenAPI_eth_flow_description_convertToJSON() failed [src_mac_addr_end]");
+ goto end;
+ }
}
if (eth_flow_description->dest_mac_addr_end) {
- if (cJSON_AddStringToObject(item, "destMacAddrEnd", eth_flow_description->dest_mac_addr_end) == NULL) {
- ogs_error("OpenAPI_eth_flow_description_convertToJSON() failed [dest_mac_addr_end]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "destMacAddrEnd", eth_flow_description->dest_mac_addr_end) == NULL) {
+ ogs_error("OpenAPI_eth_flow_description_convertToJSON() failed [dest_mac_addr_end]");
+ goto end;
+ }
}
end:
@@ -132,11 +132,11 @@ OpenAPI_eth_flow_description_t *OpenAPI_eth_flow_description_parseFromJSON(cJSON
OpenAPI_eth_flow_description_t *eth_flow_description_local_var = NULL;
cJSON *dest_mac_addr = cJSON_GetObjectItemCaseSensitive(eth_flow_descriptionJSON, "destMacAddr");
- if (dest_mac_addr) {
- if (!cJSON_IsString(dest_mac_addr)) {
- ogs_error("OpenAPI_eth_flow_description_parseFromJSON() failed [dest_mac_addr]");
- goto end;
- }
+ if (dest_mac_addr) {
+ if (!cJSON_IsString(dest_mac_addr)) {
+ ogs_error("OpenAPI_eth_flow_description_parseFromJSON() failed [dest_mac_addr]");
+ goto end;
+ }
}
cJSON *eth_type = cJSON_GetObjectItemCaseSensitive(eth_flow_descriptionJSON, "ethType");
@@ -145,7 +145,7 @@ OpenAPI_eth_flow_description_t *OpenAPI_eth_flow_description_parseFromJSON(cJSON
goto end;
}
-
+
if (!cJSON_IsString(eth_type)) {
ogs_error("OpenAPI_eth_flow_description_parseFromJSON() failed [eth_type]");
goto end;
@@ -153,69 +153,69 @@ OpenAPI_eth_flow_description_t *OpenAPI_eth_flow_description_parseFromJSON(cJSON
cJSON *f_desc = cJSON_GetObjectItemCaseSensitive(eth_flow_descriptionJSON, "fDesc");
- if (f_desc) {
- if (!cJSON_IsString(f_desc)) {
- ogs_error("OpenAPI_eth_flow_description_parseFromJSON() failed [f_desc]");
- goto end;
- }
+ if (f_desc) {
+ if (!cJSON_IsString(f_desc)) {
+ ogs_error("OpenAPI_eth_flow_description_parseFromJSON() failed [f_desc]");
+ goto end;
+ }
}
cJSON *f_dir = cJSON_GetObjectItemCaseSensitive(eth_flow_descriptionJSON, "fDir");
OpenAPI_flow_direction_e f_dirVariable;
- if (f_dir) {
- if (!cJSON_IsString(f_dir)) {
- ogs_error("OpenAPI_eth_flow_description_parseFromJSON() failed [f_dir]");
- goto end;
- }
- f_dirVariable = OpenAPI_flow_direction_FromString(f_dir->valuestring);
+ if (f_dir) {
+ if (!cJSON_IsString(f_dir)) {
+ ogs_error("OpenAPI_eth_flow_description_parseFromJSON() failed [f_dir]");
+ goto end;
+ }
+ f_dirVariable = OpenAPI_flow_direction_FromString(f_dir->valuestring);
}
cJSON *source_mac_addr = cJSON_GetObjectItemCaseSensitive(eth_flow_descriptionJSON, "sourceMacAddr");
- if (source_mac_addr) {
- if (!cJSON_IsString(source_mac_addr)) {
- ogs_error("OpenAPI_eth_flow_description_parseFromJSON() failed [source_mac_addr]");
- goto end;
- }
+ if (source_mac_addr) {
+ if (!cJSON_IsString(source_mac_addr)) {
+ ogs_error("OpenAPI_eth_flow_description_parseFromJSON() failed [source_mac_addr]");
+ goto end;
+ }
}
cJSON *vlan_tags = cJSON_GetObjectItemCaseSensitive(eth_flow_descriptionJSON, "vlanTags");
OpenAPI_list_t *vlan_tagsList;
- if (vlan_tags) {
- cJSON *vlan_tags_local;
- if (!cJSON_IsArray(vlan_tags)) {
- ogs_error("OpenAPI_eth_flow_description_parseFromJSON() failed [vlan_tags]");
- goto end;
- }
- vlan_tagsList = OpenAPI_list_create();
+ if (vlan_tags) {
+ cJSON *vlan_tags_local;
+ if (!cJSON_IsArray(vlan_tags)) {
+ ogs_error("OpenAPI_eth_flow_description_parseFromJSON() failed [vlan_tags]");
+ goto end;
+ }
+ vlan_tagsList = OpenAPI_list_create();
- cJSON_ArrayForEach(vlan_tags_local, vlan_tags) {
- if (!cJSON_IsString(vlan_tags_local)) {
- ogs_error("OpenAPI_eth_flow_description_parseFromJSON() failed [vlan_tags]");
- goto end;
- }
- OpenAPI_list_add(vlan_tagsList, ogs_strdup_or_assert(vlan_tags_local->valuestring));
- }
+ cJSON_ArrayForEach(vlan_tags_local, vlan_tags) {
+ if (!cJSON_IsString(vlan_tags_local)) {
+ ogs_error("OpenAPI_eth_flow_description_parseFromJSON() failed [vlan_tags]");
+ goto end;
+ }
+ OpenAPI_list_add(vlan_tagsList , ogs_strdup_or_assert(vlan_tags_local->valuestring));
+ }
}
cJSON *src_mac_addr_end = cJSON_GetObjectItemCaseSensitive(eth_flow_descriptionJSON, "srcMacAddrEnd");
- if (src_mac_addr_end) {
- if (!cJSON_IsString(src_mac_addr_end)) {
- ogs_error("OpenAPI_eth_flow_description_parseFromJSON() failed [src_mac_addr_end]");
- goto end;
- }
+ if (src_mac_addr_end) {
+ if (!cJSON_IsString(src_mac_addr_end)) {
+ ogs_error("OpenAPI_eth_flow_description_parseFromJSON() failed [src_mac_addr_end]");
+ goto end;
+ }
}
cJSON *dest_mac_addr_end = cJSON_GetObjectItemCaseSensitive(eth_flow_descriptionJSON, "destMacAddrEnd");
- if (dest_mac_addr_end) {
- if (!cJSON_IsString(dest_mac_addr_end)) {
- ogs_error("OpenAPI_eth_flow_description_parseFromJSON() failed [dest_mac_addr_end]");
- goto end;
- }
+ if (dest_mac_addr_end) {
+ if (!cJSON_IsString(dest_mac_addr_end)) {
+ ogs_error("OpenAPI_eth_flow_description_parseFromJSON() failed [dest_mac_addr_end]");
+ goto end;
+ }
}
eth_flow_description_local_var = OpenAPI_eth_flow_description_create (
@@ -227,7 +227,7 @@ OpenAPI_eth_flow_description_t *OpenAPI_eth_flow_description_parseFromJSON(cJSON
vlan_tags ? vlan_tagsList : NULL,
src_mac_addr_end ? ogs_strdup_or_assert(src_mac_addr_end->valuestring) : NULL,
dest_mac_addr_end ? ogs_strdup_or_assert(dest_mac_addr_end->valuestring) : NULL
- );
+ );
return eth_flow_description_local_var;
end:
diff --git a/lib/sbi/openapi/model/eth_flow_description.h b/lib/sbi/openapi/model/eth_flow_description.h
index aec086ee3..d9dfeca69 100644
--- a/lib/sbi/openapi/model/eth_flow_description.h
+++ b/lib/sbi/openapi/model/eth_flow_description.h
@@ -39,7 +39,7 @@ OpenAPI_eth_flow_description_t *OpenAPI_eth_flow_description_create(
OpenAPI_list_t *vlan_tags,
char *src_mac_addr_end,
char *dest_mac_addr_end
- );
+);
void OpenAPI_eth_flow_description_free(OpenAPI_eth_flow_description_t *eth_flow_description);
OpenAPI_eth_flow_description_t *OpenAPI_eth_flow_description_parseFromJSON(cJSON *eth_flow_descriptionJSON);
cJSON *OpenAPI_eth_flow_description_convertToJSON(OpenAPI_eth_flow_description_t *eth_flow_description);
diff --git a/lib/sbi/openapi/model/eutra_location.c b/lib/sbi/openapi/model/eutra_location.c
index 53cd360e3..c2e79bcae 100644
--- a/lib/sbi/openapi/model/eutra_location.c
+++ b/lib/sbi/openapi/model/eutra_location.c
@@ -6,6 +6,7 @@
OpenAPI_eutra_location_t *OpenAPI_eutra_location_create(
OpenAPI_tai_t *tai,
+ int ignore_tai,
OpenAPI_ecgi_t *ecgi,
int ignore_ecgi,
int age_of_location_information,
@@ -13,14 +14,15 @@ OpenAPI_eutra_location_t *OpenAPI_eutra_location_create(
char *geographical_information,
char *geodetic_information,
OpenAPI_global_ran_node_id_t *global_ngenb_id,
- OpenAPI_global_ran_node_id_t *global_e_nb_id
- )
+ OpenAPI_global_ran_node_id_t *global_enb_id
+)
{
OpenAPI_eutra_location_t *eutra_location_local_var = OpenAPI_malloc(sizeof(OpenAPI_eutra_location_t));
if (!eutra_location_local_var) {
return NULL;
}
eutra_location_local_var->tai = tai;
+ eutra_location_local_var->ignore_tai = ignore_tai;
eutra_location_local_var->ecgi = ecgi;
eutra_location_local_var->ignore_ecgi = ignore_ecgi;
eutra_location_local_var->age_of_location_information = age_of_location_information;
@@ -28,7 +30,7 @@ OpenAPI_eutra_location_t *OpenAPI_eutra_location_create(
eutra_location_local_var->geographical_information = geographical_information;
eutra_location_local_var->geodetic_information = geodetic_information;
eutra_location_local_var->global_ngenb_id = global_ngenb_id;
- eutra_location_local_var->global_e_nb_id = global_e_nb_id;
+ eutra_location_local_var->global_enb_id = global_enb_id;
return eutra_location_local_var;
}
@@ -45,7 +47,7 @@ void OpenAPI_eutra_location_free(OpenAPI_eutra_location_t *eutra_location)
ogs_free(eutra_location->geographical_information);
ogs_free(eutra_location->geodetic_information);
OpenAPI_global_ran_node_id_free(eutra_location->global_ngenb_id);
- OpenAPI_global_ran_node_id_free(eutra_location->global_e_nb_id);
+ OpenAPI_global_ran_node_id_free(eutra_location->global_enb_id);
ogs_free(eutra_location);
}
@@ -70,6 +72,13 @@ cJSON *OpenAPI_eutra_location_convertToJSON(OpenAPI_eutra_location_t *eutra_loca
goto end;
}
+ if (eutra_location->ignore_tai) {
+ if (cJSON_AddBoolToObject(item, "ignoreTai", eutra_location->ignore_tai) == NULL) {
+ ogs_error("OpenAPI_eutra_location_convertToJSON() failed [ignore_tai]");
+ goto end;
+ }
+ }
+
cJSON *ecgi_local_JSON = OpenAPI_ecgi_convertToJSON(eutra_location->ecgi);
if (ecgi_local_JSON == NULL) {
ogs_error("OpenAPI_eutra_location_convertToJSON() failed [ecgi]");
@@ -82,64 +91,64 @@ cJSON *OpenAPI_eutra_location_convertToJSON(OpenAPI_eutra_location_t *eutra_loca
}
if (eutra_location->ignore_ecgi) {
- if (cJSON_AddBoolToObject(item, "ignoreEcgi", eutra_location->ignore_ecgi) == NULL) {
- ogs_error("OpenAPI_eutra_location_convertToJSON() failed [ignore_ecgi]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "ignoreEcgi", eutra_location->ignore_ecgi) == NULL) {
+ ogs_error("OpenAPI_eutra_location_convertToJSON() failed [ignore_ecgi]");
+ goto end;
+ }
}
if (eutra_location->age_of_location_information) {
- if (cJSON_AddNumberToObject(item, "ageOfLocationInformation", eutra_location->age_of_location_information) == NULL) {
- ogs_error("OpenAPI_eutra_location_convertToJSON() failed [age_of_location_information]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "ageOfLocationInformation", eutra_location->age_of_location_information) == NULL) {
+ ogs_error("OpenAPI_eutra_location_convertToJSON() failed [age_of_location_information]");
+ goto end;
+ }
}
if (eutra_location->ue_location_timestamp) {
- if (cJSON_AddStringToObject(item, "ueLocationTimestamp", eutra_location->ue_location_timestamp) == NULL) {
- ogs_error("OpenAPI_eutra_location_convertToJSON() failed [ue_location_timestamp]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "ueLocationTimestamp", eutra_location->ue_location_timestamp) == NULL) {
+ ogs_error("OpenAPI_eutra_location_convertToJSON() failed [ue_location_timestamp]");
+ goto end;
+ }
}
if (eutra_location->geographical_information) {
- if (cJSON_AddStringToObject(item, "geographicalInformation", eutra_location->geographical_information) == NULL) {
- ogs_error("OpenAPI_eutra_location_convertToJSON() failed [geographical_information]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "geographicalInformation", eutra_location->geographical_information) == NULL) {
+ ogs_error("OpenAPI_eutra_location_convertToJSON() failed [geographical_information]");
+ goto end;
+ }
}
if (eutra_location->geodetic_information) {
- if (cJSON_AddStringToObject(item, "geodeticInformation", eutra_location->geodetic_information) == NULL) {
- ogs_error("OpenAPI_eutra_location_convertToJSON() failed [geodetic_information]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "geodeticInformation", eutra_location->geodetic_information) == NULL) {
+ ogs_error("OpenAPI_eutra_location_convertToJSON() failed [geodetic_information]");
+ goto end;
+ }
}
if (eutra_location->global_ngenb_id) {
- cJSON *global_ngenb_id_local_JSON = OpenAPI_global_ran_node_id_convertToJSON(eutra_location->global_ngenb_id);
- if (global_ngenb_id_local_JSON == NULL) {
- ogs_error("OpenAPI_eutra_location_convertToJSON() failed [global_ngenb_id]");
- goto end;
- }
- cJSON_AddItemToObject(item, "globalNgenbId", global_ngenb_id_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_eutra_location_convertToJSON() failed [global_ngenb_id]");
- goto end;
- }
+ cJSON *global_ngenb_id_local_JSON = OpenAPI_global_ran_node_id_convertToJSON(eutra_location->global_ngenb_id);
+ if (global_ngenb_id_local_JSON == NULL) {
+ ogs_error("OpenAPI_eutra_location_convertToJSON() failed [global_ngenb_id]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "globalNgenbId", global_ngenb_id_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_eutra_location_convertToJSON() failed [global_ngenb_id]");
+ goto end;
+ }
}
- if (eutra_location->global_e_nb_id) {
- cJSON *global_e_nb_id_local_JSON = OpenAPI_global_ran_node_id_convertToJSON(eutra_location->global_e_nb_id);
- if (global_e_nb_id_local_JSON == NULL) {
- ogs_error("OpenAPI_eutra_location_convertToJSON() failed [global_e_nb_id]");
- goto end;
- }
- cJSON_AddItemToObject(item, "globalENbId", global_e_nb_id_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_eutra_location_convertToJSON() failed [global_e_nb_id]");
- goto end;
- }
+ if (eutra_location->global_enb_id) {
+ cJSON *global_enb_id_local_JSON = OpenAPI_global_ran_node_id_convertToJSON(eutra_location->global_enb_id);
+ if (global_enb_id_local_JSON == NULL) {
+ ogs_error("OpenAPI_eutra_location_convertToJSON() failed [global_enb_id]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "globalENbId", global_enb_id_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_eutra_location_convertToJSON() failed [global_enb_id]");
+ goto end;
+ }
}
end:
@@ -156,9 +165,18 @@ OpenAPI_eutra_location_t *OpenAPI_eutra_location_parseFromJSON(cJSON *eutra_loca
}
OpenAPI_tai_t *tai_local_nonprim = NULL;
-
+
tai_local_nonprim = OpenAPI_tai_parseFromJSON(tai);
+ cJSON *ignore_tai = cJSON_GetObjectItemCaseSensitive(eutra_locationJSON, "ignoreTai");
+
+ if (ignore_tai) {
+ if (!cJSON_IsBool(ignore_tai)) {
+ ogs_error("OpenAPI_eutra_location_parseFromJSON() failed [ignore_tai]");
+ goto end;
+ }
+ }
+
cJSON *ecgi = cJSON_GetObjectItemCaseSensitive(eutra_locationJSON, "ecgi");
if (!ecgi) {
ogs_error("OpenAPI_eutra_location_parseFromJSON() failed [ecgi]");
@@ -166,70 +184,71 @@ OpenAPI_eutra_location_t *OpenAPI_eutra_location_parseFromJSON(cJSON *eutra_loca
}
OpenAPI_ecgi_t *ecgi_local_nonprim = NULL;
-
+
ecgi_local_nonprim = OpenAPI_ecgi_parseFromJSON(ecgi);
cJSON *ignore_ecgi = cJSON_GetObjectItemCaseSensitive(eutra_locationJSON, "ignoreEcgi");
- if (ignore_ecgi) {
- if (!cJSON_IsBool(ignore_ecgi)) {
- ogs_error("OpenAPI_eutra_location_parseFromJSON() failed [ignore_ecgi]");
- goto end;
- }
+ if (ignore_ecgi) {
+ if (!cJSON_IsBool(ignore_ecgi)) {
+ ogs_error("OpenAPI_eutra_location_parseFromJSON() failed [ignore_ecgi]");
+ goto end;
+ }
}
cJSON *age_of_location_information = cJSON_GetObjectItemCaseSensitive(eutra_locationJSON, "ageOfLocationInformation");
- if (age_of_location_information) {
- if (!cJSON_IsNumber(age_of_location_information)) {
- ogs_error("OpenAPI_eutra_location_parseFromJSON() failed [age_of_location_information]");
- goto end;
- }
+ if (age_of_location_information) {
+ if (!cJSON_IsNumber(age_of_location_information)) {
+ ogs_error("OpenAPI_eutra_location_parseFromJSON() failed [age_of_location_information]");
+ goto end;
+ }
}
cJSON *ue_location_timestamp = cJSON_GetObjectItemCaseSensitive(eutra_locationJSON, "ueLocationTimestamp");
- if (ue_location_timestamp) {
- if (!cJSON_IsString(ue_location_timestamp)) {
- ogs_error("OpenAPI_eutra_location_parseFromJSON() failed [ue_location_timestamp]");
- goto end;
- }
+ if (ue_location_timestamp) {
+ if (!cJSON_IsString(ue_location_timestamp)) {
+ ogs_error("OpenAPI_eutra_location_parseFromJSON() failed [ue_location_timestamp]");
+ goto end;
+ }
}
cJSON *geographical_information = cJSON_GetObjectItemCaseSensitive(eutra_locationJSON, "geographicalInformation");
- if (geographical_information) {
- if (!cJSON_IsString(geographical_information)) {
- ogs_error("OpenAPI_eutra_location_parseFromJSON() failed [geographical_information]");
- goto end;
- }
+ if (geographical_information) {
+ if (!cJSON_IsString(geographical_information)) {
+ ogs_error("OpenAPI_eutra_location_parseFromJSON() failed [geographical_information]");
+ goto end;
+ }
}
cJSON *geodetic_information = cJSON_GetObjectItemCaseSensitive(eutra_locationJSON, "geodeticInformation");
- if (geodetic_information) {
- if (!cJSON_IsString(geodetic_information)) {
- ogs_error("OpenAPI_eutra_location_parseFromJSON() failed [geodetic_information]");
- goto end;
- }
+ if (geodetic_information) {
+ if (!cJSON_IsString(geodetic_information)) {
+ ogs_error("OpenAPI_eutra_location_parseFromJSON() failed [geodetic_information]");
+ goto end;
+ }
}
cJSON *global_ngenb_id = cJSON_GetObjectItemCaseSensitive(eutra_locationJSON, "globalNgenbId");
OpenAPI_global_ran_node_id_t *global_ngenb_id_local_nonprim = NULL;
- if (global_ngenb_id) {
- global_ngenb_id_local_nonprim = OpenAPI_global_ran_node_id_parseFromJSON(global_ngenb_id);
+ if (global_ngenb_id) {
+ global_ngenb_id_local_nonprim = OpenAPI_global_ran_node_id_parseFromJSON(global_ngenb_id);
}
- cJSON *global_e_nb_id = cJSON_GetObjectItemCaseSensitive(eutra_locationJSON, "globalENbId");
+ cJSON *global_enb_id = cJSON_GetObjectItemCaseSensitive(eutra_locationJSON, "globalENbId");
- OpenAPI_global_ran_node_id_t *global_e_nb_id_local_nonprim = NULL;
- if (global_e_nb_id) {
- global_e_nb_id_local_nonprim = OpenAPI_global_ran_node_id_parseFromJSON(global_e_nb_id);
+ OpenAPI_global_ran_node_id_t *global_enb_id_local_nonprim = NULL;
+ if (global_enb_id) {
+ global_enb_id_local_nonprim = OpenAPI_global_ran_node_id_parseFromJSON(global_enb_id);
}
eutra_location_local_var = OpenAPI_eutra_location_create (
tai_local_nonprim,
+ ignore_tai ? ignore_tai->valueint : 0,
ecgi_local_nonprim,
ignore_ecgi ? ignore_ecgi->valueint : 0,
age_of_location_information ? age_of_location_information->valuedouble : 0,
@@ -237,8 +256,8 @@ OpenAPI_eutra_location_t *OpenAPI_eutra_location_parseFromJSON(cJSON *eutra_loca
geographical_information ? ogs_strdup_or_assert(geographical_information->valuestring) : NULL,
geodetic_information ? ogs_strdup_or_assert(geodetic_information->valuestring) : NULL,
global_ngenb_id ? global_ngenb_id_local_nonprim : NULL,
- global_e_nb_id ? global_e_nb_id_local_nonprim : NULL
- );
+ global_enb_id ? global_enb_id_local_nonprim : NULL
+ );
return eutra_location_local_var;
end:
diff --git a/lib/sbi/openapi/model/eutra_location.h b/lib/sbi/openapi/model/eutra_location.h
index ec1b3ce9a..3c2fdd1d4 100644
--- a/lib/sbi/openapi/model/eutra_location.h
+++ b/lib/sbi/openapi/model/eutra_location.h
@@ -1,7 +1,7 @@
/*
* eutra_location.h
*
- *
+ *
*/
#ifndef _OpenAPI_eutra_location_H_
@@ -23,6 +23,7 @@ extern "C" {
typedef struct OpenAPI_eutra_location_s OpenAPI_eutra_location_t;
typedef struct OpenAPI_eutra_location_s {
struct OpenAPI_tai_s *tai;
+ int ignore_tai;
struct OpenAPI_ecgi_s *ecgi;
int ignore_ecgi;
int age_of_location_information;
@@ -30,11 +31,12 @@ typedef struct OpenAPI_eutra_location_s {
char *geographical_information;
char *geodetic_information;
struct OpenAPI_global_ran_node_id_s *global_ngenb_id;
- struct OpenAPI_global_ran_node_id_s *global_e_nb_id;
+ struct OpenAPI_global_ran_node_id_s *global_enb_id;
} OpenAPI_eutra_location_t;
OpenAPI_eutra_location_t *OpenAPI_eutra_location_create(
OpenAPI_tai_t *tai,
+ int ignore_tai,
OpenAPI_ecgi_t *ecgi,
int ignore_ecgi,
int age_of_location_information,
@@ -42,8 +44,8 @@ OpenAPI_eutra_location_t *OpenAPI_eutra_location_create(
char *geographical_information,
char *geodetic_information,
OpenAPI_global_ran_node_id_t *global_ngenb_id,
- OpenAPI_global_ran_node_id_t *global_e_nb_id
- );
+ OpenAPI_global_ran_node_id_t *global_enb_id
+);
void OpenAPI_eutra_location_free(OpenAPI_eutra_location_t *eutra_location);
OpenAPI_eutra_location_t *OpenAPI_eutra_location_parseFromJSON(cJSON *eutra_locationJSON);
cJSON *OpenAPI_eutra_location_convertToJSON(OpenAPI_eutra_location_t *eutra_location);
diff --git a/lib/sbi/openapi/model/event_for_mdt.h b/lib/sbi/openapi/model/event_for_mdt.h
index d27d20814..4e6ee363a 100644
--- a/lib/sbi/openapi/model/event_for_mdt.h
+++ b/lib/sbi/openapi/model/event_for_mdt.h
@@ -1,7 +1,7 @@
/*
* event_for_mdt.h
*
- *
+ *
*/
#ifndef _OpenAPI_event_for_mdt_H_
diff --git a/lib/sbi/openapi/model/event_id.c b/lib/sbi/openapi/model/event_id.c
index 170314f8f..247f27bdf 100644
--- a/lib/sbi/openapi/model/event_id.c
+++ b/lib/sbi/openapi/model/event_id.c
@@ -5,7 +5,7 @@
#include "event_id.h"
OpenAPI_event_id_t *OpenAPI_event_id_create(
- )
+)
{
OpenAPI_event_id_t *event_id_local_var = OpenAPI_malloc(sizeof(OpenAPI_event_id_t));
if (!event_id_local_var) {
@@ -42,7 +42,7 @@ OpenAPI_event_id_t *OpenAPI_event_id_parseFromJSON(cJSON *event_idJSON)
{
OpenAPI_event_id_t *event_id_local_var = NULL;
event_id_local_var = OpenAPI_event_id_create (
- );
+ );
return event_id_local_var;
end:
diff --git a/lib/sbi/openapi/model/event_id.h b/lib/sbi/openapi/model/event_id.h
index 0cb92a855..3eceb20f7 100644
--- a/lib/sbi/openapi/model/event_id.h
+++ b/lib/sbi/openapi/model/event_id.h
@@ -1,7 +1,7 @@
/*
* event_id.h
*
- * Possible values are - LOAD_LEVEL_INFORMATION: Represent the analytics of load level information of corresponding network slice instance. - NETWORK_PERFORMANCE: Represent the analytics of network performance information. - NF_LOAD: Indicates that the event subscribed is NF Load. - SERVICE_EXPERIENCE: Represent the analytics of service experience information of the specific applications. - UE_MOBILITY: Represent the analytics of UE mobility. - UE_COMMUNICATION: Represent the analytics of UE communication. - QOS_SUSTAINABILITY: Represent the analytics of QoS sustainability information in the certain area. - ABNORMAL_BEHAVIOUR: Indicates that the event subscribed is abnormal behaviour information. - USER_DATA_CONGESTION: Represent the analytics of the user data congestion in the certain area.
+ * Possible values are - LOAD_LEVEL_INFORMATION: Represent the analytics of load level information of corresponding network slice. - NETWORK_PERFORMANCE: Represent the analytics of network performance information. - NF_LOAD: Indicates that the event subscribed is NF Load. - SERVICE_EXPERIENCE: Represent the analytics of service experience information of the specific applications. - UE_MOBILITY: Represent the analytics of UE mobility. - UE_COMMUNICATION: Represent the analytics of UE communication. - QOS_SUSTAINABILITY: Represent the analytics of QoS sustainability information in the certain area. - ABNORMAL_BEHAVIOUR: Indicates that the event subscribed is abnormal behaviour information. - USER_DATA_CONGESTION: Represent the analytics of the user data congestion in the certain area. - NSI_LOAD_LEVEL: Represent the analytics of Network Slice and the optionally associated Network Slice Instance.
*/
#ifndef _OpenAPI_event_id_H_
@@ -12,6 +12,7 @@
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
+#include "event_id_any_of.h"
#ifdef __cplusplus
extern "C" {
@@ -22,7 +23,7 @@ typedef struct OpenAPI_event_id_s {
} OpenAPI_event_id_t;
OpenAPI_event_id_t *OpenAPI_event_id_create(
- );
+);
void OpenAPI_event_id_free(OpenAPI_event_id_t *event_id);
OpenAPI_event_id_t *OpenAPI_event_id_parseFromJSON(cJSON *event_idJSON);
cJSON *OpenAPI_event_id_convertToJSON(OpenAPI_event_id_t *event_id);
diff --git a/lib/sbi/openapi/model/event_id_any_of.c b/lib/sbi/openapi/model/event_id_any_of.c
new file mode 100644
index 000000000..52d7f08c5
--- /dev/null
+++ b/lib/sbi/openapi/model/event_id_any_of.c
@@ -0,0 +1,30 @@
+
+#include
+#include
+#include
+#include "event_id_any_of.h"
+
+char* OpenAPI_event_id_any_of_ToString(OpenAPI_event_id_any_of_e event_id_any_of)
+{
+ const char *event_id_any_ofArray[] = { "NULL", "LOAD_LEVEL_INFORMATION", "NETWORK_PERFORMANCE", "NF_LOAD", "SERVICE_EXPERIENCE", "UE_MOBILITY", "UE_COMMUNICATION", "QOS_SUSTAINABILITY", "ABNORMAL_BEHAVIOUR", "USER_DATA_CONGESTION", "NSI_LOAD_LEVEL" };
+ size_t sizeofArray = sizeof(event_id_any_ofArray) / sizeof(event_id_any_ofArray[0]);
+ if (event_id_any_of < sizeofArray)
+ return (char *)event_id_any_ofArray[event_id_any_of];
+ else
+ return (char *)"Unknown";
+}
+
+OpenAPI_event_id_any_of_e OpenAPI_event_id_any_of_FromString(char* event_id_any_of)
+{
+ int stringToReturn = 0;
+ const char *event_id_any_ofArray[] = { "NULL", "LOAD_LEVEL_INFORMATION", "NETWORK_PERFORMANCE", "NF_LOAD", "SERVICE_EXPERIENCE", "UE_MOBILITY", "UE_COMMUNICATION", "QOS_SUSTAINABILITY", "ABNORMAL_BEHAVIOUR", "USER_DATA_CONGESTION", "NSI_LOAD_LEVEL" };
+ size_t sizeofArray = sizeof(event_id_any_ofArray) / sizeof(event_id_any_ofArray[0]);
+ while (stringToReturn < sizeofArray) {
+ if (strcmp(event_id_any_of, event_id_any_ofArray[stringToReturn]) == 0) {
+ return stringToReturn;
+ }
+ stringToReturn++;
+ }
+ return 0;
+}
+
diff --git a/lib/sbi/openapi/model/event_id_any_of.h b/lib/sbi/openapi/model/event_id_any_of.h
new file mode 100644
index 000000000..da2f3f4c6
--- /dev/null
+++ b/lib/sbi/openapi/model/event_id_any_of.h
@@ -0,0 +1,31 @@
+/*
+ * event_id_any_of.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_event_id_any_of_H_
+#define _OpenAPI_event_id_any_of_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum { OpenAPI_event_id_any_of_NULL = 0, OpenAPI_event_id_any_of_LOAD_LEVEL_INFORMATION, OpenAPI_event_id_any_of_NETWORK_PERFORMANCE, OpenAPI_event_id_any_of_NF_LOAD, OpenAPI_event_id_any_of_SERVICE_EXPERIENCE, OpenAPI_event_id_any_of_UE_MOBILITY, OpenAPI_event_id_any_of_UE_COMMUNICATION, OpenAPI_event_id_any_of_QOS_SUSTAINABILITY, OpenAPI_event_id_any_of_ABNORMAL_BEHAVIOUR, OpenAPI_event_id_any_of_USER_DATA_CONGESTION, OpenAPI_event_id_any_of_NSI_LOAD_LEVEL } OpenAPI_event_id_any_of_e;
+
+char* OpenAPI_event_id_any_of_ToString(OpenAPI_event_id_any_of_e event_id_any_of);
+
+OpenAPI_event_id_any_of_e OpenAPI_event_id_any_of_FromString(char* event_id_any_of);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_event_id_any_of_H_ */
+
diff --git a/lib/sbi/openapi/model/event_report_mode.c b/lib/sbi/openapi/model/event_report_mode.c
index ea3549c17..27f42cc86 100644
--- a/lib/sbi/openapi/model/event_report_mode.c
+++ b/lib/sbi/openapi/model/event_report_mode.c
@@ -5,7 +5,7 @@
#include "event_report_mode.h"
OpenAPI_event_report_mode_t *OpenAPI_event_report_mode_create(
- )
+)
{
OpenAPI_event_report_mode_t *event_report_mode_local_var = OpenAPI_malloc(sizeof(OpenAPI_event_report_mode_t));
if (!event_report_mode_local_var) {
@@ -42,7 +42,7 @@ OpenAPI_event_report_mode_t *OpenAPI_event_report_mode_parseFromJSON(cJSON *even
{
OpenAPI_event_report_mode_t *event_report_mode_local_var = NULL;
event_report_mode_local_var = OpenAPI_event_report_mode_create (
- );
+ );
return event_report_mode_local_var;
end:
diff --git a/lib/sbi/openapi/model/event_report_mode.h b/lib/sbi/openapi/model/event_report_mode.h
index 158b71ec6..999aa43ed 100644
--- a/lib/sbi/openapi/model/event_report_mode.h
+++ b/lib/sbi/openapi/model/event_report_mode.h
@@ -1,7 +1,7 @@
/*
* event_report_mode.h
*
- *
+ *
*/
#ifndef _OpenAPI_event_report_mode_H_
@@ -12,6 +12,7 @@
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
+#include "event_report_mode_any_of.h"
#ifdef __cplusplus
extern "C" {
@@ -22,7 +23,7 @@ typedef struct OpenAPI_event_report_mode_s {
} OpenAPI_event_report_mode_t;
OpenAPI_event_report_mode_t *OpenAPI_event_report_mode_create(
- );
+);
void OpenAPI_event_report_mode_free(OpenAPI_event_report_mode_t *event_report_mode);
OpenAPI_event_report_mode_t *OpenAPI_event_report_mode_parseFromJSON(cJSON *event_report_modeJSON);
cJSON *OpenAPI_event_report_mode_convertToJSON(OpenAPI_event_report_mode_t *event_report_mode);
diff --git a/lib/sbi/openapi/model/event_report_mode_any_of.c b/lib/sbi/openapi/model/event_report_mode_any_of.c
new file mode 100644
index 000000000..1570b3962
--- /dev/null
+++ b/lib/sbi/openapi/model/event_report_mode_any_of.c
@@ -0,0 +1,30 @@
+
+#include
+#include
+#include
+#include "event_report_mode_any_of.h"
+
+char* OpenAPI_event_report_mode_any_of_ToString(OpenAPI_event_report_mode_any_of_e event_report_mode_any_of)
+{
+ const char *event_report_mode_any_ofArray[] = { "NULL", "PERIODIC", "ON_EVENT_DETECTION" };
+ size_t sizeofArray = sizeof(event_report_mode_any_ofArray) / sizeof(event_report_mode_any_ofArray[0]);
+ if (event_report_mode_any_of < sizeofArray)
+ return (char *)event_report_mode_any_ofArray[event_report_mode_any_of];
+ else
+ return (char *)"Unknown";
+}
+
+OpenAPI_event_report_mode_any_of_e OpenAPI_event_report_mode_any_of_FromString(char* event_report_mode_any_of)
+{
+ int stringToReturn = 0;
+ const char *event_report_mode_any_ofArray[] = { "NULL", "PERIODIC", "ON_EVENT_DETECTION" };
+ size_t sizeofArray = sizeof(event_report_mode_any_ofArray) / sizeof(event_report_mode_any_ofArray[0]);
+ while (stringToReturn < sizeofArray) {
+ if (strcmp(event_report_mode_any_of, event_report_mode_any_ofArray[stringToReturn]) == 0) {
+ return stringToReturn;
+ }
+ stringToReturn++;
+ }
+ return 0;
+}
+
diff --git a/lib/sbi/openapi/model/event_report_mode_any_of.h b/lib/sbi/openapi/model/event_report_mode_any_of.h
new file mode 100644
index 000000000..5f86b22c9
--- /dev/null
+++ b/lib/sbi/openapi/model/event_report_mode_any_of.h
@@ -0,0 +1,31 @@
+/*
+ * event_report_mode_any_of.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_event_report_mode_any_of_H_
+#define _OpenAPI_event_report_mode_any_of_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum { OpenAPI_event_report_mode_any_of_NULL = 0, OpenAPI_event_report_mode_any_of_PERIODIC, OpenAPI_event_report_mode_any_of_ON_EVENT_DETECTION } OpenAPI_event_report_mode_any_of_e;
+
+char* OpenAPI_event_report_mode_any_of_ToString(OpenAPI_event_report_mode_any_of_e event_report_mode_any_of);
+
+OpenAPI_event_report_mode_any_of_e OpenAPI_event_report_mode_any_of_FromString(char* event_report_mode_any_of);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_event_report_mode_any_of_H_ */
+
diff --git a/lib/sbi/openapi/model/event_type.c b/lib/sbi/openapi/model/event_type.c
index 5414d9bfb..497a9e764 100644
--- a/lib/sbi/openapi/model/event_type.c
+++ b/lib/sbi/openapi/model/event_type.c
@@ -5,7 +5,7 @@
#include "event_type.h"
OpenAPI_event_type_t *OpenAPI_event_type_create(
- )
+)
{
OpenAPI_event_type_t *event_type_local_var = OpenAPI_malloc(sizeof(OpenAPI_event_type_t));
if (!event_type_local_var) {
@@ -42,7 +42,7 @@ OpenAPI_event_type_t *OpenAPI_event_type_parseFromJSON(cJSON *event_typeJSON)
{
OpenAPI_event_type_t *event_type_local_var = NULL;
event_type_local_var = OpenAPI_event_type_create (
- );
+ );
return event_type_local_var;
end:
diff --git a/lib/sbi/openapi/model/event_type.h b/lib/sbi/openapi/model/event_type.h
index 60ef8b43e..45d4dcb5c 100644
--- a/lib/sbi/openapi/model/event_type.h
+++ b/lib/sbi/openapi/model/event_type.h
@@ -1,7 +1,7 @@
/*
* event_type.h
*
- *
+ *
*/
#ifndef _OpenAPI_event_type_H_
@@ -12,6 +12,7 @@
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
+#include "event_type_any_of.h"
#ifdef __cplusplus
extern "C" {
@@ -22,7 +23,7 @@ typedef struct OpenAPI_event_type_s {
} OpenAPI_event_type_t;
OpenAPI_event_type_t *OpenAPI_event_type_create(
- );
+);
void OpenAPI_event_type_free(OpenAPI_event_type_t *event_type);
OpenAPI_event_type_t *OpenAPI_event_type_parseFromJSON(cJSON *event_typeJSON);
cJSON *OpenAPI_event_type_convertToJSON(OpenAPI_event_type_t *event_type);
diff --git a/lib/sbi/openapi/model/event_type_any_of.c b/lib/sbi/openapi/model/event_type_any_of.c
new file mode 100644
index 000000000..facee9098
--- /dev/null
+++ b/lib/sbi/openapi/model/event_type_any_of.c
@@ -0,0 +1,30 @@
+
+#include
+#include
+#include
+#include "event_type_any_of.h"
+
+char* OpenAPI_event_type_any_of_ToString(OpenAPI_event_type_any_of_e event_type_any_of)
+{
+ const char *event_type_any_ofArray[] = { "NULL", "LOSS_OF_CONNECTIVITY", "UE_REACHABILITY_FOR_DATA", "UE_REACHABILITY_FOR_SMS", "LOCATION_REPORTING", "CHANGE_OF_SUPI_PEI_ASSOCIATION", "ROAMING_STATUS", "COMMUNICATION_FAILURE", "AVAILABILITY_AFTER_DDN_FAILURE", "CN_TYPE_CHANGE", "DL_DATA_DELIVERY_STATUS", "PDN_CONNECTIVITY_STATUS", "UE_CONNECTION_MANAGEMENT_STATE" };
+ size_t sizeofArray = sizeof(event_type_any_ofArray) / sizeof(event_type_any_ofArray[0]);
+ if (event_type_any_of < sizeofArray)
+ return (char *)event_type_any_ofArray[event_type_any_of];
+ else
+ return (char *)"Unknown";
+}
+
+OpenAPI_event_type_any_of_e OpenAPI_event_type_any_of_FromString(char* event_type_any_of)
+{
+ int stringToReturn = 0;
+ const char *event_type_any_ofArray[] = { "NULL", "LOSS_OF_CONNECTIVITY", "UE_REACHABILITY_FOR_DATA", "UE_REACHABILITY_FOR_SMS", "LOCATION_REPORTING", "CHANGE_OF_SUPI_PEI_ASSOCIATION", "ROAMING_STATUS", "COMMUNICATION_FAILURE", "AVAILABILITY_AFTER_DDN_FAILURE", "CN_TYPE_CHANGE", "DL_DATA_DELIVERY_STATUS", "PDN_CONNECTIVITY_STATUS", "UE_CONNECTION_MANAGEMENT_STATE" };
+ size_t sizeofArray = sizeof(event_type_any_ofArray) / sizeof(event_type_any_ofArray[0]);
+ while (stringToReturn < sizeofArray) {
+ if (strcmp(event_type_any_of, event_type_any_ofArray[stringToReturn]) == 0) {
+ return stringToReturn;
+ }
+ stringToReturn++;
+ }
+ return 0;
+}
+
diff --git a/lib/sbi/openapi/model/event_type_any_of.h b/lib/sbi/openapi/model/event_type_any_of.h
new file mode 100644
index 000000000..41a0705fe
--- /dev/null
+++ b/lib/sbi/openapi/model/event_type_any_of.h
@@ -0,0 +1,31 @@
+/*
+ * event_type_any_of.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_event_type_any_of_H_
+#define _OpenAPI_event_type_any_of_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum { OpenAPI_event_type_any_of_NULL = 0, OpenAPI_event_type_any_of_LOSS_OF_CONNECTIVITY, OpenAPI_event_type_any_of_UE_REACHABILITY_FOR_DATA, OpenAPI_event_type_any_of_UE_REACHABILITY_FOR_SMS, OpenAPI_event_type_any_of_LOCATION_REPORTING, OpenAPI_event_type_any_of_CHANGE_OF_SUPI_PEI_ASSOCIATION, OpenAPI_event_type_any_of_ROAMING_STATUS, OpenAPI_event_type_any_of_COMMUNICATION_FAILURE, OpenAPI_event_type_any_of_AVAILABILITY_AFTER_DDN_FAILURE, OpenAPI_event_type_any_of_CN_TYPE_CHANGE, OpenAPI_event_type_any_of_DL_DATA_DELIVERY_STATUS, OpenAPI_event_type_any_of_PDN_CONNECTIVITY_STATUS, OpenAPI_event_type_any_of_UE_CONNECTION_MANAGEMENT_STATE } OpenAPI_event_type_any_of_e;
+
+char* OpenAPI_event_type_any_of_ToString(OpenAPI_event_type_any_of_e event_type_any_of);
+
+OpenAPI_event_type_any_of_e OpenAPI_event_type_any_of_FromString(char* event_type_any_of);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_event_type_any_of_H_ */
+
diff --git a/lib/sbi/openapi/model/events_notification.c b/lib/sbi/openapi/model/events_notification.c
index c8bf6d60a..94a69f355 100644
--- a/lib/sbi/openapi/model/events_notification.c
+++ b/lib/sbi/openapi/model/events_notification.c
@@ -6,15 +6,18 @@
OpenAPI_events_notification_t *OpenAPI_events_notification_create(
OpenAPI_access_type_e access_type,
+ OpenAPI_additional_access_info_t *add_access_info,
+ OpenAPI_additional_access_info_t *rel_access_info,
OpenAPI_acc_net_charging_address_t *an_charg_addr,
OpenAPI_list_t *an_charg_ids,
OpenAPI_an_gw_address_t *an_gw_addr,
char *ev_subs_uri,
OpenAPI_list_t *ev_notifs,
OpenAPI_list_t *failed_resourc_alloc_reports,
- int no_net_loc_supp,
+ OpenAPI_list_t *succ_resourc_alloc_reports,
+ OpenAPI_net_loc_access_support_e no_net_loc_supp,
OpenAPI_list_t *out_of_cred_reports,
- OpenAPI_plmn_id_t *plmn_id,
+ OpenAPI_plmn_id_nid_t *plmn_id,
OpenAPI_list_t *qnc_reports,
OpenAPI_list_t *qos_mon_reports,
OpenAPI_list_t *ran_nas_rel_causes,
@@ -22,22 +25,25 @@ OpenAPI_events_notification_t *OpenAPI_events_notification_create(
OpenAPI_user_location_t *ue_loc,
char *ue_time_zone,
OpenAPI_accumulated_usage_t *usg_rep,
- OpenAPI_tsn_bridge_info_t *tsn_bridge_info,
+ OpenAPI_bridge_management_container_t *tsn_bridge_man_cont,
OpenAPI_port_management_container_t *tsn_port_man_cont_dstt,
OpenAPI_list_t *tsn_port_man_cont_nwtts
- )
+)
{
OpenAPI_events_notification_t *events_notification_local_var = OpenAPI_malloc(sizeof(OpenAPI_events_notification_t));
if (!events_notification_local_var) {
return NULL;
}
events_notification_local_var->access_type = access_type;
+ events_notification_local_var->add_access_info = add_access_info;
+ events_notification_local_var->rel_access_info = rel_access_info;
events_notification_local_var->an_charg_addr = an_charg_addr;
events_notification_local_var->an_charg_ids = an_charg_ids;
events_notification_local_var->an_gw_addr = an_gw_addr;
events_notification_local_var->ev_subs_uri = ev_subs_uri;
events_notification_local_var->ev_notifs = ev_notifs;
events_notification_local_var->failed_resourc_alloc_reports = failed_resourc_alloc_reports;
+ events_notification_local_var->succ_resourc_alloc_reports = succ_resourc_alloc_reports;
events_notification_local_var->no_net_loc_supp = no_net_loc_supp;
events_notification_local_var->out_of_cred_reports = out_of_cred_reports;
events_notification_local_var->plmn_id = plmn_id;
@@ -48,7 +54,7 @@ OpenAPI_events_notification_t *OpenAPI_events_notification_create(
events_notification_local_var->ue_loc = ue_loc;
events_notification_local_var->ue_time_zone = ue_time_zone;
events_notification_local_var->usg_rep = usg_rep;
- events_notification_local_var->tsn_bridge_info = tsn_bridge_info;
+ events_notification_local_var->tsn_bridge_man_cont = tsn_bridge_man_cont;
events_notification_local_var->tsn_port_man_cont_dstt = tsn_port_man_cont_dstt;
events_notification_local_var->tsn_port_man_cont_nwtts = tsn_port_man_cont_nwtts;
@@ -61,6 +67,8 @@ void OpenAPI_events_notification_free(OpenAPI_events_notification_t *events_noti
return;
}
OpenAPI_lnode_t *node;
+ OpenAPI_additional_access_info_free(events_notification->add_access_info);
+ OpenAPI_additional_access_info_free(events_notification->rel_access_info);
OpenAPI_acc_net_charging_address_free(events_notification->an_charg_addr);
OpenAPI_list_for_each(events_notification->an_charg_ids, node) {
OpenAPI_access_net_charging_identifier_free(node->data);
@@ -76,11 +84,15 @@ void OpenAPI_events_notification_free(OpenAPI_events_notification_t *events_noti
OpenAPI_resources_allocation_info_free(node->data);
}
OpenAPI_list_free(events_notification->failed_resourc_alloc_reports);
+ OpenAPI_list_for_each(events_notification->succ_resourc_alloc_reports, node) {
+ OpenAPI_resources_allocation_info_free(node->data);
+ }
+ OpenAPI_list_free(events_notification->succ_resourc_alloc_reports);
OpenAPI_list_for_each(events_notification->out_of_cred_reports, node) {
OpenAPI_out_of_credit_information_free(node->data);
}
OpenAPI_list_free(events_notification->out_of_cred_reports);
- OpenAPI_plmn_id_free(events_notification->plmn_id);
+ OpenAPI_plmn_id_nid_free(events_notification->plmn_id);
OpenAPI_list_for_each(events_notification->qnc_reports, node) {
OpenAPI_qos_notification_control_info_free(node->data);
}
@@ -96,7 +108,7 @@ void OpenAPI_events_notification_free(OpenAPI_events_notification_t *events_noti
OpenAPI_user_location_free(events_notification->ue_loc);
ogs_free(events_notification->ue_time_zone);
OpenAPI_accumulated_usage_free(events_notification->usg_rep);
- OpenAPI_tsn_bridge_info_free(events_notification->tsn_bridge_info);
+ OpenAPI_bridge_management_container_free(events_notification->tsn_bridge_man_cont);
OpenAPI_port_management_container_free(events_notification->tsn_port_man_cont_dstt);
OpenAPI_list_for_each(events_notification->tsn_port_man_cont_nwtts, node) {
OpenAPI_port_management_container_free(node->data);
@@ -116,56 +128,82 @@ cJSON *OpenAPI_events_notification_convertToJSON(OpenAPI_events_notification_t *
item = cJSON_CreateObject();
if (events_notification->access_type) {
- if (cJSON_AddStringToObject(item, "accessType", OpenAPI_access_type_ToString(events_notification->access_type)) == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [access_type]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "accessType", OpenAPI_access_type_ToString(events_notification->access_type)) == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [access_type]");
+ goto end;
+ }
+ }
+
+ if (events_notification->add_access_info) {
+ cJSON *add_access_info_local_JSON = OpenAPI_additional_access_info_convertToJSON(events_notification->add_access_info);
+ if (add_access_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [add_access_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "addAccessInfo", add_access_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [add_access_info]");
+ goto end;
+ }
+ }
+
+ if (events_notification->rel_access_info) {
+ cJSON *rel_access_info_local_JSON = OpenAPI_additional_access_info_convertToJSON(events_notification->rel_access_info);
+ if (rel_access_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [rel_access_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "relAccessInfo", rel_access_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [rel_access_info]");
+ goto end;
+ }
}
if (events_notification->an_charg_addr) {
- cJSON *an_charg_addr_local_JSON = OpenAPI_acc_net_charging_address_convertToJSON(events_notification->an_charg_addr);
- if (an_charg_addr_local_JSON == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [an_charg_addr]");
- goto end;
- }
- cJSON_AddItemToObject(item, "anChargAddr", an_charg_addr_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [an_charg_addr]");
- goto end;
- }
+ cJSON *an_charg_addr_local_JSON = OpenAPI_acc_net_charging_address_convertToJSON(events_notification->an_charg_addr);
+ if (an_charg_addr_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [an_charg_addr]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "anChargAddr", an_charg_addr_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [an_charg_addr]");
+ goto end;
+ }
}
if (events_notification->an_charg_ids) {
- cJSON *an_charg_idsList = cJSON_AddArrayToObject(item, "anChargIds");
- if (an_charg_idsList == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [an_charg_ids]");
- goto end;
- }
+ cJSON *an_charg_idsList = cJSON_AddArrayToObject(item, "anChargIds");
+ if (an_charg_idsList == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [an_charg_ids]");
+ goto end;
+ }
- OpenAPI_lnode_t *an_charg_ids_node;
- if (events_notification->an_charg_ids) {
- OpenAPI_list_for_each(events_notification->an_charg_ids, an_charg_ids_node) {
- cJSON *itemLocal = OpenAPI_access_net_charging_identifier_convertToJSON(an_charg_ids_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [an_charg_ids]");
- goto end;
- }
- cJSON_AddItemToArray(an_charg_idsList, itemLocal);
+ OpenAPI_lnode_t *an_charg_ids_node;
+ if (events_notification->an_charg_ids) {
+ OpenAPI_list_for_each(events_notification->an_charg_ids, an_charg_ids_node) {
+ cJSON *itemLocal = OpenAPI_access_net_charging_identifier_convertToJSON(an_charg_ids_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [an_charg_ids]");
+ goto end;
}
+ cJSON_AddItemToArray(an_charg_idsList, itemLocal);
}
}
+ }
if (events_notification->an_gw_addr) {
- cJSON *an_gw_addr_local_JSON = OpenAPI_an_gw_address_convertToJSON(events_notification->an_gw_addr);
- if (an_gw_addr_local_JSON == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [an_gw_addr]");
- goto end;
- }
- cJSON_AddItemToObject(item, "anGwAddr", an_gw_addr_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [an_gw_addr]");
- goto end;
- }
+ cJSON *an_gw_addr_local_JSON = OpenAPI_an_gw_address_convertToJSON(events_notification->an_gw_addr);
+ if (an_gw_addr_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [an_gw_addr]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "anGwAddr", an_gw_addr_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [an_gw_addr]");
+ goto end;
+ }
}
if (cJSON_AddStringToObject(item, "evSubsUri", events_notification->ev_subs_uri) == NULL) {
@@ -192,210 +230,230 @@ cJSON *OpenAPI_events_notification_convertToJSON(OpenAPI_events_notification_t *
}
if (events_notification->failed_resourc_alloc_reports) {
- cJSON *failed_resourc_alloc_reportsList = cJSON_AddArrayToObject(item, "failedResourcAllocReports");
- if (failed_resourc_alloc_reportsList == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [failed_resourc_alloc_reports]");
- goto end;
- }
+ cJSON *failed_resourc_alloc_reportsList = cJSON_AddArrayToObject(item, "failedResourcAllocReports");
+ if (failed_resourc_alloc_reportsList == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [failed_resourc_alloc_reports]");
+ goto end;
+ }
- OpenAPI_lnode_t *failed_resourc_alloc_reports_node;
- if (events_notification->failed_resourc_alloc_reports) {
- OpenAPI_list_for_each(events_notification->failed_resourc_alloc_reports, failed_resourc_alloc_reports_node) {
- cJSON *itemLocal = OpenAPI_resources_allocation_info_convertToJSON(failed_resourc_alloc_reports_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [failed_resourc_alloc_reports]");
- goto end;
- }
- cJSON_AddItemToArray(failed_resourc_alloc_reportsList, itemLocal);
+ OpenAPI_lnode_t *failed_resourc_alloc_reports_node;
+ if (events_notification->failed_resourc_alloc_reports) {
+ OpenAPI_list_for_each(events_notification->failed_resourc_alloc_reports, failed_resourc_alloc_reports_node) {
+ cJSON *itemLocal = OpenAPI_resources_allocation_info_convertToJSON(failed_resourc_alloc_reports_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [failed_resourc_alloc_reports]");
+ goto end;
}
+ cJSON_AddItemToArray(failed_resourc_alloc_reportsList, itemLocal);
}
}
+ }
+
+ if (events_notification->succ_resourc_alloc_reports) {
+ cJSON *succ_resourc_alloc_reportsList = cJSON_AddArrayToObject(item, "succResourcAllocReports");
+ if (succ_resourc_alloc_reportsList == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [succ_resourc_alloc_reports]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *succ_resourc_alloc_reports_node;
+ if (events_notification->succ_resourc_alloc_reports) {
+ OpenAPI_list_for_each(events_notification->succ_resourc_alloc_reports, succ_resourc_alloc_reports_node) {
+ cJSON *itemLocal = OpenAPI_resources_allocation_info_convertToJSON(succ_resourc_alloc_reports_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [succ_resourc_alloc_reports]");
+ goto end;
+ }
+ cJSON_AddItemToArray(succ_resourc_alloc_reportsList, itemLocal);
+ }
+ }
+ }
if (events_notification->no_net_loc_supp) {
- if (cJSON_AddBoolToObject(item, "noNetLocSupp", events_notification->no_net_loc_supp) == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [no_net_loc_supp]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "noNetLocSupp", OpenAPI_net_loc_access_support_ToString(events_notification->no_net_loc_supp)) == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [no_net_loc_supp]");
+ goto end;
+ }
}
if (events_notification->out_of_cred_reports) {
- cJSON *out_of_cred_reportsList = cJSON_AddArrayToObject(item, "outOfCredReports");
- if (out_of_cred_reportsList == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [out_of_cred_reports]");
- goto end;
- }
+ cJSON *out_of_cred_reportsList = cJSON_AddArrayToObject(item, "outOfCredReports");
+ if (out_of_cred_reportsList == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [out_of_cred_reports]");
+ goto end;
+ }
- OpenAPI_lnode_t *out_of_cred_reports_node;
- if (events_notification->out_of_cred_reports) {
- OpenAPI_list_for_each(events_notification->out_of_cred_reports, out_of_cred_reports_node) {
- cJSON *itemLocal = OpenAPI_out_of_credit_information_convertToJSON(out_of_cred_reports_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [out_of_cred_reports]");
- goto end;
- }
- cJSON_AddItemToArray(out_of_cred_reportsList, itemLocal);
+ OpenAPI_lnode_t *out_of_cred_reports_node;
+ if (events_notification->out_of_cred_reports) {
+ OpenAPI_list_for_each(events_notification->out_of_cred_reports, out_of_cred_reports_node) {
+ cJSON *itemLocal = OpenAPI_out_of_credit_information_convertToJSON(out_of_cred_reports_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [out_of_cred_reports]");
+ goto end;
}
+ cJSON_AddItemToArray(out_of_cred_reportsList, itemLocal);
}
}
+ }
if (events_notification->plmn_id) {
- cJSON *plmn_id_local_JSON = OpenAPI_plmn_id_convertToJSON(events_notification->plmn_id);
- if (plmn_id_local_JSON == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [plmn_id]");
- goto end;
- }
- cJSON_AddItemToObject(item, "plmnId", plmn_id_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [plmn_id]");
- goto end;
- }
+ cJSON *plmn_id_local_JSON = OpenAPI_plmn_id_nid_convertToJSON(events_notification->plmn_id);
+ if (plmn_id_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [plmn_id]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "plmnId", plmn_id_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [plmn_id]");
+ goto end;
+ }
}
if (events_notification->qnc_reports) {
- cJSON *qnc_reportsList = cJSON_AddArrayToObject(item, "qncReports");
- if (qnc_reportsList == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [qnc_reports]");
- goto end;
- }
+ cJSON *qnc_reportsList = cJSON_AddArrayToObject(item, "qncReports");
+ if (qnc_reportsList == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [qnc_reports]");
+ goto end;
+ }
- OpenAPI_lnode_t *qnc_reports_node;
- if (events_notification->qnc_reports) {
- OpenAPI_list_for_each(events_notification->qnc_reports, qnc_reports_node) {
- cJSON *itemLocal = OpenAPI_qos_notification_control_info_convertToJSON(qnc_reports_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [qnc_reports]");
- goto end;
- }
- cJSON_AddItemToArray(qnc_reportsList, itemLocal);
+ OpenAPI_lnode_t *qnc_reports_node;
+ if (events_notification->qnc_reports) {
+ OpenAPI_list_for_each(events_notification->qnc_reports, qnc_reports_node) {
+ cJSON *itemLocal = OpenAPI_qos_notification_control_info_convertToJSON(qnc_reports_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [qnc_reports]");
+ goto end;
}
+ cJSON_AddItemToArray(qnc_reportsList, itemLocal);
}
}
+ }
if (events_notification->qos_mon_reports) {
- cJSON *qos_mon_reportsList = cJSON_AddArrayToObject(item, "qosMonReports");
- if (qos_mon_reportsList == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [qos_mon_reports]");
- goto end;
- }
+ cJSON *qos_mon_reportsList = cJSON_AddArrayToObject(item, "qosMonReports");
+ if (qos_mon_reportsList == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [qos_mon_reports]");
+ goto end;
+ }
- OpenAPI_lnode_t *qos_mon_reports_node;
- if (events_notification->qos_mon_reports) {
- OpenAPI_list_for_each(events_notification->qos_mon_reports, qos_mon_reports_node) {
- cJSON *itemLocal = OpenAPI_qos_monitoring_report_convertToJSON(qos_mon_reports_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [qos_mon_reports]");
- goto end;
- }
- cJSON_AddItemToArray(qos_mon_reportsList, itemLocal);
+ OpenAPI_lnode_t *qos_mon_reports_node;
+ if (events_notification->qos_mon_reports) {
+ OpenAPI_list_for_each(events_notification->qos_mon_reports, qos_mon_reports_node) {
+ cJSON *itemLocal = OpenAPI_qos_monitoring_report_convertToJSON(qos_mon_reports_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [qos_mon_reports]");
+ goto end;
}
+ cJSON_AddItemToArray(qos_mon_reportsList, itemLocal);
}
}
+ }
if (events_notification->ran_nas_rel_causes) {
- cJSON *ran_nas_rel_causesList = cJSON_AddArrayToObject(item, "ranNasRelCauses");
- if (ran_nas_rel_causesList == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [ran_nas_rel_causes]");
- goto end;
- }
+ cJSON *ran_nas_rel_causesList = cJSON_AddArrayToObject(item, "ranNasRelCauses");
+ if (ran_nas_rel_causesList == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [ran_nas_rel_causes]");
+ goto end;
+ }
- OpenAPI_lnode_t *ran_nas_rel_causes_node;
- if (events_notification->ran_nas_rel_causes) {
- OpenAPI_list_for_each(events_notification->ran_nas_rel_causes, ran_nas_rel_causes_node) {
- cJSON *itemLocal = OpenAPI_ran_nas_rel_cause_convertToJSON(ran_nas_rel_causes_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [ran_nas_rel_causes]");
- goto end;
- }
- cJSON_AddItemToArray(ran_nas_rel_causesList, itemLocal);
+ OpenAPI_lnode_t *ran_nas_rel_causes_node;
+ if (events_notification->ran_nas_rel_causes) {
+ OpenAPI_list_for_each(events_notification->ran_nas_rel_causes, ran_nas_rel_causes_node) {
+ cJSON *itemLocal = OpenAPI_ran_nas_rel_cause_convertToJSON(ran_nas_rel_causes_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [ran_nas_rel_causes]");
+ goto end;
}
+ cJSON_AddItemToArray(ran_nas_rel_causesList, itemLocal);
}
}
+ }
if (events_notification->rat_type) {
- if (cJSON_AddStringToObject(item, "ratType", OpenAPI_rat_type_ToString(events_notification->rat_type)) == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [rat_type]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "ratType", OpenAPI_rat_type_ToString(events_notification->rat_type)) == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [rat_type]");
+ goto end;
+ }
}
if (events_notification->ue_loc) {
- cJSON *ue_loc_local_JSON = OpenAPI_user_location_convertToJSON(events_notification->ue_loc);
- if (ue_loc_local_JSON == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [ue_loc]");
- goto end;
- }
- cJSON_AddItemToObject(item, "ueLoc", ue_loc_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [ue_loc]");
- goto end;
- }
+ cJSON *ue_loc_local_JSON = OpenAPI_user_location_convertToJSON(events_notification->ue_loc);
+ if (ue_loc_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [ue_loc]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "ueLoc", ue_loc_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [ue_loc]");
+ goto end;
+ }
}
if (events_notification->ue_time_zone) {
- if (cJSON_AddStringToObject(item, "ueTimeZone", events_notification->ue_time_zone) == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [ue_time_zone]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "ueTimeZone", events_notification->ue_time_zone) == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [ue_time_zone]");
+ goto end;
+ }
}
if (events_notification->usg_rep) {
- cJSON *usg_rep_local_JSON = OpenAPI_accumulated_usage_convertToJSON(events_notification->usg_rep);
- if (usg_rep_local_JSON == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [usg_rep]");
- goto end;
- }
- cJSON_AddItemToObject(item, "usgRep", usg_rep_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [usg_rep]");
- goto end;
- }
+ cJSON *usg_rep_local_JSON = OpenAPI_accumulated_usage_convertToJSON(events_notification->usg_rep);
+ if (usg_rep_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [usg_rep]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "usgRep", usg_rep_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [usg_rep]");
+ goto end;
+ }
}
- if (events_notification->tsn_bridge_info) {
- cJSON *tsn_bridge_info_local_JSON = OpenAPI_tsn_bridge_info_convertToJSON(events_notification->tsn_bridge_info);
- if (tsn_bridge_info_local_JSON == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [tsn_bridge_info]");
- goto end;
- }
- cJSON_AddItemToObject(item, "tsnBridgeInfo", tsn_bridge_info_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [tsn_bridge_info]");
- goto end;
- }
+ if (events_notification->tsn_bridge_man_cont) {
+ cJSON *tsn_bridge_man_cont_local_JSON = OpenAPI_bridge_management_container_convertToJSON(events_notification->tsn_bridge_man_cont);
+ if (tsn_bridge_man_cont_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [tsn_bridge_man_cont]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "tsnBridgeManCont", tsn_bridge_man_cont_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [tsn_bridge_man_cont]");
+ goto end;
+ }
}
if (events_notification->tsn_port_man_cont_dstt) {
- cJSON *tsn_port_man_cont_dstt_local_JSON = OpenAPI_port_management_container_convertToJSON(events_notification->tsn_port_man_cont_dstt);
- if (tsn_port_man_cont_dstt_local_JSON == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [tsn_port_man_cont_dstt]");
- goto end;
- }
- cJSON_AddItemToObject(item, "tsnPortManContDstt", tsn_port_man_cont_dstt_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [tsn_port_man_cont_dstt]");
- goto end;
- }
+ cJSON *tsn_port_man_cont_dstt_local_JSON = OpenAPI_port_management_container_convertToJSON(events_notification->tsn_port_man_cont_dstt);
+ if (tsn_port_man_cont_dstt_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [tsn_port_man_cont_dstt]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "tsnPortManContDstt", tsn_port_man_cont_dstt_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [tsn_port_man_cont_dstt]");
+ goto end;
+ }
}
if (events_notification->tsn_port_man_cont_nwtts) {
- cJSON *tsn_port_man_cont_nwttsList = cJSON_AddArrayToObject(item, "tsnPortManContNwtts");
- if (tsn_port_man_cont_nwttsList == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [tsn_port_man_cont_nwtts]");
- goto end;
- }
+ cJSON *tsn_port_man_cont_nwttsList = cJSON_AddArrayToObject(item, "tsnPortManContNwtts");
+ if (tsn_port_man_cont_nwttsList == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [tsn_port_man_cont_nwtts]");
+ goto end;
+ }
- OpenAPI_lnode_t *tsn_port_man_cont_nwtts_node;
- if (events_notification->tsn_port_man_cont_nwtts) {
- OpenAPI_list_for_each(events_notification->tsn_port_man_cont_nwtts, tsn_port_man_cont_nwtts_node) {
- cJSON *itemLocal = OpenAPI_port_management_container_convertToJSON(tsn_port_man_cont_nwtts_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_events_notification_convertToJSON() failed [tsn_port_man_cont_nwtts]");
- goto end;
- }
- cJSON_AddItemToArray(tsn_port_man_cont_nwttsList, itemLocal);
+ OpenAPI_lnode_t *tsn_port_man_cont_nwtts_node;
+ if (events_notification->tsn_port_man_cont_nwtts) {
+ OpenAPI_list_for_each(events_notification->tsn_port_man_cont_nwtts, tsn_port_man_cont_nwtts_node) {
+ cJSON *itemLocal = OpenAPI_port_management_container_convertToJSON(tsn_port_man_cont_nwtts_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_events_notification_convertToJSON() failed [tsn_port_man_cont_nwtts]");
+ goto end;
}
+ cJSON_AddItemToArray(tsn_port_man_cont_nwttsList, itemLocal);
}
}
+ }
end:
return item;
@@ -407,49 +465,63 @@ OpenAPI_events_notification_t *OpenAPI_events_notification_parseFromJSON(cJSON *
cJSON *access_type = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "accessType");
OpenAPI_access_type_e access_typeVariable;
- if (access_type) {
- if (!cJSON_IsString(access_type)) {
- ogs_error("OpenAPI_events_notification_parseFromJSON() failed [access_type]");
- goto end;
- }
- access_typeVariable = OpenAPI_access_type_FromString(access_type->valuestring);
+ if (access_type) {
+ if (!cJSON_IsString(access_type)) {
+ ogs_error("OpenAPI_events_notification_parseFromJSON() failed [access_type]");
+ goto end;
+ }
+ access_typeVariable = OpenAPI_access_type_FromString(access_type->valuestring);
+ }
+
+ cJSON *add_access_info = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "addAccessInfo");
+
+ OpenAPI_additional_access_info_t *add_access_info_local_nonprim = NULL;
+ if (add_access_info) {
+ add_access_info_local_nonprim = OpenAPI_additional_access_info_parseFromJSON(add_access_info);
+ }
+
+ cJSON *rel_access_info = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "relAccessInfo");
+
+ OpenAPI_additional_access_info_t *rel_access_info_local_nonprim = NULL;
+ if (rel_access_info) {
+ rel_access_info_local_nonprim = OpenAPI_additional_access_info_parseFromJSON(rel_access_info);
}
cJSON *an_charg_addr = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "anChargAddr");
OpenAPI_acc_net_charging_address_t *an_charg_addr_local_nonprim = NULL;
- if (an_charg_addr) {
- an_charg_addr_local_nonprim = OpenAPI_acc_net_charging_address_parseFromJSON(an_charg_addr);
+ if (an_charg_addr) {
+ an_charg_addr_local_nonprim = OpenAPI_acc_net_charging_address_parseFromJSON(an_charg_addr);
}
cJSON *an_charg_ids = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "anChargIds");
OpenAPI_list_t *an_charg_idsList;
- if (an_charg_ids) {
- cJSON *an_charg_ids_local_nonprimitive;
- if (!cJSON_IsArray(an_charg_ids)) {
+ if (an_charg_ids) {
+ cJSON *an_charg_ids_local_nonprimitive;
+ if (!cJSON_IsArray(an_charg_ids)){
+ ogs_error("OpenAPI_events_notification_parseFromJSON() failed [an_charg_ids]");
+ goto end;
+ }
+
+ an_charg_idsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(an_charg_ids_local_nonprimitive, an_charg_ids ) {
+ if (!cJSON_IsObject(an_charg_ids_local_nonprimitive)) {
ogs_error("OpenAPI_events_notification_parseFromJSON() failed [an_charg_ids]");
goto end;
}
+ OpenAPI_access_net_charging_identifier_t *an_charg_idsItem = OpenAPI_access_net_charging_identifier_parseFromJSON(an_charg_ids_local_nonprimitive);
- an_charg_idsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(an_charg_ids_local_nonprimitive, an_charg_ids ) {
- if (!cJSON_IsObject(an_charg_ids_local_nonprimitive)) {
- ogs_error("OpenAPI_events_notification_parseFromJSON() failed [an_charg_ids]");
- goto end;
- }
- OpenAPI_access_net_charging_identifier_t *an_charg_idsItem = OpenAPI_access_net_charging_identifier_parseFromJSON(an_charg_ids_local_nonprimitive);
-
- OpenAPI_list_add(an_charg_idsList, an_charg_idsItem);
- }
+ OpenAPI_list_add(an_charg_idsList, an_charg_idsItem);
+ }
}
cJSON *an_gw_addr = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "anGwAddr");
OpenAPI_an_gw_address_t *an_gw_addr_local_nonprim = NULL;
- if (an_gw_addr) {
- an_gw_addr_local_nonprim = OpenAPI_an_gw_address_parseFromJSON(an_gw_addr);
+ if (an_gw_addr) {
+ an_gw_addr_local_nonprim = OpenAPI_an_gw_address_parseFromJSON(an_gw_addr);
}
cJSON *ev_subs_uri = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "evSubsUri");
@@ -458,7 +530,7 @@ OpenAPI_events_notification_t *OpenAPI_events_notification_parseFromJSON(cJSON *
goto end;
}
-
+
if (!cJSON_IsString(ev_subs_uri)) {
ogs_error("OpenAPI_events_notification_parseFromJSON() failed [ev_subs_uri]");
goto end;
@@ -471,9 +543,9 @@ OpenAPI_events_notification_t *OpenAPI_events_notification_parseFromJSON(cJSON *
}
OpenAPI_list_t *ev_notifsList;
-
+
cJSON *ev_notifs_local_nonprimitive;
- if (!cJSON_IsArray(ev_notifs)) {
+ if (!cJSON_IsArray(ev_notifs)){
ogs_error("OpenAPI_events_notification_parseFromJSON() failed [ev_notifs]");
goto end;
}
@@ -493,214 +565,242 @@ OpenAPI_events_notification_t *OpenAPI_events_notification_parseFromJSON(cJSON *
cJSON *failed_resourc_alloc_reports = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "failedResourcAllocReports");
OpenAPI_list_t *failed_resourc_alloc_reportsList;
- if (failed_resourc_alloc_reports) {
- cJSON *failed_resourc_alloc_reports_local_nonprimitive;
- if (!cJSON_IsArray(failed_resourc_alloc_reports)) {
+ if (failed_resourc_alloc_reports) {
+ cJSON *failed_resourc_alloc_reports_local_nonprimitive;
+ if (!cJSON_IsArray(failed_resourc_alloc_reports)){
+ ogs_error("OpenAPI_events_notification_parseFromJSON() failed [failed_resourc_alloc_reports]");
+ goto end;
+ }
+
+ failed_resourc_alloc_reportsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(failed_resourc_alloc_reports_local_nonprimitive, failed_resourc_alloc_reports ) {
+ if (!cJSON_IsObject(failed_resourc_alloc_reports_local_nonprimitive)) {
ogs_error("OpenAPI_events_notification_parseFromJSON() failed [failed_resourc_alloc_reports]");
goto end;
}
+ OpenAPI_resources_allocation_info_t *failed_resourc_alloc_reportsItem = OpenAPI_resources_allocation_info_parseFromJSON(failed_resourc_alloc_reports_local_nonprimitive);
- failed_resourc_alloc_reportsList = OpenAPI_list_create();
+ OpenAPI_list_add(failed_resourc_alloc_reportsList, failed_resourc_alloc_reportsItem);
+ }
+ }
- cJSON_ArrayForEach(failed_resourc_alloc_reports_local_nonprimitive, failed_resourc_alloc_reports ) {
- if (!cJSON_IsObject(failed_resourc_alloc_reports_local_nonprimitive)) {
- ogs_error("OpenAPI_events_notification_parseFromJSON() failed [failed_resourc_alloc_reports]");
- goto end;
- }
- OpenAPI_resources_allocation_info_t *failed_resourc_alloc_reportsItem = OpenAPI_resources_allocation_info_parseFromJSON(failed_resourc_alloc_reports_local_nonprimitive);
+ cJSON *succ_resourc_alloc_reports = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "succResourcAllocReports");
- OpenAPI_list_add(failed_resourc_alloc_reportsList, failed_resourc_alloc_reportsItem);
+ OpenAPI_list_t *succ_resourc_alloc_reportsList;
+ if (succ_resourc_alloc_reports) {
+ cJSON *succ_resourc_alloc_reports_local_nonprimitive;
+ if (!cJSON_IsArray(succ_resourc_alloc_reports)){
+ ogs_error("OpenAPI_events_notification_parseFromJSON() failed [succ_resourc_alloc_reports]");
+ goto end;
+ }
+
+ succ_resourc_alloc_reportsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(succ_resourc_alloc_reports_local_nonprimitive, succ_resourc_alloc_reports ) {
+ if (!cJSON_IsObject(succ_resourc_alloc_reports_local_nonprimitive)) {
+ ogs_error("OpenAPI_events_notification_parseFromJSON() failed [succ_resourc_alloc_reports]");
+ goto end;
}
+ OpenAPI_resources_allocation_info_t *succ_resourc_alloc_reportsItem = OpenAPI_resources_allocation_info_parseFromJSON(succ_resourc_alloc_reports_local_nonprimitive);
+
+ OpenAPI_list_add(succ_resourc_alloc_reportsList, succ_resourc_alloc_reportsItem);
+ }
}
cJSON *no_net_loc_supp = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "noNetLocSupp");
- if (no_net_loc_supp) {
- if (!cJSON_IsBool(no_net_loc_supp)) {
- ogs_error("OpenAPI_events_notification_parseFromJSON() failed [no_net_loc_supp]");
- goto end;
- }
+ OpenAPI_net_loc_access_support_e no_net_loc_suppVariable;
+ if (no_net_loc_supp) {
+ if (!cJSON_IsString(no_net_loc_supp)) {
+ ogs_error("OpenAPI_events_notification_parseFromJSON() failed [no_net_loc_supp]");
+ goto end;
+ }
+ no_net_loc_suppVariable = OpenAPI_net_loc_access_support_FromString(no_net_loc_supp->valuestring);
}
cJSON *out_of_cred_reports = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "outOfCredReports");
OpenAPI_list_t *out_of_cred_reportsList;
- if (out_of_cred_reports) {
- cJSON *out_of_cred_reports_local_nonprimitive;
- if (!cJSON_IsArray(out_of_cred_reports)) {
+ if (out_of_cred_reports) {
+ cJSON *out_of_cred_reports_local_nonprimitive;
+ if (!cJSON_IsArray(out_of_cred_reports)){
+ ogs_error("OpenAPI_events_notification_parseFromJSON() failed [out_of_cred_reports]");
+ goto end;
+ }
+
+ out_of_cred_reportsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(out_of_cred_reports_local_nonprimitive, out_of_cred_reports ) {
+ if (!cJSON_IsObject(out_of_cred_reports_local_nonprimitive)) {
ogs_error("OpenAPI_events_notification_parseFromJSON() failed [out_of_cred_reports]");
goto end;
}
+ OpenAPI_out_of_credit_information_t *out_of_cred_reportsItem = OpenAPI_out_of_credit_information_parseFromJSON(out_of_cred_reports_local_nonprimitive);
- out_of_cred_reportsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(out_of_cred_reports_local_nonprimitive, out_of_cred_reports ) {
- if (!cJSON_IsObject(out_of_cred_reports_local_nonprimitive)) {
- ogs_error("OpenAPI_events_notification_parseFromJSON() failed [out_of_cred_reports]");
- goto end;
- }
- OpenAPI_out_of_credit_information_t *out_of_cred_reportsItem = OpenAPI_out_of_credit_information_parseFromJSON(out_of_cred_reports_local_nonprimitive);
-
- OpenAPI_list_add(out_of_cred_reportsList, out_of_cred_reportsItem);
- }
+ OpenAPI_list_add(out_of_cred_reportsList, out_of_cred_reportsItem);
+ }
}
cJSON *plmn_id = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "plmnId");
- OpenAPI_plmn_id_t *plmn_id_local_nonprim = NULL;
- if (plmn_id) {
- plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id);
+ OpenAPI_plmn_id_nid_t *plmn_id_local_nonprim = NULL;
+ if (plmn_id) {
+ plmn_id_local_nonprim = OpenAPI_plmn_id_nid_parseFromJSON(plmn_id);
}
cJSON *qnc_reports = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "qncReports");
OpenAPI_list_t *qnc_reportsList;
- if (qnc_reports) {
- cJSON *qnc_reports_local_nonprimitive;
- if (!cJSON_IsArray(qnc_reports)) {
+ if (qnc_reports) {
+ cJSON *qnc_reports_local_nonprimitive;
+ if (!cJSON_IsArray(qnc_reports)){
+ ogs_error("OpenAPI_events_notification_parseFromJSON() failed [qnc_reports]");
+ goto end;
+ }
+
+ qnc_reportsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(qnc_reports_local_nonprimitive, qnc_reports ) {
+ if (!cJSON_IsObject(qnc_reports_local_nonprimitive)) {
ogs_error("OpenAPI_events_notification_parseFromJSON() failed [qnc_reports]");
goto end;
}
+ OpenAPI_qos_notification_control_info_t *qnc_reportsItem = OpenAPI_qos_notification_control_info_parseFromJSON(qnc_reports_local_nonprimitive);
- qnc_reportsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(qnc_reports_local_nonprimitive, qnc_reports ) {
- if (!cJSON_IsObject(qnc_reports_local_nonprimitive)) {
- ogs_error("OpenAPI_events_notification_parseFromJSON() failed [qnc_reports]");
- goto end;
- }
- OpenAPI_qos_notification_control_info_t *qnc_reportsItem = OpenAPI_qos_notification_control_info_parseFromJSON(qnc_reports_local_nonprimitive);
-
- OpenAPI_list_add(qnc_reportsList, qnc_reportsItem);
- }
+ OpenAPI_list_add(qnc_reportsList, qnc_reportsItem);
+ }
}
cJSON *qos_mon_reports = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "qosMonReports");
OpenAPI_list_t *qos_mon_reportsList;
- if (qos_mon_reports) {
- cJSON *qos_mon_reports_local_nonprimitive;
- if (!cJSON_IsArray(qos_mon_reports)) {
+ if (qos_mon_reports) {
+ cJSON *qos_mon_reports_local_nonprimitive;
+ if (!cJSON_IsArray(qos_mon_reports)){
+ ogs_error("OpenAPI_events_notification_parseFromJSON() failed [qos_mon_reports]");
+ goto end;
+ }
+
+ qos_mon_reportsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(qos_mon_reports_local_nonprimitive, qos_mon_reports ) {
+ if (!cJSON_IsObject(qos_mon_reports_local_nonprimitive)) {
ogs_error("OpenAPI_events_notification_parseFromJSON() failed [qos_mon_reports]");
goto end;
}
+ OpenAPI_qos_monitoring_report_t *qos_mon_reportsItem = OpenAPI_qos_monitoring_report_parseFromJSON(qos_mon_reports_local_nonprimitive);
- qos_mon_reportsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(qos_mon_reports_local_nonprimitive, qos_mon_reports ) {
- if (!cJSON_IsObject(qos_mon_reports_local_nonprimitive)) {
- ogs_error("OpenAPI_events_notification_parseFromJSON() failed [qos_mon_reports]");
- goto end;
- }
- OpenAPI_qos_monitoring_report_t *qos_mon_reportsItem = OpenAPI_qos_monitoring_report_parseFromJSON(qos_mon_reports_local_nonprimitive);
-
- OpenAPI_list_add(qos_mon_reportsList, qos_mon_reportsItem);
- }
+ OpenAPI_list_add(qos_mon_reportsList, qos_mon_reportsItem);
+ }
}
cJSON *ran_nas_rel_causes = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "ranNasRelCauses");
OpenAPI_list_t *ran_nas_rel_causesList;
- if (ran_nas_rel_causes) {
- cJSON *ran_nas_rel_causes_local_nonprimitive;
- if (!cJSON_IsArray(ran_nas_rel_causes)) {
+ if (ran_nas_rel_causes) {
+ cJSON *ran_nas_rel_causes_local_nonprimitive;
+ if (!cJSON_IsArray(ran_nas_rel_causes)){
+ ogs_error("OpenAPI_events_notification_parseFromJSON() failed [ran_nas_rel_causes]");
+ goto end;
+ }
+
+ ran_nas_rel_causesList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(ran_nas_rel_causes_local_nonprimitive, ran_nas_rel_causes ) {
+ if (!cJSON_IsObject(ran_nas_rel_causes_local_nonprimitive)) {
ogs_error("OpenAPI_events_notification_parseFromJSON() failed [ran_nas_rel_causes]");
goto end;
}
+ OpenAPI_ran_nas_rel_cause_t *ran_nas_rel_causesItem = OpenAPI_ran_nas_rel_cause_parseFromJSON(ran_nas_rel_causes_local_nonprimitive);
- ran_nas_rel_causesList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(ran_nas_rel_causes_local_nonprimitive, ran_nas_rel_causes ) {
- if (!cJSON_IsObject(ran_nas_rel_causes_local_nonprimitive)) {
- ogs_error("OpenAPI_events_notification_parseFromJSON() failed [ran_nas_rel_causes]");
- goto end;
- }
- OpenAPI_ran_nas_rel_cause_t *ran_nas_rel_causesItem = OpenAPI_ran_nas_rel_cause_parseFromJSON(ran_nas_rel_causes_local_nonprimitive);
-
- OpenAPI_list_add(ran_nas_rel_causesList, ran_nas_rel_causesItem);
- }
+ OpenAPI_list_add(ran_nas_rel_causesList, ran_nas_rel_causesItem);
+ }
}
cJSON *rat_type = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "ratType");
OpenAPI_rat_type_e rat_typeVariable;
- if (rat_type) {
- if (!cJSON_IsString(rat_type)) {
- ogs_error("OpenAPI_events_notification_parseFromJSON() failed [rat_type]");
- goto end;
- }
- rat_typeVariable = OpenAPI_rat_type_FromString(rat_type->valuestring);
+ if (rat_type) {
+ if (!cJSON_IsString(rat_type)) {
+ ogs_error("OpenAPI_events_notification_parseFromJSON() failed [rat_type]");
+ goto end;
+ }
+ rat_typeVariable = OpenAPI_rat_type_FromString(rat_type->valuestring);
}
cJSON *ue_loc = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "ueLoc");
OpenAPI_user_location_t *ue_loc_local_nonprim = NULL;
- if (ue_loc) {
- ue_loc_local_nonprim = OpenAPI_user_location_parseFromJSON(ue_loc);
+ if (ue_loc) {
+ ue_loc_local_nonprim = OpenAPI_user_location_parseFromJSON(ue_loc);
}
cJSON *ue_time_zone = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "ueTimeZone");
- if (ue_time_zone) {
- if (!cJSON_IsString(ue_time_zone)) {
- ogs_error("OpenAPI_events_notification_parseFromJSON() failed [ue_time_zone]");
- goto end;
- }
+ if (ue_time_zone) {
+ if (!cJSON_IsString(ue_time_zone)) {
+ ogs_error("OpenAPI_events_notification_parseFromJSON() failed [ue_time_zone]");
+ goto end;
+ }
}
cJSON *usg_rep = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "usgRep");
OpenAPI_accumulated_usage_t *usg_rep_local_nonprim = NULL;
- if (usg_rep) {
- usg_rep_local_nonprim = OpenAPI_accumulated_usage_parseFromJSON(usg_rep);
+ if (usg_rep) {
+ usg_rep_local_nonprim = OpenAPI_accumulated_usage_parseFromJSON(usg_rep);
}
- cJSON *tsn_bridge_info = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "tsnBridgeInfo");
+ cJSON *tsn_bridge_man_cont = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "tsnBridgeManCont");
- OpenAPI_tsn_bridge_info_t *tsn_bridge_info_local_nonprim = NULL;
- if (tsn_bridge_info) {
- tsn_bridge_info_local_nonprim = OpenAPI_tsn_bridge_info_parseFromJSON(tsn_bridge_info);
+ OpenAPI_bridge_management_container_t *tsn_bridge_man_cont_local_nonprim = NULL;
+ if (tsn_bridge_man_cont) {
+ tsn_bridge_man_cont_local_nonprim = OpenAPI_bridge_management_container_parseFromJSON(tsn_bridge_man_cont);
}
cJSON *tsn_port_man_cont_dstt = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "tsnPortManContDstt");
OpenAPI_port_management_container_t *tsn_port_man_cont_dstt_local_nonprim = NULL;
- if (tsn_port_man_cont_dstt) {
- tsn_port_man_cont_dstt_local_nonprim = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_dstt);
+ if (tsn_port_man_cont_dstt) {
+ tsn_port_man_cont_dstt_local_nonprim = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_dstt);
}
cJSON *tsn_port_man_cont_nwtts = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "tsnPortManContNwtts");
OpenAPI_list_t *tsn_port_man_cont_nwttsList;
- if (tsn_port_man_cont_nwtts) {
- cJSON *tsn_port_man_cont_nwtts_local_nonprimitive;
- if (!cJSON_IsArray(tsn_port_man_cont_nwtts)) {
+ if (tsn_port_man_cont_nwtts) {
+ cJSON *tsn_port_man_cont_nwtts_local_nonprimitive;
+ if (!cJSON_IsArray(tsn_port_man_cont_nwtts)){
+ ogs_error("OpenAPI_events_notification_parseFromJSON() failed [tsn_port_man_cont_nwtts]");
+ goto end;
+ }
+
+ tsn_port_man_cont_nwttsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(tsn_port_man_cont_nwtts_local_nonprimitive, tsn_port_man_cont_nwtts ) {
+ if (!cJSON_IsObject(tsn_port_man_cont_nwtts_local_nonprimitive)) {
ogs_error("OpenAPI_events_notification_parseFromJSON() failed [tsn_port_man_cont_nwtts]");
goto end;
}
+ OpenAPI_port_management_container_t *tsn_port_man_cont_nwttsItem = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_nwtts_local_nonprimitive);
- tsn_port_man_cont_nwttsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(tsn_port_man_cont_nwtts_local_nonprimitive, tsn_port_man_cont_nwtts ) {
- if (!cJSON_IsObject(tsn_port_man_cont_nwtts_local_nonprimitive)) {
- ogs_error("OpenAPI_events_notification_parseFromJSON() failed [tsn_port_man_cont_nwtts]");
- goto end;
- }
- OpenAPI_port_management_container_t *tsn_port_man_cont_nwttsItem = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_nwtts_local_nonprimitive);
-
- OpenAPI_list_add(tsn_port_man_cont_nwttsList, tsn_port_man_cont_nwttsItem);
- }
+ OpenAPI_list_add(tsn_port_man_cont_nwttsList, tsn_port_man_cont_nwttsItem);
+ }
}
events_notification_local_var = OpenAPI_events_notification_create (
access_type ? access_typeVariable : 0,
+ add_access_info ? add_access_info_local_nonprim : NULL,
+ rel_access_info ? rel_access_info_local_nonprim : NULL,
an_charg_addr ? an_charg_addr_local_nonprim : NULL,
an_charg_ids ? an_charg_idsList : NULL,
an_gw_addr ? an_gw_addr_local_nonprim : NULL,
ogs_strdup_or_assert(ev_subs_uri->valuestring),
ev_notifsList,
failed_resourc_alloc_reports ? failed_resourc_alloc_reportsList : NULL,
- no_net_loc_supp ? no_net_loc_supp->valueint : 0,
+ succ_resourc_alloc_reports ? succ_resourc_alloc_reportsList : NULL,
+ no_net_loc_supp ? no_net_loc_suppVariable : 0,
out_of_cred_reports ? out_of_cred_reportsList : NULL,
plmn_id ? plmn_id_local_nonprim : NULL,
qnc_reports ? qnc_reportsList : NULL,
@@ -710,10 +810,10 @@ OpenAPI_events_notification_t *OpenAPI_events_notification_parseFromJSON(cJSON *
ue_loc ? ue_loc_local_nonprim : NULL,
ue_time_zone ? ogs_strdup_or_assert(ue_time_zone->valuestring) : NULL,
usg_rep ? usg_rep_local_nonprim : NULL,
- tsn_bridge_info ? tsn_bridge_info_local_nonprim : NULL,
+ tsn_bridge_man_cont ? tsn_bridge_man_cont_local_nonprim : NULL,
tsn_port_man_cont_dstt ? tsn_port_man_cont_dstt_local_nonprim : NULL,
tsn_port_man_cont_nwtts ? tsn_port_man_cont_nwttsList : NULL
- );
+ );
return events_notification_local_var;
end:
diff --git a/lib/sbi/openapi/model/events_notification.h b/lib/sbi/openapi/model/events_notification.h
index d06353e61..19b1feee9 100644
--- a/lib/sbi/openapi/model/events_notification.h
+++ b/lib/sbi/openapi/model/events_notification.h
@@ -16,17 +16,19 @@
#include "access_net_charging_identifier.h"
#include "access_type.h"
#include "accumulated_usage.h"
+#include "additional_access_info.h"
#include "af_event_notification.h"
#include "an_gw_address.h"
+#include "bridge_management_container.h"
+#include "net_loc_access_support.h"
#include "out_of_credit_information.h"
-#include "plmn_id.h"
+#include "plmn_id_nid.h"
#include "port_management_container.h"
#include "qos_monitoring_report.h"
#include "qos_notification_control_info.h"
#include "ran_nas_rel_cause.h"
#include "rat_type.h"
#include "resources_allocation_info.h"
-#include "tsn_bridge_info.h"
#include "user_location.h"
#ifdef __cplusplus
@@ -36,15 +38,18 @@ extern "C" {
typedef struct OpenAPI_events_notification_s OpenAPI_events_notification_t;
typedef struct OpenAPI_events_notification_s {
OpenAPI_access_type_e access_type;
+ struct OpenAPI_additional_access_info_s *add_access_info;
+ struct OpenAPI_additional_access_info_s *rel_access_info;
struct OpenAPI_acc_net_charging_address_s *an_charg_addr;
OpenAPI_list_t *an_charg_ids;
struct OpenAPI_an_gw_address_s *an_gw_addr;
char *ev_subs_uri;
OpenAPI_list_t *ev_notifs;
OpenAPI_list_t *failed_resourc_alloc_reports;
- int no_net_loc_supp;
+ OpenAPI_list_t *succ_resourc_alloc_reports;
+ OpenAPI_net_loc_access_support_e no_net_loc_supp;
OpenAPI_list_t *out_of_cred_reports;
- struct OpenAPI_plmn_id_s *plmn_id;
+ struct OpenAPI_plmn_id_nid_s *plmn_id;
OpenAPI_list_t *qnc_reports;
OpenAPI_list_t *qos_mon_reports;
OpenAPI_list_t *ran_nas_rel_causes;
@@ -52,22 +57,25 @@ typedef struct OpenAPI_events_notification_s {
struct OpenAPI_user_location_s *ue_loc;
char *ue_time_zone;
struct OpenAPI_accumulated_usage_s *usg_rep;
- struct OpenAPI_tsn_bridge_info_s *tsn_bridge_info;
+ struct OpenAPI_bridge_management_container_s *tsn_bridge_man_cont;
struct OpenAPI_port_management_container_s *tsn_port_man_cont_dstt;
OpenAPI_list_t *tsn_port_man_cont_nwtts;
} OpenAPI_events_notification_t;
OpenAPI_events_notification_t *OpenAPI_events_notification_create(
OpenAPI_access_type_e access_type,
+ OpenAPI_additional_access_info_t *add_access_info,
+ OpenAPI_additional_access_info_t *rel_access_info,
OpenAPI_acc_net_charging_address_t *an_charg_addr,
OpenAPI_list_t *an_charg_ids,
OpenAPI_an_gw_address_t *an_gw_addr,
char *ev_subs_uri,
OpenAPI_list_t *ev_notifs,
OpenAPI_list_t *failed_resourc_alloc_reports,
- int no_net_loc_supp,
+ OpenAPI_list_t *succ_resourc_alloc_reports,
+ OpenAPI_net_loc_access_support_e no_net_loc_supp,
OpenAPI_list_t *out_of_cred_reports,
- OpenAPI_plmn_id_t *plmn_id,
+ OpenAPI_plmn_id_nid_t *plmn_id,
OpenAPI_list_t *qnc_reports,
OpenAPI_list_t *qos_mon_reports,
OpenAPI_list_t *ran_nas_rel_causes,
@@ -75,10 +83,10 @@ OpenAPI_events_notification_t *OpenAPI_events_notification_create(
OpenAPI_user_location_t *ue_loc,
char *ue_time_zone,
OpenAPI_accumulated_usage_t *usg_rep,
- OpenAPI_tsn_bridge_info_t *tsn_bridge_info,
+ OpenAPI_bridge_management_container_t *tsn_bridge_man_cont,
OpenAPI_port_management_container_t *tsn_port_man_cont_dstt,
OpenAPI_list_t *tsn_port_man_cont_nwtts
- );
+);
void OpenAPI_events_notification_free(OpenAPI_events_notification_t *events_notification);
OpenAPI_events_notification_t *OpenAPI_events_notification_parseFromJSON(cJSON *events_notificationJSON);
cJSON *OpenAPI_events_notification_convertToJSON(OpenAPI_events_notification_t *events_notification);
diff --git a/lib/sbi/openapi/model/events_subsc_put_data.c b/lib/sbi/openapi/model/events_subsc_put_data.c
new file mode 100644
index 000000000..70edb87e5
--- /dev/null
+++ b/lib/sbi/openapi/model/events_subsc_put_data.c
@@ -0,0 +1,1077 @@
+
+#include
+#include
+#include
+#include "events_subsc_put_data.h"
+
+OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_create(
+ OpenAPI_list_t *events,
+ char *notif_uri,
+ OpenAPI_list_t *req_qos_mon_params,
+ OpenAPI_qos_monitoring_information_t *qos_mon,
+ OpenAPI_list_t *req_anis,
+ OpenAPI_usage_threshold_t *usg_thres,
+ char *notif_corre_id,
+ OpenAPI_access_type_e access_type,
+ OpenAPI_additional_access_info_t *add_access_info,
+ OpenAPI_additional_access_info_t *rel_access_info,
+ OpenAPI_acc_net_charging_address_t *an_charg_addr,
+ OpenAPI_list_t *an_charg_ids,
+ OpenAPI_an_gw_address_t *an_gw_addr,
+ char *ev_subs_uri,
+ OpenAPI_list_t *ev_notifs,
+ OpenAPI_list_t *failed_resourc_alloc_reports,
+ OpenAPI_list_t *succ_resourc_alloc_reports,
+ OpenAPI_net_loc_access_support_e no_net_loc_supp,
+ OpenAPI_list_t *out_of_cred_reports,
+ OpenAPI_plmn_id_nid_t *plmn_id,
+ OpenAPI_list_t *qnc_reports,
+ OpenAPI_list_t *qos_mon_reports,
+ OpenAPI_list_t *ran_nas_rel_causes,
+ OpenAPI_rat_type_e rat_type,
+ OpenAPI_user_location_t *ue_loc,
+ char *ue_time_zone,
+ OpenAPI_accumulated_usage_t *usg_rep,
+ OpenAPI_bridge_management_container_t *tsn_bridge_man_cont,
+ OpenAPI_port_management_container_t *tsn_port_man_cont_dstt,
+ OpenAPI_list_t *tsn_port_man_cont_nwtts
+)
+{
+ OpenAPI_events_subsc_put_data_t *events_subsc_put_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_events_subsc_put_data_t));
+ if (!events_subsc_put_data_local_var) {
+ return NULL;
+ }
+ events_subsc_put_data_local_var->events = events;
+ events_subsc_put_data_local_var->notif_uri = notif_uri;
+ events_subsc_put_data_local_var->req_qos_mon_params = req_qos_mon_params;
+ events_subsc_put_data_local_var->qos_mon = qos_mon;
+ events_subsc_put_data_local_var->req_anis = req_anis;
+ events_subsc_put_data_local_var->usg_thres = usg_thres;
+ events_subsc_put_data_local_var->notif_corre_id = notif_corre_id;
+ events_subsc_put_data_local_var->access_type = access_type;
+ events_subsc_put_data_local_var->add_access_info = add_access_info;
+ events_subsc_put_data_local_var->rel_access_info = rel_access_info;
+ events_subsc_put_data_local_var->an_charg_addr = an_charg_addr;
+ events_subsc_put_data_local_var->an_charg_ids = an_charg_ids;
+ events_subsc_put_data_local_var->an_gw_addr = an_gw_addr;
+ events_subsc_put_data_local_var->ev_subs_uri = ev_subs_uri;
+ events_subsc_put_data_local_var->ev_notifs = ev_notifs;
+ events_subsc_put_data_local_var->failed_resourc_alloc_reports = failed_resourc_alloc_reports;
+ events_subsc_put_data_local_var->succ_resourc_alloc_reports = succ_resourc_alloc_reports;
+ events_subsc_put_data_local_var->no_net_loc_supp = no_net_loc_supp;
+ events_subsc_put_data_local_var->out_of_cred_reports = out_of_cred_reports;
+ events_subsc_put_data_local_var->plmn_id = plmn_id;
+ events_subsc_put_data_local_var->qnc_reports = qnc_reports;
+ events_subsc_put_data_local_var->qos_mon_reports = qos_mon_reports;
+ events_subsc_put_data_local_var->ran_nas_rel_causes = ran_nas_rel_causes;
+ events_subsc_put_data_local_var->rat_type = rat_type;
+ events_subsc_put_data_local_var->ue_loc = ue_loc;
+ events_subsc_put_data_local_var->ue_time_zone = ue_time_zone;
+ events_subsc_put_data_local_var->usg_rep = usg_rep;
+ events_subsc_put_data_local_var->tsn_bridge_man_cont = tsn_bridge_man_cont;
+ events_subsc_put_data_local_var->tsn_port_man_cont_dstt = tsn_port_man_cont_dstt;
+ events_subsc_put_data_local_var->tsn_port_man_cont_nwtts = tsn_port_man_cont_nwtts;
+
+ return events_subsc_put_data_local_var;
+}
+
+void OpenAPI_events_subsc_put_data_free(OpenAPI_events_subsc_put_data_t *events_subsc_put_data)
+{
+ if (NULL == events_subsc_put_data) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ OpenAPI_list_for_each(events_subsc_put_data->events, node) {
+ OpenAPI_af_event_subscription_free(node->data);
+ }
+ OpenAPI_list_free(events_subsc_put_data->events);
+ ogs_free(events_subsc_put_data->notif_uri);
+ OpenAPI_list_free(events_subsc_put_data->req_qos_mon_params);
+ OpenAPI_qos_monitoring_information_free(events_subsc_put_data->qos_mon);
+ OpenAPI_list_free(events_subsc_put_data->req_anis);
+ OpenAPI_usage_threshold_free(events_subsc_put_data->usg_thres);
+ ogs_free(events_subsc_put_data->notif_corre_id);
+ OpenAPI_additional_access_info_free(events_subsc_put_data->add_access_info);
+ OpenAPI_additional_access_info_free(events_subsc_put_data->rel_access_info);
+ OpenAPI_acc_net_charging_address_free(events_subsc_put_data->an_charg_addr);
+ OpenAPI_list_for_each(events_subsc_put_data->an_charg_ids, node) {
+ OpenAPI_access_net_charging_identifier_free(node->data);
+ }
+ OpenAPI_list_free(events_subsc_put_data->an_charg_ids);
+ OpenAPI_an_gw_address_free(events_subsc_put_data->an_gw_addr);
+ ogs_free(events_subsc_put_data->ev_subs_uri);
+ OpenAPI_list_for_each(events_subsc_put_data->ev_notifs, node) {
+ OpenAPI_af_event_notification_free(node->data);
+ }
+ OpenAPI_list_free(events_subsc_put_data->ev_notifs);
+ OpenAPI_list_for_each(events_subsc_put_data->failed_resourc_alloc_reports, node) {
+ OpenAPI_resources_allocation_info_free(node->data);
+ }
+ OpenAPI_list_free(events_subsc_put_data->failed_resourc_alloc_reports);
+ OpenAPI_list_for_each(events_subsc_put_data->succ_resourc_alloc_reports, node) {
+ OpenAPI_resources_allocation_info_free(node->data);
+ }
+ OpenAPI_list_free(events_subsc_put_data->succ_resourc_alloc_reports);
+ OpenAPI_list_for_each(events_subsc_put_data->out_of_cred_reports, node) {
+ OpenAPI_out_of_credit_information_free(node->data);
+ }
+ OpenAPI_list_free(events_subsc_put_data->out_of_cred_reports);
+ OpenAPI_plmn_id_nid_free(events_subsc_put_data->plmn_id);
+ OpenAPI_list_for_each(events_subsc_put_data->qnc_reports, node) {
+ OpenAPI_qos_notification_control_info_free(node->data);
+ }
+ OpenAPI_list_free(events_subsc_put_data->qnc_reports);
+ OpenAPI_list_for_each(events_subsc_put_data->qos_mon_reports, node) {
+ OpenAPI_qos_monitoring_report_free(node->data);
+ }
+ OpenAPI_list_free(events_subsc_put_data->qos_mon_reports);
+ OpenAPI_list_for_each(events_subsc_put_data->ran_nas_rel_causes, node) {
+ OpenAPI_ran_nas_rel_cause_free(node->data);
+ }
+ OpenAPI_list_free(events_subsc_put_data->ran_nas_rel_causes);
+ OpenAPI_user_location_free(events_subsc_put_data->ue_loc);
+ ogs_free(events_subsc_put_data->ue_time_zone);
+ OpenAPI_accumulated_usage_free(events_subsc_put_data->usg_rep);
+ OpenAPI_bridge_management_container_free(events_subsc_put_data->tsn_bridge_man_cont);
+ OpenAPI_port_management_container_free(events_subsc_put_data->tsn_port_man_cont_dstt);
+ OpenAPI_list_for_each(events_subsc_put_data->tsn_port_man_cont_nwtts, node) {
+ OpenAPI_port_management_container_free(node->data);
+ }
+ OpenAPI_list_free(events_subsc_put_data->tsn_port_man_cont_nwtts);
+ ogs_free(events_subsc_put_data);
+}
+
+cJSON *OpenAPI_events_subsc_put_data_convertToJSON(OpenAPI_events_subsc_put_data_t *events_subsc_put_data)
+{
+ cJSON *item = NULL;
+
+ if (events_subsc_put_data == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [EventsSubscPutData]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ cJSON *eventsList = cJSON_AddArrayToObject(item, "events");
+ if (eventsList == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [events]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *events_node;
+ if (events_subsc_put_data->events) {
+ OpenAPI_list_for_each(events_subsc_put_data->events, events_node) {
+ cJSON *itemLocal = OpenAPI_af_event_subscription_convertToJSON(events_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [events]");
+ goto end;
+ }
+ cJSON_AddItemToArray(eventsList, itemLocal);
+ }
+ }
+
+ if (events_subsc_put_data->notif_uri) {
+ if (cJSON_AddStringToObject(item, "notifUri", events_subsc_put_data->notif_uri) == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [notif_uri]");
+ goto end;
+ }
+ }
+
+ if (events_subsc_put_data->req_qos_mon_params) {
+ cJSON *req_qos_mon_params = cJSON_AddArrayToObject(item, "reqQosMonParams");
+ if (req_qos_mon_params == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [req_qos_mon_params]");
+ goto end;
+ }
+ OpenAPI_lnode_t *req_qos_mon_params_node;
+ OpenAPI_list_for_each(events_subsc_put_data->req_qos_mon_params, req_qos_mon_params_node) {
+ if (cJSON_AddStringToObject(req_qos_mon_params, "", OpenAPI_requested_qos_monitoring_parameter_ToString((intptr_t)req_qos_mon_params_node->data)) == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [req_qos_mon_params]");
+ goto end;
+ }
+ }
+ }
+
+ if (events_subsc_put_data->qos_mon) {
+ cJSON *qos_mon_local_JSON = OpenAPI_qos_monitoring_information_convertToJSON(events_subsc_put_data->qos_mon);
+ if (qos_mon_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [qos_mon]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "qosMon", qos_mon_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [qos_mon]");
+ goto end;
+ }
+ }
+
+ if (events_subsc_put_data->req_anis) {
+ cJSON *req_anis = cJSON_AddArrayToObject(item, "reqAnis");
+ if (req_anis == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [req_anis]");
+ goto end;
+ }
+ OpenAPI_lnode_t *req_anis_node;
+ OpenAPI_list_for_each(events_subsc_put_data->req_anis, req_anis_node) {
+ if (cJSON_AddStringToObject(req_anis, "", OpenAPI_required_access_info_ToString((intptr_t)req_anis_node->data)) == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [req_anis]");
+ goto end;
+ }
+ }
+ }
+
+ if (events_subsc_put_data->usg_thres) {
+ cJSON *usg_thres_local_JSON = OpenAPI_usage_threshold_convertToJSON(events_subsc_put_data->usg_thres);
+ if (usg_thres_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [usg_thres]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "usgThres", usg_thres_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [usg_thres]");
+ goto end;
+ }
+ }
+
+ if (events_subsc_put_data->notif_corre_id) {
+ if (cJSON_AddStringToObject(item, "notifCorreId", events_subsc_put_data->notif_corre_id) == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [notif_corre_id]");
+ goto end;
+ }
+ }
+
+ if (events_subsc_put_data->access_type) {
+ if (cJSON_AddStringToObject(item, "accessType", OpenAPI_access_type_ToString(events_subsc_put_data->access_type)) == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [access_type]");
+ goto end;
+ }
+ }
+
+ if (events_subsc_put_data->add_access_info) {
+ cJSON *add_access_info_local_JSON = OpenAPI_additional_access_info_convertToJSON(events_subsc_put_data->add_access_info);
+ if (add_access_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [add_access_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "addAccessInfo", add_access_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [add_access_info]");
+ goto end;
+ }
+ }
+
+ if (events_subsc_put_data->rel_access_info) {
+ cJSON *rel_access_info_local_JSON = OpenAPI_additional_access_info_convertToJSON(events_subsc_put_data->rel_access_info);
+ if (rel_access_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [rel_access_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "relAccessInfo", rel_access_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [rel_access_info]");
+ goto end;
+ }
+ }
+
+ if (events_subsc_put_data->an_charg_addr) {
+ cJSON *an_charg_addr_local_JSON = OpenAPI_acc_net_charging_address_convertToJSON(events_subsc_put_data->an_charg_addr);
+ if (an_charg_addr_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [an_charg_addr]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "anChargAddr", an_charg_addr_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [an_charg_addr]");
+ goto end;
+ }
+ }
+
+ if (events_subsc_put_data->an_charg_ids) {
+ cJSON *an_charg_idsList = cJSON_AddArrayToObject(item, "anChargIds");
+ if (an_charg_idsList == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [an_charg_ids]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *an_charg_ids_node;
+ if (events_subsc_put_data->an_charg_ids) {
+ OpenAPI_list_for_each(events_subsc_put_data->an_charg_ids, an_charg_ids_node) {
+ cJSON *itemLocal = OpenAPI_access_net_charging_identifier_convertToJSON(an_charg_ids_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [an_charg_ids]");
+ goto end;
+ }
+ cJSON_AddItemToArray(an_charg_idsList, itemLocal);
+ }
+ }
+ }
+
+ if (events_subsc_put_data->an_gw_addr) {
+ cJSON *an_gw_addr_local_JSON = OpenAPI_an_gw_address_convertToJSON(events_subsc_put_data->an_gw_addr);
+ if (an_gw_addr_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [an_gw_addr]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "anGwAddr", an_gw_addr_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [an_gw_addr]");
+ goto end;
+ }
+ }
+
+ if (cJSON_AddStringToObject(item, "evSubsUri", events_subsc_put_data->ev_subs_uri) == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [ev_subs_uri]");
+ goto end;
+ }
+
+ cJSON *ev_notifsList = cJSON_AddArrayToObject(item, "evNotifs");
+ if (ev_notifsList == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [ev_notifs]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *ev_notifs_node;
+ if (events_subsc_put_data->ev_notifs) {
+ OpenAPI_list_for_each(events_subsc_put_data->ev_notifs, ev_notifs_node) {
+ cJSON *itemLocal = OpenAPI_af_event_notification_convertToJSON(ev_notifs_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [ev_notifs]");
+ goto end;
+ }
+ cJSON_AddItemToArray(ev_notifsList, itemLocal);
+ }
+ }
+
+ if (events_subsc_put_data->failed_resourc_alloc_reports) {
+ cJSON *failed_resourc_alloc_reportsList = cJSON_AddArrayToObject(item, "failedResourcAllocReports");
+ if (failed_resourc_alloc_reportsList == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [failed_resourc_alloc_reports]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *failed_resourc_alloc_reports_node;
+ if (events_subsc_put_data->failed_resourc_alloc_reports) {
+ OpenAPI_list_for_each(events_subsc_put_data->failed_resourc_alloc_reports, failed_resourc_alloc_reports_node) {
+ cJSON *itemLocal = OpenAPI_resources_allocation_info_convertToJSON(failed_resourc_alloc_reports_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [failed_resourc_alloc_reports]");
+ goto end;
+ }
+ cJSON_AddItemToArray(failed_resourc_alloc_reportsList, itemLocal);
+ }
+ }
+ }
+
+ if (events_subsc_put_data->succ_resourc_alloc_reports) {
+ cJSON *succ_resourc_alloc_reportsList = cJSON_AddArrayToObject(item, "succResourcAllocReports");
+ if (succ_resourc_alloc_reportsList == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [succ_resourc_alloc_reports]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *succ_resourc_alloc_reports_node;
+ if (events_subsc_put_data->succ_resourc_alloc_reports) {
+ OpenAPI_list_for_each(events_subsc_put_data->succ_resourc_alloc_reports, succ_resourc_alloc_reports_node) {
+ cJSON *itemLocal = OpenAPI_resources_allocation_info_convertToJSON(succ_resourc_alloc_reports_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [succ_resourc_alloc_reports]");
+ goto end;
+ }
+ cJSON_AddItemToArray(succ_resourc_alloc_reportsList, itemLocal);
+ }
+ }
+ }
+
+ if (events_subsc_put_data->no_net_loc_supp) {
+ if (cJSON_AddStringToObject(item, "noNetLocSupp", OpenAPI_net_loc_access_support_ToString(events_subsc_put_data->no_net_loc_supp)) == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [no_net_loc_supp]");
+ goto end;
+ }
+ }
+
+ if (events_subsc_put_data->out_of_cred_reports) {
+ cJSON *out_of_cred_reportsList = cJSON_AddArrayToObject(item, "outOfCredReports");
+ if (out_of_cred_reportsList == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [out_of_cred_reports]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *out_of_cred_reports_node;
+ if (events_subsc_put_data->out_of_cred_reports) {
+ OpenAPI_list_for_each(events_subsc_put_data->out_of_cred_reports, out_of_cred_reports_node) {
+ cJSON *itemLocal = OpenAPI_out_of_credit_information_convertToJSON(out_of_cred_reports_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [out_of_cred_reports]");
+ goto end;
+ }
+ cJSON_AddItemToArray(out_of_cred_reportsList, itemLocal);
+ }
+ }
+ }
+
+ if (events_subsc_put_data->plmn_id) {
+ cJSON *plmn_id_local_JSON = OpenAPI_plmn_id_nid_convertToJSON(events_subsc_put_data->plmn_id);
+ if (plmn_id_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [plmn_id]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "plmnId", plmn_id_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [plmn_id]");
+ goto end;
+ }
+ }
+
+ if (events_subsc_put_data->qnc_reports) {
+ cJSON *qnc_reportsList = cJSON_AddArrayToObject(item, "qncReports");
+ if (qnc_reportsList == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [qnc_reports]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *qnc_reports_node;
+ if (events_subsc_put_data->qnc_reports) {
+ OpenAPI_list_for_each(events_subsc_put_data->qnc_reports, qnc_reports_node) {
+ cJSON *itemLocal = OpenAPI_qos_notification_control_info_convertToJSON(qnc_reports_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [qnc_reports]");
+ goto end;
+ }
+ cJSON_AddItemToArray(qnc_reportsList, itemLocal);
+ }
+ }
+ }
+
+ if (events_subsc_put_data->qos_mon_reports) {
+ cJSON *qos_mon_reportsList = cJSON_AddArrayToObject(item, "qosMonReports");
+ if (qos_mon_reportsList == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [qos_mon_reports]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *qos_mon_reports_node;
+ if (events_subsc_put_data->qos_mon_reports) {
+ OpenAPI_list_for_each(events_subsc_put_data->qos_mon_reports, qos_mon_reports_node) {
+ cJSON *itemLocal = OpenAPI_qos_monitoring_report_convertToJSON(qos_mon_reports_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [qos_mon_reports]");
+ goto end;
+ }
+ cJSON_AddItemToArray(qos_mon_reportsList, itemLocal);
+ }
+ }
+ }
+
+ if (events_subsc_put_data->ran_nas_rel_causes) {
+ cJSON *ran_nas_rel_causesList = cJSON_AddArrayToObject(item, "ranNasRelCauses");
+ if (ran_nas_rel_causesList == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [ran_nas_rel_causes]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *ran_nas_rel_causes_node;
+ if (events_subsc_put_data->ran_nas_rel_causes) {
+ OpenAPI_list_for_each(events_subsc_put_data->ran_nas_rel_causes, ran_nas_rel_causes_node) {
+ cJSON *itemLocal = OpenAPI_ran_nas_rel_cause_convertToJSON(ran_nas_rel_causes_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [ran_nas_rel_causes]");
+ goto end;
+ }
+ cJSON_AddItemToArray(ran_nas_rel_causesList, itemLocal);
+ }
+ }
+ }
+
+ if (events_subsc_put_data->rat_type) {
+ if (cJSON_AddStringToObject(item, "ratType", OpenAPI_rat_type_ToString(events_subsc_put_data->rat_type)) == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [rat_type]");
+ goto end;
+ }
+ }
+
+ if (events_subsc_put_data->ue_loc) {
+ cJSON *ue_loc_local_JSON = OpenAPI_user_location_convertToJSON(events_subsc_put_data->ue_loc);
+ if (ue_loc_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [ue_loc]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "ueLoc", ue_loc_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [ue_loc]");
+ goto end;
+ }
+ }
+
+ if (events_subsc_put_data->ue_time_zone) {
+ if (cJSON_AddStringToObject(item, "ueTimeZone", events_subsc_put_data->ue_time_zone) == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [ue_time_zone]");
+ goto end;
+ }
+ }
+
+ if (events_subsc_put_data->usg_rep) {
+ cJSON *usg_rep_local_JSON = OpenAPI_accumulated_usage_convertToJSON(events_subsc_put_data->usg_rep);
+ if (usg_rep_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [usg_rep]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "usgRep", usg_rep_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [usg_rep]");
+ goto end;
+ }
+ }
+
+ if (events_subsc_put_data->tsn_bridge_man_cont) {
+ cJSON *tsn_bridge_man_cont_local_JSON = OpenAPI_bridge_management_container_convertToJSON(events_subsc_put_data->tsn_bridge_man_cont);
+ if (tsn_bridge_man_cont_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [tsn_bridge_man_cont]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "tsnBridgeManCont", tsn_bridge_man_cont_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [tsn_bridge_man_cont]");
+ goto end;
+ }
+ }
+
+ if (events_subsc_put_data->tsn_port_man_cont_dstt) {
+ cJSON *tsn_port_man_cont_dstt_local_JSON = OpenAPI_port_management_container_convertToJSON(events_subsc_put_data->tsn_port_man_cont_dstt);
+ if (tsn_port_man_cont_dstt_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [tsn_port_man_cont_dstt]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "tsnPortManContDstt", tsn_port_man_cont_dstt_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [tsn_port_man_cont_dstt]");
+ goto end;
+ }
+ }
+
+ if (events_subsc_put_data->tsn_port_man_cont_nwtts) {
+ cJSON *tsn_port_man_cont_nwttsList = cJSON_AddArrayToObject(item, "tsnPortManContNwtts");
+ if (tsn_port_man_cont_nwttsList == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [tsn_port_man_cont_nwtts]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *tsn_port_man_cont_nwtts_node;
+ if (events_subsc_put_data->tsn_port_man_cont_nwtts) {
+ OpenAPI_list_for_each(events_subsc_put_data->tsn_port_man_cont_nwtts, tsn_port_man_cont_nwtts_node) {
+ cJSON *itemLocal = OpenAPI_port_management_container_convertToJSON(tsn_port_man_cont_nwtts_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed [tsn_port_man_cont_nwtts]");
+ goto end;
+ }
+ cJSON_AddItemToArray(tsn_port_man_cont_nwttsList, itemLocal);
+ }
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_parseFromJSON(cJSON *events_subsc_put_dataJSON)
+{
+ OpenAPI_events_subsc_put_data_t *events_subsc_put_data_local_var = NULL;
+ cJSON *events = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "events");
+ if (!events) {
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [events]");
+ goto end;
+ }
+
+ OpenAPI_list_t *eventsList;
+
+ cJSON *events_local_nonprimitive;
+ if (!cJSON_IsArray(events)){
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [events]");
+ goto end;
+ }
+
+ eventsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(events_local_nonprimitive, events ) {
+ if (!cJSON_IsObject(events_local_nonprimitive)) {
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [events]");
+ goto end;
+ }
+ OpenAPI_af_event_subscription_t *eventsItem = OpenAPI_af_event_subscription_parseFromJSON(events_local_nonprimitive);
+
+ OpenAPI_list_add(eventsList, eventsItem);
+ }
+
+ cJSON *notif_uri = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "notifUri");
+
+ if (notif_uri) {
+ if (!cJSON_IsString(notif_uri)) {
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [notif_uri]");
+ goto end;
+ }
+ }
+
+ cJSON *req_qos_mon_params = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "reqQosMonParams");
+
+ OpenAPI_list_t *req_qos_mon_paramsList;
+ if (req_qos_mon_params) {
+ cJSON *req_qos_mon_params_local_nonprimitive;
+ if (!cJSON_IsArray(req_qos_mon_params)) {
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [req_qos_mon_params]");
+ goto end;
+ }
+
+ req_qos_mon_paramsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(req_qos_mon_params_local_nonprimitive, req_qos_mon_params ) {
+ if (!cJSON_IsString(req_qos_mon_params_local_nonprimitive)){
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [req_qos_mon_params]");
+ goto end;
+ }
+
+ OpenAPI_list_add(req_qos_mon_paramsList, (void *)OpenAPI_requested_qos_monitoring_parameter_FromString(req_qos_mon_params_local_nonprimitive->valuestring));
+ }
+ }
+
+ cJSON *qos_mon = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "qosMon");
+
+ OpenAPI_qos_monitoring_information_t *qos_mon_local_nonprim = NULL;
+ if (qos_mon) {
+ qos_mon_local_nonprim = OpenAPI_qos_monitoring_information_parseFromJSON(qos_mon);
+ }
+
+ cJSON *req_anis = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "reqAnis");
+
+ OpenAPI_list_t *req_anisList;
+ if (req_anis) {
+ cJSON *req_anis_local_nonprimitive;
+ if (!cJSON_IsArray(req_anis)) {
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [req_anis]");
+ goto end;
+ }
+
+ req_anisList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(req_anis_local_nonprimitive, req_anis ) {
+ if (!cJSON_IsString(req_anis_local_nonprimitive)){
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [req_anis]");
+ goto end;
+ }
+
+ OpenAPI_list_add(req_anisList, (void *)OpenAPI_required_access_info_FromString(req_anis_local_nonprimitive->valuestring));
+ }
+ }
+
+ cJSON *usg_thres = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "usgThres");
+
+ OpenAPI_usage_threshold_t *usg_thres_local_nonprim = NULL;
+ if (usg_thres) {
+ usg_thres_local_nonprim = OpenAPI_usage_threshold_parseFromJSON(usg_thres);
+ }
+
+ cJSON *notif_corre_id = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "notifCorreId");
+
+ if (notif_corre_id) {
+ if (!cJSON_IsString(notif_corre_id)) {
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [notif_corre_id]");
+ goto end;
+ }
+ }
+
+ cJSON *access_type = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "accessType");
+
+ OpenAPI_access_type_e access_typeVariable;
+ if (access_type) {
+ if (!cJSON_IsString(access_type)) {
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [access_type]");
+ goto end;
+ }
+ access_typeVariable = OpenAPI_access_type_FromString(access_type->valuestring);
+ }
+
+ cJSON *add_access_info = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "addAccessInfo");
+
+ OpenAPI_additional_access_info_t *add_access_info_local_nonprim = NULL;
+ if (add_access_info) {
+ add_access_info_local_nonprim = OpenAPI_additional_access_info_parseFromJSON(add_access_info);
+ }
+
+ cJSON *rel_access_info = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "relAccessInfo");
+
+ OpenAPI_additional_access_info_t *rel_access_info_local_nonprim = NULL;
+ if (rel_access_info) {
+ rel_access_info_local_nonprim = OpenAPI_additional_access_info_parseFromJSON(rel_access_info);
+ }
+
+ cJSON *an_charg_addr = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "anChargAddr");
+
+ OpenAPI_acc_net_charging_address_t *an_charg_addr_local_nonprim = NULL;
+ if (an_charg_addr) {
+ an_charg_addr_local_nonprim = OpenAPI_acc_net_charging_address_parseFromJSON(an_charg_addr);
+ }
+
+ cJSON *an_charg_ids = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "anChargIds");
+
+ OpenAPI_list_t *an_charg_idsList;
+ if (an_charg_ids) {
+ cJSON *an_charg_ids_local_nonprimitive;
+ if (!cJSON_IsArray(an_charg_ids)){
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [an_charg_ids]");
+ goto end;
+ }
+
+ an_charg_idsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(an_charg_ids_local_nonprimitive, an_charg_ids ) {
+ if (!cJSON_IsObject(an_charg_ids_local_nonprimitive)) {
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [an_charg_ids]");
+ goto end;
+ }
+ OpenAPI_access_net_charging_identifier_t *an_charg_idsItem = OpenAPI_access_net_charging_identifier_parseFromJSON(an_charg_ids_local_nonprimitive);
+
+ OpenAPI_list_add(an_charg_idsList, an_charg_idsItem);
+ }
+ }
+
+ cJSON *an_gw_addr = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "anGwAddr");
+
+ OpenAPI_an_gw_address_t *an_gw_addr_local_nonprim = NULL;
+ if (an_gw_addr) {
+ an_gw_addr_local_nonprim = OpenAPI_an_gw_address_parseFromJSON(an_gw_addr);
+ }
+
+ cJSON *ev_subs_uri = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "evSubsUri");
+ if (!ev_subs_uri) {
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [ev_subs_uri]");
+ goto end;
+ }
+
+
+ if (!cJSON_IsString(ev_subs_uri)) {
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [ev_subs_uri]");
+ goto end;
+ }
+
+ cJSON *ev_notifs = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "evNotifs");
+ if (!ev_notifs) {
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [ev_notifs]");
+ goto end;
+ }
+
+ OpenAPI_list_t *ev_notifsList;
+
+ cJSON *ev_notifs_local_nonprimitive;
+ if (!cJSON_IsArray(ev_notifs)){
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [ev_notifs]");
+ goto end;
+ }
+
+ ev_notifsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(ev_notifs_local_nonprimitive, ev_notifs ) {
+ if (!cJSON_IsObject(ev_notifs_local_nonprimitive)) {
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [ev_notifs]");
+ goto end;
+ }
+ OpenAPI_af_event_notification_t *ev_notifsItem = OpenAPI_af_event_notification_parseFromJSON(ev_notifs_local_nonprimitive);
+
+ OpenAPI_list_add(ev_notifsList, ev_notifsItem);
+ }
+
+ cJSON *failed_resourc_alloc_reports = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "failedResourcAllocReports");
+
+ OpenAPI_list_t *failed_resourc_alloc_reportsList;
+ if (failed_resourc_alloc_reports) {
+ cJSON *failed_resourc_alloc_reports_local_nonprimitive;
+ if (!cJSON_IsArray(failed_resourc_alloc_reports)){
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [failed_resourc_alloc_reports]");
+ goto end;
+ }
+
+ failed_resourc_alloc_reportsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(failed_resourc_alloc_reports_local_nonprimitive, failed_resourc_alloc_reports ) {
+ if (!cJSON_IsObject(failed_resourc_alloc_reports_local_nonprimitive)) {
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [failed_resourc_alloc_reports]");
+ goto end;
+ }
+ OpenAPI_resources_allocation_info_t *failed_resourc_alloc_reportsItem = OpenAPI_resources_allocation_info_parseFromJSON(failed_resourc_alloc_reports_local_nonprimitive);
+
+ OpenAPI_list_add(failed_resourc_alloc_reportsList, failed_resourc_alloc_reportsItem);
+ }
+ }
+
+ cJSON *succ_resourc_alloc_reports = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "succResourcAllocReports");
+
+ OpenAPI_list_t *succ_resourc_alloc_reportsList;
+ if (succ_resourc_alloc_reports) {
+ cJSON *succ_resourc_alloc_reports_local_nonprimitive;
+ if (!cJSON_IsArray(succ_resourc_alloc_reports)){
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [succ_resourc_alloc_reports]");
+ goto end;
+ }
+
+ succ_resourc_alloc_reportsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(succ_resourc_alloc_reports_local_nonprimitive, succ_resourc_alloc_reports ) {
+ if (!cJSON_IsObject(succ_resourc_alloc_reports_local_nonprimitive)) {
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [succ_resourc_alloc_reports]");
+ goto end;
+ }
+ OpenAPI_resources_allocation_info_t *succ_resourc_alloc_reportsItem = OpenAPI_resources_allocation_info_parseFromJSON(succ_resourc_alloc_reports_local_nonprimitive);
+
+ OpenAPI_list_add(succ_resourc_alloc_reportsList, succ_resourc_alloc_reportsItem);
+ }
+ }
+
+ cJSON *no_net_loc_supp = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "noNetLocSupp");
+
+ OpenAPI_net_loc_access_support_e no_net_loc_suppVariable;
+ if (no_net_loc_supp) {
+ if (!cJSON_IsString(no_net_loc_supp)) {
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [no_net_loc_supp]");
+ goto end;
+ }
+ no_net_loc_suppVariable = OpenAPI_net_loc_access_support_FromString(no_net_loc_supp->valuestring);
+ }
+
+ cJSON *out_of_cred_reports = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "outOfCredReports");
+
+ OpenAPI_list_t *out_of_cred_reportsList;
+ if (out_of_cred_reports) {
+ cJSON *out_of_cred_reports_local_nonprimitive;
+ if (!cJSON_IsArray(out_of_cred_reports)){
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [out_of_cred_reports]");
+ goto end;
+ }
+
+ out_of_cred_reportsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(out_of_cred_reports_local_nonprimitive, out_of_cred_reports ) {
+ if (!cJSON_IsObject(out_of_cred_reports_local_nonprimitive)) {
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [out_of_cred_reports]");
+ goto end;
+ }
+ OpenAPI_out_of_credit_information_t *out_of_cred_reportsItem = OpenAPI_out_of_credit_information_parseFromJSON(out_of_cred_reports_local_nonprimitive);
+
+ OpenAPI_list_add(out_of_cred_reportsList, out_of_cred_reportsItem);
+ }
+ }
+
+ cJSON *plmn_id = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "plmnId");
+
+ OpenAPI_plmn_id_nid_t *plmn_id_local_nonprim = NULL;
+ if (plmn_id) {
+ plmn_id_local_nonprim = OpenAPI_plmn_id_nid_parseFromJSON(plmn_id);
+ }
+
+ cJSON *qnc_reports = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "qncReports");
+
+ OpenAPI_list_t *qnc_reportsList;
+ if (qnc_reports) {
+ cJSON *qnc_reports_local_nonprimitive;
+ if (!cJSON_IsArray(qnc_reports)){
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [qnc_reports]");
+ goto end;
+ }
+
+ qnc_reportsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(qnc_reports_local_nonprimitive, qnc_reports ) {
+ if (!cJSON_IsObject(qnc_reports_local_nonprimitive)) {
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [qnc_reports]");
+ goto end;
+ }
+ OpenAPI_qos_notification_control_info_t *qnc_reportsItem = OpenAPI_qos_notification_control_info_parseFromJSON(qnc_reports_local_nonprimitive);
+
+ OpenAPI_list_add(qnc_reportsList, qnc_reportsItem);
+ }
+ }
+
+ cJSON *qos_mon_reports = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "qosMonReports");
+
+ OpenAPI_list_t *qos_mon_reportsList;
+ if (qos_mon_reports) {
+ cJSON *qos_mon_reports_local_nonprimitive;
+ if (!cJSON_IsArray(qos_mon_reports)){
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [qos_mon_reports]");
+ goto end;
+ }
+
+ qos_mon_reportsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(qos_mon_reports_local_nonprimitive, qos_mon_reports ) {
+ if (!cJSON_IsObject(qos_mon_reports_local_nonprimitive)) {
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [qos_mon_reports]");
+ goto end;
+ }
+ OpenAPI_qos_monitoring_report_t *qos_mon_reportsItem = OpenAPI_qos_monitoring_report_parseFromJSON(qos_mon_reports_local_nonprimitive);
+
+ OpenAPI_list_add(qos_mon_reportsList, qos_mon_reportsItem);
+ }
+ }
+
+ cJSON *ran_nas_rel_causes = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "ranNasRelCauses");
+
+ OpenAPI_list_t *ran_nas_rel_causesList;
+ if (ran_nas_rel_causes) {
+ cJSON *ran_nas_rel_causes_local_nonprimitive;
+ if (!cJSON_IsArray(ran_nas_rel_causes)){
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [ran_nas_rel_causes]");
+ goto end;
+ }
+
+ ran_nas_rel_causesList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(ran_nas_rel_causes_local_nonprimitive, ran_nas_rel_causes ) {
+ if (!cJSON_IsObject(ran_nas_rel_causes_local_nonprimitive)) {
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [ran_nas_rel_causes]");
+ goto end;
+ }
+ OpenAPI_ran_nas_rel_cause_t *ran_nas_rel_causesItem = OpenAPI_ran_nas_rel_cause_parseFromJSON(ran_nas_rel_causes_local_nonprimitive);
+
+ OpenAPI_list_add(ran_nas_rel_causesList, ran_nas_rel_causesItem);
+ }
+ }
+
+ cJSON *rat_type = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "ratType");
+
+ OpenAPI_rat_type_e rat_typeVariable;
+ if (rat_type) {
+ if (!cJSON_IsString(rat_type)) {
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [rat_type]");
+ goto end;
+ }
+ rat_typeVariable = OpenAPI_rat_type_FromString(rat_type->valuestring);
+ }
+
+ cJSON *ue_loc = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "ueLoc");
+
+ OpenAPI_user_location_t *ue_loc_local_nonprim = NULL;
+ if (ue_loc) {
+ ue_loc_local_nonprim = OpenAPI_user_location_parseFromJSON(ue_loc);
+ }
+
+ cJSON *ue_time_zone = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "ueTimeZone");
+
+ if (ue_time_zone) {
+ if (!cJSON_IsString(ue_time_zone)) {
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [ue_time_zone]");
+ goto end;
+ }
+ }
+
+ cJSON *usg_rep = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "usgRep");
+
+ OpenAPI_accumulated_usage_t *usg_rep_local_nonprim = NULL;
+ if (usg_rep) {
+ usg_rep_local_nonprim = OpenAPI_accumulated_usage_parseFromJSON(usg_rep);
+ }
+
+ cJSON *tsn_bridge_man_cont = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "tsnBridgeManCont");
+
+ OpenAPI_bridge_management_container_t *tsn_bridge_man_cont_local_nonprim = NULL;
+ if (tsn_bridge_man_cont) {
+ tsn_bridge_man_cont_local_nonprim = OpenAPI_bridge_management_container_parseFromJSON(tsn_bridge_man_cont);
+ }
+
+ cJSON *tsn_port_man_cont_dstt = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "tsnPortManContDstt");
+
+ OpenAPI_port_management_container_t *tsn_port_man_cont_dstt_local_nonprim = NULL;
+ if (tsn_port_man_cont_dstt) {
+ tsn_port_man_cont_dstt_local_nonprim = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_dstt);
+ }
+
+ cJSON *tsn_port_man_cont_nwtts = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "tsnPortManContNwtts");
+
+ OpenAPI_list_t *tsn_port_man_cont_nwttsList;
+ if (tsn_port_man_cont_nwtts) {
+ cJSON *tsn_port_man_cont_nwtts_local_nonprimitive;
+ if (!cJSON_IsArray(tsn_port_man_cont_nwtts)){
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [tsn_port_man_cont_nwtts]");
+ goto end;
+ }
+
+ tsn_port_man_cont_nwttsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(tsn_port_man_cont_nwtts_local_nonprimitive, tsn_port_man_cont_nwtts ) {
+ if (!cJSON_IsObject(tsn_port_man_cont_nwtts_local_nonprimitive)) {
+ ogs_error("OpenAPI_events_subsc_put_data_parseFromJSON() failed [tsn_port_man_cont_nwtts]");
+ goto end;
+ }
+ OpenAPI_port_management_container_t *tsn_port_man_cont_nwttsItem = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_nwtts_local_nonprimitive);
+
+ OpenAPI_list_add(tsn_port_man_cont_nwttsList, tsn_port_man_cont_nwttsItem);
+ }
+ }
+
+ events_subsc_put_data_local_var = OpenAPI_events_subsc_put_data_create (
+ eventsList,
+ notif_uri ? ogs_strdup_or_assert(notif_uri->valuestring) : NULL,
+ req_qos_mon_params ? req_qos_mon_paramsList : NULL,
+ qos_mon ? qos_mon_local_nonprim : NULL,
+ req_anis ? req_anisList : NULL,
+ usg_thres ? usg_thres_local_nonprim : NULL,
+ notif_corre_id ? ogs_strdup_or_assert(notif_corre_id->valuestring) : NULL,
+ access_type ? access_typeVariable : 0,
+ add_access_info ? add_access_info_local_nonprim : NULL,
+ rel_access_info ? rel_access_info_local_nonprim : NULL,
+ an_charg_addr ? an_charg_addr_local_nonprim : NULL,
+ an_charg_ids ? an_charg_idsList : NULL,
+ an_gw_addr ? an_gw_addr_local_nonprim : NULL,
+ ogs_strdup_or_assert(ev_subs_uri->valuestring),
+ ev_notifsList,
+ failed_resourc_alloc_reports ? failed_resourc_alloc_reportsList : NULL,
+ succ_resourc_alloc_reports ? succ_resourc_alloc_reportsList : NULL,
+ no_net_loc_supp ? no_net_loc_suppVariable : 0,
+ out_of_cred_reports ? out_of_cred_reportsList : NULL,
+ plmn_id ? plmn_id_local_nonprim : NULL,
+ qnc_reports ? qnc_reportsList : NULL,
+ qos_mon_reports ? qos_mon_reportsList : NULL,
+ ran_nas_rel_causes ? ran_nas_rel_causesList : NULL,
+ rat_type ? rat_typeVariable : 0,
+ ue_loc ? ue_loc_local_nonprim : NULL,
+ ue_time_zone ? ogs_strdup_or_assert(ue_time_zone->valuestring) : NULL,
+ usg_rep ? usg_rep_local_nonprim : NULL,
+ tsn_bridge_man_cont ? tsn_bridge_man_cont_local_nonprim : NULL,
+ tsn_port_man_cont_dstt ? tsn_port_man_cont_dstt_local_nonprim : NULL,
+ tsn_port_man_cont_nwtts ? tsn_port_man_cont_nwttsList : NULL
+ );
+
+ return events_subsc_put_data_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_copy(OpenAPI_events_subsc_put_data_t *dst, OpenAPI_events_subsc_put_data_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_events_subsc_put_data_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_events_subsc_put_data_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_events_subsc_put_data_free(dst);
+ dst = OpenAPI_events_subsc_put_data_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/events_subsc_put_data.h b/lib/sbi/openapi/model/events_subsc_put_data.h
new file mode 100644
index 000000000..90cf6e00b
--- /dev/null
+++ b/lib/sbi/openapi/model/events_subsc_put_data.h
@@ -0,0 +1,121 @@
+/*
+ * events_subsc_put_data.h
+ *
+ * Identifies the events the application subscribes to within an Events Subscription sub-resource data. It may contain the notification of the already met events
+ */
+
+#ifndef _OpenAPI_events_subsc_put_data_H_
+#define _OpenAPI_events_subsc_put_data_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+#include "acc_net_charging_address.h"
+#include "access_net_charging_identifier.h"
+#include "access_type.h"
+#include "accumulated_usage.h"
+#include "additional_access_info.h"
+#include "af_event_notification.h"
+#include "af_event_subscription.h"
+#include "an_gw_address.h"
+#include "bridge_management_container.h"
+#include "events_notification.h"
+#include "events_subsc_req_data.h"
+#include "net_loc_access_support.h"
+#include "out_of_credit_information.h"
+#include "plmn_id_nid.h"
+#include "port_management_container.h"
+#include "qos_monitoring_information.h"
+#include "qos_monitoring_report.h"
+#include "qos_notification_control_info.h"
+#include "ran_nas_rel_cause.h"
+#include "rat_type.h"
+#include "requested_qos_monitoring_parameter.h"
+#include "required_access_info.h"
+#include "resources_allocation_info.h"
+#include "usage_threshold.h"
+#include "user_location.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_events_subsc_put_data_s OpenAPI_events_subsc_put_data_t;
+typedef struct OpenAPI_events_subsc_put_data_s {
+ OpenAPI_list_t *events;
+ char *notif_uri;
+ OpenAPI_list_t *req_qos_mon_params;
+ struct OpenAPI_qos_monitoring_information_s *qos_mon;
+ OpenAPI_list_t *req_anis;
+ struct OpenAPI_usage_threshold_s *usg_thres;
+ char *notif_corre_id;
+ OpenAPI_access_type_e access_type;
+ struct OpenAPI_additional_access_info_s *add_access_info;
+ struct OpenAPI_additional_access_info_s *rel_access_info;
+ struct OpenAPI_acc_net_charging_address_s *an_charg_addr;
+ OpenAPI_list_t *an_charg_ids;
+ struct OpenAPI_an_gw_address_s *an_gw_addr;
+ char *ev_subs_uri;
+ OpenAPI_list_t *ev_notifs;
+ OpenAPI_list_t *failed_resourc_alloc_reports;
+ OpenAPI_list_t *succ_resourc_alloc_reports;
+ OpenAPI_net_loc_access_support_e no_net_loc_supp;
+ OpenAPI_list_t *out_of_cred_reports;
+ struct OpenAPI_plmn_id_nid_s *plmn_id;
+ OpenAPI_list_t *qnc_reports;
+ OpenAPI_list_t *qos_mon_reports;
+ OpenAPI_list_t *ran_nas_rel_causes;
+ OpenAPI_rat_type_e rat_type;
+ struct OpenAPI_user_location_s *ue_loc;
+ char *ue_time_zone;
+ struct OpenAPI_accumulated_usage_s *usg_rep;
+ struct OpenAPI_bridge_management_container_s *tsn_bridge_man_cont;
+ struct OpenAPI_port_management_container_s *tsn_port_man_cont_dstt;
+ OpenAPI_list_t *tsn_port_man_cont_nwtts;
+} OpenAPI_events_subsc_put_data_t;
+
+OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_create(
+ OpenAPI_list_t *events,
+ char *notif_uri,
+ OpenAPI_list_t *req_qos_mon_params,
+ OpenAPI_qos_monitoring_information_t *qos_mon,
+ OpenAPI_list_t *req_anis,
+ OpenAPI_usage_threshold_t *usg_thres,
+ char *notif_corre_id,
+ OpenAPI_access_type_e access_type,
+ OpenAPI_additional_access_info_t *add_access_info,
+ OpenAPI_additional_access_info_t *rel_access_info,
+ OpenAPI_acc_net_charging_address_t *an_charg_addr,
+ OpenAPI_list_t *an_charg_ids,
+ OpenAPI_an_gw_address_t *an_gw_addr,
+ char *ev_subs_uri,
+ OpenAPI_list_t *ev_notifs,
+ OpenAPI_list_t *failed_resourc_alloc_reports,
+ OpenAPI_list_t *succ_resourc_alloc_reports,
+ OpenAPI_net_loc_access_support_e no_net_loc_supp,
+ OpenAPI_list_t *out_of_cred_reports,
+ OpenAPI_plmn_id_nid_t *plmn_id,
+ OpenAPI_list_t *qnc_reports,
+ OpenAPI_list_t *qos_mon_reports,
+ OpenAPI_list_t *ran_nas_rel_causes,
+ OpenAPI_rat_type_e rat_type,
+ OpenAPI_user_location_t *ue_loc,
+ char *ue_time_zone,
+ OpenAPI_accumulated_usage_t *usg_rep,
+ OpenAPI_bridge_management_container_t *tsn_bridge_man_cont,
+ OpenAPI_port_management_container_t *tsn_port_man_cont_dstt,
+ OpenAPI_list_t *tsn_port_man_cont_nwtts
+);
+void OpenAPI_events_subsc_put_data_free(OpenAPI_events_subsc_put_data_t *events_subsc_put_data);
+OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_parseFromJSON(cJSON *events_subsc_put_dataJSON);
+cJSON *OpenAPI_events_subsc_put_data_convertToJSON(OpenAPI_events_subsc_put_data_t *events_subsc_put_data);
+OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_copy(OpenAPI_events_subsc_put_data_t *dst, OpenAPI_events_subsc_put_data_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_events_subsc_put_data_H_ */
+
diff --git a/lib/sbi/openapi/model/events_subsc_req_data.c b/lib/sbi/openapi/model/events_subsc_req_data.c
index 3309d0108..3a84a80b5 100644
--- a/lib/sbi/openapi/model/events_subsc_req_data.c
+++ b/lib/sbi/openapi/model/events_subsc_req_data.c
@@ -9,10 +9,10 @@ OpenAPI_events_subsc_req_data_t *OpenAPI_events_subsc_req_data_create(
char *notif_uri,
OpenAPI_list_t *req_qos_mon_params,
OpenAPI_qos_monitoring_information_t *qos_mon,
- OpenAPI_required_access_info_e req_ani,
+ OpenAPI_list_t *req_anis,
OpenAPI_usage_threshold_t *usg_thres,
char *notif_corre_id
- )
+)
{
OpenAPI_events_subsc_req_data_t *events_subsc_req_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_events_subsc_req_data_t));
if (!events_subsc_req_data_local_var) {
@@ -22,7 +22,7 @@ OpenAPI_events_subsc_req_data_t *OpenAPI_events_subsc_req_data_create(
events_subsc_req_data_local_var->notif_uri = notif_uri;
events_subsc_req_data_local_var->req_qos_mon_params = req_qos_mon_params;
events_subsc_req_data_local_var->qos_mon = qos_mon;
- events_subsc_req_data_local_var->req_ani = req_ani;
+ events_subsc_req_data_local_var->req_anis = req_anis;
events_subsc_req_data_local_var->usg_thres = usg_thres;
events_subsc_req_data_local_var->notif_corre_id = notif_corre_id;
@@ -42,6 +42,7 @@ void OpenAPI_events_subsc_req_data_free(OpenAPI_events_subsc_req_data_t *events_
ogs_free(events_subsc_req_data->notif_uri);
OpenAPI_list_free(events_subsc_req_data->req_qos_mon_params);
OpenAPI_qos_monitoring_information_free(events_subsc_req_data->qos_mon);
+ OpenAPI_list_free(events_subsc_req_data->req_anis);
OpenAPI_usage_threshold_free(events_subsc_req_data->usg_thres);
ogs_free(events_subsc_req_data->notif_corre_id);
ogs_free(events_subsc_req_data);
@@ -76,65 +77,73 @@ cJSON *OpenAPI_events_subsc_req_data_convertToJSON(OpenAPI_events_subsc_req_data
}
if (events_subsc_req_data->notif_uri) {
- if (cJSON_AddStringToObject(item, "notifUri", events_subsc_req_data->notif_uri) == NULL) {
- ogs_error("OpenAPI_events_subsc_req_data_convertToJSON() failed [notif_uri]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "notifUri", events_subsc_req_data->notif_uri) == NULL) {
+ ogs_error("OpenAPI_events_subsc_req_data_convertToJSON() failed [notif_uri]");
+ goto end;
+ }
}
if (events_subsc_req_data->req_qos_mon_params) {
- cJSON *req_qos_mon_params = cJSON_AddArrayToObject(item, "reqQosMonParams");
- if (req_qos_mon_params == NULL) {
+ cJSON *req_qos_mon_params = cJSON_AddArrayToObject(item, "reqQosMonParams");
+ if (req_qos_mon_params == NULL) {
+ ogs_error("OpenAPI_events_subsc_req_data_convertToJSON() failed [req_qos_mon_params]");
+ goto end;
+ }
+ OpenAPI_lnode_t *req_qos_mon_params_node;
+ OpenAPI_list_for_each(events_subsc_req_data->req_qos_mon_params, req_qos_mon_params_node) {
+ if (cJSON_AddStringToObject(req_qos_mon_params, "", OpenAPI_requested_qos_monitoring_parameter_ToString((intptr_t)req_qos_mon_params_node->data)) == NULL) {
ogs_error("OpenAPI_events_subsc_req_data_convertToJSON() failed [req_qos_mon_params]");
goto end;
}
- OpenAPI_lnode_t *req_qos_mon_params_node;
- OpenAPI_list_for_each(events_subsc_req_data->req_qos_mon_params, req_qos_mon_params_node) {
- if (cJSON_AddStringToObject(req_qos_mon_params, "", OpenAPI_requested_qos_monitoring_parameter_ToString((intptr_t)req_qos_mon_params_node->data)) == NULL) {
- ogs_error("OpenAPI_events_subsc_req_data_convertToJSON() failed [req_qos_mon_params]");
- goto end;
- }
- }
+ }
}
if (events_subsc_req_data->qos_mon) {
- cJSON *qos_mon_local_JSON = OpenAPI_qos_monitoring_information_convertToJSON(events_subsc_req_data->qos_mon);
- if (qos_mon_local_JSON == NULL) {
- ogs_error("OpenAPI_events_subsc_req_data_convertToJSON() failed [qos_mon]");
- goto end;
- }
- cJSON_AddItemToObject(item, "qosMon", qos_mon_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_events_subsc_req_data_convertToJSON() failed [qos_mon]");
+ cJSON *qos_mon_local_JSON = OpenAPI_qos_monitoring_information_convertToJSON(events_subsc_req_data->qos_mon);
+ if (qos_mon_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_subsc_req_data_convertToJSON() failed [qos_mon]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "qosMon", qos_mon_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_subsc_req_data_convertToJSON() failed [qos_mon]");
+ goto end;
+ }
+ }
+
+ if (events_subsc_req_data->req_anis) {
+ cJSON *req_anis = cJSON_AddArrayToObject(item, "reqAnis");
+ if (req_anis == NULL) {
+ ogs_error("OpenAPI_events_subsc_req_data_convertToJSON() failed [req_anis]");
+ goto end;
+ }
+ OpenAPI_lnode_t *req_anis_node;
+ OpenAPI_list_for_each(events_subsc_req_data->req_anis, req_anis_node) {
+ if (cJSON_AddStringToObject(req_anis, "", OpenAPI_required_access_info_ToString((intptr_t)req_anis_node->data)) == NULL) {
+ ogs_error("OpenAPI_events_subsc_req_data_convertToJSON() failed [req_anis]");
goto end;
}
}
-
- if (events_subsc_req_data->req_ani) {
- if (cJSON_AddStringToObject(item, "reqAni", OpenAPI_required_access_info_ToString(events_subsc_req_data->req_ani)) == NULL) {
- ogs_error("OpenAPI_events_subsc_req_data_convertToJSON() failed [req_ani]");
- goto end;
- }
}
if (events_subsc_req_data->usg_thres) {
- cJSON *usg_thres_local_JSON = OpenAPI_usage_threshold_convertToJSON(events_subsc_req_data->usg_thres);
- if (usg_thres_local_JSON == NULL) {
- ogs_error("OpenAPI_events_subsc_req_data_convertToJSON() failed [usg_thres]");
- goto end;
- }
- cJSON_AddItemToObject(item, "usgThres", usg_thres_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_events_subsc_req_data_convertToJSON() failed [usg_thres]");
- goto end;
- }
+ cJSON *usg_thres_local_JSON = OpenAPI_usage_threshold_convertToJSON(events_subsc_req_data->usg_thres);
+ if (usg_thres_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_subsc_req_data_convertToJSON() failed [usg_thres]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "usgThres", usg_thres_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_subsc_req_data_convertToJSON() failed [usg_thres]");
+ goto end;
+ }
}
if (events_subsc_req_data->notif_corre_id) {
- if (cJSON_AddStringToObject(item, "notifCorreId", events_subsc_req_data->notif_corre_id) == NULL) {
- ogs_error("OpenAPI_events_subsc_req_data_convertToJSON() failed [notif_corre_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "notifCorreId", events_subsc_req_data->notif_corre_id) == NULL) {
+ ogs_error("OpenAPI_events_subsc_req_data_convertToJSON() failed [notif_corre_id]");
+ goto end;
+ }
}
end:
@@ -151,9 +160,9 @@ OpenAPI_events_subsc_req_data_t *OpenAPI_events_subsc_req_data_parseFromJSON(cJS
}
OpenAPI_list_t *eventsList;
-
+
cJSON *events_local_nonprimitive;
- if (!cJSON_IsArray(events)) {
+ if (!cJSON_IsArray(events)){
ogs_error("OpenAPI_events_subsc_req_data_parseFromJSON() failed [events]");
goto end;
}
@@ -172,67 +181,78 @@ OpenAPI_events_subsc_req_data_t *OpenAPI_events_subsc_req_data_parseFromJSON(cJS
cJSON *notif_uri = cJSON_GetObjectItemCaseSensitive(events_subsc_req_dataJSON, "notifUri");
- if (notif_uri) {
- if (!cJSON_IsString(notif_uri)) {
- ogs_error("OpenAPI_events_subsc_req_data_parseFromJSON() failed [notif_uri]");
- goto end;
- }
+ if (notif_uri) {
+ if (!cJSON_IsString(notif_uri)) {
+ ogs_error("OpenAPI_events_subsc_req_data_parseFromJSON() failed [notif_uri]");
+ goto end;
+ }
}
cJSON *req_qos_mon_params = cJSON_GetObjectItemCaseSensitive(events_subsc_req_dataJSON, "reqQosMonParams");
OpenAPI_list_t *req_qos_mon_paramsList;
- if (req_qos_mon_params) {
- cJSON *req_qos_mon_params_local_nonprimitive;
- if (!cJSON_IsArray(req_qos_mon_params)) {
+ if (req_qos_mon_params) {
+ cJSON *req_qos_mon_params_local_nonprimitive;
+ if (!cJSON_IsArray(req_qos_mon_params)) {
+ ogs_error("OpenAPI_events_subsc_req_data_parseFromJSON() failed [req_qos_mon_params]");
+ goto end;
+ }
+
+ req_qos_mon_paramsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(req_qos_mon_params_local_nonprimitive, req_qos_mon_params ) {
+ if (!cJSON_IsString(req_qos_mon_params_local_nonprimitive)){
ogs_error("OpenAPI_events_subsc_req_data_parseFromJSON() failed [req_qos_mon_params]");
goto end;
}
- req_qos_mon_paramsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(req_qos_mon_params_local_nonprimitive, req_qos_mon_params ) {
- if (!cJSON_IsString(req_qos_mon_params_local_nonprimitive)) {
- ogs_error("OpenAPI_events_subsc_req_data_parseFromJSON() failed [req_qos_mon_params]");
- goto end;
- }
-
- OpenAPI_list_add(req_qos_mon_paramsList, (void *)OpenAPI_requested_qos_monitoring_parameter_FromString(req_qos_mon_params_local_nonprimitive->valuestring));
- }
+ OpenAPI_list_add(req_qos_mon_paramsList, (void *)OpenAPI_requested_qos_monitoring_parameter_FromString(req_qos_mon_params_local_nonprimitive->valuestring));
+ }
}
cJSON *qos_mon = cJSON_GetObjectItemCaseSensitive(events_subsc_req_dataJSON, "qosMon");
OpenAPI_qos_monitoring_information_t *qos_mon_local_nonprim = NULL;
- if (qos_mon) {
- qos_mon_local_nonprim = OpenAPI_qos_monitoring_information_parseFromJSON(qos_mon);
+ if (qos_mon) {
+ qos_mon_local_nonprim = OpenAPI_qos_monitoring_information_parseFromJSON(qos_mon);
}
- cJSON *req_ani = cJSON_GetObjectItemCaseSensitive(events_subsc_req_dataJSON, "reqAni");
+ cJSON *req_anis = cJSON_GetObjectItemCaseSensitive(events_subsc_req_dataJSON, "reqAnis");
- OpenAPI_required_access_info_e req_aniVariable;
- if (req_ani) {
- if (!cJSON_IsString(req_ani)) {
- ogs_error("OpenAPI_events_subsc_req_data_parseFromJSON() failed [req_ani]");
+ OpenAPI_list_t *req_anisList;
+ if (req_anis) {
+ cJSON *req_anis_local_nonprimitive;
+ if (!cJSON_IsArray(req_anis)) {
+ ogs_error("OpenAPI_events_subsc_req_data_parseFromJSON() failed [req_anis]");
+ goto end;
+ }
+
+ req_anisList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(req_anis_local_nonprimitive, req_anis ) {
+ if (!cJSON_IsString(req_anis_local_nonprimitive)){
+ ogs_error("OpenAPI_events_subsc_req_data_parseFromJSON() failed [req_anis]");
goto end;
}
- req_aniVariable = OpenAPI_required_access_info_FromString(req_ani->valuestring);
+
+ OpenAPI_list_add(req_anisList, (void *)OpenAPI_required_access_info_FromString(req_anis_local_nonprimitive->valuestring));
+ }
}
cJSON *usg_thres = cJSON_GetObjectItemCaseSensitive(events_subsc_req_dataJSON, "usgThres");
OpenAPI_usage_threshold_t *usg_thres_local_nonprim = NULL;
- if (usg_thres) {
- usg_thres_local_nonprim = OpenAPI_usage_threshold_parseFromJSON(usg_thres);
+ if (usg_thres) {
+ usg_thres_local_nonprim = OpenAPI_usage_threshold_parseFromJSON(usg_thres);
}
cJSON *notif_corre_id = cJSON_GetObjectItemCaseSensitive(events_subsc_req_dataJSON, "notifCorreId");
- if (notif_corre_id) {
- if (!cJSON_IsString(notif_corre_id)) {
- ogs_error("OpenAPI_events_subsc_req_data_parseFromJSON() failed [notif_corre_id]");
- goto end;
- }
+ if (notif_corre_id) {
+ if (!cJSON_IsString(notif_corre_id)) {
+ ogs_error("OpenAPI_events_subsc_req_data_parseFromJSON() failed [notif_corre_id]");
+ goto end;
+ }
}
events_subsc_req_data_local_var = OpenAPI_events_subsc_req_data_create (
@@ -240,10 +260,10 @@ OpenAPI_events_subsc_req_data_t *OpenAPI_events_subsc_req_data_parseFromJSON(cJS
notif_uri ? ogs_strdup_or_assert(notif_uri->valuestring) : NULL,
req_qos_mon_params ? req_qos_mon_paramsList : NULL,
qos_mon ? qos_mon_local_nonprim : NULL,
- req_ani ? req_aniVariable : 0,
+ req_anis ? req_anisList : NULL,
usg_thres ? usg_thres_local_nonprim : NULL,
notif_corre_id ? ogs_strdup_or_assert(notif_corre_id->valuestring) : NULL
- );
+ );
return events_subsc_req_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/events_subsc_req_data.h b/lib/sbi/openapi/model/events_subsc_req_data.h
index 06f704063..8fe9121a5 100644
--- a/lib/sbi/openapi/model/events_subsc_req_data.h
+++ b/lib/sbi/openapi/model/events_subsc_req_data.h
@@ -28,7 +28,7 @@ typedef struct OpenAPI_events_subsc_req_data_s {
char *notif_uri;
OpenAPI_list_t *req_qos_mon_params;
struct OpenAPI_qos_monitoring_information_s *qos_mon;
- OpenAPI_required_access_info_e req_ani;
+ OpenAPI_list_t *req_anis;
struct OpenAPI_usage_threshold_s *usg_thres;
char *notif_corre_id;
} OpenAPI_events_subsc_req_data_t;
@@ -38,10 +38,10 @@ OpenAPI_events_subsc_req_data_t *OpenAPI_events_subsc_req_data_create(
char *notif_uri,
OpenAPI_list_t *req_qos_mon_params,
OpenAPI_qos_monitoring_information_t *qos_mon,
- OpenAPI_required_access_info_e req_ani,
+ OpenAPI_list_t *req_anis,
OpenAPI_usage_threshold_t *usg_thres,
char *notif_corre_id
- );
+);
void OpenAPI_events_subsc_req_data_free(OpenAPI_events_subsc_req_data_t *events_subsc_req_data);
OpenAPI_events_subsc_req_data_t *OpenAPI_events_subsc_req_data_parseFromJSON(cJSON *events_subsc_req_dataJSON);
cJSON *OpenAPI_events_subsc_req_data_convertToJSON(OpenAPI_events_subsc_req_data_t *events_subsc_req_data);
diff --git a/lib/sbi/openapi/model/events_subsc_req_data_rm.c b/lib/sbi/openapi/model/events_subsc_req_data_rm.c
index 24647eca6..8481f0826 100644
--- a/lib/sbi/openapi/model/events_subsc_req_data_rm.c
+++ b/lib/sbi/openapi/model/events_subsc_req_data_rm.c
@@ -9,10 +9,10 @@ OpenAPI_events_subsc_req_data_rm_t *OpenAPI_events_subsc_req_data_rm_create(
char *notif_uri,
OpenAPI_list_t *req_qos_mon_params,
OpenAPI_qos_monitoring_information_rm_t *qos_mon,
- OpenAPI_required_access_info_e req_ani,
+ OpenAPI_list_t *req_anis,
OpenAPI_usage_threshold_rm_t *usg_thres,
char *notif_corre_id
- )
+)
{
OpenAPI_events_subsc_req_data_rm_t *events_subsc_req_data_rm_local_var = OpenAPI_malloc(sizeof(OpenAPI_events_subsc_req_data_rm_t));
if (!events_subsc_req_data_rm_local_var) {
@@ -22,7 +22,7 @@ OpenAPI_events_subsc_req_data_rm_t *OpenAPI_events_subsc_req_data_rm_create(
events_subsc_req_data_rm_local_var->notif_uri = notif_uri;
events_subsc_req_data_rm_local_var->req_qos_mon_params = req_qos_mon_params;
events_subsc_req_data_rm_local_var->qos_mon = qos_mon;
- events_subsc_req_data_rm_local_var->req_ani = req_ani;
+ events_subsc_req_data_rm_local_var->req_anis = req_anis;
events_subsc_req_data_rm_local_var->usg_thres = usg_thres;
events_subsc_req_data_rm_local_var->notif_corre_id = notif_corre_id;
@@ -42,6 +42,7 @@ void OpenAPI_events_subsc_req_data_rm_free(OpenAPI_events_subsc_req_data_rm_t *e
ogs_free(events_subsc_req_data_rm->notif_uri);
OpenAPI_list_free(events_subsc_req_data_rm->req_qos_mon_params);
OpenAPI_qos_monitoring_information_rm_free(events_subsc_req_data_rm->qos_mon);
+ OpenAPI_list_free(events_subsc_req_data_rm->req_anis);
OpenAPI_usage_threshold_rm_free(events_subsc_req_data_rm->usg_thres);
ogs_free(events_subsc_req_data_rm->notif_corre_id);
ogs_free(events_subsc_req_data_rm);
@@ -76,65 +77,73 @@ cJSON *OpenAPI_events_subsc_req_data_rm_convertToJSON(OpenAPI_events_subsc_req_d
}
if (events_subsc_req_data_rm->notif_uri) {
- if (cJSON_AddStringToObject(item, "notifUri", events_subsc_req_data_rm->notif_uri) == NULL) {
- ogs_error("OpenAPI_events_subsc_req_data_rm_convertToJSON() failed [notif_uri]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "notifUri", events_subsc_req_data_rm->notif_uri) == NULL) {
+ ogs_error("OpenAPI_events_subsc_req_data_rm_convertToJSON() failed [notif_uri]");
+ goto end;
+ }
}
if (events_subsc_req_data_rm->req_qos_mon_params) {
- cJSON *req_qos_mon_params = cJSON_AddArrayToObject(item, "reqQosMonParams");
- if (req_qos_mon_params == NULL) {
+ cJSON *req_qos_mon_params = cJSON_AddArrayToObject(item, "reqQosMonParams");
+ if (req_qos_mon_params == NULL) {
+ ogs_error("OpenAPI_events_subsc_req_data_rm_convertToJSON() failed [req_qos_mon_params]");
+ goto end;
+ }
+ OpenAPI_lnode_t *req_qos_mon_params_node;
+ OpenAPI_list_for_each(events_subsc_req_data_rm->req_qos_mon_params, req_qos_mon_params_node) {
+ if (cJSON_AddStringToObject(req_qos_mon_params, "", OpenAPI_requested_qos_monitoring_parameter_ToString((intptr_t)req_qos_mon_params_node->data)) == NULL) {
ogs_error("OpenAPI_events_subsc_req_data_rm_convertToJSON() failed [req_qos_mon_params]");
goto end;
}
- OpenAPI_lnode_t *req_qos_mon_params_node;
- OpenAPI_list_for_each(events_subsc_req_data_rm->req_qos_mon_params, req_qos_mon_params_node) {
- if (cJSON_AddStringToObject(req_qos_mon_params, "", OpenAPI_requested_qos_monitoring_parameter_ToString((intptr_t)req_qos_mon_params_node->data)) == NULL) {
- ogs_error("OpenAPI_events_subsc_req_data_rm_convertToJSON() failed [req_qos_mon_params]");
- goto end;
- }
- }
+ }
}
if (events_subsc_req_data_rm->qos_mon) {
- cJSON *qos_mon_local_JSON = OpenAPI_qos_monitoring_information_rm_convertToJSON(events_subsc_req_data_rm->qos_mon);
- if (qos_mon_local_JSON == NULL) {
- ogs_error("OpenAPI_events_subsc_req_data_rm_convertToJSON() failed [qos_mon]");
- goto end;
- }
- cJSON_AddItemToObject(item, "qosMon", qos_mon_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_events_subsc_req_data_rm_convertToJSON() failed [qos_mon]");
+ cJSON *qos_mon_local_JSON = OpenAPI_qos_monitoring_information_rm_convertToJSON(events_subsc_req_data_rm->qos_mon);
+ if (qos_mon_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_subsc_req_data_rm_convertToJSON() failed [qos_mon]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "qosMon", qos_mon_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_subsc_req_data_rm_convertToJSON() failed [qos_mon]");
+ goto end;
+ }
+ }
+
+ if (events_subsc_req_data_rm->req_anis) {
+ cJSON *req_anis = cJSON_AddArrayToObject(item, "reqAnis");
+ if (req_anis == NULL) {
+ ogs_error("OpenAPI_events_subsc_req_data_rm_convertToJSON() failed [req_anis]");
+ goto end;
+ }
+ OpenAPI_lnode_t *req_anis_node;
+ OpenAPI_list_for_each(events_subsc_req_data_rm->req_anis, req_anis_node) {
+ if (cJSON_AddStringToObject(req_anis, "", OpenAPI_required_access_info_ToString((intptr_t)req_anis_node->data)) == NULL) {
+ ogs_error("OpenAPI_events_subsc_req_data_rm_convertToJSON() failed [req_anis]");
goto end;
}
}
-
- if (events_subsc_req_data_rm->req_ani) {
- if (cJSON_AddStringToObject(item, "reqAni", OpenAPI_required_access_info_ToString(events_subsc_req_data_rm->req_ani)) == NULL) {
- ogs_error("OpenAPI_events_subsc_req_data_rm_convertToJSON() failed [req_ani]");
- goto end;
- }
}
if (events_subsc_req_data_rm->usg_thres) {
- cJSON *usg_thres_local_JSON = OpenAPI_usage_threshold_rm_convertToJSON(events_subsc_req_data_rm->usg_thres);
- if (usg_thres_local_JSON == NULL) {
- ogs_error("OpenAPI_events_subsc_req_data_rm_convertToJSON() failed [usg_thres]");
- goto end;
- }
- cJSON_AddItemToObject(item, "usgThres", usg_thres_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_events_subsc_req_data_rm_convertToJSON() failed [usg_thres]");
- goto end;
- }
+ cJSON *usg_thres_local_JSON = OpenAPI_usage_threshold_rm_convertToJSON(events_subsc_req_data_rm->usg_thres);
+ if (usg_thres_local_JSON == NULL) {
+ ogs_error("OpenAPI_events_subsc_req_data_rm_convertToJSON() failed [usg_thres]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "usgThres", usg_thres_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_events_subsc_req_data_rm_convertToJSON() failed [usg_thres]");
+ goto end;
+ }
}
if (events_subsc_req_data_rm->notif_corre_id) {
- if (cJSON_AddStringToObject(item, "notifCorreId", events_subsc_req_data_rm->notif_corre_id) == NULL) {
- ogs_error("OpenAPI_events_subsc_req_data_rm_convertToJSON() failed [notif_corre_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "notifCorreId", events_subsc_req_data_rm->notif_corre_id) == NULL) {
+ ogs_error("OpenAPI_events_subsc_req_data_rm_convertToJSON() failed [notif_corre_id]");
+ goto end;
+ }
}
end:
@@ -151,9 +160,9 @@ OpenAPI_events_subsc_req_data_rm_t *OpenAPI_events_subsc_req_data_rm_parseFromJS
}
OpenAPI_list_t *eventsList;
-
+
cJSON *events_local_nonprimitive;
- if (!cJSON_IsArray(events)) {
+ if (!cJSON_IsArray(events)){
ogs_error("OpenAPI_events_subsc_req_data_rm_parseFromJSON() failed [events]");
goto end;
}
@@ -172,67 +181,78 @@ OpenAPI_events_subsc_req_data_rm_t *OpenAPI_events_subsc_req_data_rm_parseFromJS
cJSON *notif_uri = cJSON_GetObjectItemCaseSensitive(events_subsc_req_data_rmJSON, "notifUri");
- if (notif_uri) {
- if (!cJSON_IsString(notif_uri)) {
- ogs_error("OpenAPI_events_subsc_req_data_rm_parseFromJSON() failed [notif_uri]");
- goto end;
- }
+ if (notif_uri) {
+ if (!cJSON_IsString(notif_uri)) {
+ ogs_error("OpenAPI_events_subsc_req_data_rm_parseFromJSON() failed [notif_uri]");
+ goto end;
+ }
}
cJSON *req_qos_mon_params = cJSON_GetObjectItemCaseSensitive(events_subsc_req_data_rmJSON, "reqQosMonParams");
OpenAPI_list_t *req_qos_mon_paramsList;
- if (req_qos_mon_params) {
- cJSON *req_qos_mon_params_local_nonprimitive;
- if (!cJSON_IsArray(req_qos_mon_params)) {
+ if (req_qos_mon_params) {
+ cJSON *req_qos_mon_params_local_nonprimitive;
+ if (!cJSON_IsArray(req_qos_mon_params)) {
+ ogs_error("OpenAPI_events_subsc_req_data_rm_parseFromJSON() failed [req_qos_mon_params]");
+ goto end;
+ }
+
+ req_qos_mon_paramsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(req_qos_mon_params_local_nonprimitive, req_qos_mon_params ) {
+ if (!cJSON_IsString(req_qos_mon_params_local_nonprimitive)){
ogs_error("OpenAPI_events_subsc_req_data_rm_parseFromJSON() failed [req_qos_mon_params]");
goto end;
}
- req_qos_mon_paramsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(req_qos_mon_params_local_nonprimitive, req_qos_mon_params ) {
- if (!cJSON_IsString(req_qos_mon_params_local_nonprimitive)) {
- ogs_error("OpenAPI_events_subsc_req_data_rm_parseFromJSON() failed [req_qos_mon_params]");
- goto end;
- }
-
- OpenAPI_list_add(req_qos_mon_paramsList, (void *)OpenAPI_requested_qos_monitoring_parameter_FromString(req_qos_mon_params_local_nonprimitive->valuestring));
- }
+ OpenAPI_list_add(req_qos_mon_paramsList, (void *)OpenAPI_requested_qos_monitoring_parameter_FromString(req_qos_mon_params_local_nonprimitive->valuestring));
+ }
}
cJSON *qos_mon = cJSON_GetObjectItemCaseSensitive(events_subsc_req_data_rmJSON, "qosMon");
OpenAPI_qos_monitoring_information_rm_t *qos_mon_local_nonprim = NULL;
- if (qos_mon) {
- qos_mon_local_nonprim = OpenAPI_qos_monitoring_information_rm_parseFromJSON(qos_mon);
+ if (qos_mon) {
+ qos_mon_local_nonprim = OpenAPI_qos_monitoring_information_rm_parseFromJSON(qos_mon);
}
- cJSON *req_ani = cJSON_GetObjectItemCaseSensitive(events_subsc_req_data_rmJSON, "reqAni");
+ cJSON *req_anis = cJSON_GetObjectItemCaseSensitive(events_subsc_req_data_rmJSON, "reqAnis");
- OpenAPI_required_access_info_e req_aniVariable;
- if (req_ani) {
- if (!cJSON_IsString(req_ani)) {
- ogs_error("OpenAPI_events_subsc_req_data_rm_parseFromJSON() failed [req_ani]");
+ OpenAPI_list_t *req_anisList;
+ if (req_anis) {
+ cJSON *req_anis_local_nonprimitive;
+ if (!cJSON_IsArray(req_anis)) {
+ ogs_error("OpenAPI_events_subsc_req_data_rm_parseFromJSON() failed [req_anis]");
+ goto end;
+ }
+
+ req_anisList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(req_anis_local_nonprimitive, req_anis ) {
+ if (!cJSON_IsString(req_anis_local_nonprimitive)){
+ ogs_error("OpenAPI_events_subsc_req_data_rm_parseFromJSON() failed [req_anis]");
goto end;
}
- req_aniVariable = OpenAPI_required_access_info_FromString(req_ani->valuestring);
+
+ OpenAPI_list_add(req_anisList, (void *)OpenAPI_required_access_info_FromString(req_anis_local_nonprimitive->valuestring));
+ }
}
cJSON *usg_thres = cJSON_GetObjectItemCaseSensitive(events_subsc_req_data_rmJSON, "usgThres");
OpenAPI_usage_threshold_rm_t *usg_thres_local_nonprim = NULL;
- if (usg_thres) {
- usg_thres_local_nonprim = OpenAPI_usage_threshold_rm_parseFromJSON(usg_thres);
+ if (usg_thres) {
+ usg_thres_local_nonprim = OpenAPI_usage_threshold_rm_parseFromJSON(usg_thres);
}
cJSON *notif_corre_id = cJSON_GetObjectItemCaseSensitive(events_subsc_req_data_rmJSON, "notifCorreId");
- if (notif_corre_id) {
- if (!cJSON_IsString(notif_corre_id)) {
- ogs_error("OpenAPI_events_subsc_req_data_rm_parseFromJSON() failed [notif_corre_id]");
- goto end;
- }
+ if (notif_corre_id) {
+ if (!cJSON_IsString(notif_corre_id)) {
+ ogs_error("OpenAPI_events_subsc_req_data_rm_parseFromJSON() failed [notif_corre_id]");
+ goto end;
+ }
}
events_subsc_req_data_rm_local_var = OpenAPI_events_subsc_req_data_rm_create (
@@ -240,10 +260,10 @@ OpenAPI_events_subsc_req_data_rm_t *OpenAPI_events_subsc_req_data_rm_parseFromJS
notif_uri ? ogs_strdup_or_assert(notif_uri->valuestring) : NULL,
req_qos_mon_params ? req_qos_mon_paramsList : NULL,
qos_mon ? qos_mon_local_nonprim : NULL,
- req_ani ? req_aniVariable : 0,
+ req_anis ? req_anisList : NULL,
usg_thres ? usg_thres_local_nonprim : NULL,
notif_corre_id ? ogs_strdup_or_assert(notif_corre_id->valuestring) : NULL
- );
+ );
return events_subsc_req_data_rm_local_var;
end:
diff --git a/lib/sbi/openapi/model/events_subsc_req_data_rm.h b/lib/sbi/openapi/model/events_subsc_req_data_rm.h
index eff8f90ae..0db47e1a3 100644
--- a/lib/sbi/openapi/model/events_subsc_req_data_rm.h
+++ b/lib/sbi/openapi/model/events_subsc_req_data_rm.h
@@ -28,7 +28,7 @@ typedef struct OpenAPI_events_subsc_req_data_rm_s {
char *notif_uri;
OpenAPI_list_t *req_qos_mon_params;
struct OpenAPI_qos_monitoring_information_rm_s *qos_mon;
- OpenAPI_required_access_info_e req_ani;
+ OpenAPI_list_t *req_anis;
struct OpenAPI_usage_threshold_rm_s *usg_thres;
char *notif_corre_id;
} OpenAPI_events_subsc_req_data_rm_t;
@@ -38,10 +38,10 @@ OpenAPI_events_subsc_req_data_rm_t *OpenAPI_events_subsc_req_data_rm_create(
char *notif_uri,
OpenAPI_list_t *req_qos_mon_params,
OpenAPI_qos_monitoring_information_rm_t *qos_mon,
- OpenAPI_required_access_info_e req_ani,
+ OpenAPI_list_t *req_anis,
OpenAPI_usage_threshold_rm_t *usg_thres,
char *notif_corre_id
- );
+);
void OpenAPI_events_subsc_req_data_rm_free(OpenAPI_events_subsc_req_data_rm_t *events_subsc_req_data_rm);
OpenAPI_events_subsc_req_data_rm_t *OpenAPI_events_subsc_req_data_rm_parseFromJSON(cJSON *events_subsc_req_data_rmJSON);
cJSON *OpenAPI_events_subsc_req_data_rm_convertToJSON(OpenAPI_events_subsc_req_data_rm_t *events_subsc_req_data_rm);
diff --git a/lib/sbi/openapi/model/exemption_ind.c b/lib/sbi/openapi/model/exemption_ind.c
index a81ca6ed4..7a797d3fd 100644
--- a/lib/sbi/openapi/model/exemption_ind.c
+++ b/lib/sbi/openapi/model/exemption_ind.c
@@ -8,7 +8,7 @@ OpenAPI_exemption_ind_t *OpenAPI_exemption_ind_create(
int dnn_congestion,
int snssai_only_congestion,
int snssai_dnn_congestion
- )
+)
{
OpenAPI_exemption_ind_t *exemption_ind_local_var = OpenAPI_malloc(sizeof(OpenAPI_exemption_ind_t));
if (!exemption_ind_local_var) {
@@ -41,24 +41,24 @@ cJSON *OpenAPI_exemption_ind_convertToJSON(OpenAPI_exemption_ind_t *exemption_in
item = cJSON_CreateObject();
if (exemption_ind->dnn_congestion) {
- if (cJSON_AddBoolToObject(item, "dnnCongestion", exemption_ind->dnn_congestion) == NULL) {
- ogs_error("OpenAPI_exemption_ind_convertToJSON() failed [dnn_congestion]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "dnnCongestion", exemption_ind->dnn_congestion) == NULL) {
+ ogs_error("OpenAPI_exemption_ind_convertToJSON() failed [dnn_congestion]");
+ goto end;
+ }
}
if (exemption_ind->snssai_only_congestion) {
- if (cJSON_AddBoolToObject(item, "snssaiOnlyCongestion", exemption_ind->snssai_only_congestion) == NULL) {
- ogs_error("OpenAPI_exemption_ind_convertToJSON() failed [snssai_only_congestion]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "snssaiOnlyCongestion", exemption_ind->snssai_only_congestion) == NULL) {
+ ogs_error("OpenAPI_exemption_ind_convertToJSON() failed [snssai_only_congestion]");
+ goto end;
+ }
}
if (exemption_ind->snssai_dnn_congestion) {
- if (cJSON_AddBoolToObject(item, "snssaiDnnCongestion", exemption_ind->snssai_dnn_congestion) == NULL) {
- ogs_error("OpenAPI_exemption_ind_convertToJSON() failed [snssai_dnn_congestion]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "snssaiDnnCongestion", exemption_ind->snssai_dnn_congestion) == NULL) {
+ ogs_error("OpenAPI_exemption_ind_convertToJSON() failed [snssai_dnn_congestion]");
+ goto end;
+ }
}
end:
@@ -70,36 +70,36 @@ OpenAPI_exemption_ind_t *OpenAPI_exemption_ind_parseFromJSON(cJSON *exemption_in
OpenAPI_exemption_ind_t *exemption_ind_local_var = NULL;
cJSON *dnn_congestion = cJSON_GetObjectItemCaseSensitive(exemption_indJSON, "dnnCongestion");
- if (dnn_congestion) {
- if (!cJSON_IsBool(dnn_congestion)) {
- ogs_error("OpenAPI_exemption_ind_parseFromJSON() failed [dnn_congestion]");
- goto end;
- }
+ if (dnn_congestion) {
+ if (!cJSON_IsBool(dnn_congestion)) {
+ ogs_error("OpenAPI_exemption_ind_parseFromJSON() failed [dnn_congestion]");
+ goto end;
+ }
}
cJSON *snssai_only_congestion = cJSON_GetObjectItemCaseSensitive(exemption_indJSON, "snssaiOnlyCongestion");
- if (snssai_only_congestion) {
- if (!cJSON_IsBool(snssai_only_congestion)) {
- ogs_error("OpenAPI_exemption_ind_parseFromJSON() failed [snssai_only_congestion]");
- goto end;
- }
+ if (snssai_only_congestion) {
+ if (!cJSON_IsBool(snssai_only_congestion)) {
+ ogs_error("OpenAPI_exemption_ind_parseFromJSON() failed [snssai_only_congestion]");
+ goto end;
+ }
}
cJSON *snssai_dnn_congestion = cJSON_GetObjectItemCaseSensitive(exemption_indJSON, "snssaiDnnCongestion");
- if (snssai_dnn_congestion) {
- if (!cJSON_IsBool(snssai_dnn_congestion)) {
- ogs_error("OpenAPI_exemption_ind_parseFromJSON() failed [snssai_dnn_congestion]");
- goto end;
- }
+ if (snssai_dnn_congestion) {
+ if (!cJSON_IsBool(snssai_dnn_congestion)) {
+ ogs_error("OpenAPI_exemption_ind_parseFromJSON() failed [snssai_dnn_congestion]");
+ goto end;
+ }
}
exemption_ind_local_var = OpenAPI_exemption_ind_create (
dnn_congestion ? dnn_congestion->valueint : 0,
snssai_only_congestion ? snssai_only_congestion->valueint : 0,
snssai_dnn_congestion ? snssai_dnn_congestion->valueint : 0
- );
+ );
return exemption_ind_local_var;
end:
diff --git a/lib/sbi/openapi/model/exemption_ind.h b/lib/sbi/openapi/model/exemption_ind.h
index 4bfa0182b..0b3982ed3 100644
--- a/lib/sbi/openapi/model/exemption_ind.h
+++ b/lib/sbi/openapi/model/exemption_ind.h
@@ -1,7 +1,7 @@
/*
* exemption_ind.h
*
- *
+ *
*/
#ifndef _OpenAPI_exemption_ind_H_
@@ -28,7 +28,7 @@ OpenAPI_exemption_ind_t *OpenAPI_exemption_ind_create(
int dnn_congestion,
int snssai_only_congestion,
int snssai_dnn_congestion
- );
+);
void OpenAPI_exemption_ind_free(OpenAPI_exemption_ind_t *exemption_ind);
OpenAPI_exemption_ind_t *OpenAPI_exemption_ind_parseFromJSON(cJSON *exemption_indJSON);
cJSON *OpenAPI_exemption_ind_convertToJSON(OpenAPI_exemption_ind_t *exemption_ind);
diff --git a/lib/sbi/openapi/model/expected_ue_behavior.c b/lib/sbi/openapi/model/expected_ue_behavior.c
index e03c04a05..a81c5a060 100644
--- a/lib/sbi/openapi/model/expected_ue_behavior.c
+++ b/lib/sbi/openapi/model/expected_ue_behavior.c
@@ -7,7 +7,7 @@
OpenAPI_expected_ue_behavior_t *OpenAPI_expected_ue_behavior_create(
OpenAPI_list_t *exp_move_trajectory,
char *validity_time
- )
+)
{
OpenAPI_expected_ue_behavior_t *expected_ue_behavior_local_var = OpenAPI_malloc(sizeof(OpenAPI_expected_ue_behavior_t));
if (!expected_ue_behavior_local_var) {
@@ -80,9 +80,9 @@ OpenAPI_expected_ue_behavior_t *OpenAPI_expected_ue_behavior_parseFromJSON(cJSON
}
OpenAPI_list_t *exp_move_trajectoryList;
-
+
cJSON *exp_move_trajectory_local_nonprimitive;
- if (!cJSON_IsArray(exp_move_trajectory)) {
+ if (!cJSON_IsArray(exp_move_trajectory)){
ogs_error("OpenAPI_expected_ue_behavior_parseFromJSON() failed [exp_move_trajectory]");
goto end;
}
@@ -105,7 +105,7 @@ OpenAPI_expected_ue_behavior_t *OpenAPI_expected_ue_behavior_parseFromJSON(cJSON
goto end;
}
-
+
if (!cJSON_IsString(validity_time)) {
ogs_error("OpenAPI_expected_ue_behavior_parseFromJSON() failed [validity_time]");
goto end;
@@ -114,7 +114,7 @@ OpenAPI_expected_ue_behavior_t *OpenAPI_expected_ue_behavior_parseFromJSON(cJSON
expected_ue_behavior_local_var = OpenAPI_expected_ue_behavior_create (
exp_move_trajectoryList,
ogs_strdup_or_assert(validity_time->valuestring)
- );
+ );
return expected_ue_behavior_local_var;
end:
diff --git a/lib/sbi/openapi/model/expected_ue_behavior.h b/lib/sbi/openapi/model/expected_ue_behavior.h
index f019c3040..c28061b49 100644
--- a/lib/sbi/openapi/model/expected_ue_behavior.h
+++ b/lib/sbi/openapi/model/expected_ue_behavior.h
@@ -1,7 +1,7 @@
/*
* expected_ue_behavior.h
*
- *
+ *
*/
#ifndef _OpenAPI_expected_ue_behavior_H_
@@ -27,7 +27,7 @@ typedef struct OpenAPI_expected_ue_behavior_s {
OpenAPI_expected_ue_behavior_t *OpenAPI_expected_ue_behavior_create(
OpenAPI_list_t *exp_move_trajectory,
char *validity_time
- );
+);
void OpenAPI_expected_ue_behavior_free(OpenAPI_expected_ue_behavior_t *expected_ue_behavior);
OpenAPI_expected_ue_behavior_t *OpenAPI_expected_ue_behavior_parseFromJSON(cJSON *expected_ue_behaviorJSON);
cJSON *OpenAPI_expected_ue_behavior_convertToJSON(OpenAPI_expected_ue_behavior_t *expected_ue_behavior);
diff --git a/lib/sbi/openapi/model/expected_ue_behaviour.c b/lib/sbi/openapi/model/expected_ue_behaviour.c
index d25f1c1f7..7ce7b17fa 100644
--- a/lib/sbi/openapi/model/expected_ue_behaviour.c
+++ b/lib/sbi/openapi/model/expected_ue_behaviour.c
@@ -17,7 +17,7 @@ OpenAPI_expected_ue_behaviour_t *OpenAPI_expected_ue_behaviour_create(
OpenAPI_battery_indication_rm_t *battery_indication,
char *validity_time,
char *mtc_provider_information
- )
+)
{
OpenAPI_expected_ue_behaviour_t *expected_ue_behaviour_local_var = OpenAPI_malloc(sizeof(OpenAPI_expected_ue_behaviour_t));
if (!expected_ue_behaviour_local_var) {
@@ -81,116 +81,116 @@ cJSON *OpenAPI_expected_ue_behaviour_convertToJSON(OpenAPI_expected_ue_behaviour
}
if (expected_ue_behaviour->stationary_indication) {
- cJSON *stationary_indication_local_JSON = OpenAPI_stationary_indication_rm_convertToJSON(expected_ue_behaviour->stationary_indication);
- if (stationary_indication_local_JSON == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [stationary_indication]");
- goto end;
- }
- cJSON_AddItemToObject(item, "stationaryIndication", stationary_indication_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [stationary_indication]");
- goto end;
- }
+ cJSON *stationary_indication_local_JSON = OpenAPI_stationary_indication_rm_convertToJSON(expected_ue_behaviour->stationary_indication);
+ if (stationary_indication_local_JSON == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [stationary_indication]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "stationaryIndication", stationary_indication_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [stationary_indication]");
+ goto end;
+ }
}
if (expected_ue_behaviour->communication_duration_time) {
- if (cJSON_AddNumberToObject(item, "communicationDurationTime", expected_ue_behaviour->communication_duration_time) == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [communication_duration_time]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "communicationDurationTime", expected_ue_behaviour->communication_duration_time) == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [communication_duration_time]");
+ goto end;
+ }
}
if (expected_ue_behaviour->scheduled_communication_type) {
- cJSON *scheduled_communication_type_local_JSON = OpenAPI_scheduled_communication_type_rm_convertToJSON(expected_ue_behaviour->scheduled_communication_type);
- if (scheduled_communication_type_local_JSON == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [scheduled_communication_type]");
- goto end;
- }
- cJSON_AddItemToObject(item, "scheduledCommunicationType", scheduled_communication_type_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [scheduled_communication_type]");
- goto end;
- }
+ cJSON *scheduled_communication_type_local_JSON = OpenAPI_scheduled_communication_type_rm_convertToJSON(expected_ue_behaviour->scheduled_communication_type);
+ if (scheduled_communication_type_local_JSON == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [scheduled_communication_type]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "scheduledCommunicationType", scheduled_communication_type_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [scheduled_communication_type]");
+ goto end;
+ }
}
if (expected_ue_behaviour->periodic_time) {
- if (cJSON_AddNumberToObject(item, "periodicTime", expected_ue_behaviour->periodic_time) == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [periodic_time]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "periodicTime", expected_ue_behaviour->periodic_time) == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [periodic_time]");
+ goto end;
+ }
}
if (expected_ue_behaviour->scheduled_communication_time) {
- cJSON *scheduled_communication_time_local_JSON = OpenAPI_scheduled_communication_time_rm_convertToJSON(expected_ue_behaviour->scheduled_communication_time);
- if (scheduled_communication_time_local_JSON == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [scheduled_communication_time]");
- goto end;
- }
- cJSON_AddItemToObject(item, "scheduledCommunicationTime", scheduled_communication_time_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [scheduled_communication_time]");
- goto end;
- }
+ cJSON *scheduled_communication_time_local_JSON = OpenAPI_scheduled_communication_time_rm_convertToJSON(expected_ue_behaviour->scheduled_communication_time);
+ if (scheduled_communication_time_local_JSON == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [scheduled_communication_time]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "scheduledCommunicationTime", scheduled_communication_time_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [scheduled_communication_time]");
+ goto end;
+ }
}
if (expected_ue_behaviour->expected_umts) {
- cJSON *expected_umtsList = cJSON_AddArrayToObject(item, "expectedUmts");
- if (expected_umtsList == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [expected_umts]");
- goto end;
- }
+ cJSON *expected_umtsList = cJSON_AddArrayToObject(item, "expectedUmts");
+ if (expected_umtsList == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [expected_umts]");
+ goto end;
+ }
- OpenAPI_lnode_t *expected_umts_node;
- if (expected_ue_behaviour->expected_umts) {
- OpenAPI_list_for_each(expected_ue_behaviour->expected_umts, expected_umts_node) {
- cJSON *itemLocal = OpenAPI_location_area_convertToJSON(expected_umts_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [expected_umts]");
- goto end;
- }
- cJSON_AddItemToArray(expected_umtsList, itemLocal);
+ OpenAPI_lnode_t *expected_umts_node;
+ if (expected_ue_behaviour->expected_umts) {
+ OpenAPI_list_for_each(expected_ue_behaviour->expected_umts, expected_umts_node) {
+ cJSON *itemLocal = OpenAPI_location_area_convertToJSON(expected_umts_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [expected_umts]");
+ goto end;
}
+ cJSON_AddItemToArray(expected_umtsList, itemLocal);
}
}
+ }
if (expected_ue_behaviour->traffic_profile) {
- cJSON *traffic_profile_local_JSON = OpenAPI_traffic_profile_rm_convertToJSON(expected_ue_behaviour->traffic_profile);
- if (traffic_profile_local_JSON == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [traffic_profile]");
- goto end;
- }
- cJSON_AddItemToObject(item, "trafficProfile", traffic_profile_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [traffic_profile]");
- goto end;
- }
+ cJSON *traffic_profile_local_JSON = OpenAPI_traffic_profile_rm_convertToJSON(expected_ue_behaviour->traffic_profile);
+ if (traffic_profile_local_JSON == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [traffic_profile]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "trafficProfile", traffic_profile_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [traffic_profile]");
+ goto end;
+ }
}
if (expected_ue_behaviour->battery_indication) {
- cJSON *battery_indication_local_JSON = OpenAPI_battery_indication_rm_convertToJSON(expected_ue_behaviour->battery_indication);
- if (battery_indication_local_JSON == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [battery_indication]");
- goto end;
- }
- cJSON_AddItemToObject(item, "batteryIndication", battery_indication_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [battery_indication]");
- goto end;
- }
+ cJSON *battery_indication_local_JSON = OpenAPI_battery_indication_rm_convertToJSON(expected_ue_behaviour->battery_indication);
+ if (battery_indication_local_JSON == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [battery_indication]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "batteryIndication", battery_indication_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [battery_indication]");
+ goto end;
+ }
}
if (expected_ue_behaviour->validity_time) {
- if (cJSON_AddStringToObject(item, "validityTime", expected_ue_behaviour->validity_time) == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [validity_time]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "validityTime", expected_ue_behaviour->validity_time) == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [validity_time]");
+ goto end;
+ }
}
if (expected_ue_behaviour->mtc_provider_information) {
- if (cJSON_AddStringToObject(item, "mtcProviderInformation", expected_ue_behaviour->mtc_provider_information) == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [mtc_provider_information]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "mtcProviderInformation", expected_ue_behaviour->mtc_provider_information) == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [mtc_provider_information]");
+ goto end;
+ }
}
end:
@@ -206,7 +206,7 @@ OpenAPI_expected_ue_behaviour_t *OpenAPI_expected_ue_behaviour_parseFromJSON(cJS
goto end;
}
-
+
if (!cJSON_IsString(af_instance_id)) {
ogs_error("OpenAPI_expected_ue_behaviour_parseFromJSON() failed [af_instance_id]");
goto end;
@@ -218,7 +218,7 @@ OpenAPI_expected_ue_behaviour_t *OpenAPI_expected_ue_behaviour_parseFromJSON(cJS
goto end;
}
-
+
if (!cJSON_IsNumber(reference_id)) {
ogs_error("OpenAPI_expected_ue_behaviour_parseFromJSON() failed [reference_id]");
goto end;
@@ -227,95 +227,95 @@ OpenAPI_expected_ue_behaviour_t *OpenAPI_expected_ue_behaviour_parseFromJSON(cJS
cJSON *stationary_indication = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviourJSON, "stationaryIndication");
OpenAPI_stationary_indication_rm_t *stationary_indication_local_nonprim = NULL;
- if (stationary_indication) {
- stationary_indication_local_nonprim = OpenAPI_stationary_indication_rm_parseFromJSON(stationary_indication);
+ if (stationary_indication) {
+ stationary_indication_local_nonprim = OpenAPI_stationary_indication_rm_parseFromJSON(stationary_indication);
}
cJSON *communication_duration_time = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviourJSON, "communicationDurationTime");
- if (communication_duration_time) {
- if (!cJSON_IsNumber(communication_duration_time)) {
- ogs_error("OpenAPI_expected_ue_behaviour_parseFromJSON() failed [communication_duration_time]");
- goto end;
- }
+ if (communication_duration_time) {
+ if (!cJSON_IsNumber(communication_duration_time)) {
+ ogs_error("OpenAPI_expected_ue_behaviour_parseFromJSON() failed [communication_duration_time]");
+ goto end;
+ }
}
cJSON *scheduled_communication_type = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviourJSON, "scheduledCommunicationType");
OpenAPI_scheduled_communication_type_rm_t *scheduled_communication_type_local_nonprim = NULL;
- if (scheduled_communication_type) {
- scheduled_communication_type_local_nonprim = OpenAPI_scheduled_communication_type_rm_parseFromJSON(scheduled_communication_type);
+ if (scheduled_communication_type) {
+ scheduled_communication_type_local_nonprim = OpenAPI_scheduled_communication_type_rm_parseFromJSON(scheduled_communication_type);
}
cJSON *periodic_time = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviourJSON, "periodicTime");
- if (periodic_time) {
- if (!cJSON_IsNumber(periodic_time)) {
- ogs_error("OpenAPI_expected_ue_behaviour_parseFromJSON() failed [periodic_time]");
- goto end;
- }
+ if (periodic_time) {
+ if (!cJSON_IsNumber(periodic_time)) {
+ ogs_error("OpenAPI_expected_ue_behaviour_parseFromJSON() failed [periodic_time]");
+ goto end;
+ }
}
cJSON *scheduled_communication_time = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviourJSON, "scheduledCommunicationTime");
OpenAPI_scheduled_communication_time_rm_t *scheduled_communication_time_local_nonprim = NULL;
- if (scheduled_communication_time) {
- scheduled_communication_time_local_nonprim = OpenAPI_scheduled_communication_time_rm_parseFromJSON(scheduled_communication_time);
+ if (scheduled_communication_time) {
+ scheduled_communication_time_local_nonprim = OpenAPI_scheduled_communication_time_rm_parseFromJSON(scheduled_communication_time);
}
cJSON *expected_umts = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviourJSON, "expectedUmts");
OpenAPI_list_t *expected_umtsList;
- if (expected_umts) {
- cJSON *expected_umts_local_nonprimitive;
- if (!cJSON_IsArray(expected_umts)) {
+ if (expected_umts) {
+ cJSON *expected_umts_local_nonprimitive;
+ if (!cJSON_IsArray(expected_umts)){
+ ogs_error("OpenAPI_expected_ue_behaviour_parseFromJSON() failed [expected_umts]");
+ goto end;
+ }
+
+ expected_umtsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(expected_umts_local_nonprimitive, expected_umts ) {
+ if (!cJSON_IsObject(expected_umts_local_nonprimitive)) {
ogs_error("OpenAPI_expected_ue_behaviour_parseFromJSON() failed [expected_umts]");
goto end;
}
+ OpenAPI_location_area_t *expected_umtsItem = OpenAPI_location_area_parseFromJSON(expected_umts_local_nonprimitive);
- expected_umtsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(expected_umts_local_nonprimitive, expected_umts ) {
- if (!cJSON_IsObject(expected_umts_local_nonprimitive)) {
- ogs_error("OpenAPI_expected_ue_behaviour_parseFromJSON() failed [expected_umts]");
- goto end;
- }
- OpenAPI_location_area_t *expected_umtsItem = OpenAPI_location_area_parseFromJSON(expected_umts_local_nonprimitive);
-
- OpenAPI_list_add(expected_umtsList, expected_umtsItem);
- }
+ OpenAPI_list_add(expected_umtsList, expected_umtsItem);
+ }
}
cJSON *traffic_profile = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviourJSON, "trafficProfile");
OpenAPI_traffic_profile_rm_t *traffic_profile_local_nonprim = NULL;
- if (traffic_profile) {
- traffic_profile_local_nonprim = OpenAPI_traffic_profile_rm_parseFromJSON(traffic_profile);
+ if (traffic_profile) {
+ traffic_profile_local_nonprim = OpenAPI_traffic_profile_rm_parseFromJSON(traffic_profile);
}
cJSON *battery_indication = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviourJSON, "batteryIndication");
OpenAPI_battery_indication_rm_t *battery_indication_local_nonprim = NULL;
- if (battery_indication) {
- battery_indication_local_nonprim = OpenAPI_battery_indication_rm_parseFromJSON(battery_indication);
+ if (battery_indication) {
+ battery_indication_local_nonprim = OpenAPI_battery_indication_rm_parseFromJSON(battery_indication);
}
cJSON *validity_time = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviourJSON, "validityTime");
- if (validity_time) {
- if (!cJSON_IsString(validity_time)) {
- ogs_error("OpenAPI_expected_ue_behaviour_parseFromJSON() failed [validity_time]");
- goto end;
- }
+ if (validity_time) {
+ if (!cJSON_IsString(validity_time)) {
+ ogs_error("OpenAPI_expected_ue_behaviour_parseFromJSON() failed [validity_time]");
+ goto end;
+ }
}
cJSON *mtc_provider_information = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviourJSON, "mtcProviderInformation");
- if (mtc_provider_information) {
- if (!cJSON_IsString(mtc_provider_information)) {
- ogs_error("OpenAPI_expected_ue_behaviour_parseFromJSON() failed [mtc_provider_information]");
- goto end;
- }
+ if (mtc_provider_information) {
+ if (!cJSON_IsString(mtc_provider_information)) {
+ ogs_error("OpenAPI_expected_ue_behaviour_parseFromJSON() failed [mtc_provider_information]");
+ goto end;
+ }
}
expected_ue_behaviour_local_var = OpenAPI_expected_ue_behaviour_create (
@@ -331,7 +331,7 @@ OpenAPI_expected_ue_behaviour_t *OpenAPI_expected_ue_behaviour_parseFromJSON(cJS
battery_indication ? battery_indication_local_nonprim : NULL,
validity_time ? ogs_strdup_or_assert(validity_time->valuestring) : NULL,
mtc_provider_information ? ogs_strdup_or_assert(mtc_provider_information->valuestring) : NULL
- );
+ );
return expected_ue_behaviour_local_var;
end:
diff --git a/lib/sbi/openapi/model/expected_ue_behaviour.h b/lib/sbi/openapi/model/expected_ue_behaviour.h
index f65630670..8dd35c526 100644
--- a/lib/sbi/openapi/model/expected_ue_behaviour.h
+++ b/lib/sbi/openapi/model/expected_ue_behaviour.h
@@ -1,7 +1,7 @@
/*
* expected_ue_behaviour.h
*
- *
+ *
*/
#ifndef _OpenAPI_expected_ue_behaviour_H_
@@ -52,7 +52,7 @@ OpenAPI_expected_ue_behaviour_t *OpenAPI_expected_ue_behaviour_create(
OpenAPI_battery_indication_rm_t *battery_indication,
char *validity_time,
char *mtc_provider_information
- );
+);
void OpenAPI_expected_ue_behaviour_free(OpenAPI_expected_ue_behaviour_t *expected_ue_behaviour);
OpenAPI_expected_ue_behaviour_t *OpenAPI_expected_ue_behaviour_parseFromJSON(cJSON *expected_ue_behaviourJSON);
cJSON *OpenAPI_expected_ue_behaviour_convertToJSON(OpenAPI_expected_ue_behaviour_t *expected_ue_behaviour);
diff --git a/lib/sbi/openapi/model/expected_ue_behaviour_data.c b/lib/sbi/openapi/model/expected_ue_behaviour_data.c
index 3ea01cf17..3ee5c71fd 100644
--- a/lib/sbi/openapi/model/expected_ue_behaviour_data.c
+++ b/lib/sbi/openapi/model/expected_ue_behaviour_data.c
@@ -14,7 +14,7 @@ OpenAPI_expected_ue_behaviour_data_t *OpenAPI_expected_ue_behaviour_data_create(
OpenAPI_traffic_profile_e traffic_profile,
OpenAPI_battery_indication_t *battery_indication,
char *validity_time
- )
+)
{
OpenAPI_expected_ue_behaviour_data_t *expected_ue_behaviour_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_expected_ue_behaviour_data_t));
if (!expected_ue_behaviour_data_local_var) {
@@ -60,91 +60,91 @@ cJSON *OpenAPI_expected_ue_behaviour_data_convertToJSON(OpenAPI_expected_ue_beha
item = cJSON_CreateObject();
if (expected_ue_behaviour_data->stationary_indication) {
- if (cJSON_AddStringToObject(item, "stationaryIndication", OpenAPI_stationary_indication_ToString(expected_ue_behaviour_data->stationary_indication)) == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [stationary_indication]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "stationaryIndication", OpenAPI_stationary_indication_ToString(expected_ue_behaviour_data->stationary_indication)) == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [stationary_indication]");
+ goto end;
+ }
}
if (expected_ue_behaviour_data->communication_duration_time) {
- if (cJSON_AddNumberToObject(item, "communicationDurationTime", expected_ue_behaviour_data->communication_duration_time) == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [communication_duration_time]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "communicationDurationTime", expected_ue_behaviour_data->communication_duration_time) == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [communication_duration_time]");
+ goto end;
+ }
}
if (expected_ue_behaviour_data->periodic_time) {
- if (cJSON_AddNumberToObject(item, "periodicTime", expected_ue_behaviour_data->periodic_time) == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [periodic_time]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "periodicTime", expected_ue_behaviour_data->periodic_time) == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [periodic_time]");
+ goto end;
+ }
}
if (expected_ue_behaviour_data->scheduled_communication_time) {
- cJSON *scheduled_communication_time_local_JSON = OpenAPI_scheduled_communication_time_convertToJSON(expected_ue_behaviour_data->scheduled_communication_time);
- if (scheduled_communication_time_local_JSON == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [scheduled_communication_time]");
- goto end;
- }
- cJSON_AddItemToObject(item, "scheduledCommunicationTime", scheduled_communication_time_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [scheduled_communication_time]");
- goto end;
- }
+ cJSON *scheduled_communication_time_local_JSON = OpenAPI_scheduled_communication_time_convertToJSON(expected_ue_behaviour_data->scheduled_communication_time);
+ if (scheduled_communication_time_local_JSON == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [scheduled_communication_time]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "scheduledCommunicationTime", scheduled_communication_time_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [scheduled_communication_time]");
+ goto end;
+ }
}
if (expected_ue_behaviour_data->scheduled_communication_type) {
- if (cJSON_AddStringToObject(item, "scheduledCommunicationType", OpenAPI_scheduled_communication_type_ToString(expected_ue_behaviour_data->scheduled_communication_type)) == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [scheduled_communication_type]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "scheduledCommunicationType", OpenAPI_scheduled_communication_type_ToString(expected_ue_behaviour_data->scheduled_communication_type)) == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [scheduled_communication_type]");
+ goto end;
+ }
}
if (expected_ue_behaviour_data->expected_umts) {
- cJSON *expected_umtsList = cJSON_AddArrayToObject(item, "expectedUmts");
- if (expected_umtsList == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [expected_umts]");
- goto end;
- }
+ cJSON *expected_umtsList = cJSON_AddArrayToObject(item, "expectedUmts");
+ if (expected_umtsList == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [expected_umts]");
+ goto end;
+ }
- OpenAPI_lnode_t *expected_umts_node;
- if (expected_ue_behaviour_data->expected_umts) {
- OpenAPI_list_for_each(expected_ue_behaviour_data->expected_umts, expected_umts_node) {
- cJSON *itemLocal = OpenAPI_location_area_convertToJSON(expected_umts_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [expected_umts]");
- goto end;
- }
- cJSON_AddItemToArray(expected_umtsList, itemLocal);
+ OpenAPI_lnode_t *expected_umts_node;
+ if (expected_ue_behaviour_data->expected_umts) {
+ OpenAPI_list_for_each(expected_ue_behaviour_data->expected_umts, expected_umts_node) {
+ cJSON *itemLocal = OpenAPI_location_area_convertToJSON(expected_umts_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [expected_umts]");
+ goto end;
}
+ cJSON_AddItemToArray(expected_umtsList, itemLocal);
}
}
+ }
if (expected_ue_behaviour_data->traffic_profile) {
- if (cJSON_AddStringToObject(item, "trafficProfile", OpenAPI_traffic_profile_ToString(expected_ue_behaviour_data->traffic_profile)) == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [traffic_profile]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "trafficProfile", OpenAPI_traffic_profile_ToString(expected_ue_behaviour_data->traffic_profile)) == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [traffic_profile]");
+ goto end;
+ }
}
if (expected_ue_behaviour_data->battery_indication) {
- cJSON *battery_indication_local_JSON = OpenAPI_battery_indication_convertToJSON(expected_ue_behaviour_data->battery_indication);
- if (battery_indication_local_JSON == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [battery_indication]");
- goto end;
- }
- cJSON_AddItemToObject(item, "batteryIndication", battery_indication_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [battery_indication]");
- goto end;
- }
+ cJSON *battery_indication_local_JSON = OpenAPI_battery_indication_convertToJSON(expected_ue_behaviour_data->battery_indication);
+ if (battery_indication_local_JSON == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [battery_indication]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "batteryIndication", battery_indication_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [battery_indication]");
+ goto end;
+ }
}
if (expected_ue_behaviour_data->validity_time) {
- if (cJSON_AddStringToObject(item, "validityTime", expected_ue_behaviour_data->validity_time) == NULL) {
- ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [validity_time]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "validityTime", expected_ue_behaviour_data->validity_time) == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_convertToJSON() failed [validity_time]");
+ goto end;
+ }
}
end:
@@ -157,98 +157,98 @@ OpenAPI_expected_ue_behaviour_data_t *OpenAPI_expected_ue_behaviour_data_parseFr
cJSON *stationary_indication = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_dataJSON, "stationaryIndication");
OpenAPI_stationary_indication_e stationary_indicationVariable;
- if (stationary_indication) {
- if (!cJSON_IsString(stationary_indication)) {
- ogs_error("OpenAPI_expected_ue_behaviour_data_parseFromJSON() failed [stationary_indication]");
- goto end;
- }
- stationary_indicationVariable = OpenAPI_stationary_indication_FromString(stationary_indication->valuestring);
+ if (stationary_indication) {
+ if (!cJSON_IsString(stationary_indication)) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_parseFromJSON() failed [stationary_indication]");
+ goto end;
+ }
+ stationary_indicationVariable = OpenAPI_stationary_indication_FromString(stationary_indication->valuestring);
}
cJSON *communication_duration_time = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_dataJSON, "communicationDurationTime");
- if (communication_duration_time) {
- if (!cJSON_IsNumber(communication_duration_time)) {
- ogs_error("OpenAPI_expected_ue_behaviour_data_parseFromJSON() failed [communication_duration_time]");
- goto end;
- }
+ if (communication_duration_time) {
+ if (!cJSON_IsNumber(communication_duration_time)) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_parseFromJSON() failed [communication_duration_time]");
+ goto end;
+ }
}
cJSON *periodic_time = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_dataJSON, "periodicTime");
- if (periodic_time) {
- if (!cJSON_IsNumber(periodic_time)) {
- ogs_error("OpenAPI_expected_ue_behaviour_data_parseFromJSON() failed [periodic_time]");
- goto end;
- }
+ if (periodic_time) {
+ if (!cJSON_IsNumber(periodic_time)) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_parseFromJSON() failed [periodic_time]");
+ goto end;
+ }
}
cJSON *scheduled_communication_time = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_dataJSON, "scheduledCommunicationTime");
OpenAPI_scheduled_communication_time_t *scheduled_communication_time_local_nonprim = NULL;
- if (scheduled_communication_time) {
- scheduled_communication_time_local_nonprim = OpenAPI_scheduled_communication_time_parseFromJSON(scheduled_communication_time);
+ if (scheduled_communication_time) {
+ scheduled_communication_time_local_nonprim = OpenAPI_scheduled_communication_time_parseFromJSON(scheduled_communication_time);
}
cJSON *scheduled_communication_type = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_dataJSON, "scheduledCommunicationType");
OpenAPI_scheduled_communication_type_e scheduled_communication_typeVariable;
- if (scheduled_communication_type) {
- if (!cJSON_IsString(scheduled_communication_type)) {
- ogs_error("OpenAPI_expected_ue_behaviour_data_parseFromJSON() failed [scheduled_communication_type]");
- goto end;
- }
- scheduled_communication_typeVariable = OpenAPI_scheduled_communication_type_FromString(scheduled_communication_type->valuestring);
+ if (scheduled_communication_type) {
+ if (!cJSON_IsString(scheduled_communication_type)) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_parseFromJSON() failed [scheduled_communication_type]");
+ goto end;
+ }
+ scheduled_communication_typeVariable = OpenAPI_scheduled_communication_type_FromString(scheduled_communication_type->valuestring);
}
cJSON *expected_umts = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_dataJSON, "expectedUmts");
OpenAPI_list_t *expected_umtsList;
- if (expected_umts) {
- cJSON *expected_umts_local_nonprimitive;
- if (!cJSON_IsArray(expected_umts)) {
+ if (expected_umts) {
+ cJSON *expected_umts_local_nonprimitive;
+ if (!cJSON_IsArray(expected_umts)){
+ ogs_error("OpenAPI_expected_ue_behaviour_data_parseFromJSON() failed [expected_umts]");
+ goto end;
+ }
+
+ expected_umtsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(expected_umts_local_nonprimitive, expected_umts ) {
+ if (!cJSON_IsObject(expected_umts_local_nonprimitive)) {
ogs_error("OpenAPI_expected_ue_behaviour_data_parseFromJSON() failed [expected_umts]");
goto end;
}
+ OpenAPI_location_area_t *expected_umtsItem = OpenAPI_location_area_parseFromJSON(expected_umts_local_nonprimitive);
- expected_umtsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(expected_umts_local_nonprimitive, expected_umts ) {
- if (!cJSON_IsObject(expected_umts_local_nonprimitive)) {
- ogs_error("OpenAPI_expected_ue_behaviour_data_parseFromJSON() failed [expected_umts]");
- goto end;
- }
- OpenAPI_location_area_t *expected_umtsItem = OpenAPI_location_area_parseFromJSON(expected_umts_local_nonprimitive);
-
- OpenAPI_list_add(expected_umtsList, expected_umtsItem);
- }
+ OpenAPI_list_add(expected_umtsList, expected_umtsItem);
+ }
}
cJSON *traffic_profile = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_dataJSON, "trafficProfile");
OpenAPI_traffic_profile_e traffic_profileVariable;
- if (traffic_profile) {
- if (!cJSON_IsString(traffic_profile)) {
- ogs_error("OpenAPI_expected_ue_behaviour_data_parseFromJSON() failed [traffic_profile]");
- goto end;
- }
- traffic_profileVariable = OpenAPI_traffic_profile_FromString(traffic_profile->valuestring);
+ if (traffic_profile) {
+ if (!cJSON_IsString(traffic_profile)) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_parseFromJSON() failed [traffic_profile]");
+ goto end;
+ }
+ traffic_profileVariable = OpenAPI_traffic_profile_FromString(traffic_profile->valuestring);
}
cJSON *battery_indication = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_dataJSON, "batteryIndication");
OpenAPI_battery_indication_t *battery_indication_local_nonprim = NULL;
- if (battery_indication) {
- battery_indication_local_nonprim = OpenAPI_battery_indication_parseFromJSON(battery_indication);
+ if (battery_indication) {
+ battery_indication_local_nonprim = OpenAPI_battery_indication_parseFromJSON(battery_indication);
}
cJSON *validity_time = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_dataJSON, "validityTime");
- if (validity_time) {
- if (!cJSON_IsString(validity_time)) {
- ogs_error("OpenAPI_expected_ue_behaviour_data_parseFromJSON() failed [validity_time]");
- goto end;
- }
+ if (validity_time) {
+ if (!cJSON_IsString(validity_time)) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_parseFromJSON() failed [validity_time]");
+ goto end;
+ }
}
expected_ue_behaviour_data_local_var = OpenAPI_expected_ue_behaviour_data_create (
@@ -261,7 +261,7 @@ OpenAPI_expected_ue_behaviour_data_t *OpenAPI_expected_ue_behaviour_data_parseFr
traffic_profile ? traffic_profileVariable : 0,
battery_indication ? battery_indication_local_nonprim : NULL,
validity_time ? ogs_strdup_or_assert(validity_time->valuestring) : NULL
- );
+ );
return expected_ue_behaviour_data_local_var;
end:
diff --git a/lib/sbi/openapi/model/expected_ue_behaviour_data.h b/lib/sbi/openapi/model/expected_ue_behaviour_data.h
index e7d804699..157807b38 100644
--- a/lib/sbi/openapi/model/expected_ue_behaviour_data.h
+++ b/lib/sbi/openapi/model/expected_ue_behaviour_data.h
@@ -1,7 +1,7 @@
/*
* expected_ue_behaviour_data.h
*
- *
+ *
*/
#ifndef _OpenAPI_expected_ue_behaviour_data_H_
@@ -46,7 +46,7 @@ OpenAPI_expected_ue_behaviour_data_t *OpenAPI_expected_ue_behaviour_data_create(
OpenAPI_traffic_profile_e traffic_profile,
OpenAPI_battery_indication_t *battery_indication,
char *validity_time
- );
+);
void OpenAPI_expected_ue_behaviour_data_free(OpenAPI_expected_ue_behaviour_data_t *expected_ue_behaviour_data);
OpenAPI_expected_ue_behaviour_data_t *OpenAPI_expected_ue_behaviour_data_parseFromJSON(cJSON *expected_ue_behaviour_dataJSON);
cJSON *OpenAPI_expected_ue_behaviour_data_convertToJSON(OpenAPI_expected_ue_behaviour_data_t *expected_ue_behaviour_data);
diff --git a/lib/sbi/openapi/model/expected_ue_behaviour_data_1.c b/lib/sbi/openapi/model/expected_ue_behaviour_data_1.c
new file mode 100644
index 000000000..3a443f928
--- /dev/null
+++ b/lib/sbi/openapi/model/expected_ue_behaviour_data_1.c
@@ -0,0 +1,304 @@
+
+#include
+#include
+#include
+#include "expected_ue_behaviour_data_1.h"
+
+OpenAPI_expected_ue_behaviour_data_1_t *OpenAPI_expected_ue_behaviour_data_1_create(
+ OpenAPI_stationary_indication_e stationary_indication,
+ int communication_duration_time,
+ int periodic_time,
+ OpenAPI_scheduled_communication_time_1_t *scheduled_communication_time,
+ OpenAPI_scheduled_communication_type_e scheduled_communication_type,
+ OpenAPI_list_t *expected_umts,
+ OpenAPI_traffic_profile_e traffic_profile,
+ OpenAPI_battery_indication_t *battery_indication,
+ char *validity_time
+)
+{
+ OpenAPI_expected_ue_behaviour_data_1_t *expected_ue_behaviour_data_1_local_var = OpenAPI_malloc(sizeof(OpenAPI_expected_ue_behaviour_data_1_t));
+ if (!expected_ue_behaviour_data_1_local_var) {
+ return NULL;
+ }
+ expected_ue_behaviour_data_1_local_var->stationary_indication = stationary_indication;
+ expected_ue_behaviour_data_1_local_var->communication_duration_time = communication_duration_time;
+ expected_ue_behaviour_data_1_local_var->periodic_time = periodic_time;
+ expected_ue_behaviour_data_1_local_var->scheduled_communication_time = scheduled_communication_time;
+ expected_ue_behaviour_data_1_local_var->scheduled_communication_type = scheduled_communication_type;
+ expected_ue_behaviour_data_1_local_var->expected_umts = expected_umts;
+ expected_ue_behaviour_data_1_local_var->traffic_profile = traffic_profile;
+ expected_ue_behaviour_data_1_local_var->battery_indication = battery_indication;
+ expected_ue_behaviour_data_1_local_var->validity_time = validity_time;
+
+ return expected_ue_behaviour_data_1_local_var;
+}
+
+void OpenAPI_expected_ue_behaviour_data_1_free(OpenAPI_expected_ue_behaviour_data_1_t *expected_ue_behaviour_data_1)
+{
+ if (NULL == expected_ue_behaviour_data_1) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ OpenAPI_scheduled_communication_time_1_free(expected_ue_behaviour_data_1->scheduled_communication_time);
+ OpenAPI_list_for_each(expected_ue_behaviour_data_1->expected_umts, node) {
+ OpenAPI_location_area_1_free(node->data);
+ }
+ OpenAPI_list_free(expected_ue_behaviour_data_1->expected_umts);
+ OpenAPI_battery_indication_free(expected_ue_behaviour_data_1->battery_indication);
+ ogs_free(expected_ue_behaviour_data_1->validity_time);
+ ogs_free(expected_ue_behaviour_data_1);
+}
+
+cJSON *OpenAPI_expected_ue_behaviour_data_1_convertToJSON(OpenAPI_expected_ue_behaviour_data_1_t *expected_ue_behaviour_data_1)
+{
+ cJSON *item = NULL;
+
+ if (expected_ue_behaviour_data_1 == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_1_convertToJSON() failed [ExpectedUeBehaviourData_1]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (expected_ue_behaviour_data_1->stationary_indication) {
+ if (cJSON_AddStringToObject(item, "stationaryIndication", OpenAPI_stationary_indication_ToString(expected_ue_behaviour_data_1->stationary_indication)) == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_1_convertToJSON() failed [stationary_indication]");
+ goto end;
+ }
+ }
+
+ if (expected_ue_behaviour_data_1->communication_duration_time) {
+ if (cJSON_AddNumberToObject(item, "communicationDurationTime", expected_ue_behaviour_data_1->communication_duration_time) == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_1_convertToJSON() failed [communication_duration_time]");
+ goto end;
+ }
+ }
+
+ if (expected_ue_behaviour_data_1->periodic_time) {
+ if (cJSON_AddNumberToObject(item, "periodicTime", expected_ue_behaviour_data_1->periodic_time) == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_1_convertToJSON() failed [periodic_time]");
+ goto end;
+ }
+ }
+
+ if (expected_ue_behaviour_data_1->scheduled_communication_time) {
+ cJSON *scheduled_communication_time_local_JSON = OpenAPI_scheduled_communication_time_1_convertToJSON(expected_ue_behaviour_data_1->scheduled_communication_time);
+ if (scheduled_communication_time_local_JSON == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_1_convertToJSON() failed [scheduled_communication_time]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "scheduledCommunicationTime", scheduled_communication_time_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_1_convertToJSON() failed [scheduled_communication_time]");
+ goto end;
+ }
+ }
+
+ if (expected_ue_behaviour_data_1->scheduled_communication_type) {
+ if (cJSON_AddStringToObject(item, "scheduledCommunicationType", OpenAPI_scheduled_communication_type_ToString(expected_ue_behaviour_data_1->scheduled_communication_type)) == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_1_convertToJSON() failed [scheduled_communication_type]");
+ goto end;
+ }
+ }
+
+ if (expected_ue_behaviour_data_1->expected_umts) {
+ cJSON *expected_umtsList = cJSON_AddArrayToObject(item, "expectedUmts");
+ if (expected_umtsList == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_1_convertToJSON() failed [expected_umts]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *expected_umts_node;
+ if (expected_ue_behaviour_data_1->expected_umts) {
+ OpenAPI_list_for_each(expected_ue_behaviour_data_1->expected_umts, expected_umts_node) {
+ cJSON *itemLocal = OpenAPI_location_area_1_convertToJSON(expected_umts_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_1_convertToJSON() failed [expected_umts]");
+ goto end;
+ }
+ cJSON_AddItemToArray(expected_umtsList, itemLocal);
+ }
+ }
+ }
+
+ if (expected_ue_behaviour_data_1->traffic_profile) {
+ if (cJSON_AddStringToObject(item, "trafficProfile", OpenAPI_traffic_profile_ToString(expected_ue_behaviour_data_1->traffic_profile)) == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_1_convertToJSON() failed [traffic_profile]");
+ goto end;
+ }
+ }
+
+ if (expected_ue_behaviour_data_1->battery_indication) {
+ cJSON *battery_indication_local_JSON = OpenAPI_battery_indication_convertToJSON(expected_ue_behaviour_data_1->battery_indication);
+ if (battery_indication_local_JSON == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_1_convertToJSON() failed [battery_indication]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "batteryIndication", battery_indication_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_1_convertToJSON() failed [battery_indication]");
+ goto end;
+ }
+ }
+
+ if (expected_ue_behaviour_data_1->validity_time) {
+ if (cJSON_AddStringToObject(item, "validityTime", expected_ue_behaviour_data_1->validity_time) == NULL) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_1_convertToJSON() failed [validity_time]");
+ goto end;
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_expected_ue_behaviour_data_1_t *OpenAPI_expected_ue_behaviour_data_1_parseFromJSON(cJSON *expected_ue_behaviour_data_1JSON)
+{
+ OpenAPI_expected_ue_behaviour_data_1_t *expected_ue_behaviour_data_1_local_var = NULL;
+ cJSON *stationary_indication = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_data_1JSON, "stationaryIndication");
+
+ OpenAPI_stationary_indication_e stationary_indicationVariable;
+ if (stationary_indication) {
+ if (!cJSON_IsString(stationary_indication)) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_1_parseFromJSON() failed [stationary_indication]");
+ goto end;
+ }
+ stationary_indicationVariable = OpenAPI_stationary_indication_FromString(stationary_indication->valuestring);
+ }
+
+ cJSON *communication_duration_time = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_data_1JSON, "communicationDurationTime");
+
+ if (communication_duration_time) {
+ if (!cJSON_IsNumber(communication_duration_time)) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_1_parseFromJSON() failed [communication_duration_time]");
+ goto end;
+ }
+ }
+
+ cJSON *periodic_time = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_data_1JSON, "periodicTime");
+
+ if (periodic_time) {
+ if (!cJSON_IsNumber(periodic_time)) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_1_parseFromJSON() failed [periodic_time]");
+ goto end;
+ }
+ }
+
+ cJSON *scheduled_communication_time = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_data_1JSON, "scheduledCommunicationTime");
+
+ OpenAPI_scheduled_communication_time_1_t *scheduled_communication_time_local_nonprim = NULL;
+ if (scheduled_communication_time) {
+ scheduled_communication_time_local_nonprim = OpenAPI_scheduled_communication_time_1_parseFromJSON(scheduled_communication_time);
+ }
+
+ cJSON *scheduled_communication_type = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_data_1JSON, "scheduledCommunicationType");
+
+ OpenAPI_scheduled_communication_type_e scheduled_communication_typeVariable;
+ if (scheduled_communication_type) {
+ if (!cJSON_IsString(scheduled_communication_type)) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_1_parseFromJSON() failed [scheduled_communication_type]");
+ goto end;
+ }
+ scheduled_communication_typeVariable = OpenAPI_scheduled_communication_type_FromString(scheduled_communication_type->valuestring);
+ }
+
+ cJSON *expected_umts = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_data_1JSON, "expectedUmts");
+
+ OpenAPI_list_t *expected_umtsList;
+ if (expected_umts) {
+ cJSON *expected_umts_local_nonprimitive;
+ if (!cJSON_IsArray(expected_umts)){
+ ogs_error("OpenAPI_expected_ue_behaviour_data_1_parseFromJSON() failed [expected_umts]");
+ goto end;
+ }
+
+ expected_umtsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(expected_umts_local_nonprimitive, expected_umts ) {
+ if (!cJSON_IsObject(expected_umts_local_nonprimitive)) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_1_parseFromJSON() failed [expected_umts]");
+ goto end;
+ }
+ OpenAPI_location_area_1_t *expected_umtsItem = OpenAPI_location_area_1_parseFromJSON(expected_umts_local_nonprimitive);
+
+ OpenAPI_list_add(expected_umtsList, expected_umtsItem);
+ }
+ }
+
+ cJSON *traffic_profile = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_data_1JSON, "trafficProfile");
+
+ OpenAPI_traffic_profile_e traffic_profileVariable;
+ if (traffic_profile) {
+ if (!cJSON_IsString(traffic_profile)) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_1_parseFromJSON() failed [traffic_profile]");
+ goto end;
+ }
+ traffic_profileVariable = OpenAPI_traffic_profile_FromString(traffic_profile->valuestring);
+ }
+
+ cJSON *battery_indication = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_data_1JSON, "batteryIndication");
+
+ OpenAPI_battery_indication_t *battery_indication_local_nonprim = NULL;
+ if (battery_indication) {
+ battery_indication_local_nonprim = OpenAPI_battery_indication_parseFromJSON(battery_indication);
+ }
+
+ cJSON *validity_time = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_data_1JSON, "validityTime");
+
+ if (validity_time) {
+ if (!cJSON_IsString(validity_time)) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_1_parseFromJSON() failed [validity_time]");
+ goto end;
+ }
+ }
+
+ expected_ue_behaviour_data_1_local_var = OpenAPI_expected_ue_behaviour_data_1_create (
+ stationary_indication ? stationary_indicationVariable : 0,
+ communication_duration_time ? communication_duration_time->valuedouble : 0,
+ periodic_time ? periodic_time->valuedouble : 0,
+ scheduled_communication_time ? scheduled_communication_time_local_nonprim : NULL,
+ scheduled_communication_type ? scheduled_communication_typeVariable : 0,
+ expected_umts ? expected_umtsList : NULL,
+ traffic_profile ? traffic_profileVariable : 0,
+ battery_indication ? battery_indication_local_nonprim : NULL,
+ validity_time ? ogs_strdup_or_assert(validity_time->valuestring) : NULL
+ );
+
+ return expected_ue_behaviour_data_1_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_expected_ue_behaviour_data_1_t *OpenAPI_expected_ue_behaviour_data_1_copy(OpenAPI_expected_ue_behaviour_data_1_t *dst, OpenAPI_expected_ue_behaviour_data_1_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_expected_ue_behaviour_data_1_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_expected_ue_behaviour_data_1_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_expected_ue_behaviour_data_1_free(dst);
+ dst = OpenAPI_expected_ue_behaviour_data_1_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/expected_ue_behaviour_data_1.h b/lib/sbi/openapi/model/expected_ue_behaviour_data_1.h
new file mode 100644
index 000000000..228633824
--- /dev/null
+++ b/lib/sbi/openapi/model/expected_ue_behaviour_data_1.h
@@ -0,0 +1,60 @@
+/*
+ * expected_ue_behaviour_data_1.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_expected_ue_behaviour_data_1_H_
+#define _OpenAPI_expected_ue_behaviour_data_1_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+#include "battery_indication.h"
+#include "location_area_1.h"
+#include "scheduled_communication_time_1.h"
+#include "scheduled_communication_type.h"
+#include "stationary_indication.h"
+#include "traffic_profile.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_expected_ue_behaviour_data_1_s OpenAPI_expected_ue_behaviour_data_1_t;
+typedef struct OpenAPI_expected_ue_behaviour_data_1_s {
+ OpenAPI_stationary_indication_e stationary_indication;
+ int communication_duration_time;
+ int periodic_time;
+ struct OpenAPI_scheduled_communication_time_1_s *scheduled_communication_time;
+ OpenAPI_scheduled_communication_type_e scheduled_communication_type;
+ OpenAPI_list_t *expected_umts;
+ OpenAPI_traffic_profile_e traffic_profile;
+ struct OpenAPI_battery_indication_s *battery_indication;
+ char *validity_time;
+} OpenAPI_expected_ue_behaviour_data_1_t;
+
+OpenAPI_expected_ue_behaviour_data_1_t *OpenAPI_expected_ue_behaviour_data_1_create(
+ OpenAPI_stationary_indication_e stationary_indication,
+ int communication_duration_time,
+ int periodic_time,
+ OpenAPI_scheduled_communication_time_1_t *scheduled_communication_time,
+ OpenAPI_scheduled_communication_type_e scheduled_communication_type,
+ OpenAPI_list_t *expected_umts,
+ OpenAPI_traffic_profile_e traffic_profile,
+ OpenAPI_battery_indication_t *battery_indication,
+ char *validity_time
+);
+void OpenAPI_expected_ue_behaviour_data_1_free(OpenAPI_expected_ue_behaviour_data_1_t *expected_ue_behaviour_data_1);
+OpenAPI_expected_ue_behaviour_data_1_t *OpenAPI_expected_ue_behaviour_data_1_parseFromJSON(cJSON *expected_ue_behaviour_data_1JSON);
+cJSON *OpenAPI_expected_ue_behaviour_data_1_convertToJSON(OpenAPI_expected_ue_behaviour_data_1_t *expected_ue_behaviour_data_1);
+OpenAPI_expected_ue_behaviour_data_1_t *OpenAPI_expected_ue_behaviour_data_1_copy(OpenAPI_expected_ue_behaviour_data_1_t *dst, OpenAPI_expected_ue_behaviour_data_1_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_expected_ue_behaviour_data_1_H_ */
+
diff --git a/lib/sbi/openapi/model/exposure_data_change_notification.c b/lib/sbi/openapi/model/exposure_data_change_notification.c
index 36676265a..d2ca97937 100644
--- a/lib/sbi/openapi/model/exposure_data_change_notification.c
+++ b/lib/sbi/openapi/model/exposure_data_change_notification.c
@@ -9,7 +9,7 @@ OpenAPI_exposure_data_change_notification_t *OpenAPI_exposure_data_change_notifi
OpenAPI_access_and_mobility_data_t *access_and_mobility_data,
OpenAPI_list_t *pdu_session_management_data,
OpenAPI_list_t *del_resources
- )
+)
{
OpenAPI_exposure_data_change_notification_t *exposure_data_change_notification_local_var = OpenAPI_malloc(sizeof(OpenAPI_exposure_data_change_notification_t));
if (!exposure_data_change_notification_local_var) {
@@ -53,59 +53,59 @@ cJSON *OpenAPI_exposure_data_change_notification_convertToJSON(OpenAPI_exposure_
item = cJSON_CreateObject();
if (exposure_data_change_notification->ue_id) {
- if (cJSON_AddStringToObject(item, "ueId", exposure_data_change_notification->ue_id) == NULL) {
- ogs_error("OpenAPI_exposure_data_change_notification_convertToJSON() failed [ue_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "ueId", exposure_data_change_notification->ue_id) == NULL) {
+ ogs_error("OpenAPI_exposure_data_change_notification_convertToJSON() failed [ue_id]");
+ goto end;
+ }
}
if (exposure_data_change_notification->access_and_mobility_data) {
- cJSON *access_and_mobility_data_local_JSON = OpenAPI_access_and_mobility_data_convertToJSON(exposure_data_change_notification->access_and_mobility_data);
- if (access_and_mobility_data_local_JSON == NULL) {
- ogs_error("OpenAPI_exposure_data_change_notification_convertToJSON() failed [access_and_mobility_data]");
- goto end;
- }
- cJSON_AddItemToObject(item, "accessAndMobilityData", access_and_mobility_data_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_exposure_data_change_notification_convertToJSON() failed [access_and_mobility_data]");
- goto end;
- }
+ cJSON *access_and_mobility_data_local_JSON = OpenAPI_access_and_mobility_data_convertToJSON(exposure_data_change_notification->access_and_mobility_data);
+ if (access_and_mobility_data_local_JSON == NULL) {
+ ogs_error("OpenAPI_exposure_data_change_notification_convertToJSON() failed [access_and_mobility_data]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "accessAndMobilityData", access_and_mobility_data_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_exposure_data_change_notification_convertToJSON() failed [access_and_mobility_data]");
+ goto end;
+ }
}
if (exposure_data_change_notification->pdu_session_management_data) {
- cJSON *pdu_session_management_dataList = cJSON_AddArrayToObject(item, "pduSessionManagementData");
- if (pdu_session_management_dataList == NULL) {
- ogs_error("OpenAPI_exposure_data_change_notification_convertToJSON() failed [pdu_session_management_data]");
- goto end;
- }
+ cJSON *pdu_session_management_dataList = cJSON_AddArrayToObject(item, "pduSessionManagementData");
+ if (pdu_session_management_dataList == NULL) {
+ ogs_error("OpenAPI_exposure_data_change_notification_convertToJSON() failed [pdu_session_management_data]");
+ goto end;
+ }
- OpenAPI_lnode_t *pdu_session_management_data_node;
- if (exposure_data_change_notification->pdu_session_management_data) {
- OpenAPI_list_for_each(exposure_data_change_notification->pdu_session_management_data, pdu_session_management_data_node) {
- cJSON *itemLocal = OpenAPI_pdu_session_management_data_convertToJSON(pdu_session_management_data_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_exposure_data_change_notification_convertToJSON() failed [pdu_session_management_data]");
- goto end;
- }
- cJSON_AddItemToArray(pdu_session_management_dataList, itemLocal);
+ OpenAPI_lnode_t *pdu_session_management_data_node;
+ if (exposure_data_change_notification->pdu_session_management_data) {
+ OpenAPI_list_for_each(exposure_data_change_notification->pdu_session_management_data, pdu_session_management_data_node) {
+ cJSON *itemLocal = OpenAPI_pdu_session_management_data_convertToJSON(pdu_session_management_data_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_exposure_data_change_notification_convertToJSON() failed [pdu_session_management_data]");
+ goto end;
}
+ cJSON_AddItemToArray(pdu_session_management_dataList, itemLocal);
}
}
+ }
if (exposure_data_change_notification->del_resources) {
- cJSON *del_resources = cJSON_AddArrayToObject(item, "delResources");
- if (del_resources == NULL) {
- ogs_error("OpenAPI_exposure_data_change_notification_convertToJSON() failed [del_resources]");
- goto end;
- }
+ cJSON *del_resources = cJSON_AddArrayToObject(item, "delResources");
+ if (del_resources == NULL) {
+ ogs_error("OpenAPI_exposure_data_change_notification_convertToJSON() failed [del_resources]");
+ goto end;
+ }
- OpenAPI_lnode_t *del_resources_node;
- OpenAPI_list_for_each(exposure_data_change_notification->del_resources, del_resources_node) {
- if (cJSON_AddStringToObject(del_resources, "", (char*)del_resources_node->data) == NULL) {
- ogs_error("OpenAPI_exposure_data_change_notification_convertToJSON() failed [del_resources]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *del_resources_node;
+ OpenAPI_list_for_each(exposure_data_change_notification->del_resources, del_resources_node) {
+ if (cJSON_AddStringToObject(del_resources, "", (char*)del_resources_node->data) == NULL) {
+ ogs_error("OpenAPI_exposure_data_change_notification_convertToJSON() failed [del_resources]");
+ goto end;
+ }
+ }
}
end:
@@ -117,61 +117,61 @@ OpenAPI_exposure_data_change_notification_t *OpenAPI_exposure_data_change_notifi
OpenAPI_exposure_data_change_notification_t *exposure_data_change_notification_local_var = NULL;
cJSON *ue_id = cJSON_GetObjectItemCaseSensitive(exposure_data_change_notificationJSON, "ueId");
- if (ue_id) {
- if (!cJSON_IsString(ue_id)) {
- ogs_error("OpenAPI_exposure_data_change_notification_parseFromJSON() failed [ue_id]");
- goto end;
- }
+ if (ue_id) {
+ if (!cJSON_IsString(ue_id)) {
+ ogs_error("OpenAPI_exposure_data_change_notification_parseFromJSON() failed [ue_id]");
+ goto end;
+ }
}
cJSON *access_and_mobility_data = cJSON_GetObjectItemCaseSensitive(exposure_data_change_notificationJSON, "accessAndMobilityData");
OpenAPI_access_and_mobility_data_t *access_and_mobility_data_local_nonprim = NULL;
- if (access_and_mobility_data) {
- access_and_mobility_data_local_nonprim = OpenAPI_access_and_mobility_data_parseFromJSON(access_and_mobility_data);
+ if (access_and_mobility_data) {
+ access_and_mobility_data_local_nonprim = OpenAPI_access_and_mobility_data_parseFromJSON(access_and_mobility_data);
}
cJSON *pdu_session_management_data = cJSON_GetObjectItemCaseSensitive(exposure_data_change_notificationJSON, "pduSessionManagementData");
OpenAPI_list_t *pdu_session_management_dataList;
- if (pdu_session_management_data) {
- cJSON *pdu_session_management_data_local_nonprimitive;
- if (!cJSON_IsArray(pdu_session_management_data)) {
+ if (pdu_session_management_data) {
+ cJSON *pdu_session_management_data_local_nonprimitive;
+ if (!cJSON_IsArray(pdu_session_management_data)){
+ ogs_error("OpenAPI_exposure_data_change_notification_parseFromJSON() failed [pdu_session_management_data]");
+ goto end;
+ }
+
+ pdu_session_management_dataList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(pdu_session_management_data_local_nonprimitive, pdu_session_management_data ) {
+ if (!cJSON_IsObject(pdu_session_management_data_local_nonprimitive)) {
ogs_error("OpenAPI_exposure_data_change_notification_parseFromJSON() failed [pdu_session_management_data]");
goto end;
}
+ OpenAPI_pdu_session_management_data_t *pdu_session_management_dataItem = OpenAPI_pdu_session_management_data_parseFromJSON(pdu_session_management_data_local_nonprimitive);
- pdu_session_management_dataList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(pdu_session_management_data_local_nonprimitive, pdu_session_management_data ) {
- if (!cJSON_IsObject(pdu_session_management_data_local_nonprimitive)) {
- ogs_error("OpenAPI_exposure_data_change_notification_parseFromJSON() failed [pdu_session_management_data]");
- goto end;
- }
- OpenAPI_pdu_session_management_data_t *pdu_session_management_dataItem = OpenAPI_pdu_session_management_data_parseFromJSON(pdu_session_management_data_local_nonprimitive);
-
- OpenAPI_list_add(pdu_session_management_dataList, pdu_session_management_dataItem);
- }
+ OpenAPI_list_add(pdu_session_management_dataList, pdu_session_management_dataItem);
+ }
}
cJSON *del_resources = cJSON_GetObjectItemCaseSensitive(exposure_data_change_notificationJSON, "delResources");
OpenAPI_list_t *del_resourcesList;
- if (del_resources) {
- cJSON *del_resources_local;
- if (!cJSON_IsArray(del_resources)) {
- ogs_error("OpenAPI_exposure_data_change_notification_parseFromJSON() failed [del_resources]");
- goto end;
- }
- del_resourcesList = OpenAPI_list_create();
+ if (del_resources) {
+ cJSON *del_resources_local;
+ if (!cJSON_IsArray(del_resources)) {
+ ogs_error("OpenAPI_exposure_data_change_notification_parseFromJSON() failed [del_resources]");
+ goto end;
+ }
+ del_resourcesList = OpenAPI_list_create();
- cJSON_ArrayForEach(del_resources_local, del_resources) {
- if (!cJSON_IsString(del_resources_local)) {
- ogs_error("OpenAPI_exposure_data_change_notification_parseFromJSON() failed [del_resources]");
- goto end;
- }
- OpenAPI_list_add(del_resourcesList, ogs_strdup_or_assert(del_resources_local->valuestring));
- }
+ cJSON_ArrayForEach(del_resources_local, del_resources) {
+ if (!cJSON_IsString(del_resources_local)) {
+ ogs_error("OpenAPI_exposure_data_change_notification_parseFromJSON() failed [del_resources]");
+ goto end;
+ }
+ OpenAPI_list_add(del_resourcesList , ogs_strdup_or_assert(del_resources_local->valuestring));
+ }
}
exposure_data_change_notification_local_var = OpenAPI_exposure_data_change_notification_create (
@@ -179,7 +179,7 @@ OpenAPI_exposure_data_change_notification_t *OpenAPI_exposure_data_change_notifi
access_and_mobility_data ? access_and_mobility_data_local_nonprim : NULL,
pdu_session_management_data ? pdu_session_management_dataList : NULL,
del_resources ? del_resourcesList : NULL
- );
+ );
return exposure_data_change_notification_local_var;
end:
diff --git a/lib/sbi/openapi/model/exposure_data_change_notification.h b/lib/sbi/openapi/model/exposure_data_change_notification.h
index 29388ceb3..d06b632cf 100644
--- a/lib/sbi/openapi/model/exposure_data_change_notification.h
+++ b/lib/sbi/openapi/model/exposure_data_change_notification.h
@@ -1,7 +1,7 @@
/*
* exposure_data_change_notification.h
*
- *
+ *
*/
#ifndef _OpenAPI_exposure_data_change_notification_H_
@@ -32,7 +32,7 @@ OpenAPI_exposure_data_change_notification_t *OpenAPI_exposure_data_change_notifi
OpenAPI_access_and_mobility_data_t *access_and_mobility_data,
OpenAPI_list_t *pdu_session_management_data,
OpenAPI_list_t *del_resources
- );
+);
void OpenAPI_exposure_data_change_notification_free(OpenAPI_exposure_data_change_notification_t *exposure_data_change_notification);
OpenAPI_exposure_data_change_notification_t *OpenAPI_exposure_data_change_notification_parseFromJSON(cJSON *exposure_data_change_notificationJSON);
cJSON *OpenAPI_exposure_data_change_notification_convertToJSON(OpenAPI_exposure_data_change_notification_t *exposure_data_change_notification);
diff --git a/lib/sbi/openapi/model/exposure_data_subscription.c b/lib/sbi/openapi/model/exposure_data_subscription.c
index 13e3f2a76..3cac4b3eb 100644
--- a/lib/sbi/openapi/model/exposure_data_subscription.c
+++ b/lib/sbi/openapi/model/exposure_data_subscription.c
@@ -9,7 +9,7 @@ OpenAPI_exposure_data_subscription_t *OpenAPI_exposure_data_subscription_create(
OpenAPI_list_t *monitored_resource_uris,
char *expiry,
char *supported_features
- )
+)
{
OpenAPI_exposure_data_subscription_t *exposure_data_subscription_local_var = OpenAPI_malloc(sizeof(OpenAPI_exposure_data_subscription_t));
if (!exposure_data_subscription_local_var) {
@@ -62,24 +62,24 @@ cJSON *OpenAPI_exposure_data_subscription_convertToJSON(OpenAPI_exposure_data_su
OpenAPI_lnode_t *monitored_resource_uris_node;
OpenAPI_list_for_each(exposure_data_subscription->monitored_resource_uris, monitored_resource_uris_node) {
- if (cJSON_AddStringToObject(monitored_resource_uris, "", (char*)monitored_resource_uris_node->data) == NULL) {
- ogs_error("OpenAPI_exposure_data_subscription_convertToJSON() failed [monitored_resource_uris]");
- goto end;
- }
+ if (cJSON_AddStringToObject(monitored_resource_uris, "", (char*)monitored_resource_uris_node->data) == NULL) {
+ ogs_error("OpenAPI_exposure_data_subscription_convertToJSON() failed [monitored_resource_uris]");
+ goto end;
}
+ }
if (exposure_data_subscription->expiry) {
- if (cJSON_AddStringToObject(item, "expiry", exposure_data_subscription->expiry) == NULL) {
- ogs_error("OpenAPI_exposure_data_subscription_convertToJSON() failed [expiry]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "expiry", exposure_data_subscription->expiry) == NULL) {
+ ogs_error("OpenAPI_exposure_data_subscription_convertToJSON() failed [expiry]");
+ goto end;
+ }
}
if (exposure_data_subscription->supported_features) {
- if (cJSON_AddStringToObject(item, "supportedFeatures", exposure_data_subscription->supported_features) == NULL) {
- ogs_error("OpenAPI_exposure_data_subscription_convertToJSON() failed [supported_features]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "supportedFeatures", exposure_data_subscription->supported_features) == NULL) {
+ ogs_error("OpenAPI_exposure_data_subscription_convertToJSON() failed [supported_features]");
+ goto end;
+ }
}
end:
@@ -95,7 +95,7 @@ OpenAPI_exposure_data_subscription_t *OpenAPI_exposure_data_subscription_parseFr
goto end;
}
-
+
if (!cJSON_IsString(notification_uri)) {
ogs_error("OpenAPI_exposure_data_subscription_parseFromJSON() failed [notification_uri]");
goto end;
@@ -108,7 +108,7 @@ OpenAPI_exposure_data_subscription_t *OpenAPI_exposure_data_subscription_parseFr
}
OpenAPI_list_t *monitored_resource_urisList;
-
+
cJSON *monitored_resource_uris_local;
if (!cJSON_IsArray(monitored_resource_uris)) {
ogs_error("OpenAPI_exposure_data_subscription_parseFromJSON() failed [monitored_resource_uris]");
@@ -117,29 +117,29 @@ OpenAPI_exposure_data_subscription_t *OpenAPI_exposure_data_subscription_parseFr
monitored_resource_urisList = OpenAPI_list_create();
cJSON_ArrayForEach(monitored_resource_uris_local, monitored_resource_uris) {
- if (!cJSON_IsString(monitored_resource_uris_local)) {
- ogs_error("OpenAPI_exposure_data_subscription_parseFromJSON() failed [monitored_resource_uris]");
- goto end;
- }
- OpenAPI_list_add(monitored_resource_urisList, ogs_strdup_or_assert(monitored_resource_uris_local->valuestring));
+ if (!cJSON_IsString(monitored_resource_uris_local)) {
+ ogs_error("OpenAPI_exposure_data_subscription_parseFromJSON() failed [monitored_resource_uris]");
+ goto end;
}
+ OpenAPI_list_add(monitored_resource_urisList , ogs_strdup_or_assert(monitored_resource_uris_local->valuestring));
+ }
cJSON *expiry = cJSON_GetObjectItemCaseSensitive(exposure_data_subscriptionJSON, "expiry");
- if (expiry) {
- if (!cJSON_IsString(expiry)) {
- ogs_error("OpenAPI_exposure_data_subscription_parseFromJSON() failed [expiry]");
- goto end;
- }
+ if (expiry) {
+ if (!cJSON_IsString(expiry)) {
+ ogs_error("OpenAPI_exposure_data_subscription_parseFromJSON() failed [expiry]");
+ goto end;
+ }
}
cJSON *supported_features = cJSON_GetObjectItemCaseSensitive(exposure_data_subscriptionJSON, "supportedFeatures");
- if (supported_features) {
- if (!cJSON_IsString(supported_features)) {
- ogs_error("OpenAPI_exposure_data_subscription_parseFromJSON() failed [supported_features]");
- goto end;
- }
+ if (supported_features) {
+ if (!cJSON_IsString(supported_features)) {
+ ogs_error("OpenAPI_exposure_data_subscription_parseFromJSON() failed [supported_features]");
+ goto end;
+ }
}
exposure_data_subscription_local_var = OpenAPI_exposure_data_subscription_create (
@@ -147,7 +147,7 @@ OpenAPI_exposure_data_subscription_t *OpenAPI_exposure_data_subscription_parseFr
monitored_resource_urisList,
expiry ? ogs_strdup_or_assert(expiry->valuestring) : NULL,
supported_features ? ogs_strdup_or_assert(supported_features->valuestring) : NULL
- );
+ );
return exposure_data_subscription_local_var;
end:
diff --git a/lib/sbi/openapi/model/exposure_data_subscription.h b/lib/sbi/openapi/model/exposure_data_subscription.h
index 2cafc0e79..2ab67508c 100644
--- a/lib/sbi/openapi/model/exposure_data_subscription.h
+++ b/lib/sbi/openapi/model/exposure_data_subscription.h
@@ -1,7 +1,7 @@
/*
* exposure_data_subscription.h
*
- *
+ *
*/
#ifndef _OpenAPI_exposure_data_subscription_H_
@@ -30,7 +30,7 @@ OpenAPI_exposure_data_subscription_t *OpenAPI_exposure_data_subscription_create(
OpenAPI_list_t *monitored_resource_uris,
char *expiry,
char *supported_features
- );
+);
void OpenAPI_exposure_data_subscription_free(OpenAPI_exposure_data_subscription_t *exposure_data_subscription);
OpenAPI_exposure_data_subscription_t *OpenAPI_exposure_data_subscription_parseFromJSON(cJSON *exposure_data_subscriptionJSON);
cJSON *OpenAPI_exposure_data_subscription_convertToJSON(OpenAPI_exposure_data_subscription_t *exposure_data_subscription);
diff --git a/lib/sbi/openapi/model/ext_amf_event_subscription.c b/lib/sbi/openapi/model/ext_amf_event_subscription.c
new file mode 100644
index 000000000..279e91bac
--- /dev/null
+++ b/lib/sbi/openapi/model/ext_amf_event_subscription.c
@@ -0,0 +1,447 @@
+
+#include
+#include
+#include
+#include "ext_amf_event_subscription.h"
+
+OpenAPI_ext_amf_event_subscription_t *OpenAPI_ext_amf_event_subscription_create(
+ OpenAPI_list_t *event_list,
+ char *event_notify_uri,
+ char *notify_correlation_id,
+ char *nf_id,
+ char *subs_change_notify_uri,
+ char *subs_change_notify_correlation_id,
+ char *supi,
+ char *group_id,
+ char *gpsi,
+ char *pei,
+ int any_ue,
+ OpenAPI_amf_event_mode_t *options,
+ OpenAPI_nf_type_e source_nf_type,
+ OpenAPI_list_t *binding_info,
+ OpenAPI_nf_type_e subscribing_nf_type
+)
+{
+ OpenAPI_ext_amf_event_subscription_t *ext_amf_event_subscription_local_var = OpenAPI_malloc(sizeof(OpenAPI_ext_amf_event_subscription_t));
+ if (!ext_amf_event_subscription_local_var) {
+ return NULL;
+ }
+ ext_amf_event_subscription_local_var->event_list = event_list;
+ ext_amf_event_subscription_local_var->event_notify_uri = event_notify_uri;
+ ext_amf_event_subscription_local_var->notify_correlation_id = notify_correlation_id;
+ ext_amf_event_subscription_local_var->nf_id = nf_id;
+ ext_amf_event_subscription_local_var->subs_change_notify_uri = subs_change_notify_uri;
+ ext_amf_event_subscription_local_var->subs_change_notify_correlation_id = subs_change_notify_correlation_id;
+ ext_amf_event_subscription_local_var->supi = supi;
+ ext_amf_event_subscription_local_var->group_id = group_id;
+ ext_amf_event_subscription_local_var->gpsi = gpsi;
+ ext_amf_event_subscription_local_var->pei = pei;
+ ext_amf_event_subscription_local_var->any_ue = any_ue;
+ ext_amf_event_subscription_local_var->options = options;
+ ext_amf_event_subscription_local_var->source_nf_type = source_nf_type;
+ ext_amf_event_subscription_local_var->binding_info = binding_info;
+ ext_amf_event_subscription_local_var->subscribing_nf_type = subscribing_nf_type;
+
+ return ext_amf_event_subscription_local_var;
+}
+
+void OpenAPI_ext_amf_event_subscription_free(OpenAPI_ext_amf_event_subscription_t *ext_amf_event_subscription)
+{
+ if (NULL == ext_amf_event_subscription) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ OpenAPI_list_for_each(ext_amf_event_subscription->event_list, node) {
+ OpenAPI_amf_event_free(node->data);
+ }
+ OpenAPI_list_free(ext_amf_event_subscription->event_list);
+ ogs_free(ext_amf_event_subscription->event_notify_uri);
+ ogs_free(ext_amf_event_subscription->notify_correlation_id);
+ ogs_free(ext_amf_event_subscription->nf_id);
+ ogs_free(ext_amf_event_subscription->subs_change_notify_uri);
+ ogs_free(ext_amf_event_subscription->subs_change_notify_correlation_id);
+ ogs_free(ext_amf_event_subscription->supi);
+ ogs_free(ext_amf_event_subscription->group_id);
+ ogs_free(ext_amf_event_subscription->gpsi);
+ ogs_free(ext_amf_event_subscription->pei);
+ OpenAPI_amf_event_mode_free(ext_amf_event_subscription->options);
+ OpenAPI_list_for_each(ext_amf_event_subscription->binding_info, node) {
+ ogs_free(node->data);
+ }
+ OpenAPI_list_free(ext_amf_event_subscription->binding_info);
+ ogs_free(ext_amf_event_subscription);
+}
+
+cJSON *OpenAPI_ext_amf_event_subscription_convertToJSON(OpenAPI_ext_amf_event_subscription_t *ext_amf_event_subscription)
+{
+ cJSON *item = NULL;
+
+ if (ext_amf_event_subscription == NULL) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_convertToJSON() failed [ExtAmfEventSubscription]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ cJSON *event_listList = cJSON_AddArrayToObject(item, "eventList");
+ if (event_listList == NULL) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_convertToJSON() failed [event_list]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *event_list_node;
+ if (ext_amf_event_subscription->event_list) {
+ OpenAPI_list_for_each(ext_amf_event_subscription->event_list, event_list_node) {
+ cJSON *itemLocal = OpenAPI_amf_event_convertToJSON(event_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_convertToJSON() failed [event_list]");
+ goto end;
+ }
+ cJSON_AddItemToArray(event_listList, itemLocal);
+ }
+ }
+
+ if (cJSON_AddStringToObject(item, "eventNotifyUri", ext_amf_event_subscription->event_notify_uri) == NULL) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_convertToJSON() failed [event_notify_uri]");
+ goto end;
+ }
+
+ if (cJSON_AddStringToObject(item, "notifyCorrelationId", ext_amf_event_subscription->notify_correlation_id) == NULL) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_convertToJSON() failed [notify_correlation_id]");
+ goto end;
+ }
+
+ if (cJSON_AddStringToObject(item, "nfId", ext_amf_event_subscription->nf_id) == NULL) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_convertToJSON() failed [nf_id]");
+ goto end;
+ }
+
+ if (ext_amf_event_subscription->subs_change_notify_uri) {
+ if (cJSON_AddStringToObject(item, "subsChangeNotifyUri", ext_amf_event_subscription->subs_change_notify_uri) == NULL) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_convertToJSON() failed [subs_change_notify_uri]");
+ goto end;
+ }
+ }
+
+ if (ext_amf_event_subscription->subs_change_notify_correlation_id) {
+ if (cJSON_AddStringToObject(item, "subsChangeNotifyCorrelationId", ext_amf_event_subscription->subs_change_notify_correlation_id) == NULL) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_convertToJSON() failed [subs_change_notify_correlation_id]");
+ goto end;
+ }
+ }
+
+ if (ext_amf_event_subscription->supi) {
+ if (cJSON_AddStringToObject(item, "supi", ext_amf_event_subscription->supi) == NULL) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_convertToJSON() failed [supi]");
+ goto end;
+ }
+ }
+
+ if (ext_amf_event_subscription->group_id) {
+ if (cJSON_AddStringToObject(item, "groupId", ext_amf_event_subscription->group_id) == NULL) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_convertToJSON() failed [group_id]");
+ goto end;
+ }
+ }
+
+ if (ext_amf_event_subscription->gpsi) {
+ if (cJSON_AddStringToObject(item, "gpsi", ext_amf_event_subscription->gpsi) == NULL) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_convertToJSON() failed [gpsi]");
+ goto end;
+ }
+ }
+
+ if (ext_amf_event_subscription->pei) {
+ if (cJSON_AddStringToObject(item, "pei", ext_amf_event_subscription->pei) == NULL) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_convertToJSON() failed [pei]");
+ goto end;
+ }
+ }
+
+ if (ext_amf_event_subscription->any_ue) {
+ if (cJSON_AddBoolToObject(item, "anyUE", ext_amf_event_subscription->any_ue) == NULL) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_convertToJSON() failed [any_ue]");
+ goto end;
+ }
+ }
+
+ if (ext_amf_event_subscription->options) {
+ cJSON *options_local_JSON = OpenAPI_amf_event_mode_convertToJSON(ext_amf_event_subscription->options);
+ if (options_local_JSON == NULL) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_convertToJSON() failed [options]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "options", options_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_convertToJSON() failed [options]");
+ goto end;
+ }
+ }
+
+ if (ext_amf_event_subscription->source_nf_type) {
+ if (cJSON_AddStringToObject(item, "sourceNfType", OpenAPI_nf_type_ToString(ext_amf_event_subscription->source_nf_type)) == NULL) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_convertToJSON() failed [source_nf_type]");
+ goto end;
+ }
+ }
+
+ if (ext_amf_event_subscription->binding_info) {
+ cJSON *binding_info = cJSON_AddArrayToObject(item, "bindingInfo");
+ if (binding_info == NULL) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_convertToJSON() failed [binding_info]");
+ goto end;
+ }
+
+ OpenAPI_lnode_t *binding_info_node;
+ OpenAPI_list_for_each(ext_amf_event_subscription->binding_info, binding_info_node) {
+ if (cJSON_AddStringToObject(binding_info, "", (char*)binding_info_node->data) == NULL) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_convertToJSON() failed [binding_info]");
+ goto end;
+ }
+ }
+ }
+
+ if (ext_amf_event_subscription->subscribing_nf_type) {
+ if (cJSON_AddStringToObject(item, "subscribingNfType", OpenAPI_nf_type_ToString(ext_amf_event_subscription->subscribing_nf_type)) == NULL) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_convertToJSON() failed [subscribing_nf_type]");
+ goto end;
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_ext_amf_event_subscription_t *OpenAPI_ext_amf_event_subscription_parseFromJSON(cJSON *ext_amf_event_subscriptionJSON)
+{
+ OpenAPI_ext_amf_event_subscription_t *ext_amf_event_subscription_local_var = NULL;
+ cJSON *event_list = cJSON_GetObjectItemCaseSensitive(ext_amf_event_subscriptionJSON, "eventList");
+ if (!event_list) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_parseFromJSON() failed [event_list]");
+ goto end;
+ }
+
+ OpenAPI_list_t *event_listList;
+
+ cJSON *event_list_local_nonprimitive;
+ if (!cJSON_IsArray(event_list)){
+ ogs_error("OpenAPI_ext_amf_event_subscription_parseFromJSON() failed [event_list]");
+ goto end;
+ }
+
+ event_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(event_list_local_nonprimitive, event_list ) {
+ if (!cJSON_IsObject(event_list_local_nonprimitive)) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_parseFromJSON() failed [event_list]");
+ goto end;
+ }
+ OpenAPI_amf_event_t *event_listItem = OpenAPI_amf_event_parseFromJSON(event_list_local_nonprimitive);
+
+ OpenAPI_list_add(event_listList, event_listItem);
+ }
+
+ cJSON *event_notify_uri = cJSON_GetObjectItemCaseSensitive(ext_amf_event_subscriptionJSON, "eventNotifyUri");
+ if (!event_notify_uri) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_parseFromJSON() failed [event_notify_uri]");
+ goto end;
+ }
+
+
+ if (!cJSON_IsString(event_notify_uri)) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_parseFromJSON() failed [event_notify_uri]");
+ goto end;
+ }
+
+ cJSON *notify_correlation_id = cJSON_GetObjectItemCaseSensitive(ext_amf_event_subscriptionJSON, "notifyCorrelationId");
+ if (!notify_correlation_id) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_parseFromJSON() failed [notify_correlation_id]");
+ goto end;
+ }
+
+
+ if (!cJSON_IsString(notify_correlation_id)) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_parseFromJSON() failed [notify_correlation_id]");
+ goto end;
+ }
+
+ cJSON *nf_id = cJSON_GetObjectItemCaseSensitive(ext_amf_event_subscriptionJSON, "nfId");
+ if (!nf_id) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_parseFromJSON() failed [nf_id]");
+ goto end;
+ }
+
+
+ if (!cJSON_IsString(nf_id)) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_parseFromJSON() failed [nf_id]");
+ goto end;
+ }
+
+ cJSON *subs_change_notify_uri = cJSON_GetObjectItemCaseSensitive(ext_amf_event_subscriptionJSON, "subsChangeNotifyUri");
+
+ if (subs_change_notify_uri) {
+ if (!cJSON_IsString(subs_change_notify_uri)) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_parseFromJSON() failed [subs_change_notify_uri]");
+ goto end;
+ }
+ }
+
+ cJSON *subs_change_notify_correlation_id = cJSON_GetObjectItemCaseSensitive(ext_amf_event_subscriptionJSON, "subsChangeNotifyCorrelationId");
+
+ if (subs_change_notify_correlation_id) {
+ if (!cJSON_IsString(subs_change_notify_correlation_id)) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_parseFromJSON() failed [subs_change_notify_correlation_id]");
+ goto end;
+ }
+ }
+
+ cJSON *supi = cJSON_GetObjectItemCaseSensitive(ext_amf_event_subscriptionJSON, "supi");
+
+ if (supi) {
+ if (!cJSON_IsString(supi)) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_parseFromJSON() failed [supi]");
+ goto end;
+ }
+ }
+
+ cJSON *group_id = cJSON_GetObjectItemCaseSensitive(ext_amf_event_subscriptionJSON, "groupId");
+
+ if (group_id) {
+ if (!cJSON_IsString(group_id)) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_parseFromJSON() failed [group_id]");
+ goto end;
+ }
+ }
+
+ cJSON *gpsi = cJSON_GetObjectItemCaseSensitive(ext_amf_event_subscriptionJSON, "gpsi");
+
+ if (gpsi) {
+ if (!cJSON_IsString(gpsi)) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_parseFromJSON() failed [gpsi]");
+ goto end;
+ }
+ }
+
+ cJSON *pei = cJSON_GetObjectItemCaseSensitive(ext_amf_event_subscriptionJSON, "pei");
+
+ if (pei) {
+ if (!cJSON_IsString(pei)) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_parseFromJSON() failed [pei]");
+ goto end;
+ }
+ }
+
+ cJSON *any_ue = cJSON_GetObjectItemCaseSensitive(ext_amf_event_subscriptionJSON, "anyUE");
+
+ if (any_ue) {
+ if (!cJSON_IsBool(any_ue)) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_parseFromJSON() failed [any_ue]");
+ goto end;
+ }
+ }
+
+ cJSON *options = cJSON_GetObjectItemCaseSensitive(ext_amf_event_subscriptionJSON, "options");
+
+ OpenAPI_amf_event_mode_t *options_local_nonprim = NULL;
+ if (options) {
+ options_local_nonprim = OpenAPI_amf_event_mode_parseFromJSON(options);
+ }
+
+ cJSON *source_nf_type = cJSON_GetObjectItemCaseSensitive(ext_amf_event_subscriptionJSON, "sourceNfType");
+
+ OpenAPI_nf_type_e source_nf_typeVariable;
+ if (source_nf_type) {
+ if (!cJSON_IsString(source_nf_type)) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_parseFromJSON() failed [source_nf_type]");
+ goto end;
+ }
+ source_nf_typeVariable = OpenAPI_nf_type_FromString(source_nf_type->valuestring);
+ }
+
+ cJSON *binding_info = cJSON_GetObjectItemCaseSensitive(ext_amf_event_subscriptionJSON, "bindingInfo");
+
+ OpenAPI_list_t *binding_infoList;
+ if (binding_info) {
+ cJSON *binding_info_local;
+ if (!cJSON_IsArray(binding_info)) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_parseFromJSON() failed [binding_info]");
+ goto end;
+ }
+ binding_infoList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(binding_info_local, binding_info) {
+ if (!cJSON_IsString(binding_info_local)) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_parseFromJSON() failed [binding_info]");
+ goto end;
+ }
+ OpenAPI_list_add(binding_infoList , ogs_strdup_or_assert(binding_info_local->valuestring));
+ }
+ }
+
+ cJSON *subscribing_nf_type = cJSON_GetObjectItemCaseSensitive(ext_amf_event_subscriptionJSON, "subscribingNfType");
+
+ OpenAPI_nf_type_e subscribing_nf_typeVariable;
+ if (subscribing_nf_type) {
+ if (!cJSON_IsString(subscribing_nf_type)) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_parseFromJSON() failed [subscribing_nf_type]");
+ goto end;
+ }
+ subscribing_nf_typeVariable = OpenAPI_nf_type_FromString(subscribing_nf_type->valuestring);
+ }
+
+ ext_amf_event_subscription_local_var = OpenAPI_ext_amf_event_subscription_create (
+ event_listList,
+ ogs_strdup_or_assert(event_notify_uri->valuestring),
+ ogs_strdup_or_assert(notify_correlation_id->valuestring),
+ ogs_strdup_or_assert(nf_id->valuestring),
+ subs_change_notify_uri ? ogs_strdup_or_assert(subs_change_notify_uri->valuestring) : NULL,
+ subs_change_notify_correlation_id ? ogs_strdup_or_assert(subs_change_notify_correlation_id->valuestring) : NULL,
+ supi ? ogs_strdup_or_assert(supi->valuestring) : NULL,
+ group_id ? ogs_strdup_or_assert(group_id->valuestring) : NULL,
+ gpsi ? ogs_strdup_or_assert(gpsi->valuestring) : NULL,
+ pei ? ogs_strdup_or_assert(pei->valuestring) : NULL,
+ any_ue ? any_ue->valueint : 0,
+ options ? options_local_nonprim : NULL,
+ source_nf_type ? source_nf_typeVariable : 0,
+ binding_info ? binding_infoList : NULL,
+ subscribing_nf_type ? subscribing_nf_typeVariable : 0
+ );
+
+ return ext_amf_event_subscription_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_ext_amf_event_subscription_t *OpenAPI_ext_amf_event_subscription_copy(OpenAPI_ext_amf_event_subscription_t *dst, OpenAPI_ext_amf_event_subscription_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_ext_amf_event_subscription_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_ext_amf_event_subscription_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_ext_amf_event_subscription_free(dst);
+ dst = OpenAPI_ext_amf_event_subscription_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/ext_amf_event_subscription.h b/lib/sbi/openapi/model/ext_amf_event_subscription.h
new file mode 100644
index 000000000..0e2d1bd7e
--- /dev/null
+++ b/lib/sbi/openapi/model/ext_amf_event_subscription.h
@@ -0,0 +1,71 @@
+/*
+ * ext_amf_event_subscription.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_ext_amf_event_subscription_H_
+#define _OpenAPI_ext_amf_event_subscription_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+#include "amf_event.h"
+#include "amf_event_mode.h"
+#include "amf_event_subscription.h"
+#include "amf_event_subscription_add_info.h"
+#include "nf_type.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_ext_amf_event_subscription_s OpenAPI_ext_amf_event_subscription_t;
+typedef struct OpenAPI_ext_amf_event_subscription_s {
+ OpenAPI_list_t *event_list;
+ char *event_notify_uri;
+ char *notify_correlation_id;
+ char *nf_id;
+ char *subs_change_notify_uri;
+ char *subs_change_notify_correlation_id;
+ char *supi;
+ char *group_id;
+ char *gpsi;
+ char *pei;
+ int any_ue;
+ struct OpenAPI_amf_event_mode_s *options;
+ OpenAPI_nf_type_e source_nf_type;
+ OpenAPI_list_t *binding_info;
+ OpenAPI_nf_type_e subscribing_nf_type;
+} OpenAPI_ext_amf_event_subscription_t;
+
+OpenAPI_ext_amf_event_subscription_t *OpenAPI_ext_amf_event_subscription_create(
+ OpenAPI_list_t *event_list,
+ char *event_notify_uri,
+ char *notify_correlation_id,
+ char *nf_id,
+ char *subs_change_notify_uri,
+ char *subs_change_notify_correlation_id,
+ char *supi,
+ char *group_id,
+ char *gpsi,
+ char *pei,
+ int any_ue,
+ OpenAPI_amf_event_mode_t *options,
+ OpenAPI_nf_type_e source_nf_type,
+ OpenAPI_list_t *binding_info,
+ OpenAPI_nf_type_e subscribing_nf_type
+);
+void OpenAPI_ext_amf_event_subscription_free(OpenAPI_ext_amf_event_subscription_t *ext_amf_event_subscription);
+OpenAPI_ext_amf_event_subscription_t *OpenAPI_ext_amf_event_subscription_parseFromJSON(cJSON *ext_amf_event_subscriptionJSON);
+cJSON *OpenAPI_ext_amf_event_subscription_convertToJSON(OpenAPI_ext_amf_event_subscription_t *ext_amf_event_subscription);
+OpenAPI_ext_amf_event_subscription_t *OpenAPI_ext_amf_event_subscription_copy(OpenAPI_ext_amf_event_subscription_t *dst, OpenAPI_ext_amf_event_subscription_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_ext_amf_event_subscription_H_ */
+
diff --git a/lib/sbi/openapi/model/ext_problem_details.c b/lib/sbi/openapi/model/ext_problem_details.c
index 2bf79dfb6..a7f1a7fd4 100644
--- a/lib/sbi/openapi/model/ext_problem_details.c
+++ b/lib/sbi/openapi/model/ext_problem_details.c
@@ -13,9 +13,11 @@ OpenAPI_ext_problem_details_t *OpenAPI_ext_problem_details_create(
char *cause,
OpenAPI_list_t *invalid_params,
char *supported_features,
- char *target_scp,
+ OpenAPI_access_token_err_t *access_token_error,
+ OpenAPI_access_token_req_t *access_token_request,
+ char *nrf_id,
int remote_error
- )
+)
{
OpenAPI_ext_problem_details_t *ext_problem_details_local_var = OpenAPI_malloc(sizeof(OpenAPI_ext_problem_details_t));
if (!ext_problem_details_local_var) {
@@ -29,7 +31,9 @@ OpenAPI_ext_problem_details_t *OpenAPI_ext_problem_details_create(
ext_problem_details_local_var->cause = cause;
ext_problem_details_local_var->invalid_params = invalid_params;
ext_problem_details_local_var->supported_features = supported_features;
- ext_problem_details_local_var->target_scp = target_scp;
+ ext_problem_details_local_var->access_token_error = access_token_error;
+ ext_problem_details_local_var->access_token_request = access_token_request;
+ ext_problem_details_local_var->nrf_id = nrf_id;
ext_problem_details_local_var->remote_error = remote_error;
return ext_problem_details_local_var;
@@ -51,7 +55,9 @@ void OpenAPI_ext_problem_details_free(OpenAPI_ext_problem_details_t *ext_problem
}
OpenAPI_list_free(ext_problem_details->invalid_params);
ogs_free(ext_problem_details->supported_features);
- ogs_free(ext_problem_details->target_scp);
+ OpenAPI_access_token_err_free(ext_problem_details->access_token_error);
+ OpenAPI_access_token_req_free(ext_problem_details->access_token_request);
+ ogs_free(ext_problem_details->nrf_id);
ogs_free(ext_problem_details);
}
@@ -66,86 +72,112 @@ cJSON *OpenAPI_ext_problem_details_convertToJSON(OpenAPI_ext_problem_details_t *
item = cJSON_CreateObject();
if (ext_problem_details->type) {
- if (cJSON_AddStringToObject(item, "type", ext_problem_details->type) == NULL) {
- ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [type]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "type", ext_problem_details->type) == NULL) {
+ ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [type]");
+ goto end;
+ }
}
if (ext_problem_details->title) {
- if (cJSON_AddStringToObject(item, "title", ext_problem_details->title) == NULL) {
- ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [title]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "title", ext_problem_details->title) == NULL) {
+ ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [title]");
+ goto end;
+ }
}
if (ext_problem_details->status) {
- if (cJSON_AddNumberToObject(item, "status", ext_problem_details->status) == NULL) {
- ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [status]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "status", ext_problem_details->status) == NULL) {
+ ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [status]");
+ goto end;
+ }
}
if (ext_problem_details->detail) {
- if (cJSON_AddStringToObject(item, "detail", ext_problem_details->detail) == NULL) {
- ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [detail]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "detail", ext_problem_details->detail) == NULL) {
+ ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [detail]");
+ goto end;
+ }
}
if (ext_problem_details->instance) {
- if (cJSON_AddStringToObject(item, "instance", ext_problem_details->instance) == NULL) {
- ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [instance]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "instance", ext_problem_details->instance) == NULL) {
+ ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [instance]");
+ goto end;
+ }
}
if (ext_problem_details->cause) {
- if (cJSON_AddStringToObject(item, "cause", ext_problem_details->cause) == NULL) {
- ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [cause]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "cause", ext_problem_details->cause) == NULL) {
+ ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [cause]");
+ goto end;
+ }
}
if (ext_problem_details->invalid_params) {
- cJSON *invalid_paramsList = cJSON_AddArrayToObject(item, "invalidParams");
- if (invalid_paramsList == NULL) {
- ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [invalid_params]");
- goto end;
- }
+ cJSON *invalid_paramsList = cJSON_AddArrayToObject(item, "invalidParams");
+ if (invalid_paramsList == NULL) {
+ ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [invalid_params]");
+ goto end;
+ }
- OpenAPI_lnode_t *invalid_params_node;
- if (ext_problem_details->invalid_params) {
- OpenAPI_list_for_each(ext_problem_details->invalid_params, invalid_params_node) {
- cJSON *itemLocal = OpenAPI_invalid_param_convertToJSON(invalid_params_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [invalid_params]");
- goto end;
- }
- cJSON_AddItemToArray(invalid_paramsList, itemLocal);
+ OpenAPI_lnode_t *invalid_params_node;
+ if (ext_problem_details->invalid_params) {
+ OpenAPI_list_for_each(ext_problem_details->invalid_params, invalid_params_node) {
+ cJSON *itemLocal = OpenAPI_invalid_param_convertToJSON(invalid_params_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [invalid_params]");
+ goto end;
}
+ cJSON_AddItemToArray(invalid_paramsList, itemLocal);
}
}
+ }
if (ext_problem_details->supported_features) {
- if (cJSON_AddStringToObject(item, "supportedFeatures", ext_problem_details->supported_features) == NULL) {
- ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [supported_features]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "supportedFeatures", ext_problem_details->supported_features) == NULL) {
+ ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [supported_features]");
+ goto end;
+ }
}
- if (ext_problem_details->target_scp) {
- if (cJSON_AddStringToObject(item, "targetScp", ext_problem_details->target_scp) == NULL) {
- ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [target_scp]");
- goto end;
- }
+ if (ext_problem_details->access_token_error) {
+ cJSON *access_token_error_local_JSON = OpenAPI_access_token_err_convertToJSON(ext_problem_details->access_token_error);
+ if (access_token_error_local_JSON == NULL) {
+ ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [access_token_error]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "accessTokenError", access_token_error_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [access_token_error]");
+ goto end;
+ }
+ }
+
+ if (ext_problem_details->access_token_request) {
+ cJSON *access_token_request_local_JSON = OpenAPI_access_token_req_convertToJSON(ext_problem_details->access_token_request);
+ if (access_token_request_local_JSON == NULL) {
+ ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [access_token_request]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "accessTokenRequest", access_token_request_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [access_token_request]");
+ goto end;
+ }
+ }
+
+ if (ext_problem_details->nrf_id) {
+ if (cJSON_AddStringToObject(item, "nrfId", ext_problem_details->nrf_id) == NULL) {
+ ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [nrf_id]");
+ goto end;
+ }
}
if (ext_problem_details->remote_error) {
- if (cJSON_AddBoolToObject(item, "remoteError", ext_problem_details->remote_error) == NULL) {
- ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [remote_error]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "remoteError", ext_problem_details->remote_error) == NULL) {
+ ogs_error("OpenAPI_ext_problem_details_convertToJSON() failed [remote_error]");
+ goto end;
+ }
}
end:
@@ -157,106 +189,120 @@ OpenAPI_ext_problem_details_t *OpenAPI_ext_problem_details_parseFromJSON(cJSON *
OpenAPI_ext_problem_details_t *ext_problem_details_local_var = NULL;
cJSON *type = cJSON_GetObjectItemCaseSensitive(ext_problem_detailsJSON, "type");
- if (type) {
- if (!cJSON_IsString(type)) {
- ogs_error("OpenAPI_ext_problem_details_parseFromJSON() failed [type]");
- goto end;
- }
+ if (type) {
+ if (!cJSON_IsString(type)) {
+ ogs_error("OpenAPI_ext_problem_details_parseFromJSON() failed [type]");
+ goto end;
+ }
}
cJSON *title = cJSON_GetObjectItemCaseSensitive(ext_problem_detailsJSON, "title");
- if (title) {
- if (!cJSON_IsString(title)) {
- ogs_error("OpenAPI_ext_problem_details_parseFromJSON() failed [title]");
- goto end;
- }
+ if (title) {
+ if (!cJSON_IsString(title)) {
+ ogs_error("OpenAPI_ext_problem_details_parseFromJSON() failed [title]");
+ goto end;
+ }
}
cJSON *status = cJSON_GetObjectItemCaseSensitive(ext_problem_detailsJSON, "status");
- if (status) {
- if (!cJSON_IsNumber(status)) {
- ogs_error("OpenAPI_ext_problem_details_parseFromJSON() failed [status]");
- goto end;
- }
+ if (status) {
+ if (!cJSON_IsNumber(status)) {
+ ogs_error("OpenAPI_ext_problem_details_parseFromJSON() failed [status]");
+ goto end;
+ }
}
cJSON *detail = cJSON_GetObjectItemCaseSensitive(ext_problem_detailsJSON, "detail");
- if (detail) {
- if (!cJSON_IsString(detail)) {
- ogs_error("OpenAPI_ext_problem_details_parseFromJSON() failed [detail]");
- goto end;
- }
+ if (detail) {
+ if (!cJSON_IsString(detail)) {
+ ogs_error("OpenAPI_ext_problem_details_parseFromJSON() failed [detail]");
+ goto end;
+ }
}
cJSON *instance = cJSON_GetObjectItemCaseSensitive(ext_problem_detailsJSON, "instance");
- if (instance) {
- if (!cJSON_IsString(instance)) {
- ogs_error("OpenAPI_ext_problem_details_parseFromJSON() failed [instance]");
- goto end;
- }
+ if (instance) {
+ if (!cJSON_IsString(instance)) {
+ ogs_error("OpenAPI_ext_problem_details_parseFromJSON() failed [instance]");
+ goto end;
+ }
}
cJSON *cause = cJSON_GetObjectItemCaseSensitive(ext_problem_detailsJSON, "cause");
- if (cause) {
- if (!cJSON_IsString(cause)) {
- ogs_error("OpenAPI_ext_problem_details_parseFromJSON() failed [cause]");
- goto end;
- }
+ if (cause) {
+ if (!cJSON_IsString(cause)) {
+ ogs_error("OpenAPI_ext_problem_details_parseFromJSON() failed [cause]");
+ goto end;
+ }
}
cJSON *invalid_params = cJSON_GetObjectItemCaseSensitive(ext_problem_detailsJSON, "invalidParams");
OpenAPI_list_t *invalid_paramsList;
- if (invalid_params) {
- cJSON *invalid_params_local_nonprimitive;
- if (!cJSON_IsArray(invalid_params)) {
+ if (invalid_params) {
+ cJSON *invalid_params_local_nonprimitive;
+ if (!cJSON_IsArray(invalid_params)){
+ ogs_error("OpenAPI_ext_problem_details_parseFromJSON() failed [invalid_params]");
+ goto end;
+ }
+
+ invalid_paramsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(invalid_params_local_nonprimitive, invalid_params ) {
+ if (!cJSON_IsObject(invalid_params_local_nonprimitive)) {
ogs_error("OpenAPI_ext_problem_details_parseFromJSON() failed [invalid_params]");
goto end;
}
+ OpenAPI_invalid_param_t *invalid_paramsItem = OpenAPI_invalid_param_parseFromJSON(invalid_params_local_nonprimitive);
- invalid_paramsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(invalid_params_local_nonprimitive, invalid_params ) {
- if (!cJSON_IsObject(invalid_params_local_nonprimitive)) {
- ogs_error("OpenAPI_ext_problem_details_parseFromJSON() failed [invalid_params]");
- goto end;
- }
- OpenAPI_invalid_param_t *invalid_paramsItem = OpenAPI_invalid_param_parseFromJSON(invalid_params_local_nonprimitive);
-
- OpenAPI_list_add(invalid_paramsList, invalid_paramsItem);
- }
+ OpenAPI_list_add(invalid_paramsList, invalid_paramsItem);
+ }
}
cJSON *supported_features = cJSON_GetObjectItemCaseSensitive(ext_problem_detailsJSON, "supportedFeatures");
- if (supported_features) {
- if (!cJSON_IsString(supported_features)) {
- ogs_error("OpenAPI_ext_problem_details_parseFromJSON() failed [supported_features]");
- goto end;
- }
+ if (supported_features) {
+ if (!cJSON_IsString(supported_features)) {
+ ogs_error("OpenAPI_ext_problem_details_parseFromJSON() failed [supported_features]");
+ goto end;
+ }
}
- cJSON *target_scp = cJSON_GetObjectItemCaseSensitive(ext_problem_detailsJSON, "targetScp");
+ cJSON *access_token_error = cJSON_GetObjectItemCaseSensitive(ext_problem_detailsJSON, "accessTokenError");
- if (target_scp) {
- if (!cJSON_IsString(target_scp)) {
- ogs_error("OpenAPI_ext_problem_details_parseFromJSON() failed [target_scp]");
- goto end;
- }
+ OpenAPI_access_token_err_t *access_token_error_local_nonprim = NULL;
+ if (access_token_error) {
+ access_token_error_local_nonprim = OpenAPI_access_token_err_parseFromJSON(access_token_error);
+ }
+
+ cJSON *access_token_request = cJSON_GetObjectItemCaseSensitive(ext_problem_detailsJSON, "accessTokenRequest");
+
+ OpenAPI_access_token_req_t *access_token_request_local_nonprim = NULL;
+ if (access_token_request) {
+ access_token_request_local_nonprim = OpenAPI_access_token_req_parseFromJSON(access_token_request);
+ }
+
+ cJSON *nrf_id = cJSON_GetObjectItemCaseSensitive(ext_problem_detailsJSON, "nrfId");
+
+ if (nrf_id) {
+ if (!cJSON_IsString(nrf_id)) {
+ ogs_error("OpenAPI_ext_problem_details_parseFromJSON() failed [nrf_id]");
+ goto end;
+ }
}
cJSON *remote_error = cJSON_GetObjectItemCaseSensitive(ext_problem_detailsJSON, "remoteError");
- if (remote_error) {
- if (!cJSON_IsBool(remote_error)) {
- ogs_error("OpenAPI_ext_problem_details_parseFromJSON() failed [remote_error]");
- goto end;
- }
+ if (remote_error) {
+ if (!cJSON_IsBool(remote_error)) {
+ ogs_error("OpenAPI_ext_problem_details_parseFromJSON() failed [remote_error]");
+ goto end;
+ }
}
ext_problem_details_local_var = OpenAPI_ext_problem_details_create (
@@ -268,9 +314,11 @@ OpenAPI_ext_problem_details_t *OpenAPI_ext_problem_details_parseFromJSON(cJSON *
cause ? ogs_strdup_or_assert(cause->valuestring) : NULL,
invalid_params ? invalid_paramsList : NULL,
supported_features ? ogs_strdup_or_assert(supported_features->valuestring) : NULL,
- target_scp ? ogs_strdup_or_assert(target_scp->valuestring) : NULL,
+ access_token_error ? access_token_error_local_nonprim : NULL,
+ access_token_request ? access_token_request_local_nonprim : NULL,
+ nrf_id ? ogs_strdup_or_assert(nrf_id->valuestring) : NULL,
remote_error ? remote_error->valueint : 0
- );
+ );
return ext_problem_details_local_var;
end:
diff --git a/lib/sbi/openapi/model/ext_problem_details.h b/lib/sbi/openapi/model/ext_problem_details.h
index eb642d613..d15d13261 100644
--- a/lib/sbi/openapi/model/ext_problem_details.h
+++ b/lib/sbi/openapi/model/ext_problem_details.h
@@ -1,7 +1,7 @@
/*
* ext_problem_details.h
*
- *
+ *
*/
#ifndef _OpenAPI_ext_problem_details_H_
@@ -12,6 +12,8 @@
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
+#include "access_token_err.h"
+#include "access_token_req.h"
#include "invalid_param.h"
#include "problem_details.h"
#include "problem_details_add_info.h"
@@ -30,7 +32,9 @@ typedef struct OpenAPI_ext_problem_details_s {
char *cause;
OpenAPI_list_t *invalid_params;
char *supported_features;
- char *target_scp;
+ struct OpenAPI_access_token_err_s *access_token_error;
+ struct OpenAPI_access_token_req_s *access_token_request;
+ char *nrf_id;
int remote_error;
} OpenAPI_ext_problem_details_t;
@@ -43,9 +47,11 @@ OpenAPI_ext_problem_details_t *OpenAPI_ext_problem_details_create(
char *cause,
OpenAPI_list_t *invalid_params,
char *supported_features,
- char *target_scp,
+ OpenAPI_access_token_err_t *access_token_error,
+ OpenAPI_access_token_req_t *access_token_request,
+ char *nrf_id,
int remote_error
- );
+);
void OpenAPI_ext_problem_details_free(OpenAPI_ext_problem_details_t *ext_problem_details);
OpenAPI_ext_problem_details_t *OpenAPI_ext_problem_details_parseFromJSON(cJSON *ext_problem_detailsJSON);
cJSON *OpenAPI_ext_problem_details_convertToJSON(OpenAPI_ext_problem_details_t *ext_problem_details);
diff --git a/lib/sbi/openapi/model/ext_snssai.c b/lib/sbi/openapi/model/ext_snssai.c
index be382ae03..e93320e6e 100644
--- a/lib/sbi/openapi/model/ext_snssai.c
+++ b/lib/sbi/openapi/model/ext_snssai.c
@@ -9,7 +9,7 @@ OpenAPI_ext_snssai_t *OpenAPI_ext_snssai_create(
char *sd,
OpenAPI_list_t *sd_ranges,
int wildcard_sd
- )
+)
{
OpenAPI_ext_snssai_t *ext_snssai_local_var = OpenAPI_malloc(sizeof(OpenAPI_ext_snssai_t));
if (!ext_snssai_local_var) {
@@ -53,37 +53,37 @@ cJSON *OpenAPI_ext_snssai_convertToJSON(OpenAPI_ext_snssai_t *ext_snssai)
}
if (ext_snssai->sd) {
- if (cJSON_AddStringToObject(item, "sd", ext_snssai->sd) == NULL) {
- ogs_error("OpenAPI_ext_snssai_convertToJSON() failed [sd]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "sd", ext_snssai->sd) == NULL) {
+ ogs_error("OpenAPI_ext_snssai_convertToJSON() failed [sd]");
+ goto end;
+ }
}
if (ext_snssai->sd_ranges) {
- cJSON *sd_rangesList = cJSON_AddArrayToObject(item, "sdRanges");
- if (sd_rangesList == NULL) {
- ogs_error("OpenAPI_ext_snssai_convertToJSON() failed [sd_ranges]");
- goto end;
- }
+ cJSON *sd_rangesList = cJSON_AddArrayToObject(item, "sdRanges");
+ if (sd_rangesList == NULL) {
+ ogs_error("OpenAPI_ext_snssai_convertToJSON() failed [sd_ranges]");
+ goto end;
+ }
- OpenAPI_lnode_t *sd_ranges_node;
- if (ext_snssai->sd_ranges) {
- OpenAPI_list_for_each(ext_snssai->sd_ranges, sd_ranges_node) {
- cJSON *itemLocal = OpenAPI_sd_range_convertToJSON(sd_ranges_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_ext_snssai_convertToJSON() failed [sd_ranges]");
- goto end;
- }
- cJSON_AddItemToArray(sd_rangesList, itemLocal);
+ OpenAPI_lnode_t *sd_ranges_node;
+ if (ext_snssai->sd_ranges) {
+ OpenAPI_list_for_each(ext_snssai->sd_ranges, sd_ranges_node) {
+ cJSON *itemLocal = OpenAPI_sd_range_convertToJSON(sd_ranges_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_ext_snssai_convertToJSON() failed [sd_ranges]");
+ goto end;
}
+ cJSON_AddItemToArray(sd_rangesList, itemLocal);
}
}
+ }
if (ext_snssai->wildcard_sd) {
- if (cJSON_AddBoolToObject(item, "wildcardSd", ext_snssai->wildcard_sd) == NULL) {
- ogs_error("OpenAPI_ext_snssai_convertToJSON() failed [wildcard_sd]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "wildcardSd", ext_snssai->wildcard_sd) == NULL) {
+ ogs_error("OpenAPI_ext_snssai_convertToJSON() failed [wildcard_sd]");
+ goto end;
+ }
}
end:
@@ -99,7 +99,7 @@ OpenAPI_ext_snssai_t *OpenAPI_ext_snssai_parseFromJSON(cJSON *ext_snssaiJSON)
goto end;
}
-
+
if (!cJSON_IsNumber(sst)) {
ogs_error("OpenAPI_ext_snssai_parseFromJSON() failed [sst]");
goto end;
@@ -107,43 +107,43 @@ OpenAPI_ext_snssai_t *OpenAPI_ext_snssai_parseFromJSON(cJSON *ext_snssaiJSON)
cJSON *sd = cJSON_GetObjectItemCaseSensitive(ext_snssaiJSON, "sd");
- if (sd) {
- if (!cJSON_IsString(sd)) {
- ogs_error("OpenAPI_ext_snssai_parseFromJSON() failed [sd]");
- goto end;
- }
+ if (sd) {
+ if (!cJSON_IsString(sd)) {
+ ogs_error("OpenAPI_ext_snssai_parseFromJSON() failed [sd]");
+ goto end;
+ }
}
cJSON *sd_ranges = cJSON_GetObjectItemCaseSensitive(ext_snssaiJSON, "sdRanges");
OpenAPI_list_t *sd_rangesList;
- if (sd_ranges) {
- cJSON *sd_ranges_local_nonprimitive;
- if (!cJSON_IsArray(sd_ranges)) {
+ if (sd_ranges) {
+ cJSON *sd_ranges_local_nonprimitive;
+ if (!cJSON_IsArray(sd_ranges)){
+ ogs_error("OpenAPI_ext_snssai_parseFromJSON() failed [sd_ranges]");
+ goto end;
+ }
+
+ sd_rangesList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(sd_ranges_local_nonprimitive, sd_ranges ) {
+ if (!cJSON_IsObject(sd_ranges_local_nonprimitive)) {
ogs_error("OpenAPI_ext_snssai_parseFromJSON() failed [sd_ranges]");
goto end;
}
+ OpenAPI_sd_range_t *sd_rangesItem = OpenAPI_sd_range_parseFromJSON(sd_ranges_local_nonprimitive);
- sd_rangesList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(sd_ranges_local_nonprimitive, sd_ranges ) {
- if (!cJSON_IsObject(sd_ranges_local_nonprimitive)) {
- ogs_error("OpenAPI_ext_snssai_parseFromJSON() failed [sd_ranges]");
- goto end;
- }
- OpenAPI_sd_range_t *sd_rangesItem = OpenAPI_sd_range_parseFromJSON(sd_ranges_local_nonprimitive);
-
- OpenAPI_list_add(sd_rangesList, sd_rangesItem);
- }
+ OpenAPI_list_add(sd_rangesList, sd_rangesItem);
+ }
}
cJSON *wildcard_sd = cJSON_GetObjectItemCaseSensitive(ext_snssaiJSON, "wildcardSd");
- if (wildcard_sd) {
- if (!cJSON_IsBool(wildcard_sd)) {
- ogs_error("OpenAPI_ext_snssai_parseFromJSON() failed [wildcard_sd]");
- goto end;
- }
+ if (wildcard_sd) {
+ if (!cJSON_IsBool(wildcard_sd)) {
+ ogs_error("OpenAPI_ext_snssai_parseFromJSON() failed [wildcard_sd]");
+ goto end;
+ }
}
ext_snssai_local_var = OpenAPI_ext_snssai_create (
@@ -151,7 +151,7 @@ OpenAPI_ext_snssai_t *OpenAPI_ext_snssai_parseFromJSON(cJSON *ext_snssaiJSON)
sd ? ogs_strdup_or_assert(sd->valuestring) : NULL,
sd_ranges ? sd_rangesList : NULL,
wildcard_sd ? wildcard_sd->valueint : 0
- );
+ );
return ext_snssai_local_var;
end:
diff --git a/lib/sbi/openapi/model/ext_snssai.h b/lib/sbi/openapi/model/ext_snssai.h
index d01a1e5b0..cb4f65346 100644
--- a/lib/sbi/openapi/model/ext_snssai.h
+++ b/lib/sbi/openapi/model/ext_snssai.h
@@ -1,7 +1,7 @@
/*
* ext_snssai.h
*
- *
+ *
*/
#ifndef _OpenAPI_ext_snssai_H_
@@ -33,7 +33,7 @@ OpenAPI_ext_snssai_t *OpenAPI_ext_snssai_create(
char *sd,
OpenAPI_list_t *sd_ranges,
int wildcard_sd
- );
+);
void OpenAPI_ext_snssai_free(OpenAPI_ext_snssai_t *ext_snssai);
OpenAPI_ext_snssai_t *OpenAPI_ext_snssai_parseFromJSON(cJSON *ext_snssaiJSON);
cJSON *OpenAPI_ext_snssai_convertToJSON(OpenAPI_ext_snssai_t *ext_snssai);
diff --git a/lib/sbi/openapi/model/extended_problem_details.c b/lib/sbi/openapi/model/extended_problem_details.c
index 9f3d47199..d2b64a382 100644
--- a/lib/sbi/openapi/model/extended_problem_details.c
+++ b/lib/sbi/openapi/model/extended_problem_details.c
@@ -13,9 +13,11 @@ OpenAPI_extended_problem_details_t *OpenAPI_extended_problem_details_create(
char *cause,
OpenAPI_list_t *invalid_params,
char *supported_features,
- char *target_scp,
+ OpenAPI_access_token_err_t *access_token_error,
+ OpenAPI_access_token_req_t *access_token_request,
+ char *nrf_id,
OpenAPI_acceptable_service_info_t *acceptable_serv_info
- )
+)
{
OpenAPI_extended_problem_details_t *extended_problem_details_local_var = OpenAPI_malloc(sizeof(OpenAPI_extended_problem_details_t));
if (!extended_problem_details_local_var) {
@@ -29,7 +31,9 @@ OpenAPI_extended_problem_details_t *OpenAPI_extended_problem_details_create(
extended_problem_details_local_var->cause = cause;
extended_problem_details_local_var->invalid_params = invalid_params;
extended_problem_details_local_var->supported_features = supported_features;
- extended_problem_details_local_var->target_scp = target_scp;
+ extended_problem_details_local_var->access_token_error = access_token_error;
+ extended_problem_details_local_var->access_token_request = access_token_request;
+ extended_problem_details_local_var->nrf_id = nrf_id;
extended_problem_details_local_var->acceptable_serv_info = acceptable_serv_info;
return extended_problem_details_local_var;
@@ -51,7 +55,9 @@ void OpenAPI_extended_problem_details_free(OpenAPI_extended_problem_details_t *e
}
OpenAPI_list_free(extended_problem_details->invalid_params);
ogs_free(extended_problem_details->supported_features);
- ogs_free(extended_problem_details->target_scp);
+ OpenAPI_access_token_err_free(extended_problem_details->access_token_error);
+ OpenAPI_access_token_req_free(extended_problem_details->access_token_request);
+ ogs_free(extended_problem_details->nrf_id);
OpenAPI_acceptable_service_info_free(extended_problem_details->acceptable_serv_info);
ogs_free(extended_problem_details);
}
@@ -67,92 +73,118 @@ cJSON *OpenAPI_extended_problem_details_convertToJSON(OpenAPI_extended_problem_d
item = cJSON_CreateObject();
if (extended_problem_details->type) {
- if (cJSON_AddStringToObject(item, "type", extended_problem_details->type) == NULL) {
- ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [type]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "type", extended_problem_details->type) == NULL) {
+ ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [type]");
+ goto end;
+ }
}
if (extended_problem_details->title) {
- if (cJSON_AddStringToObject(item, "title", extended_problem_details->title) == NULL) {
- ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [title]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "title", extended_problem_details->title) == NULL) {
+ ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [title]");
+ goto end;
+ }
}
if (extended_problem_details->status) {
- if (cJSON_AddNumberToObject(item, "status", extended_problem_details->status) == NULL) {
- ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [status]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "status", extended_problem_details->status) == NULL) {
+ ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [status]");
+ goto end;
+ }
}
if (extended_problem_details->detail) {
- if (cJSON_AddStringToObject(item, "detail", extended_problem_details->detail) == NULL) {
- ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [detail]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "detail", extended_problem_details->detail) == NULL) {
+ ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [detail]");
+ goto end;
+ }
}
if (extended_problem_details->instance) {
- if (cJSON_AddStringToObject(item, "instance", extended_problem_details->instance) == NULL) {
- ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [instance]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "instance", extended_problem_details->instance) == NULL) {
+ ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [instance]");
+ goto end;
+ }
}
if (extended_problem_details->cause) {
- if (cJSON_AddStringToObject(item, "cause", extended_problem_details->cause) == NULL) {
- ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [cause]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "cause", extended_problem_details->cause) == NULL) {
+ ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [cause]");
+ goto end;
+ }
}
if (extended_problem_details->invalid_params) {
- cJSON *invalid_paramsList = cJSON_AddArrayToObject(item, "invalidParams");
- if (invalid_paramsList == NULL) {
- ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [invalid_params]");
- goto end;
- }
+ cJSON *invalid_paramsList = cJSON_AddArrayToObject(item, "invalidParams");
+ if (invalid_paramsList == NULL) {
+ ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [invalid_params]");
+ goto end;
+ }
- OpenAPI_lnode_t *invalid_params_node;
- if (extended_problem_details->invalid_params) {
- OpenAPI_list_for_each(extended_problem_details->invalid_params, invalid_params_node) {
- cJSON *itemLocal = OpenAPI_invalid_param_convertToJSON(invalid_params_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [invalid_params]");
- goto end;
- }
- cJSON_AddItemToArray(invalid_paramsList, itemLocal);
+ OpenAPI_lnode_t *invalid_params_node;
+ if (extended_problem_details->invalid_params) {
+ OpenAPI_list_for_each(extended_problem_details->invalid_params, invalid_params_node) {
+ cJSON *itemLocal = OpenAPI_invalid_param_convertToJSON(invalid_params_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [invalid_params]");
+ goto end;
}
+ cJSON_AddItemToArray(invalid_paramsList, itemLocal);
}
}
+ }
if (extended_problem_details->supported_features) {
- if (cJSON_AddStringToObject(item, "supportedFeatures", extended_problem_details->supported_features) == NULL) {
- ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [supported_features]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "supportedFeatures", extended_problem_details->supported_features) == NULL) {
+ ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [supported_features]");
+ goto end;
+ }
}
- if (extended_problem_details->target_scp) {
- if (cJSON_AddStringToObject(item, "targetScp", extended_problem_details->target_scp) == NULL) {
- ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [target_scp]");
- goto end;
- }
+ if (extended_problem_details->access_token_error) {
+ cJSON *access_token_error_local_JSON = OpenAPI_access_token_err_convertToJSON(extended_problem_details->access_token_error);
+ if (access_token_error_local_JSON == NULL) {
+ ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [access_token_error]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "accessTokenError", access_token_error_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [access_token_error]");
+ goto end;
+ }
+ }
+
+ if (extended_problem_details->access_token_request) {
+ cJSON *access_token_request_local_JSON = OpenAPI_access_token_req_convertToJSON(extended_problem_details->access_token_request);
+ if (access_token_request_local_JSON == NULL) {
+ ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [access_token_request]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "accessTokenRequest", access_token_request_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [access_token_request]");
+ goto end;
+ }
+ }
+
+ if (extended_problem_details->nrf_id) {
+ if (cJSON_AddStringToObject(item, "nrfId", extended_problem_details->nrf_id) == NULL) {
+ ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [nrf_id]");
+ goto end;
+ }
}
if (extended_problem_details->acceptable_serv_info) {
- cJSON *acceptable_serv_info_local_JSON = OpenAPI_acceptable_service_info_convertToJSON(extended_problem_details->acceptable_serv_info);
- if (acceptable_serv_info_local_JSON == NULL) {
- ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [acceptable_serv_info]");
- goto end;
- }
- cJSON_AddItemToObject(item, "acceptableServInfo", acceptable_serv_info_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [acceptable_serv_info]");
- goto end;
- }
+ cJSON *acceptable_serv_info_local_JSON = OpenAPI_acceptable_service_info_convertToJSON(extended_problem_details->acceptable_serv_info);
+ if (acceptable_serv_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [acceptable_serv_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "acceptableServInfo", acceptable_serv_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_extended_problem_details_convertToJSON() failed [acceptable_serv_info]");
+ goto end;
+ }
}
end:
@@ -164,104 +196,118 @@ OpenAPI_extended_problem_details_t *OpenAPI_extended_problem_details_parseFromJS
OpenAPI_extended_problem_details_t *extended_problem_details_local_var = NULL;
cJSON *type = cJSON_GetObjectItemCaseSensitive(extended_problem_detailsJSON, "type");
- if (type) {
- if (!cJSON_IsString(type)) {
- ogs_error("OpenAPI_extended_problem_details_parseFromJSON() failed [type]");
- goto end;
- }
+ if (type) {
+ if (!cJSON_IsString(type)) {
+ ogs_error("OpenAPI_extended_problem_details_parseFromJSON() failed [type]");
+ goto end;
+ }
}
cJSON *title = cJSON_GetObjectItemCaseSensitive(extended_problem_detailsJSON, "title");
- if (title) {
- if (!cJSON_IsString(title)) {
- ogs_error("OpenAPI_extended_problem_details_parseFromJSON() failed [title]");
- goto end;
- }
+ if (title) {
+ if (!cJSON_IsString(title)) {
+ ogs_error("OpenAPI_extended_problem_details_parseFromJSON() failed [title]");
+ goto end;
+ }
}
cJSON *status = cJSON_GetObjectItemCaseSensitive(extended_problem_detailsJSON, "status");
- if (status) {
- if (!cJSON_IsNumber(status)) {
- ogs_error("OpenAPI_extended_problem_details_parseFromJSON() failed [status]");
- goto end;
- }
+ if (status) {
+ if (!cJSON_IsNumber(status)) {
+ ogs_error("OpenAPI_extended_problem_details_parseFromJSON() failed [status]");
+ goto end;
+ }
}
cJSON *detail = cJSON_GetObjectItemCaseSensitive(extended_problem_detailsJSON, "detail");
- if (detail) {
- if (!cJSON_IsString(detail)) {
- ogs_error("OpenAPI_extended_problem_details_parseFromJSON() failed [detail]");
- goto end;
- }
+ if (detail) {
+ if (!cJSON_IsString(detail)) {
+ ogs_error("OpenAPI_extended_problem_details_parseFromJSON() failed [detail]");
+ goto end;
+ }
}
cJSON *instance = cJSON_GetObjectItemCaseSensitive(extended_problem_detailsJSON, "instance");
- if (instance) {
- if (!cJSON_IsString(instance)) {
- ogs_error("OpenAPI_extended_problem_details_parseFromJSON() failed [instance]");
- goto end;
- }
+ if (instance) {
+ if (!cJSON_IsString(instance)) {
+ ogs_error("OpenAPI_extended_problem_details_parseFromJSON() failed [instance]");
+ goto end;
+ }
}
cJSON *cause = cJSON_GetObjectItemCaseSensitive(extended_problem_detailsJSON, "cause");
- if (cause) {
- if (!cJSON_IsString(cause)) {
- ogs_error("OpenAPI_extended_problem_details_parseFromJSON() failed [cause]");
- goto end;
- }
+ if (cause) {
+ if (!cJSON_IsString(cause)) {
+ ogs_error("OpenAPI_extended_problem_details_parseFromJSON() failed [cause]");
+ goto end;
+ }
}
cJSON *invalid_params = cJSON_GetObjectItemCaseSensitive(extended_problem_detailsJSON, "invalidParams");
OpenAPI_list_t *invalid_paramsList;
- if (invalid_params) {
- cJSON *invalid_params_local_nonprimitive;
- if (!cJSON_IsArray(invalid_params)) {
+ if (invalid_params) {
+ cJSON *invalid_params_local_nonprimitive;
+ if (!cJSON_IsArray(invalid_params)){
+ ogs_error("OpenAPI_extended_problem_details_parseFromJSON() failed [invalid_params]");
+ goto end;
+ }
+
+ invalid_paramsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(invalid_params_local_nonprimitive, invalid_params ) {
+ if (!cJSON_IsObject(invalid_params_local_nonprimitive)) {
ogs_error("OpenAPI_extended_problem_details_parseFromJSON() failed [invalid_params]");
goto end;
}
+ OpenAPI_invalid_param_t *invalid_paramsItem = OpenAPI_invalid_param_parseFromJSON(invalid_params_local_nonprimitive);
- invalid_paramsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(invalid_params_local_nonprimitive, invalid_params ) {
- if (!cJSON_IsObject(invalid_params_local_nonprimitive)) {
- ogs_error("OpenAPI_extended_problem_details_parseFromJSON() failed [invalid_params]");
- goto end;
- }
- OpenAPI_invalid_param_t *invalid_paramsItem = OpenAPI_invalid_param_parseFromJSON(invalid_params_local_nonprimitive);
-
- OpenAPI_list_add(invalid_paramsList, invalid_paramsItem);
- }
+ OpenAPI_list_add(invalid_paramsList, invalid_paramsItem);
+ }
}
cJSON *supported_features = cJSON_GetObjectItemCaseSensitive(extended_problem_detailsJSON, "supportedFeatures");
- if (supported_features) {
- if (!cJSON_IsString(supported_features)) {
- ogs_error("OpenAPI_extended_problem_details_parseFromJSON() failed [supported_features]");
- goto end;
- }
+ if (supported_features) {
+ if (!cJSON_IsString(supported_features)) {
+ ogs_error("OpenAPI_extended_problem_details_parseFromJSON() failed [supported_features]");
+ goto end;
+ }
}
- cJSON *target_scp = cJSON_GetObjectItemCaseSensitive(extended_problem_detailsJSON, "targetScp");
+ cJSON *access_token_error = cJSON_GetObjectItemCaseSensitive(extended_problem_detailsJSON, "accessTokenError");
- if (target_scp) {
- if (!cJSON_IsString(target_scp)) {
- ogs_error("OpenAPI_extended_problem_details_parseFromJSON() failed [target_scp]");
- goto end;
- }
+ OpenAPI_access_token_err_t *access_token_error_local_nonprim = NULL;
+ if (access_token_error) {
+ access_token_error_local_nonprim = OpenAPI_access_token_err_parseFromJSON(access_token_error);
+ }
+
+ cJSON *access_token_request = cJSON_GetObjectItemCaseSensitive(extended_problem_detailsJSON, "accessTokenRequest");
+
+ OpenAPI_access_token_req_t *access_token_request_local_nonprim = NULL;
+ if (access_token_request) {
+ access_token_request_local_nonprim = OpenAPI_access_token_req_parseFromJSON(access_token_request);
+ }
+
+ cJSON *nrf_id = cJSON_GetObjectItemCaseSensitive(extended_problem_detailsJSON, "nrfId");
+
+ if (nrf_id) {
+ if (!cJSON_IsString(nrf_id)) {
+ ogs_error("OpenAPI_extended_problem_details_parseFromJSON() failed [nrf_id]");
+ goto end;
+ }
}
cJSON *acceptable_serv_info = cJSON_GetObjectItemCaseSensitive(extended_problem_detailsJSON, "acceptableServInfo");
OpenAPI_acceptable_service_info_t *acceptable_serv_info_local_nonprim = NULL;
- if (acceptable_serv_info) {
- acceptable_serv_info_local_nonprim = OpenAPI_acceptable_service_info_parseFromJSON(acceptable_serv_info);
+ if (acceptable_serv_info) {
+ acceptable_serv_info_local_nonprim = OpenAPI_acceptable_service_info_parseFromJSON(acceptable_serv_info);
}
extended_problem_details_local_var = OpenAPI_extended_problem_details_create (
@@ -273,9 +319,11 @@ OpenAPI_extended_problem_details_t *OpenAPI_extended_problem_details_parseFromJS
cause ? ogs_strdup_or_assert(cause->valuestring) : NULL,
invalid_params ? invalid_paramsList : NULL,
supported_features ? ogs_strdup_or_assert(supported_features->valuestring) : NULL,
- target_scp ? ogs_strdup_or_assert(target_scp->valuestring) : NULL,
+ access_token_error ? access_token_error_local_nonprim : NULL,
+ access_token_request ? access_token_request_local_nonprim : NULL,
+ nrf_id ? ogs_strdup_or_assert(nrf_id->valuestring) : NULL,
acceptable_serv_info ? acceptable_serv_info_local_nonprim : NULL
- );
+ );
return extended_problem_details_local_var;
end:
diff --git a/lib/sbi/openapi/model/extended_problem_details.h b/lib/sbi/openapi/model/extended_problem_details.h
index d8b823c6f..cc15120e0 100644
--- a/lib/sbi/openapi/model/extended_problem_details.h
+++ b/lib/sbi/openapi/model/extended_problem_details.h
@@ -13,6 +13,8 @@
#include "../include/keyValuePair.h"
#include "../include/binary.h"
#include "acceptable_service_info.h"
+#include "access_token_err.h"
+#include "access_token_req.h"
#include "extended_problem_details_all_of.h"
#include "invalid_param.h"
#include "problem_details.h"
@@ -31,7 +33,9 @@ typedef struct OpenAPI_extended_problem_details_s {
char *cause;
OpenAPI_list_t *invalid_params;
char *supported_features;
- char *target_scp;
+ struct OpenAPI_access_token_err_s *access_token_error;
+ struct OpenAPI_access_token_req_s *access_token_request;
+ char *nrf_id;
struct OpenAPI_acceptable_service_info_s *acceptable_serv_info;
} OpenAPI_extended_problem_details_t;
@@ -44,9 +48,11 @@ OpenAPI_extended_problem_details_t *OpenAPI_extended_problem_details_create(
char *cause,
OpenAPI_list_t *invalid_params,
char *supported_features,
- char *target_scp,
+ OpenAPI_access_token_err_t *access_token_error,
+ OpenAPI_access_token_req_t *access_token_request,
+ char *nrf_id,
OpenAPI_acceptable_service_info_t *acceptable_serv_info
- );
+);
void OpenAPI_extended_problem_details_free(OpenAPI_extended_problem_details_t *extended_problem_details);
OpenAPI_extended_problem_details_t *OpenAPI_extended_problem_details_parseFromJSON(cJSON *extended_problem_detailsJSON);
cJSON *OpenAPI_extended_problem_details_convertToJSON(OpenAPI_extended_problem_details_t *extended_problem_details);
diff --git a/lib/sbi/openapi/model/extended_problem_details_all_of.c b/lib/sbi/openapi/model/extended_problem_details_all_of.c
index 00d515c6c..a6dcbe899 100644
--- a/lib/sbi/openapi/model/extended_problem_details_all_of.c
+++ b/lib/sbi/openapi/model/extended_problem_details_all_of.c
@@ -6,7 +6,7 @@
OpenAPI_extended_problem_details_all_of_t *OpenAPI_extended_problem_details_all_of_create(
OpenAPI_acceptable_service_info_t *acceptable_serv_info
- )
+)
{
OpenAPI_extended_problem_details_all_of_t *extended_problem_details_all_of_local_var = OpenAPI_malloc(sizeof(OpenAPI_extended_problem_details_all_of_t));
if (!extended_problem_details_all_of_local_var) {
@@ -38,16 +38,16 @@ cJSON *OpenAPI_extended_problem_details_all_of_convertToJSON(OpenAPI_extended_pr
item = cJSON_CreateObject();
if (extended_problem_details_all_of->acceptable_serv_info) {
- cJSON *acceptable_serv_info_local_JSON = OpenAPI_acceptable_service_info_convertToJSON(extended_problem_details_all_of->acceptable_serv_info);
- if (acceptable_serv_info_local_JSON == NULL) {
- ogs_error("OpenAPI_extended_problem_details_all_of_convertToJSON() failed [acceptable_serv_info]");
- goto end;
- }
- cJSON_AddItemToObject(item, "acceptableServInfo", acceptable_serv_info_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_extended_problem_details_all_of_convertToJSON() failed [acceptable_serv_info]");
- goto end;
- }
+ cJSON *acceptable_serv_info_local_JSON = OpenAPI_acceptable_service_info_convertToJSON(extended_problem_details_all_of->acceptable_serv_info);
+ if (acceptable_serv_info_local_JSON == NULL) {
+ ogs_error("OpenAPI_extended_problem_details_all_of_convertToJSON() failed [acceptable_serv_info]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "acceptableServInfo", acceptable_serv_info_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_extended_problem_details_all_of_convertToJSON() failed [acceptable_serv_info]");
+ goto end;
+ }
}
end:
@@ -60,13 +60,13 @@ OpenAPI_extended_problem_details_all_of_t *OpenAPI_extended_problem_details_all_
cJSON *acceptable_serv_info = cJSON_GetObjectItemCaseSensitive(extended_problem_details_all_ofJSON, "acceptableServInfo");
OpenAPI_acceptable_service_info_t *acceptable_serv_info_local_nonprim = NULL;
- if (acceptable_serv_info) {
- acceptable_serv_info_local_nonprim = OpenAPI_acceptable_service_info_parseFromJSON(acceptable_serv_info);
+ if (acceptable_serv_info) {
+ acceptable_serv_info_local_nonprim = OpenAPI_acceptable_service_info_parseFromJSON(acceptable_serv_info);
}
extended_problem_details_all_of_local_var = OpenAPI_extended_problem_details_all_of_create (
acceptable_serv_info ? acceptable_serv_info_local_nonprim : NULL
- );
+ );
return extended_problem_details_all_of_local_var;
end:
diff --git a/lib/sbi/openapi/model/extended_problem_details_all_of.h b/lib/sbi/openapi/model/extended_problem_details_all_of.h
index 0569c574d..1d15bc874 100644
--- a/lib/sbi/openapi/model/extended_problem_details_all_of.h
+++ b/lib/sbi/openapi/model/extended_problem_details_all_of.h
@@ -1,7 +1,7 @@
/*
* extended_problem_details_all_of.h
*
- *
+ *
*/
#ifndef _OpenAPI_extended_problem_details_all_of_H_
@@ -25,7 +25,7 @@ typedef struct OpenAPI_extended_problem_details_all_of_s {
OpenAPI_extended_problem_details_all_of_t *OpenAPI_extended_problem_details_all_of_create(
OpenAPI_acceptable_service_info_t *acceptable_serv_info
- );
+);
void OpenAPI_extended_problem_details_all_of_free(OpenAPI_extended_problem_details_all_of_t *extended_problem_details_all_of);
OpenAPI_extended_problem_details_all_of_t *OpenAPI_extended_problem_details_all_of_parseFromJSON(cJSON *extended_problem_details_all_ofJSON);
cJSON *OpenAPI_extended_problem_details_all_of_convertToJSON(OpenAPI_extended_problem_details_all_of_t *extended_problem_details_all_of);
diff --git a/lib/sbi/openapi/model/external_client_type.c b/lib/sbi/openapi/model/external_client_type.c
index 15c4cac82..b4733ad95 100644
--- a/lib/sbi/openapi/model/external_client_type.c
+++ b/lib/sbi/openapi/model/external_client_type.c
@@ -5,7 +5,7 @@
#include "external_client_type.h"
OpenAPI_external_client_type_t *OpenAPI_external_client_type_create(
- )
+)
{
OpenAPI_external_client_type_t *external_client_type_local_var = OpenAPI_malloc(sizeof(OpenAPI_external_client_type_t));
if (!external_client_type_local_var) {
@@ -42,7 +42,7 @@ OpenAPI_external_client_type_t *OpenAPI_external_client_type_parseFromJSON(cJSON
{
OpenAPI_external_client_type_t *external_client_type_local_var = NULL;
external_client_type_local_var = OpenAPI_external_client_type_create (
- );
+ );
return external_client_type_local_var;
end:
diff --git a/lib/sbi/openapi/model/external_client_type.h b/lib/sbi/openapi/model/external_client_type.h
index b63825032..4996a435b 100644
--- a/lib/sbi/openapi/model/external_client_type.h
+++ b/lib/sbi/openapi/model/external_client_type.h
@@ -1,7 +1,7 @@
/*
* external_client_type.h
*
- *
+ *
*/
#ifndef _OpenAPI_external_client_type_H_
@@ -12,6 +12,7 @@
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
+#include "external_client_type_any_of.h"
#ifdef __cplusplus
extern "C" {
@@ -22,7 +23,7 @@ typedef struct OpenAPI_external_client_type_s {
} OpenAPI_external_client_type_t;
OpenAPI_external_client_type_t *OpenAPI_external_client_type_create(
- );
+);
void OpenAPI_external_client_type_free(OpenAPI_external_client_type_t *external_client_type);
OpenAPI_external_client_type_t *OpenAPI_external_client_type_parseFromJSON(cJSON *external_client_typeJSON);
cJSON *OpenAPI_external_client_type_convertToJSON(OpenAPI_external_client_type_t *external_client_type);
diff --git a/lib/sbi/openapi/model/external_client_type_any_of.c b/lib/sbi/openapi/model/external_client_type_any_of.c
new file mode 100644
index 000000000..548fb4da2
--- /dev/null
+++ b/lib/sbi/openapi/model/external_client_type_any_of.c
@@ -0,0 +1,30 @@
+
+#include
+#include
+#include
+#include "external_client_type_any_of.h"
+
+char* OpenAPI_external_client_type_any_of_ToString(OpenAPI_external_client_type_any_of_e external_client_type_any_of)
+{
+ const char *external_client_type_any_ofArray[] = { "NULL", "EMERGENCY_SERVICES", "VALUE_ADDED_SERVICES", "PLMN_OPERATOR_SERVICES", "LAWFUL_INTERCEPT_SERVICES", "PLMN_OPERATOR_BROADCAST_SERVICES", "PLMN_OPERATOR_OM", "PLMN_OPERATOR_ANONYMOUS_STATISTICS", "PLMN_OPERATOR_TARGET_MS_SERVICE_SUPPORT" };
+ size_t sizeofArray = sizeof(external_client_type_any_ofArray) / sizeof(external_client_type_any_ofArray[0]);
+ if (external_client_type_any_of < sizeofArray)
+ return (char *)external_client_type_any_ofArray[external_client_type_any_of];
+ else
+ return (char *)"Unknown";
+}
+
+OpenAPI_external_client_type_any_of_e OpenAPI_external_client_type_any_of_FromString(char* external_client_type_any_of)
+{
+ int stringToReturn = 0;
+ const char *external_client_type_any_ofArray[] = { "NULL", "EMERGENCY_SERVICES", "VALUE_ADDED_SERVICES", "PLMN_OPERATOR_SERVICES", "LAWFUL_INTERCEPT_SERVICES", "PLMN_OPERATOR_BROADCAST_SERVICES", "PLMN_OPERATOR_OM", "PLMN_OPERATOR_ANONYMOUS_STATISTICS", "PLMN_OPERATOR_TARGET_MS_SERVICE_SUPPORT" };
+ size_t sizeofArray = sizeof(external_client_type_any_ofArray) / sizeof(external_client_type_any_ofArray[0]);
+ while (stringToReturn < sizeofArray) {
+ if (strcmp(external_client_type_any_of, external_client_type_any_ofArray[stringToReturn]) == 0) {
+ return stringToReturn;
+ }
+ stringToReturn++;
+ }
+ return 0;
+}
+
diff --git a/lib/sbi/openapi/model/external_client_type_any_of.h b/lib/sbi/openapi/model/external_client_type_any_of.h
new file mode 100644
index 000000000..dca248eb2
--- /dev/null
+++ b/lib/sbi/openapi/model/external_client_type_any_of.h
@@ -0,0 +1,31 @@
+/*
+ * external_client_type_any_of.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_external_client_type_any_of_H_
+#define _OpenAPI_external_client_type_any_of_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum { OpenAPI_external_client_type_any_of_NULL = 0, OpenAPI_external_client_type_any_of_EMERGENCY_SERVICES, OpenAPI_external_client_type_any_of_VALUE_ADDED_SERVICES, OpenAPI_external_client_type_any_of_PLMN_OPERATOR_SERVICES, OpenAPI_external_client_type_any_of_LAWFUL_INTERCEPT_SERVICES, OpenAPI_external_client_type_any_of_PLMN_OPERATOR_BROADCAST_SERVICES, OpenAPI_external_client_type_any_of_PLMN_OPERATOR_OM, OpenAPI_external_client_type_any_of_PLMN_OPERATOR_ANONYMOUS_STATISTICS, OpenAPI_external_client_type_any_of_PLMN_OPERATOR_TARGET_MS_SERVICE_SUPPORT } OpenAPI_external_client_type_any_of_e;
+
+char* OpenAPI_external_client_type_any_of_ToString(OpenAPI_external_client_type_any_of_e external_client_type_any_of);
+
+OpenAPI_external_client_type_any_of_e OpenAPI_external_client_type_any_of_FromString(char* external_client_type_any_of);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_external_client_type_any_of_H_ */
+
diff --git a/lib/sbi/openapi/model/external_unrelated_class.c b/lib/sbi/openapi/model/external_unrelated_class.c
index 43e480167..bdc92c59a 100644
--- a/lib/sbi/openapi/model/external_unrelated_class.c
+++ b/lib/sbi/openapi/model/external_unrelated_class.c
@@ -8,7 +8,7 @@ OpenAPI_external_unrelated_class_t *OpenAPI_external_unrelated_class_create(
OpenAPI_list_t *lcs_client_externals,
OpenAPI_list_t *af_externals,
OpenAPI_list_t *lcs_client_group_externals
- )
+)
{
OpenAPI_external_unrelated_class_t *external_unrelated_class_local_var = OpenAPI_malloc(sizeof(OpenAPI_external_unrelated_class_t));
if (!external_unrelated_class_local_var) {
@@ -53,64 +53,64 @@ cJSON *OpenAPI_external_unrelated_class_convertToJSON(OpenAPI_external_unrelated
item = cJSON_CreateObject();
if (external_unrelated_class->lcs_client_externals) {
- cJSON *lcs_client_externalsList = cJSON_AddArrayToObject(item, "lcsClientExternals");
- if (lcs_client_externalsList == NULL) {
- ogs_error("OpenAPI_external_unrelated_class_convertToJSON() failed [lcs_client_externals]");
- goto end;
- }
+ cJSON *lcs_client_externalsList = cJSON_AddArrayToObject(item, "lcsClientExternals");
+ if (lcs_client_externalsList == NULL) {
+ ogs_error("OpenAPI_external_unrelated_class_convertToJSON() failed [lcs_client_externals]");
+ goto end;
+ }
- OpenAPI_lnode_t *lcs_client_externals_node;
- if (external_unrelated_class->lcs_client_externals) {
- OpenAPI_list_for_each(external_unrelated_class->lcs_client_externals, lcs_client_externals_node) {
- cJSON *itemLocal = OpenAPI_lcs_client_external_convertToJSON(lcs_client_externals_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_external_unrelated_class_convertToJSON() failed [lcs_client_externals]");
- goto end;
- }
- cJSON_AddItemToArray(lcs_client_externalsList, itemLocal);
+ OpenAPI_lnode_t *lcs_client_externals_node;
+ if (external_unrelated_class->lcs_client_externals) {
+ OpenAPI_list_for_each(external_unrelated_class->lcs_client_externals, lcs_client_externals_node) {
+ cJSON *itemLocal = OpenAPI_lcs_client_external_convertToJSON(lcs_client_externals_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_external_unrelated_class_convertToJSON() failed [lcs_client_externals]");
+ goto end;
}
+ cJSON_AddItemToArray(lcs_client_externalsList, itemLocal);
}
}
+ }
if (external_unrelated_class->af_externals) {
- cJSON *af_externalsList = cJSON_AddArrayToObject(item, "afExternals");
- if (af_externalsList == NULL) {
- ogs_error("OpenAPI_external_unrelated_class_convertToJSON() failed [af_externals]");
- goto end;
- }
+ cJSON *af_externalsList = cJSON_AddArrayToObject(item, "afExternals");
+ if (af_externalsList == NULL) {
+ ogs_error("OpenAPI_external_unrelated_class_convertToJSON() failed [af_externals]");
+ goto end;
+ }
- OpenAPI_lnode_t *af_externals_node;
- if (external_unrelated_class->af_externals) {
- OpenAPI_list_for_each(external_unrelated_class->af_externals, af_externals_node) {
- cJSON *itemLocal = OpenAPI_af_external_convertToJSON(af_externals_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_external_unrelated_class_convertToJSON() failed [af_externals]");
- goto end;
- }
- cJSON_AddItemToArray(af_externalsList, itemLocal);
+ OpenAPI_lnode_t *af_externals_node;
+ if (external_unrelated_class->af_externals) {
+ OpenAPI_list_for_each(external_unrelated_class->af_externals, af_externals_node) {
+ cJSON *itemLocal = OpenAPI_af_external_convertToJSON(af_externals_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_external_unrelated_class_convertToJSON() failed [af_externals]");
+ goto end;
}
+ cJSON_AddItemToArray(af_externalsList, itemLocal);
}
}
+ }
if (external_unrelated_class->lcs_client_group_externals) {
- cJSON *lcs_client_group_externalsList = cJSON_AddArrayToObject(item, "lcsClientGroupExternals");
- if (lcs_client_group_externalsList == NULL) {
- ogs_error("OpenAPI_external_unrelated_class_convertToJSON() failed [lcs_client_group_externals]");
- goto end;
- }
+ cJSON *lcs_client_group_externalsList = cJSON_AddArrayToObject(item, "lcsClientGroupExternals");
+ if (lcs_client_group_externalsList == NULL) {
+ ogs_error("OpenAPI_external_unrelated_class_convertToJSON() failed [lcs_client_group_externals]");
+ goto end;
+ }
- OpenAPI_lnode_t *lcs_client_group_externals_node;
- if (external_unrelated_class->lcs_client_group_externals) {
- OpenAPI_list_for_each(external_unrelated_class->lcs_client_group_externals, lcs_client_group_externals_node) {
- cJSON *itemLocal = OpenAPI_lcs_client_group_external_convertToJSON(lcs_client_group_externals_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_external_unrelated_class_convertToJSON() failed [lcs_client_group_externals]");
- goto end;
- }
- cJSON_AddItemToArray(lcs_client_group_externalsList, itemLocal);
+ OpenAPI_lnode_t *lcs_client_group_externals_node;
+ if (external_unrelated_class->lcs_client_group_externals) {
+ OpenAPI_list_for_each(external_unrelated_class->lcs_client_group_externals, lcs_client_group_externals_node) {
+ cJSON *itemLocal = OpenAPI_lcs_client_group_external_convertToJSON(lcs_client_group_externals_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_external_unrelated_class_convertToJSON() failed [lcs_client_group_externals]");
+ goto end;
}
+ cJSON_AddItemToArray(lcs_client_group_externalsList, itemLocal);
}
}
+ }
end:
return item;
@@ -122,77 +122,77 @@ OpenAPI_external_unrelated_class_t *OpenAPI_external_unrelated_class_parseFromJS
cJSON *lcs_client_externals = cJSON_GetObjectItemCaseSensitive(external_unrelated_classJSON, "lcsClientExternals");
OpenAPI_list_t *lcs_client_externalsList;
- if (lcs_client_externals) {
- cJSON *lcs_client_externals_local_nonprimitive;
- if (!cJSON_IsArray(lcs_client_externals)) {
+ if (lcs_client_externals) {
+ cJSON *lcs_client_externals_local_nonprimitive;
+ if (!cJSON_IsArray(lcs_client_externals)){
+ ogs_error("OpenAPI_external_unrelated_class_parseFromJSON() failed [lcs_client_externals]");
+ goto end;
+ }
+
+ lcs_client_externalsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(lcs_client_externals_local_nonprimitive, lcs_client_externals ) {
+ if (!cJSON_IsObject(lcs_client_externals_local_nonprimitive)) {
ogs_error("OpenAPI_external_unrelated_class_parseFromJSON() failed [lcs_client_externals]");
goto end;
}
+ OpenAPI_lcs_client_external_t *lcs_client_externalsItem = OpenAPI_lcs_client_external_parseFromJSON(lcs_client_externals_local_nonprimitive);
- lcs_client_externalsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(lcs_client_externals_local_nonprimitive, lcs_client_externals ) {
- if (!cJSON_IsObject(lcs_client_externals_local_nonprimitive)) {
- ogs_error("OpenAPI_external_unrelated_class_parseFromJSON() failed [lcs_client_externals]");
- goto end;
- }
- OpenAPI_lcs_client_external_t *lcs_client_externalsItem = OpenAPI_lcs_client_external_parseFromJSON(lcs_client_externals_local_nonprimitive);
-
- OpenAPI_list_add(lcs_client_externalsList, lcs_client_externalsItem);
- }
+ OpenAPI_list_add(lcs_client_externalsList, lcs_client_externalsItem);
+ }
}
cJSON *af_externals = cJSON_GetObjectItemCaseSensitive(external_unrelated_classJSON, "afExternals");
OpenAPI_list_t *af_externalsList;
- if (af_externals) {
- cJSON *af_externals_local_nonprimitive;
- if (!cJSON_IsArray(af_externals)) {
+ if (af_externals) {
+ cJSON *af_externals_local_nonprimitive;
+ if (!cJSON_IsArray(af_externals)){
+ ogs_error("OpenAPI_external_unrelated_class_parseFromJSON() failed [af_externals]");
+ goto end;
+ }
+
+ af_externalsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(af_externals_local_nonprimitive, af_externals ) {
+ if (!cJSON_IsObject(af_externals_local_nonprimitive)) {
ogs_error("OpenAPI_external_unrelated_class_parseFromJSON() failed [af_externals]");
goto end;
}
+ OpenAPI_af_external_t *af_externalsItem = OpenAPI_af_external_parseFromJSON(af_externals_local_nonprimitive);
- af_externalsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(af_externals_local_nonprimitive, af_externals ) {
- if (!cJSON_IsObject(af_externals_local_nonprimitive)) {
- ogs_error("OpenAPI_external_unrelated_class_parseFromJSON() failed [af_externals]");
- goto end;
- }
- OpenAPI_af_external_t *af_externalsItem = OpenAPI_af_external_parseFromJSON(af_externals_local_nonprimitive);
-
- OpenAPI_list_add(af_externalsList, af_externalsItem);
- }
+ OpenAPI_list_add(af_externalsList, af_externalsItem);
+ }
}
cJSON *lcs_client_group_externals = cJSON_GetObjectItemCaseSensitive(external_unrelated_classJSON, "lcsClientGroupExternals");
OpenAPI_list_t *lcs_client_group_externalsList;
- if (lcs_client_group_externals) {
- cJSON *lcs_client_group_externals_local_nonprimitive;
- if (!cJSON_IsArray(lcs_client_group_externals)) {
+ if (lcs_client_group_externals) {
+ cJSON *lcs_client_group_externals_local_nonprimitive;
+ if (!cJSON_IsArray(lcs_client_group_externals)){
+ ogs_error("OpenAPI_external_unrelated_class_parseFromJSON() failed [lcs_client_group_externals]");
+ goto end;
+ }
+
+ lcs_client_group_externalsList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(lcs_client_group_externals_local_nonprimitive, lcs_client_group_externals ) {
+ if (!cJSON_IsObject(lcs_client_group_externals_local_nonprimitive)) {
ogs_error("OpenAPI_external_unrelated_class_parseFromJSON() failed [lcs_client_group_externals]");
goto end;
}
+ OpenAPI_lcs_client_group_external_t *lcs_client_group_externalsItem = OpenAPI_lcs_client_group_external_parseFromJSON(lcs_client_group_externals_local_nonprimitive);
- lcs_client_group_externalsList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(lcs_client_group_externals_local_nonprimitive, lcs_client_group_externals ) {
- if (!cJSON_IsObject(lcs_client_group_externals_local_nonprimitive)) {
- ogs_error("OpenAPI_external_unrelated_class_parseFromJSON() failed [lcs_client_group_externals]");
- goto end;
- }
- OpenAPI_lcs_client_group_external_t *lcs_client_group_externalsItem = OpenAPI_lcs_client_group_external_parseFromJSON(lcs_client_group_externals_local_nonprimitive);
-
- OpenAPI_list_add(lcs_client_group_externalsList, lcs_client_group_externalsItem);
- }
+ OpenAPI_list_add(lcs_client_group_externalsList, lcs_client_group_externalsItem);
+ }
}
external_unrelated_class_local_var = OpenAPI_external_unrelated_class_create (
lcs_client_externals ? lcs_client_externalsList : NULL,
af_externals ? af_externalsList : NULL,
lcs_client_group_externals ? lcs_client_group_externalsList : NULL
- );
+ );
return external_unrelated_class_local_var;
end:
diff --git a/lib/sbi/openapi/model/external_unrelated_class.h b/lib/sbi/openapi/model/external_unrelated_class.h
index ecfba6232..2b72e0387 100644
--- a/lib/sbi/openapi/model/external_unrelated_class.h
+++ b/lib/sbi/openapi/model/external_unrelated_class.h
@@ -1,7 +1,7 @@
/*
* external_unrelated_class.h
*
- *
+ *
*/
#ifndef _OpenAPI_external_unrelated_class_H_
@@ -31,7 +31,7 @@ OpenAPI_external_unrelated_class_t *OpenAPI_external_unrelated_class_create(
OpenAPI_list_t *lcs_client_externals,
OpenAPI_list_t *af_externals,
OpenAPI_list_t *lcs_client_group_externals
- );
+);
void OpenAPI_external_unrelated_class_free(OpenAPI_external_unrelated_class_t *external_unrelated_class);
OpenAPI_external_unrelated_class_t *OpenAPI_external_unrelated_class_parseFromJSON(cJSON *external_unrelated_classJSON);
cJSON *OpenAPI_external_unrelated_class_convertToJSON(OpenAPI_external_unrelated_class_t *external_unrelated_class);
diff --git a/lib/sbi/openapi/model/failure_cause.c b/lib/sbi/openapi/model/failure_cause.c
index 808c4421d..45d7b7fa7 100644
--- a/lib/sbi/openapi/model/failure_cause.c
+++ b/lib/sbi/openapi/model/failure_cause.c
@@ -6,7 +6,7 @@
char* OpenAPI_failure_cause_ToString(OpenAPI_failure_cause_e failure_cause)
{
- const char *failure_causeArray[] = { "NULL", "PCC_RULE_EVENT", "PCC_QOS_FLOW_EVENT", "RULE_PERMANENT_ERROR", "RULE_TEMPORARY_ERROR" };
+ const char *failure_causeArray[] = { "NULL", "PCC_RULE_EVENT", "PCC_QOS_FLOW_EVENT", "RULE_PERMANENT_ERROR", "RULE_TEMPORARY_ERROR", "POL_DEC_ERROR" };
size_t sizeofArray = sizeof(failure_causeArray) / sizeof(failure_causeArray[0]);
if (failure_cause < sizeofArray)
return (char *)failure_causeArray[failure_cause];
@@ -17,7 +17,7 @@ char* OpenAPI_failure_cause_ToString(OpenAPI_failure_cause_e failure_cause)
OpenAPI_failure_cause_e OpenAPI_failure_cause_FromString(char* failure_cause)
{
int stringToReturn = 0;
- const char *failure_causeArray[] = { "NULL", "PCC_RULE_EVENT", "PCC_QOS_FLOW_EVENT", "RULE_PERMANENT_ERROR", "RULE_TEMPORARY_ERROR" };
+ const char *failure_causeArray[] = { "NULL", "PCC_RULE_EVENT", "PCC_QOS_FLOW_EVENT", "RULE_PERMANENT_ERROR", "RULE_TEMPORARY_ERROR", "POL_DEC_ERROR" };
size_t sizeofArray = sizeof(failure_causeArray) / sizeof(failure_causeArray[0]);
while (stringToReturn < sizeofArray) {
if (strcmp(failure_cause, failure_causeArray[stringToReturn]) == 0) {
diff --git a/lib/sbi/openapi/model/failure_cause.h b/lib/sbi/openapi/model/failure_cause.h
index 8dde24e31..14abe53ad 100644
--- a/lib/sbi/openapi/model/failure_cause.h
+++ b/lib/sbi/openapi/model/failure_cause.h
@@ -1,7 +1,7 @@
/*
* failure_cause.h
*
- *
+ *
*/
#ifndef _OpenAPI_failure_cause_H_
@@ -17,7 +17,7 @@
extern "C" {
#endif
-typedef enum { OpenAPI_failure_cause_NULL = 0, OpenAPI_failure_cause_PCC_RULE_EVENT, OpenAPI_failure_cause_PCC_QOS_FLOW_EVENT, OpenAPI_failure_cause_RULE_PERMANENT_ERROR, OpenAPI_failure_cause_RULE_TEMPORARY_ERROR } OpenAPI_failure_cause_e;
+typedef enum { OpenAPI_failure_cause_NULL = 0, OpenAPI_failure_cause_PCC_RULE_EVENT, OpenAPI_failure_cause_PCC_QOS_FLOW_EVENT, OpenAPI_failure_cause_RULE_PERMANENT_ERROR, OpenAPI_failure_cause_RULE_TEMPORARY_ERROR, OpenAPI_failure_cause_POL_DEC_ERROR } OpenAPI_failure_cause_e;
char* OpenAPI_failure_cause_ToString(OpenAPI_failure_cause_e failure_cause);
diff --git a/lib/sbi/openapi/model/failure_code.h b/lib/sbi/openapi/model/failure_code.h
index c8bde5b91..33667c507 100644
--- a/lib/sbi/openapi/model/failure_code.h
+++ b/lib/sbi/openapi/model/failure_code.h
@@ -1,7 +1,7 @@
/*
* failure_code.h
*
- *
+ *
*/
#ifndef _OpenAPI_failure_code_H_
diff --git a/lib/sbi/openapi/model/final_unit_action.c b/lib/sbi/openapi/model/final_unit_action.c
index 030269000..74f8a0ae7 100644
--- a/lib/sbi/openapi/model/final_unit_action.c
+++ b/lib/sbi/openapi/model/final_unit_action.c
@@ -5,7 +5,7 @@
#include "final_unit_action.h"
OpenAPI_final_unit_action_t *OpenAPI_final_unit_action_create(
- )
+)
{
OpenAPI_final_unit_action_t *final_unit_action_local_var = OpenAPI_malloc(sizeof(OpenAPI_final_unit_action_t));
if (!final_unit_action_local_var) {
@@ -42,7 +42,7 @@ OpenAPI_final_unit_action_t *OpenAPI_final_unit_action_parseFromJSON(cJSON *fina
{
OpenAPI_final_unit_action_t *final_unit_action_local_var = NULL;
final_unit_action_local_var = OpenAPI_final_unit_action_create (
- );
+ );
return final_unit_action_local_var;
end:
diff --git a/lib/sbi/openapi/model/final_unit_action.h b/lib/sbi/openapi/model/final_unit_action.h
index 33439c922..1bbe40395 100644
--- a/lib/sbi/openapi/model/final_unit_action.h
+++ b/lib/sbi/openapi/model/final_unit_action.h
@@ -1,7 +1,7 @@
/*
* final_unit_action.h
*
- *
+ *
*/
#ifndef _OpenAPI_final_unit_action_H_
@@ -12,6 +12,7 @@
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
+#include "final_unit_action_any_of.h"
#ifdef __cplusplus
extern "C" {
@@ -22,7 +23,7 @@ typedef struct OpenAPI_final_unit_action_s {
} OpenAPI_final_unit_action_t;
OpenAPI_final_unit_action_t *OpenAPI_final_unit_action_create(
- );
+);
void OpenAPI_final_unit_action_free(OpenAPI_final_unit_action_t *final_unit_action);
OpenAPI_final_unit_action_t *OpenAPI_final_unit_action_parseFromJSON(cJSON *final_unit_actionJSON);
cJSON *OpenAPI_final_unit_action_convertToJSON(OpenAPI_final_unit_action_t *final_unit_action);
diff --git a/lib/sbi/openapi/model/final_unit_action_any_of.c b/lib/sbi/openapi/model/final_unit_action_any_of.c
new file mode 100644
index 000000000..5a276f037
--- /dev/null
+++ b/lib/sbi/openapi/model/final_unit_action_any_of.c
@@ -0,0 +1,30 @@
+
+#include
+#include
+#include
+#include "final_unit_action_any_of.h"
+
+char* OpenAPI_final_unit_action_any_of_ToString(OpenAPI_final_unit_action_any_of_e final_unit_action_any_of)
+{
+ const char *final_unit_action_any_ofArray[] = { "NULL", "TERMINATE", "REDIRECT", "RESTRICT_ACCESS" };
+ size_t sizeofArray = sizeof(final_unit_action_any_ofArray) / sizeof(final_unit_action_any_ofArray[0]);
+ if (final_unit_action_any_of < sizeofArray)
+ return (char *)final_unit_action_any_ofArray[final_unit_action_any_of];
+ else
+ return (char *)"Unknown";
+}
+
+OpenAPI_final_unit_action_any_of_e OpenAPI_final_unit_action_any_of_FromString(char* final_unit_action_any_of)
+{
+ int stringToReturn = 0;
+ const char *final_unit_action_any_ofArray[] = { "NULL", "TERMINATE", "REDIRECT", "RESTRICT_ACCESS" };
+ size_t sizeofArray = sizeof(final_unit_action_any_ofArray) / sizeof(final_unit_action_any_ofArray[0]);
+ while (stringToReturn < sizeofArray) {
+ if (strcmp(final_unit_action_any_of, final_unit_action_any_ofArray[stringToReturn]) == 0) {
+ return stringToReturn;
+ }
+ stringToReturn++;
+ }
+ return 0;
+}
+
diff --git a/lib/sbi/openapi/model/final_unit_action_any_of.h b/lib/sbi/openapi/model/final_unit_action_any_of.h
new file mode 100644
index 000000000..533f9ad50
--- /dev/null
+++ b/lib/sbi/openapi/model/final_unit_action_any_of.h
@@ -0,0 +1,31 @@
+/*
+ * final_unit_action_any_of.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_final_unit_action_any_of_H_
+#define _OpenAPI_final_unit_action_any_of_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum { OpenAPI_final_unit_action_any_of_NULL = 0, OpenAPI_final_unit_action_any_of_TERMINATE, OpenAPI_final_unit_action_any_of_REDIRECT, OpenAPI_final_unit_action_any_of_RESTRICT_ACCESS } OpenAPI_final_unit_action_any_of_e;
+
+char* OpenAPI_final_unit_action_any_of_ToString(OpenAPI_final_unit_action_any_of_e final_unit_action_any_of);
+
+OpenAPI_final_unit_action_any_of_e OpenAPI_final_unit_action_any_of_FromString(char* final_unit_action_any_of);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_final_unit_action_any_of_H_ */
+
diff --git a/lib/sbi/openapi/model/flow_direction.h b/lib/sbi/openapi/model/flow_direction.h
index 6185e4db6..a05ebe14e 100644
--- a/lib/sbi/openapi/model/flow_direction.h
+++ b/lib/sbi/openapi/model/flow_direction.h
@@ -1,7 +1,7 @@
/*
* flow_direction.h
*
- *
+ *
*/
#ifndef _OpenAPI_flow_direction_H_
diff --git a/lib/sbi/openapi/model/flow_info.c b/lib/sbi/openapi/model/flow_info.c
index 30b0b0cba..853b84e1f 100644
--- a/lib/sbi/openapi/model/flow_info.c
+++ b/lib/sbi/openapi/model/flow_info.c
@@ -7,7 +7,7 @@
OpenAPI_flow_info_t *OpenAPI_flow_info_create(
int flow_id,
OpenAPI_list_t *flow_descriptions
- )
+)
{
OpenAPI_flow_info_t *flow_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_flow_info_t));
if (!flow_info_local_var) {
@@ -48,19 +48,19 @@ cJSON *OpenAPI_flow_info_convertToJSON(OpenAPI_flow_info_t *flow_info)
}
if (flow_info->flow_descriptions) {
- cJSON *flow_descriptions = cJSON_AddArrayToObject(item, "flowDescriptions");
- if (flow_descriptions == NULL) {
- ogs_error("OpenAPI_flow_info_convertToJSON() failed [flow_descriptions]");
- goto end;
- }
+ cJSON *flow_descriptions = cJSON_AddArrayToObject(item, "flowDescriptions");
+ if (flow_descriptions == NULL) {
+ ogs_error("OpenAPI_flow_info_convertToJSON() failed [flow_descriptions]");
+ goto end;
+ }
- OpenAPI_lnode_t *flow_descriptions_node;
- OpenAPI_list_for_each(flow_info->flow_descriptions, flow_descriptions_node) {
- if (cJSON_AddStringToObject(flow_descriptions, "", (char*)flow_descriptions_node->data) == NULL) {
- ogs_error("OpenAPI_flow_info_convertToJSON() failed [flow_descriptions]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *flow_descriptions_node;
+ OpenAPI_list_for_each(flow_info->flow_descriptions, flow_descriptions_node) {
+ if (cJSON_AddStringToObject(flow_descriptions, "", (char*)flow_descriptions_node->data) == NULL) {
+ ogs_error("OpenAPI_flow_info_convertToJSON() failed [flow_descriptions]");
+ goto end;
+ }
+ }
}
end:
@@ -76,7 +76,7 @@ OpenAPI_flow_info_t *OpenAPI_flow_info_parseFromJSON(cJSON *flow_infoJSON)
goto end;
}
-
+
if (!cJSON_IsNumber(flow_id)) {
ogs_error("OpenAPI_flow_info_parseFromJSON() failed [flow_id]");
goto end;
@@ -85,27 +85,27 @@ OpenAPI_flow_info_t *OpenAPI_flow_info_parseFromJSON(cJSON *flow_infoJSON)
cJSON *flow_descriptions = cJSON_GetObjectItemCaseSensitive(flow_infoJSON, "flowDescriptions");
OpenAPI_list_t *flow_descriptionsList;
- if (flow_descriptions) {
- cJSON *flow_descriptions_local;
- if (!cJSON_IsArray(flow_descriptions)) {
- ogs_error("OpenAPI_flow_info_parseFromJSON() failed [flow_descriptions]");
- goto end;
- }
- flow_descriptionsList = OpenAPI_list_create();
+ if (flow_descriptions) {
+ cJSON *flow_descriptions_local;
+ if (!cJSON_IsArray(flow_descriptions)) {
+ ogs_error("OpenAPI_flow_info_parseFromJSON() failed [flow_descriptions]");
+ goto end;
+ }
+ flow_descriptionsList = OpenAPI_list_create();
- cJSON_ArrayForEach(flow_descriptions_local, flow_descriptions) {
- if (!cJSON_IsString(flow_descriptions_local)) {
- ogs_error("OpenAPI_flow_info_parseFromJSON() failed [flow_descriptions]");
- goto end;
- }
- OpenAPI_list_add(flow_descriptionsList, ogs_strdup_or_assert(flow_descriptions_local->valuestring));
- }
+ cJSON_ArrayForEach(flow_descriptions_local, flow_descriptions) {
+ if (!cJSON_IsString(flow_descriptions_local)) {
+ ogs_error("OpenAPI_flow_info_parseFromJSON() failed [flow_descriptions]");
+ goto end;
+ }
+ OpenAPI_list_add(flow_descriptionsList , ogs_strdup_or_assert(flow_descriptions_local->valuestring));
+ }
}
flow_info_local_var = OpenAPI_flow_info_create (
flow_id->valuedouble,
flow_descriptions ? flow_descriptionsList : NULL
- );
+ );
return flow_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/flow_info.h b/lib/sbi/openapi/model/flow_info.h
index b4db71506..6b5fda14d 100644
--- a/lib/sbi/openapi/model/flow_info.h
+++ b/lib/sbi/openapi/model/flow_info.h
@@ -1,7 +1,7 @@
/*
* flow_info.h
*
- *
+ *
*/
#ifndef _OpenAPI_flow_info_H_
@@ -26,7 +26,7 @@ typedef struct OpenAPI_flow_info_s {
OpenAPI_flow_info_t *OpenAPI_flow_info_create(
int flow_id,
OpenAPI_list_t *flow_descriptions
- );
+);
void OpenAPI_flow_info_free(OpenAPI_flow_info_t *flow_info);
OpenAPI_flow_info_t *OpenAPI_flow_info_parseFromJSON(cJSON *flow_infoJSON);
cJSON *OpenAPI_flow_info_convertToJSON(OpenAPI_flow_info_t *flow_info);
diff --git a/lib/sbi/openapi/model/flow_information.c b/lib/sbi/openapi/model/flow_information.c
index 3a751343e..f00ac5c36 100644
--- a/lib/sbi/openapi/model/flow_information.c
+++ b/lib/sbi/openapi/model/flow_information.c
@@ -13,7 +13,7 @@ OpenAPI_flow_information_t *OpenAPI_flow_information_create(
char *spi,
char *flow_label,
OpenAPI_flow_direction_e flow_direction
- )
+)
{
OpenAPI_flow_information_t *flow_information_local_var = OpenAPI_malloc(sizeof(OpenAPI_flow_information_t));
if (!flow_information_local_var) {
@@ -57,65 +57,65 @@ cJSON *OpenAPI_flow_information_convertToJSON(OpenAPI_flow_information_t *flow_i
item = cJSON_CreateObject();
if (flow_information->flow_description) {
- if (cJSON_AddStringToObject(item, "flowDescription", flow_information->flow_description) == NULL) {
- ogs_error("OpenAPI_flow_information_convertToJSON() failed [flow_description]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "flowDescription", flow_information->flow_description) == NULL) {
+ ogs_error("OpenAPI_flow_information_convertToJSON() failed [flow_description]");
+ goto end;
+ }
}
if (flow_information->eth_flow_description) {
- cJSON *eth_flow_description_local_JSON = OpenAPI_eth_flow_description_convertToJSON(flow_information->eth_flow_description);
- if (eth_flow_description_local_JSON == NULL) {
- ogs_error("OpenAPI_flow_information_convertToJSON() failed [eth_flow_description]");
- goto end;
- }
- cJSON_AddItemToObject(item, "ethFlowDescription", eth_flow_description_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_flow_information_convertToJSON() failed [eth_flow_description]");
- goto end;
- }
+ cJSON *eth_flow_description_local_JSON = OpenAPI_eth_flow_description_convertToJSON(flow_information->eth_flow_description);
+ if (eth_flow_description_local_JSON == NULL) {
+ ogs_error("OpenAPI_flow_information_convertToJSON() failed [eth_flow_description]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "ethFlowDescription", eth_flow_description_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_flow_information_convertToJSON() failed [eth_flow_description]");
+ goto end;
+ }
}
if (flow_information->pack_filt_id) {
- if (cJSON_AddStringToObject(item, "packFiltId", flow_information->pack_filt_id) == NULL) {
- ogs_error("OpenAPI_flow_information_convertToJSON() failed [pack_filt_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "packFiltId", flow_information->pack_filt_id) == NULL) {
+ ogs_error("OpenAPI_flow_information_convertToJSON() failed [pack_filt_id]");
+ goto end;
+ }
}
if (flow_information->packet_filter_usage) {
- if (cJSON_AddBoolToObject(item, "packetFilterUsage", flow_information->packet_filter_usage) == NULL) {
- ogs_error("OpenAPI_flow_information_convertToJSON() failed [packet_filter_usage]");
- goto end;
- }
+ if (cJSON_AddBoolToObject(item, "packetFilterUsage", flow_information->packet_filter_usage) == NULL) {
+ ogs_error("OpenAPI_flow_information_convertToJSON() failed [packet_filter_usage]");
+ goto end;
+ }
}
if (flow_information->tos_traffic_class) {
- if (cJSON_AddStringToObject(item, "tosTrafficClass", flow_information->tos_traffic_class) == NULL) {
- ogs_error("OpenAPI_flow_information_convertToJSON() failed [tos_traffic_class]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "tosTrafficClass", flow_information->tos_traffic_class) == NULL) {
+ ogs_error("OpenAPI_flow_information_convertToJSON() failed [tos_traffic_class]");
+ goto end;
+ }
}
if (flow_information->spi) {
- if (cJSON_AddStringToObject(item, "spi", flow_information->spi) == NULL) {
- ogs_error("OpenAPI_flow_information_convertToJSON() failed [spi]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "spi", flow_information->spi) == NULL) {
+ ogs_error("OpenAPI_flow_information_convertToJSON() failed [spi]");
+ goto end;
+ }
}
if (flow_information->flow_label) {
- if (cJSON_AddStringToObject(item, "flowLabel", flow_information->flow_label) == NULL) {
- ogs_error("OpenAPI_flow_information_convertToJSON() failed [flow_label]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "flowLabel", flow_information->flow_label) == NULL) {
+ ogs_error("OpenAPI_flow_information_convertToJSON() failed [flow_label]");
+ goto end;
+ }
}
if (flow_information->flow_direction) {
- if (cJSON_AddStringToObject(item, "flowDirection", OpenAPI_flow_direction_ToString(flow_information->flow_direction)) == NULL) {
- ogs_error("OpenAPI_flow_information_convertToJSON() failed [flow_direction]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "flowDirection", OpenAPI_flow_direction_ToString(flow_information->flow_direction)) == NULL) {
+ ogs_error("OpenAPI_flow_information_convertToJSON() failed [flow_direction]");
+ goto end;
+ }
}
end:
@@ -127,74 +127,74 @@ OpenAPI_flow_information_t *OpenAPI_flow_information_parseFromJSON(cJSON *flow_i
OpenAPI_flow_information_t *flow_information_local_var = NULL;
cJSON *flow_description = cJSON_GetObjectItemCaseSensitive(flow_informationJSON, "flowDescription");
- if (flow_description) {
- if (!cJSON_IsString(flow_description)) {
- ogs_error("OpenAPI_flow_information_parseFromJSON() failed [flow_description]");
- goto end;
- }
+ if (flow_description) {
+ if (!cJSON_IsString(flow_description)) {
+ ogs_error("OpenAPI_flow_information_parseFromJSON() failed [flow_description]");
+ goto end;
+ }
}
cJSON *eth_flow_description = cJSON_GetObjectItemCaseSensitive(flow_informationJSON, "ethFlowDescription");
OpenAPI_eth_flow_description_t *eth_flow_description_local_nonprim = NULL;
- if (eth_flow_description) {
- eth_flow_description_local_nonprim = OpenAPI_eth_flow_description_parseFromJSON(eth_flow_description);
+ if (eth_flow_description) {
+ eth_flow_description_local_nonprim = OpenAPI_eth_flow_description_parseFromJSON(eth_flow_description);
}
cJSON *pack_filt_id = cJSON_GetObjectItemCaseSensitive(flow_informationJSON, "packFiltId");
- if (pack_filt_id) {
- if (!cJSON_IsString(pack_filt_id)) {
- ogs_error("OpenAPI_flow_information_parseFromJSON() failed [pack_filt_id]");
- goto end;
- }
+ if (pack_filt_id) {
+ if (!cJSON_IsString(pack_filt_id)) {
+ ogs_error("OpenAPI_flow_information_parseFromJSON() failed [pack_filt_id]");
+ goto end;
+ }
}
cJSON *packet_filter_usage = cJSON_GetObjectItemCaseSensitive(flow_informationJSON, "packetFilterUsage");
- if (packet_filter_usage) {
- if (!cJSON_IsBool(packet_filter_usage)) {
- ogs_error("OpenAPI_flow_information_parseFromJSON() failed [packet_filter_usage]");
- goto end;
- }
+ if (packet_filter_usage) {
+ if (!cJSON_IsBool(packet_filter_usage)) {
+ ogs_error("OpenAPI_flow_information_parseFromJSON() failed [packet_filter_usage]");
+ goto end;
+ }
}
cJSON *tos_traffic_class = cJSON_GetObjectItemCaseSensitive(flow_informationJSON, "tosTrafficClass");
- if (tos_traffic_class) {
- if (!cJSON_IsString(tos_traffic_class)) {
- ogs_error("OpenAPI_flow_information_parseFromJSON() failed [tos_traffic_class]");
- goto end;
- }
+ if (tos_traffic_class) {
+ if (!cJSON_IsString(tos_traffic_class)) {
+ ogs_error("OpenAPI_flow_information_parseFromJSON() failed [tos_traffic_class]");
+ goto end;
+ }
}
cJSON *spi = cJSON_GetObjectItemCaseSensitive(flow_informationJSON, "spi");
- if (spi) {
- if (!cJSON_IsString(spi)) {
- ogs_error("OpenAPI_flow_information_parseFromJSON() failed [spi]");
- goto end;
- }
+ if (spi) {
+ if (!cJSON_IsString(spi)) {
+ ogs_error("OpenAPI_flow_information_parseFromJSON() failed [spi]");
+ goto end;
+ }
}
cJSON *flow_label = cJSON_GetObjectItemCaseSensitive(flow_informationJSON, "flowLabel");
- if (flow_label) {
- if (!cJSON_IsString(flow_label)) {
- ogs_error("OpenAPI_flow_information_parseFromJSON() failed [flow_label]");
- goto end;
- }
+ if (flow_label) {
+ if (!cJSON_IsString(flow_label)) {
+ ogs_error("OpenAPI_flow_information_parseFromJSON() failed [flow_label]");
+ goto end;
+ }
}
cJSON *flow_direction = cJSON_GetObjectItemCaseSensitive(flow_informationJSON, "flowDirection");
OpenAPI_flow_direction_e flow_directionVariable;
- if (flow_direction) {
- if (!cJSON_IsString(flow_direction)) {
- ogs_error("OpenAPI_flow_information_parseFromJSON() failed [flow_direction]");
- goto end;
- }
- flow_directionVariable = OpenAPI_flow_direction_FromString(flow_direction->valuestring);
+ if (flow_direction) {
+ if (!cJSON_IsString(flow_direction)) {
+ ogs_error("OpenAPI_flow_information_parseFromJSON() failed [flow_direction]");
+ goto end;
+ }
+ flow_directionVariable = OpenAPI_flow_direction_FromString(flow_direction->valuestring);
}
flow_information_local_var = OpenAPI_flow_information_create (
@@ -206,7 +206,7 @@ OpenAPI_flow_information_t *OpenAPI_flow_information_parseFromJSON(cJSON *flow_i
spi ? ogs_strdup_or_assert(spi->valuestring) : NULL,
flow_label ? ogs_strdup_or_assert(flow_label->valuestring) : NULL,
flow_direction ? flow_directionVariable : 0
- );
+ );
return flow_information_local_var;
end:
diff --git a/lib/sbi/openapi/model/flow_information.h b/lib/sbi/openapi/model/flow_information.h
index ab2e4302e..759df304f 100644
--- a/lib/sbi/openapi/model/flow_information.h
+++ b/lib/sbi/openapi/model/flow_information.h
@@ -1,7 +1,7 @@
/*
* flow_information.h
*
- *
+ *
*/
#ifndef _OpenAPI_flow_information_H_
@@ -40,7 +40,7 @@ OpenAPI_flow_information_t *OpenAPI_flow_information_create(
char *spi,
char *flow_label,
OpenAPI_flow_direction_e flow_direction
- );
+);
void OpenAPI_flow_information_free(OpenAPI_flow_information_t *flow_information);
OpenAPI_flow_information_t *OpenAPI_flow_information_parseFromJSON(cJSON *flow_informationJSON);
cJSON *OpenAPI_flow_information_convertToJSON(OpenAPI_flow_information_t *flow_information);
diff --git a/lib/sbi/openapi/model/flow_status.h b/lib/sbi/openapi/model/flow_status.h
index b61a3c411..c2fcc1e2d 100644
--- a/lib/sbi/openapi/model/flow_status.h
+++ b/lib/sbi/openapi/model/flow_status.h
@@ -1,7 +1,7 @@
/*
* flow_status.h
*
- *
+ *
*/
#ifndef _OpenAPI_flow_status_H_
diff --git a/lib/sbi/openapi/model/flow_usage.h b/lib/sbi/openapi/model/flow_usage.h
index e1e9b0a38..8a471c341 100644
--- a/lib/sbi/openapi/model/flow_usage.h
+++ b/lib/sbi/openapi/model/flow_usage.h
@@ -1,7 +1,7 @@
/*
* flow_usage.h
*
- *
+ *
*/
#ifndef _OpenAPI_flow_usage_H_
diff --git a/lib/sbi/openapi/model/flows.c b/lib/sbi/openapi/model/flows.c
index b1a64f013..e2a5b093b 100644
--- a/lib/sbi/openapi/model/flows.c
+++ b/lib/sbi/openapi/model/flows.c
@@ -8,7 +8,7 @@ OpenAPI_flows_t *OpenAPI_flows_create(
OpenAPI_list_t *cont_vers,
OpenAPI_list_t *f_nums,
int med_comp_n
- )
+)
{
OpenAPI_flows_t *flows_local_var = OpenAPI_malloc(sizeof(OpenAPI_flows_t));
if (!flows_local_var) {
@@ -49,35 +49,35 @@ cJSON *OpenAPI_flows_convertToJSON(OpenAPI_flows_t *flows)
item = cJSON_CreateObject();
if (flows->cont_vers) {
- cJSON *cont_vers = cJSON_AddArrayToObject(item, "contVers");
- if (cont_vers == NULL) {
- ogs_error("OpenAPI_flows_convertToJSON() failed [cont_vers]");
- goto end;
- }
+ cJSON *cont_vers = cJSON_AddArrayToObject(item, "contVers");
+ if (cont_vers == NULL) {
+ ogs_error("OpenAPI_flows_convertToJSON() failed [cont_vers]");
+ goto end;
+ }
- OpenAPI_lnode_t *cont_vers_node;
- OpenAPI_list_for_each(flows->cont_vers, cont_vers_node) {
- if (cJSON_AddNumberToObject(cont_vers, "", *(double *)cont_vers_node->data) == NULL) {
- ogs_error("OpenAPI_flows_convertToJSON() failed [cont_vers]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *cont_vers_node;
+ OpenAPI_list_for_each(flows->cont_vers, cont_vers_node) {
+ if (cJSON_AddNumberToObject(cont_vers, "", *(double *)cont_vers_node->data) == NULL) {
+ ogs_error("OpenAPI_flows_convertToJSON() failed [cont_vers]");
+ goto end;
+ }
+ }
}
if (flows->f_nums) {
- cJSON *f_nums = cJSON_AddArrayToObject(item, "fNums");
- if (f_nums == NULL) {
- ogs_error("OpenAPI_flows_convertToJSON() failed [f_nums]");
- goto end;
- }
+ cJSON *f_nums = cJSON_AddArrayToObject(item, "fNums");
+ if (f_nums == NULL) {
+ ogs_error("OpenAPI_flows_convertToJSON() failed [f_nums]");
+ goto end;
+ }
- OpenAPI_lnode_t *f_nums_node;
- OpenAPI_list_for_each(flows->f_nums, f_nums_node) {
- if (cJSON_AddNumberToObject(f_nums, "", *(double *)f_nums_node->data) == NULL) {
- ogs_error("OpenAPI_flows_convertToJSON() failed [f_nums]");
- goto end;
- }
- }
+ OpenAPI_lnode_t *f_nums_node;
+ OpenAPI_list_for_each(flows->f_nums, f_nums_node) {
+ if (cJSON_AddNumberToObject(f_nums, "", *(double *)f_nums_node->data) == NULL) {
+ ogs_error("OpenAPI_flows_convertToJSON() failed [f_nums]");
+ goto end;
+ }
+ }
}
if (cJSON_AddNumberToObject(item, "medCompN", flows->med_comp_n) == NULL) {
@@ -95,41 +95,41 @@ OpenAPI_flows_t *OpenAPI_flows_parseFromJSON(cJSON *flowsJSON)
cJSON *cont_vers = cJSON_GetObjectItemCaseSensitive(flowsJSON, "contVers");
OpenAPI_list_t *cont_versList;
- if (cont_vers) {
- cJSON *cont_vers_local;
- if (!cJSON_IsArray(cont_vers)) {
- ogs_error("OpenAPI_flows_parseFromJSON() failed [cont_vers]");
- goto end;
- }
- cont_versList = OpenAPI_list_create();
+ if (cont_vers) {
+ cJSON *cont_vers_local;
+ if (!cJSON_IsArray(cont_vers)) {
+ ogs_error("OpenAPI_flows_parseFromJSON() failed [cont_vers]");
+ goto end;
+ }
+ cont_versList = OpenAPI_list_create();
- cJSON_ArrayForEach(cont_vers_local, cont_vers) {
- if (!cJSON_IsNumber(cont_vers_local)) {
- ogs_error("OpenAPI_flows_parseFromJSON() failed [cont_vers]");
- goto end;
- }
- OpenAPI_list_add(cont_versList, &cont_vers_local->valuedouble);
- }
+ cJSON_ArrayForEach(cont_vers_local, cont_vers) {
+ if (!cJSON_IsNumber(cont_vers_local)) {
+ ogs_error("OpenAPI_flows_parseFromJSON() failed [cont_vers]");
+ goto end;
+ }
+ OpenAPI_list_add(cont_versList , &cont_vers_local->valuedouble);
+ }
}
cJSON *f_nums = cJSON_GetObjectItemCaseSensitive(flowsJSON, "fNums");
OpenAPI_list_t *f_numsList;
- if (f_nums) {
- cJSON *f_nums_local;
- if (!cJSON_IsArray(f_nums)) {
- ogs_error("OpenAPI_flows_parseFromJSON() failed [f_nums]");
- goto end;
- }
- f_numsList = OpenAPI_list_create();
+ if (f_nums) {
+ cJSON *f_nums_local;
+ if (!cJSON_IsArray(f_nums)) {
+ ogs_error("OpenAPI_flows_parseFromJSON() failed [f_nums]");
+ goto end;
+ }
+ f_numsList = OpenAPI_list_create();
- cJSON_ArrayForEach(f_nums_local, f_nums) {
- if (!cJSON_IsNumber(f_nums_local)) {
- ogs_error("OpenAPI_flows_parseFromJSON() failed [f_nums]");
- goto end;
- }
- OpenAPI_list_add(f_numsList, &f_nums_local->valuedouble);
- }
+ cJSON_ArrayForEach(f_nums_local, f_nums) {
+ if (!cJSON_IsNumber(f_nums_local)) {
+ ogs_error("OpenAPI_flows_parseFromJSON() failed [f_nums]");
+ goto end;
+ }
+ OpenAPI_list_add(f_numsList , &f_nums_local->valuedouble);
+ }
}
cJSON *med_comp_n = cJSON_GetObjectItemCaseSensitive(flowsJSON, "medCompN");
@@ -138,7 +138,7 @@ OpenAPI_flows_t *OpenAPI_flows_parseFromJSON(cJSON *flowsJSON)
goto end;
}
-
+
if (!cJSON_IsNumber(med_comp_n)) {
ogs_error("OpenAPI_flows_parseFromJSON() failed [med_comp_n]");
goto end;
@@ -148,7 +148,7 @@ OpenAPI_flows_t *OpenAPI_flows_parseFromJSON(cJSON *flowsJSON)
cont_vers ? cont_versList : NULL,
f_nums ? f_numsList : NULL,
med_comp_n->valuedouble
- );
+ );
return flows_local_var;
end:
diff --git a/lib/sbi/openapi/model/flows.h b/lib/sbi/openapi/model/flows.h
index aaf6363a1..66399559f 100644
--- a/lib/sbi/openapi/model/flows.h
+++ b/lib/sbi/openapi/model/flows.h
@@ -28,7 +28,7 @@ OpenAPI_flows_t *OpenAPI_flows_create(
OpenAPI_list_t *cont_vers,
OpenAPI_list_t *f_nums,
int med_comp_n
- );
+);
void OpenAPI_flows_free(OpenAPI_flows_t *flows);
OpenAPI_flows_t *OpenAPI_flows_parseFromJSON(cJSON *flowsJSON);
cJSON *OpenAPI_flows_convertToJSON(OpenAPI_flows_t *flows);
diff --git a/lib/sbi/openapi/model/frame_route_info.c b/lib/sbi/openapi/model/frame_route_info.c
index 952f40aee..de9b0f195 100644
--- a/lib/sbi/openapi/model/frame_route_info.c
+++ b/lib/sbi/openapi/model/frame_route_info.c
@@ -7,7 +7,7 @@
OpenAPI_frame_route_info_t *OpenAPI_frame_route_info_create(
char *ipv4_mask,
char *ipv6_prefix
- )
+)
{
OpenAPI_frame_route_info_t *frame_route_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_frame_route_info_t));
if (!frame_route_info_local_var) {
@@ -41,17 +41,17 @@ cJSON *OpenAPI_frame_route_info_convertToJSON(OpenAPI_frame_route_info_t *frame_
item = cJSON_CreateObject();
if (frame_route_info->ipv4_mask) {
- if (cJSON_AddStringToObject(item, "ipv4Mask", frame_route_info->ipv4_mask) == NULL) {
- ogs_error("OpenAPI_frame_route_info_convertToJSON() failed [ipv4_mask]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "ipv4Mask", frame_route_info->ipv4_mask) == NULL) {
+ ogs_error("OpenAPI_frame_route_info_convertToJSON() failed [ipv4_mask]");
+ goto end;
+ }
}
if (frame_route_info->ipv6_prefix) {
- if (cJSON_AddStringToObject(item, "ipv6Prefix", frame_route_info->ipv6_prefix) == NULL) {
- ogs_error("OpenAPI_frame_route_info_convertToJSON() failed [ipv6_prefix]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "ipv6Prefix", frame_route_info->ipv6_prefix) == NULL) {
+ ogs_error("OpenAPI_frame_route_info_convertToJSON() failed [ipv6_prefix]");
+ goto end;
+ }
}
end:
@@ -63,26 +63,26 @@ OpenAPI_frame_route_info_t *OpenAPI_frame_route_info_parseFromJSON(cJSON *frame_
OpenAPI_frame_route_info_t *frame_route_info_local_var = NULL;
cJSON *ipv4_mask = cJSON_GetObjectItemCaseSensitive(frame_route_infoJSON, "ipv4Mask");
- if (ipv4_mask) {
- if (!cJSON_IsString(ipv4_mask)) {
- ogs_error("OpenAPI_frame_route_info_parseFromJSON() failed [ipv4_mask]");
- goto end;
- }
+ if (ipv4_mask) {
+ if (!cJSON_IsString(ipv4_mask)) {
+ ogs_error("OpenAPI_frame_route_info_parseFromJSON() failed [ipv4_mask]");
+ goto end;
+ }
}
cJSON *ipv6_prefix = cJSON_GetObjectItemCaseSensitive(frame_route_infoJSON, "ipv6Prefix");
- if (ipv6_prefix) {
- if (!cJSON_IsString(ipv6_prefix)) {
- ogs_error("OpenAPI_frame_route_info_parseFromJSON() failed [ipv6_prefix]");
- goto end;
- }
+ if (ipv6_prefix) {
+ if (!cJSON_IsString(ipv6_prefix)) {
+ ogs_error("OpenAPI_frame_route_info_parseFromJSON() failed [ipv6_prefix]");
+ goto end;
+ }
}
frame_route_info_local_var = OpenAPI_frame_route_info_create (
ipv4_mask ? ogs_strdup_or_assert(ipv4_mask->valuestring) : NULL,
ipv6_prefix ? ogs_strdup_or_assert(ipv6_prefix->valuestring) : NULL
- );
+ );
return frame_route_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/frame_route_info.h b/lib/sbi/openapi/model/frame_route_info.h
index fffa3c7a9..179719856 100644
--- a/lib/sbi/openapi/model/frame_route_info.h
+++ b/lib/sbi/openapi/model/frame_route_info.h
@@ -1,7 +1,7 @@
/*
* frame_route_info.h
*
- *
+ *
*/
#ifndef _OpenAPI_frame_route_info_H_
@@ -26,7 +26,7 @@ typedef struct OpenAPI_frame_route_info_s {
OpenAPI_frame_route_info_t *OpenAPI_frame_route_info_create(
char *ipv4_mask,
char *ipv6_prefix
- );
+);
void OpenAPI_frame_route_info_free(OpenAPI_frame_route_info_t *frame_route_info);
OpenAPI_frame_route_info_t *OpenAPI_frame_route_info_parseFromJSON(cJSON *frame_route_infoJSON);
cJSON *OpenAPI_frame_route_info_convertToJSON(OpenAPI_frame_route_info_t *frame_route_info);
diff --git a/lib/sbi/openapi/model/frame_route_info_1.c b/lib/sbi/openapi/model/frame_route_info_1.c
new file mode 100644
index 000000000..eb89ea8bf
--- /dev/null
+++ b/lib/sbi/openapi/model/frame_route_info_1.c
@@ -0,0 +1,125 @@
+
+#include
+#include
+#include
+#include "frame_route_info_1.h"
+
+OpenAPI_frame_route_info_1_t *OpenAPI_frame_route_info_1_create(
+ char *ipv4_mask,
+ char *ipv6_prefix
+)
+{
+ OpenAPI_frame_route_info_1_t *frame_route_info_1_local_var = OpenAPI_malloc(sizeof(OpenAPI_frame_route_info_1_t));
+ if (!frame_route_info_1_local_var) {
+ return NULL;
+ }
+ frame_route_info_1_local_var->ipv4_mask = ipv4_mask;
+ frame_route_info_1_local_var->ipv6_prefix = ipv6_prefix;
+
+ return frame_route_info_1_local_var;
+}
+
+void OpenAPI_frame_route_info_1_free(OpenAPI_frame_route_info_1_t *frame_route_info_1)
+{
+ if (NULL == frame_route_info_1) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ ogs_free(frame_route_info_1->ipv4_mask);
+ ogs_free(frame_route_info_1->ipv6_prefix);
+ ogs_free(frame_route_info_1);
+}
+
+cJSON *OpenAPI_frame_route_info_1_convertToJSON(OpenAPI_frame_route_info_1_t *frame_route_info_1)
+{
+ cJSON *item = NULL;
+
+ if (frame_route_info_1 == NULL) {
+ ogs_error("OpenAPI_frame_route_info_1_convertToJSON() failed [FrameRouteInfo_1]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ if (frame_route_info_1->ipv4_mask) {
+ if (cJSON_AddStringToObject(item, "ipv4Mask", frame_route_info_1->ipv4_mask) == NULL) {
+ ogs_error("OpenAPI_frame_route_info_1_convertToJSON() failed [ipv4_mask]");
+ goto end;
+ }
+ }
+
+ if (frame_route_info_1->ipv6_prefix) {
+ if (cJSON_AddStringToObject(item, "ipv6Prefix", frame_route_info_1->ipv6_prefix) == NULL) {
+ ogs_error("OpenAPI_frame_route_info_1_convertToJSON() failed [ipv6_prefix]");
+ goto end;
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_frame_route_info_1_t *OpenAPI_frame_route_info_1_parseFromJSON(cJSON *frame_route_info_1JSON)
+{
+ OpenAPI_frame_route_info_1_t *frame_route_info_1_local_var = NULL;
+ cJSON *ipv4_mask = cJSON_GetObjectItemCaseSensitive(frame_route_info_1JSON, "ipv4Mask");
+
+ if (ipv4_mask) {
+ if (!cJSON_IsString(ipv4_mask)) {
+ ogs_error("OpenAPI_frame_route_info_1_parseFromJSON() failed [ipv4_mask]");
+ goto end;
+ }
+ }
+
+ cJSON *ipv6_prefix = cJSON_GetObjectItemCaseSensitive(frame_route_info_1JSON, "ipv6Prefix");
+
+ if (ipv6_prefix) {
+ if (!cJSON_IsString(ipv6_prefix)) {
+ ogs_error("OpenAPI_frame_route_info_1_parseFromJSON() failed [ipv6_prefix]");
+ goto end;
+ }
+ }
+
+ frame_route_info_1_local_var = OpenAPI_frame_route_info_1_create (
+ ipv4_mask ? ogs_strdup_or_assert(ipv4_mask->valuestring) : NULL,
+ ipv6_prefix ? ogs_strdup_or_assert(ipv6_prefix->valuestring) : NULL
+ );
+
+ return frame_route_info_1_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_frame_route_info_1_t *OpenAPI_frame_route_info_1_copy(OpenAPI_frame_route_info_1_t *dst, OpenAPI_frame_route_info_1_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_frame_route_info_1_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_frame_route_info_1_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_frame_route_info_1_free(dst);
+ dst = OpenAPI_frame_route_info_1_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/frame_route_info_1.h b/lib/sbi/openapi/model/frame_route_info_1.h
new file mode 100644
index 000000000..58eae3c0e
--- /dev/null
+++ b/lib/sbi/openapi/model/frame_route_info_1.h
@@ -0,0 +1,40 @@
+/*
+ * frame_route_info_1.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_frame_route_info_1_H_
+#define _OpenAPI_frame_route_info_1_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_frame_route_info_1_s OpenAPI_frame_route_info_1_t;
+typedef struct OpenAPI_frame_route_info_1_s {
+ char *ipv4_mask;
+ char *ipv6_prefix;
+} OpenAPI_frame_route_info_1_t;
+
+OpenAPI_frame_route_info_1_t *OpenAPI_frame_route_info_1_create(
+ char *ipv4_mask,
+ char *ipv6_prefix
+);
+void OpenAPI_frame_route_info_1_free(OpenAPI_frame_route_info_1_t *frame_route_info_1);
+OpenAPI_frame_route_info_1_t *OpenAPI_frame_route_info_1_parseFromJSON(cJSON *frame_route_info_1JSON);
+cJSON *OpenAPI_frame_route_info_1_convertToJSON(OpenAPI_frame_route_info_1_t *frame_route_info_1);
+OpenAPI_frame_route_info_1_t *OpenAPI_frame_route_info_1_copy(OpenAPI_frame_route_info_1_t *dst, OpenAPI_frame_route_info_1_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_frame_route_info_1_H_ */
+
diff --git a/lib/sbi/openapi/model/g_nb_id.c b/lib/sbi/openapi/model/g_nb_id.c
deleted file mode 100644
index e35fe09c1..000000000
--- a/lib/sbi/openapi/model/g_nb_id.c
+++ /dev/null
@@ -1,126 +0,0 @@
-
-#include
-#include
-#include
-#include "g_nb_id.h"
-
-OpenAPI_g_nb_id_t *OpenAPI_g_nb_id_create(
- int bit_length,
- char *g_nb_value
- )
-{
- OpenAPI_g_nb_id_t *g_nb_id_local_var = OpenAPI_malloc(sizeof(OpenAPI_g_nb_id_t));
- if (!g_nb_id_local_var) {
- return NULL;
- }
- g_nb_id_local_var->bit_length = bit_length;
- g_nb_id_local_var->g_nb_value = g_nb_value;
-
- return g_nb_id_local_var;
-}
-
-void OpenAPI_g_nb_id_free(OpenAPI_g_nb_id_t *g_nb_id)
-{
- if (NULL == g_nb_id) {
- return;
- }
- OpenAPI_lnode_t *node;
- ogs_free(g_nb_id->g_nb_value);
- ogs_free(g_nb_id);
-}
-
-cJSON *OpenAPI_g_nb_id_convertToJSON(OpenAPI_g_nb_id_t *g_nb_id)
-{
- cJSON *item = NULL;
-
- if (g_nb_id == NULL) {
- ogs_error("OpenAPI_g_nb_id_convertToJSON() failed [GNbId]");
- return NULL;
- }
-
- item = cJSON_CreateObject();
- if (cJSON_AddNumberToObject(item, "bitLength", g_nb_id->bit_length) == NULL) {
- ogs_error("OpenAPI_g_nb_id_convertToJSON() failed [bit_length]");
- goto end;
- }
-
- if (cJSON_AddStringToObject(item, "gNBValue", g_nb_id->g_nb_value) == NULL) {
- ogs_error("OpenAPI_g_nb_id_convertToJSON() failed [g_nb_value]");
- goto end;
- }
-
-end:
- return item;
-}
-
-OpenAPI_g_nb_id_t *OpenAPI_g_nb_id_parseFromJSON(cJSON *g_nb_idJSON)
-{
- OpenAPI_g_nb_id_t *g_nb_id_local_var = NULL;
- cJSON *bit_length = cJSON_GetObjectItemCaseSensitive(g_nb_idJSON, "bitLength");
- if (!bit_length) {
- ogs_error("OpenAPI_g_nb_id_parseFromJSON() failed [bit_length]");
- goto end;
- }
-
-
- if (!cJSON_IsNumber(bit_length)) {
- ogs_error("OpenAPI_g_nb_id_parseFromJSON() failed [bit_length]");
- goto end;
- }
-
- cJSON *g_nb_value = cJSON_GetObjectItemCaseSensitive(g_nb_idJSON, "gNBValue");
- if (!g_nb_value) {
- ogs_error("OpenAPI_g_nb_id_parseFromJSON() failed [g_nb_value]");
- goto end;
- }
-
-
- if (!cJSON_IsString(g_nb_value)) {
- ogs_error("OpenAPI_g_nb_id_parseFromJSON() failed [g_nb_value]");
- goto end;
- }
-
- g_nb_id_local_var = OpenAPI_g_nb_id_create (
- bit_length->valuedouble,
- ogs_strdup_or_assert(g_nb_value->valuestring)
- );
-
- return g_nb_id_local_var;
-end:
- return NULL;
-}
-
-OpenAPI_g_nb_id_t *OpenAPI_g_nb_id_copy(OpenAPI_g_nb_id_t *dst, OpenAPI_g_nb_id_t *src)
-{
- cJSON *item = NULL;
- char *content = NULL;
-
- ogs_assert(src);
- item = OpenAPI_g_nb_id_convertToJSON(src);
- if (!item) {
- ogs_error("OpenAPI_g_nb_id_convertToJSON() failed");
- return NULL;
- }
-
- content = cJSON_Print(item);
- cJSON_Delete(item);
-
- if (!content) {
- ogs_error("cJSON_Print() failed");
- return NULL;
- }
-
- item = cJSON_Parse(content);
- ogs_free(content);
- if (!item) {
- ogs_error("cJSON_Parse() failed");
- return NULL;
- }
-
- OpenAPI_g_nb_id_free(dst);
- dst = OpenAPI_g_nb_id_parseFromJSON(item);
- cJSON_Delete(item);
-
- return dst;
-}
-
diff --git a/lib/sbi/openapi/model/g_nb_id.h b/lib/sbi/openapi/model/g_nb_id.h
deleted file mode 100644
index 47eeac12a..000000000
--- a/lib/sbi/openapi/model/g_nb_id.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * g_nb_id.h
- *
- *
- */
-
-#ifndef _OpenAPI_g_nb_id_H_
-#define _OpenAPI_g_nb_id_H_
-
-#include
-#include "../external/cJSON.h"
-#include "../include/list.h"
-#include "../include/keyValuePair.h"
-#include "../include/binary.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct OpenAPI_g_nb_id_s OpenAPI_g_nb_id_t;
-typedef struct OpenAPI_g_nb_id_s {
- int bit_length;
- char *g_nb_value;
-} OpenAPI_g_nb_id_t;
-
-OpenAPI_g_nb_id_t *OpenAPI_g_nb_id_create(
- int bit_length,
- char *g_nb_value
- );
-void OpenAPI_g_nb_id_free(OpenAPI_g_nb_id_t *g_nb_id);
-OpenAPI_g_nb_id_t *OpenAPI_g_nb_id_parseFromJSON(cJSON *g_nb_idJSON);
-cJSON *OpenAPI_g_nb_id_convertToJSON(OpenAPI_g_nb_id_t *g_nb_id);
-OpenAPI_g_nb_id_t *OpenAPI_g_nb_id_copy(OpenAPI_g_nb_id_t *dst, OpenAPI_g_nb_id_t *src);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _OpenAPI_g_nb_id_H_ */
-
diff --git a/lib/sbi/openapi/model/gad_shape.c b/lib/sbi/openapi/model/gad_shape.c
index 427831112..b817516ad 100644
--- a/lib/sbi/openapi/model/gad_shape.c
+++ b/lib/sbi/openapi/model/gad_shape.c
@@ -6,7 +6,7 @@
OpenAPI_gad_shape_t *OpenAPI_gad_shape_create(
OpenAPI_supported_gad_shapes_t *shape
- )
+)
{
OpenAPI_gad_shape_t *gad_shape_local_var = OpenAPI_malloc(sizeof(OpenAPI_gad_shape_t));
if (!gad_shape_local_var) {
@@ -62,12 +62,12 @@ OpenAPI_gad_shape_t *OpenAPI_gad_shape_parseFromJSON(cJSON *gad_shapeJSON)
}
OpenAPI_supported_gad_shapes_t *shape_local_nonprim = NULL;
-
+
shape_local_nonprim = OpenAPI_supported_gad_shapes_parseFromJSON(shape);
gad_shape_local_var = OpenAPI_gad_shape_create (
shape_local_nonprim
- );
+ );
return gad_shape_local_var;
end:
diff --git a/lib/sbi/openapi/model/gad_shape.h b/lib/sbi/openapi/model/gad_shape.h
index f978d2c55..4c09c3edf 100644
--- a/lib/sbi/openapi/model/gad_shape.h
+++ b/lib/sbi/openapi/model/gad_shape.h
@@ -1,7 +1,7 @@
/*
* gad_shape.h
*
- *
+ *
*/
#ifndef _OpenAPI_gad_shape_H_
@@ -25,7 +25,7 @@ typedef struct OpenAPI_gad_shape_s {
OpenAPI_gad_shape_t *OpenAPI_gad_shape_create(
OpenAPI_supported_gad_shapes_t *shape
- );
+);
void OpenAPI_gad_shape_free(OpenAPI_gad_shape_t *gad_shape);
OpenAPI_gad_shape_t *OpenAPI_gad_shape_parseFromJSON(cJSON *gad_shapeJSON);
cJSON *OpenAPI_gad_shape_convertToJSON(OpenAPI_gad_shape_t *gad_shape);
diff --git a/lib/sbi/openapi/model/gbr_qos_flow_information.c b/lib/sbi/openapi/model/gbr_qos_flow_information.c
index 8f445eca4..5e95fb98d 100644
--- a/lib/sbi/openapi/model/gbr_qos_flow_information.c
+++ b/lib/sbi/openapi/model/gbr_qos_flow_information.c
@@ -13,7 +13,7 @@ OpenAPI_gbr_qos_flow_information_t *OpenAPI_gbr_qos_flow_information_create(
int max_packet_loss_rate_dl,
int max_packet_loss_rate_ul,
OpenAPI_list_t *alternative_qos_profile_list
- )
+)
{
OpenAPI_gbr_qos_flow_information_t *gbr_qos_flow_information_local_var = OpenAPI_malloc(sizeof(OpenAPI_gbr_qos_flow_information_t));
if (!gbr_qos_flow_information_local_var) {
@@ -79,45 +79,45 @@ cJSON *OpenAPI_gbr_qos_flow_information_convertToJSON(OpenAPI_gbr_qos_flow_infor
}
if (gbr_qos_flow_information->notif_control) {
- if (cJSON_AddStringToObject(item, "notifControl", OpenAPI_notification_control_ToString(gbr_qos_flow_information->notif_control)) == NULL) {
- ogs_error("OpenAPI_gbr_qos_flow_information_convertToJSON() failed [notif_control]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "notifControl", OpenAPI_notification_control_ToString(gbr_qos_flow_information->notif_control)) == NULL) {
+ ogs_error("OpenAPI_gbr_qos_flow_information_convertToJSON() failed [notif_control]");
+ goto end;
+ }
}
if (gbr_qos_flow_information->max_packet_loss_rate_dl) {
- if (cJSON_AddNumberToObject(item, "maxPacketLossRateDl", gbr_qos_flow_information->max_packet_loss_rate_dl) == NULL) {
- ogs_error("OpenAPI_gbr_qos_flow_information_convertToJSON() failed [max_packet_loss_rate_dl]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "maxPacketLossRateDl", gbr_qos_flow_information->max_packet_loss_rate_dl) == NULL) {
+ ogs_error("OpenAPI_gbr_qos_flow_information_convertToJSON() failed [max_packet_loss_rate_dl]");
+ goto end;
+ }
}
if (gbr_qos_flow_information->max_packet_loss_rate_ul) {
- if (cJSON_AddNumberToObject(item, "maxPacketLossRateUl", gbr_qos_flow_information->max_packet_loss_rate_ul) == NULL) {
- ogs_error("OpenAPI_gbr_qos_flow_information_convertToJSON() failed [max_packet_loss_rate_ul]");
- goto end;
- }
+ if (cJSON_AddNumberToObject(item, "maxPacketLossRateUl", gbr_qos_flow_information->max_packet_loss_rate_ul) == NULL) {
+ ogs_error("OpenAPI_gbr_qos_flow_information_convertToJSON() failed [max_packet_loss_rate_ul]");
+ goto end;
+ }
}
if (gbr_qos_flow_information->alternative_qos_profile_list) {
- cJSON *alternative_qos_profile_listList = cJSON_AddArrayToObject(item, "alternativeQosProfileList");
- if (alternative_qos_profile_listList == NULL) {
- ogs_error("OpenAPI_gbr_qos_flow_information_convertToJSON() failed [alternative_qos_profile_list]");
- goto end;
- }
+ cJSON *alternative_qos_profile_listList = cJSON_AddArrayToObject(item, "alternativeQosProfileList");
+ if (alternative_qos_profile_listList == NULL) {
+ ogs_error("OpenAPI_gbr_qos_flow_information_convertToJSON() failed [alternative_qos_profile_list]");
+ goto end;
+ }
- OpenAPI_lnode_t *alternative_qos_profile_list_node;
- if (gbr_qos_flow_information->alternative_qos_profile_list) {
- OpenAPI_list_for_each(gbr_qos_flow_information->alternative_qos_profile_list, alternative_qos_profile_list_node) {
- cJSON *itemLocal = OpenAPI_alternative_qos_profile_convertToJSON(alternative_qos_profile_list_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_gbr_qos_flow_information_convertToJSON() failed [alternative_qos_profile_list]");
- goto end;
- }
- cJSON_AddItemToArray(alternative_qos_profile_listList, itemLocal);
+ OpenAPI_lnode_t *alternative_qos_profile_list_node;
+ if (gbr_qos_flow_information->alternative_qos_profile_list) {
+ OpenAPI_list_for_each(gbr_qos_flow_information->alternative_qos_profile_list, alternative_qos_profile_list_node) {
+ cJSON *itemLocal = OpenAPI_alternative_qos_profile_convertToJSON(alternative_qos_profile_list_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_gbr_qos_flow_information_convertToJSON() failed [alternative_qos_profile_list]");
+ goto end;
}
+ cJSON_AddItemToArray(alternative_qos_profile_listList, itemLocal);
}
}
+ }
end:
return item;
@@ -132,7 +132,7 @@ OpenAPI_gbr_qos_flow_information_t *OpenAPI_gbr_qos_flow_information_parseFromJS
goto end;
}
-
+
if (!cJSON_IsString(max_fbr_dl)) {
ogs_error("OpenAPI_gbr_qos_flow_information_parseFromJSON() failed [max_fbr_dl]");
goto end;
@@ -144,7 +144,7 @@ OpenAPI_gbr_qos_flow_information_t *OpenAPI_gbr_qos_flow_information_parseFromJS
goto end;
}
-
+
if (!cJSON_IsString(max_fbr_ul)) {
ogs_error("OpenAPI_gbr_qos_flow_information_parseFromJSON() failed [max_fbr_ul]");
goto end;
@@ -156,7 +156,7 @@ OpenAPI_gbr_qos_flow_information_t *OpenAPI_gbr_qos_flow_information_parseFromJS
goto end;
}
-
+
if (!cJSON_IsString(gua_fbr_dl)) {
ogs_error("OpenAPI_gbr_qos_flow_information_parseFromJSON() failed [gua_fbr_dl]");
goto end;
@@ -168,7 +168,7 @@ OpenAPI_gbr_qos_flow_information_t *OpenAPI_gbr_qos_flow_information_parseFromJS
goto end;
}
-
+
if (!cJSON_IsString(gua_fbr_ul)) {
ogs_error("OpenAPI_gbr_qos_flow_information_parseFromJSON() failed [gua_fbr_ul]");
goto end;
@@ -177,53 +177,53 @@ OpenAPI_gbr_qos_flow_information_t *OpenAPI_gbr_qos_flow_information_parseFromJS
cJSON *notif_control = cJSON_GetObjectItemCaseSensitive(gbr_qos_flow_informationJSON, "notifControl");
OpenAPI_notification_control_e notif_controlVariable;
- if (notif_control) {
- if (!cJSON_IsString(notif_control)) {
- ogs_error("OpenAPI_gbr_qos_flow_information_parseFromJSON() failed [notif_control]");
- goto end;
- }
- notif_controlVariable = OpenAPI_notification_control_FromString(notif_control->valuestring);
+ if (notif_control) {
+ if (!cJSON_IsString(notif_control)) {
+ ogs_error("OpenAPI_gbr_qos_flow_information_parseFromJSON() failed [notif_control]");
+ goto end;
+ }
+ notif_controlVariable = OpenAPI_notification_control_FromString(notif_control->valuestring);
}
cJSON *max_packet_loss_rate_dl = cJSON_GetObjectItemCaseSensitive(gbr_qos_flow_informationJSON, "maxPacketLossRateDl");
- if (max_packet_loss_rate_dl) {
- if (!cJSON_IsNumber(max_packet_loss_rate_dl)) {
- ogs_error("OpenAPI_gbr_qos_flow_information_parseFromJSON() failed [max_packet_loss_rate_dl]");
- goto end;
- }
+ if (max_packet_loss_rate_dl) {
+ if (!cJSON_IsNumber(max_packet_loss_rate_dl)) {
+ ogs_error("OpenAPI_gbr_qos_flow_information_parseFromJSON() failed [max_packet_loss_rate_dl]");
+ goto end;
+ }
}
cJSON *max_packet_loss_rate_ul = cJSON_GetObjectItemCaseSensitive(gbr_qos_flow_informationJSON, "maxPacketLossRateUl");
- if (max_packet_loss_rate_ul) {
- if (!cJSON_IsNumber(max_packet_loss_rate_ul)) {
- ogs_error("OpenAPI_gbr_qos_flow_information_parseFromJSON() failed [max_packet_loss_rate_ul]");
- goto end;
- }
+ if (max_packet_loss_rate_ul) {
+ if (!cJSON_IsNumber(max_packet_loss_rate_ul)) {
+ ogs_error("OpenAPI_gbr_qos_flow_information_parseFromJSON() failed [max_packet_loss_rate_ul]");
+ goto end;
+ }
}
cJSON *alternative_qos_profile_list = cJSON_GetObjectItemCaseSensitive(gbr_qos_flow_informationJSON, "alternativeQosProfileList");
OpenAPI_list_t *alternative_qos_profile_listList;
- if (alternative_qos_profile_list) {
- cJSON *alternative_qos_profile_list_local_nonprimitive;
- if (!cJSON_IsArray(alternative_qos_profile_list)) {
+ if (alternative_qos_profile_list) {
+ cJSON *alternative_qos_profile_list_local_nonprimitive;
+ if (!cJSON_IsArray(alternative_qos_profile_list)){
+ ogs_error("OpenAPI_gbr_qos_flow_information_parseFromJSON() failed [alternative_qos_profile_list]");
+ goto end;
+ }
+
+ alternative_qos_profile_listList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(alternative_qos_profile_list_local_nonprimitive, alternative_qos_profile_list ) {
+ if (!cJSON_IsObject(alternative_qos_profile_list_local_nonprimitive)) {
ogs_error("OpenAPI_gbr_qos_flow_information_parseFromJSON() failed [alternative_qos_profile_list]");
goto end;
}
+ OpenAPI_alternative_qos_profile_t *alternative_qos_profile_listItem = OpenAPI_alternative_qos_profile_parseFromJSON(alternative_qos_profile_list_local_nonprimitive);
- alternative_qos_profile_listList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(alternative_qos_profile_list_local_nonprimitive, alternative_qos_profile_list ) {
- if (!cJSON_IsObject(alternative_qos_profile_list_local_nonprimitive)) {
- ogs_error("OpenAPI_gbr_qos_flow_information_parseFromJSON() failed [alternative_qos_profile_list]");
- goto end;
- }
- OpenAPI_alternative_qos_profile_t *alternative_qos_profile_listItem = OpenAPI_alternative_qos_profile_parseFromJSON(alternative_qos_profile_list_local_nonprimitive);
-
- OpenAPI_list_add(alternative_qos_profile_listList, alternative_qos_profile_listItem);
- }
+ OpenAPI_list_add(alternative_qos_profile_listList, alternative_qos_profile_listItem);
+ }
}
gbr_qos_flow_information_local_var = OpenAPI_gbr_qos_flow_information_create (
@@ -235,7 +235,7 @@ OpenAPI_gbr_qos_flow_information_t *OpenAPI_gbr_qos_flow_information_parseFromJS
max_packet_loss_rate_dl ? max_packet_loss_rate_dl->valuedouble : 0,
max_packet_loss_rate_ul ? max_packet_loss_rate_ul->valuedouble : 0,
alternative_qos_profile_list ? alternative_qos_profile_listList : NULL
- );
+ );
return gbr_qos_flow_information_local_var;
end:
diff --git a/lib/sbi/openapi/model/gbr_qos_flow_information.h b/lib/sbi/openapi/model/gbr_qos_flow_information.h
index 1bba66dd1..ccf12b980 100644
--- a/lib/sbi/openapi/model/gbr_qos_flow_information.h
+++ b/lib/sbi/openapi/model/gbr_qos_flow_information.h
@@ -1,7 +1,7 @@
/*
* gbr_qos_flow_information.h
*
- *
+ *
*/
#ifndef _OpenAPI_gbr_qos_flow_information_H_
@@ -40,7 +40,7 @@ OpenAPI_gbr_qos_flow_information_t *OpenAPI_gbr_qos_flow_information_create(
int max_packet_loss_rate_dl,
int max_packet_loss_rate_ul,
OpenAPI_list_t *alternative_qos_profile_list
- );
+);
void OpenAPI_gbr_qos_flow_information_free(OpenAPI_gbr_qos_flow_information_t *gbr_qos_flow_information);
OpenAPI_gbr_qos_flow_information_t *OpenAPI_gbr_qos_flow_information_parseFromJSON(cJSON *gbr_qos_flow_informationJSON);
cJSON *OpenAPI_gbr_qos_flow_information_convertToJSON(OpenAPI_gbr_qos_flow_information_t *gbr_qos_flow_information);
diff --git a/lib/sbi/openapi/model/geographic_area.c b/lib/sbi/openapi/model/geographic_area.c
index eedb90a3a..3bc4ffff6 100644
--- a/lib/sbi/openapi/model/geographic_area.c
+++ b/lib/sbi/openapi/model/geographic_area.c
@@ -17,7 +17,7 @@ OpenAPI_geographic_area_t *OpenAPI_geographic_area_create(
float uncertainty_radius,
int offset_angle,
int included_angle
- )
+)
{
OpenAPI_geographic_area_t *geographic_area_local_var = OpenAPI_malloc(sizeof(OpenAPI_geographic_area_t));
if (!geographic_area_local_var) {
@@ -170,7 +170,7 @@ OpenAPI_geographic_area_t *OpenAPI_geographic_area_parseFromJSON(cJSON *geograph
}
OpenAPI_supported_gad_shapes_t *shape_local_nonprim = NULL;
-
+
shape_local_nonprim = OpenAPI_supported_gad_shapes_parseFromJSON(shape);
cJSON *point = cJSON_GetObjectItemCaseSensitive(geographic_areaJSON, "point");
@@ -180,7 +180,7 @@ OpenAPI_geographic_area_t *OpenAPI_geographic_area_parseFromJSON(cJSON *geograph
}
OpenAPI_geographical_coordinates_t *point_local_nonprim = NULL;
-
+
point_local_nonprim = OpenAPI_geographical_coordinates_parseFromJSON(point);
cJSON *uncertainty = cJSON_GetObjectItemCaseSensitive(geographic_areaJSON, "uncertainty");
@@ -189,7 +189,7 @@ OpenAPI_geographic_area_t *OpenAPI_geographic_area_parseFromJSON(cJSON *geograph
goto end;
}
-
+
if (!cJSON_IsNumber(uncertainty)) {
ogs_error("OpenAPI_geographic_area_parseFromJSON() failed [uncertainty]");
goto end;
@@ -202,7 +202,7 @@ OpenAPI_geographic_area_t *OpenAPI_geographic_area_parseFromJSON(cJSON *geograph
}
OpenAPI_uncertainty_ellipse_t *uncertainty_ellipse_local_nonprim = NULL;
-
+
uncertainty_ellipse_local_nonprim = OpenAPI_uncertainty_ellipse_parseFromJSON(uncertainty_ellipse);
cJSON *confidence = cJSON_GetObjectItemCaseSensitive(geographic_areaJSON, "confidence");
@@ -211,7 +211,7 @@ OpenAPI_geographic_area_t *OpenAPI_geographic_area_parseFromJSON(cJSON *geograph
goto end;
}
-
+
if (!cJSON_IsNumber(confidence)) {
ogs_error("OpenAPI_geographic_area_parseFromJSON() failed [confidence]");
goto end;
@@ -224,9 +224,9 @@ OpenAPI_geographic_area_t *OpenAPI_geographic_area_parseFromJSON(cJSON *geograph
}
OpenAPI_list_t *point_listList;
-
+
cJSON *point_list_local_nonprimitive;
- if (!cJSON_IsArray(point_list)) {
+ if (!cJSON_IsArray(point_list)){
ogs_error("OpenAPI_geographic_area_parseFromJSON() failed [point_list]");
goto end;
}
@@ -249,7 +249,7 @@ OpenAPI_geographic_area_t *OpenAPI_geographic_area_parseFromJSON(cJSON *geograph
goto end;
}
-
+
if (!cJSON_IsNumber(altitude)) {
ogs_error("OpenAPI_geographic_area_parseFromJSON() failed [altitude]");
goto end;
@@ -261,7 +261,7 @@ OpenAPI_geographic_area_t *OpenAPI_geographic_area_parseFromJSON(cJSON *geograph
goto end;
}
-
+
if (!cJSON_IsNumber(uncertainty_altitude)) {
ogs_error("OpenAPI_geographic_area_parseFromJSON() failed [uncertainty_altitude]");
goto end;
@@ -273,7 +273,7 @@ OpenAPI_geographic_area_t *OpenAPI_geographic_area_parseFromJSON(cJSON *geograph
goto end;
}
-
+
if (!cJSON_IsNumber(inner_radius)) {
ogs_error("OpenAPI_geographic_area_parseFromJSON() failed [inner_radius]");
goto end;
@@ -285,7 +285,7 @@ OpenAPI_geographic_area_t *OpenAPI_geographic_area_parseFromJSON(cJSON *geograph
goto end;
}
-
+
if (!cJSON_IsNumber(uncertainty_radius)) {
ogs_error("OpenAPI_geographic_area_parseFromJSON() failed [uncertainty_radius]");
goto end;
@@ -297,7 +297,7 @@ OpenAPI_geographic_area_t *OpenAPI_geographic_area_parseFromJSON(cJSON *geograph
goto end;
}
-
+
if (!cJSON_IsNumber(offset_angle)) {
ogs_error("OpenAPI_geographic_area_parseFromJSON() failed [offset_angle]");
goto end;
@@ -309,7 +309,7 @@ OpenAPI_geographic_area_t *OpenAPI_geographic_area_parseFromJSON(cJSON *geograph
goto end;
}
-
+
if (!cJSON_IsNumber(included_angle)) {
ogs_error("OpenAPI_geographic_area_parseFromJSON() failed [included_angle]");
goto end;
@@ -328,7 +328,7 @@ OpenAPI_geographic_area_t *OpenAPI_geographic_area_parseFromJSON(cJSON *geograph
uncertainty_radius->valuedouble,
offset_angle->valuedouble,
included_angle->valuedouble
- );
+ );
return geographic_area_local_var;
end:
diff --git a/lib/sbi/openapi/model/geographic_area.h b/lib/sbi/openapi/model/geographic_area.h
index 21cd87a01..3ee6d5b67 100644
--- a/lib/sbi/openapi/model/geographic_area.h
+++ b/lib/sbi/openapi/model/geographic_area.h
@@ -1,7 +1,7 @@
/*
* geographic_area.h
*
- *
+ *
*/
#ifndef _OpenAPI_geographic_area_H_
@@ -56,7 +56,7 @@ OpenAPI_geographic_area_t *OpenAPI_geographic_area_create(
float uncertainty_radius,
int offset_angle,
int included_angle
- );
+);
void OpenAPI_geographic_area_free(OpenAPI_geographic_area_t *geographic_area);
OpenAPI_geographic_area_t *OpenAPI_geographic_area_parseFromJSON(cJSON *geographic_areaJSON);
cJSON *OpenAPI_geographic_area_convertToJSON(OpenAPI_geographic_area_t *geographic_area);
diff --git a/lib/sbi/openapi/model/geographical_coordinates.c b/lib/sbi/openapi/model/geographical_coordinates.c
index 600ea65b8..90904ea0d 100644
--- a/lib/sbi/openapi/model/geographical_coordinates.c
+++ b/lib/sbi/openapi/model/geographical_coordinates.c
@@ -7,7 +7,7 @@
OpenAPI_geographical_coordinates_t *OpenAPI_geographical_coordinates_create(
double lon,
double lat
- )
+)
{
OpenAPI_geographical_coordinates_t *geographical_coordinates_local_var = OpenAPI_malloc(sizeof(OpenAPI_geographical_coordinates_t));
if (!geographical_coordinates_local_var) {
@@ -61,7 +61,7 @@ OpenAPI_geographical_coordinates_t *OpenAPI_geographical_coordinates_parseFromJS
goto end;
}
-
+
if (!cJSON_IsNumber(lon)) {
ogs_error("OpenAPI_geographical_coordinates_parseFromJSON() failed [lon]");
goto end;
@@ -73,7 +73,7 @@ OpenAPI_geographical_coordinates_t *OpenAPI_geographical_coordinates_parseFromJS
goto end;
}
-
+
if (!cJSON_IsNumber(lat)) {
ogs_error("OpenAPI_geographical_coordinates_parseFromJSON() failed [lat]");
goto end;
@@ -82,7 +82,7 @@ OpenAPI_geographical_coordinates_t *OpenAPI_geographical_coordinates_parseFromJS
geographical_coordinates_local_var = OpenAPI_geographical_coordinates_create (
lon->valuedouble,
lat->valuedouble
- );
+ );
return geographical_coordinates_local_var;
end:
diff --git a/lib/sbi/openapi/model/geographical_coordinates.h b/lib/sbi/openapi/model/geographical_coordinates.h
index 41afd1755..46bf0de6a 100644
--- a/lib/sbi/openapi/model/geographical_coordinates.h
+++ b/lib/sbi/openapi/model/geographical_coordinates.h
@@ -1,7 +1,7 @@
/*
* geographical_coordinates.h
*
- *
+ *
*/
#ifndef _OpenAPI_geographical_coordinates_H_
@@ -26,7 +26,7 @@ typedef struct OpenAPI_geographical_coordinates_s {
OpenAPI_geographical_coordinates_t *OpenAPI_geographical_coordinates_create(
double lon,
double lat
- );
+);
void OpenAPI_geographical_coordinates_free(OpenAPI_geographical_coordinates_t *geographical_coordinates);
OpenAPI_geographical_coordinates_t *OpenAPI_geographical_coordinates_parseFromJSON(cJSON *geographical_coordinatesJSON);
cJSON *OpenAPI_geographical_coordinates_convertToJSON(OpenAPI_geographical_coordinates_t *geographical_coordinates);
diff --git a/lib/sbi/openapi/model/global_ran_node_id.c b/lib/sbi/openapi/model/global_ran_node_id.c
index 88b15cb62..2cca3291f 100644
--- a/lib/sbi/openapi/model/global_ran_node_id.c
+++ b/lib/sbi/openapi/model/global_ran_node_id.c
@@ -7,13 +7,13 @@
OpenAPI_global_ran_node_id_t *OpenAPI_global_ran_node_id_create(
OpenAPI_plmn_id_t *plmn_id,
char *n3_iwf_id,
- OpenAPI_g_nb_id_t *g_nb_id,
+ OpenAPI_gnb_id_t *g_nb_id,
char *nge_nb_id,
char *wagf_id,
char *tngf_id,
char *nid,
char *e_nb_id
- )
+)
{
OpenAPI_global_ran_node_id_t *global_ran_node_id_local_var = OpenAPI_malloc(sizeof(OpenAPI_global_ran_node_id_t));
if (!global_ran_node_id_local_var) {
@@ -39,7 +39,7 @@ void OpenAPI_global_ran_node_id_free(OpenAPI_global_ran_node_id_t *global_ran_no
OpenAPI_lnode_t *node;
OpenAPI_plmn_id_free(global_ran_node_id->plmn_id);
ogs_free(global_ran_node_id->n3_iwf_id);
- OpenAPI_g_nb_id_free(global_ran_node_id->g_nb_id);
+ OpenAPI_gnb_id_free(global_ran_node_id->g_nb_id);
ogs_free(global_ran_node_id->nge_nb_id);
ogs_free(global_ran_node_id->wagf_id);
ogs_free(global_ran_node_id->tngf_id);
@@ -70,58 +70,58 @@ cJSON *OpenAPI_global_ran_node_id_convertToJSON(OpenAPI_global_ran_node_id_t *gl
}
if (global_ran_node_id->n3_iwf_id) {
- if (cJSON_AddStringToObject(item, "n3IwfId", global_ran_node_id->n3_iwf_id) == NULL) {
- ogs_error("OpenAPI_global_ran_node_id_convertToJSON() failed [n3_iwf_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "n3IwfId", global_ran_node_id->n3_iwf_id) == NULL) {
+ ogs_error("OpenAPI_global_ran_node_id_convertToJSON() failed [n3_iwf_id]");
+ goto end;
+ }
}
if (global_ran_node_id->g_nb_id) {
- cJSON *g_nb_id_local_JSON = OpenAPI_g_nb_id_convertToJSON(global_ran_node_id->g_nb_id);
- if (g_nb_id_local_JSON == NULL) {
- ogs_error("OpenAPI_global_ran_node_id_convertToJSON() failed [g_nb_id]");
- goto end;
- }
- cJSON_AddItemToObject(item, "gNbId", g_nb_id_local_JSON);
- if (item->child == NULL) {
- ogs_error("OpenAPI_global_ran_node_id_convertToJSON() failed [g_nb_id]");
- goto end;
- }
+ cJSON *g_nb_id_local_JSON = OpenAPI_gnb_id_convertToJSON(global_ran_node_id->g_nb_id);
+ if (g_nb_id_local_JSON == NULL) {
+ ogs_error("OpenAPI_global_ran_node_id_convertToJSON() failed [g_nb_id]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "gNbId", g_nb_id_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_global_ran_node_id_convertToJSON() failed [g_nb_id]");
+ goto end;
+ }
}
if (global_ran_node_id->nge_nb_id) {
- if (cJSON_AddStringToObject(item, "ngeNbId", global_ran_node_id->nge_nb_id) == NULL) {
- ogs_error("OpenAPI_global_ran_node_id_convertToJSON() failed [nge_nb_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "ngeNbId", global_ran_node_id->nge_nb_id) == NULL) {
+ ogs_error("OpenAPI_global_ran_node_id_convertToJSON() failed [nge_nb_id]");
+ goto end;
+ }
}
if (global_ran_node_id->wagf_id) {
- if (cJSON_AddStringToObject(item, "wagfId", global_ran_node_id->wagf_id) == NULL) {
- ogs_error("OpenAPI_global_ran_node_id_convertToJSON() failed [wagf_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "wagfId", global_ran_node_id->wagf_id) == NULL) {
+ ogs_error("OpenAPI_global_ran_node_id_convertToJSON() failed [wagf_id]");
+ goto end;
+ }
}
if (global_ran_node_id->tngf_id) {
- if (cJSON_AddStringToObject(item, "tngfId", global_ran_node_id->tngf_id) == NULL) {
- ogs_error("OpenAPI_global_ran_node_id_convertToJSON() failed [tngf_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "tngfId", global_ran_node_id->tngf_id) == NULL) {
+ ogs_error("OpenAPI_global_ran_node_id_convertToJSON() failed [tngf_id]");
+ goto end;
+ }
}
if (global_ran_node_id->nid) {
- if (cJSON_AddStringToObject(item, "nid", global_ran_node_id->nid) == NULL) {
- ogs_error("OpenAPI_global_ran_node_id_convertToJSON() failed [nid]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "nid", global_ran_node_id->nid) == NULL) {
+ ogs_error("OpenAPI_global_ran_node_id_convertToJSON() failed [nid]");
+ goto end;
+ }
}
if (global_ran_node_id->e_nb_id) {
- if (cJSON_AddStringToObject(item, "eNbId", global_ran_node_id->e_nb_id) == NULL) {
- ogs_error("OpenAPI_global_ran_node_id_convertToJSON() failed [e_nb_id]");
- goto end;
- }
+ if (cJSON_AddStringToObject(item, "eNbId", global_ran_node_id->e_nb_id) == NULL) {
+ ogs_error("OpenAPI_global_ran_node_id_convertToJSON() failed [e_nb_id]");
+ goto end;
+ }
}
end:
@@ -138,68 +138,68 @@ OpenAPI_global_ran_node_id_t *OpenAPI_global_ran_node_id_parseFromJSON(cJSON *gl
}
OpenAPI_plmn_id_t *plmn_id_local_nonprim = NULL;
-
+
plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id);
cJSON *n3_iwf_id = cJSON_GetObjectItemCaseSensitive(global_ran_node_idJSON, "n3IwfId");
- if (n3_iwf_id) {
- if (!cJSON_IsString(n3_iwf_id)) {
- ogs_error("OpenAPI_global_ran_node_id_parseFromJSON() failed [n3_iwf_id]");
- goto end;
- }
+ if (n3_iwf_id) {
+ if (!cJSON_IsString(n3_iwf_id)) {
+ ogs_error("OpenAPI_global_ran_node_id_parseFromJSON() failed [n3_iwf_id]");
+ goto end;
+ }
}
cJSON *g_nb_id = cJSON_GetObjectItemCaseSensitive(global_ran_node_idJSON, "gNbId");
- OpenAPI_g_nb_id_t *g_nb_id_local_nonprim = NULL;
- if (g_nb_id) {
- g_nb_id_local_nonprim = OpenAPI_g_nb_id_parseFromJSON(g_nb_id);
+ OpenAPI_gnb_id_t *g_nb_id_local_nonprim = NULL;
+ if (g_nb_id) {
+ g_nb_id_local_nonprim = OpenAPI_gnb_id_parseFromJSON(g_nb_id);
}
cJSON *nge_nb_id = cJSON_GetObjectItemCaseSensitive(global_ran_node_idJSON, "ngeNbId");
- if (nge_nb_id) {
- if (!cJSON_IsString(nge_nb_id)) {
- ogs_error("OpenAPI_global_ran_node_id_parseFromJSON() failed [nge_nb_id]");
- goto end;
- }
+ if (nge_nb_id) {
+ if (!cJSON_IsString(nge_nb_id)) {
+ ogs_error("OpenAPI_global_ran_node_id_parseFromJSON() failed [nge_nb_id]");
+ goto end;
+ }
}
cJSON *wagf_id = cJSON_GetObjectItemCaseSensitive(global_ran_node_idJSON, "wagfId");
- if (wagf_id) {
- if (!cJSON_IsString(wagf_id)) {
- ogs_error("OpenAPI_global_ran_node_id_parseFromJSON() failed [wagf_id]");
- goto end;
- }
+ if (wagf_id) {
+ if (!cJSON_IsString(wagf_id)) {
+ ogs_error("OpenAPI_global_ran_node_id_parseFromJSON() failed [wagf_id]");
+ goto end;
+ }
}
cJSON *tngf_id = cJSON_GetObjectItemCaseSensitive(global_ran_node_idJSON, "tngfId");
- if (tngf_id) {
- if (!cJSON_IsString(tngf_id)) {
- ogs_error("OpenAPI_global_ran_node_id_parseFromJSON() failed [tngf_id]");
- goto end;
- }
+ if (tngf_id) {
+ if (!cJSON_IsString(tngf_id)) {
+ ogs_error("OpenAPI_global_ran_node_id_parseFromJSON() failed [tngf_id]");
+ goto end;
+ }
}
cJSON *nid = cJSON_GetObjectItemCaseSensitive(global_ran_node_idJSON, "nid");
- if (nid) {
- if (!cJSON_IsString(nid)) {
- ogs_error("OpenAPI_global_ran_node_id_parseFromJSON() failed [nid]");
- goto end;
- }
+ if (nid) {
+ if (!cJSON_IsString(nid)) {
+ ogs_error("OpenAPI_global_ran_node_id_parseFromJSON() failed [nid]");
+ goto end;
+ }
}
cJSON *e_nb_id = cJSON_GetObjectItemCaseSensitive(global_ran_node_idJSON, "eNbId");
- if (e_nb_id) {
- if (!cJSON_IsString(e_nb_id)) {
- ogs_error("OpenAPI_global_ran_node_id_parseFromJSON() failed [e_nb_id]");
- goto end;
- }
+ if (e_nb_id) {
+ if (!cJSON_IsString(e_nb_id)) {
+ ogs_error("OpenAPI_global_ran_node_id_parseFromJSON() failed [e_nb_id]");
+ goto end;
+ }
}
global_ran_node_id_local_var = OpenAPI_global_ran_node_id_create (
@@ -211,7 +211,7 @@ OpenAPI_global_ran_node_id_t *OpenAPI_global_ran_node_id_parseFromJSON(cJSON *gl
tngf_id ? ogs_strdup_or_assert(tngf_id->valuestring) : NULL,
nid ? ogs_strdup_or_assert(nid->valuestring) : NULL,
e_nb_id ? ogs_strdup_or_assert(e_nb_id->valuestring) : NULL
- );
+ );
return global_ran_node_id_local_var;
end:
diff --git a/lib/sbi/openapi/model/global_ran_node_id.h b/lib/sbi/openapi/model/global_ran_node_id.h
index d98e54426..fd600f87b 100644
--- a/lib/sbi/openapi/model/global_ran_node_id.h
+++ b/lib/sbi/openapi/model/global_ran_node_id.h
@@ -1,7 +1,7 @@
/*
* global_ran_node_id.h
*
- *
+ *
*/
#ifndef _OpenAPI_global_ran_node_id_H_
@@ -12,7 +12,7 @@
#include "../include/list.h"
#include "../include/keyValuePair.h"
#include "../include/binary.h"
-#include "g_nb_id.h"
+#include "gnb_id.h"
#include "plmn_id.h"
#ifdef __cplusplus
@@ -23,7 +23,7 @@ typedef struct OpenAPI_global_ran_node_id_s OpenAPI_global_ran_node_id_t;
typedef struct OpenAPI_global_ran_node_id_s {
struct OpenAPI_plmn_id_s *plmn_id;
char *n3_iwf_id;
- struct OpenAPI_g_nb_id_s *g_nb_id;
+ struct OpenAPI_gnb_id_s *g_nb_id;
char *nge_nb_id;
char *wagf_id;
char *tngf_id;
@@ -34,13 +34,13 @@ typedef struct OpenAPI_global_ran_node_id_s {
OpenAPI_global_ran_node_id_t *OpenAPI_global_ran_node_id_create(
OpenAPI_plmn_id_t *plmn_id,
char *n3_iwf_id,
- OpenAPI_g_nb_id_t *g_nb_id,
+ OpenAPI_gnb_id_t *g_nb_id,
char *nge_nb_id,
char *wagf_id,
char *tngf_id,
char *nid,
char *e_nb_id
- );
+);
void OpenAPI_global_ran_node_id_free(OpenAPI_global_ran_node_id_t *global_ran_node_id);
OpenAPI_global_ran_node_id_t *OpenAPI_global_ran_node_id_parseFromJSON(cJSON *global_ran_node_idJSON);
cJSON *OpenAPI_global_ran_node_id_convertToJSON(OpenAPI_global_ran_node_id_t *global_ran_node_id);
diff --git a/lib/sbi/openapi/model/global_ran_node_id_1.c b/lib/sbi/openapi/model/global_ran_node_id_1.c
new file mode 100644
index 000000000..7fdfb5462
--- /dev/null
+++ b/lib/sbi/openapi/model/global_ran_node_id_1.c
@@ -0,0 +1,254 @@
+
+#include
+#include
+#include
+#include "global_ran_node_id_1.h"
+
+OpenAPI_global_ran_node_id_1_t *OpenAPI_global_ran_node_id_1_create(
+ OpenAPI_plmn_id_1_t *plmn_id,
+ char *n3_iwf_id,
+ OpenAPI_gnb_id_t *g_nb_id,
+ char *nge_nb_id,
+ char *wagf_id,
+ char *tngf_id,
+ char *nid,
+ char *e_nb_id
+)
+{
+ OpenAPI_global_ran_node_id_1_t *global_ran_node_id_1_local_var = OpenAPI_malloc(sizeof(OpenAPI_global_ran_node_id_1_t));
+ if (!global_ran_node_id_1_local_var) {
+ return NULL;
+ }
+ global_ran_node_id_1_local_var->plmn_id = plmn_id;
+ global_ran_node_id_1_local_var->n3_iwf_id = n3_iwf_id;
+ global_ran_node_id_1_local_var->g_nb_id = g_nb_id;
+ global_ran_node_id_1_local_var->nge_nb_id = nge_nb_id;
+ global_ran_node_id_1_local_var->wagf_id = wagf_id;
+ global_ran_node_id_1_local_var->tngf_id = tngf_id;
+ global_ran_node_id_1_local_var->nid = nid;
+ global_ran_node_id_1_local_var->e_nb_id = e_nb_id;
+
+ return global_ran_node_id_1_local_var;
+}
+
+void OpenAPI_global_ran_node_id_1_free(OpenAPI_global_ran_node_id_1_t *global_ran_node_id_1)
+{
+ if (NULL == global_ran_node_id_1) {
+ return;
+ }
+ OpenAPI_lnode_t *node;
+ OpenAPI_plmn_id_1_free(global_ran_node_id_1->plmn_id);
+ ogs_free(global_ran_node_id_1->n3_iwf_id);
+ OpenAPI_gnb_id_free(global_ran_node_id_1->g_nb_id);
+ ogs_free(global_ran_node_id_1->nge_nb_id);
+ ogs_free(global_ran_node_id_1->wagf_id);
+ ogs_free(global_ran_node_id_1->tngf_id);
+ ogs_free(global_ran_node_id_1->nid);
+ ogs_free(global_ran_node_id_1->e_nb_id);
+ ogs_free(global_ran_node_id_1);
+}
+
+cJSON *OpenAPI_global_ran_node_id_1_convertToJSON(OpenAPI_global_ran_node_id_1_t *global_ran_node_id_1)
+{
+ cJSON *item = NULL;
+
+ if (global_ran_node_id_1 == NULL) {
+ ogs_error("OpenAPI_global_ran_node_id_1_convertToJSON() failed [GlobalRanNodeId_1]");
+ return NULL;
+ }
+
+ item = cJSON_CreateObject();
+ cJSON *plmn_id_local_JSON = OpenAPI_plmn_id_1_convertToJSON(global_ran_node_id_1->plmn_id);
+ if (plmn_id_local_JSON == NULL) {
+ ogs_error("OpenAPI_global_ran_node_id_1_convertToJSON() failed [plmn_id]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "plmnId", plmn_id_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_global_ran_node_id_1_convertToJSON() failed [plmn_id]");
+ goto end;
+ }
+
+ if (global_ran_node_id_1->n3_iwf_id) {
+ if (cJSON_AddStringToObject(item, "n3IwfId", global_ran_node_id_1->n3_iwf_id) == NULL) {
+ ogs_error("OpenAPI_global_ran_node_id_1_convertToJSON() failed [n3_iwf_id]");
+ goto end;
+ }
+ }
+
+ if (global_ran_node_id_1->g_nb_id) {
+ cJSON *g_nb_id_local_JSON = OpenAPI_gnb_id_convertToJSON(global_ran_node_id_1->g_nb_id);
+ if (g_nb_id_local_JSON == NULL) {
+ ogs_error("OpenAPI_global_ran_node_id_1_convertToJSON() failed [g_nb_id]");
+ goto end;
+ }
+ cJSON_AddItemToObject(item, "gNbId", g_nb_id_local_JSON);
+ if (item->child == NULL) {
+ ogs_error("OpenAPI_global_ran_node_id_1_convertToJSON() failed [g_nb_id]");
+ goto end;
+ }
+ }
+
+ if (global_ran_node_id_1->nge_nb_id) {
+ if (cJSON_AddStringToObject(item, "ngeNbId", global_ran_node_id_1->nge_nb_id) == NULL) {
+ ogs_error("OpenAPI_global_ran_node_id_1_convertToJSON() failed [nge_nb_id]");
+ goto end;
+ }
+ }
+
+ if (global_ran_node_id_1->wagf_id) {
+ if (cJSON_AddStringToObject(item, "wagfId", global_ran_node_id_1->wagf_id) == NULL) {
+ ogs_error("OpenAPI_global_ran_node_id_1_convertToJSON() failed [wagf_id]");
+ goto end;
+ }
+ }
+
+ if (global_ran_node_id_1->tngf_id) {
+ if (cJSON_AddStringToObject(item, "tngfId", global_ran_node_id_1->tngf_id) == NULL) {
+ ogs_error("OpenAPI_global_ran_node_id_1_convertToJSON() failed [tngf_id]");
+ goto end;
+ }
+ }
+
+ if (global_ran_node_id_1->nid) {
+ if (cJSON_AddStringToObject(item, "nid", global_ran_node_id_1->nid) == NULL) {
+ ogs_error("OpenAPI_global_ran_node_id_1_convertToJSON() failed [nid]");
+ goto end;
+ }
+ }
+
+ if (global_ran_node_id_1->e_nb_id) {
+ if (cJSON_AddStringToObject(item, "eNbId", global_ran_node_id_1->e_nb_id) == NULL) {
+ ogs_error("OpenAPI_global_ran_node_id_1_convertToJSON() failed [e_nb_id]");
+ goto end;
+ }
+ }
+
+end:
+ return item;
+}
+
+OpenAPI_global_ran_node_id_1_t *OpenAPI_global_ran_node_id_1_parseFromJSON(cJSON *global_ran_node_id_1JSON)
+{
+ OpenAPI_global_ran_node_id_1_t *global_ran_node_id_1_local_var = NULL;
+ cJSON *plmn_id = cJSON_GetObjectItemCaseSensitive(global_ran_node_id_1JSON, "plmnId");
+ if (!plmn_id) {
+ ogs_error("OpenAPI_global_ran_node_id_1_parseFromJSON() failed [plmn_id]");
+ goto end;
+ }
+
+ OpenAPI_plmn_id_1_t *plmn_id_local_nonprim = NULL;
+
+ plmn_id_local_nonprim = OpenAPI_plmn_id_1_parseFromJSON(plmn_id);
+
+ cJSON *n3_iwf_id = cJSON_GetObjectItemCaseSensitive(global_ran_node_id_1JSON, "n3IwfId");
+
+ if (n3_iwf_id) {
+ if (!cJSON_IsString(n3_iwf_id)) {
+ ogs_error("OpenAPI_global_ran_node_id_1_parseFromJSON() failed [n3_iwf_id]");
+ goto end;
+ }
+ }
+
+ cJSON *g_nb_id = cJSON_GetObjectItemCaseSensitive(global_ran_node_id_1JSON, "gNbId");
+
+ OpenAPI_gnb_id_t *g_nb_id_local_nonprim = NULL;
+ if (g_nb_id) {
+ g_nb_id_local_nonprim = OpenAPI_gnb_id_parseFromJSON(g_nb_id);
+ }
+
+ cJSON *nge_nb_id = cJSON_GetObjectItemCaseSensitive(global_ran_node_id_1JSON, "ngeNbId");
+
+ if (nge_nb_id) {
+ if (!cJSON_IsString(nge_nb_id)) {
+ ogs_error("OpenAPI_global_ran_node_id_1_parseFromJSON() failed [nge_nb_id]");
+ goto end;
+ }
+ }
+
+ cJSON *wagf_id = cJSON_GetObjectItemCaseSensitive(global_ran_node_id_1JSON, "wagfId");
+
+ if (wagf_id) {
+ if (!cJSON_IsString(wagf_id)) {
+ ogs_error("OpenAPI_global_ran_node_id_1_parseFromJSON() failed [wagf_id]");
+ goto end;
+ }
+ }
+
+ cJSON *tngf_id = cJSON_GetObjectItemCaseSensitive(global_ran_node_id_1JSON, "tngfId");
+
+ if (tngf_id) {
+ if (!cJSON_IsString(tngf_id)) {
+ ogs_error("OpenAPI_global_ran_node_id_1_parseFromJSON() failed [tngf_id]");
+ goto end;
+ }
+ }
+
+ cJSON *nid = cJSON_GetObjectItemCaseSensitive(global_ran_node_id_1JSON, "nid");
+
+ if (nid) {
+ if (!cJSON_IsString(nid)) {
+ ogs_error("OpenAPI_global_ran_node_id_1_parseFromJSON() failed [nid]");
+ goto end;
+ }
+ }
+
+ cJSON *e_nb_id = cJSON_GetObjectItemCaseSensitive(global_ran_node_id_1JSON, "eNbId");
+
+ if (e_nb_id) {
+ if (!cJSON_IsString(e_nb_id)) {
+ ogs_error("OpenAPI_global_ran_node_id_1_parseFromJSON() failed [e_nb_id]");
+ goto end;
+ }
+ }
+
+ global_ran_node_id_1_local_var = OpenAPI_global_ran_node_id_1_create (
+ plmn_id_local_nonprim,
+ n3_iwf_id ? ogs_strdup_or_assert(n3_iwf_id->valuestring) : NULL,
+ g_nb_id ? g_nb_id_local_nonprim : NULL,
+ nge_nb_id ? ogs_strdup_or_assert(nge_nb_id->valuestring) : NULL,
+ wagf_id ? ogs_strdup_or_assert(wagf_id->valuestring) : NULL,
+ tngf_id ? ogs_strdup_or_assert(tngf_id->valuestring) : NULL,
+ nid ? ogs_strdup_or_assert(nid->valuestring) : NULL,
+ e_nb_id ? ogs_strdup_or_assert(e_nb_id->valuestring) : NULL
+ );
+
+ return global_ran_node_id_1_local_var;
+end:
+ return NULL;
+}
+
+OpenAPI_global_ran_node_id_1_t *OpenAPI_global_ran_node_id_1_copy(OpenAPI_global_ran_node_id_1_t *dst, OpenAPI_global_ran_node_id_1_t *src)
+{
+ cJSON *item = NULL;
+ char *content = NULL;
+
+ ogs_assert(src);
+ item = OpenAPI_global_ran_node_id_1_convertToJSON(src);
+ if (!item) {
+ ogs_error("OpenAPI_global_ran_node_id_1_convertToJSON() failed");
+ return NULL;
+ }
+
+ content = cJSON_Print(item);
+ cJSON_Delete(item);
+
+ if (!content) {
+ ogs_error("cJSON_Print() failed");
+ return NULL;
+ }
+
+ item = cJSON_Parse(content);
+ ogs_free(content);
+ if (!item) {
+ ogs_error("cJSON_Parse() failed");
+ return NULL;
+ }
+
+ OpenAPI_global_ran_node_id_1_free(dst);
+ dst = OpenAPI_global_ran_node_id_1_parseFromJSON(item);
+ cJSON_Delete(item);
+
+ return dst;
+}
+
diff --git a/lib/sbi/openapi/model/global_ran_node_id_1.h b/lib/sbi/openapi/model/global_ran_node_id_1.h
new file mode 100644
index 000000000..4228cc145
--- /dev/null
+++ b/lib/sbi/openapi/model/global_ran_node_id_1.h
@@ -0,0 +1,54 @@
+/*
+ * global_ran_node_id_1.h
+ *
+ *
+ */
+
+#ifndef _OpenAPI_global_ran_node_id_1_H_
+#define _OpenAPI_global_ran_node_id_1_H_
+
+#include
+#include "../external/cJSON.h"
+#include "../include/list.h"
+#include "../include/keyValuePair.h"
+#include "../include/binary.h"
+#include "gnb_id.h"
+#include "plmn_id_1.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpenAPI_global_ran_node_id_1_s OpenAPI_global_ran_node_id_1_t;
+typedef struct OpenAPI_global_ran_node_id_1_s {
+ struct OpenAPI_plmn_id_1_s *plmn_id;
+ char *n3_iwf_id;
+ struct OpenAPI_gnb_id_s *g_nb_id;
+ char *nge_nb_id;
+ char *wagf_id;
+ char *tngf_id;
+ char *nid;
+ char *e_nb_id;
+} OpenAPI_global_ran_node_id_1_t;
+
+OpenAPI_global_ran_node_id_1_t *OpenAPI_global_ran_node_id_1_create(
+ OpenAPI_plmn_id_1_t *plmn_id,
+ char *n3_iwf_id,
+ OpenAPI_gnb_id_t *g_nb_id,
+ char *nge_nb_id,
+ char *wagf_id,
+ char *tngf_id,
+ char *nid,
+ char *e_nb_id
+);
+void OpenAPI_global_ran_node_id_1_free(OpenAPI_global_ran_node_id_1_t *global_ran_node_id_1);
+OpenAPI_global_ran_node_id_1_t *OpenAPI_global_ran_node_id_1_parseFromJSON(cJSON *global_ran_node_id_1JSON);
+cJSON *OpenAPI_global_ran_node_id_1_convertToJSON(OpenAPI_global_ran_node_id_1_t *global_ran_node_id_1);
+OpenAPI_global_ran_node_id_1_t *OpenAPI_global_ran_node_id_1_copy(OpenAPI_global_ran_node_id_1_t *dst, OpenAPI_global_ran_node_id_1_t *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OpenAPI_global_ran_node_id_1_H_ */
+
diff --git a/lib/sbi/openapi/model/gmlc_info.c b/lib/sbi/openapi/model/gmlc_info.c
index 8001069aa..926e369bd 100644
--- a/lib/sbi/openapi/model/gmlc_info.c
+++ b/lib/sbi/openapi/model/gmlc_info.c
@@ -6,7 +6,7 @@
OpenAPI_gmlc_info_t *OpenAPI_gmlc_info_create(
OpenAPI_list_t *serving_client_types
- )
+)
{
OpenAPI_gmlc_info_t *gmlc_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_gmlc_info_t));
if (!gmlc_info_local_var) {
@@ -41,24 +41,24 @@ cJSON *OpenAPI_gmlc_info_convertToJSON(OpenAPI_gmlc_info_t *gmlc_info)
item = cJSON_CreateObject();
if (gmlc_info->serving_client_types) {
- cJSON *serving_client_typesList = cJSON_AddArrayToObject(item, "servingClientTypes");
- if (serving_client_typesList == NULL) {
- ogs_error("OpenAPI_gmlc_info_convertToJSON() failed [serving_client_types]");
- goto end;
- }
+ cJSON *serving_client_typesList = cJSON_AddArrayToObject(item, "servingClientTypes");
+ if (serving_client_typesList == NULL) {
+ ogs_error("OpenAPI_gmlc_info_convertToJSON() failed [serving_client_types]");
+ goto end;
+ }
- OpenAPI_lnode_t *serving_client_types_node;
- if (gmlc_info->serving_client_types) {
- OpenAPI_list_for_each(gmlc_info->serving_client_types, serving_client_types_node) {
- cJSON *itemLocal = OpenAPI_external_client_type_convertToJSON(serving_client_types_node->data);
- if (itemLocal == NULL) {
- ogs_error("OpenAPI_gmlc_info_convertToJSON() failed [serving_client_types]");
- goto end;
- }
- cJSON_AddItemToArray(serving_client_typesList, itemLocal);
+ OpenAPI_lnode_t *serving_client_types_node;
+ if (gmlc_info->serving_client_types) {
+ OpenAPI_list_for_each(gmlc_info->serving_client_types, serving_client_types_node) {
+ cJSON *itemLocal = OpenAPI_external_client_type_convertToJSON(serving_client_types_node->data);
+ if (itemLocal == NULL) {
+ ogs_error("OpenAPI_gmlc_info_convertToJSON() failed [serving_client_types]");
+ goto end;
}
+ cJSON_AddItemToArray(serving_client_typesList, itemLocal);
}
}
+ }
end:
return item;
@@ -70,29 +70,29 @@ OpenAPI_gmlc_info_t *OpenAPI_gmlc_info_parseFromJSON(cJSON *gmlc_infoJSON)
cJSON *serving_client_types = cJSON_GetObjectItemCaseSensitive(gmlc_infoJSON, "servingClientTypes");
OpenAPI_list_t *serving_client_typesList;
- if (serving_client_types) {
- cJSON *serving_client_types_local_nonprimitive;
- if (!cJSON_IsArray(serving_client_types)) {
+ if (serving_client_types) {
+ cJSON *serving_client_types_local_nonprimitive;
+ if (!cJSON_IsArray(serving_client_types)){
+ ogs_error("OpenAPI_gmlc_info_parseFromJSON() failed [serving_client_types]");
+ goto end;
+ }
+
+ serving_client_typesList = OpenAPI_list_create();
+
+ cJSON_ArrayForEach(serving_client_types_local_nonprimitive, serving_client_types ) {
+ if (!cJSON_IsObject(serving_client_types_local_nonprimitive)) {
ogs_error("OpenAPI_gmlc_info_parseFromJSON() failed [serving_client_types]");
goto end;
}
+ OpenAPI_external_client_type_t *serving_client_typesItem = OpenAPI_external_client_type_parseFromJSON(serving_client_types_local_nonprimitive);
- serving_client_typesList = OpenAPI_list_create();
-
- cJSON_ArrayForEach(serving_client_types_local_nonprimitive, serving_client_types ) {
- if (!cJSON_IsObject(serving_client_types_local_nonprimitive)) {
- ogs_error("OpenAPI_gmlc_info_parseFromJSON() failed [serving_client_types]");
- goto end;
- }
- OpenAPI_external_client_type_t *serving_client_typesItem = OpenAPI_external_client_type_parseFromJSON(serving_client_types_local_nonprimitive);
-
- OpenAPI_list_add(serving_client_typesList, serving_client_typesItem);
- }
+ OpenAPI_list_add(serving_client_typesList, serving_client_typesItem);
+ }
}
gmlc_info_local_var = OpenAPI_gmlc_info_create (
serving_client_types ? serving_client_typesList : NULL
- );
+ );
return gmlc_info_local_var;
end:
diff --git a/lib/sbi/openapi/model/gmlc_info.h b/lib/sbi/openapi/model/gmlc_info.h
index eda507e14..2464ed4a8 100644
--- a/lib/sbi/openapi/model/gmlc_info.h
+++ b/lib/sbi/openapi/model/gmlc_info.h
@@ -25,7 +25,7 @@ typedef struct OpenAPI_gmlc_info_s {
OpenAPI_gmlc_info_t *OpenAPI_gmlc_info_create(
OpenAPI_list_t *serving_client_types
- );
+);
void OpenAPI_gmlc_info_free(OpenAPI_gmlc_info_t *gmlc_info);
OpenAPI_gmlc_info_t *OpenAPI_gmlc_info_parseFromJSON(cJSON *gmlc_infoJSON);
cJSON *OpenAPI_gmlc_info_convertToJSON(OpenAPI_gmlc_info_t *gmlc_info);
diff --git a/lib/sbi/openapi/model/gnb_id.c b/lib/sbi/openapi/model/gnb_id.c
new file mode 100644
index 000000000..b91bf600f
--- /dev/null
+++ b/lib/sbi/openapi/model/gnb_id.c
@@ -0,0 +1,126 @@
+
+#include
+#include |