From 6521dc4fb0a0aa6baff11af20b066b2f713edbf8 Mon Sep 17 00:00:00 2001 From: Aaron Lipinski Date: Wed, 7 Apr 2021 13:11:55 +1200 Subject: [PATCH] export get_hostent_from_name --- ui/mtr.c | 4 ++-- ui/mtr.h | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) 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 */ -- 2.47.2