mirror of
https://github.com/nmap/nmap.git
synced 2025-12-10 09:49:05 +00:00
Replaced internal opaque types by structs.
This commit is contained in:
@@ -67,16 +67,16 @@
|
||||
|
||||
nsock_event_id nsock_sendto(nsock_pool ms_pool, nsock_iod ms_iod, nsock_ev_handler handler, int timeout_msecs,
|
||||
void *userdata, struct sockaddr *saddr, size_t sslen, unsigned short port, const char *data, int datalen) {
|
||||
mspool *nsp = (mspool *)ms_pool;
|
||||
msiod *nsi = (msiod *)ms_iod;
|
||||
msevent *nse;
|
||||
struct npool *nsp = (struct npool *)ms_pool;
|
||||
struct niod *nsi = (struct niod *)ms_iod;
|
||||
struct nevent *nse;
|
||||
char displaystr[256];
|
||||
struct sockaddr_in *sin = (struct sockaddr_in *)saddr;
|
||||
#if HAVE_IPV6
|
||||
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)saddr;
|
||||
#endif
|
||||
|
||||
nse = msevent_new(nsp, NSE_TYPE_WRITE, nsi, timeout_msecs, handler, userdata);
|
||||
nse = event_new(nsp, NSE_TYPE_WRITE, nsi, timeout_msecs, handler, userdata);
|
||||
assert(nse);
|
||||
|
||||
if (saddr->sa_family == AF_INET) {
|
||||
@@ -129,12 +129,12 @@ nsock_event_id nsock_sendto(nsock_pool ms_pool, nsock_iod ms_iod, nsock_ev_handl
|
||||
* will figure out the length itself */
|
||||
nsock_event_id nsock_write(nsock_pool ms_pool, nsock_iod ms_iod,
|
||||
nsock_ev_handler handler, int timeout_msecs, void *userdata, const char *data, int datalen) {
|
||||
mspool *nsp = (mspool *)ms_pool;
|
||||
msiod *nsi = (msiod *)ms_iod;
|
||||
msevent *nse;
|
||||
struct npool *nsp = (struct npool *)ms_pool;
|
||||
struct niod *nsi = (struct niod *)ms_iod;
|
||||
struct nevent *nse;
|
||||
char displaystr[256];
|
||||
|
||||
nse = msevent_new(nsp, NSE_TYPE_WRITE, nsi, timeout_msecs, handler, userdata);
|
||||
nse = event_new(nsp, NSE_TYPE_WRITE, nsi, timeout_msecs, handler, userdata);
|
||||
assert(nse);
|
||||
|
||||
nse->writeinfo.dest.ss_family = AF_UNSPEC;
|
||||
@@ -164,9 +164,9 @@ nsock_event_id nsock_write(nsock_pool ms_pool, nsock_iod ms_iod,
|
||||
/* Same as nsock_write except you can use a printf-style format and you can only use this for ASCII strings */
|
||||
nsock_event_id nsock_printf(nsock_pool ms_pool, nsock_iod ms_iod,
|
||||
nsock_ev_handler handler, int timeout_msecs, void *userdata, char *format, ...) {
|
||||
mspool *nsp = (mspool *)ms_pool;
|
||||
msiod *nsi = (msiod *)ms_iod;
|
||||
msevent *nse;
|
||||
struct npool *nsp = (struct npool *)ms_pool;
|
||||
struct niod *nsi = (struct niod *)ms_iod;
|
||||
struct nevent *nse;
|
||||
char buf[4096];
|
||||
char *buf2 = NULL;
|
||||
int res, res2;
|
||||
@@ -176,7 +176,7 @@ nsock_event_id nsock_printf(nsock_pool ms_pool, nsock_iod ms_iod,
|
||||
va_list ap;
|
||||
va_start(ap,format);
|
||||
|
||||
nse = msevent_new(nsp, NSE_TYPE_WRITE, nsi, timeout_msecs, handler, userdata);
|
||||
nse = event_new(nsp, NSE_TYPE_WRITE, nsi, timeout_msecs, handler, userdata);
|
||||
assert(nse);
|
||||
|
||||
res = Vsnprintf(buf, sizeof(buf), format, ap);
|
||||
|
||||
Reference in New Issue
Block a user