From: Lennart Poettering Date: Sat, 18 Oct 2014 14:06:21 +0000 (+0200) Subject: man: document sd_machine_get_class() and sd_machine_get_ifindices() X-Git-Tag: v217~194 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=5c8da64734d7dbf4058b3f9f89268f1e093a47b6 man: document sd_machine_get_class() and sd_machine_get_ifindices() --- diff --git a/Makefile-man.am b/Makefile-man.am index a13e948bc..6a74abdb0 100644 --- a/Makefile-man.am +++ b/Makefile-man.am @@ -46,6 +46,7 @@ MANPAGES += \ man/sd_journal_seek_head.3 \ man/sd_journal_stream_fd.3 \ man/sd_listen_fds.3 \ + man/sd_machine_get_class.3 \ man/sd_notify.3 \ man/sd_watchdog_enabled.3 \ man/shutdown.8 \ @@ -192,6 +193,7 @@ MANPAGES_ALIAS += \ man/sd_journal_set_data_threshold.3 \ man/sd_journal_test_cursor.3 \ man/sd_journal_wait.3 \ + man/sd_machine_get_ifindices.3 \ man/sd_notifyf.3 \ man/systemd-ask-password-console.path.8 \ man/systemd-ask-password-wall.path.8 \ @@ -297,6 +299,7 @@ man/sd_journal_sendv.3: man/sd_journal_print.3 man/sd_journal_set_data_threshold.3: man/sd_journal_get_data.3 man/sd_journal_test_cursor.3: man/sd_journal_get_cursor.3 man/sd_journal_wait.3: man/sd_journal_get_fd.3 +man/sd_machine_get_ifindices.3: man/sd_machine_get_class.3 man/sd_notifyf.3: man/sd_notify.3 man/systemd-ask-password-console.path.8: man/systemd-ask-password-console.service.8 man/systemd-ask-password-wall.path.8: man/systemd-ask-password-console.service.8 @@ -544,6 +547,9 @@ man/sd_journal_test_cursor.html: man/sd_journal_get_cursor.html man/sd_journal_wait.html: man/sd_journal_get_fd.html $(html-alias) +man/sd_machine_get_ifindices.html: man/sd_machine_get_class.html + $(html-alias) + man/sd_notifyf.html: man/sd_notify.html $(html-alias) @@ -1605,6 +1611,7 @@ EXTRA_DIST += \ man/sd_journal_stream_fd.xml \ man/sd_listen_fds.xml \ man/sd_login_monitor_new.xml \ + man/sd_machine_get_class.xml \ man/sd_notify.xml \ man/sd_pid_get_session.xml \ man/sd_seat_get_active.xml \ diff --git a/man/sd_machine_get_class.xml b/man/sd_machine_get_class.xml new file mode 100644 index 000000000..d06b75231 --- /dev/null +++ b/man/sd_machine_get_class.xml @@ -0,0 +1,126 @@ + + + + + + + + + sd_machine_get_class + systemd + + + + Developer + Lennart + Poettering + lennart@poettering.net + + + + + + sd_machine_get_class + 3 + + + + sd_machine_get_class + sd_machine_get_ifindices + Determine the class and network interface + indices of a locally running virtual machine or + container. + + + + + #include <systemd/sd-login.h> + + + int sd_machine_get_class + const char* machine + char *class + + + + int sd_machine_get_ifindices + const char* machine + int **ifindices + + + + + + Description + + sd_machine_get_class() may + be used to determine the class of a locally running + virtual machine or container that is registered with + systemd-machined.service8. The + string returned is either vm or + container. The returned string + needs to be freed with the libc free3 + call after use. + + sd_machine_get_ifindices() + may be used to determine the numeric indices of the + network interfaces on the host that are pointing + towards the specified locally running virtual machine + or container that is registered with + systemd-machined.service8. The + returned array needs to be freed with the libc + free3 + call after use. + + + + Return Value + + On success, these calls return 0 or a positive + integer. On failure, these calls return a negative + errno-style error code. + + + + Notes + + The sd_machine_get_class() and + sd_machine_get_ifindices() interfaces are + available as a shared library, which can be compiled + and linked to with the + libsystemd pkg-config1 + file. + + + + See Also + + + systemd1, + sd-login3, + systemd-machined.service8, + sd_pid_get_machine_name3 + + + + diff --git a/man/sd_pid_get_session.xml b/man/sd_pid_get_session.xml index 4b7960345..050f701da 100644 --- a/man/sd_pid_get_session.xml +++ b/man/sd_pid_get_session.xml @@ -264,7 +264,8 @@ sd-login3, sd_session_is_active3, getsid2, - systemd.slice5 + systemd.slice5, + systemd-machined.service8