From: Aaron Lipinski Date: Wed, 7 Apr 2021 01:11:55 +0000 (+1200) Subject: export get_hostent_from_name X-Git-Tag: v0.95~6^2~2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=6521dc4fb0a0aa6baff11af20b066b2f713edbf8;p=thirdparty%2Fmtr.git export get_hostent_from_name --- diff --git a/ui/mtr.c b/ui/mtr.c index 9586780..a044d1e 100644 --- a/ui/mtr.c +++ b/ui/mtr.c @@ -38,7 +38,6 @@ #include #endif -#include #include #include #include @@ -695,11 +694,12 @@ static void init_rand( would be to use gethostbyname(). We'll use getaddrinfo() instead to generate the hostent. */ -static int get_hostent_from_name( +int get_hostent_from_name( struct mtr_ctl *ctl, struct addrinfo **res, const char *name) { + printf("get_hostent_from_name: %x %s\n", ctl->af, name); int gai_error; struct addrinfo hints; diff --git a/ui/mtr.h b/ui/mtr.h index 92dd8a1..5de5d9f 100644 --- a/ui/mtr.h +++ b/ui/mtr.h @@ -23,6 +23,7 @@ #include "config.h" #include +#include #include #include @@ -148,4 +149,9 @@ struct mplslen { #define running_as_root() (getuid() == 0) #endif +int get_hostent_from_name( + struct mtr_ctl *ctl, + struct addrinfo **res, + const char *name); + #endif /* MTR_MTR_H */