Add in_hosteq() and in_nullhost() macros to make life of developers
porting NetBSD code a little bit easier. Obtained from: NetBSD
This commit is contained in:
parent
1c64b14417
commit
f230fa27fb
@ -534,6 +534,9 @@ int in_localaddr(struct in_addr);
|
||||
char *inet_ntoa(struct in_addr); /* in libkern */
|
||||
char *inet_ntoa_r(struct in_addr ina, char *buf); /* in libkern */
|
||||
|
||||
#define in_hosteq(s, t) ((s).s_addr == (t).s_addr)
|
||||
#define in_nullhost(x) ((x).s_addr == INADDR_ANY)
|
||||
|
||||
#define satosin(sa) ((struct sockaddr_in *)(sa))
|
||||
#define sintosa(sin) ((struct sockaddr *)(sin))
|
||||
#define ifatoia(ifa) ((struct in_ifaddr *)(ifa))
|
||||
|
Loading…
x
Reference in New Issue
Block a user