1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |
| #include <gsasl.h> | | //auxiliary function | int | init(Gsasl* p1){ | return 1; | } | | //auxiliary function | void | done(Gsasl* p1){} | | //auxiliary function | int | start(Gsasl_session* p1, void** p2){ | return 2; | } | | //auxiliary function | int | step( | Gsasl_session* p1, | void* p2, | char const* p3, | size_t p4, | char** p5, | size_t* p6){ | return 3; | } | | //auxiliary function | void | finish(Gsasl_session* p1, void* p2){} | | int main(int argc, char *argv[]) | { | Gsasl_session* sctx = 0; | gsasl_client_start(0, "mech", &sctx); | | Gsasl* ctx = gsasl_ctx_get(sctx); | Gsasl_mechanism mech = { | .name = "name", | .client = (struct Gsasl_mechanism_functions) { | .init = &init, | .done = &done, | .start = &start, | .step = &step, | .finish = &finish, | .encode = &step, | .decode = &step}, | .server = (struct Gsasl_mechanism_functions) { | .init = &init, | .done = &done, | .start = &start, | .step = &step, | .finish = &finish, | .encode = &step, | .decode = &step}}; | gsasl_register(ctx, &mech); //target call | return 0; | } |
|