diff --git a/src/capwap/item.c b/src/capwap/item.c new file mode 100644 index 00000000..7acf5edb --- /dev/null +++ b/src/capwap/item.c @@ -0,0 +1,28 @@ + +#include "item.h" +#include "capwap_items.h" + +struct cw_item * cw_item_get_by_id(int id,struct cw_item *table) +{ + int i; + while (table->id != CW_ITEM_NONE) { + if (table->id == id) + return table; + table++; + + } + return NULL; +} + + +struct cw_item * cw_item_get_by_name(const char *name,struct cw_item *table) +{ + int i; + while (table->id != CW_ITEM_NONE) { + if (!strcmp(table->cfgname,name)) + return table; + table++; + + } + return NULL; +}