2008-07-22 20:23:05 +02:00
|
|
|
// Ignore kernel only & unexported symbols
|
|
|
|
%ignore netlink;
|
|
|
|
|
|
|
|
%ignore RootNode;
|
|
|
|
%ignore for_all_supvals;
|
|
|
|
%ignore netErrorHandler;
|
|
|
|
%ignore netnode_key_count;
|
|
|
|
|
|
|
|
%ignore netnode_check;
|
|
|
|
%ignore netnode_kill;
|
|
|
|
%ignore netnode_start;
|
|
|
|
%ignore netnode_end;
|
|
|
|
%ignore netnode_next;
|
|
|
|
%ignore netnode_prev;
|
|
|
|
%ignore netnode_name;
|
|
|
|
%ignore netnode_rename;
|
|
|
|
%ignore netnode_valobj;
|
|
|
|
%ignore netnode_valstr;
|
|
|
|
%ignore netnode_set;
|
|
|
|
%ignore netnode_delvalue;
|
|
|
|
%ignore netnode_altval;
|
|
|
|
%ignore netnode_charval;
|
|
|
|
%ignore netnode_altval_idx8;
|
|
|
|
%ignore netnode_charval_idx8;
|
|
|
|
%ignore netnode_supval;
|
|
|
|
%ignore netnode_supstr;
|
|
|
|
%ignore netnode_supset;
|
|
|
|
%ignore netnode_supdel;
|
|
|
|
%ignore netnode_sup1st;
|
|
|
|
%ignore netnode_supnxt;
|
|
|
|
%ignore netnode_suplast;
|
|
|
|
%ignore netnode_supprev;
|
|
|
|
%ignore netnode_supval_idx8;
|
|
|
|
%ignore netnode_supstr_idx8;
|
|
|
|
%ignore netnode_supset_idx8;
|
|
|
|
%ignore netnode_supdel_idx8;
|
|
|
|
%ignore netnode_sup1st_idx8;
|
|
|
|
%ignore netnode_supnxt_idx8;
|
|
|
|
%ignore netnode_suplast_idx8;
|
|
|
|
%ignore netnode_supprev_idx8;
|
|
|
|
%ignore netnode_supdel_all;
|
2010-06-28 14:36:40 +02:00
|
|
|
%ignore netnode_supdel_range;
|
|
|
|
%ignore netnode_supdel_range_idx8;
|
2008-07-22 20:23:05 +02:00
|
|
|
%ignore netnode_hashval;
|
|
|
|
%ignore netnode_hashstr;
|
|
|
|
%ignore netnode_hashval_long;
|
|
|
|
%ignore netnode_hashset;
|
|
|
|
%ignore netnode_hashdel;
|
|
|
|
%ignore netnode_hash1st;
|
|
|
|
%ignore netnode_hashnxt;
|
|
|
|
%ignore netnode_hashlast;
|
|
|
|
%ignore netnode_hashprev;
|
|
|
|
%ignore netnode_blobsize;
|
|
|
|
%ignore netnode_getblob;
|
|
|
|
%ignore netnode_setblob;
|
|
|
|
%ignore netnode_delblob;
|
|
|
|
%ignore netnode_inited;
|
|
|
|
%ignore netnode_copy;
|
|
|
|
%ignore netnode_altshift;
|
|
|
|
%ignore netnode_charshift;
|
|
|
|
%ignore netnode_supshift;
|
|
|
|
%ignore netnode_altadjust;
|
|
|
|
%ignore netnode_exist;
|
|
|
|
|
|
|
|
%ignore netnode::truncate_zero_pages;
|
|
|
|
%ignore netnode::append_zero_pages;
|
|
|
|
%ignore netnode::createbase;
|
|
|
|
%ignore netnode::checkbase;
|
|
|
|
%ignore netnode::set_close_flag;
|
|
|
|
%ignore netnode::reserve_nodes;
|
|
|
|
%ignore netnode::validate;
|
2013-12-30 02:34:23 +01:00
|
|
|
%ignore netnode::upgrade16;
|
2008-07-22 20:23:05 +02:00
|
|
|
%ignore netnode::upgrade;
|
|
|
|
%ignore netnode::compress;
|
|
|
|
%ignore netnode::inited;
|
|
|
|
%ignore netnode::init;
|
2013-12-30 02:34:23 +01:00
|
|
|
%ignore netnode::can_write;
|
2008-07-22 20:23:05 +02:00
|
|
|
%ignore netnode::flush;
|
2013-03-06 08:44:10 +01:00
|
|
|
%ignore netnode::get_linput;
|
2008-07-22 20:23:05 +02:00
|
|
|
%ignore netnode::term;
|
|
|
|
%ignore netnode::killbase;
|
|
|
|
%ignore netnode::getdrive;
|
|
|
|
%ignore netnode::getgraph;
|
|
|
|
%ignore netnode::registerbase;
|
|
|
|
%ignore netnode::setbase;
|
|
|
|
|
2008-07-26 11:33:30 +02:00
|
|
|
%ignore netnode::altadjust;
|
2011-05-19 17:03:01 +02:00
|
|
|
%ignore netnode::getblob(void *buf, size_t *bufsize, nodeidx_t start, char tag);
|
2010-03-05 12:35:28 +01:00
|
|
|
%ignore netnode::operator nodeidx_t;
|
2014-07-05 00:02:42 +02:00
|
|
|
%ignore netnode::validate_names;
|
2010-03-05 12:35:28 +01:00
|
|
|
|
|
|
|
// Renaming one version of hashset() otherwise SWIG will not be able to activate the other one
|
2009-05-04 21:06:16 +02:00
|
|
|
%rename (hashset_idx) netnode::hashset(const char *idx, nodeidx_t value, char tag=htag);
|
|
|
|
|
2011-04-18 18:07:00 +02:00
|
|
|
%include "netnode.hpp"
|
|
|
|
|
2011-10-14 16:24:38 +02:00
|
|
|
%extend netnode
|
2011-04-18 18:07:00 +02:00
|
|
|
{
|
|
|
|
nodeidx_t index()
|
|
|
|
{
|
|
|
|
return self->operator nodeidx_t();
|
|
|
|
}
|
2011-05-19 17:03:01 +02:00
|
|
|
|
|
|
|
PyObject *getblob(nodeidx_t start, const char *tag)
|
|
|
|
{
|
|
|
|
// Get the blob and let IDA allocate the memory
|
|
|
|
size_t bufsize;
|
|
|
|
void *buf = self->getblob(NULL, &bufsize, start, *tag);
|
|
|
|
if ( buf == NULL )
|
|
|
|
Py_RETURN_NONE;
|
|
|
|
// Create a Python string
|
|
|
|
PyObject *py_str = PyString_FromStringAndSize((const char *)buf, bufsize);
|
|
|
|
// Free memory
|
|
|
|
qfree(buf);
|
|
|
|
|
|
|
|
return py_str;
|
|
|
|
}
|
2011-10-14 16:24:38 +02:00
|
|
|
|
|
|
|
PyObject *hashstr_buf(const char *idx, char tag=htag)
|
|
|
|
{
|
|
|
|
char buf[MAXSPECSIZE];
|
|
|
|
ssize_t sz = self->hashstr(idx, buf, sizeof(buf), tag);
|
|
|
|
if ( sz < 0 )
|
|
|
|
Py_RETURN_NONE;
|
|
|
|
else
|
|
|
|
return PyString_FromStringAndSize(buf, sz);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool hashset_buf(const char *idx, PyObject *py_str, char tag=htag)
|
|
|
|
{
|
|
|
|
char *buf;
|
|
|
|
Py_ssize_t sz;
|
|
|
|
|
|
|
|
if ( PyString_AsStringAndSize(py_str, &buf, &sz) == -1 )
|
|
|
|
return false;
|
|
|
|
else
|
|
|
|
return self->hashset(idx, buf, sz, tag);
|
|
|
|
}
|
2011-05-23 17:54:27 +02:00
|
|
|
}
|