Skip to content

Commit

Permalink
Auto merge of #3450 - larseggert:feat-ttl, r=JohnTitor
Browse files Browse the repository at this point in the history
Add `IP_RECVTTL` and `IPV6_RECVHOPLIMIT` for Apple platforms

This adds `IP_RECVTTL` and `IPV6_RECVHOPLIMIT` for Apple platforms, which are currently missing.

(There are several other socket options present in `netinet/in.h` and `netinet6/in6.h`. I didn't add these since my code won't need them. Should I add them anyway?)
  • Loading branch information
bors committed Nov 22, 2023
2 parents 4ac74f5 + db7b4be commit 1cc1768
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libc-test/semver/apple.txt
Expand Up @@ -640,6 +640,7 @@ IPV6_HOPLIMIT
IPV6_JOIN_GROUP
IPV6_LEAVE_GROUP
IPV6_PKTINFO
IPV6_RECVHOPLIMIT
IPV6_RECVPKTINFO
IPV6_RECVTCLASS
IPV6_TCLASS
Expand All @@ -649,6 +650,7 @@ IP_PKTINFO
IP_RECVDSTADDR
IP_RECVIF
IP_RECVTOS
IP_RECVTTL
IP_TOS
ITIMER_PROF
ITIMER_REAL
Expand Down
2 changes: 2 additions & 0 deletions src/unix/bsd/apple/mod.rs
Expand Up @@ -4075,6 +4075,7 @@ pub const IP_RECVDSTADDR: ::c_int = 7;
pub const IP_ADD_MEMBERSHIP: ::c_int = 12;
pub const IP_DROP_MEMBERSHIP: ::c_int = 13;
pub const IP_RECVIF: ::c_int = 20;
pub const IP_RECVTTL: ::c_int = 24;
pub const IP_BOUND_IF: ::c_int = 25;
pub const IP_PKTINFO: ::c_int = 26;
pub const IP_RECVTOS: ::c_int = 27;
Expand All @@ -4084,6 +4085,7 @@ pub const IPV6_LEAVE_GROUP: ::c_int = 13;
pub const IPV6_CHECKSUM: ::c_int = 26;
pub const IPV6_RECVTCLASS: ::c_int = 35;
pub const IPV6_TCLASS: ::c_int = 36;
pub const IPV6_RECVHOPLIMIT: ::c_int = 37;
pub const IPV6_PKTINFO: ::c_int = 46;
pub const IPV6_HOPLIMIT: ::c_int = 47;
pub const IPV6_RECVPKTINFO: ::c_int = 61;
Expand Down

0 comments on commit 1cc1768

Please sign in to comment.