summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/stkutil.c20
-rw-r--r--src/stkutil.h9
2 files changed, 29 insertions, 0 deletions
diff --git a/src/stkutil.c b/src/stkutil.c
index 639642a6..1e05ceae 100644
--- a/src/stkutil.c
+++ b/src/stkutil.c
@@ -1445,6 +1445,24 @@ static gboolean parse_dataobj_esn(struct comprehension_tlv_iter *iter,
return TRUE;
}
+/* Defined in TS 102.223 Section 8.70 */
+static gboolean parse_dataobj_network_access_name(
+ struct comprehension_tlv_iter *iter, void *user)
+{
+ struct stk_network_access_name *nan = user;
+ const unsigned char *data;
+ unsigned int len = comprehension_tlv_iter_get_length(iter);
+
+ if (len == 0)
+ return TRUE;
+
+ data = comprehension_tlv_iter_get_data(iter);
+ nan->len = len;
+ memcpy(nan->name, data, len);
+
+ return TRUE;
+}
+
/* Defined in TS 102.223 Section 8.72 */
static gboolean parse_dataobj_text_attr(struct comprehension_tlv_iter *iter,
void *user)
@@ -1613,6 +1631,8 @@ static dataobj_handler handler_for_type(enum stk_data_object_type type)
return parse_dataobj_remote_entity_address;
case STK_DATA_OBJECT_TYPE_ESN:
return parse_dataobj_esn;
+ case STK_DATA_OBJECT_TYPE_NETWORK_ACCESS_NAME:
+ return parse_dataobj_network_access_name;
case STK_DATA_OBJECT_TYPE_TEXT_ATTRIBUTE:
return parse_dataobj_text_attr;
case STK_DATA_OBJECT_TYPE_FRAME_ID:
diff --git a/src/stkutil.h b/src/stkutil.h
index 39d159bc..9e3cbf51 100644
--- a/src/stkutil.h
+++ b/src/stkutil.h
@@ -656,6 +656,15 @@ struct stk_remote_entity_address {
};
/*
+ * According to 102.223 Section 8.70 the length of CTLV is 1 byte. This means
+ * that the maximum size is 127 according to the rules of CTLVs.
+ */
+struct stk_network_access_name {
+ unsigned char name[127];
+ unsigned char len;
+};
+
+/*
* According to 102.223 Section 8.72 the length of text attribute CTLV is 1
* byte. This means that the maximum size is 127 according to the rules
* of CTLVs. Empty attribute options will have len of 0.