Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 internal void NETIF_SET_HWADDRHINT(netif netif, object hint)
 {
     netif.addr_hint = hint;
 }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 4
0
 internal static void netif_input(netif netif, byte[] packet)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 5
0
 internal static void netif_input(netif netif, byte[] packet)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 6
0
 internal void NETIF_SET_HWADDRHINT(netif netif, object hint)
 {
     netif.addr_hint = hint;
 }