/* Copyright (c) 2014 IOnU Security Inc. All rights reserved Created March 2014 by Kendrick Webster K2Client/proxy.h - interface for K2Proxy adapter Description: Clients behind firewalls that block UDP traffic will fall back on using an HTTP/TCP proxy. This module provides low-level support for sending and receiving datagrams via K2Proxy. */ #pragma once #include // start (or re-initialize) the proxy module's thread(s) ... begins listening ... // packets received from the K2Proxy at are sent to the callback void proxy_start(const struct sockaddr_in* proxy_addr, const char* proxy_host, const char* urn, void (*onPacketReceived)(uint8_t* buf, size_t len)); // send a UDP packet via the K2Proxy at proxy_start() // packet will be dropped if isn't TRUE void proxy_send(const uint8_t* buf, unsigned int len); // stop the proxy module's thread(s) void proxy_stop(void); // read-only by other modules, indicates that a proxy session is currently active // (thus calling proxy_send() will work) extern volatile int is_proxy_session_active;