GNU Radio Manual and C++ API Reference  3.10.2.0
The Free & Open Software Radio Ecosystem
tuntap_pdu_impl.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_NETWORK_TUNTAP_PDU_IMPL_H
12 #define INCLUDED_NETWORK_TUNTAP_PDU_IMPL_H
13 
14 #include "stream_pdu_base.h"
16 
17 #if (defined(linux) || defined(__linux) || defined(__linux__))
18 #include <linux/if_tun.h>
19 #endif
20 
21 namespace gr {
22 namespace network {
23 
25 {
26 #if (defined(linux) || defined(__linux) || defined(__linux__))
27 private:
28  const std::string d_dev;
29  const bool d_istunflag;
30  int tun_alloc(char* dev, int flags);
31  int set_mtu(const char* dev, int MTU);
32 
33 public:
34  tuntap_pdu_impl(std::string dev, int MTU, bool istunflag);
35 #endif
36 };
37 
38 } /* namespace network */
39 } /* namespace gr */
40 
41 #endif /* INCLUDED_NETWORK_TUNTAP_PDU_IMPL_H */
Definition: stream_pdu_base.h:25
Definition: tuntap_pdu_impl.h:25
Creates TUNTAP interface and translates traffic to PDUs.
Definition: tuntap_pdu.h:25
GNU Radio logging wrapper.
Definition: basic_block.h:29