mirror of
https://github.com/nmap/nmap.git
synced 2025-12-15 12:19:02 +00:00
Move some prototypes to nsock_internal.h
This commit is contained in:
@@ -104,21 +104,6 @@ struct io_engine engine_epoll = {
|
||||
/* --- INTERNAL PROTOTYPES --- */
|
||||
static void iterate_through_event_lists(struct npool *nsp, int evcount);
|
||||
|
||||
/* defined in nsock_core.c */
|
||||
void process_iod_events(struct npool *nsp, struct niod *nsi, int ev);
|
||||
void process_event(struct npool *nsp, gh_list_t *evlist, struct nevent *nse, int ev);
|
||||
void process_expired_events(struct npool *nsp);
|
||||
#if HAVE_PCAP
|
||||
int pcap_read_on_nonselect(struct npool *nsp);
|
||||
void iterate_through_pcap_events(struct npool *nsp);
|
||||
#endif
|
||||
|
||||
/* defined in nsock_event.c */
|
||||
void update_first_events(struct nevent *nse);
|
||||
|
||||
|
||||
extern struct timeval nsock_tod;
|
||||
|
||||
|
||||
/*
|
||||
* Engine specific data structure
|
||||
|
||||
@@ -172,20 +172,6 @@ static void force_operation(struct npool *nsp, struct nevent *nse);
|
||||
static void free_eov(struct npool *nsp, struct extended_overlapped *eov);
|
||||
static int map_faulty_errors(int err);
|
||||
|
||||
/* defined in nsock_core.c */
|
||||
void process_iod_events(struct npool *nsp, struct niod *nsi, int ev);
|
||||
void process_event(struct npool *nsp, gh_list_t *evlist, struct nevent *nse, int ev);
|
||||
void process_expired_events(struct npool *nsp);
|
||||
#if HAVE_PCAP
|
||||
int pcap_read_on_nonselect(struct npool *nsp);
|
||||
void iterate_through_pcap_events(struct npool *nsp);
|
||||
#endif
|
||||
|
||||
/* defined in nsock_event.c */
|
||||
void update_first_events(struct nevent *nse);
|
||||
|
||||
|
||||
extern struct timeval nsock_tod;
|
||||
|
||||
int iocp_init(struct npool *nsp) {
|
||||
struct iocp_engine_info *iinfo;
|
||||
|
||||
@@ -97,21 +97,6 @@ struct io_engine engine_kqueue = {
|
||||
/* --- INTERNAL PROTOTYPES --- */
|
||||
static void iterate_through_event_lists(struct npool *nsp, int evcount);
|
||||
|
||||
/* defined in nsock_core.c */
|
||||
void process_iod_events(struct npool *nsp, struct niod *nsi, int ev);
|
||||
void process_event(struct npool *nsp, gh_list_t *evlist, struct nevent *nse, int ev);
|
||||
void process_expired_events(struct npool *nsp);
|
||||
#if HAVE_PCAP
|
||||
int pcap_read_on_nonselect(struct npool *nsp);
|
||||
void iterate_through_pcap_events(struct npool *nsp);
|
||||
#endif
|
||||
|
||||
/* defined in nsock_event.c */
|
||||
void update_first_events(struct nevent *nse);
|
||||
|
||||
|
||||
extern struct timeval nsock_tod;
|
||||
|
||||
|
||||
/*
|
||||
* Engine specific data structure
|
||||
|
||||
@@ -129,21 +129,6 @@ struct io_engine engine_poll = {
|
||||
/* --- INTERNAL PROTOTYPES --- */
|
||||
static void iterate_through_event_lists(struct npool *nsp);
|
||||
|
||||
/* defined in nsock_core.c */
|
||||
void process_iod_events(struct npool *nsp, struct niod *nsi, int ev);
|
||||
void process_event(struct npool *nsp, gh_list_t *evlist, struct nevent *nse, int ev);
|
||||
void process_expired_events(struct npool *nsp);
|
||||
#if HAVE_PCAP
|
||||
int pcap_read_on_nonselect(struct npool *nsp);
|
||||
void iterate_through_pcap_events(struct npool *nsp);
|
||||
#endif
|
||||
|
||||
/* defined in nsock_event.c */
|
||||
void update_first_events(struct nevent *nse);
|
||||
|
||||
|
||||
extern struct timeval nsock_tod;
|
||||
|
||||
|
||||
/*
|
||||
* Engine specific data structure
|
||||
|
||||
@@ -91,21 +91,6 @@ struct io_engine engine_select = {
|
||||
/* --- INTERNAL PROTOTYPES --- */
|
||||
static void iterate_through_event_lists(struct npool *nsp);
|
||||
|
||||
/* defined in nsock_core.c */
|
||||
void process_event(struct npool *nsp, gh_list_t *evlist, struct nevent *nse, int ev);
|
||||
void process_iod_events(struct npool *nsp, struct niod *nsi, int ev);
|
||||
void process_expired_events(struct npool *nsp);
|
||||
|
||||
#if HAVE_PCAP
|
||||
int pcap_read_on_nonselect(struct npool *nsp);
|
||||
#endif
|
||||
|
||||
/* defined in nsock_event.c */
|
||||
void update_first_events(struct nevent *nse);
|
||||
|
||||
|
||||
extern struct timeval nsock_tod;
|
||||
|
||||
|
||||
/*
|
||||
* Engine specific data structure
|
||||
|
||||
@@ -87,11 +87,6 @@
|
||||
* this */
|
||||
struct timeval nsock_tod;
|
||||
|
||||
/* Internal function defined in nsock_event.c
|
||||
* Update the nse->iod first events, assuming nse is about to be deleted */
|
||||
void update_first_events(struct nevent *nse);
|
||||
|
||||
|
||||
|
||||
/* Each iod has a count of pending socket reads, socket writes, and pcap reads.
|
||||
* When a descriptor's count is nonzero, its bit must be set in the appropriate
|
||||
|
||||
@@ -64,8 +64,6 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
extern struct timeval nsock_tod;
|
||||
|
||||
/* Find the type of an event that spawned a callback */
|
||||
enum nse_type nse_type(nsock_event nse) {
|
||||
struct nevent *me = (struct nevent *)nse;
|
||||
|
||||
@@ -133,6 +133,8 @@ enum iod_state {
|
||||
|
||||
/* ------------------- STRUCTURES ------------------- */
|
||||
|
||||
extern struct timeval nsock_tod;
|
||||
|
||||
struct readinfo {
|
||||
enum nsock_read_types read_type;
|
||||
/* num lines; num bytes; whatever (depends on read_type) */
|
||||
@@ -521,5 +523,20 @@ static inline struct nevent *lnode_nevent2(gh_lnode_t *lnode) {
|
||||
return container_of(lnode, struct nevent, nodeq_pcap);
|
||||
}
|
||||
|
||||
/* defined in nsock_core.c */
|
||||
void process_iod_events(struct npool *nsp, struct niod *nsi, int ev);
|
||||
void process_event(struct npool *nsp, gh_list_t *evlist, struct nevent *nse, int ev);
|
||||
void process_expired_events(struct npool *nsp);
|
||||
#if HAVE_PCAP
|
||||
int pcap_read_on_nonselect(struct npool *nsp);
|
||||
void iterate_through_pcap_events(struct npool *nsp);
|
||||
#endif
|
||||
|
||||
/* defined in nsock_event.c */
|
||||
void update_first_events(struct nevent *nse);
|
||||
|
||||
/* defined in nsock_engines.c */
|
||||
struct io_engine *get_io_engine(void);
|
||||
|
||||
#endif /* NSOCK_INTERNAL_H */
|
||||
|
||||
|
||||
@@ -64,8 +64,6 @@
|
||||
|
||||
static void nsock_stderr_logger(const struct nsock_log_rec *rec);
|
||||
|
||||
extern struct timeval nsock_tod;
|
||||
|
||||
nsock_loglevel_t NsockLogLevel = NSOCK_LOG_ERROR;
|
||||
nsock_logger_t NsockLogger = nsock_stderr_logger;
|
||||
|
||||
|
||||
@@ -73,8 +73,6 @@
|
||||
|
||||
#include "nsock_pcap.h"
|
||||
|
||||
extern struct timeval nsock_tod;
|
||||
|
||||
#if HAVE_PCAP
|
||||
|
||||
#ifndef PCAP_NETMASK_UNKNOWN
|
||||
|
||||
@@ -71,16 +71,11 @@
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
extern struct timeval nsock_tod;
|
||||
|
||||
/* To use this library, the first thing they must do is create a pool
|
||||
* so we do the initialization during the first pool creation */
|
||||
static int nsocklib_initialized = 0;
|
||||
|
||||
|
||||
/* defined in nsock_engines.h */
|
||||
struct io_engine *get_io_engine(void);
|
||||
|
||||
/* ---- INTERNAL FUNCTIONS PROTOTYPES ---- */
|
||||
static void nsock_library_initialize(void);
|
||||
/* --------------------------------------- */
|
||||
|
||||
@@ -78,7 +78,6 @@
|
||||
* (bri@ifokr.org) tests on an Pentium 686 against the ciphers listed. */
|
||||
#define CIPHERS_FAST "RC4-SHA:RC4-MD5:NULL-SHA:EXP-DES-CBC-SHA:EXP-EDH-RSA-DES-CBC-SHA:EXP-RC4-MD5:NULL-MD5:EDH-RSA-DES-CBC-SHA:EXP-RC2-CBC-MD5:EDH-RSA-DES-CBC3-SHA:EXP-ADH-RC4-MD5:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA:EXP-ADH-DES-CBC-SHA:ADH-AES256-SHA:ADH-DES-CBC-SHA:ADH-RC4-MD5:AES256-SHA:DES-CBC-SHA:DES-CBC3-SHA:ADH-DES-CBC3-SHA:AES128-SHA:ADH-AES128-SHA:eNULL:ALL"
|
||||
|
||||
extern struct timeval nsock_tod;
|
||||
#define NSOCK_SSL_STATE_UNINITIALIZED -1
|
||||
#define NSOCK_SSL_STATE_INITIALIZED 1
|
||||
#define NSOCK_SSL_STATE_ATEXIT 0
|
||||
|
||||
@@ -54,8 +54,6 @@
|
||||
#include "nsock_internal.h"
|
||||
#include "nsock_log.h"
|
||||
|
||||
extern struct timeval nsock_tod;
|
||||
|
||||
/* Send back an NSE_TYPE_TIMER after the number of milliseconds specified. Of
|
||||
* course it can also return due to error, cancellation, etc. */
|
||||
nsock_event_id nsock_timer_create(nsock_pool ms_pool, nsock_ev_handler handler,
|
||||
|
||||
@@ -60,8 +60,6 @@
|
||||
|
||||
#define DEFAULT_PROXY_PORT_HTTP 8080
|
||||
|
||||
|
||||
extern struct timeval nsock_tod;
|
||||
extern const struct proxy_spec ProxySpecHttp;
|
||||
|
||||
|
||||
|
||||
@@ -61,8 +61,6 @@
|
||||
|
||||
#define DEFAULT_PROXY_PORT_SOCKS4 1080
|
||||
|
||||
|
||||
extern struct timeval nsock_tod;
|
||||
extern const struct proxy_spec ProxySpecSocks4;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user