Discussion:
getting TSVconn in session start hook handler
Gaurav Bansal
2017-10-31 11:34:20 UTC
Permalink
Hi all,
I have created a session-start-hook (TS_EVENT_HTTP_SSN_START) handler
namely "ssn_start_plugin(TSCont contp, TSEvent event, void *edata)". In
this function, i need TSVConn. Is there any api using which i can get
TSVConn in ssn_start_plugin function using either contp or edata (which is
TSHttpSsn here).

I tried the following approach :
int
ssn_start_plugin(TSCont contp, TSEvent event, void *edata)
{
TSVConn connection;
connection = TSTransformOutputVConnGet(contp);
.....

Can anyone please let me know if this is the right way ? OR is there some
way to get it using TSHttpSsn also.
thanks,
gaurav
Persia Aziz
2017-10-31 15:09:47 UTC
Permalink
TSTransformOutputVConnGet takes TSVConn  not TSHttpSsn. I could not find any API that takes TSHttpSsn and returns TSVConn.
I have made a PR for this: API for retrieving TSVConn from TSHttpSsn by persiaAziz · Pull Request #2740 · apache/trafficserver


|
|
|
| | |

|

|
|
| |
API for retrieving TSVConn from TSHttpSsn by persiaAziz · Pull Request #...

trafficserver - Mirror of Apache Traffic Server
|

|

|




Syeda Persia Aziz
Software DeveloperYahoo! Inc.Champaign, Illinois

On Tuesday, October 31, 2017, 6:34:25 AM CDT, Gaurav Bansal <***@gmail.com> wrote:

Hi all,
I have created a session-start-hook (TS_EVENT_HTTP_SSN_START) handler namely "ssn_start_plugin(TSCont contp, TSEvent event, void *edata)". In this function, i need TSVConn. Is there any api using which i can get TSVConn in ssn_start_plugin function using either contp or edata (which is TSHttpSsn here).

I tried the following approach :int
ssn_start_plugin(TSCont contp, TSEvent event, void *edata)
{
    TSVConn connection;
    connection = TSTransformOutputVConnGet(contp);
.....

Can anyone please let me know if this is the right way ? OR is there some way to get it using TSHttpSsn also.thanks,gaurav
Steven Hunter
2017-11-01 00:09:45 UTC
Permalink
try using web store or play store related apps or ext...
TSTransformOutputVConnGet takes TSVConn not TSHttpSsn. I could not find
any API that takes TSHttpSsn and returns TSVConn.
API for retrieving TSVConn from TSHttpSsn by persiaAziz · Pull Request
#2740 · apache/trafficserver
<https://github.com/apache/trafficserver/pull/2740>
API for retrieving TSVConn from TSHttpSsn by persiaAziz · Pull Request #...
trafficserver - Mirror of Apache Traffic Server
<https://github.com/apache/trafficserver/pull/2740>
Syeda Persia Aziz
Software Developer
Yahoo! Inc.
Champaign, Illinois
On Tuesday, October 31, 2017, 6:34:25 AM CDT, Gaurav Bansal <
Hi all,
I have created a session-start-hook (TS_EVENT_HTTP_SSN_START) handler
namely "ssn_start_plugin(TSCont contp, TSEvent event, void *edata)". In
this function, i need TSVConn. Is there any api using which i can get
TSVConn in ssn_start_plugin function using either contp or edata (which is
TSHttpSsn here).
int
ssn_start_plugin(TSCont contp, TSEvent event, void *edata)
{
TSVConn connection;
connection = TSTransformOutputVConnGet(contp);
.....
Can anyone please let me know if this is the right way ? OR is there some
way to get it using TSHttpSsn also.
thanks,
gaurav
Leif Hedstrom
2017-11-01 16:02:49 UTC
Permalink
TSTransformOutputVConnGet takes TSVConn not TSHttpSsn. I could not find any API that takes TSHttpSsn and returns TSVConn.
This should be proposed / discussed the normal way, as documented in


https://cwiki.apache.org/confluence/display/TS/API+Review+Process <https://cwiki.apache.org/confluence/display/TS/API+Review+Process>


— leif

Loading...