mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-13 19:11:51 +00:00
33 lines
1.2 KiB
Diff
33 lines
1.2 KiB
Diff
diff --git a/noinst/libcrafter/libcrafter/crafter/Fields/NumericFields.cpp b/noinst/libcrafter/libcrafter/crafter/Fields/NumericFields.cpp
|
|
index 86b77e6..7de1eb7 100644
|
|
--- a/noinst/libcrafter/libcrafter/crafter/Fields/NumericFields.cpp
|
|
+++ b/noinst/libcrafter/libcrafter/crafter/Fields/NumericFields.cpp
|
|
@@ -270,8 +270,15 @@ Int64Field::Int64Field(const std::string& name, size_t nword, size_t nbyte) :
|
|
offset = nword * 4 + nbyte;
|
|
}
|
|
|
|
+static string genString(uint64_t val)
|
|
+{
|
|
+ char temp[21];
|
|
+ sprintf(temp, "%llu", val);
|
|
+ return temp;
|
|
+}
|
|
+
|
|
void Int64Field::PrintValue(std::ostream& str) const {
|
|
- str << GetName() << " = " << dec << (uint64_t)human;
|
|
+ str << GetName() << " = " << dec << genString(human);
|
|
}
|
|
|
|
FieldInfo* Int64Field::Clone() const {
|
|
diff --git a/noinst/libcrafter/libcrafter/crafter/Packet.h b/noinst/libcrafter/libcrafter/crafter/Packet.h
|
|
index 2fa813d..25c0fa1 100644
|
|
--- a/noinst/libcrafter/libcrafter/crafter/Packet.h
|
|
+++ b/noinst/libcrafter/libcrafter/crafter/Packet.h
|
|
@@ -33,6 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
#include <vector>
|
|
#include <sys/socket.h>
|
|
#include <pcap.h>
|
|
+#include <pthread.h>
|
|
|
|
#include "Crafter.h"
|
|
#include "Utils/RawSocket.h"
|