Changeset 40970de in nscp for modules/NRPEServer


Ignore:
Timestamp:
02/11/10 19:44:30 (3 years ago)
Author:
Michael Medin <michael@…>
Branches:
master, 0.4.0, 0.4.1, 0.4.2
Children:
47bcf6f
Parents:
1d4878e
Message:

Preliminary NSCA support (much is hard coded right now so only a PoC not a finished concept)

Location:
modules/NRPEServer
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • modules/NRPEServer/CMakeLists.txt

    r3080680 r40970de  
    1414  nrpe_connection.cpp 
    1515  nrpe_handler.cpp 
    16   ${NSCP_INCLUDE_PATH}/nrpe/nrpepacket.cpp 
     16  ${NSCP_INCLUDE_PATH}/nrpe/nrpe_packet.cpp 
    1717 
    1818  ${NSCP_DEF_PLUGIN_CPP} 
     
    3030    nrpe_handler.hpp 
    3131    nrpe_parser.hpp 
    32     ${NSCP_INCLUDE_PATH}/nrpe/nrpepacket.hpp 
    3332    ${NSCP_INCLUDE_PATH}/socket_helpers.hpp 
     33    ${NSCP_INCLUDE_PATH}/nrpe/nrpe_packet.hpp 
     34    ${NSCP_INCLUDE_PATH}/swap_bytes.hpp 
    3435 
    3536    ${NSCP_DEF_PLUGIN_HPP} 
  • modules/NRPEServer/nrpe_connection.cpp

    rf6fbf6f r40970de  
    4141          boost::tie(result, begin) = parser_.digest(begin, end); 
    4242          if (begin == old_begin) { 
    43             std::cout << "Whoops, this is wrong..."; 
     43            handler_.create_error(_T("Something strange happened...")); 
    4444            return; 
    4545          } 
  • modules/NRPEServer/nrpe_handler.hpp

    rf6fbf6f r40970de  
    1 #include <nrpe/nrpepacket.hpp> 
     1#include <nrpe/nrpe_packet.hpp> 
    22#include <boost/tuple/tuple.hpp> 
    33 
  • modules/NRPEServer/nrpe_parser.hpp

    rf6fbf6f r40970de  
    1 #include <nrpe/nrpepacket.hpp> 
     1#include <nrpe/nrpe_packet.hpp> 
    22#include <boost/tuple/tuple.hpp> 
    33#include <boost/noncopyable.hpp> 
     
    1313        : payload_length_(payload_length) 
    1414        , packet_length_(nrpe::length::get_packet_length(payload_length)) 
    15       { 
    16         std::cout << "== ctor length: " << payload_length_ << "/" << packet_length_ << std::endl; 
    17       } 
     15      {} 
    1816 
    1917      template <typename InputIterator> 
    2018      boost::tuple<bool, InputIterator> digest(InputIterator begin, InputIterator end) { 
    21         std::cout << "== Parsing: " << payload_length_ << "/" << packet_length_ << std::endl; 
    2219        int count = packet_length_ - buffer_.size(); 
    23         std::cout << "Bytes already: " << buffer_.size() << ", need more: " << count << " got: " << (end-begin) << std::endl; 
    2420        for (; count > 0&& begin != end; ++begin, --count) 
    2521          buffer_.push_back(*begin); 
     
    3531        payload_length_ = length; 
    3632        packet_length_ = nrpe::length::get_packet_length(length); 
    37         std::cout << "== Setting length: " << payload_length_ << "/" << packet_length_ << std::endl; 
    3833      } 
    3934    }; 
  • modules/NRPEServer/stdafx.h

    rf029bc2 r40970de  
    4848#include <NSCHelper.h> 
    4949#include <nsc_module_wrapper.hpp> 
    50 #include <nrpe/nrpepacket.hpp> 
     50#include <nrpe/nrpe_packet.hpp> 
    5151 
Note: See TracChangeset for help on using the changeset viewer.