diff options
author | David Timber <mieabby@gmail.com> | 2020-09-14 15:47:30 +0930 |
---|---|---|
committer | David Timber <mieabby@gmail.com> | 2020-09-14 15:47:30 +0930 |
commit | f7f7332afafd4f965c5ef1d45cc1c7da9275c6ef (patch) | |
tree | 53b8e96d2d070215f0c6ee133cdba58ca93a4138 /src/recon.h | |
parent | c4160ed41717260b5941e2729c444b8ec051d5f0 (diff) |
* Add "--enable-static" configure option
* Change "PRNE_DEBUG" macro use
* Add "PRNE_VERBOSE"
* Impl "recon"
* Add "inet.h" for Internet Protocol stuff
* Changes regarding "PRNE_RND_WELL512_SEEDLEN"
* Add prne_own_realloc() for objects with multiple array memebers
* Add prne_add_timespec()
Diffstat (limited to 'src/recon.h')
-rw-r--r-- | src/recon.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/recon.h b/src/recon.h new file mode 100644 index 0000000..068175f --- /dev/null +++ b/src/recon.h @@ -0,0 +1,48 @@ +#pragma once +#include "pth.h" +#include "protocol.h" + +#include <mbedtls/ctr_drbg.h> + + +typedef struct prne_recon prne_recon_t; +typedef struct prne_recon_param prne_recon_param_t; +typedef struct prne_recon_network prne_recon_network_t; +typedef void(*prne_recon_evt_ft)(const prne_net_endpoint_t *ep); + +struct prne_recon_network { + prne_ip_addr_t addr; + uint8_t mask[16]; +}; + +struct prne_recon_param { + struct { + prne_recon_network_t *arr; + size_t cnt; + } blist; + struct { + prne_recon_network_t *arr; + size_t cnt; + } target; + struct { + uint16_t *arr; + size_t cnt; + } ports; + prne_recon_evt_ft evt_cb; + bool ownership; +}; + +prne_recon_t *prne_alloc_recon ( + prne_worker_t *wkr, + mbedtls_ctr_drbg_context *ctr_drbg, + const prne_recon_param_t param); +void prne_init_recon_param (prne_recon_param_t *p); +void prne_free_recon_param (prne_recon_param_t *p); +bool prne_alloc_recon_param ( + prne_recon_param_t *p, + const size_t blist, + const size_t target, + const size_t ports); +prne_recon_param_t prne_own_recon_param ( + const prne_recon_param_t *p, + const bool ownership); |