internal static err_t output(netif netif, pbuf p, ip_addr src, ip_addr dest, byte proto) { int pos = 0, rest = p.tot_len; byte[] packet = new byte[rest]; ip_addr srch = new ip_addr(lwip.lwip_ntohl(src.addr)); ip_addr desth = new ip_addr(lwip.lwip_ntohl(dest.addr)); for (pbuf q = p; q != null; q = q.next) { int len = rest; if (len > q.len) { len = q.len; } Buffer.BlockCopy(q.payload.data, q.payload.offset, packet, pos, len); pos += len; rest -= len; } netif.m_output(netif, packet, srch, desth, proto); return(err_t.ERR_OK); }
internal void NETIF_SET_HWADDRHINT(netif netif, object hint) { netif.addr_hint = hint; }
internal static err_t output(netif netif, pbuf p, ip_addr src, ip_addr dest, byte proto) { int pos = 0, rest = p.tot_len; byte[] packet = new byte[rest]; ip_addr srch = new ip_addr(lwip.lwip_ntohl(src.addr)); ip_addr desth = new ip_addr(lwip.lwip_ntohl(dest.addr)); for (pbuf q = p; q != null; q = q.next) { int len = rest; if (len > q.len) len = q.len; Buffer.BlockCopy(q.payload.data, q.payload.offset, packet, pos, len); pos += len; rest -= len; } netif.m_output(netif, packet, srch, desth, proto); return err_t.ERR_OK; }
internal static void netif_input(netif netif, byte[] packet) { throw new NotImplementedException(); }