summaryrefslogtreecommitdiffstats
path: root/names.h
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-01-05 19:06:33 +0000
committerThierry Vignaud <tv@mageia.org>2012-01-05 19:06:33 +0000
commitd4b800ce34c7060080ec40d97c88d17982961e39 (patch)
tree33de57b8cdad9956d9b2e0013737161530435d90 /names.h
parent6b0cbb31153e482d306dae2af647c43ba4919b87 (diff)
downloadldetect-d4b800ce34c7060080ec40d97c88d17982961e39.tar
ldetect-d4b800ce34c7060080ec40d97c88d17982961e39.tar.gz
ldetect-d4b800ce34c7060080ec40d97c88d17982961e39.tar.bz2
ldetect-d4b800ce34c7060080ec40d97c88d17982961e39.tar.xz
ldetect-d4b800ce34c7060080ec40d97c88d17982961e39.zip
sync with names with usbutils-005 which have better memory management
(needed for next commit)
Diffstat (limited to 'names.h')
-rw-r--r--names.h36
1 files changed, 19 insertions, 17 deletions
diff --git a/names.h b/names.h
index 71c27d4..8227a45 100644
--- a/names.h
+++ b/names.h
@@ -15,10 +15,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
*
*/
@@ -27,26 +23,32 @@
#ifndef _NAMES_H
#define _NAMES_H
-#include <stdint.h>
+#include <sys/types.h>
/* ---------------------------------------------------------------------- */
-extern const char *names_vendor(uint16_t vendorid);
-extern const char *names_product(uint16_t vendorid, uint16_t productid);
-extern const char *names_class(uint8_t classid);
-extern const char *names_subclass(uint8_t classid, uint8_t subclassid);
-extern const char *names_protocol(uint8_t classid, uint8_t subclassid, uint8_t protocolid);
-extern const char *names_audioterminal(uint16_t termt);
-extern const char *names_videoterminal(uint16_t termt);
-extern const char *names_hid(uint8_t hidd);
-extern const char *names_reporttag(uint8_t rt);
+extern const char *names_vendor(u_int16_t vendorid);
+extern const char *names_product(u_int16_t vendorid, u_int16_t productid);
+extern const char *names_class(u_int8_t classid);
+extern const char *names_subclass(u_int8_t classid, u_int8_t subclassid);
+extern const char *names_protocol(u_int8_t classid, u_int8_t subclassid,
+ u_int8_t protocolid);
+extern const char *names_audioterminal(u_int16_t termt);
+extern const char *names_videoterminal(u_int16_t termt);
+extern const char *names_hid(u_int8_t hidd);
+extern const char *names_reporttag(u_int8_t rt);
extern const char *names_huts(unsigned int data);
extern const char *names_hutus(unsigned int data);
-extern const char *names_langid(uint16_t langid);
-extern const char *names_physdes(uint8_t ph);
-extern const char *names_bias(uint8_t b);
+extern const char *names_langid(u_int16_t langid);
+extern const char *names_physdes(u_int8_t ph);
+extern const char *names_bias(u_int8_t b);
extern const char *names_countrycode(unsigned int countrycode);
+
+extern int get_vendor_string(char *buf, size_t size, u_int16_t vid);
+extern int get_product_string(char *buf, size_t size, u_int16_t vid, u_int16_t pid);
+
extern int names_init(char *n);
+extern void names_exit(void);
/* ---------------------------------------------------------------------- */
#endif /* _NAMES_H */