-int with_sockaddr(void *c,
- int (*function)(void *c,
- const struct sockaddr *sa,
- socklen_t len,
- const char *ident)) {
- const char *path;
+/** @brief Figure out what address to connect to
+ * @param c Configuration to honor
+ * @param sap Where to store pointer to sockaddr
+ * @param namep Where to store socket name
+ * @return Socket length, or (socklen_t)-1
+ */
+socklen_t find_server(struct config *c,
+ struct sockaddr **sap, char **namep) {
+ struct sockaddr *sa;