#include "setup.h"
#include "config.h"
#include "libopm.h"
#include "malloc.h"
#include "opm_error.h"
#include "opm_types.h"
#include "opm_common.h"
#include "list.h"
#include "inet.h"
#include "proxy.h"
#include <errno.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
#include <string.h>
Functions | |
OPM_T * | opm_create () |
OPM_REMOTE_T * | opm_remote_create (const char *ip) |
void | opm_remote_free (OPM_REMOTE_T *remote) |
OPM_ERR_T | opm_callback (OPM_T *scanner, int type, OPM_CALLBACK_FUNC *function, void *data) |
void | opm_free (OPM_T *scanner) |
OPM_ERR_T | opm_config (OPM_T *scanner, int key, void *value) |
OPM_ERR_T | opm_addtype (OPM_T *scanner, int type, unsigned short int port) |
OPM_ERR_T | opm_remote_addtype (OPM_REMOTE_T *remote, int type, unsigned short int port) |
OPM_ERR_T | opm_scan (OPM_T *scanner, OPM_REMOTE_T *remote) |
void | opm_end (OPM_T *scanner, OPM_REMOTE_T *remote) |
void | opm_endscan (OPM_T *scanner, OPM_REMOTE_T *remote) |
size_t | opm_active (OPM_T *scanner) |
void | opm_cycle (OPM_T *scanner) |
OPM_T* opm_create | ( | void | ) |
References _OPM::callbacks, CBLEN, _OPM::config, _OPM_CALLBACK::data, _OPM::fd_use, _OPM_CALLBACK::func, libopm_config_create(), libopm_list_create(), MyMalloc, _OPM::protocols, _OPM::queue, and _OPM::scans.
Referenced by main().
OPM_REMOTE_T* opm_remote_create | ( | const char * | ip | ) |
References _OPM_REMOTE::bytes_read, _OPM_REMOTE::data, _OPM_REMOTE::ip, libopm_list_create(), MyMalloc, _OPM_REMOTE::port, _OPM_REMOTE::protocol, and _OPM_REMOTE::protocols.
Referenced by main().
void opm_remote_free | ( | OPM_REMOTE_T * | remote | ) |
OPM_ERR_T opm_callback | ( | OPM_T * | scanner, | |
int | type, | |||
OPM_CALLBACK_FUNC * | function, | |||
void * | data | |||
) |
References _OPM::callbacks, CBLEN, _OPM_CALLBACK::data, _OPM_CALLBACK::func, OPM_ERR_CBNOTFOUND, and OPM_SUCCESS.
Referenced by main().
void opm_free | ( | OPM_T * | scanner | ) |
References _OPM::callbacks, _OPM::config, _libopm_node::data, _libopm_list::head, libopm_config_free(), libopm_list_free(), libopm_list_remove(), libopm_node_free(), LIST_FOREACH_SAFE, MyFree, _OPM::protocols, _OPM::queue, and _OPM::scans.
Referenced by main().
References libopm_list_add(), libopm_node_create(), OPM_ERR_BADPROTOCOL, OPM_SUCCESS, _OPM_PROTOCOL_CONFIG::port, _OPM::protocols, and _OPM_PROTOCOL_CONFIG::type.
Referenced by main().
OPM_ERR_T opm_remote_addtype | ( | OPM_REMOTE_T * | remote, | |
int | type, | |||
unsigned short int | port | |||
) |
References libopm_list_add(), libopm_node_create(), OPM_ERR_BADPROTOCOL, OPM_SUCCESS, _OPM_PROTOCOL_CONFIG::port, _OPM_REMOTE::protocols, and _OPM_PROTOCOL_CONFIG::type.
Referenced by main().
OPM_ERR_T opm_scan | ( | OPM_T * | scanner, | |
OPM_REMOTE_T * | remote | |||
) |
References _OPM_SCAN::addr, _OPM::config, inet_pton, _OPM_REMOTE::ip, libopm_config(), libopm_list_add(), libopm_node_create(), LIST_SIZE, OPM_CONFIG_FD_LIMIT, OPM_ERR_BADADDR, OPM_ERR_NOPROTOCOLS, OPM_SUCCESS, _OPM_REMOTE::protocols, _OPM::protocols, _OPM::queue, and _opm_sockaddr::sa4.
Referenced by main().
void opm_end | ( | OPM_T * | scanner, | |
OPM_REMOTE_T * | remote | |||
) |
References _OPM_SCAN::connections, _libopm_node::data, _libopm_list::head, libopm_list_remove(), libopm_node_free(), LIST_FOREACH_SAFE, OPM_CALLBACK_END, opm_endscan(), _OPM::queue, and _OPM_SCAN::remote.
Referenced by open_proxy().
void opm_endscan | ( | OPM_T * | scanner, | |
OPM_REMOTE_T * | remote | |||
) |
References _OPM_SCAN::connections, _libopm_node::data, _libopm_list::head, LIST_FOREACH, OPM_STATE_CLOSED, _OPM_SCAN::remote, _OPM::scans, and _OPM_CONNECTION::state.
Referenced by opm_end().
size_t opm_active | ( | OPM_T * | scanner | ) |
References LIST_SIZE, _OPM::queue, and _OPM::scans.