1
0
Fork 0
mirror of https://passt.top/passt synced 2025-06-16 04:15:34 +02:00

inany: Add inany_pton() helper

We already have an inany_ntop() function to format inany addresses into
text.  Add inany_pton() to parse them from text, and use it in
conf_ports().

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
David Gibson 2024-09-20 14:12:44 +10:00 committed by Stefano Brivio
parent cbde4192ee
commit b55013b1a7
3 changed files with 22 additions and 8 deletions

View file

@ -270,5 +270,6 @@ static inline void inany_siphash_feed(struct siphash_state *state,
#define INANY_ADDRSTRLEN MAX(INET_ADDRSTRLEN, INET6_ADDRSTRLEN)
const char *inany_ntop(const union inany_addr *src, char *dst, socklen_t size);
int inany_pton(const char *src, union inany_addr *dst);
#endif /* INANY_H */