From 4c4db7f9da1aa29c264a9f9d7d9fb1d774e28ee1 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 22 Apr 2009 03:20:27 +0200 Subject: sysdeps-unix: add basic IO primitives for unix fd passing This introduces three new functions: _dbus_read_socket_with_unix_fds _dbus_write_socket_with_unix_fds _dbus_read_socket_with_unix_fds_two These work exactly like their counterpart sans 'with_unix_fds' except that they also send/recieve file descriptors along with the actual payload data. --- dbus/dbus-sysdeps.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'dbus/dbus-sysdeps.h') diff --git a/dbus/dbus-sysdeps.h b/dbus/dbus-sysdeps.h index 68fcdf61..6f47e48b 100644 --- a/dbus/dbus-sysdeps.h +++ b/dbus/dbus-sysdeps.h @@ -153,6 +153,28 @@ int _dbus_write_socket_two (int fd, const DBusString *buffer2, int start2, int len2); + +int _dbus_read_socket_with_unix_fds (int fd, + DBusString *buffer, + int count, + int *fds, + int *n_fds); +int _dbus_write_socket_with_unix_fds (int fd, + const DBusString *buffer, + int start, + int len, + const int *fds, + int n_fds); +int _dbus_write_socket_with_unix_fds_two (int fd, + const DBusString *buffer1, + int start1, + int len1, + const DBusString *buffer2, + int start2, + int len2, + const int *fds, + int n_fds); + int _dbus_connect_tcp_socket (const char *host, const char *port, const char *family, -- cgit