trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yunkai Zhang <>
Subject Re: About implementation of some data structure in lib/ts/apidefs.h
Date Tue, 15 Jul 2014 10:18:13 GMT
There are no implementations about these structures.

What the purpose of them is to add abstracts for all TS API,  they only
indicate a POINTER for C compilers.

You can see the type conversion in the code of TS API, such as:

TSAIOBufGet(TSAIOCallback data)
  AIOCallback* pAIO = (AIOCallback*)data;         //do type conversion. Map
TSAIOCallback to AIOCallback.
  return (char*)pAIO->aiocb.aio_buf;

On Tue, Jul 15, 2014 at 6:00 PM, david hong <> wrote:

> Hi guys,
> I've been digging in ATS code for a while. There are some data structure
> in apidefs.h that I cannot find their implementations in the doc. For
> example,
>     typedef struct tsapi_mloc* TSMLoc;
>     typedef struct tsapi_mbuffer* TSMBuffer;
>     typedef struct tsapi_httpssn* TSHttpSsn;
>     typedef struct tsapi_httptxn* TSHttpTxn;
>     ....
> Since I'm trying to read the code, it would be great if I can get the
> implementation inside each struct (like tsapi_mloc, tsapi_mbuffer ... ) Is
> there any way I could find them ?
> Thanks.

Yunkai Zhang
Work at Taobao

View raw message