Home
last modified time | relevance | path

Searched refs:buflen (Results 1 – 18 of 18) sorted by relevance

/libuv/src/
H A Drandom.c40 rc = uv__random_getentropy(buf, buflen); in uv__random()
42 rc = uv__random_devurandom(buf, buflen); in uv__random()
44 rc = uv__random_sysctl(buf, buflen); in uv__random()
46 rc = uv__random_getrandom(buf, buflen); in uv__random()
48 rc = uv__random_devurandom(buf, buflen); in uv__random()
58 rc = uv__random_sysctl(buf, buflen); in uv__random()
66 rc = uv__random_devurandom(buf, buflen); in uv__random()
97 size_t buflen, in uv_random() argument
100 if (buflen > 0x7FFFFFFFu) in uv_random()
107 return uv__random(buf, buflen); in uv_random()
[all …]
H A Duv-common.c210 uv__strscpy(buf, #name, buflen); break;
211 char* uv_err_name_r(int err, char* buf, size_t buflen) { in uv_err_name_r() argument
214 default: snprintf(buf, buflen, "Unknown system error %d", err); in uv_err_name_r()
233 snprintf(buf, buflen, "%s", msg); break;
234 char* uv_strerror_r(int err, char* buf, size_t buflen) { in uv_strerror_r() argument
237 default: snprintf(buf, buflen, "Unknown system error %d", err); in uv_strerror_r()
/libuv/src/unix/
H A Drandom-devurandom.c32 int uv__random_readpath(const char* path, void* buf, size_t buflen) { in uv__random_readpath() argument
53 for (pos = 0; pos != buflen; pos += n) { in uv__random_readpath()
55 n = read(fd, (char*) buf + pos, buflen - pos); in uv__random_readpath()
86 int uv__random_devurandom(void* buf, size_t buflen) { in uv__random_devurandom() argument
92 return uv__random_readpath("/dev/urandom", buf, buflen); in uv__random_devurandom()
H A Drandom-getentropy.c39 int uv__random_getentropy(void* buf, size_t buflen) { in uv__random_getentropy() argument
49 for (pos = 0, stride = 256; pos + stride < buflen; pos += stride) in uv__random_getentropy()
53 if (uv__getentropy((char *) buf + pos, buflen - pos)) in uv__random_getentropy()
H A Drandom-getrandom.c54 int uv__random_getrandom(void* buf, size_t buflen) { in uv__random_getrandom() argument
63 for (pos = 0; pos != buflen; pos += n) { in uv__random_getrandom()
65 n = buflen - pos; in uv__random_getrandom()
H A Dinternal.h334 int uv__search_path(const char* prog, char* buf, size_t* buflen);
338 int uv__random_devurandom(void* buf, size_t buflen);
339 int uv__random_getrandom(void* buf, size_t buflen);
340 int uv__random_getentropy(void* buf, size_t buflen);
341 int uv__random_readpath(const char* path, void* buf, size_t buflen);
342 int uv__random_sysctl(void* buf, size_t buflen);
456 ssize_t uv__getrandom(void* buf, size_t buflen, unsigned flags);
H A Drandom-sysctl-linux.c43 int uv__random_sysctl(void* buf, size_t buflen) { in uv__random_sysctl() argument
52 pe = p + buflen; in uv__random_sysctl()
H A Dcore.c1815 if (buf == NULL || buflen == NULL || *buflen == 0) in uv__search_path()
1833 *buflen -= 1; in uv__search_path()
1834 if (*buflen > abspath_size) in uv__search_path()
1835 *buflen = abspath_size; in uv__search_path()
1837 memcpy(buf, abspath, *buflen); in uv__search_path()
1838 buf[*buflen] = '\0'; in uv__search_path()
1863 *buflen -= 1; in uv__search_path()
1864 if (*buflen > abspath_size) in uv__search_path()
1865 *buflen = abspath_size; in uv__search_path()
1867 memcpy(buf, abspath, *buflen); in uv__search_path()
[all …]
H A Dfs.c844 size_t buflen; in uv__fs_sendfile_emul() local
882 buflen = len - nsent; in uv__fs_sendfile_emul()
884 if (buflen > sizeof(buf)) in uv__fs_sendfile_emul()
885 buflen = sizeof(buf); in uv__fs_sendfile_emul()
889 nread = pread(in_fd, buf, buflen, offset); in uv__fs_sendfile_emul()
891 nread = read(in_fd, buf, buflen); in uv__fs_sendfile_emul()
H A Dstream.c1115 ssize_t buflen = buf.len; in uv__read() local
1151 if (nread < buflen) { in uv__read()
H A Dlinux.c415 ssize_t uv__getrandom(void* buf, size_t buflen, unsigned flags) { in uv__getrandom() argument
421 rc = syscall(__NR_getrandom, buf, buflen, flags); in uv__getrandom()
423 uv__msan_unpoison(buf, buflen); in uv__getrandom()
/libuv/test/
H A Dtest-pipe-getsockname.c229 size_t buflen; in TEST_IMPL() local
231 buflen = sizeof(buf); in TEST_IMPL()
235 ASSERT_OK(uv_pipe_getsockname(&pipe_server, buf, &buflen)); in TEST_IMPL()
236 ASSERT_UINT64_EQ(sizeof(name) - 1, buflen); in TEST_IMPL()
237 ASSERT_MEM_EQ(name, buf, buflen); in TEST_IMPL()
277 size_t buflen; in TEST_IMPL() local
279 buflen = sizeof(buf); in TEST_IMPL()
283 ASSERT_OK(uv_pipe_getsockname(&pipe_server, buf, &buflen)); in TEST_IMPL()
284 check_is_autobind_abstract_socket_name(buf, buflen); in TEST_IMPL()
H A Dtest-random.c31 static void random_cb(uv_random_t* req, int status, void* buf, size_t buflen) { in random_cb() argument
40 ASSERT_OK(buflen); in random_cb()
43 ASSERT_EQ(buflen, sizeof(scratch)); in random_cb()
/libuv/docs/src/
H A Derrors.rst361 .. c:function:: char* uv_strerror_r(int err, char* buf, size_t buflen)
364 message is stored in the user-supplied buffer `buf` of at most `buflen` bytes.
373 .. c:function:: char* uv_err_name_r(int err, char* buf, size_t buflen)
376 name is stored in the user-supplied buffer `buf` of at most `buflen` bytes.
H A Dmisc.rst49 .. c:type:: void (*uv_random_cb)(uv_random_t* req, int status, void* buf, size_t buflen)
841 .. c:function:: int uv_random(uv_loop_t* loop, uv_random_t* req, void* buf, size_t buflen, unsigned…
843 Fill `buf` with exactly `buflen` cryptographically strong random bytes
847 Short reads are not possible. When less than `buflen` random bytes are
/libuv/include/
H A Duv.h356 size_t buflen);
427 UV_EXTERN char* uv_strerror_r(int err, char* buf, size_t buflen);
430 UV_EXTERN char* uv_err_name_r(int err, char* buf, size_t buflen);
1776 size_t buflen; member
1784 size_t buflen,
/libuv/src/win/
H A Dinternal.h272 int uv__random_rtlgenrandom(void* buf, size_t buflen);
H A Dutil.c1691 int uv__random_rtlgenrandom(void* buf, size_t buflen) { in uv__random_rtlgenrandom() argument
1692 if (buflen == 0) in uv__random_rtlgenrandom()
1695 if (SystemFunction036(buf, buflen) == FALSE) in uv__random_rtlgenrandom()

Completed in 47 milliseconds