Home
last modified time | relevance | path

Searched refs:sendfile (Results 1 - 25 of 58) sorted by relevance

123

/third_party/rust/crates/nix/src/sys/
H A Dsendfile.rs16 /// If `offset` is `None`, `sendfile` will begin reading at the current offset of `in_fd`and will
17 /// update the offset of `in_fd`. If `offset` is `Some`, `sendfile` will begin at the specified
23 /// For more information, see [the sendfile(2) man page.](https://man7.org/linux/man-pages/man2/sendfile.2.html)
26 pub fn sendfile( in sendfile() functions
35 let ret = unsafe { libc::sendfile(out_fd, in_fd, offset, count) }; in sendfile()
43 /// If `offset` is `None`, `sendfile` will begin reading at the current offset of `in_fd`and will
44 /// update the offset of `in_fd`. If `offset` is `Some`, `sendfile` will begin at the specified
50 /// For more information, see [the sendfile(2) man page.](https://man7.org/linux/man-pages/man2/sendfile
159 pub fn sendfile( sendfile() functions
209 pub fn sendfile( sendfile() functions
255 pub fn sendfile( sendfile() functions
[all...]
/third_party/musl/src/linux/
H A Dsendfile.c1 #include <sys/sendfile.h>
4 ssize_t sendfile(int out_fd, int in_fd, off_t *ofs, size_t count) in sendfile() function
9 weak_alias(sendfile, sendfile64);
/third_party/python/Lib/test/test_asyncio/
H A Dtest_sendfile.py1 """Tests for sendfile functionality."""
251 # Note: sendfile via SSL transport is equal to sendfile fallback
305 self.loop.sendfile(tr, self.file))
314 self.loop.sendfile(cli_proto.transport, self.file))
333 self.loop.sendfile(cli_proto.transport, self.file))
357 self.loop.sendfile(cli_proto.transport, self.file,
368 self.loop.sendfile(cli_proto.transport, self.file))
380 self.run_loop(self.loop.sendfile(cli_proto.transport, self.file))
391 self.loop.sendfile(cli_prot
[all...]
/third_party/rust/crates/nix/test/
H A Dtest_sendfile.rs5 use nix::sys::sendfile::*;
26 let res = sendfile(wr, tmp.as_raw_fd(), Some(&mut offset), 2).unwrap(); in test_sendfile_linux()
75 // Prepare headers and trailers for sendfile in test_sendfile_freebsd()
85 let (res, bytes_written) = sendfile( in test_sendfile_freebsd()
126 // Prepare headers and trailers for sendfile in test_sendfile_dragonfly()
136 let (res, bytes_written) = sendfile( in test_sendfile_dragonfly()
175 // Prepare headers and trailers for sendfile in test_sendfile_darwin()
185 let (res, bytes_written) = sendfile( in test_sendfile_darwin()
/third_party/musl/libc-test/src/functionalext/supplement/linux/
H A Dsendfile.c20 #include <sys/sendfile.h>
55 int result = sendfile(tofd, fromfd, &off, 1); in sendfile_0100()
57 t_error("%s failed: sendfile. result = %d\n", __func__, result); in sendfile_0100()
69 t_error("%s failed: sendfile. buf = %s\n", __func__, buf); in sendfile_0100()
87 int result = sendfile(tofd, fromfd, &off, 1); in sendfile_0200()
89 t_error("%s failed: sendfile. result = %d\n", __func__, result); in sendfile_0200()
93 t_error("%s failed: sendfile. errno = %d\n", __func__, errno); in sendfile_0200()
/third_party/musl/porting/liteos_m_iccarm/kernel/include/sys/
H A Dsendfile.h11 ssize_t sendfile(int, int, off_t *, size_t);
14 #define sendfile64 sendfile
/third_party/musl/porting/uniproton/kernel/include/sys/
H A Dsendfile.h11 ssize_t sendfile(int, int, off_t *, size_t);
14 #define sendfile64 sendfile
/third_party/musl/porting/liteos_m/kernel/include/sys/
H A Dsendfile.h11 ssize_t sendfile(int, int, off_t *, size_t);
14 #define sendfile64 sendfile
/third_party/musl/include/sys/
H A Dsendfile.h11 ssize_t sendfile(int, int, off_t *, size_t);
14 #define sendfile64 sendfile
/third_party/ltp/testcases/kernel/syscalls/sendfile/
H A Dsendfile05.c11 * Testcase to test that sendfile(2) system call returns EINVAL when passing
16 * Call sendfile with offset = -1.
19 #include <sys/sendfile.h>
41 TST_EXP_FAIL(sendfile(out_fd, in_fd, &offset, 1), EINVAL, in run()
42 "sendfile(out, in, &offset, ..) with offset=%lld", in run()
H A Dsendfile07.c11 * Testcase to test that sendfile(2) system call returns EAGAIN
15 #include <sys/sendfile.h>
59 TST_EXP_FAIL(sendfile(out_fd, in_fd, NULL, 1), EAGAIN, in run()
60 "sendfile(out_fd, in_fd, NULL, 1) with blocked out_fd"); in run()
H A Dsendfile03.c10 * Testcase to test that sendfile(2) system call returns EBADF when passing
21 #include <sys/sendfile.h>
53 TST_EXP_FAIL2(sendfile(*(tc[i].out_fd), *(tc[i].in_fd), NULL, 1), in run()
54 EBADF, "sendfile(..) with %s", tc[i].desc); in run()
H A Dsendfile04.c11 * Testcase to test that sendfile(2) system call returns EFAULT when passing
16 * Given wrong address or protected buffer as OFFSET argument to sendfile:
22 #include <sys/sendfile.h>
62 TST_EXP_FAIL2(sendfile(out_fd, in_fd, protected_buffer, 1), in run()
63 EFAULT, "sendfile(..) with %s, protection=%d", in run()
H A Dsendfile08.c10 * of the sendfile system call to be incorrectly set to the read side file
18 #include <sys/sendfile.h>
34 TEST(sendfile(out_fd, in_fd, NULL, strlen(TEST_MSG_IN))); in run()
36 tst_brk(TBROK | TTERRNO, "sendfile() failed"); in run()
44 tst_res(TPASS, "sendfile() copies data correctly"); in run()
48 tst_res(TFAIL, "sendfile() copies data incorrectly: '%s' expected: '%s%s'", in run()
H A Dsendfile06.c12 * Test that sendfile() system call updates file position of in_fd correctly
18 #include <sys/sendfile.h>
48 TEST(sendfile(out_fd, in_fd, NULL, sb.st_size)); in run()
52 tst_res(TFAIL, "sendfile() failed to return expected value, expected: %" in run()
56 tst_res(TFAIL, "sendfile() updated the file position of in_fd unexpectedly," in run()
61 tst_res(TPASS, "sendfile() with offset=NULL"); in run()
H A Dsendfile09.c10 * the sendfile() system call on large file. There is a kernel bug which
17 * 1. Call sendfile() with offset at 0.
18 * 2. Call sendfile() with offset at 3GB.
22 #include <sys/sendfile.h>
71 TEST(sendfile(out_fd, in_fd, &offset, tc[i].count)); in run()
75 tst_res(TFAIL, "sendfile() failed to return expected value, " in run()
79 tst_res(TFAIL, "sendfile() failed to update OFFSET parameter to " in run()
83 tst_res(TFAIL, "sendfile() updated the file position of in_fd " in run()
88 tst_res(TPASS, "sendfile() with %s", tc[i].desc); in run()
H A Dsendfile02.c12 * Test the basic functionality of the sendfile() system call:
14 * 1. Call sendfile() with offset = 0.
15 * 2. Call sendfile() with offset in the middle of the file.
20 #include <sys/sendfile.h>
63 TEST(sendfile(out_fd, in_fd, &offset, tc[i].count)); in run()
67 tst_res(TFAIL, "sendfile() failed to return expected value, " in run()
71 tst_res(TFAIL, "sendfile() failed to update OFFSET parameter to " in run()
75 tst_res(TFAIL, "sendfile() updated the file position of in_fd " in run()
80 tst_res(TPASS, "sendfile() with %s", tc[i].desc); in run()
/third_party/rust/crates/rustix/src/fs/
H A Dsendfile.rs4 /// `sendfile(out_fd, in_fd, offset, count)`
9 /// [Linux]: https://man7.org/linux/man-pages/man2/sendfile.2.html
12 pub fn sendfile<OutFd: AsFd, InFd: AsFd>( in sendfile() functions
18 backend::fs::syscalls::sendfile(out_fd.as_fd(), in_fd.as_fd(), offset, count) in sendfile()
H A Dmod.rs57 mod sendfile; modules
211 pub use sendfile::sendfile;
/third_party/node/deps/openssl/openssl/include/internal/
H A Dktls.h185 * KTLS enables the sendfile system call to send data from a file over
194 ret = sendfile(fd, s, off, size, NULL, &sbytes, flags); in ktls_sendfile()
226 # include <sys/sendfile.h>
329 * KTLS enables the sendfile system call to send data from a file over TLS.
330 * @flags are ignored on Linux. (placeholder for FreeBSD sendfile)
334 return sendfile(s, fd, &off, size); in ktls_sendfile()
/third_party/openssl/include/internal/
H A Dktls.h185 * KTLS enables the sendfile system call to send data from a file over
194 ret = sendfile(fd, s, off, size, NULL, &sbytes, flags); in ktls_sendfile()
226 # include <sys/sendfile.h>
329 * KTLS enables the sendfile system call to send data from a file over TLS.
330 * @flags are ignored on Linux. (placeholder for FreeBSD sendfile)
334 return sendfile(s, fd, &off, size); in ktls_sendfile()
/third_party/ltp/testcases/network/tcp_cmds/sendfile/
H A Dtestsf_s.c2 * Server for the sendfile test program
16 #include <sys/sendfile.h>
153 if ((rc = sendfile(as, fd, offset, flen)) != flen) { in main()
156 "sendfile error = %d, rc = %d", in main()
/third_party/NuttX/include/nuttx/fs/
H A Dfile.h75 * Name: sendfile
81 ssize_t sendfile(int outfd, int infd, off_t *offset, size_t count);
/third_party/NuttX/fs/vfs/
H A Dfs_sendfile.c43 * Name: sendfile
46 * sendfile() copies data between one file descriptor and another.
56 * sendfile interface. Other UNIX systems implement sendfile() with
57 * different semantics and prototypes. sendfile() should not be used
64 * holding the file offset from which sendfile() will start
65 * reading data from 'infd'. When sendfile() returns, this
68 * then sendfile() does not modify the current file offset of
87 ssize_t sendfile(int outfd, int infd, off_t *offset, size_t count) in sendfile() function
/third_party/python/Lib/wsgiref/
H A Dhandlers.py182 if not self.result_is_file() or not self.sendfile():
296 def sendfile(self): member in BaseHandler

Completed in 8 milliseconds

123