Closed vkottler closed 7 years ago
Code that interacts with LwIP interface functions
Wireshark is relatively easy to use. Simply install and begin monitoring network traffic on your ethernet interface. If the network setup is the same as described above it should be reasonably easy to see all traffic.
it's working
Most immediate action item: figure out how to enable all forms of print debugging.
The way we are using it, all of our implementation code is in
middleware/conf
.ethernetif.c
:Code that does all of the heavy-lifting is here.
low_level_output
andlow_level_input
are the functions that interact with the Ethernet controller and it's DMA instance.low_level_output
gets linked to thestruct netif *
butlow_level_input
is only called byethernetif_input
and it seems thatethernetif_input
is exclusively a user-called function. This function callsnetif->input(p, netif)
which performs the "LwIP higher-layer protocol processing" on the packet. From there if it determines what kind of packet it is and calls additional input processing functions, I think that would make sense but at this point in time I'm not sure.I'm mainly confused how any higher-level protocol implementation operates without direct access to the
low_level_input
andethernetif_input
functions.This entire file is largely copied from the example in STM32F7 Cube example.
ethernetif.h
:Exported functions and variables live here.
lwipopts.h
:Controls what gets compiled across the LwIP codebase. Heavy modifications have been made to this file but certain settings likely need to be modified.
lwipopts_conf.h
:Copied, I'm not entirely sure what should go here.
arch/cc.h
:Copied, appears to be compiler boiler-plating.
The ideal network debugging setup involves a local network (i.e. no up-link to greater internet) with a single computer and a single Nucleo 144 as the nodes on the network. A router with a DHCP server is the ideal network-managing entity in this scenario.