From a787db9b3547be1d182e09d9258ce33013b864b7 Mon Sep 17 00:00:00 2001 From: Rick V Date: Fri, 12 Jun 2020 17:34:53 -0500 Subject: [PATCH] fix ipv4_hdr --- llarp/ev/ev_win32.cpp | 1 - llarp/ev/ev_win32.hpp | 4 ---- llarp/net/ip_packet.hpp | 4 +++- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/llarp/ev/ev_win32.cpp b/llarp/ev/ev_win32.cpp index 2aae5dd1f..d163f4963 100644 --- a/llarp/ev/ev_win32.cpp +++ b/llarp/ev/ev_win32.cpp @@ -116,7 +116,6 @@ win32_tun_io::flush_write() void win32_tun_io::read(byte_t* buf, size_t sz) { - DWORD code; asio_evt_pkt* pkt = new asio_evt_pkt; pkt->buf = buf; memset(&pkt->pkt, '\0', sizeof(OVERLAPPED)); diff --git a/llarp/ev/ev_win32.hpp b/llarp/ev/ev_win32.hpp index 33b50905d..ef933c726 100644 --- a/llarp/ev/ev_win32.hpp +++ b/llarp/ev/ev_win32.hpp @@ -36,7 +36,6 @@ namespace llarp struct udp_listener : public ev_io { llarp_udp_io* udp; - llarp_pkt_list m_RecvPackets; udp_listener(int fd, llarp_udp_io* u) : ev_io(fd), udp(u){}; @@ -44,9 +43,6 @@ namespace llarp { } - bool - RecvMany(llarp_pkt_list*); - bool tick(); diff --git a/llarp/net/ip_packet.hpp b/llarp/net/ip_packet.hpp index 138657f61..e5831d3e9 100644 --- a/llarp/net/ip_packet.hpp +++ b/llarp/net/ip_packet.hpp @@ -70,7 +70,9 @@ typedef struct ip_hdr #define ihl ip_header_len #define protocol ip_protocol #define frag_off ip_frag_offset - +#define tos ip_tos +#define ttl ip_ttl +#define tot_len ip_total_length #endif struct ipv6_header