aboutsummaryrefslogtreecommitdiffstats
path: root/epan/uat.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2008-01-30 22:50:55 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2008-01-30 22:50:55 +0000
commit1efb7e36272911cccd9f49c4b87bf8388ad901c6 (patch)
tree0de26d6c053bbfcd6463a483b319095e3c5f0006 /epan/uat.c
parentdf0e82fa104a361cad55d751bfebd5e935967b12 (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.c13
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;