Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
sofia-sip
Commits
ad86f434
Commit
ad86f434
authored
Feb 23, 2006
by
Pekka Pessi
Browse files
Added SU_ADDRLEN() macro.
darcs-hash:20060223211932-65a35-1a0c9f266cab3375cadce6c59451769066bc94c2.gz
parent
47edc062
Changes
1
Hide whitespace changes
Inline
Side-by-side
libsofia-sip-ua/su/sofia-sip/su.h
View file @
ad86f434
...
...
@@ -306,6 +306,22 @@ const char *inet_ntop(int af, void const *src, char *dst, size_t size);
(void *)&(su)->su_sa.sa_data)
#endif
/**@HI Get length of address field.
*
* The macro SU_ADDRLEN() returns length of the address field (sin_data,
* sin_addr or sin_addr6, depending on the address family).
*/
#if SU_HAVE_IN6
#define SU_ADDRLEN(su) \
((su)->su_family == AF_INET ? sizeof((su)->su_sin.sin_addr) : \
((su)->su_family == AF_INET6 ? sizeof((su)->su_sin6.sin6_addr) : \
sizeof((su)->su_sa.sa_data)))
#else
#define SU_ADDRLEN(su) \
((su)->su_family == AF_INET ? sizeof((su)->su_sin.sin_addr) : \
sizeof((su)->su_sa.sa_data))
#endif
/**@HI Test if su_sockaddr_t is INADDR_ANY or IN6ADDR_ANY. */
#if SU_HAVE_IN6
#define SU_HAS_INADDR_ANY(su) \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment