summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/addr.h
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2022-10-28 02:29:35 +0000
committerDamien Miller <djm@cvs.openbsd.org>2022-10-28 02:29:35 +0000
commitaacaa3b2174a72749aac447ecc65e03d4b554f0c (patch)
treefc09fb98ae4db1e89fa2181d0e8beef9368e0843 /usr.bin/ssh/addr.h
parent61e4962b7d22d3f0c075075c46b32830d6713774 (diff)
allow ssh-keyscan(1) to accept CIDR address ranges, e.g.
ssh-keyscan 192.168.0.0/24 If a CIDR range is passed, then it will be expanded to all possible addresses in the range including the all-0s and all-1s addresses. bz#976 feedback/ok markus@
Diffstat (limited to 'usr.bin/ssh/addr.h')
-rw-r--r--usr.bin/ssh/addr.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.bin/ssh/addr.h b/usr.bin/ssh/addr.h
index 5eff0262859..180e9fdc644 100644
--- a/usr.bin/ssh/addr.h
+++ b/usr.bin/ssh/addr.h
@@ -52,9 +52,13 @@ int addr_sa_pton(const char *h, const char *s, struct sockaddr *sa,
int addr_pton_cidr(const char *p, struct xaddr *n, u_int *l);
int addr_ntop(const struct xaddr *n, char *p, size_t len);
int addr_and(struct xaddr *dst, const struct xaddr *a, const struct xaddr *b);
+int addr_or(struct xaddr *dst, const struct xaddr *a, const struct xaddr *b);
int addr_cmp(const struct xaddr *a, const struct xaddr *b);
int addr_is_all0s(const struct xaddr *n);
int addr_host_is_all0s(const struct xaddr *n, u_int masklen);
+int addr_host_to_all0s(struct xaddr *a, u_int masklen);
+int addr_host_to_all1s(struct xaddr *a, u_int masklen);
int addr_netmatch(const struct xaddr *host, const struct xaddr *net,
u_int masklen);
+void addr_increment(struct xaddr *a);
#endif /* _ADDR_H */