Skip to content

Sending message on handle, but receive answer on the standard messages #131

@kristof-mattei

Description

@kristof-mattei

I noticed that 84dfe67 was added, which is amazing.

With the ip_monitor example we can create a listener that listens for IP changes.

But to build out the current knowledge of the system I'd like to send a DUMP message, in this library represented as AddressGetRequest.

The problem is that when I execute an AddressGetRequest via AddressGetRequest::execute() the responses are sent back via the impl Stream.

What I'd like to achieve is the ability send a AddressGetRequest to a handle, but have the response be emitted on the original messages_rx, after all, that is where I'm already listening on for changes.

I have tried something like

        let mut req =
            NetlinkMessage::from(RouteNetlinkMessage::GetAddress(AddressMessage::default()));

        req.header.flags = NLM_F_REQUEST | NLM_F_DUMP;

        self.handle.notify(req)?;

But unfortunately that merely yields WARN netlink_proto::connection: failed to forward response back to the handle.

Is what I would like to do possible with this library?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions