Skip to content

Commit 42377bb

Browse files
committed
Auto merge of #925 - bluejekyll:master, r=alexcrichton
add IPV6_MULTICAST_IF and IPV6_MULTICAST_HOPS These were missing from the net2 crate. Adding them here so that the higher functions can be added to net2 later. They are necessary for declaring the interface for ipv6 multicast packets (route), and limits on the number of hops an ipv6 packet can travel Linux reference: https://github.com/torvalds/linux/blob/master/include/uapi/linux/in6.h#L168-L170 macOS reference: https://github.com/apple/darwin-xnu/blob/master/bsd/netinet6/in6.h#L538-L540
2 parents c473691 + 0e421c9 commit 42377bb

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

src/fuchsia/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,8 +1486,12 @@ pub const IP_HDRINCL: ::c_int = 3;
14861486
pub const IP_ADD_MEMBERSHIP: ::c_int = 35;
14871487
pub const IP_DROP_MEMBERSHIP: ::c_int = 36;
14881488
pub const IP_TRANSPARENT: ::c_int = 19;
1489+
pub const IPV6_MULTICAST_IF: ::c_int = 17;
1490+
pub const IPV6_MULTICAST_HOPS: ::c_int = 18;
1491+
pub const IPV6_MULTICAST_LOOP: ::c_int = 19;
14891492
pub const IPV6_ADD_MEMBERSHIP: ::c_int = 20;
14901493
pub const IPV6_DROP_MEMBERSHIP: ::c_int = 21;
1494+
pub const IPV6_V6ONLY: ::c_int = 26;
14911495

14921496
pub const TCP_NODELAY: ::c_int = 1;
14931497
pub const TCP_MAXSEG: ::c_int = 2;
@@ -1503,9 +1507,6 @@ pub const TCP_INFO: ::c_int = 11;
15031507
pub const TCP_QUICKACK: ::c_int = 12;
15041508
pub const TCP_CONGESTION: ::c_int = 13;
15051509

1506-
pub const IPV6_MULTICAST_LOOP: ::c_int = 19;
1507-
pub const IPV6_V6ONLY: ::c_int = 26;
1508-
15091510
pub const SO_DEBUG: ::c_int = 1;
15101511

15111512
pub const SHUT_RD: ::c_int = 0;

src/unix/bsd/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ pub const IP_MULTICAST_IF: ::c_int = 9;
183183
pub const IP_MULTICAST_TTL: ::c_int = 10;
184184
pub const IP_MULTICAST_LOOP: ::c_int = 11;
185185

186+
pub const IPV6_UNICAST_HOPS: ::c_int = 4;
187+
pub const IPV6_MULTICAST_IF: ::c_int = 9;
188+
pub const IPV6_MULTICAST_HOPS: ::c_int = 10;
186189
pub const IPV6_MULTICAST_LOOP: ::c_int = 11;
187190
pub const IPV6_V6ONLY: ::c_int = 27;
188191

src/unix/notbsd/mod.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -576,8 +576,13 @@ pub const IP_HDRINCL: ::c_int = 3;
576576
pub const IP_ADD_MEMBERSHIP: ::c_int = 35;
577577
pub const IP_DROP_MEMBERSHIP: ::c_int = 36;
578578
pub const IP_TRANSPARENT: ::c_int = 19;
579+
pub const IPV6_UNICAST_HOPS: ::c_int = 16;
580+
pub const IPV6_MULTICAST_IF: ::c_int = 17;
581+
pub const IPV6_MULTICAST_HOPS: ::c_int = 18;
582+
pub const IPV6_MULTICAST_LOOP: ::c_int = 19;
579583
pub const IPV6_ADD_MEMBERSHIP: ::c_int = 20;
580584
pub const IPV6_DROP_MEMBERSHIP: ::c_int = 21;
585+
pub const IPV6_V6ONLY: ::c_int = 26;
581586

582587
pub const TCP_NODELAY: ::c_int = 1;
583588
pub const TCP_MAXSEG: ::c_int = 2;
@@ -593,9 +598,6 @@ pub const TCP_INFO: ::c_int = 11;
593598
pub const TCP_QUICKACK: ::c_int = 12;
594599
pub const TCP_CONGESTION: ::c_int = 13;
595600

596-
pub const IPV6_MULTICAST_LOOP: ::c_int = 19;
597-
pub const IPV6_V6ONLY: ::c_int = 26;
598-
599601
pub const SO_DEBUG: ::c_int = 1;
600602

601603
pub const SHUT_RD: ::c_int = 0;

0 commit comments

Comments
 (0)