X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocols%2FRaw%2FMACAddress.cci;h=a2ec2747e5f631a9b44d9b451e4d68aecde4e251;hb=81f84badf27b66dbadec9890646ca1193e998505;hp=4db9e8598f13125b223fcfdd597d6cb94679d609;hpb=f73fa16ed5abdce272ac77f8b8b9ef2b9922c266;p=senf.git diff --git a/Socket/Protocols/Raw/MACAddress.cci b/Socket/Protocols/Raw/MACAddress.cci index 4db9e85..a2ec274 100644 --- a/Socket/Protocols/Raw/MACAddress.cci +++ b/Socket/Protocols/Raw/MACAddress.cci @@ -1,8 +1,8 @@ // $Id$ // -// Copyright (C) 2007 -// Fraunhofer Institute for Open Communication Systems (FOKUS) -// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Copyright (C) 2007 +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund // // This program is free software; you can redistribute it and/or modify @@ -38,7 +38,7 @@ prefix_ senf::MACAddress::MACAddress() std::fill(begin(),end(),0u); } -prefix_ senf::MACAddress::MACAddress(NoInit_t) +prefix_ senf::MACAddress::MACAddress(senf::NoInit_t) {} prefix_ senf::MACAddress::MACAddress(boost::uint64_t v) @@ -108,6 +108,18 @@ prefix_ boost::uint64_t senf::MACAddress::eui64() (boost::uint64_t( (*this)[5] ) ); } +prefix_ boost::uint64_t senf::MACAddress::uint64() + const +{ + return + (boost::uint64_t( (*this)[0] ) << 40) | + (boost::uint64_t( (*this)[1] ) << 32) | + (boost::uint64_t( (*this)[2] ) << 24) | + (boost::uint64_t( (*this)[3] ) << 16) | + (boost::uint64_t( (*this)[4] ) << 8) | + (boost::uint64_t( (*this)[5] ) ); +} + ///////////////////////////////cci.e/////////////////////////////////////// #undef prefix_