I'm planning to port lwIP into a new system. I want to use the raw API with no OS. I will need to write a new ethernet NIC driver and I just want to make sure I completely understand the driver model (I find the documentation available on this subject rather confusing). I would appreciate it if someone could confirm the assumptions here, or explain where I'm off base.
1. The function ethernet_input should be called to introduce new packets into the lwip stack. (Or, more specifically, it appears that my framework should specify ethernet_input in the netif_add call as the input function; then the driver should call netif->input.) 2. Interrupt handler *may* call pbuf_alloc or mem*_alloc in interrupt context (with an appropriate definition of sys_arch_protect) but should not call ethernet_input if there is any chance that other code in the stack is already executing. 3. Hence, practically speaking, the interrupt handler will need to defer actually introducing packets into the stack until the main polling loop. Thanks a lot, Jeff _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
