This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26512 )
Change subject: library/DIAMETER_Templates: add templates for DWR/DWA
......................................................................
library/DIAMETER_Templates: add templates for DWR/DWA
Change-Id: I2abe33a3ac08c8855342f4277288cacb3545771b
Related: SYS#5602
---
M library/DIAMETER_Templates.ttcn
1 file changed, 86 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/12/26512/1
diff --git a/library/DIAMETER_Templates.ttcn b/library/DIAMETER_Templates.ttcn
index 8e7ae51..920a30c 100644
--- a/library/DIAMETER_Templates.ttcn
+++ b/library/DIAMETER_Templates.ttcn
@@ -247,6 +247,14 @@
}
}
}
+template (present) GenericAVP tr_AVP_OriginStateId(template (present) OCTET4 state_id := ?) := {
+ avp := {
+ avp_header := tr_DIA_Hdr(c_AVP_Code_BASE_NONE_Origin_State_Id),
+ avp_data := {
+ avp_BASE_NONE_Origin_State_Id := state_id
+ }
+ }
+}
template (value) GenericAVP ts_AVP_HostIpAddr(template (value) OCTET4 ipv4_addr) := {
avp := {
@@ -394,6 +402,14 @@
}
}
}
+template (present) GenericAVP tr_AVP_ResultCode(DIAMETER_Resultcode res_code) := {
+ avp := {
+ avp_header := tr_DIA_Hdr(c_AVP_Code_BASE_NONE_Result_Code),
+ avp_data := {
+ avp_BASE_NONE_Result_Code := int2oct(enum2int(res_code), 4)
+ }
+ }
+}
template (value) GenericAVP ts_AVP_AuthSessionState(template (value) BASE_NONE_Auth_Session_State ass := NO_STATE_MAINTAINED) := {
avp := {
@@ -966,4 +982,74 @@
// origin
});
+/* RFC 6733, section 5.5.1 "Device-Watchdog-Request" */
+template (value) PDU_DIAMETER
+ts_DIA_DWR(template (value) OCTET4 state_id := '00000000'O,
+ template (value) charstring orig_host := "ttcn3.localdomain",
+ template (value) charstring orig_realm := "localdomain",
+ template (value) UINT32 hbh_id := c_def_hbh_id,
+ template (value) UINT32 ete_id := c_def_ete_id) :=
+ ts_DIAMETER(flags := '10000000'B,
+ cmd_code := Device_Watchdog,
+ app_id := '00000000'O,
+ hbh_id := hbh_id,
+ ete_id := ete_id,
+ avps := {
+ ts_AVP_OriginHost(orig_host),
+ ts_AVP_OriginRealm(orig_realm),
+ ts_AVP_OriginStateId(state_id)
+ });
+template (present) PDU_DIAMETER
+tr_DIA_DWR(template (present) OCTET4 state_id := ?,
+ template (present) charstring orig_host := ?,
+ template (present) charstring orig_realm := ?,
+ template (present) UINT32 hbh_id := ?,
+ template (present) UINT32 ete_id := ?) :=
+ tr_DIAMETER(flags := '1???????'B,
+ cmd_code := Device_Watchdog,
+ app_id := '00000000'O,
+ hbh_id := hbh_id,
+ ete_id := ete_id,
+ avps := superset(
+ tr_AVP_OriginHost(orig_host),
+ tr_AVP_OriginRealm(orig_realm),
+ tr_AVP_OriginStateId(state_id)
+ ));
+
+/* RFC 6733, section 5.5.2 "Device-Watchdog-Answer" */
+template (value) PDU_DIAMETER
+ts_DIA_DWA(template (value) OCTET4 state_id := '00000000'O,
+ template (value) charstring orig_host := "ttcn3.localdomain",
+ template (value) charstring orig_realm := "localdomain",
+ template (value) UINT32 hbh_id := c_def_hbh_id,
+ template (value) UINT32 ete_id := c_def_ete_id) :=
+ ts_DIAMETER(flags := '00000000'B,
+ cmd_code := Device_Watchdog,
+ app_id := '00000000'O,
+ hbh_id := hbh_id,
+ ete_id := ete_id,
+ avps := {
+ ts_AVP_ResultCode(DIAMETER_SUCCESS),
+ ts_AVP_OriginHost(orig_host),
+ ts_AVP_OriginRealm(orig_realm),
+ ts_AVP_OriginStateId(state_id)
+ });
+template (present) PDU_DIAMETER
+tr_DIA_DWA(template (present) OCTET4 state_id := ?,
+ template (present) charstring orig_host := ?,
+ template (present) charstring orig_realm := ?,
+ template (present) UINT32 hbh_id := ?,
+ template (present) UINT32 ete_id := ?) :=
+ tr_DIAMETER(flags := '0???????'B,
+ cmd_code := Device_Watchdog,
+ app_id := '00000000'O,
+ hbh_id := hbh_id,
+ ete_id := ete_id,
+ avps := superset(
+ tr_AVP_ResultCode(DIAMETER_SUCCESS),
+ tr_AVP_OriginHost(orig_host),
+ tr_AVP_OriginRealm(orig_realm),
+ tr_AVP_OriginStateId(state_id)
+ ));
+
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26512
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I2abe33a3ac08c8855342f4277288cacb3545771b
Gerrit-Change-Number: 26512
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211212/1be89e9e/attachment.htm>