summaryrefslogtreecommitdiff
path: root/src/sys/socket/sockopt.rs
AgeCommit message (Collapse)Author
2020-10-10Add support for TCP_KEEPCNT and TCP_KEEPINTVL TCP keepalive options.Yoav Steinberg
2020-05-31Convert the crate to edition 2018Alan Somers
2020-05-08Add SO_BINDTODEVICE sockoptJean Pierre Dudey
This is available only on Linux as far I know, [socket(7)](https://linux.die.net/man/7/socket) has some information about the `SO_BINDTODEVICE` sockopt. In simple words it binds a socket to an specific network device (specified as an string like "wlo1", "eth0", etc.), to only process packets from that device. Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2020-04-25Support UDP GSO and GRO on linuxGleb Pomykalov
2020-04-12Fix UB in getsockoptAlan Somers
The old code tried to zero-initialize an enum for which 0 is not a valid value. That worked for older compilers, but triggers a panic with Rust 1.44.0. The correct technique is to use mem::MaybeUninit. Fixes #1212
2019-09-19Where relevant, replace equality checks in assert! with assert_eq!Xavier L'Heureux
`assert_eq!` gives more debug info when the test fails by default than `assert!`. This should help make debugging easier.
2019-08-29Clippy cleanupAlan Somers
2019-06-09Add extra traits for all typesBryant Mairs
Derive Clone, Copy, Eq, Hash, and PartialEq for all types. Not all traits are supported by all types, which is why many are missing some.
2019-06-06Fix the is_so_mark_functional test in Linux containersAlan Somers
It's not sufficient to check for root privileges. In a container, the euid may be root even though the user lacks some capabilities. Replace this test's root check with a check for the CAP_NET_ADMIN capability instead.
2019-06-03Check euid, not uid, for socket testsAlan Somers
2019-05-31libc::uint8_t deprecated in favor of rust u8Johannes Schilling
2019-03-12Support AF_ALGGleb Pomykalov
2019-01-23Add IP_RECVIF & IP_RECVDSTADDR.Tom Pusateri
Include IP_PKTINFO and IP6_PKTINFO on netbsd/openbsd.
2018-12-17Merge #990bors[bot]
990: Add cmsg PKTINFO for IPv4 and IPv6. r=asomers a=pusateri Replaces #891 and attempts to address all previous concerns. Co-authored-by: Tom Pusateri <pusateri@bangj.com>
2018-12-15Add cmsg PKTINFO for IPv4 and IPv6.Tom Pusateri
ignore pktinfo tests on qemu mips,mips64,powerpc64 Original work by @mcginty.
2018-12-08Replace try! with ?Alan Somers
try! is not available in Rust 2018
2018-12-06Add support of TCP_CONGESTION for setsockoptFensteer
2018-07-27Fix *decoding* of cmsgs and add `ScmCredentials`.Jonas Schievink
2018-07-05Get `SO_PEERCRED` working on all Linux targetsJonas Schievink
2018-05-22TypoXavier Bestel
2018-03-21add SO_MARK SetSockOpt for LinuxJake McGinty
2018-02-15socket get-/setsockopt: document internal macros, types and traitsmexus
2018-01-11Add socket options for IP_TRANSPARENT / BIND_ANYJustin Latimer
2017-12-10Replace ip(v6)_mreq structs with libc equivalentBryant Mairs
2017-12-10Replace custom ucred struct with newtype wrapper around libc::ucredBryant Mairs
2017-12-10Use libc::lingerBryant Mairs
2017-12-04Stop reexporting `Errno` and its variantsJonas Schievink
cc #664 (unsure if this is everything needed)
2017-09-04Add support for SO_TIMESTAMPWesley Wolfe
2017-08-26Replace more FFI instancesBryant Mairs
2017-08-11Fix safety of sockopt helper traitsJonas Schievink
2017-08-11Get rid of a lot of transmutesJonas Schievink
Most could be replaced by simple raw pointer casts (or even perfectly safe coercions!). cc #373
2017-08-01add SockProtocol type for third argument of socket and socketpairNicolas Dusart
2017-08-01add socket constants already present in libcNicolas Dusart
2017-08-01remove sys::sockets::consts module as it's libc goal to define themNicolas Dusart
2017-04-09Removed tests on ARM for non-existant constants.Zac Berkowitz
2017-04-09Removed some socket constants from arch=armZac Berkowitz
2016-08-10Fix the sockopt_impl matcher rule order.Alan Somers
Rules for generic types were located above rules for specific types, so the rules for specific types never got matched. This caused the sys::socket::sockopt::test::can_get_listen_on_tcp_socket test to fail on FreeBSD. The solution is to put all of the generic rules at the bottom.
2016-05-02Add SO_ORIGINAL_DSTJustin Latimer
2016-02-25Fix IPV6 group membership options on OpenBSDVasily Kolobkov
2016-02-01Implement SO_ACCEPTCONN sockoptStanisław Pitucha
Only known on linux, nacl, freebsd
2016-02-01Add SO_TYPE handling in getsockoptStanisław Pitucha
2016-01-29Add support for SO_{RCV,SND}BUF(FORCE)? sockoptsFrank Denis
2016-01-28Move errno::Result back to crate rootarcnmx
2016-01-28Errno::result()arcnmx
2016-01-18improve bsd unixes ipv6 supportarthurprs
2016-01-18Disable IPV6_ADD_MEMBERSHIP on freebsdUser Vagrant
2016-01-18fix on macMattis Marjak
2015-12-22Implement support for getsockopt of peer credentials using the Linux ↵Magnus Hoff
specific SO_PEERCRED
2015-12-03NetBSD tweaks for kqueue supportZachary Tong
2015-11-20netbsd supportJeremy Fitzhardinge