public NWEthernetChannel(ushort ethernetType, NWInterface networkInterface)
        {
            if (networkInterface == null)
            {
                throw new ArgumentNullException(nameof(networkInterface));
            }

            InitializeHandle(nw_ethernet_channel_create(ethernetType, networkInterface.Handle));
        }
Esempio n. 2
0
        static void TrampolineEnumerateInterfacesHandler(IntPtr block, IntPtr inter)
        {
            var del = BlockLiteral.GetTarget <Action <NWInterface> > (block);

            if (del != null)
            {
                var nwInterface = new NWInterface(inter, owns: false);
                del(nwInterface);
            }
        }