aboutsummaryrefslogtreecommitdiff
path: root/lib/libifconfig/libifconfig.h
diff options
context:
space:
mode:
authorRyan Moeller <freqlabs@FreeBSD.org>2021-02-28 09:34:30 +0000
committerRyan Moeller <freqlabs@FreeBSD.org>2021-02-28 21:43:54 +0000
commitb12a960e4274926171dc7a4f9887a0d0a5195b44 (patch)
tree3ff1fcfdeb174c7f28ea0228d7051624ddfd655a /lib/libifconfig/libifconfig.h
parent64bacab177f7c743af3268a3e1ffcddaf77a68d0 (diff)
downloadsrc-b12a960e4274926171dc7a4f9887a0d0a5195b44.tar.gz
src-b12a960e4274926171dc7a4f9887a0d0a5195b44.zip
libifconfig: Add a function to get down reason
For use in ifconfig. Reviewed by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28991
Diffstat (limited to 'lib/libifconfig/libifconfig.h')
-rw-r--r--lib/libifconfig/libifconfig.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libifconfig/libifconfig.h b/lib/libifconfig/libifconfig.h
index 46a13ae27d69..d8245ea13b23 100644
--- a/lib/libifconfig/libifconfig.h
+++ b/lib/libifconfig/libifconfig.h
@@ -207,6 +207,15 @@ const char *ifconfig_media_get_subtype(int ifmw);
const char *ifconfig_media_get_status(const struct ifmediareq *ifmr);
void ifconfig_media_get_options_string(int ifmw, char *buf, size_t buflen);
+/** Retrieve the reason the interface is down
+ * @param h An open ifconfig state object
+ * @param name The interface name
+ * @param ifdr Return argument.
+ * @return 0 on success, nonzero on failure
+ */
+int ifconfig_media_get_downreason(ifconfig_handle_t *h, const char *name,
+ struct ifdownreason *ifdr);
+
int ifconfig_carp_get_info(ifconfig_handle_t *h, const char *name,
struct carpreq *carpr, int ncarpr);