GNU Radio's BLUETOOTH Package
multi_hopper_impl.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2013 Christopher D. Kilgour
4 * Copyright 2008, 2009 Dominic Spill, Michael Ossmann
5 * Copyright 2007 Dominic Spill
6 * Copyright 2005, 2006 Free Software Foundation, Inc.
7 *
8 * This file is part of gr-bluetooth
9 *
10 * This is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2, or (at your option)
13 * any later version.
14 *
15 * This software is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this software; see the file COPYING. If not, write to
22 * the Free Software Foundation, Inc., 51 Franklin Street,
23 * Boston, MA 02110-1301, USA.
24 */
25
26#ifndef INCLUDED_BLUETOOTH_GR_BLUETOOTH_MULTI_HOPPER_IMPL_H
27#define INCLUDED_BLUETOOTH_GR_BLUETOOTH_MULTI_HOPPER_IMPL_H
28
30#include "bluetooth/piconet.h"
31#include "tun.h"
32
33namespace gr {
34 namespace bluetooth {
35
36 class multi_hopper_impl : virtual public multi_hopper
37 {
38 private:
39 /* LAP of the target piconet */
40 uint32_t d_LAP;
41
42 /* true if using a particular aliasing receiver implementation */
43 bool d_aliased;
44
45 /* Using tun for output */
46 bool d_tun;
47
48 /* the piconet we are monitoring */
50
51 /*
52 * follow a piconet's hopping sequence and look for packets on the
53 * appropriate channel for each time slot
54 */
55 void hopalong(gr_vector_const_void_star &input_items, char *symbols,
56 uint32_t clkn, int noutput_items);
57
58 /* Tun stuff */
59 int d_tunfd; // TUN fd
60 char chan_name[20]; // TUN interface name
61 unsigned char d_ether_addr[ETH_ALEN];
62 static const unsigned short ETHER_TYPE = 0xFFF0;
63
64 public:
65 multi_hopper_impl(double sample_rate, double center_freq, double squelch_threshold, int LAP, bool aliased, bool tun);
67
68 // Where all the action really happens
69 int work(int noutput_items,
70 gr_vector_const_void_star &input_items,
71 gr_vector_void_star &output_items);
72 };
73
74 } // namespace bluetooth
75} // namespace gr
76
77#endif /* INCLUDED_BLUETOOTH_GR_BLUETOOTH_MULTI_HOPPER_IMPL_H */
78
std::shared_ptr< basic_rate_piconet > sptr
Definition piconet.h:70
multi_hopper_impl(double sample_rate, double center_freq, double squelch_threshold, int LAP, bool aliased, bool tun)
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
Sniff Bluetooth packets.
Definition multi_hopper.h:41
Definition multi_block.h:34
Definition multi_block.h:33