Documentation Archive Developer
Search

vmnet Changes for Objective-C

vmnet

vmnet.h

Declaration
From
vmnet_return_t vmnet_interface_set_event_callback (
    interface_ref interface,
    interface_event_t flags,
    dispatch_queue_t queue,
    void (^handler)(interface_event_t event_id, xpc_object_t event)
);
To
vmnet_return_t vmnet_interface_set_event_callback (
    interface_ref _Nonnull interface,
    interface_event_t flags,
    dispatch_queue_t _Nullable queue,
    void (^ _Nullablehandler)(interface_event_t event_id, xpc_object_t _Nonnull event)
);

Modified vmnet_read()
Declaration
From
vmnet_return_t vmnet_read (
    interface_ref interface,
    struct vmpktdesc *packets,
    int *pktcnt
);
To
vmnet_return_t vmnet_read (
    interface_ref _Nonnull interface,
    struct vmpktdesc * _Nonnull packets,
    int * _Nonnull pktcnt
);

Declaration
From
interface_ref vmnet_start_interface (
    xpc_object_t interface_desc,
    dispatch_queue_t queue,
    void (^handler)(vmnet_return_t status, xpc_object_t interface_param)
);
To
interface_ref _Nullable vmnet_start_interface (
    xpc_object_t _Nonnull interface_desc,
    dispatch_queue_t _Nonnull queue,
    void (^ _Nonnullhandler)(vmnet_return_t status, xpc_object_t _Nullable interface_param)
);

Declaration
From
vmnet_return_t vmnet_stop_interface (
    interface_ref interface,
    dispatch_queue_t queue,
    void (^handler)(vmnet_return_t status)
);
To
vmnet_return_t vmnet_stop_interface (
    interface_ref _Nonnull interface,
    dispatch_queue_t _Nonnull queue,
    void (^ _Nonnullhandler)(vmnet_return_t status)
);

Modified vmnet_write()
Declaration
From
vmnet_return_t vmnet_write (
    interface_ref interface,
    struct vmpktdesc *packets,
    int *pktcnt
);
To
vmnet_return_t vmnet_write (
    interface_ref _Nonnull interface,
    struct vmpktdesc * _Nonnull packets,
    int * _Nonnull pktcnt
);