header clean up and clang-format

This commit is contained in:
Ryan Tharp 2018-09-24 06:09:01 -07:00
parent 5ab68771e4
commit 0ad4f43fe5
13 changed files with 20 additions and 54 deletions

View File

@ -1,26 +1,13 @@
#include <getopt.h>
#include <signal.h>
#include <stdio.h> /* fprintf, printf */
#ifndef _MSC_VER
#include <unistd.h>
#endif
#include <llarp.h>
#include <llarp/logic.h>
#include "dns_iptracker.hpp"
#include "dnsd.hpp"
#include "dns_dotlokilookup.hpp"
#include "ev.hpp"
#include "llarp/net.hpp"
#include "logger.hpp"
#include <llarp/dns_iptracker.hpp>
#include <llarp/dnsd.hpp>
#include <llarp/dns_dotlokilookup.hpp>
#include "router.hpp" // for service::address
#include "crypto.hpp" // for llarp::pubkey
#include <algorithm> // for std::generate_n
#include <thread> // for multithreaded version
#include <vector>
#include <llarp/threading.hpp> // for multithreaded version (multiplatorm)
// keep this once jeff reenables concurrency
#ifdef _MSC_VER

View File

@ -5,9 +5,9 @@
#include <llarp/ip.hpp>
#include <llarp/service/endpoint.hpp>
#include <llarp/threading.hpp>
#include "dnsd.hpp"
#include "dns_dotlokilookup.hpp"
#include "dns_iptracker.hpp"
#include <llarp/dnsd.hpp> // for relay
#include <llarp/dns_dotlokilookup.hpp> // for lookup
#include <llarp/dns_iptracker.hpp> // for tracker
namespace llarp
{

View File

@ -1,9 +1,6 @@
#include <llarp/endian.h>
#include <string.h>
#include "dnsd.hpp" // for llarp_handle_dnsd_recvfrom, dnsc
#include "logger.hpp"
#include "buffer.hpp"
#include "mem.hpp"
#include <llarp/dnsd.hpp> // for llarp_handle_dnsd_recvfrom, dnsc
#include <llarp/logger.hpp>
/*
<domain-name> is a domain name represented as a series of labels, and
@ -130,7 +127,7 @@ extern "C"
bob.sz = 12;
llarp::DumpBuffer(bob);
*/
char hex_buffer[12 * 3 + 1];
hex_buffer[12 * 3] = 0;
for(unsigned int j = 0; j < 10; j++)

View File

@ -1,7 +1,4 @@
#include <llarp/logic.h>
#include "dns_dotlokilookup.hpp"
#include "dns_iptracker.hpp"
#include <llarp/dns_dotlokilookup.hpp>
#include <llarp/handlers/tun.hpp>
std::string const default_chars =

View File

@ -1,6 +1,4 @@
#include "dns_iptracker.hpp" //
#include "logger.hpp"
#include <llarp.h>
#include <llarp/dns_iptracker.hpp>
dns_iptracker g_dns_iptracker;

View File

@ -1,6 +1,4 @@
#include "dnsc.hpp"
#include <llarp/dns.h>
#include "buffer.hpp"
#include <llarp/dnsc.hpp>
#ifndef _WIN32
#include <arpa/inet.h>
@ -16,12 +14,9 @@
#include <unistd.h> /* close */
#endif
#include <cstdio>
#include <llarp/dns.h>
#include <algorithm> // for std::find_if
#include "llarp/net.hpp" // for llarp::Addr
#include "logger.hpp"
#include <llarp/net.hpp> // for llarp::Addr
#include <llarp/logger.hpp>
#include <stdio.h> // sprintf
#define MIN(X, Y) (((X) < (Y)) ? (X) : (Y))

View File

@ -1,11 +1,5 @@
#include <llarp/logic.h>
#include <llarp/dns.h>
#include <string>
#include "dnsd.hpp"
#include "ev.hpp"
#include "llarp/net.hpp"
#include "logger.hpp"
#include <llarp/dnsd.hpp>
#include <llarp/net.hpp>
extern dns_tracker dns_udp_tracker;
@ -186,7 +180,7 @@ writesend_dnss_revresponse(std::string reverse, const struct sockaddr *from,
code_domain(write_buffer, request->question.name); // com, type=6, ttl=0
put16bits(write_buffer, request->question.type);
put16bits(write_buffer, request->question.qClass);
put32bits(write_buffer, 1); // ttl
put32bits(write_buffer, 1); // ttl
put16bits(write_buffer, reverse.length() + 2); // rdLength
code_domain(write_buffer, reverse);
@ -246,8 +240,8 @@ writesend_dnss_response(struct sockaddr *hostRes, const struct sockaddr *from,
put16bits(write_buffer, 4); // rdLength
llarp::LogDebug("Sending ip: ", std::to_string(ip[0]), '.',
std::to_string(ip[1]), '.', std::to_string(ip[2]), '.',
std::to_string(ip[3]));
std::to_string(ip[1]), '.', std::to_string(ip[2]), '.',
std::to_string(ip[3]));
*write_buffer++ = ip[0];
*write_buffer++ = ip[1];
*write_buffer++ = ip[2];

View File

@ -2,8 +2,6 @@
#define __USE_MINGW_ANSI_STDIO 1
#include <llarp/handlers/tun.hpp>
#include "router.hpp"
#include "dns_iptracker.hpp"
#include "dns_dotlokilookup.hpp"
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>