Esempio n. 1
0
        public ER udp6_snd_dat(ID cepid, T_IPV6EP p_dstaddr, pointer data, ushort len, TMO tmout)
        {
            ER Result = ER.E_NOEXS;
            Udp6Cep UdpCep;

            if ((data == null) || (len <= 0))
                return ER.E_PAR;

            if (g_Kernel == null)
                return ER.E_DLT;

            g_Kernel.LockCPU();
            try {
                UdpCep = g_Kernel.Nucleus.GetUdp6Cep(cepid);
                if (UdpCep == null)
                    Result = ER.E_NOEXS;
                else
                    Result = UdpCep.SendData(p_dstaddr, data, len, tmout);
            }
            finally {
                g_Kernel.UnlockCPU();
            }

            return Result;
        }
Esempio n. 2
0
        public ER udp6_rcv_dat(ID cepid, T_IPV6EP p_dstaddr, pointer data, int len, TMO tmout)
        {
            ER Result = ER.E_NOEXS;
            Udp6Cep UdpCep;

            if (g_Kernel == null)
                return ER.E_DLT;

            g_Kernel.LockCPU();
            try {
                UdpCep = g_Kernel.Nucleus.GetUdp6Cep(cepid);
                if (UdpCep == null)
                    Result = ER.E_NOEXS;
                else
                    Result = UdpCep.ReceiveData(p_dstaddr, data, len, tmout);
            }
            finally {
                g_Kernel.UnlockCPU();
            }

            return Result;
        }