Index: abstract.c =================================================================== --- abstract.c (revision 3374) +++ abstract.c (revision 3375) @@ -33,6 +33,24 @@ #include "abstract.h" #include +static const char *atype_names[] = { + "" + "net", + "busnet", + "buschan", + "port", + "busport", + "component", + "hub" +}; + +const char *csch_atype_name(csch_atype_t type) +{ + if ((type <= 0) || (type >= (sizeof(atype_names)/sizeof(atype_names[0])))) + return atype_names[CSCH_ATYPE_INVALID]; + return atype_names[type]; +} + void csch_ahdr_uninit(csch_ahdr_t *hdr) { csch_attrib_uninit(&hdr->attr);