GNU Radio Manual and C++ API Reference  v3.9.2.0-89-gb7c7001e
The Free & Open Software Radio Ecosystem
tuntap_pdu.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2013 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 #ifndef INCLUDED_BLOCKS_TUNTAP_PDU_H
12 #define INCLUDED_BLOCKS_TUNTAP_PDU_H
13 
14 #include <gnuradio/block.h>
15 #include <gnuradio/blocks/api.h>
16 
17 namespace gr {
18 namespace blocks {
19 
20 /*!
21  * \brief Creates TUNTAP interface and translates traffic to PDUs
22  * \ingroup networking_tools_blk
23  */
24 class BLOCKS_API tuntap_pdu : virtual public block
25 {
26 public:
27  // gr::blocks::tuntap_pdu::sptr
28  typedef std::shared_ptr<tuntap_pdu> sptr;
29 
30  /*!
31  * \brief Construct a TUNTAP PDU interface
32  * \param dev Device name to create
33  * \param MTU Maximum Transmission Unit size
34  * \param istunflag Flag to indicate TUN or Tap
35  */
36  static sptr make(std::string dev, int MTU = 10000, bool istunflag = false);
37 };
38 
39 } /* namespace blocks */
40 } /* namespace gr */
41 
42 #endif /* INCLUDED_BLOCKS_TUNTAP_PDU_H */
The abstract base class for all 'terminal' processing blocks.
Definition: gnuradio-runtime/include/gnuradio/block.h:60
Creates TUNTAP interface and translates traffic to PDUs.
Definition: tuntap_pdu.h:25
std::shared_ptr< tuntap_pdu > sptr
Definition: tuntap_pdu.h:28
static sptr make(std::string dev, int MTU=10000, bool istunflag=false)
Construct a TUNTAP PDU interface.
#define BLOCKS_API
Definition: gr-blocks/include/gnuradio/blocks/api.h:18
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition: basic_block.h:29