--- libaitio/inc/aitio.h 2012/09/17 11:27:54 1.25.2.4 +++ libaitio/inc/aitio.h 2012/11/16 13:28:28 1.26.4.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitio.h,v 1.25.2.4 2012/09/17 11:27:54 misho Exp $ +* $Id: aitio.h,v 1.26.4.2 2012/11/16 13:28:28 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -485,6 +485,15 @@ const char *io_n2addr(io_sockaddr_t * __restrict addr, */ io_sockaddr_t *io_gethostbyname(const char *psHost, unsigned short port, io_sockaddr_t * __restrict addr); +/* + * io_addrcmp() - Compare network addresses + * + * @a = 1st address + * @b = 2nd address + * @p = compare and ports, if family is AF_INET or AF_INET6 + * return: 0 is equal or !=0 is different + */ +int io_addrcmp(io_sockaddr_t * __restrict a, io_sockaddr_t * __restrict b, int p); /* * io_vars2buffer() - Marshaling data from array with variables to buffer @@ -570,6 +579,14 @@ inline int io_setlikeVar(ait_val_t * __restrict v, ait * return: -1 error or >0 copied bytes to variable */ int io_sprintfVar(ait_val_t * __restrict v, const char *fmt, ...); +/* + * io_cmpVar() - Compare two variables + * + * @a = 1st variable + * @b = 2nd variable + * return: 0 is equal or !=0 is different + */ +inline int io_cmpVar(ait_val_t * __restrict a, ait_val_t * __restrict b); /* * io_hashVar() - Generate hash key for variable from string or value *