diff options
author | Luca Deri <deri@ntop.org> | 2019-09-15 22:32:18 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2019-09-15 22:32:18 +0200 |
commit | f0013e826e28690a7037a8b2b781b8bc085efc6c (patch) | |
tree | 158e0263dcba30f5b8d731ecb654927adb03dee7 /python/ndpi_wrap.c | |
parent | 5fd79567f0f576ff80c05d9f2936b200f4700cb5 (diff) |
Added python bindings for nDPI
Diffstat (limited to 'python/ndpi_wrap.c')
-rw-r--r-- | python/ndpi_wrap.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/python/ndpi_wrap.c b/python/ndpi_wrap.c new file mode 100644 index 000000000..c8f7fdd96 --- /dev/null +++ b/python/ndpi_wrap.c @@ -0,0 +1,55 @@ +/* + * ndpi_wrap.c + * + * Copyright (C) 2011-19 - ntop.org + * + * nDPI is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * nDPI is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with nDPI. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#include "sys/types.h" +#include "ndpi_config.h" +#include "ndpi_main.h" + +int ndpi_wrap_get_api_version(){ + return NDPI_API_VERSION; +} + +int ndpi_wrap_ndpi_num_fds_bits(){ + return NDPI_NUM_FDS_BITS; +} + +int ndpi_wrap_num_custom_categories(){ + return NUM_CUSTOM_CATEGORIES; +} + +int ndpi_wrap_custom_category_label_len(){ + return CUSTOM_CATEGORY_LABEL_LEN; +} + +int ndpi_wrap_ndpi_max_supported_protocols(){ + return NDPI_MAX_SUPPORTED_PROTOCOLS; +} + +int ndpi_wrap_ndpi_max_num_custom_protocols(){ + return NDPI_MAX_NUM_CUSTOM_PROTOCOLS; +} + +int ndpi_wrap_ndpi_procol_size(){ + return NDPI_PROTOCOL_SIZE; +} + +void ndpi_wrap_NDPI_BITMASK_SET_ALL(NDPI_PROTOCOL_BITMASK* bitmask){ + NDPI_ONE(bitmask); +}
\ No newline at end of file |