|
i am puzzled by the macros used in the source code of
kannel
just like the difinition of the MSG and the
State-machine
here is the source code in the wtls_state-decl.h
ROW(CREATING,
SEC_Exception_Req, 1, { info(0,"----------------begin a new 12 machine-----------"); /* Send off a T_Unitdata_Req containing an exception as specified */ send_alert(event->u.SEC_Exception_Req.alert_level, event->u.SEC_Exception_Req.alert_desc, wtls_machine); }, CREATING) the source code in the wtls.c
if(event->type == T_Unitdata_Ind)
{ if( wtls_machine->encrypted ) { info(0, "lyl: start pdu list "); wtls_decrypt_pdu_list(wtls_machine, event->u.T_Unitdata_Ind.pdu_list); } info(0, "lyl: end pdu list "); du_list); }
#define STATE_NAME(state)
#define ROW(wtls_state, event_type, condition, action, next_state) \ if (wtls_machine->state == wtls_state && \ event->type == event_type && \ (condition)) { \ action \ wtls_machine->state = next_state; \ debug("wap.wtls", 0, "WTLS %ld: New state %s", wtls_machine->mid , #next_state); \ } else #include "wtls_state-decl.h" { error(0, "WTLS: handle_event: unhandled event!"); debug("wap.wtls",0, "lyl: event->type = %d", event->type); wap_event_destroy(event); return; } i want to know how to use and run it ,please help me
:)
|
- Re: how to use the MACROs? ww
- Re: how to use the MACROs? Aarno Syv�nen
