Skip to content

Enable IP_TOS and IPV6_TCLASS on illumos#662

Merged
Thomasdezeeuw merged 1 commit into
rust-lang:masterfrom
taspelund:illumos-tos-tclass
Jun 30, 2026
Merged

Enable IP_TOS and IPV6_TCLASS on illumos#662
Thomasdezeeuw merged 1 commit into
rust-lang:masterfrom
taspelund:illumos-tos-tclass

Conversation

@taspelund

Copy link
Copy Markdown
Contributor

IP_TOS and IPV6_TCLASS consts are already exposed by libc for Illumos. Enable the set_tos_v4/tos_v4 and tclass_v6/set_tclass_v6 wrappers for the illumos platform.

Manual run of tests tos_v4 and tclass_v6 succeed on illumos:

trey@korgano 08:27:10 PM | ~/git/socket2
‣ cargo nextest run --all-features tclass_v6 tos_v4
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.01s
------------
 Nextest run ID 1dcf5449-2180-4dae-a7c8-d7c8d5fae7ea with nextest profile: default
    Starting 2 tests across 2 binaries (55 tests skipped)
        PASS [   0.009s] socket2::socket tclass_v6
        PASS [   0.010s] socket2::socket tos_v4
------------
     Summary [   0.012s] 2 tests run: 2 passed, 55 skipped

trey@korgano 08:27:14 PM | ~/git/socket2
‣ uname -a
SunOS korgano 5.11 helios-2.0.23819 i86pc i386 i86pc

IP_TOS and IPV6_TCLASS consts are already exposed by libc for Illumos.
Enable the set_tos_v4/tos_v4 and tclass_v6/set_tclass_v6 wrappers for
the illumos platform.

Manual run of tests `tos_v4` and `tclass_v6` succeed on illumos:
```
trey@korgano 08:27:10 PM | ~/git/socket2
‣ cargo nextest run --all-features tclass_v6 tos_v4
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.01s
------------
 Nextest run ID 1dcf5449-2180-4dae-a7c8-d7c8d5fae7ea with nextest profile: default
    Starting 2 tests across 2 binaries (55 tests skipped)
        PASS [   0.009s] socket2::socket tclass_v6
        PASS [   0.010s] socket2::socket tos_v4
------------
     Summary [   0.012s] 2 tests run: 2 passed, 55 skipped

trey@korgano 08:27:14 PM | ~/git/socket2
‣ uname -a
SunOS korgano 5.11 helios-2.0.23819 i86pc i386 i86pc
```

Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
@Thomasdezeeuw Thomasdezeeuw merged commit 9f30d66 into rust-lang:master Jun 30, 2026
53 checks passed
@Thomasdezeeuw

Copy link
Copy Markdown
Collaborator

Thanks @taspelund

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants