VRRP Library Functions vrrp_lookup(3VRRP) NAME vrrp_lookup - look up VRRP instances SYNOPSIS cc [ flag ... ] file ... -lvrrp [ library ... ] #include vrrp_ret_t vrrp_lookup(vrid_t id, const char *ifname, int af, int *num, char **names); DESCRIPTION The vrrp_lookup() function looks up existing instances on the system based on VRID, interface name, and address family. Any of these three parameters could be unset, i.e. id and af could be 0, ifname could be NULL. The functions would return all instances matching the given attributes. The number of found instances are returned in num, and the names of all found instances are returned in the names array. If the returned num is not 0 and names is not NULL, the caller should free the array. This function doesn't require extra privileges. RETURN VALUES If any VRRP instances are found, VRRP_SUCCESS is returned. If no VRRP instances are found, VRRP_ENOINST is returned. If VRRP_ESYS is returned, errno contains the specific UNIX system error value. Otherwise, a VRRP error value defined in or listed in the following section is returned. ERRORS VRRP_ENOINST No VRRP instances found ATTRIBUTES See attributes(5) for description of the following attri- butes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Interface Stability | Project Private | |_____________________________|_____________________________| | MT-Level | Safe | |_____________________________|_____________________________| SEE ALSO libvrrp(3LIB), vrrpadm(1M), vrrpd(1M)