Questions tagged [libtins]
10 questions
24
votes
3 answers
CLion: Enable debugging of external libraries by adding source files
I am using CLion 2016.2.2 and I want to debug a method in the libtins library. However, it looks like the sources are not available because when trying to jump into the methods from libtins, the debugger does not go into and just updates the current…

Patrick
- 1,046
- 2
- 10
- 31
2
votes
1 answer
libtins Sniffer undefined
#include
#include
using namespace Tins;
using namespace std;
bool callback(const PDU& pdu) {
// Find the IP layer
const IP& ip = pdu.rfind_pdu();
// Find the TCP layer
const TCP& tcp =…

NintendoZaedus
- 653
- 3
- 8
- 22
1
vote
1 answer
How to add macro Visual Studio 2019
I was trying to make a program to sniff packets and went to libtins
If you are using a static build of libtins on Windows, then you have link your application with tins.lib. You also need to add this macro definition to your project:
…

habi
- 125
- 8
1
vote
1 answer
Libtins: cannot use class method as packet handler within the sniff_loop even with c++11
I'm working on an small UDP traffic sniffing example using libtins. Everything worked until I started encapsulating everythin into a class. Acording the tutorial (loop sniffing section), the snifer_loop takes a template functor as an argument,…

dvilela
- 1,200
- 12
- 29
0
votes
0 answers
How to link to libtins library using CMake on Windows?
I am trying to compile a project using Visual Studio Code on Windows that uses the libtins library but I am having trouble getting CMake to link the library. I followed the main guide located on libtin's github.io page (located here) and another…

asqapro
- 175
- 3
- 15
0
votes
0 answers
std::bind causes "failed to specialize function template" error on MSVC
As a bit of context on the issue I have, I am trying to compile my project using MSVC (Visual Studio 2022) on Windows and it produces a bunch of errors, which is surprising, considering the same code builds just fine on GNU-G++.
What I am trying to…

Adrian Costin
- 418
- 3
- 12
0
votes
0 answers
libtins: get the entire packet size
I have a capture that I'm parsing using libtins and I'm trying to get the total frame size, I'm missing 1 byte. On Wireshark, the frame is parsed as S-Bus response packet and it's length is 94 bytes. At the end of the packet there's a part called…

Landes
- 1
- 1
0
votes
1 answer
Using libtins to recreate IP packet change its header
I have a uint8_t* buffer which I get by doing buf.data(). It's a buffer of an IP packet.
I want to change the source address and recalculate the checksum, so I recreated the packet in libtins by doing what you see below:
//prints original packet …

PPP
- 1,279
- 1
- 28
- 71
0
votes
1 answer
Why is my program having problems opening a Network Device
I took a look at libtins and at the Examples I found the ARP Monitor example.
The Code of the Example is this here:
#include
#include

0xLyptox
- 5
- 4
-1
votes
1 answer
Sniff Ethernet UDP traffic using libtins c++
I want to sniff one ethernet UDP packet coming from my raspberry using the c++ tins library, I can receive the packet and save it to vector but I can't access the payload to print it, which I acculay need to check. I'm so thankful for any help.
int…