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:
parent
cbde4192ee
commit
b55013b1a7
3 changed files with 22 additions and 8 deletions
1
inany.h
1
inany.h
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue