[ECOS] maybe errors?
张 亮
johnsonest@hotmail.com
Thu Jan 9 09:30:00 GMT 2003
Thank Jonathan very much!
in function in_control(...),when process comand "SIOCSIFDSTADDR",if
ia==null,malloc a addr structure,but to command SIOCSIFADDR, it seem that
ia does always not equal to NULL,why? and code:
if (ifp)
for (iap = in_ifaddrhead.tqh_first; iap; iap = iap->ia_link.tqe_next)
if (iap->ia_ifp == ifp) //
{
if (((struct sockaddr_in *)&ifr->ifr_addr)->sin_addr.s_addr ==
iap->ia_addr.sin_addr.s_addr)
{
ia = iap;
break;
}
else if (ia == NULL) //very strange
{
ia = iap;
if (ifr->ifr_addr.sa_family != AF_INET)
break;
}
}
are you sure that after this segment code,ia must be not NULL?
if ia=NULL,comand SIOCSIFADDR how to do?
I feel TCP/ip is very complex,but I want control it,could you give me some
advice?
Thank you!
BRS/johnsonest
>From: Jonathan Larmour <jifl@eCosCentric.com>
>To: ÃÃ
ÃÃ <johnsonest@hotmail.com>
>CC: ecos-discuss@sources.redhat.com
>Subject: Re: [ECOS] maybe errors?
>Date: Thu, 09 Jan 2003 07:24:35 +0000
>
>ÃÃ
ÃÃ wrote:
> >
> > Dear Gthomas,
> > thank you for your feedback!
> > I maybe find some errors in mbuf code:
> > 1:writing a completly correct function :m_copym() is difficult
> > once,I feel.
> > this function is very good sample for my learning.
> > I fell in file uipc_mbuf.c line 470:
> > if (top == NULL)
> > MCFail++;
> > is no need.it will not be executed.
> > 2:in function m_copydata(),line573:
> > code does not process the case len==M_COPYALL.
>
>You should consider using the freebsd stack port (with the template
>new_net instead of net). That's where the future development will be that
>we care about.
>
>In both these cases, I suspect it's all ok in practice simply because I
>have a lot of faith in the BSD code base, and the mbuf code has been
>looked at a lot.
>
>Or are you saying you've actually hit a problem here?
>
>Jifl
>--
>eCosCentric http://www.eCosCentric.com/ <info@eCosCentric.com>
>--[ "You can complain because roses have thorns, or you ]--
>--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine
_________________________________________________________________
Ãâ·ÃÃÃÃà MSN Explorer: http://explorer.msn.com/lccn
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list