* [ECOS] lwip eth doubt........
@ 2005-05-25 7:53 rpai
2005-05-25 12:44 ` [ECOS] " Jani Monoses
0 siblings, 1 reply; 2+ messages in thread
From: rpai @ 2005-05-25 7:53 UTC (permalink / raw)
To: ecos-discuss
hello...
we are in way of creating a firewall application... we are doing
with lwip stack.. .as there is no routing support we are way to
make it..
we are unable to find , how the 2 eths are to be initalized as done
in bsd ..
can u tell me is there any flag to b removed to get 2 eths initalized
.. this came into mind when we were looking this function in init.c
file in net/lwip/src directory...
the code is as........
*************************
static void
init_hw_drivers(void)
{
cyg_netdevtab_entry_t *t;
for (t = &__NETDEVTAB__[0]; t != &__NETDEVTAB_END__; t++) {
diag_printf("H/W device name:%s\n",t->name);
if (t->init(t)) {
t->status = CYG_NETDEVTAB_STATUS_AVAIL;
} else {
// What to do if device init fails?
t->status = 0; // Device not [currently] available
}
}
}
*************8
this loop is executing only once.....
can u tlell me the logic behind and wht to do to get it move 2 times to
detect eth1 also...
if this is also over the routing part my project will b over....
some doucmentation also will b usefule to us
plze....... do help..
Regards
Pai
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 2+ messages in thread
* [ECOS] Re: lwip eth doubt........
2005-05-25 7:53 [ECOS] lwip eth doubt rpai
@ 2005-05-25 12:44 ` Jani Monoses
0 siblings, 0 replies; 2+ messages in thread
From: Jani Monoses @ 2005-05-25 12:44 UTC (permalink / raw)
To: ecos-discuss
>
> the code is as........
> *************************
> static void
> init_hw_drivers(void)
> {
>
> cyg_netdevtab_entry_t *t;
>
> for (t = &__NETDEVTAB__[0]; t != &__NETDEVTAB_END__; t++) {
> diag_printf("H/W device name:%s\n",t->name);
> if (t->init(t)) {
> t->status = CYG_NETDEVTAB_STATUS_AVAIL;
> } else {
> // What to do if device init fails?
> t->status = 0; // Device not [currently] available
> }
> }
>
Do you have two NETDEVTAB_ENTRY-s in you platforms devs/eth sources?
Another point is that lwip has IP_ADDRs configurable in the CDL but it assumes there's one
interface only
You'll have to modify the lwip_set_addr() function to cope with multiple interfaces.
When it works send a patch :)
There no documentation other than the code, but make sure you read io/eth/current/src/lwip
as well to understand how initialization takes place
Jani
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-05-25 9:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-25 7:53 [ECOS] lwip eth doubt rpai
2005-05-25 12:44 ` [ECOS] " Jani Monoses
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).