Calling method to unix fd passing

Antonio Aragues aragues at
Fri Oct 29 04:47:49 PDT 2010

Hi all,
I need to call a method from a d-bus interface. The method is something

fd GetDescriptor()

I don't know exactly how to do it. I've done something like this based
on an example I saw on the internet:

    DBusMessage* msg;
    DBusMessageIter args;
    DBusConnection* conn;
    DBusError err;

    (more code here...)

    // read the parameters
    if (!dbus_message_iter_init(msg, &args))
       fprintf(stderr, "Message has no arguments!\n");
	else if (DBUS_TYPE_UNIX_FD!= dbus_message_iter_get_arg_type(&args))
       fprintf(stderr, "Argument is not unix_fd\n");
       dbus_message_iter_get_basic(&args, &stat);

But doing this, I'm getting a 105 type, that is a string, not a unix_fd.
I dont know if I'm doing right. Is there a specific method to get the

I'm calling this method I've created from a Mono app. I need to return
and integer so I can build a UnixStream from that fd (int).

Maybe I'm complicating things too much...


More information about the dbus mailing list