Exemplo n.º 1
0
void oid_add_from_string(const char* name, const gchar *oid_str) {
	guint32* subids;
	guint oid_len = oid_string2subid(oid_str, &subids);

	if (oid_len) {
		D(3,("\tOid (from string): %s %s ",name?name:"NULL", oid_subid2string(subids,oid_len)));
		add_oid(name,OID_KIND_UNKNOWN,NULL,NULL,oid_len,subids);
	} else {
		D(1,("Failed to add Oid: %s %s ",name?name:"NULL", oid_str?oid_str:NULL));
	}
}
Exemplo n.º 2
0
static void
oids_test_2subids_string_tooshort(void)
{
    guint32 *subids = NULL;
    guint len, i;

    len = oid_string2subid(ex5.string, &subids);
    g_assert(len == ex5.subids_len);
    for (i=0; i < len; i++)
        g_assert(subids[i] == ex5.subids[i]);
}