chiark
/
gitweb
/
~ian
/
secnet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make list_length and string_item_to_ipaddr const-correct.
[secnet.git]
/
util.h
diff --git
a/util.h
b/util.h
index c2f10f83d33e0fa697f09d7a43353f77dfeec417..836b53efe55c77fea0cfd5ac7f0ab5331c7690d3 100644
(file)
--- a/
util.h
+++ b/
util.h
@@
-31,7
+31,7
@@
extern void *buf_unprepend(struct buffer_if *buf, int32_t amount);
static inline int32_t buf_remaining_space(const struct buffer_if *buf)
{
static inline int32_t buf_remaining_space(const struct buffer_if *buf)
{
- return (buf->base + buf->
len) - buf->start
;
+ return (buf->base + buf->
alloclen) - (buf->start + buf->size)
;
}
extern void buffer_readonly_view(struct buffer_if *n, const void*, int32_t len);
}
extern void buffer_readonly_view(struct buffer_if *n, const void*, int32_t len);
@@
-56,6
+56,10
@@
extern void send_nak(const struct comm_addr *dest, uint32_t our_index,
extern int consttime_memeq(const void *s1, const void *s2, size_t n);
extern int consttime_memeq(const void *s1, const void *s2, size_t n);
+const char *iaddr_to_string(const union iaddr *ia);
+bool_t iaddr_equal(const union iaddr *ia, const union iaddr *ib);
+int iaddr_socklen(const union iaddr *ia);
+
#define MINMAX(ae,be,op) ({ \
typeof((ae)) a=(ae); \
typeof((be)) b=(be); \
#define MINMAX(ae,be,op) ({ \
typeof((ae)) a=(ae); \
typeof((be)) b=(be); \