diff options
author | Ryan Moeller <freqlabs@FreeBSD.org> | 2020-10-21 05:27:25 +0000 |
---|---|---|
committer | Ryan Moeller <freqlabs@FreeBSD.org> | 2020-10-21 05:27:25 +0000 |
commit | 0710ec8ceff0b30f773ac606f29312275513b910 (patch) | |
tree | 9bbbfc85e95e8dd86327fe32ed239270350df2b4 /lib/libifconfig/libifconfig.h | |
parent | c0b5fcf6922574a5facf8c31f7066e6d6341cd82 (diff) | |
download | src-0710ec8ceff0b30f773ac606f29312275513b910.tar.gz src-0710ec8ceff0b30f773ac606f29312275513b910.zip |
Move list_cloners to libifconfig
Move list_cloners() from ifconfig(8) to libifconfig(3) where it can be
reused by other consumers.
Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D26858
Notes
Notes:
svn path=/head/; revision=366906
Diffstat (limited to 'lib/libifconfig/libifconfig.h')
-rw-r--r-- | lib/libifconfig/libifconfig.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/libifconfig/libifconfig.h b/lib/libifconfig/libifconfig.h index ca8e8e817dc1..46a13ae27d69 100644 --- a/lib/libifconfig/libifconfig.h +++ b/lib/libifconfig/libifconfig.h @@ -279,3 +279,13 @@ int ifconfig_create_interface_vlan(ifconfig_handle_t *h, const char *name, int ifconfig_set_vlantag(ifconfig_handle_t *h, const char *name, const char *vlandev, const unsigned short vlantag); + +/** Gets the names of all interface cloners available on the system + * @param bufp Set to the address of the names buffer on success or NULL + * if an error occurs. This buffer must be freed when done. + * @param lenp Set to the number of names in the returned buffer or 0 + * if an error occurs. Each name is contained within an + * IFNAMSIZ length slice of the buffer, for a total buffer + * length of *lenp * IFNAMSIZ bytes. + */ +int ifconfig_list_cloners(ifconfig_handle_t *h, char **bufp, size_t *lenp); |