diff --git a/nsock/src/engine_epoll.c b/nsock/src/engine_epoll.c index 9b81a6f6b..b4ecf5604 100644 --- a/nsock/src/engine_epoll.c +++ b/nsock/src/engine_epoll.c @@ -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 diff --git a/nsock/src/engine_iocp.c b/nsock/src/engine_iocp.c index 3e86c349b..b2ba4b45a 100644 --- a/nsock/src/engine_iocp.c +++ b/nsock/src/engine_iocp.c @@ -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; diff --git a/nsock/src/engine_kqueue.c b/nsock/src/engine_kqueue.c index 5643b948f..d7fa82549 100644 --- a/nsock/src/engine_kqueue.c +++ b/nsock/src/engine_kqueue.c @@ -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 diff --git a/nsock/src/engine_poll.c b/nsock/src/engine_poll.c index cbfdb0b07..7e77d00bd 100644 --- a/nsock/src/engine_poll.c +++ b/nsock/src/engine_poll.c @@ -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 diff --git a/nsock/src/engine_select.c b/nsock/src/engine_select.c index 3415d684d..d9e9b2097 100644 --- a/nsock/src/engine_select.c +++ b/nsock/src/engine_select.c @@ -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 diff --git a/nsock/src/nsock_core.c b/nsock/src/nsock_core.c index 12b2664dc..3ab6ccd44 100644 --- a/nsock/src/nsock_core.c +++ b/nsock/src/nsock_core.c @@ -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 diff --git a/nsock/src/nsock_event.c b/nsock/src/nsock_event.c index d639be442..0b040b0f8 100644 --- a/nsock/src/nsock_event.c +++ b/nsock/src/nsock_event.c @@ -64,8 +64,6 @@ #include -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; diff --git a/nsock/src/nsock_internal.h b/nsock/src/nsock_internal.h index c0cd17471..f5026f6e9 100644 --- a/nsock/src/nsock_internal.h +++ b/nsock/src/nsock_internal.h @@ -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 */ diff --git a/nsock/src/nsock_log.c b/nsock/src/nsock_log.c index c6df9f852..bca4a50a1 100644 --- a/nsock/src/nsock_log.c +++ b/nsock/src/nsock_log.c @@ -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; diff --git a/nsock/src/nsock_pcap.c b/nsock/src/nsock_pcap.c index 24a6b8152..3ee47ec67 100644 --- a/nsock/src/nsock_pcap.c +++ b/nsock/src/nsock_pcap.c @@ -73,8 +73,6 @@ #include "nsock_pcap.h" -extern struct timeval nsock_tod; - #if HAVE_PCAP #ifndef PCAP_NETMASK_UNKNOWN diff --git a/nsock/src/nsock_pool.c b/nsock/src/nsock_pool.c index d99894b3d..9f5c95bc9 100644 --- a/nsock/src/nsock_pool.c +++ b/nsock/src/nsock_pool.c @@ -71,16 +71,11 @@ #include #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); /* --------------------------------------- */ diff --git a/nsock/src/nsock_ssl.c b/nsock/src/nsock_ssl.c index 29d7fe8ad..959ad45a7 100644 --- a/nsock/src/nsock_ssl.c +++ b/nsock/src/nsock_ssl.c @@ -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 diff --git a/nsock/src/nsock_timers.c b/nsock/src/nsock_timers.c index df21d8acd..cb8e4e434 100644 --- a/nsock/src/nsock_timers.c +++ b/nsock/src/nsock_timers.c @@ -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, diff --git a/nsock/src/proxy_http.c b/nsock/src/proxy_http.c index 3dcb03b3e..4b83f1b25 100644 --- a/nsock/src/proxy_http.c +++ b/nsock/src/proxy_http.c @@ -60,8 +60,6 @@ #define DEFAULT_PROXY_PORT_HTTP 8080 - -extern struct timeval nsock_tod; extern const struct proxy_spec ProxySpecHttp; diff --git a/nsock/src/proxy_socks4.c b/nsock/src/proxy_socks4.c index ccdca3d56..6ad08d7da 100644 --- a/nsock/src/proxy_socks4.c +++ b/nsock/src/proxy_socks4.c @@ -61,8 +61,6 @@ #define DEFAULT_PROXY_PORT_SOCKS4 1080 - -extern struct timeval nsock_tod; extern const struct proxy_spec ProxySpecSocks4;