• Thomas Markwalder's avatar
    [#42,!103] Initial receiver thread and packet queuing · 21cac7d0
    Thomas Markwalder authored
    New files:
        src/lib/dhcp -
        packet_queue.h - defines packet queuing template classes
        socket_info.h - contains existing class extracted iface_mgr.h
        tests/packet_queue4_unittest.cc
        tests/packet_queue6_unittest.cc
    
    src/lib/dhcp/iface_mgr.*
    IfaceMgr:: - new functions
        - receiveDHCP<4/6>Packets() - thread worker function which
        monitors interface sockets, enqueues packets as they are read
    
        - receiveDHCP<4/6>Packet() - reads a single packet from a socket
    
        - startDHCPReceiver(const uint16_t family) - runs
        receiveDHCP<4/6?appropriate worker function in a thread
    
        - stopReceiver() - stops the receiver thread
    
        - setPacketQueue<4/6> - replaces the default packet queue instance
    
        receiveDHCP<4/6>() - modified to monitor receiver watch
        socekts rather than interface sockets.  Dequeue packets
        from packet queue.
    
    src/lib/dhcp/tests/iface_mgr_unittest.cc
        TEST_F(IfaceMgrTest, packetQueue4)
        TEST_F(IfaceMgrTest, packetQueue6)
    
    src/lib/dhcpsrv/cfg_iface.cc
        CfgIface::openSockets() - starts DHCP receiver
        CfgIface::closeSockets() - stops DHCP receiver
    21cac7d0
database_connection_unittest.cc 9.21 KB