]> www.average.org Git - psmb.git/blobdiff - src/psmb_priv.h
some error logging
[psmb.git] / src / psmb_priv.h
index 464665b2c010c53871325b3635cfd11a390d54ca..517f0cf67ece3853dcee9bd24b0a9d3478cfb29f 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef _PSMB_PRIV_H
 
 #include <stdlib.h>
+#include <syslog.h>
 #include <netinet/in.h>
 
 #define PSMB_OK                0
@@ -31,6 +32,8 @@ struct _psmb_ctx {
        void *log_priv;
        unsigned short port;
        int pmtu;
+       struct in6_addr prefix;
+       unsigned char prefixlen;
        /* subscription set here */
        struct _msg incoming;
 };
@@ -39,4 +42,6 @@ struct _psmb_result {
        int code;
 };
 
+#define LOG(ctx, ...) (*ctx->logf)(ctx->log_priv, __VA_ARGS__)
+
 #endif