X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FLLAddressing.cc;h=4b3adf6e587021ac9b43b008dce3676ab7233ccb;hb=9a988902090d28007578e93bffd809f6bd913155;hp=6ef950841602f05666a14c2d04a685b3a393deb3;hpb=c52cd7d87dbb525c1267aad27391b8b7365dbb57;p=senf.git diff --git a/Socket/LLAddressing.cc b/Socket/LLAddressing.cc index 6ef9508..4b3adf6 100644 --- a/Socket/LLAddressing.cc +++ b/Socket/LLAddressing.cc @@ -1,6 +1,6 @@ // $Id$ // -// Copyright (C) 2006 +// Copyright (C) 2006 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) // Kompetenzzentrum fuer Satelitenkommunikation (SatCom) // Stefan Bund @@ -20,7 +20,9 @@ // Free Software Foundation, Inc., // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// Definition of non-inline non-template functions +/** \file + \brief LLSocketAddress and LLAddressingPolicy non-inline non-template implementation + */ #include "LLAddressing.hh" #include "LLAddressing.ih" @@ -38,7 +40,7 @@ #define prefix_ ///////////////////////////////cc.p//////////////////////////////////////// -prefix_ unsigned char satcom::lib::detail::hexnibble(char c) +prefix_ unsigned char senf::detail::hexnibble(char c) { if (c>='0' && c<='9') return c - '0'; @@ -49,7 +51,7 @@ prefix_ unsigned char satcom::lib::detail::hexnibble(char c) throw InvalidLLSocketAddressException(); } -prefix_ std::string satcom::lib::LLSocketAddress::interface() +prefix_ std::string senf::LLSocketAddress::interface() const { if (addr_.sll_ifindex == 0) @@ -65,7 +67,7 @@ prefix_ std::string satcom::lib::LLSocketAddress::interface() if (addr_.sll_halen == 0) return std::string(); std::stringstream s; - + unsigned char const * i = &addr_.sll_addr[0]; while (1) { s << std::hex << std::setw(2) << std::setfill('0') << unsigned(*i); @@ -79,7 +81,7 @@ prefix_ std::string satcom::lib::LLSocketAddress::interface() /* -prefix_ void satcom::lib::LLSocketAddress::address(std::string address) +prefix_ void senf::LLSocketAddress::address(std::string address) { typedef boost::split_iterator StringSplitIterator; StringSplitIterator i = boost::make_split_iterator(address, boost::token_finder(boost::is_any_of("-: "))); @@ -94,7 +96,7 @@ prefix_ void satcom::lib::LLSocketAddress::address(std::string address) } */ -prefix_ void satcom::lib::LLSocketAddress::interface(std::string interface) +prefix_ void senf::LLSocketAddress::interface(std::string interface) { if (! interface.empty()) { addr_.sll_ifindex = if_nametoindex(interface.c_str()); @@ -104,10 +106,10 @@ prefix_ void satcom::lib::LLSocketAddress::interface(std::string interface) } -prefix_ satcom::lib::detail::LLAddressFromStringRange -satcom::lib::llAddress(std::string address) +prefix_ senf::detail::LLAddressFromStringRange +senf::llAddress(std::string address) { - detail::StringSplitIterator i = + detail::StringSplitIterator i = boost::make_split_iterator(address, boost::token_finder(boost::is_any_of("-: "))); detail::StringSplitIterator i_end; @@ -124,5 +126,8 @@ satcom::lib::llAddress(std::string address) // Local Variables: // mode: c++ -// c-file-style: "satcom" +// fill-column: 100 +// c-file-style: "senf" +// indent-tabs-mode: nil +// ispell-local-dictionary: "american" // End: