Skip to content
  • Gabe Black's avatar
    netboot: Move some netboot interfaces around. · 00e52f8f
    Gabe Black authored
    
    
    Instead of having the code which controls who gets outgoing or incoming
    packets in the netboot directory, this change moves some of it to be alongside
    uip in src/net, and some of it to be in src/drivers/net alongside future drivers.
    
    The code in src/net is essentially the same as what used to be in
    appcall.[hc]. In its new location it's bundled together with the bulk of uip,
    making it available to any future consumer of the network stack.
    
    The code that lets uip send packets through a network device was moved into
    src/drivers/net. This has two advantages. First, it means that this code is
    associated with the network drivers it provides access to instead of the
    netbooting code which isn't really involved at that level. Second, it makes it
    easy to flesh out the functionality a network driver can provide.
    
    The interface now has functions to read the MAC, send a packet, receive a
    packet if one's available, and checking if the device is ready to send/receive
    right now.
    
    The uip stack continues to use the "uip" class in the Makefiles because it
    needs a flag to disable strict alias checking. The rest of the code, including
    the code managing the callback and the network drivers, go in a "net" class.
    Anything that wants to use networking will build in those two classes.
    
    BUG=chrome-os-partner:16957
    TEST=Built the netboot payload for Link.
    BRANCH=None
    
    Change-Id: I2734ba376efad6140b4126ad4bfae7e8ba811d78
    Signed-off-by: default avatarGabe Black <gabeblack@google.com>
    Reviewed-on: https://gerrit-int.chromium.org/32730
    00e52f8f