This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ARP Support in eCos Applications


Hello,
Thanks once again for guiding us.Im having one difference of opinion about Log function.The Log function is defined in ecos packages\net\bsd_tcpip\current\include\sys\param.h as

#ifdef CYGPKG_NET_FREEBSD_LOGGING
#define log(lvl, args...) \
do { if (cyg_net_log_mask & lvl) diag_printf(args); } while (0)
:
:
#endif

where cyg_net_log_mask is defined as:

#ifdef CYGPKG_NET_FREEBSD_LOGGING
int cyg_net_log_mask = CYGPKG_NET_FREEBSD_LOGGING;
#endif
We have enabled CYGPKG_NET_FREEBSD_LOGGING macro through configuration tool while building ecos image.So I think even log should also work when you include param.h.
Give out your opinions.
Thank you all in advance.


Manoj K Abraham








----- Original Message -----
From: sebastien Couret <sebastien.couret@elios-informatique.fr>
To: Manoj Abraham <manojkabraham@india.com>, ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] ARP Support in eCos Applications
Date: Fri, 15 Oct 2004 13:50:28 +0200

> 
> On Friday 15 October 2004 09:12, Andrew Lunn wrote:
> > On Fri, Oct 15, 2004 at 02:02:26PM +0800, Manoj Abraham wrote:
> > > Hello Sebastien Couret,
> > > Thanks for the your quick reply.Sorry for the late reply as I was trying
> > > with the AddMAC and DelMAC code what was suggested by you.But we have
> > > faced some problems while compiling. These are errors after compiling:
> > >
> > > $powerpc-eabi-gcc -c -DECOS _I /working/ppc/Infra_install/include -I
> > > /devel/5X-Pilot/src/ -L /working/ppc/Infra_install/lib/ IpStack.cpp
> > > -Ttarget.ld -nostdlib
> > >
> > > IpStack.cpp:191: `LOG_ERR' undeclared (first use this function)
> > > IpStack.cpp:191: (Each undeclared identifier is reported only once for
> > > each function it appears in.)
> > > IpStack.cpp:191: `LOG' undeclared (first use this function)
> > > IpStack.cpp:207: `LOG_INFO' undeclared (first use this function)
> > > IpStack.cpp:207: pointer to a function used in arithmetic
> > > IpStack.cpp:211: `log' undeclared (first use this function)
> > > IpStack.cpp:237: parse error before `/' token
> >
> > These are not standard eCos features. You will need to replace them
> > with diag_printf or what ever you use your log/debug output.
> >
> >         Andrew
> 
> Hello Mr Manoj Abraham, 
> Andrew is perfectly right, LOG and LOG_INFO, LOG_ERR ... are macros of my 
> own ... you could use diag_printf instead to emit a message .
> 
> For example ,  replace
> "LOG("DelMAC",LOG_ERR,"Unknown error %d:%s",errno,strerror(errno));"
> by
> diag_printf("Unknown error %d:%s",errno,strerror(errno));
> 
> Sorry, I forgot that point in my last mail...
> Have a nice day
> 
> -- 
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
> 
> 

-- 
India.com free e-mail - www.india.com. 
Check out our value-added Premium features, such as an extra 20MB for mail storage, POP3, e-mail forwarding, and ads-free mailboxes!

Powered by Outblaze

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]