lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] Re: [lwip-users] filter broadcast packet


From: Piero 74
Subject: Re: [lwip-devel] Re: [lwip-users] filter broadcast packet
Date: Fri, 25 Jan 2008 16:13:35 +0100

Hi Jonathan, thanks for your answers!

2008/1/25, Jonathan Larmour <address@hidden>:
Piero 74 wrote:
> I found up to know two important protocols which use broadcast:
>
> ARP: has its own ethernet type... it is simple to find if broadcast
> packet is arp packet
> DHCP: is based on udp: i think it is difficoult to filter in emac irq
> function
>
> Do you know other protocol? how i can check if there is dhcp packet at
> ethernet frame level?

Because of the possible presence of things like IP options, you would have
to decode each layer of packet. In which case, since that's what the stack
already does, I'm not sure you would find much gain. But it can be done.
Unless you have particular application requirements, ARP and DHCP are
mostly all the broadcasts you'd find on a typical network.

My  board will be a simple device  in a typical windows or unix network,  which  will accept tcp connection for  options programming  and upgrade, and send/receive udp packets on event.
For marketing reason it has to implement DHCP.
So my idea:
1. on bootstrap, using dhcp session for get IP -----> driver will not block broadcast packet
2. when a new IP is available, enable broadcast packet filtering, except ARP

What do you think?

But backing up a little, since the packets have to be processed by the
tcpip thread really, you may be able to do that directly from your IRQ,
rather than from another separate thread. It depends on whether your
mailbox implementation is interrupt-safe. If it is, then you could post it
to the mailbox directly.

mmmmm..... I  want to understand your suggest....

Do you suggest to me to execute code of ethernetif_input in irq function? i saw that this function answer to arp packet and send packet pbuf to mailbox using tcpip_input.
Do you think coul be possible exec this code in irq? In general i use small irq function, for fast execution (i want to have the possibility to manage other important irq, like serial or external events), i don't know if this approch could be correct... but...
- in my microcontroller, running at 70 MHz, with freertos, Irq service routine starts 2.5 micros after event; if i use task waiting signal form ISR, routine will start after 30 micros!!!
  advantage: during routine execution other irq could be served - disadvantage: a bigger delay from event to execution
- in freertos if you want to send msg in a mailbox from a irq function, you need to use a particular function (more safely)... so, i will need different implementation for sys_mbox_post (and similar)... i don't know if it's possible

ok... when you have some free time... we can discuss about issues above

bye Piero :O)

Jifl
--
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["Si fractum non sit, noli id reficere"]------       Opinions==mine


_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users


reply via email to

[Prev in Thread] Current Thread [Next in Thread]