mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Add tracebox
This commit is contained in:
parent
bd646c5b69
commit
67f9b018cf
8 changed files with 201 additions and 0 deletions
33
tracebox/patches/101-build-fixes.patch
Normal file
33
tracebox/patches/101-build-fixes.patch
Normal file
|
@ -0,0 +1,33 @@
|
|||
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"
|
Loading…
Add table
Add a link
Reference in a new issue