diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2022-07-19 14:59:23 +0200 | 
|---|---|---|
| committer | Philippe Guibert <philippe.guibert@6wind.com> | 2022-11-14 17:42:55 +0100 | 
| commit | c1657d2669cb8be9cd0d0b2e6d1c7080b63422a0 (patch) | |
| tree | 356f6fa906604987521f35a7232c9051fa125d32 /lib/ipaddr.h | |
| parent | 116f9b45ede641316ae2f0bf75bc87246b31fdf3 (diff) | |
pathd: use a define to store the the length of endpoint string
The endpoint string is a 46 byte length buffer. Use a single
place to store the length of that buffer.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'lib/ipaddr.h')
| -rw-r--r-- | lib/ipaddr.h | 2 | 
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ipaddr.h b/lib/ipaddr.h index d7ab358afe..43b3028200 100644 --- a/lib/ipaddr.h +++ b/lib/ipaddr.h @@ -61,6 +61,8 @@ struct ipaddr {  #define IPADDRSZ(p)                                                            \  	(IS_IPADDR_V4((p)) ? sizeof(struct in_addr) : sizeof(struct in6_addr)) +#define IPADDR_STRING_SIZE 46 +  static inline int ipaddr_family(const struct ipaddr *ip)  {  	switch (ip->ipa_type) {  | 
