cleanup TravisCI warnings (missing exports/extraneous args to printf)

This commit is contained in:
Coren[m] 2013-09-11 16:57:26 +02:00
parent be716af15d
commit d0f5ad34ae
2 changed files with 27 additions and 1 deletions

View File

@ -105,7 +105,7 @@ int main(int argc, char *argv[])
if ((argc != argvoffset + 2) && (argc != argvoffset + 4)) {
printf("Usage: %s [--ipv4|--ipv6] ip port public_key (of the DHT bootstrap node)\n", argv[0]);
printf("or\n");
printf(" %s [--ipv4|--ipv6] Save.bak (to read Save.bak as state file)\n", argv[0], argv[0]);
printf(" %s [--ipv4|--ipv6] Save.bak (to read Save.bak as state file)\n", argv[0]);
exit(0);
}

View File

@ -136,6 +136,14 @@ typedef IP4_Port IP_Port;
*/
const char *ip_ntoa(IP *ip);
/* ip_equal
* compares two IPAny structures
* unset means unequal
*
* returns 0 when not equal or when uninitialized
*/
int ip_equal(IP *a, IP *b);
/* ipport_equal
* compares two IPAny_Port structures
* unset means unequal
@ -157,6 +165,24 @@ void ip_copy(IP *target, IP *source);
/* copies an ip_port structure */
void ipport_copy(IP_Port *target, IP_Port *source);
/*
* addr_resolve():
* uses getaddrinfo to resolve an address into an IP address
* uses the first IPv4/IPv6 addresses returned by getaddrinfo
*
* input
* address: a hostname (or something parseable to an IP address)
* ip: ip.family MUST be initialized, either set to a specific IP version
* (AF_INET/AF_INET6) or to the unspecified AF_UNSPEC (= 0), if both
* IP versions are acceptable
*
* returns in ip a valid IPAny (v4/v6),
* prefers v6 if ip.family was AF_UNSPEC and both available
* returns 0 on failure
*/
int addr_resolve(const char *address, IP *to);
/*
* addr_resolve_or_parse_ip
* resolves string into an IP address