diff options
author | Luis Ontanon <luis.ontanon@gmail.com> | 2007-08-25 01:14:24 +0000 |
---|---|---|
committer | Luis Ontanon <luis.ontanon@gmail.com> | 2007-08-25 01:14:24 +0000 |
commit | 00c5e48a17040bbeff107c98ce365633724ad9fe (patch) | |
tree | 55d9c884242ed55ed057163c987103803043bc8a /epan/oids.h | |
parent | fb082a9a3c738c4707245cd7a5bdf564683a968f (diff) | |
download | wireshark-00c5e48a17040bbeff107c98ce365633724ad9fe.tar.gz wireshark-00c5e48a17040bbeff107c98ce365633724ad9fe.tar.bz2 wireshark-00c5e48a17040bbeff107c98ce365633724ad9fe.zip |
get users of oid_resolv to use the new oids, rollout packet-snmp.c
svn path=/trunk/; revision=22651
Diffstat (limited to 'epan/oids.h')
-rw-r--r-- | epan/oids.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/epan/oids.h b/epan/oids.h index 5d63b3b79e..7e9c9eafa5 100644 --- a/epan/oids.h +++ b/epan/oids.h @@ -100,7 +100,7 @@ typedef struct _oid_info_t { } oid_info_t; /* init funcion called from epan.h */ -extern void oid_init(void); +extern void oids_init(void); /* * The objects returned by all these functions are all allocated with a @@ -149,9 +149,24 @@ extern oid_info_t* oid_get_from_encoded(const guint8 *oid, gint oid_len, guint32 extern oid_info_t* oid_get_from_string(const gchar *oid_str, guint32 **subids, guint* matched, guint* left); /* these are used to add oids to the collection */ - extern void oid_add(char* name, guint oid_len, guint32 *subids); - extern void oid_add_from_encoded(char* name, const guint8 *oid, gint oid_len); - extern void oid_add_from_string(char* name, const gchar *oid_str); +extern void oid_add(const char* name, guint oid_len, guint32 *subids); +extern void oid_add_from_encoded(const char* name, const guint8 *oid, gint oid_len); +extern void oid_add_from_string(const char* name, const gchar *oid_str); +/* macros for legacy oid functions */ +/* from former oid_resolv.h */ +#define add_oid_str_name(oidstr,oidname) oid_add_from_string(oidname, oidstr) +#define add_oid_name(oid, oid_len, name) oid_add_from_encoded(name,oid,oid_len) +#define get_oid_str_name(oidstr) oid_resolved_from_string(oidstr) +#define get_oid_name(encoid, encoid_len) oid_resolved_from_encoded(encoid, encoid_len) +#define oid_resolv_enabled() (1) +#define oid_resolv_cleanup() ((void)0) + +/* from former dissectors/format_oid.h */ +#define format_oid(oid, oid_length) ((void*)oid_resolved(oid_length,oid)) +#define new_format_oid(oid, oid_length, non_decoded, decoded) oid_both(oid_length, oid, non_decoded, decoded) + +#define subid_t guint32 + #endif |