X-Git-Url: http://www.average.org/gitweb/?p=psmb.git;a=blobdiff_plain;f=include%2Fpsmb.h;h=cc320e093a557044848df900a1667d59c8d72d9a;hp=4b92756b85b394a6a6717b4519ab545dc6dfa74d;hb=0e17b577419dd949124a0ca44c335c4ca929e928;hpb=0f3d787b19881c5d489ba476d1e5895df4f77084;ds=sidebyside diff --git a/include/psmb.h b/include/psmb.h index 4b92756..cc320e0 100644 --- a/include/psmb.h +++ b/include/psmb.h @@ -8,10 +8,14 @@ typedef struct _psmb_result psmb_result_t; psmb_ctx_t *psmb_new(void); psmb_ctx_t *psmb_new_mm(void *(*malloc)(size_t size), - void (*free)(void *ptr), - void *(*realloc)(void *ptr, size_t size)); + void (*free)(void *ptr), + void *(*realloc)(void *ptr, size_t size)); +psmb_result_t psmb_set_logf(psmb_ctx_t *ctx, + void (*logf)(void *log_priv, int priority, const char *format, ...), + void *log_priv); psmb_result_t psmb_set_pmtu(psmb_ctx_t *ctx, unsigned int pmtu); psmb_result_t psmb_set_port(psmb_ctx_t *ctx, unsigned short pmtu); +psmb_result_t psmb_set_mgrp(psmb_ctx_t *ctx, struct {unsigned char _uc[16];} pfx, unsigned char bits); psmb_result_t psmb_open(psmb_ctx_t *ctx); void psmb_destroy(psmb_ctx_t *ctx); int psmb_getfd(psmb_ctx_t *ctx); @@ -21,8 +25,8 @@ psmb_result_t psmb_ev_wr(psmb_ctx_t *ctx); psmb_result_t psmb_ev_ex(psmb_ctx_t *ctx); psmb_result_t psmb_subscribe(psmb_ctx_t *ctx, char *channel); psmb_result_t psmb_publish(psmb_ctx_t *ctx, char *channel, - void *data, size_t size); + void *data, size_t size); bool psmb_message(psmb_ctx_t *ctx, char **channel, - void **data, size_t *size); + void **data, size_t *size); #endif