From: tho Date: Mon, 18 Oct 2010 16:13:56 +0000 (+0000) Subject: cleaned up some include dependencies X-Git-Url: http://g0dil.de/git?p=senf.git;a=commitdiff_plain;h=61b2e2ea5cb50df90931acf3fcd840493ba762a9 cleaned up some include dependencies git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1736 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/PPI/Connectors.cc b/senf/PPI/Connectors.cc index 485312d..6181eb9 100644 --- a/senf/PPI/Connectors.cc +++ b/senf/PPI/Connectors.cc @@ -27,10 +27,8 @@ #include "Connectors.ih" // Custom includes -#include "Route.hh" -#include "Module.hh" #include "ModuleManager.hh" -#include +#include //#include "Connectors.mpp" #define prefix_ diff --git a/senf/PPI/ModuleManager.cc b/senf/PPI/ModuleManager.cc index 2bc9295..bafcb48 100644 --- a/senf/PPI/ModuleManager.cc +++ b/senf/PPI/ModuleManager.cc @@ -30,7 +30,8 @@ #include #include #include "Module.hh" -#include +#include +#include //#include "ModuleManager.mpp" #define prefix_ diff --git a/senf/PPI/QueueingSocketSink.cc b/senf/PPI/QueueingSocketSink.cc index d01ee8b..7d0dc86 100644 --- a/senf/PPI/QueueingSocketSink.cc +++ b/senf/PPI/QueueingSocketSink.cc @@ -28,6 +28,7 @@ //#include "QueueingSocketSink.ih" // Custom includes +#include #define prefix_ ///////////////////////////////cc.p//////////////////////////////////////// diff --git a/senf/PPI/QueueingSocketSink.ct b/senf/PPI/QueueingSocketSink.ct index 6a1e831..b20a961 100644 --- a/senf/PPI/QueueingSocketSink.ct +++ b/senf/PPI/QueueingSocketSink.ct @@ -26,6 +26,7 @@ //#include "QueueingSocketSink.ih" // Custom includes +#include #define prefix_ ///////////////////////////////ct.p//////////////////////////////////////// @@ -77,6 +78,15 @@ prefix_ senf::ppi::module::PassiveQueueingSocketSink::PassiveQueueingSoc } template +prefix_ void senf::ppi::module::PassiveQueueingSocketSink::handle(Handle const & handle) +{ + handle_ = handle; + event_.set( handle_, IOEvent::Write); + qAlgo_->clear(); + checkThrottle(); +} + +template prefix_ void senf::ppi::module::PassiveQueueingSocketSink::write() { PacketType p ( input()); diff --git a/senf/PPI/QueueingSocketSink.cti b/senf/PPI/QueueingSocketSink.cti index c131ab7..2d43930 100644 --- a/senf/PPI/QueueingSocketSink.cti +++ b/senf/PPI/QueueingSocketSink.cti @@ -56,15 +56,6 @@ prefix_ typename Writer::Handle & senf::ppi::module::PassiveQueueingSocketSink -prefix_ void senf::ppi::module::PassiveQueueingSocketSink::handle(Handle const & handle) -{ - handle_ = handle; - event_.set( handle_, IOEvent::Write); - qAlgo_->clear(); - checkThrottle(); -} - -template prefix_ senf::ppi::QueueingAlgorithm & senf::ppi::module::PassiveQueueingSocketSink::qAlgorithm() { return *qAlgo_; diff --git a/senf/PPI/QueueingSocketSink.hh b/senf/PPI/QueueingSocketSink.hh index 6d6ed8d..9bfc88d 100644 --- a/senf/PPI/QueueingSocketSink.hh +++ b/senf/PPI/QueueingSocketSink.hh @@ -29,7 +29,7 @@ // Custom includes #include #include "SocketSink.hh" -#include +#include //#include "QueueingSocketSink.mpp" ///////////////////////////////hh.p//////////////////////////////////////// diff --git a/senf/Scheduler/ClockService.cc b/senf/Scheduler/ClockService.cc index 36ffdd4..0ce6113 100644 --- a/senf/Scheduler/ClockService.cc +++ b/senf/Scheduler/ClockService.cc @@ -28,7 +28,7 @@ // Custom includes #include -#include +#include //#include "ClockService.mpp" #define prefix_ diff --git a/senf/Scheduler/EventManager.cc b/senf/Scheduler/EventManager.cc index 3f755af..52a6498 100644 --- a/senf/Scheduler/EventManager.cc +++ b/senf/Scheduler/EventManager.cc @@ -29,7 +29,9 @@ // Custom includes #include #include -#include +#include +#include +#include #include "FIFORunner.hh" //#include "EventManager.mpp" diff --git a/senf/Scheduler/TimerEventProxy.ct b/senf/Scheduler/TimerEventProxy.ct index a1c744a..2758e8a 100644 --- a/senf/Scheduler/TimerEventProxy.ct +++ b/senf/Scheduler/TimerEventProxy.ct @@ -25,6 +25,7 @@ \brief TimerEventProxy non-inline template implementation */ // Custom includes +#include #define prefix_ ///////////////////////////////ct.p//////////////////////////////////////// diff --git a/senf/Scheduler/TimerEventProxy.hh b/senf/Scheduler/TimerEventProxy.hh index 75c4f8c..09c900b 100644 --- a/senf/Scheduler/TimerEventProxy.hh +++ b/senf/Scheduler/TimerEventProxy.hh @@ -34,7 +34,6 @@ #include #include -#include ///////////////////////////////hh.p//////////////////////////////////////// namespace senf { diff --git a/senf/Socket/ProtocolClientSocketHandle.hh b/senf/Socket/ProtocolClientSocketHandle.hh index 8492e3b..00f4b37 100644 --- a/senf/Socket/ProtocolClientSocketHandle.hh +++ b/senf/Socket/ProtocolClientSocketHandle.hh @@ -88,10 +88,9 @@ namespace senf { /** \brief Create uninitialized socket variable - This special constructor is called when passing - ProtocolClientSocketHandle::Uninitialized as only argument to the constructor. This will - create an in-\ref valid() socket handle which can however be assigned later with another - socket instance. + This special constructor is called when passing \c senf::noinit as only argument to + the constructor. This will create an in-\ref valid() socket handle which can however + be assigned later with another socket instance. \implementation The socket handle will have no \c body allocated. */ @@ -100,11 +99,11 @@ namespace senf { ///@} /////////////////////////////////////////////////////////////////////////// - Protocol & protocol(); ///< Access the protocol interface + Protocol & protocol(); ///< Access the protocol interface /**< The returned protocol class reference gives access to - the complete protocol interface as defined by that - class. See the respective protocol class documentation. - \returns \a Protocol class reference */ + the complete protocol interface as defined by that + class. See the respective protocol class documentation. + \returns \a Protocol class reference */ static ProtocolClientSocketHandle cast_static(FileHandle handle); static ProtocolClientSocketHandle cast_dynamic(FileHandle handle); diff --git a/senf/Socket/Protocols/DVB/DVBProtocolWrapper.cc b/senf/Socket/Protocols/DVB/DVBProtocolWrapper.cc index d8fdb6c..184305d 100644 --- a/senf/Socket/Protocols/DVB/DVBProtocolWrapper.cc +++ b/senf/Socket/Protocols/DVB/DVBProtocolWrapper.cc @@ -26,6 +26,8 @@ #include "DVBProtocolWrapper.hh" // Custom includes +#include +#include #define prefix_ ///////////////////////////////cc.p//////////////////////////////////////// diff --git a/senf/Socket/Protocols/DVB/DVBProtocolWrapper.hh b/senf/Socket/Protocols/DVB/DVBProtocolWrapper.hh index 46848fb..e028bbc 100644 --- a/senf/Socket/Protocols/DVB/DVBProtocolWrapper.hh +++ b/senf/Socket/Protocols/DVB/DVBProtocolWrapper.hh @@ -25,7 +25,8 @@ #define HH_SENF_Socket_Protocols_DVB_DVBProtocolWrapper_ 1 // Custom includes -#include +#include +#include #include "DVBDemuxHandles.hh" ///////////////////////////////hh.p//////////////////////////////////////// diff --git a/senf/Socket/Protocols/DVB/DVBSocketController.cc b/senf/Socket/Protocols/DVB/DVBSocketController.cc index 0f4ddcb..2d9181a 100644 --- a/senf/Socket/Protocols/DVB/DVBSocketController.cc +++ b/senf/Socket/Protocols/DVB/DVBSocketController.cc @@ -30,13 +30,13 @@ #include #include #include +#include #include +#include "DVBProtocolWrapper.hh" #define prefix_ ///////////////////////////////cc.p//////////////////////////////////////// -using namespace std; - unsigned int senf::DVBSocketController::controllerNr(0); senf::DVBSocketController::DVBSocketController(DVBFrontendHandle frontendHandle_, @@ -96,12 +96,12 @@ prefix_ void senf::DVBSocketController::addToConsole(senf::DVBDemuxPESHandle sh) pesNr++; } -prefix_ void senf::DVBSocketController::tuneToCMD(const string & input, const string & mode) +prefix_ void senf::DVBSocketController::tuneToCMD(std::string const & input, std::string const & mode) { struct dvb_frontend_parameters frontend; // no valid configline, so it will be treaten like a channel name - if (input.find(":")==string::npos) + if (input.find(":") == std::string::npos) { if (mode.c_str()[0]=='a') tuneTo(input); @@ -155,11 +155,11 @@ prefix_ void senf::DVBSocketController::tuneToCMD(const string & input, const st } } -prefix_ void senf::DVBSocketController::tuneTo(const string & channel) +prefix_ void senf::DVBSocketController::tuneTo(std::string const & channel) { struct dvb_frontend_parameters frontend; - string configLine = parser.getConfigLine(channel); + std::string configLine = parser.getConfigLine(channel); frontend = parser.getFrontendParam(configLine); switch (type) { @@ -244,11 +244,11 @@ prefix_ void senf::DVBSocketController::tuneDVB_C(unsigned int frequency, frontendHandle.protocol().tuneDVB_C(frequency, inversion, symbol_rate, fec_inner, modulation); } -prefix_ dvb_frontend_event senf::DVBSocketController::tuneTo_sync(const string & channel) +prefix_ dvb_frontend_event senf::DVBSocketController::tuneTo_sync(std::string const & channel) { struct dvb_frontend_parameters frontend; dvb_frontend_event ev; - string configLine = parser.getConfigLine(channel); + std::string configLine = parser.getConfigLine(channel); frontend = parser.getFrontendParam(configLine); switch (type) { @@ -351,7 +351,7 @@ prefix_ dvb_frontend_event senf::DVBSocketController::tuneDVB_C_sync(unsigned in } -prefix_ string senf::DVBSocketController::getTypeString() +prefix_ std::string senf::DVBSocketController::getTypeString() { switch (type) { case FE_QPSK: @@ -380,10 +380,10 @@ prefix_ unsigned int senf::DVBSocketController::signalStrength() return frontendHandle.protocol().signalStrength(); } -prefix_ string senf::DVBSocketController::getTuneInfo(const string & conf) +prefix_ std::string senf::DVBSocketController::getTuneInfo(std::string const & conf) { const char* cConf = conf.c_str(); - stringstream info; + std::stringstream info; fe_status_t status; frontendHandle.protocol().setNonBlock(false); @@ -395,7 +395,7 @@ prefix_ string senf::DVBSocketController::getTuneInfo(const string & conf) ber = frontendHandle.protocol().bitErrorRate(); uncorrected_blocks = frontendHandle.protocol().uncorrectedBlocks(); - info << hex; + info << std::hex; for (unsigned int i = 0; i < conf.size(); ++i) { if (i>0) @@ -423,9 +423,9 @@ prefix_ string senf::DVBSocketController::getTuneInfo(const string & conf) return info.str(); } -prefix_ string senf::DVBSocketController::status2String(fe_status_t status) +prefix_ std::string senf::DVBSocketController::status2String(fe_status_t status) { - string s(""); + std::string s(""); if (status & FE_HAS_LOCK) return s += "HAS LOCK"; if (status & FE_HAS_CARRIER) @@ -444,8 +444,6 @@ prefix_ string senf::DVBSocketController::status2String(fe_status_t status) return s; } - - prefix_ fe_type_t senf::DVBSocketController::getType() { return type; diff --git a/senf/Socket/Protocols/DVB/DVBSocketController.hh b/senf/Socket/Protocols/DVB/DVBSocketController.hh index 92a684e..3cf9e5a 100644 --- a/senf/Socket/Protocols/DVB/DVBSocketController.hh +++ b/senf/Socket/Protocols/DVB/DVBSocketController.hh @@ -30,14 +30,14 @@ #include "DVBFrontendHandle.hh" #include "DVBDemuxHandles.hh" #include "DVBConfigParser.hh" -#include "DVBProtocolWrapper.hh" -#include -#include - -#define MPE_TABLEID 62 +#include +#include +///////////////////////////////hh.p//////////////////////////////////////// namespace senf { +#define MPE_TABLEID 62 + /** \brief Helperclass for configuration and controlling DVB devices. The DVB API provides two methods for tuning. The first method is @@ -53,14 +53,11 @@ namespace senf { You have to find out which parts of these functionality are implemented by your preferred device driver by your own. */ - - - class DVBSocketController : boost::noncopyable { public: - senf::console::ScopedDirectory dir; + console::ScopedDirectory dir; typedef boost::function Callback; ///< Callback which is called when an asynchronous tuning succeeds. @@ -68,10 +65,10 @@ public: DVBSocketController(DVBFrontendHandle frontendHandle_ = DVBFrontendHandle(0,0), const Callback & cb = NULL); ~DVBSocketController(); - senf::DVBDemuxSectionHandle createDVBDemuxSectionHandle( int adapternumber=0, int demuxnumber=0, bool addToConsole=false ); - senf::DVBDemuxPESHandle createDVBDemuxPESHandle( int adapternumber=0, int demuxnumber=0, bool addToConsole=false ); + DVBDemuxSectionHandle createDVBDemuxSectionHandle( int adapternumber=0, int demuxnumber=0, bool addToConsole=false ); + DVBDemuxPESHandle createDVBDemuxPESHandle( int adapternumber=0, int demuxnumber=0, bool addToConsole=false ); - void addToConsole(senf::DVBDemuxSectionHandle sh); + void addToConsole(DVBDemuxSectionHandle sh); ///< Adds an DVBDemuxSectionHandle to the console /**< Allocates the functionality of DVBDemuxSectionProtocol into the folder of the DVBSocketController. If the @@ -79,7 +76,7 @@ public: console support will automatically removed. \param[in] sh handle of a protocol*/ - void addToConsole(senf::DVBDemuxPESHandle sh); + void addToConsole(DVBDemuxPESHandle sh); ///< Adds an DVBDemuxPESHandle to the console /**< Allocates the functionality of DVBDemuxPESProtocol into the folder of the DVBSocketController. If the protocol @@ -87,7 +84,7 @@ public: support will automatically removed. \param[in] sh handle of a protocol*/ - void tuneToCMD( const std::string & input, const std::string & mode = "async"); + void tuneToCMD(std::string const & input, std::string const & mode = "async"); ///< Tunes a DVB device given by the type of the DVBFrontendHandle /**< Tunes a DVB device by a channel name or complete configuration line. This method was created for use @@ -97,7 +94,7 @@ public: it would be searched in the config file. \param[in] mode The mode in which it will tune "sync" or "async"*/ - void tuneTo(const std::string & channel); + void tuneTo(std::string const & channel); ///< Tunes a DVB device to a channel /**< Tunes a DVB device to a channel whose parameters are stored in a config file. The method determines @@ -129,7 +126,7 @@ public: /**< Tunes a DVB-C device in asynchronous mode and calls the callback if existing. Needs full configuration. */ - dvb_frontend_event tuneTo_sync( const std::string & channel ); + dvb_frontend_event tuneTo_sync(std::string const & channel ); ///< Tunes a DVB device given by the type of the DVBFrontendHandle /**< Tunes a DVB device, given by the type of the DVBFrontendHandle, by a channel name in synchronous mode @@ -139,7 +136,7 @@ public: \note The member "dvb_frontend_event.status" should be correct by the most device driver implementations. But "dvb_frontend_event.parameters" maybe not and is - definitly not set by: Cinergy T� (2.6.27), + definitely not set by: Cinergy T� (2.6.27), Terratec Cinergy DT USB XS Diversity (2.6.27) */ dvb_frontend_event tuneDVB_S_sync(unsigned int frequency, fe_spectral_inversion_t inversion, unsigned int symbole_rate, fe_code_rate_t code_rate); @@ -149,7 +146,7 @@ public: \note The member "dvb_frontend_event.status" should be correct by the most device driver implementations. But "dvb_frontend_event.parameters" maybe not and is - definitly not set by: Cinergy T� (2.6.27), + definitely not set by: Cinergy T� (2.6.27), Terratec Cinergy DT USB XS Diversity (2.6.27) */ dvb_frontend_event tuneDVB_T_sync(unsigned int frequency, @@ -167,7 +164,7 @@ public: \note The member "dvb_frontend_event.status" should be correct by the most device driver implementations. But "dvb_frontend_event.parameters" maybe not and is - definitly not set by: Cinergy T� (2.6.27), + definitely not set by: Cinergy T� (2.6.27), Terratec Cinergy DT USB XS Diversity (2.6.27) */ dvb_frontend_event tuneDVB_C_sync(unsigned int frequency, @@ -179,7 +176,7 @@ public: \note The member "dvb_frontend_event.status" should be correct by the most device driver implementations. But "dvb_frontend_event.parameters" maybe not and is - definitly not set by: Cinergy T� (2.6.27), + definitely not set by: Cinergy T� (2.6.27), Terratec Cinergy DT USB XS Diversity (2.6.27) */ fe_type_t getType(); ///< Returns the type of the card. The type is defined in frontend.h @@ -216,10 +213,10 @@ public: std::string getTuneInfo(const std::string & conf ="Ssbuf"); ///< Returns a string which shows actual tuning status /**<
"S" prints signal strength (in hex) -
"s" prints singal to noise ration (in hex) +
"s" prints signal to noise ration (in hex)
"b" prints bit error rate (in hex)
"u" prints uncorrected blocks (in hex) -
"f" prints readable overal status e.g. "Has Lock"
+
"f" prints readable overall status e.g. "Has Lock"
These characters can be used to form the output. Be aware, some features may not be supported be your current driver implementation and could end in throwing @@ -232,10 +229,15 @@ private: static unsigned int controllerNr; unsigned int sectionNr; unsigned int pesNr; - senf::scheduler::FdEvent event; + scheduler::FdEvent event; void readEvent(int i); void initConsole(); }; } + +///////////////////////////////hh.e//////////////////////////////////////// +//#include "DVBSocketController.cci" +//#include "DVBSocketController.ct" +//#include "DVBSocketController.cti" #endif diff --git a/senf/Socket/Protocols/INet/INet6Address.cc b/senf/Socket/Protocols/INet/INet6Address.cc index eddc78b..9319489 100644 --- a/senf/Socket/Protocols/INet/INet6Address.cc +++ b/senf/Socket/Protocols/INet/INet6Address.cc @@ -34,6 +34,8 @@ #include #include #include +#include +#include //#include "INet6Address.mpp" #define prefix_ @@ -92,6 +94,38 @@ prefix_ in6_addr senf:: INet6Address::toin6_addr() const { return ina; } +prefix_ senf::INet6Address senf::INet6Address::from_mac(MACAddress const & mac) +{ + INet6Address addr; + addr[0] = 0xfe; + addr[1] = 0x80; + addr[8] = mac[0] ^ 0x2; // invert the "u" (universal/local) bit; see RFC 4291 Appx. A + addr[9] = mac[1]; + addr[10] = mac[2]; + addr[11] = 0xff; + addr[12] = 0xfe; + addr[13] = mac[3]; + addr[14] = mac[4]; + addr[15] = mac[5]; + return addr; +} + +prefix_ senf::INet6Address senf::INet6Address::from_eui64(EUI64 const & eui) +{ + INet6Address addr; + addr[0] = 0xfe; + addr[1] = 0x80; + addr[8] = eui[0] ^ 0x2; // invert the "u" (universal/local) bit; see RFC 4291 Appx. A + std::copy(eui.begin()+1, eui.end(), addr.begin()+9); + return addr; +} + +prefix_ senf::EUI64 senf::INet6Address::id() + const +{ + return EUI64::from_data(begin()+8); +} + prefix_ std::ostream & senf::operator<<(std::ostream & os, INet6Address const & addr) { ::in6_addr ina; diff --git a/senf/Socket/Protocols/INet/INet6Address.cci b/senf/Socket/Protocols/INet/INet6Address.cci index 290db51..ea5b37b 100644 --- a/senf/Socket/Protocols/INet/INet6Address.cci +++ b/senf/Socket/Protocols/INet/INet6Address.cci @@ -72,44 +72,12 @@ prefix_ senf::INet6Address senf::INet6Address::from_inet4address(INet4Address co return addr; } -prefix_ senf::INet6Address senf::INet6Address::from_mac(senf::MACAddress const & mac) -{ - INet6Address addr; - addr[0] = 0xfe; - addr[1] = 0x80; - addr[8] = mac[0] ^ 0x2; // invert the "u" (universal/local) bit; see RFC 4291 Appx. A - addr[9] = mac[1]; - addr[10] = mac[2]; - addr[11] = 0xff; - addr[12] = 0xfe; - addr[13] = mac[3]; - addr[14] = mac[4]; - addr[15] = mac[5]; - return addr; -} - -prefix_ senf::INet6Address senf::INet6Address::from_eui64(senf::EUI64 const & eui) -{ - INet6Address addr; - addr[0] = 0xfe; - addr[1] = 0x80; - addr[8] = eui[0] ^ 0x2; // invert the "u" (universal/local) bit; see RFC 4291 Appx. A - std::copy(eui.begin()+1, eui.end(), addr.begin()+9); - return addr; -} - prefix_ senf::INet6Network senf::INet6Address::network() const { return senf::INet6Network(*this, 64); } -prefix_ senf::EUI64 senf::INet6Address::id() - const -{ - return senf::EUI64::from_data(begin()+8); -} - prefix_ bool senf::INet6Address::universalId() const { diff --git a/senf/Socket/Protocols/INet/INet6Address.hh b/senf/Socket/Protocols/INet/INet6Address.hh index 66cc026..c22b280 100644 --- a/senf/Socket/Protocols/INet/INet6Address.hh +++ b/senf/Socket/Protocols/INet/INet6Address.hh @@ -36,8 +36,6 @@ #include #include #include "INet4Address.hh" -#include -#include //#include "INet6Address.mpp" #include "INet6Address.ih" @@ -45,6 +43,8 @@ namespace senf { + class EUI64; + class MACAddress; class INet6Network; /** \brief INet6 network address @@ -208,12 +208,12 @@ namespace senf { \par INet4 compatible INet6 addresses are not directly supported, they are deprecated in the RFC. */ - static INet6Address from_mac(senf::MACAddress const & mac); + static INet6Address from_mac(MACAddress const & mac); ///< Construct a link-local INet6 address /**< This will construct a link local address of the form fe80::xxxx:xxff:fexx:xxxx. */ - static INet6Address from_eui64(senf::EUI64 const & eui); + static INet6Address from_eui64(EUI64 const & eui); ///< Construct link-local INet6 address /**< This will construct a link local address of the form fe80::xxxx:xxxx:xxxx:xxxx. */ diff --git a/senf/Socket/Protocols/INet/INet6Address.test.cc b/senf/Socket/Protocols/INet/INet6Address.test.cc index 07be1b8..52b1289 100644 --- a/senf/Socket/Protocols/INet/INet6Address.test.cc +++ b/senf/Socket/Protocols/INet/INet6Address.test.cc @@ -30,6 +30,8 @@ #include "INet6Address.hh" #include #include +#include +#include #include #include diff --git a/senf/Socket/Protocols/Raw/LLAddressing.cci b/senf/Socket/Protocols/Raw/LLAddressing.cci index 374840b..0431630 100644 --- a/senf/Socket/Protocols/Raw/LLAddressing.cci +++ b/senf/Socket/Protocols/Raw/LLAddressing.cci @@ -31,20 +31,10 @@ #define prefix_ inline ///////////////////////////////cci.p/////////////////////////////////////// -prefix_ void senf::LLSocketAddress::address(MACAddress const & addr) -{ - std::copy(addr.begin(), addr.end(),&addr_.sll_addr[0]); -} - prefix_ senf::LLSocketAddress::LLSocketAddress() : BSDSocketAddress (sizeof(sockaddr_ll), AF_PACKET) {} -prefix_ void senf::LLSocketAddress::protocol(unsigned prot) -{ - addr_.sll_protocol = htons(prot); -} - prefix_ senf::LLSocketAddress::LLSocketAddress(unsigned prot, std::string const & iface) : BSDSocketAddress (sizeof(sockaddr_ll), AF_PACKET) { @@ -82,6 +72,11 @@ prefix_ unsigned senf::LLSocketAddress::protocol() return ntohs(addr_.sll_protocol); } +prefix_ void senf::LLSocketAddress::protocol(unsigned prot) +{ + addr_.sll_protocol = htons(prot); +} + prefix_ unsigned senf::LLSocketAddress::arptype() const { @@ -100,6 +95,11 @@ prefix_ senf::MACAddress senf::LLSocketAddress::address() return MACAddress::from_data(&addr_.sll_addr[0]); } +prefix_ void senf::LLSocketAddress::address(MACAddress const & addr) +{ + std::copy(addr.begin(), addr.end(), &addr_.sll_addr[0]); +} + ///////////////////////////////cci.e/////////////////////////////////////// #undef prefix_ diff --git a/senf/Socket/Protocols/Raw/LLAddressing.hh b/senf/Socket/Protocols/Raw/LLAddressing.hh index 0fa5017..d5e07ae 100644 --- a/senf/Socket/Protocols/Raw/LLAddressing.hh +++ b/senf/Socket/Protocols/Raw/LLAddressing.hh @@ -101,8 +101,8 @@ namespace senf { \throws UnknownInterfaceException if \a iface is not a valid interface name. */ - LLSocketAddress(const LLSocketAddress& other); - LLSocketAddress& operator=(const LLSocketAddress& other); + LLSocketAddress(LLSocketAddress const & other); + LLSocketAddress& operator=(LLSocketAddress const & other); ///@} /////////////////////////////////////////////////////////////////////////// diff --git a/senf/Utils/Logger/FileTarget.cc b/senf/Utils/Logger/FileTarget.cc index 50cf375..8a980e1 100644 --- a/senf/Utils/Logger/FileTarget.cc +++ b/senf/Utils/Logger/FileTarget.cc @@ -27,7 +27,9 @@ //#include "FileTarget.ih" // Custom includes -#include +#include +#include +#include #include #include diff --git a/senf/Utils/Logger/LogFormat.cc b/senf/Utils/Logger/LogFormat.cc index cd8afc2..a9812fb 100644 --- a/senf/Utils/Logger/LogFormat.cc +++ b/senf/Utils/Logger/LogFormat.cc @@ -32,7 +32,8 @@ #include #include #include -#include +#include +#include //#include "LogFormat.mpp" #define prefix_ diff --git a/senf/Utils/Logger/LogFormat.hh b/senf/Utils/Logger/LogFormat.hh index b74cb8c..62f01da 100644 --- a/senf/Utils/Logger/LogFormat.hh +++ b/senf/Utils/Logger/LogFormat.hh @@ -28,7 +28,7 @@ // Custom includes #include -#include "Target.hh" +#include "TimeSource.hh" #include //#include "LogFormat.mpp" diff --git a/senf/Utils/Logger/SyslogTarget.cc b/senf/Utils/Logger/SyslogTarget.cc index bbd22a4..1df1989 100644 --- a/senf/Utils/Logger/SyslogTarget.cc +++ b/senf/Utils/Logger/SyslogTarget.cc @@ -27,7 +27,9 @@ //#include "SyslogTarget.ih" // Custom includes -#include +#include +#include +#include //#include "SyslogTarget.mpp" #define prefix_ diff --git a/senf/Utils/Logger/SyslogUDPTarget.cc b/senf/Utils/Logger/SyslogUDPTarget.cc index 1c2533a..839b99f 100644 --- a/senf/Utils/Logger/SyslogUDPTarget.cc +++ b/senf/Utils/Logger/SyslogUDPTarget.cc @@ -30,7 +30,9 @@ #include #include #include -#include +#include +#include +#include //#include "SyslogUDPTarget.mpp" #define prefix_ diff --git a/senf/Utils/Logger/Target.cc b/senf/Utils/Logger/Target.cc index 4b98e72..be8d148 100644 --- a/senf/Utils/Logger/Target.cc +++ b/senf/Utils/Logger/Target.cc @@ -31,8 +31,6 @@ #include #include "ConsoleTarget.hh" #include -#include -#include //#include "Target.mpp" #define prefix_ diff --git a/senf/Utils/Statistics.cc b/senf/Utils/Statistics.cc index 2fe9334..10f603e 100644 --- a/senf/Utils/Statistics.cc +++ b/senf/Utils/Statistics.cc @@ -30,7 +30,6 @@ #include #include #include -#include #include #include "StatisticsTargets.hh" diff --git a/senf/Utils/StatisticsTargets.cc b/senf/Utils/StatisticsTargets.cc index e947200..e2e996a 100644 --- a/senf/Utils/StatisticsTargets.cc +++ b/senf/Utils/StatisticsTargets.cc @@ -28,7 +28,7 @@ // Custom includes #include -#include +#include #include "Statistics.hh" //#include "StatisticsTargets.mpp"