/libuv/src/ |
H A D | random.c | 40 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 D | uv-common.c | 210 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 D | random-devurandom.c | 32 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 D | random-getentropy.c | 39 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 D | random-getrandom.c | 54 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 D | internal.h | 334 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 D | random-sysctl-linux.c | 43 int uv__random_sysctl(void* buf, size_t buflen) { in uv__random_sysctl() argument 52 pe = p + buflen; in uv__random_sysctl()
|
H A D | core.c | 1815 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 D | fs.c | 844 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 D | stream.c | 1115 ssize_t buflen = buf.len; in uv__read() local 1151 if (nread < buflen) { in uv__read()
|
H A D | linux.c | 415 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 D | test-pipe-getsockname.c | 220 size_t buflen; in TEST_IMPL() local 222 buflen = sizeof(buf); in TEST_IMPL() 226 ASSERT_OK(uv_pipe_getsockname(&pipe_server, buf, &buflen)); in TEST_IMPL() 227 ASSERT_UINT64_EQ(sizeof(name) - 1, buflen); in TEST_IMPL() 228 ASSERT_MEM_EQ(name, buf, buflen); in TEST_IMPL() 268 size_t buflen; in TEST_IMPL() local 270 buflen = sizeof(buf); in TEST_IMPL() 274 ASSERT_OK(uv_pipe_getsockname(&pipe_server, buf, &buflen)); in TEST_IMPL() 275 check_is_autobind_abstract_socket_name(buf, buflen); in TEST_IMPL()
|
H A D | test-random.c | 31 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 D | errors.rst | 361 .. 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 D | misc.rst | 49 .. 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 D | uv.h | 356 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 D | internal.h | 272 int uv__random_rtlgenrandom(void* buf, size_t buflen);
|
H A D | util.c | 1691 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()
|