GNU Radio's CCS Package
wireshark_connector_impl.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2013 Bastian Bloessl <bloessl@ccs-labs.org>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17#ifndef INCLUDED_FOO_WIRESHARK_CONNECTOR_IMPL_H
18#define INCLUDED_FOO_WIRESHARK_CONNECTOR_IMPL_H
19
21#include <boost/cstdint.hpp>
22
23namespace gr {
24namespace foo {
25
27 private:
28 uint8_t encoding_to_rate(uint64_t encoding);
29 void handle_pdu(pmt::pmt_t pdu);
30
31 bool d_debug;
32 int d_msg_offset;
33 int d_msg_len;
34 char* d_msg;
35 LinkType d_link;
36 public:
38 int general_work(int noutput, gr_vector_int& ninput_items,
39 gr_vector_const_void_star& input_items,
40 gr_vector_void_star& output_items );
41 };
42
44 uint32_t magic_number; /* magic number */
45 uint16_t version_major; /* major version number */
46 uint16_t version_minor; /* minor version number */
47 int32_t thiszone; /* GMT to local correction */
48 uint32_t sigfigs; /* accuracy of timestamps */
49 uint32_t snaplen; /* max length of captured packets, in octets */
50 uint32_t network; /* data link type */
51 }__attribute__((packed));
52
53 struct pcap_hdr {
54 uint32_t ts_sec; /* timestamp seconds */
55 uint32_t ts_usec; /* timestamp microseconds */
56 uint32_t incl_len; /* number of octets of packet saved in file */
57 uint32_t orig_len; /* actual length of packet */
58 }__attribute__((packed));
59
60 struct radiotap_hdr {
61 uint16_t version;
62 uint16_t hdr_length;
63 uint32_t bitmap;
64 uint8_t flags;
65 uint8_t rate;
66 uint32_t channel;
67 uint8_t signal;
68 uint8_t noise;
69 uint8_t antenna;
70 }__attribute__((packed));
71
72} // namespace foo
73} // namespace gr
74
75#endif /* INCLUDED_FOO_WIRESHARK_CONNECTOR_IMPL_H */
Definition: wireshark_connector_impl.h:26
wireshark_connector_impl(LinkType type, bool debug)
int general_work(int noutput, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
Definition: wireshark_connector.h:32
struct gr::foo::pcap_file_hdr __attribute__((packed))
LinkType
Definition: wireshark_connector.h:26
Definition: burst_tagger.h:27
Definition: wireshark_connector_impl.h:43
uint16_t version_major
Definition: wireshark_connector_impl.h:45
uint32_t snaplen
Definition: wireshark_connector_impl.h:49
uint32_t network
Definition: wireshark_connector_impl.h:50
int32_t thiszone
Definition: wireshark_connector_impl.h:47
uint32_t magic_number
Definition: wireshark_connector_impl.h:44
uint16_t version_minor
Definition: wireshark_connector_impl.h:46
uint32_t sigfigs
Definition: wireshark_connector_impl.h:48
Definition: wireshark_connector_impl.h:53
uint32_t ts_sec
Definition: wireshark_connector_impl.h:54
uint32_t incl_len
Definition: wireshark_connector_impl.h:56
uint32_t orig_len
Definition: wireshark_connector_impl.h:57
uint32_t ts_usec
Definition: wireshark_connector_impl.h:55
Definition: wireshark_connector_impl.h:60
uint8_t signal
Definition: wireshark_connector_impl.h:67
uint16_t hdr_length
Definition: wireshark_connector_impl.h:62
uint32_t channel
Definition: wireshark_connector_impl.h:66
uint8_t rate
Definition: wireshark_connector_impl.h:65
uint32_t bitmap
Definition: wireshark_connector_impl.h:63
uint8_t noise
Definition: wireshark_connector_impl.h:68
uint16_t version
Definition: wireshark_connector_impl.h:61
uint8_t flags
Definition: wireshark_connector_impl.h:64
uint8_t antenna
Definition: wireshark_connector_impl.h:69