Packets: Add StringParser ostream operation
[senf.git] / Socket / Protocols / Raw / MACAddress.ct
index 2c6ae39..e0b4ef3 100644 (file)
@@ -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 <g0dil@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
@@ -26,6 +26,7 @@
 //#include "MACAddress.ih"
 
 // Custom includes
+#include "../../../config.hh"
 
 #define prefix_
 ///////////////////////////////ct.p////////////////////////////////////////
@@ -37,10 +38,7 @@ template <class InputIterator>
 prefix_ senf::MACAddress::MACAddress senf::MACAddress::from_data(InputIterator i)
 {
     MACAddress mac (senf::noinit);
-    iterator j (mac.begin());
-    iterator const j_end (mac.end());
-    for (;j!=j_end;++j,++i)
-        *j = *i;
+    SENF_copy_n(i, 6, mac.begin());
     return mac;
 }