Matias Fontanini
58e3a7a687
Don't use pcap_setdirection on Windows
2016-01-25 12:50:29 -08:00
Jesus Llorente
6b82e50c03
Modified set_direction to return a bool
2015-12-21 17:56:18 +02:00
Jesus Llorente
4b9f998784
Removed tins_direction_t typedef in favor of native pcap_direction_t
2015-11-24 20:09:41 +02:00
Jesus Llorente
b07deba105
Added pcap_setdirection to sniffer
2015-11-23 23:10:34 +02:00
Matias Fontanini
b451a9eae0
Detect if pcap version defines pcap_set_immediate_mode.
2015-06-14 11:23:32 -07:00
Matias Fontanini
c42c18f5df
Allow setting immediate mode on Sniffer.
2015-06-14 10:56:00 -07:00
Matias Fontanini
8bb837eda8
Use one flags field for all flags on SnifferConfiguration.
2015-06-14 10:41:07 -07:00
Matias Fontanini
a607ab380c
Replace WIN32 macro with _WIN32.
2015-05-02 16:25:59 -07:00
Matias Fontanini
65607b0eb5
Fixed PKTAP next layer interpretation.
2014-12-21 10:51:18 -08:00
Matias Fontanini
a4c67e5acd
Added PKTAP header.
2014-12-21 10:18:59 -08:00
Matias Fontanini
ff74f3103c
Fixed invalid Loopback protocol detection on FreeBSD/OSX.
2014-09-20 09:52:42 -03:00
Matias Fontanini
b532753a16
Fixed network naming on Windows.
2014-09-07 23:48:37 -03:00
Matias Fontanini
8bd3313010
Removed print statement.
2014-08-31 18:46:13 -03:00
Matias Fontanini
b6fdba0077
The timeout Sniffer option is set to 1000 by default.
2014-08-31 18:34:52 -03:00
Matias Fontanini
83ced826d0
Fixed using pcap_compile on a not-yet activated pcap handle.
2014-08-30 23:54:18 -03:00
Santiago Alessandri
2b6a079980
Added back the original constructors of the Sniffer and FileSniffer to keep compatibility. Tagged them as deprecated, though.
...
Changed the default if_mask to 0 as PCAP_NETMASK_UNKNOWN is still not present in all versions of pcap.
Snap length is always set and it's default value is of 65535 not 0.
2014-08-30 17:29:30 -07:00
Santiago Alessandri
49f451ecd1
Changed the name to SnifferConfiguration, it sounds better.
2014-08-29 16:35:13 -07:00
Santiago Alessandri
5b2934e102
Refactored sniffer class to take a SnifferConfigurator to do the setup.
...
This way it is easier to extend the different configuration capabilities.
2014-08-29 16:30:13 -07:00
Matias Fontanini
f5b0603799
CMake compilation now works on Windows.
2014-08-24 18:06:58 -03:00
Matias Fontanini
3ef85aae38
Added BaseSniffer::set_extract_raw_pdus.
2014-07-30 23:01:03 -03:00
Matias Fontanini
2dff95700f
Updated copyright notice.
2014-07-13 11:04:29 -03:00
Matias Fontanini
3d4f509a62
Added call to pcap_can_set_rfmon before calling pcap_set_rfmon.
2014-06-09 10:24:09 -03:00
Matias Fontanini
559c963d63
Fixed compilation errors on Windows.
2014-05-06 00:13:05 -03:00
Matias Fontanini
b2788fad63
Simplified error string generation on Sniffer::pcap_open_live_extended.
2014-05-05 08:32:45 -03:00
Kyle McDonald
5fe4ab0de8
added pcap_open_live_extended() shim to sniffer.cpp and set rfmon to true in beacon capture example
2014-05-03 12:48:35 -04:00
Matias Fontanini
cd2b9aab98
TCPStreamFollower now doesn't clear its state each time follow_streams is called.
2014-04-07 11:29:09 -03:00
Matias Fontanini
295ebb679c
Added 1000ms as the default read timeout used when calling pcap_open_live. Added BaseSniffer::set_timeout to modify this parameter.
2013-11-19 20:51:58 -03:00
Matias Fontanini
9962381fc7
Added the --disable-dot11 configure switch.
2013-11-09 14:41:08 -03:00
Matias Fontanini
b0868b5d60
Added another Sniffer constructor.
2013-10-21 23:31:07 -03:00
Matias Fontanini
bcfe26175a
BaseSniffer now uses pcap_loop instead of pcap_dispatch.
2013-09-24 08:59:46 -03:00
Matias Fontanini
9cbac6b044
BaseSniffer::next_packet now uses pcap_dispatch.
2013-09-23 22:55:18 -03:00
Matias Fontanini
1b4efc1520
Rolled the BaseSniffer changes since that was OK.
2013-09-20 12:37:21 -03:00
Matias Fontanini
96ecd054ab
Fixed issue with bpf_programs on BaseSniffer. Done some documentation changes.
2013-09-20 11:07:09 -03:00
Matias Fontanini
20f3911e12
BaseSniffer::sniff_loop now uses begin() and end() to process packets, making it around 8% faster. Also added BaseSniffer::link_type to retrieve the pcap handle link type.
2013-09-15 12:16:54 -03:00
Matias Fontanini
d393c1fbfc
Moved calls to pcap_loop and pcap_breakloop to sniffer.cpp.
2013-09-08 19:20:52 -03:00
Matias Fontanini
7d4222fb17
Added PPI PDU.
2013-09-05 00:49:11 -03:00
Matias Fontanini
21b80a7370
BaseSniffer is now iterable.
2013-07-24 23:32:33 -03:00
Matias Fontanini
fb8fb92ee6
BaseSniffer::next_packet now loops until either a valid packet is found or pcap_next fails.
2013-07-24 22:27:53 -03:00
Matias Fontanini
5197e7f5f1
Sniffer now differentiates between EthernetII and Dot3 when sniffing.
2013-04-23 22:55:32 -03:00
Matias Fontanini
5064a9255b
Fixed BSD notice. Updated AUTHORS file.
2013-04-23 20:33:00 -03:00
Matias Fontanini
0f2bc45059
Moved definitions inside TINS_IS_CXX11 into header files.
2013-04-23 13:04:57 -03:00
Matias Fontanini
91bdcca577
Dot11 now uses option_not_found. Sniffer catches malformed_packet rather than std::runtime_error while sniffing.
2013-04-19 14:06:59 -03:00
Bruno Nery
c6dc18d215
Added get_fd() to BaseSniffer.
...
Signed-off-by: Matias Fontanini <matias.fontanini@gmail.com >
2013-01-29 20:25:48 -03:00
Matias Fontanini
e712550cb8
Move constructors are now noexcept.
2013-01-20 00:22:21 -03:00
Matias Fontanini
02265061cc
Added SLL pseudo protocol header.
2013-01-16 00:05:28 -03:00
Matias Fontanini
75a4bbfed6
Added Timestamp conversion to std::chrono::microseconds. BaseSniffer is now movable.
2012-11-23 20:30:16 -03:00
Matias Fontanini
492fd611f9
Added Packet and some wrapper packet classes. Modified the return value of BaseSniffer::next_packet.
2012-11-23 18:10:51 -03:00
Matias Fontanini
bf6c086b3d
Added BaseSniffer::timestamp method.
2012-11-21 13:33:28 -03:00
Bruno Nery
28e5df3abc
Fixed BaseSniffer::next_packet() to return when error occurred. Updated its documentation.
...
Signed-off-by: Matias Fontanini <matias.fontanini@gmail.com >
2012-11-20 16:30:34 -03:00
Matias Fontanini
3139020df2
Done some fixes on Sniffer and Dot11Data.
2012-10-10 21:06:06 -03:00