Coverage Report

Created: 2024-09-19 09:45

/proc/self/cwd/envoy/network/proxy_protocol.h
Line
Count
Source (jump to first uncovered line)
1
#pragma once
2
3
#include <cstdint>
4
#include <string>
5
#include <vector>
6
7
#include "envoy/network/address.h"
8
9
namespace Envoy {
10
namespace Network {
11
12
struct ProxyProtocolTLV {
13
  const uint8_t type;
14
  const std::vector<unsigned char> value;
15
};
16
17
using ProxyProtocolTLVVector = std::vector<ProxyProtocolTLV>;
18
19
struct ProxyProtocolData {
20
  const Network::Address::InstanceConstSharedPtr src_addr_;
21
  const Network::Address::InstanceConstSharedPtr dst_addr_;
22
  const ProxyProtocolTLVVector tlv_vector_{};
23
0
  std::string asStringForHash() const {
24
0
    return std::string(src_addr_ ? src_addr_->asString() : "null") +
25
0
           (dst_addr_ ? dst_addr_->asString() : "null");
26
0
  }
27
};
28
29
} // namespace Network
30
} // namespace Envoy