libwebsockets
Lightweight C library for HTML5 websockets
Toggle main menu visibility
Loading...
Searching...
No Matches
lws-proxy-v2.h
Go to the documentation of this file.
1
/*
2
* libwebsockets - small server side websockets and web server implementation
3
*
4
* Copyright (C) 2010 - 2026 Andy Green <andy@warmcat.com>
5
*
6
* Permission is hereby granted, free of charge, to any person obtaining a copy
7
* of this software and associated documentation files (the "Software"), to
8
* deal in the Software without restriction, including without limitation the
9
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10
* sell copies of the Software, and to permit persons to whom the Software is
11
* furnished to do so, subject to the following conditions:
12
*
13
* The above copyright notice and this permission notice shall be included in
14
* all copies or substantial portions of the Software.
15
*
16
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22
* IN THE SOFTWARE.
23
*/
24
46
47
/* the most of a header we accept: addresses and a few small TLVs */
48
#define LWS_PROXY_V2_MAX (16 + 512)
49
50
typedef
struct
lws_proxy_v2
{
51
lws_sockaddr46
src
;
52
lws_sockaddr46
dst
;
53
char
authority
[256];
55
char
alpn
[64];
56
uint8_t
local
;
58
uint8_t
dgram
;
59
}
lws_proxy_v2_t
;
60
72
LWS_VISIBLE
LWS_EXTERN
int
73
lws_proxy_v2_header_len
(
const
uint8_t
*buf,
size_t
len);
74
90
LWS_VISIBLE
LWS_EXTERN
int
91
lws_proxy_v2_parse
(
const
uint8_t
*buf,
size_t
len,
lws_proxy_v2_t
*pv);
92
106
LWS_VISIBLE
LWS_EXTERN
int
107
lws_proxy_v2_render
(
const
lws_proxy_v2_t
*pv,
uint8_t
*buf,
size_t
len);
108
lws_proxy_v2::alpn
char alpn[64]
Definition
lws-proxy-v2.h:55
lws_proxy_v2::src
lws_sockaddr46 src
Definition
lws-proxy-v2.h:51
lws_proxy_v2::authority
char authority[256]
Definition
lws-proxy-v2.h:53
lws_proxy_v2::dgram
uint8_t dgram
Definition
lws-proxy-v2.h:58
lws_proxy_v2::local
uint8_t local
Definition
lws-proxy-v2.h:56
lws_proxy_v2::dst
lws_sockaddr46 dst
Definition
lws-proxy-v2.h:52
lws_proxy_v2_render
LWS_VISIBLE LWS_EXTERN int lws_proxy_v2_render(const lws_proxy_v2_t *pv, uint8_t *buf, size_t len)
lws_proxy_v2_parse
LWS_VISIBLE LWS_EXTERN int lws_proxy_v2_parse(const uint8_t *buf, size_t len, lws_proxy_v2_t *pv)
lws_proxy_v2_t
struct lws_proxy_v2 lws_proxy_v2_t
lws_proxy_v2_header_len
LWS_VISIBLE LWS_EXTERN int lws_proxy_v2_header_len(const uint8_t *buf, size_t len)
lws_proxy_v2
Definition
lws-proxy-v2.h:50
lws_sockaddr46
Definition
lws-adopt.h:91
LWS_EXTERN
#define LWS_EXTERN
Definition
libwebsockets.h:327
uint8_t
unsigned char uint8_t
Definition
libwebsockets.h:746
LWS_VISIBLE
#define LWS_VISIBLE
Definition
libwebsockets.h:322
include
libwebsockets
lws-proxy-v2.h
Generated on
for libwebsockets by
1.18.0