mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
cleanup TravisCI warnings (missing exports/extraneous args to printf)
This commit is contained in:
parent
be716af15d
commit
d0f5ad34ae
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user