hnodeb: Add gtp SAPI
Change-Id: Ie4de00641089abbd03273ce5a2d9325659ac7d42
diff --git a/library/HNBLLIF_Templates.ttcn b/library/HNBLLIF_Templates.ttcn
index 3fa49b7..78cf89a 100644
--- a/library/HNBLLIF_Templates.ttcn
+++ b/library/HNBLLIF_Templates.ttcn
@@ -367,4 +367,131 @@
}
}
}
+
+
+/**********************
+ * GTP SAPI
+ **********************/
+template (value) HNBLLIF_Message ts_HNBLLIF_GTP_CONN_ESTABLISH_REQ(template (value) uint32_t context_id,
+ template (value) uint32_t remote_tei,
+ template (value) HNBLLIF_AddrType remote_gtpu_address_type,
+ template (value) HNBLLIF_Addr remote_gtpu_addr) := {
+ sapi := HNBLL_IF_SAPI_GTP,
+ u := {
+ gtp := {
+ prim := HNBLL_IF_GTP_MSG_CONN_ESTABLISH,
+ u := {
+ conn_establish := {
+ op := HNBLL_IF_OP_REQUEST,
+ u := {
+ req := {
+ context_id := context_id,
+ remote_tei := remote_tei,
+ reserved := 0,
+ remote_gtpu_address_type := remote_gtpu_address_type,
+ remote_gtpu_addr := remote_gtpu_addr
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+template (present) HNBLLIF_Message tr_HNBLLIF_GTP_CONN_ESTABLISH_CNF(template (present) uint32_t context_id := ?,
+ template (present) uint32_t local_tei := ?,
+ template (present) uint8_t error_code := ?,
+ template (present) HNBLLIF_AddrType local_gtpu_address_type := ?,
+ template (present) HNBLLIF_Addr local_gtpu_addr := ?) := {
+ sapi := HNBLL_IF_SAPI_GTP,
+ u := {
+ gtp := {
+ prim := HNBLL_IF_GTP_MSG_CONN_ESTABLISH,
+ u := {
+ conn_establish := {
+ op := HNBLL_IF_OP_CONFIRM,
+ u := {
+ cnf := {
+ context_id := context_id,
+ local_tei := local_tei,
+ error_code := error_code,
+ local_gtpu_address_type := local_gtpu_address_type,
+ local_gtpu_addr := local_gtpu_addr
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+template (value) HNBLLIF_Message ts_HNBLLIF_GTP_CONN_RELEASE_REQ(template (value) uint32_t context_id,
+ template (value) uint32_t remote_tei) := {
+ sapi := HNBLL_IF_SAPI_GTP,
+ u := {
+ gtp := {
+ prim := HNBLL_IF_GTP_MSG_CONN_RELEASE,
+ u := {
+ conn_release := {
+ op := HNBLL_IF_OP_REQUEST,
+ u := {
+ req := {
+ context_id := context_id,
+ remote_tei := remote_tei
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+template (present) HNBLLIF_Message tr_HNBLLIF_GTP_CONN_DATA_IND(template (present) uint32_t context_id := ?,
+ template (present) uint32_t local_tei := ?,
+ template (present) octetstring data := ?) := {
+ sapi := HNBLL_IF_SAPI_GTP,
+ u := {
+ gtp := {
+ prim := HNBLL_IF_GTP_MSG_CONN_DATA,
+ u := {
+ conn_data := {
+ op := HNBLL_IF_OP_INDICATION,
+ u := {
+ ind := {
+ context_id := context_id,
+ local_tei := local_tei,
+ data_len := ?,
+ data := data
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+template (value) HNBLLIF_Message ts_HNBLLIF_GTP_CONN_DATA_REQ(template (value) uint32_t context_id,
+ template (value) uint32_t remote_tei,
+ template (value) octetstring data) := {
+ sapi := HNBLL_IF_SAPI_GTP,
+ u := {
+ gtp := {
+ prim := HNBLL_IF_GTP_MSG_CONN_DATA,
+ u := {
+ conn_data := {
+ op := HNBLL_IF_OP_REQUEST,
+ u := {
+ req := {
+ context_id := context_id,
+ remote_tei := remote_tei,
+ data_len := lengthof(data),
+ data := data
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
} with { encode "RAW" variant "BYTEORDER(first)" };
diff --git a/library/HNBLLIF_Types.ttcn b/library/HNBLLIF_Types.ttcn
index befd7bb..95f91fc 100644
--- a/library/HNBLLIF_Types.ttcn
+++ b/library/HNBLLIF_Types.ttcn
@@ -330,6 +330,106 @@
other, OTHERWISE)"
};
+/**********************
+ * GTP SAPI
+ **********************/
+type enumerated HNBLLIF_GTP_MsgType {
+ HNBLL_IF_GTP_MSG_CONN_ESTABLISH ('0000'O),
+ HNBLL_IF_GTP_MSG_CONN_RELEASE ('0001'O),
+ HNBLL_IF_GTP_MSG_CONN_DATA ('0002'O)
+} with { variant "FIELDLENGTH(16)" };
+
+/* CONN_ESTABLISH */
+type record HNBLLIF_GTP_conn_establish_req {
+ uint32_t context_id,
+ uint32_t remote_tei,
+ uint8_t reserved,
+ HNBLLIF_AddrType remote_gtpu_address_type,
+ HNBLLIF_Addr remote_gtpu_addr
+} with { variant "" };
+
+type record HNBLLIF_GTP_conn_establish_cnf {
+ uint32_t context_id,
+ uint32_t local_tei,
+ uint8_t error_code,
+ HNBLLIF_AddrType local_gtpu_address_type,
+ HNBLLIF_Addr local_gtpu_addr
+} with { variant "" };
+
+type union HNBLLIF_GTP_PrimOpUnion_conn_establish {
+ HNBLLIF_GTP_conn_establish_req req,
+ HNBLLIF_GTP_conn_establish_cnf cnf,
+ octetstring other
+} with { variant "" };
+type record HNBLLIF_GTP_PrimOp_conn_establish {
+ HNBLLIF_Operation op,
+ HNBLLIF_GTP_PrimOpUnion_conn_establish u
+} with { variant (u) "CROSSTAG( req, op = HNBLL_IF_OP_REQUEST;
+ cnf, op = HNBLL_IF_OP_CONFIRM;
+ other, OTHERWISE)"
+};
+
+/* CONN_RELEASE */
+type record HNBLLIF_GTP_conn_release_req {
+ uint32_t context_id,
+ uint32_t remote_tei
+} with { variant "" };
+
+type union HNBLLIF_GTP_PrimOpUnion_conn_release {
+ HNBLLIF_GTP_conn_release_req req,
+ octetstring other
+} with { variant "" };
+type record HNBLLIF_GTP_PrimOp_conn_release {
+ HNBLLIF_Operation op,
+ HNBLLIF_GTP_PrimOpUnion_conn_release u
+} with { variant (u) "CROSSTAG( req, op = HNBLL_IF_OP_REQUEST;
+ other, OTHERWISE)"
+};
+
+/* CONN_DATA */
+type record HNBLLIF_GTP_conn_data_req {
+ uint32_t context_id,
+ uint32_t remote_tei,
+ uint32_t data_len,
+ octetstring data /* RANAP message */
+} with { variant (data_len) "LENGTHTO (data)" };
+
+type record HNBLLIF_GTP_conn_data_ind {
+ uint32_t context_id,
+ uint32_t local_tei,
+ uint32_t data_len,
+ octetstring data /* RANAP message */
+} with { variant (data_len) "LENGTHTO (data)" };
+
+type union HNBLLIF_GTP_PrimOpUnion_conn_data {
+ HNBLLIF_GTP_conn_data_req req,
+ HNBLLIF_GTP_conn_data_ind ind,
+ octetstring other
+} with { variant "" };
+type record HNBLLIF_GTP_PrimOp_conn_data {
+ HNBLLIF_Operation op,
+ HNBLLIF_GTP_PrimOpUnion_conn_data u
+} with { variant (u) "CROSSTAG( req, op = HNBLL_IF_OP_REQUEST;
+ ind, op = HNBLL_IF_OP_INDICATION;
+ other, OTHERWISE)"
+};
+
+type union HNBLLIF_GTP_PrimUnion {
+ HNBLLIF_GTP_PrimOp_conn_establish conn_establish,
+ HNBLLIF_GTP_PrimOp_conn_release conn_release,
+ HNBLLIF_GTP_PrimOp_conn_data conn_data,
+ octetstring other
+} with { variant "" };
+
+type record HNBLLIF_GTP_PrimHdr {
+ HNBLLIF_GTP_MsgType prim,
+ HNBLLIF_GTP_PrimUnion u
+} with { variant (u) "CROSSTAG( conn_establish, prim = HNBLL_IF_GTP_MSG_CONN_ESTABLISH;
+ conn_release, prim = HNBLL_IF_GTP_MSG_CONN_RELEASE;
+ conn_data, prim = HNBLL_IF_GTP_MSG_CONN_DATA;
+ other, OTHERWISE)"
+};
+
/**********************
* General
@@ -345,7 +445,7 @@
type enumerated HNBLLIF_Sapi {
HNBLL_IF_SAPI_CTL (-1),
HNBLL_IF_SAPI_IUH ('00000001'O),
- //HNBLL_IF_SAPI_GTP ('00000002'O),
+ HNBLL_IF_SAPI_GTP ('00000002'O),
HNBLL_IF_SAPI_AUDIO ('00000003'O)
} with { variant "FIELDLENGTH(32)"
variant "COMP(2scompl)"
@@ -361,6 +461,7 @@
type union HNBLLIF_SapiUnion {
HNBLLIF_CTL_PrimHdr ctl,
HNBLLIF_IUH_PrimHdr iuh,
+ HNBLLIF_GTP_PrimHdr gtp,
HNBLLIF_AUDIO_PrimHdr audio,
octetstring other
} with { variant "" };
@@ -370,6 +471,7 @@
HNBLLIF_SapiUnion u
} with { variant (u) "CROSSTAG( ctl, sapi = HNBLL_IF_SAPI_CTL;
iuh, sapi = HNBLL_IF_SAPI_IUH;
+ gtp, sapi = HNBLL_IF_SAPI_GTP;
audio, sapi = HNBLL_IF_SAPI_AUDIO;
other, OTHERWISE)"
};