Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Function

transmit

Public Function
std.os.uefi.protocol.simple_network.SimpleNetwork.transmit
pub fn transmit(
        self: *SimpleNetwork,
        header_size: usize,
        buffer: []const u8,
        src_addr: ?*const MacAddress,
        dest_addr: ?*const MacAddress,
        protocol: ?*const u16,
    ) TransmitError!void

Places a packet in the transmit queue of a network interface.

Params

File

os/uefi/protocol/simple_network.zig:299
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
    pub fn transmit(
        self: *SimpleNetwork,
        header_size: usize,
        buffer: []const u8,
        src_addr: ?*const MacAddress,
        dest_addr: ?*const MacAddress,
        protocol: ?*const u16,
    ) TransmitError!void {
        switch (self._transmit(
            self,
            header_size,
            buffer.len,
            buffer.ptr,
            src_addr,
            dest_addr,
            protocol,
        )) {
            .success => {},
            .not_started => return error.NotStarted,
            .not_ready => return error.NotReady,
            .buffer_too_small => return error.BufferTooSmall,
            .invalid_parameter => return error.InvalidParameter,
            .device_error => return error.DeviceError,
            .unsupported => return error.Unsupported,
            else => |status| return uefi.unexpectedStatus(status),
        }
    }