diff options
Diffstat (limited to 'orkbasecxx/MemUtils.cpp')
-rw-r--r-- | orkbasecxx/MemUtils.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/orkbasecxx/MemUtils.cpp b/orkbasecxx/MemUtils.cpp index 22f69a3..029f85b 100644 --- a/orkbasecxx/MemUtils.cpp +++ b/orkbasecxx/MemUtils.cpp @@ -102,3 +102,17 @@ char* MemGrabLine(char* start, char* limit, CStdString& out) }
return c;
}
+
+void MemMacToHumanReadable(unsigned char* macAddress, CStdString&output)
+{
+ char byteAsHex[10];
+
+ for(int i=0; i<6; i++)
+ {
+ snprintf(byteAsHex, sizeof(byteAsHex), "%.2x", macAddress[i]);
+ if(output.size())
+ output += ":";
+
+ output += byteAsHex;
+ }
+}
|