diff options
author | djm@openbsd.org <djm@openbsd.org> | 2022-10-28 02:29:34 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2022-10-28 13:39:35 +1100 |
commit | 1192588546c29ceec10775125f396555ea71850f (patch) | |
tree | 72e61525bc48f50d8854a5d65668e966cb1e8ab2 /addr.h | |
parent | 64af4209309461c79c39eda2d13f9d77816c6398 (diff) |
upstream: 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@
OpenBSD-Commit-ID: ce6c5211f936ac0053fd4a2ddb415277931e6c4b
Diffstat (limited to 'addr.h')
-rw-r--r-- | addr.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 */ |