summaryrefslogtreecommitdiff
path: root/src/sys
AgeCommit message (Collapse)Author
2018-02-15socket get-/setsockopt: document internal macros, types and traitsmexus
2018-02-12Expose MSG_CMSG_CLOEXEC on *BSDGreg V
2018-02-12Add cfmakesane() on FreeBSDGreg V
2018-02-12Add missing kqueue event filters on FreeBSDGreg V
2018-02-08make statfs/statvfs to be available wherever they are availableIgor Gnatenko
libc reads sys/statvfs.h on all OS except Windows which nix doesn't care about. Closes: https://github.com/nix-rust/nix/issues/831 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2018-02-07Merge #852bors[bot]
852: Add step function to ptrace r=Susurrus a=xd009642 Added step function to ptrace, this follows the same form as the PTRACE_CONTINUE by advanced the tracee by a single step! Found when I was updating to nix 0.10.0 that this function had been missed out. Minor addition as `SINGLESTEP` works the same as `CONTINUE`
2018-02-03Updated example to be more meaningfulxd009642
Example now matches something more akin to an actual usecase.
2018-02-01Corrected typoxd009642
2018-01-31Added example and updated changelog.xd009642
Added doc test for sys::ptrace::step and also updated the changelog.
2018-01-30Add step function to ptracexd009642
Added step function to ptrace, this follows the same form as the PTRACE_CONTINUE by advanced the tracee by a single step!
2018-01-28Fail to compile for any unused codeBryant Mairs
2018-01-28Fix B460800 and B921600 baud rates for netbsdBryant Mairs
2018-01-28Alphabetize modules under /sysBryant Mairs
2018-01-28Require Debug impls for all typesBryant Mairs
2018-01-28Replace sockaddr_ctl with one from libcBryant Mairs
Also alter Debug to output all fields.
2018-01-28Implement Copy/Clone for all types missing itBryant Mairs
2018-01-28Disallow unnecessary import bracesBryant Mairs
2018-01-28Deny unused qualificationsBryant Mairs
2018-01-26Merge #843bors[bot]
843: Support arbitrary baud rates on BSDs r=asomers a=Susurrus Closes #842
2018-01-25Consistently use `Termios` in commentsBryant Mairs
2018-01-25Don't use map(drop) as it's hard to understandBryant Mairs
.map(drop) makes it seem like there is a need to drop the type at that point when really all you're doing is trying to erase the type information and return an empty tuple. So do that explicitly instead of throwing drop in there.
2018-01-25Support arbitrary baud rates on BSDsBryant Mairs
2018-01-26Merge #835bors[bot]
835: Add socket options for IP_TRANSPARENT / BIND_ANY r=asomers a=justinlatimer Add socket options for implementing a transparent proxy. Sources: [Linux](https://www.kernel.org/doc/Documentation/networking/tproxy.txt) [OpenBSD](https://man.openbsd.org/setsockopt.2#SO_BINDANY) [FreeBSD](https://www.freebsd.org/cgi/man.cgi?query=ip&manpath=FreeBSD+11.1-RELEASE) Thanks!
2018-01-21Merge #820bors[bot]
820: Change AioCb to primarily use Bytes instead of Rc<[u8]> r=Susurrus a=asomers `Rc<[u8]>` isn't a very good buffer type to use for aio. For one thing, it lacks interior mutability. For another, a single `Rc<[u8]>` can't be carved up into smaller buffers of the same type. `Bytes` and `BytesMut` fix both problems. This PR removes the ability to construct an `AioCb` from `Rc<[u8]>` and adds the ability to construct one from `Bytes`, `BytesMut`, or raw pointers (for consumers who need even more flexibility). At this stage, the PR has the following warts: 1. A hack is necessary to force small `Bytes` buffers to allocate on the heap. I plan to fix this with an enhancement to the bytes crate. 2. The `AioCb::buffer` method is necessary due to a deficiency in the tokio-core crate. Once I fix that, then only `AioCb::into_buffer`will need to be public.
2018-01-15aio: more documentationAlan Somers
2018-01-15aio: Clippy cleanupAlan Somers
2018-01-15aio: use `Bytes` instead of `Rc<[u8]>`Alan Somers
It's not actually safe to read into an `Rc<[u8]>`. It only worked because of a coincidental `unsafe` block. Replace that type with `BytesMut` from the bytes crate. For consistency's sake, use `Bytes` for writing too, and completely remove methods relating to `Rc<[u8]>`. Note that the `AioCb` will actually own the `BytesMut` object. The caller must call `into_buffer` to get it back once the I/O is complete. Fixes #788
2018-01-15Add AioCb::from_ptr and AioCb::from_mut_ptrAlan Somers
2018-01-11Add socket options for IP_TRANSPARENT / BIND_ANYJustin Latimer
2018-01-08Impl LinkAddr(MAC Addr)luozijun
2018-01-08impl `Debug` for all sockaddr typesluozijun
2018-01-06Add sigprocmaskThomas de Zeeuw
2017-12-20Replace boolean match with if/elseBryant Mairs
2017-12-20Don't clone Copy typesBryant Mairs
2017-12-20Remove redundant closureBryant Mairs
2017-12-20Replace '0 as *_' with ptr::null*()Bryant Mairs
2017-12-20Use backticks around types/functions in docsBryant Mairs
2017-12-20Use implicit returnsBryant Mairs
2017-12-20Remove unnecessary '@ _'Bryant Mairs
2017-12-20Use |= where appropriateBryant Mairs
2017-12-20Remove unnecessary impl ClonesBryant Mairs
2017-12-20Remove unnecessary lifetime annotationsBryant Mairs
2017-12-20Dereference in match head insteadBryant Mairs
2017-12-20Use unwrap_or_else instead of unwrap_or without a closureBryant Mairs
2017-12-20Remove unnecessary parenthesisBryant Mairs
2017-12-20Make numeric literals easier to readBryant Mairs
2017-12-20Merge redundant match armsBryant Mairs
2017-12-20Remove unnecessary referencesBryant Mairs
2017-12-20Make numeric literals easier to readBryant Mairs
2017-12-20Migrate sys/socket to libc FFI types and fix `msghdr` definition mismatch.Matthew Gregan