So something like this would be more appealing?

typedef enum {
TS_STAT_SSL_PROTOCOL = 0,
TS_STAT_SSL_CIPHER,
TS_STAT_SSL_CURVE,
} TSStatSsl;

int TSHttpTxnClientReqIsSslReused(TSHttpTxn txnp);
const char *TSHttpTxnClientReqSslStatGet(TSHttpTxn txnp, TSStatSsl stat_ssl);

On Wed, Jul 17, 2019 at 1:11 AM Sudheer Vinukonda
<sudheervinuko...@yahoo.com.invalid> wrote:
>
>  Hmm...feels like this is a bit of an overload to write a separate API for 
> each stat - Would it be better to write generic APIs that can return any stat 
> (defined as an ENUM for example)?
>
>
>     On Tuesday, July 16, 2019, 11:07:19 AM PDT, Valentín Gutierrez 
> <vgutier...@wikimedia.org> wrote:
>
>  Hi,
>
> We need to expose several client request SSL stats that are currently
> being gathered in the HttpSM to the Lua plugin. To achieve this I'd
> like to propose adding several functions to the API:
>
> int TSHttpTxnClientReqIsSslReused(TSHttpTxn txnp);
> const char *TSHttpTxnClientReqSslCipherGet(TSHttpTxn txnp);
> const char *TSHttpTxnClientReqSslProtocolGet(TSHttpTxn txnp);
> const char *TSHttpTxnClientReqSslCurveGet(TSHttpTxn txnp);
>
> These API calls would expose the following HttpSM attributes:
> bool client_ssl_reused;
> const char *client_cipher_suite = "-";
> const char *client_sec_protocol = "-";
> const char *client_curve; // Implemented as part of
> https://github.com/apache/trafficserver/pull/5724/
>
>
> An implementation has been already drafted as part of
> https://github.com/apache/trafficserver/pull/5726/
>
> Best Regards,
> Valentín Gutiérrez

Reply via email to