]> www.average.org Git - psmb.git/blobdiff - src/psmb_priv.h
use 'struct in6_pktinfo' from linux/ipv6.h
[psmb.git] / src / psmb_priv.h
index 464665b2c010c53871325b3635cfd11a390d54ca..c80ae62169548b009f8ef63797c72be9e6ee8efe 100644 (file)
@@ -1,11 +1,13 @@
 #ifndef _PSMB_PRIV_H
 
 #include <stdlib.h>
+#include <syslog.h>
 #include <netinet/in.h>
 
 #define PSMB_OK                0
 #define PSMB_ERROR     1
 #define PSMB_NEED_WRITE        2
+#define PSMB_MESSAGE   4
 
 #define PSMB_DEFAULT_PORT 5313
 #define PSMB_DEFAULT_PMTU 1452
@@ -31,12 +33,12 @@ struct _psmb_ctx {
        void *log_priv;
        unsigned short port;
        int pmtu;
+       struct in6_addr prefix;
+       unsigned char prefixlen;
        /* subscription set here */
        struct _msg incoming;
 };
 
-struct _psmb_result {
-       int code;
-};
+#define LOG(ctx, ...) (*ctx->logf)(ctx->log_priv, __VA_ARGS__)
 
 #endif