|
IBR-DTNSuite
0.10
|
#include "config.h"#include <iostream>#include <iomanip>#include <stdlib.h>#include <libdaemon/daemon.h>#include "ibrdtn/api/Client.h"#include <ibrcommon/net/socket.h>#include "ibrcommon/thread/Mutex.h"#include "ibrcommon/thread/MutexLock.h"#include <ibrcommon/Logger.h>#include <queue>#include <csignal>#include <unistd.h>#include <fcntl.h>#include <stdio.h>#include <string.h>#include <errno.h>#include <sys/ioctl.h>#include <sys/socket.h>#include <linux/if.h>#include <linux/if_tun.h>
Go to the source code of this file.
Functions | |
| int | tun_alloc (char *dev, short int flags) |
| void | add_throughput_data (ssize_t amount, int updown) |
| void | timer_display_throughput (int) |
| void | term (int signal) |
| void | print_help (const char *argv0) |
| int | main (int argc, char *argv[]) |
Variables | |
| size_t | throughput_data_up [5] = { 0, 0, 0, 0, 0 } |
| size_t | throughput_data_down [5] = { 0, 0, 0, 0, 0 } |
| int | throughput_pos = 0 |
| bool | m_running = true |
| TUN2BundleGateway * | _gateway = NULL |
| void add_throughput_data | ( | ssize_t | amount, |
| int | updown | ||
| ) |
Definition at line 114 of file dtntunnel.cpp.
References throughput_data_down, throughput_data_up, and throughput_pos.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 283 of file dtntunnel.cpp.
References ibrcommon::Logger::addStream(), ibrcommon::Logger::enableSyslog(), ibrcommon::LogLevel::error, IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_TAG, ibrcommon::LogLevel::info, logerr, ibrcommon::Logger::LOGGER_ALL, ibrcommon::Logger::LOGGER_CRIT, ibrcommon::Logger::LOGGER_DEBUG, ibrcommon::Logger::LOGGER_ERR, ibrcommon::Logger::LOGGER_NOTICE, logopts, logstd, logsys, ibrcommon::LogLevel::notice, print_help(), term(), timer_display_throughput(), ibrcommon::LogLevel::warning, and ibrcommon::Exception::what().

| void print_help | ( | const char * | argv0 | ) |
Definition at line 259 of file dtntunnel.cpp.
| void term | ( | int | signal | ) |
Definition at line 249 of file dtntunnel.cpp.
| void timer_display_throughput | ( | int | ) |
Definition at line 122 of file dtntunnel.cpp.
References throughput_data_down, throughput_data_up, and throughput_pos.
Referenced by main().
| int tun_alloc | ( | char * | dev, |
| short int | flags | ||
| ) |
Definition at line 63 of file dtntunnel.cpp.
| TUN2BundleGateway* _gateway = NULL |
Definition at line 247 of file dtntunnel.cpp.
| bool m_running = true |
Definition at line 246 of file dtntunnel.cpp.
| size_t throughput_data_down[5] = { 0, 0, 0, 0, 0 } |
Definition at line 111 of file dtntunnel.cpp.
Referenced by add_throughput_data(), and timer_display_throughput().
| size_t throughput_data_up[5] = { 0, 0, 0, 0, 0 } |
Definition at line 110 of file dtntunnel.cpp.
Referenced by add_throughput_data(), and timer_display_throughput().
| int throughput_pos = 0 |
Definition at line 112 of file dtntunnel.cpp.
Referenced by add_throughput_data(), and timer_display_throughput().