MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / is_net_proxy_protocol

Function is_net_proxy_protocol

net/proxy_protocol.c:78–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78int is_net_proxy_protocol(char *buf, int size)
79{
80 if (size < PROXY_PROTOCOL_V1_HDR_LEN)
81 return -1; /* don't know yet */
82 if (memcmp(buf, PROXY_PROTOCOL_V1_HDR, PROXY_PROTOCOL_V1_HDR_LEN))
83 return 0;
84 /* TODO: support v2 as well? */
85 return 1;
86}
87
88static int build_proxy_protocol_v1_hdr(const struct ip_addr *src_ip,
89 unsigned short src_port, const struct ip_addr *dst_ip,

Callers 2

check_tcp_proxy_protocolFunction · 0.85
check_udp_proxy_protocolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected