#include <assert.h>
#include <stdio.h>
#include "uv.h"
#include "internal.h"
#include "req-inl.h"
Go to the source code of this file.
|
int WSAAPI | GetNameInfoW (const SOCKADDR *pSockaddr, socklen_t SockaddrLength, PWCHAR pNodeBuffer, DWORD NodeBufferSize, PWCHAR pServiceBuffer, DWORD ServiceBufferSize, INT Flags) |
|
static void | uv__getnameinfo_work (struct uv__work *w) |
|
static void | uv__getnameinfo_done (struct uv__work *w, int status) |
|
int | uv_getnameinfo (uv_loop_t *loop, uv_getnameinfo_t *req, uv_getnameinfo_cb getnameinfo_cb, const struct sockaddr *addr, int flags) |
|
◆ GetNameInfoW()
int WSAAPI GetNameInfoW |
( |
const SOCKADDR * |
pSockaddr, |
|
|
socklen_t |
SockaddrLength, |
|
|
PWCHAR |
pNodeBuffer, |
|
|
DWORD |
NodeBufferSize, |
|
|
PWCHAR |
pServiceBuffer, |
|
|
DWORD |
ServiceBufferSize, |
|
|
INT |
Flags |
|
) |
| |
◆ uv__getnameinfo_done()
static void uv__getnameinfo_done |
( |
struct uv__work * |
w, |
|
|
int |
status |
|
) |
| |
|
static |
Definition at line 90 of file getnameinfo.c.
97 host = service =
NULL;
99 if (
status == UV_ECANCELED) {
101 req->retcode = UV_EAI_CANCELED;
102 }
else if (
req->retcode == 0) {
104 service =
req->service;
107 if (
req->getnameinfo_cb)
108 req->getnameinfo_cb(
req,
req->retcode, host, service);
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec req
static const char struct stat static buf struct stat static buf static vhangup int status
assert(limit<=UINT32_MAX/2)
#define container_of(ptr, type, member)
#define uv__req_unregister(loop, req)
References assert(), container_of, NULL, req, status, uv__req_unregister, and w.
Referenced by uv_getnameinfo().
◆ uv__getnameinfo_work()
static void uv__getnameinfo_work |
( |
struct uv__work * |
w | ) |
|
|
static |
Definition at line 41 of file getnameinfo.c.
55 ret = WSAGetLastError();
60 ret = WideCharToMultiByte(CP_UTF8,
73 ret = WideCharToMultiByte(CP_UTF8,
int uv__getaddrinfo_translate_error(int sys_err)
UV_EXTERN int uv_translate_sys_error(int sys_errno)
int WSAAPI GetNameInfoW(const SOCKADDR *pSockaddr, socklen_t SockaddrLength, PWCHAR pNodeBuffer, DWORD NodeBufferSize, PWCHAR pServiceBuffer, DWORD ServiceBufferSize, INT Flags)
References ARRAY_SIZE, container_of, GetNameInfoW(), NI_MAXHOST, NI_MAXSERV, NULL, req, uv__getaddrinfo_translate_error(), uv_translate_sys_error(), and w.
Referenced by uv_getnameinfo().
◆ uv_getnameinfo()
Definition at line 117 of file getnameinfo.c.
140 req->getnameinfo_cb = getnameinfo_cb;
145 if (getnameinfo_cb) {
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
static struct sockaddr static addrlen static backlog const void static flags void flags
void uv__work_submit(uv_loop_t *loop, struct uv__work *w, enum uv__work_kind kind, void(*work)(struct uv__work *w), void(*done)(struct uv__work *w, int status))
#define UV_REQ_INIT(req, typ)
#define uv__req_register(loop, req)
static void uv__getnameinfo_work(struct uv__work *w)
static void uv__getnameinfo_done(struct uv__work *w, int status)
References addr, AF_INET, AF_INET6, flags, loop, memcpy(), NULL, req, uv__getnameinfo_done(), uv__getnameinfo_work(), uv__req_init, uv__req_register, UV__WORK_SLOW_IO, uv__work_submit(), and UV_REQ_INIT.