struct iovec;
struct Client;
-
-struct MsgCounts {
- int alloc;
- int used;
-};
-
-/*
- * These should be considered read-only
- */
-extern struct MsgCounts msgBufCounts; /* resource count for struct MsgBuf */
-extern struct MsgCounts msgCounts; /* resource count for struct Msg */
+struct StatDesc;
struct Msg;
struct MsgBuf;
*/
extern void msgq_init(struct MsgQ *mq);
extern void msgq_delete(struct MsgQ *mq, unsigned int length);
-extern const char *msgq_map(const struct MsgQ *mq, unsigned int *length_p);
-extern int msgq_mapiov(const struct MsgQ *mq, struct iovec *iov, int count);
+extern int msgq_mapiov(const struct MsgQ *mq, struct iovec *iov, int count,
+ unsigned int *len);
extern struct MsgBuf *msgq_make(struct Client *dest, const char *format, ...);
extern struct MsgBuf *msgq_vmake(struct Client *dest, const char *format,
va_list args);
const char *format, ...);
extern void msgq_clean(struct MsgBuf *mb);
extern void msgq_add(struct MsgQ *mq, struct MsgBuf *mb, int prio);
-extern void msgq_count_memory(size_t *msg_alloc, size_t *msg_used,
- size_t *msgbuf_alloc, size_t *msgbuf_used);
+extern void msgq_count_memory(struct Client *cptr,
+ size_t *msg_alloc, size_t *msg_used);
+extern void msgq_histogram(struct Client *cptr, struct StatDesc *sd, int stat,
+ char *param);
extern unsigned int msgq_bufleft(struct MsgBuf *mb);
#endif /* INCLUDED_msgq_h */