1. 05 Nov, 2018 2 commits
    • Thomas Markwalder's avatar
      [#42] Replaced use of QueueControl with ElementPtr · 4dc3ba6b
      Thomas Markwalder authored
      deleted:
          src/lib/dhcp/queue_control.cc
      	src/lib/dhcp/queue_control.h
      	src/lib/dhcp/tests/queue_control_unittest.cc
      
      Updates is mulitple files
      4dc3ba6b
    • Thomas Markwalder's avatar
      [#42] Implemented PacketQueueMgr class · 90fd7ebf
      Thomas Markwalder authored
      New files:
          src/lib/dhcp/packet_queue_mgr.h
          src/lib/dhcp/packet_queue_mgr4.cc
          src/lib/dhcp/packet_queue_mgr4.h
          src/lib/dhcp/packet_queue_mgr6.cc
          src/lib/dhcp/packet_queue_mgr6.h
          src/lib/dhcp/tests/packet_queue_mgr4_unittest.cc
          src/lib/dhcp/tests/packet_queue_mgr6_unittest.cc
          src/lib/dhcp/tests/packet_queue_testutils.h
      
      src/bin/dhcp4/ctrl_dhcp4_srv.cc
          Cleaned up packet queue config block
      
      src/bin/dhcp4/dhcp4_lexer.ll
      src/bin/dhcp4/dhcp4_parser.yy
      src/bin/dhcp4/tests/config_parser_unittest.cc
          added queue-type
      
      src/bin/dhcp4/dhcp4_messages.mes
          added DHCP4_CONFIG_PACKET_QUEUE message
      
      src/lib/dhcp/Makefile.am
          packet_queue_mgr.h
          packet_queue_mgr4.cc packet_queue_mgr4.h
          packet_queue_mgr6.cc packet_queue_mgr6.h
      
      src/lib/dhcp/iface_mgr.*
          Replaced packet queue members with PQM members
          Added PQM instantion to IfaceMgr ctor
      
      src/lib/dhcp/packet_queue.h
          added getInfo,getInfoStr
      
      src/lib/dhcp/tests/Makefile.am
          packet_queue_mgr4_unittest.cc
          packet_queue_mgr6_unittest.cc
      
      src/lib/dhcpsrv/parsers/queue_control_parser.cc
          added queue-type
      90fd7ebf
  2. 01 Nov, 2018 1 commit
    • Thomas Markwalder's avatar
      [#42, !103] Interrim commit, kea-dhcp4 supports "queue-control" · 036d249f
      Thomas Markwalder authored
          kea-dhcp4 will parse and use "queue-control" to configure ring
          buffer size:
      
          "Dhcp4":
          {
              "queue-control": {
                  # max number of packets the ring will hold
                  "capacity" : 100
              },
          :
      
          This is an interrim commit for testing purposes.
          Expect a fair amount of refactoring in subsequent commits.
      
      New files:
      	src/lib/dhcp/queue_control.cc
      	src/lib/dhcp/queue_control.h
      	src/lib/dhcp/tests/queue_control_unittest.cc
      	src/lib/dhcpsrv/parsers/queue_control_parser.cc
      	src/lib/dhcpsrv/parsers/queue_control_parser.h
      
      src/bin/dhcp4/ctrl_dhcp4_srv.cc
          ControlledDhcpv4Srv::processConfig() -
              added logic to set packet queue controller
      
      src/bin/dhcp4/dhcp4_lexer.ll b/src/bin/dhcp4/dhcp4_lexer.ll
      src/bin/dhcp4/dhcp4_parser.yy
      src/bin/dhcp4/parser_context.*
          Added queue-control parsing
      
      src/bin/dhcp4/json_config_parser.cc
          configureDhcp4Server() - recognize and parse "queue-control"
      
      src/bin/dhcp4/tests/config_parser_unittest.cc
          TEST_F(Dhcp4ParserTest, queueControl)
          TEST_F(Dhcp4ParserTest, queueControlInvalid)
          - new tests
      
      src/lib/dhcp/iface_mgr.*
          IfaceMgr::getPacketQueueControl4()
          IfaceMgr::setPacketQueueControl4()
          IfaceMgr::getPacketQueueControl6()
          IfaceMgr::setPacketQueueControl6()
      
      src/lib/dhcp/packet_queue.*
          Use QueueControl class
      
      src/lib/dhcpsrv/srv_config.*
          Added QueueControl member, getter/setter
          SrvConfig::toElement() - now emits queue-control if not null
      036d249f
  3. 29 Oct, 2018 1 commit
    • 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
  4. 19 Oct, 2018 17 commits
  5. 18 Oct, 2018 19 commits