~mdw
/
tripe
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
server/: Calculate address size on demand, rather than tracking it.
[tripe]
/
server
/
tripe.h
diff --git
a/server/tripe.h
b/server/tripe.h
index
3402776
..
fa5333b
100644
(file)
--- a/
server/tripe.h
+++ b/
server/tripe.h
@@
-595,7
+595,6
@@
typedef struct peerspec {
const tunnel_ops *tops; /* Tunnel operations */
unsigned long t_ka; /* Keep alive interval */
addr sa; /* Socket address to speak to */
const tunnel_ops *tops; /* Tunnel operations */
unsigned long t_ka; /* Keep alive interval */
addr sa; /* Socket address to speak to */
- size_t sasz; /* Socket address size */
unsigned f; /* Flags for the peer */
#define PSF_KXMASK 255u /* Key-exchange flags to set */
#define PSF_MOBILE 256u /* Address may change rapidly */
unsigned f; /* Flags for the peer */
#define PSF_KXMASK 255u /* Key-exchange flags to set */
#define PSF_MOBILE 256u /* Address may change rapidly */
@@
-1730,6
+1729,15
@@
extern const char *timestr(time_t /*t*/);
extern int mystrieq(const char */*x*/, const char */*y*/);
extern int mystrieq(const char */*x*/, const char */*y*/);
+/* --- @addrsz@ --- *
+ *
+ * Arguments: @const addr *a@ = a network address
+ *
+ * Returns: The size of the address, for passing into the sockets API.
+ */
+
+extern socklen_t addrsz(const addr */*a*/);
+
/* --- @seq_reset@ --- *
*
* Arguments: @seqwin *s@ = sequence-checking window
/* --- @seq_reset@ --- *
*
* Arguments: @seqwin *s@ = sequence-checking window