Skip to content

Commit 2eec44c

Browse files
committed
Auto merge of #3450 - larseggert:feat-ttl, r=JohnTitor
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?)
2 parents 4e32c43 + db7b4be commit 2eec44c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

libc-test/semver/apple.txt

+2
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,7 @@ IPV6_HOPLIMIT
640640
IPV6_JOIN_GROUP
641641
IPV6_LEAVE_GROUP
642642
IPV6_PKTINFO
643+
IPV6_RECVHOPLIMIT
643644
IPV6_RECVPKTINFO
644645
IPV6_RECVTCLASS
645646
IPV6_TCLASS
@@ -649,6 +650,7 @@ IP_PKTINFO
649650
IP_RECVDSTADDR
650651
IP_RECVIF
651652
IP_RECVTOS
653+
IP_RECVTTL
652654
IP_TOS
653655
ITIMER_PROF
654656
ITIMER_REAL

src/unix/bsd/apple/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -4075,6 +4075,7 @@ pub const IP_RECVDSTADDR: ::c_int = 7;
40754075
pub const IP_ADD_MEMBERSHIP: ::c_int = 12;
40764076
pub const IP_DROP_MEMBERSHIP: ::c_int = 13;
40774077
pub const IP_RECVIF: ::c_int = 20;
4078+
pub const IP_RECVTTL: ::c_int = 24;
40784079
pub const IP_BOUND_IF: ::c_int = 25;
40794080
pub const IP_PKTINFO: ::c_int = 26;
40804081
pub const IP_RECVTOS: ::c_int = 27;
@@ -4084,6 +4085,7 @@ pub const IPV6_LEAVE_GROUP: ::c_int = 13;
40844085
pub const IPV6_CHECKSUM: ::c_int = 26;
40854086
pub const IPV6_RECVTCLASS: ::c_int = 35;
40864087
pub const IPV6_TCLASS: ::c_int = 36;
4088+
pub const IPV6_RECVHOPLIMIT: ::c_int = 37;
40874089
pub const IPV6_PKTINFO: ::c_int = 46;
40884090
pub const IPV6_HOPLIMIT: ::c_int = 47;
40894091
pub const IPV6_RECVPKTINFO: ::c_int = 61;

0 commit comments

Comments
 (0)