maskit commented on code in PR #12032:
URL: https://github.com/apache/trafficserver/pull/12032#discussion_r2021916386
##########
include/ts/ts.h:
##########
@@ -3077,3 +3077,28 @@ TSRalloc(size_t count = 1 /**< Number of instances of T
to allocate storage for.
{
return static_cast<std::remove_cv_t<T> *>(TSmalloc(count * sizeof(T)));
}
+
+/**
+ Return the particular PROXY protocol info requested.
+
+ @param vconn the vconection pointer
+ @param key the requested PROXY protocol info. One of TSVConnPPInfoKey or
TLV type ID
+ @param value a pointer to a const char pointer where the return value is
stored
+ @param length a pointer to a integer where the length of return value is
stored
+
+ @return @c TS_SUCCESS if the requested info is supported, TS_ERROR otherwise
+
+*/
+TSReturnCode TSVConnPPInfoGet(TSVConn vconn, uint16_t key, const char **value,
int *length);
+
+/**
+ Return the particular PROXY protocol info requested.
+
+ @param vconn the vconection pointer
+ @param key the requested PROXY protocol info. One of TSVConnPPInfoKey or
TLV type ID
Review Comment:
No, because it can be a non-standard value.
https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt
```2.2.8. Reserved type ranges
The following range of 16 type values is reserved for application-specific
data and will be never used by the PROXY Protocol. If you need more values
consider extending the range with a type field in your TLVs.
#define PP2_TYPE_MIN_CUSTOM 0xE0
#define PP2_TYPE_MAX_CUSTOM 0xEF
This range of 8 values is reserved for temporary experimental use by
application developers and protocol designers. The values from the range will
never be used by the PROXY protocol and should not be used by production
functionality.
#define PP2_TYPE_MIN_EXPERIMENT 0xF0
#define PP2_TYPE_MAX_EXPERIMENT 0xF7
The following range of 8 values is reserved for future use, potentially to
extend the protocol with multibyte type values.
#define PP2_TYPE_MIN_FUTURE 0xF8
#define PP2_TYPE_MAX_FUTURE 0xFF
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]