I can get packets in low_level_input. But after passed to ethernetif_input, they are discarded due to wrong ethhdr->type. I found out the wrong ethhdr->type is 2 bytes ahead of its proper position. I guess it's because of ETH_PAD_SIZE( in lwipopts.h: #define ETH_PAD_SIZE 2 ). I change it into 0, and ethhdr->type is right. But the packets I send are wrong at this time.
This problem sticked me for a few days, so please give me some advice!
Windows Live Writer，支持离线撰写博客内容，随时随地想写就写。 立即使用！