Commit 98f2ff57 authored by Andrea Bulgarelli's avatar Andrea Bulgarelli
Browse files

Utility::getByteStream()

parent 6ba21fdc
Loading
Loading
Loading
Loading
−10 B (42.2 KiB)

File changed.

No diff preview for this file type.

+3 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#define _UTILITY_H

#include "PacketLibDefinition.h"
#include "ByteStream.h"

namespace PacketLib
{
@@ -78,6 +79,8 @@ public:
    static int getchildpid(int startpid, char* procname, int maxsearch=1000);

    static bool getchildpidlive(int pid);
	
	static ByteStreamPtr getByteStream(byte* data, dword size, bool bigendian );
};

}
+4 −0
Original line number Diff line number Diff line
@@ -22,6 +22,10 @@

using namespace PacketLib;

ByteStreamPtr Utility::getByteStream(byte* data, dword size, bool bigendian ) {
	return ByteStreamPtr(new ByteStream((byte*) data, size, bigendian));
}

int Utility::convertToInteger(string bin)
{
    string::size_type pos;