• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

google / alioth / 18454179012

13 Oct 2025 03:24AM UTC coverage: 17.915% (+0.06%) from 17.852%
18454179012

Pull #299

github

web-flow
Merge f01870ec5 into 6e2cf7d1a
Pull Request #299: feat: vmnet-based virtio-net device for macOS

17 of 241 new or added lines in 3 files covered. (7.05%)

1031 existing lines in 27 files now uncovered.

1368 of 7636 relevant lines covered (17.92%)

18.6 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/alioth/src/sys/linux/if_tun.rs
1
// Copyright 2025 Google LLC
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
//     https://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14

15
use std::ffi::{c_int, c_uint, c_ulong};
16

17
use bitflags::bitflags;
18
use libc::ifreq;
19

20
use crate::utils::ioctls::ioctl_iow;
21
use crate::{ioctl_read, ioctl_write_ptr, ioctl_write_val};
22

NEW
23
ioctl_write_ptr!(tun_set_iff, ioctl_iow::<c_int>(b'T', 202), ifreq);
×
24

NEW
25
ioctl_write_val!(tun_set_offload, ioctl_iow::<c_uint>(b'T', 208));
×
26

27
ioctl_read!(tun_get_vnet_hdr_sz, b'T', 215, c_int);
28

29
ioctl_write_ptr!(tun_set_vnet_hdr_sz, b'T', 216, c_int);
30

NEW
31
bitflags! {
×
NEW
32
    #[derive(Default, Debug, Clone, Copy, PartialEq, Eq, Hash)]
×
33
    pub struct TunFeature: c_ulong {
34
        const CSUM = 0x01;
35
        const TSO4 = 0x02;
36
        const TSO6 = 0x04;
37
        const TSO_ECN = 0x08;
38
        const UFO = 0x10;
39
        const USO4 = 0x20;
40
        const USO6 = 0x40;
41
    }
42
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc