diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2008-01-30 22:50:55 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2008-01-30 22:50:55 +0000 |
commit | 1efb7e36272911cccd9f49c4b87bf8388ad901c6 (patch) | |
tree | 0de26d6c053bbfcd6463a483b319095e3c5f0006 /epan/uat.c | |
parent | df0e82fa104a361cad55d751bfebd5e935967b12 (diff) |
Add Luis' uat_get_table_by_name() to fetch SMI uat tables.
svn path=/trunk/; revision=24229
Diffstat (limited to 'epan/uat.c')
-rw-r--r-- | epan/uat.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/epan/uat.c b/epan/uat.c index ed61458877..2935a08e0f 100644 --- a/epan/uat.c +++ b/epan/uat.c @@ -172,6 +172,19 @@ gchar* uat_get_actual_filename(uat_t* uat, gboolean for_writing) { return pers_fname; } +uat_t* uat_get_table_by_name(const char* name) { + guint i; + + for (i=0; i < all_uats->len; i++) { + uat_t* u = g_ptr_array_index(all_uats,i); + if ( g_str_equal(u->name,name) ) { + return (u); + } + } + + return NULL; +} + static void putfld(FILE* fp, void* rec, uat_field_t* f) { guint fld_len; const char* fld_ptr; |