Yarilo v0.9.9
WPA2 Decrypter & Packet Analyzer
Loading...
Searching...
No Matches
formatter.h
Go to the documentation of this file.
1#ifndef SNIFF_FORMATTER
2#define SNIFF_FORMATTER
3
4#include "proto/service.pb.h"
5#include <tins/arp.h>
6#include <tins/dhcp.h>
7#include <tins/dhcpv6.h>
8#include <tins/dns.h>
9#include <tins/ethernetII.h>
10#include <tins/icmp.h>
11#include <tins/icmpv6.h>
12#include <tins/ip.h>
13#include <tins/ipv6.h>
14#include <tins/packet.h>
15#include <tins/rawpdu.h>
16#include <tins/tcp.h>
17#include <tins/udp.h>
18
19namespace yarilo {
20
22public:
23 static proto::Packet format(std::unique_ptr<Tins::Packet> pkt,
24 bool with_payload);
25
26private:
27 static void add_raw(proto::Packet *pkt, Tins::RawPDU *raw_pdu,
28 bool with_payload);
29 static void add_arp(proto::Packet *pkt, Tins::ARP *arp_pdu);
30 static void add_ip(proto::Packet *pkt, Tins::IP *ip_pdu, bool with_payload);
31 static void add_ipv6(proto::Packet *pkt, Tins::IPv6 *ipv6_pdu,
32 bool with_payload);
33 static proto::ICMP *format_ICMP(Tins::ICMP *icmp_pdu);
34 static proto::ICMPv6 *format_ICMPv6(Tins::ICMPv6 *icmpv6_pdu);
35 static proto::DNS *format_DNS(Tins::DNS *dns_pdu);
36 static proto::DHCP *format_DHCP(Tins::DHCP *dhcp_pdu);
37 static proto::DHCPv6 *format_DHCPv6(Tins::DHCPv6 *dhcpv6_pdu);
38 static proto::TCP *format_TCP(Tins::TCP *tcp_pdu);
39 static proto::UDP *format_UDP(Tins::UDP *udp_pdu);
40};
41
42} // namespace yarilo
43
44#endif // SNIFF_FORMATTER
Definition formatter.h:21
static proto::Packet format(std::unique_ptr< Tins::Packet > pkt, bool with_payload)
Definition formatter.cpp:20
Definition access_point.cpp:22