Logo Search packages:      
Sourcecode: libnl version File versions  Download package

int nl_send ( struct nl_handle *  handle,
struct nl_msg *  msg 

Send netlink message.

  • handle Netlink handle
  • msg Netlink message to be sent.
    See also:
    Number of characters sent on success or a negative error code.

Definition at line 492 of file nl.c.

References sockaddr_nl::nl_family, and nl_sendmsg().

Referenced by nl_send_auto_complete().

      struct sockaddr_nl *dst;
      struct msghdr hdr = {
            .msg_name = (void *) &handle->h_peer,
            .msg_namelen = sizeof(struct sockaddr_nl),

      /* Overwrite destination if specified in the message itself, defaults
       * to the peer address of the handle.
      dst = nlmsg_get_dst(msg);
      if (dst->nl_family == AF_NETLINK)
            hdr.msg_name = dst;

      return nl_sendmsg(handle, msg, &hdr);

Generated by  Doxygen 1.6.0   Back to index