Skip to content

posix.MSG definition for macos is missing #24223

Description

@dacheng-gao

I don't know if is correct to convert from /Library/Developer/CommandLineTools/SDKs/MacOSX15.5.sdk/usr/include/sys/socket.h.

see https://github.com/apple/darwin-xnu/blob/main/bsd/sys/socket.h#L991
see also https://github.com/apple-oss-distributions/xnu/blob/main/bsd/sys/socket.h#L642

pub const MSG = struct {
    /// process out-of-band data
    pub const OOB = 0x1;
    /// peek at incoming message
    pub const PEEK = 0x2;
    /// send without using routing tables
    pub const DONTROUTE = 0x4;
    /// data completes record
    pub const EOR = 0x8;
    /// data discarded before delivery
    pub const TRUNC = 0x10;
    /// control data lost before delivery
    pub const CTRUNC = 0x20;
    /// wait for full request or error
    pub const WAITALL = 0x40;
    /// this message should be nonblocking
    pub const DONTWAIT = 0x80;
    /// data completes connection
    pub const EOF = 0x100;
    /// wait up to full request, may return partial
    pub const WAITSTREAM = 0x200;
    /// Start of 'hold' seq; dump so_temp, deprecated
    pub const FLUSH = 0x400;
    /// Hold frag in so_temp, deprecated
    pub const HOLD = 0x800;
    /// Send the packet in so_temp, deprecated
    pub const SEND = 0x1000;
    /// Data ready to be read
    pub const HAVEMORE = 0x2000;
    /// Data remains in current pkt
    pub const RCVMORE = 0x4000;
    /// Fail receive if socket address cannot be allocated
    pub const NEEDSA = 0x10000;
    /// do not generate SIGPIPE on EOF
    pub const NOSIGNAL = 0x80000;
    /// Inherit upcall in sock_accept
    pub const USEUPCALL = 0x80000000;
};

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.enhancementSolving this issue will likely involve adding new logic or components to the codebase.os-macosmacOSstandard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions