chiark
/
gitweb
/
~ian
/
secnet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changelog: tidy up changes since 0.5.1
[secnet.git]
/
comm-common.h
diff --git
a/comm-common.h
b/comm-common.h
index b517f951862d6b25d92156f4371d1e8526019d0e..45340e4202e8bfe6a05dd906a4a1090e9ee80eec 100644
(file)
--- a/
comm-common.h
+++ b/
comm-common.h
@@
-4,7
+4,7
@@
*
* secnet is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
*
* secnet is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version
d
of the License, or
+ * the Free Software Foundation; either version
3
of the License, or
* (at your option) any later version.
*
* secnet is distributed in the hope that it will be useful, but
* (at your option) any later version.
*
* secnet is distributed in the hope that it will be useful, but
@@
-38,16
+38,20
@@
struct commcommon { /* must be first so that void* is comm_common* */
struct cloc loc;
struct comm_notify_list notify;
struct buffer_if *rbuf;
struct cloc loc;
struct comm_notify_list notify;
struct buffer_if *rbuf;
+ struct priomsg why_unwanted;
};
};
+struct comm_clientinfo *comm_clientinfo_ignore(void *state, dict_t*,
+ struct cloc cloc);
void comm_request_notify(void *commst, void *nst, comm_notify_fn *fn);
void comm_release_notify(void *commst, void *nst, comm_notify_fn *fn);
void comm_request_notify(void *commst, void *nst, comm_notify_fn *fn);
void comm_release_notify(void *commst, void *nst, comm_notify_fn *fn);
-bool_t comm_notify(struct comm
_notify_list *notify
, struct buffer_if *buf,
+bool_t comm_notify(struct comm
common*
, struct buffer_if *buf,
const struct comm_addr *ca);
/* Either: returns True, with message delivered and buffer freed.
const struct comm_addr *ca);
/* Either: returns True, with message delivered and buffer freed.
- * Or: False, if no-one wanted it - buffer still allocd'd.
- * Ie, like comm_notify_fn. */
+ * Or: False, if no-one wanted it - buffer still allocd'd;
+ * in that case, cc->why_unwanted has info
+ * Ie, roughly like comm_notify_fn. */
void comm_apply(struct commcommon *cc, void *st);
void comm_apply(struct commcommon *cc, void *st);
@@
-55,6
+59,7
@@
void comm_apply(struct commcommon *cc, void *st);
NEW(st); \
(cc)->loc=loc; \
(cc)->cl.description=desc; \
NEW(st); \
(cc)->loc=loc; \
(cc)->cl.description=desc; \
+ (cc)->ops.clientinfo=comm_clientinfo_ignore; \
(cc)->ops.sendmsg=prefix##sendmsg; \
(cc)->ops.addr_to_string=prefix##addr_to_string; \
comm_apply((cc),(st))
(cc)->ops.sendmsg=prefix##sendmsg; \
(cc)->ops.addr_to_string=prefix##addr_to_string; \
comm_apply((cc),(st))