Dillo v3.1.1-98-g318d1f14
|
Go to the source code of this file.
Classes | |
struct | ChainLink |
Main data structure for CCC nodes. More... | |
struct | DataBuf |
A convenience data structure for passing data chunks between nodes. More... | |
Macros | |
#define | OpStart 1 |
#define | OpSend 2 |
#define | OpStop 3 |
#define | OpEnd 4 |
#define | OpAbort 5 |
#define | CCC_Stopped (1 << 0) |
#define | CCC_Ended (1 << 1) |
#define | CCC_Aborted (1 << 2) |
#define | FWD 1 |
#define | BCK 2 |
Typedefs | |
typedef struct ChainLink | ChainLink |
typedef void(* | ChainFunction_t) (int Op, int Branch, int Dir, ChainLink *Info, void *Data1, void *Data2) |
Functions | |
ChainLink * | a_Chain_new (void) |
Create and initialize a new chain-link. | |
ChainLink * | a_Chain_link_new (ChainLink *AInfo, ChainFunction_t AFunc, int Direction, ChainFunction_t BFunc, int AtoB_branch, int BtoA_branch) |
Create a new link from module A to module B. | |
void | a_Chain_unlink (ChainLink *Info, int Direction) |
Unlink a previously used link. | |
int | a_Chain_fcb (int Op, ChainLink *Info, void *Data1, void *Data2) |
Issue the forward callback of the 'Info' link. | |
int | a_Chain_bcb (int Op, ChainLink *Info, void *Data1, void *Data2) |
Issue the backward callback of the 'Info' link. | |
int | a_Chain_bfcb (int Op, ChainLink *Info, void *Data1, void *Data2) |
Issue the backward callback of the 'Info' link and then the forward callback (used for OpAbort and OpStop). | |
int | a_Chain_check (char *FuncStr, int Op, int Branch, int Dir, ChainLink *Info) |
Check whether the CCC is operative. | |
DataBuf * | a_Chain_dbuf_new (void *buf, int size, int code) |
Allocate and initialize a new DataBuf structure. | |
typedef void(* ChainFunction_t) (int Op, int Branch, int Dir, ChainLink *Info, void *Data1, void *Data2) |
int a_Chain_bcb | ( | int | Op, |
ChainLink * | Info, | ||
void * | Data1, | ||
void * | Data2 | ||
) |
Issue the backward callback of the 'Info' link.
Definition at line 126 of file chain.c.
References ChainLink::Bcb, ChainLink::BcbBranch, ChainLink::BcbInfo, BCK, CCC_Aborted, CCC_Ended, ChainLink::Flags, OpAbort, and OpEnd.
Referenced by a_Capi_ccc(), a_Chain_bfcb(), a_Dpi_ccc(), a_Http_ccc(), Http_connect_tls(), and Http_send_query().
int a_Chain_bfcb | ( | int | Op, |
ChainLink * | Info, | ||
void * | Data1, | ||
void * | Data2 | ||
) |
Issue the backward callback of the 'Info' link and then the forward callback (used for OpAbort and OpStop).
Definition at line 150 of file chain.c.
References a_Chain_bcb(), a_Chain_fcb(), ChainLink::Flags, OpAbort, and OpEnd.
Referenced by a_Http_ccc(), a_Http_connect_done(), Http_connect_tls(), and Http_dns_cb().
int a_Chain_check | ( | char * | FuncStr, |
int | Op, | ||
int | Branch, | ||
int | Dir, | ||
ChainLink * | Info | ||
) |
Check whether the CCC is operative.
Also used to hook debug information.
Definition at line 186 of file chain.c.
References CCC_Aborted, CCC_Ended, Chain_debug_msg(), ChainLink::Flags, and MSG_WARN.
Referenced by a_Capi_ccc(), a_Dpi_ccc(), a_Http_ccc(), and a_IO_ccc().
DataBuf * a_Chain_dbuf_new | ( | void * | buf, |
int | size, | ||
int | code | ||
) |
Allocate and initialize a new DataBuf structure.
Definition at line 171 of file chain.c.
References DataBuf::Buf, DataBuf::Code, dNew, and DataBuf::Size.
Referenced by a_Capi_dpi_send_data(), a_IO_ccc(), Capi_conn_resume(), Dpi_parse_token(), Http_connect_tls(), and Http_send_query().
int a_Chain_fcb | ( | int | Op, |
ChainLink * | Info, | ||
void * | Data1, | ||
void * | Data2 | ||
) |
Issue the forward callback of the 'Info' link.
Definition at line 103 of file chain.c.
References CCC_Aborted, CCC_Ended, ChainLink::Fcb, ChainLink::FcbBranch, ChainLink::FcbInfo, ChainLink::Flags, FWD, OpAbort, and OpEnd.
Referenced by a_Chain_bfcb(), a_Dpi_ccc(), a_Http_ccc(), a_IO_ccc(), and Dpi_parse_token().
ChainLink * a_Chain_link_new | ( | ChainLink * | AInfo, |
ChainFunction_t | AFunc, | ||
int | Direction, | ||
ChainFunction_t | BFunc, | ||
int | AtoB_branch, | ||
int | BtoA_branch | ||
) |
Create a new link from module A to module B.
Direction | tells whether to make a forward or backward link.
|
AtoB_branch | branch on which 'B' receives communications from 'A' |
BtoA_branch | branch on which 'A' receives communications from 'B' |
Definition at line 55 of file chain.c.
References a_Chain_new(), ChainLink::Bcb, ChainLink::BcbBranch, ChainLink::BcbInfo, BCK, ChainLink::Fcb, ChainLink::FcbBranch, and ChainLink::FcbInfo.
Referenced by a_Capi_ccc(), a_Dpi_ccc(), and a_Http_ccc().
ChainLink * a_Chain_new | ( | void | ) |
Create and initialize a new chain-link.
Definition at line 42 of file chain.c.
References dNew0.
Referenced by a_Capi_dpi_send_data(), a_Capi_open_url(), and a_Chain_link_new().
void a_Chain_unlink | ( | ChainLink * | Info, |
int | Direction | ||
) |
Unlink a previously used link.
Direction | tells whether to unlink the forward or backward link. |
Definition at line 86 of file chain.c.
References ChainLink::Bcb, ChainLink::BcbBranch, ChainLink::BcbInfo, ChainLink::Fcb, ChainLink::FcbBranch, ChainLink::FcbInfo, and FWD.