Skip to content

Network macOS xcode14.0 beta2

Manuel de la Pena edited this page Sep 1, 2022 · 3 revisions

#Network.framework https://github.com/xamarin/xamarin-macios/pull/15841

diff -ruN /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Network.framework/Headers/ethernet_channel.h /Applications/Xcode_14.0.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Network.framework/Headers/ethernet_channel.h
--- /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Network.framework/Headers/ethernet_channel.h	2022-05-31 15:02:45.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Network.framework/Headers/ethernet_channel.h	2022-06-17 15:26:42.000000000 -0400
@@ -90,6 +90,38 @@
 NW_RETURNS_RETAINED nw_ethernet_channel_t
 nw_ethernet_channel_create(uint16_t ether_type, nw_interface_t interface);
 
+/*!
+ * @function nw_ethernet_channel_create_with_parameters
+ *
+ * @abstract
+ *		Creates an Ethernet channel with a custom EtherType and networking parameters
+ *
+ * @param ether_type
+ *		The custom EtherType to be used for all Ethernet frames in this channel. The
+ *		EtherType is the two-octet field in an Ethernet frame, indicating the protocol
+ *		encapsulated in the payload of the frame.  This parameter is in little-endian
+ *		byte order.  Only custom EtherType values are supported. This parameter cannot
+ *		be an EtherType already handled by the system, such as IPv4, IPv6, ARP, VLAN Tag,
+ *		or 802.1x.
+ *
+ *		Calling processes must hold the "com.apple.developer.networking.custom-protocol"
+ *		entitlement.
+ *
+ * @param interface
+ *		The interface on which this custom Ethernet channel will be allowed.
+ *
+ * @param parameters
+ *		nw_parameters_t that allows caller to specify networking parameters such as custom context and queue.
+ *
+ * @result
+ *		Returns an allocated nw_ethernet_channel_t object on success.
+ *		Callers are responsible for deallocating using nw_release(obj) or [obj release].
+ *		These objects support ARC.
+ *		Returns NULL on failure. Fails due to invalid parameters.
+ */
+API_AVAILABLE(macos(13.0)) API_UNAVAILABLE(ios, watchos, tvos)
+NW_RETURNS_RETAINED nw_ethernet_channel_t
+nw_ethernet_channel_create_with_parameters(uint16_t ether_type, nw_interface_t interface, nw_parameters_t parameters);
 #ifdef __BLOCKS__
 
 /*!
Clone this wiki locally