- Added new feature to ITTI:

* Possibilty to dump formatted strings directly to the analyzer
- Updated itti_analyzer accordingly

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4413 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
Cedric Roux
2013-11-15 12:49:51 +00:00
parent 0a060e6836
commit 5e2586626c
25 changed files with 306 additions and 122 deletions
@@ -17,6 +17,8 @@ types_t *lte_time_slot_type = NULL;
types_t *origin_task_id_type = NULL;
types_t *destination_task_id_type = NULL;
types_t *instance_type = NULL;
types_t *message_header_type = NULL;
types_t *message_size_type = NULL;
int locate_root(const char *root_name, types_t *head, types_t **root_elm) {
types_t *next_type;
@@ -77,6 +79,37 @@ int locate_type(const char *type_name, types_t *head, types_t **type) {
return (next_type == NULL) ? RC_FAIL : RC_OK;
}
uint32_t get_message_header_type_size(void)
{
/* Typedef */
if (message_header_type->child != NULL) {
/* Struct */
if (message_header_type->child->child != NULL) {
return message_header_type->child->child->size;
}
}
return 0;
}
uint32_t get_message_size(buffer_t *buffer)
{
uint32_t value = 0;
if (message_size_type != NULL)
{
types_t *temp = message_size_type;
while (temp->size == -1) {
temp = temp->child;
}
/* Fetch instance value */
buffer_fetch_bits (buffer, message_size_type->offset, temp->size, &value);
}
return value;
}
uint32_t get_lte_frame(buffer_t *buffer) {
uint32_t value = 0;
@@ -8,11 +8,17 @@ extern types_t *lte_time_slot_type;
extern types_t *origin_task_id_type;
extern types_t *destination_task_id_type;
extern types_t *instance_type;
extern types_t *message_header_type;
extern types_t *message_size_type;
int locate_root(const char *root_name, types_t *head, types_t **root);
int locate_type(const char *type_name, types_t *head, types_t **type);
uint32_t get_message_header_type_size(void);
uint32_t get_message_size(buffer_t *buffer);
uint32_t get_lte_frame(buffer_t *buffer);
uint32_t get_lte_slot(buffer_t *buffer);