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

int nl_socket_recv_pktinfo ( struct nl_sock *  sk,
int  state 
)

Enable/disable receival of additional packet information

  • sk Netlink socket.
  • state New state (0 - disabled, 1 - enabled)
Returns:
0 on success or a negative error code

Definition at line 565 of file socket.c.

{
      int err;

      if (sk->s_fd == -1)
            return -NLE_BAD_SOCK;

      err = setsockopt(sk->s_fd, SOL_NETLINK, NETLINK_PKTINFO,
                   &state, sizeof(state));
      if (err < 0)
            return -nl_syserr2nlerr(errno);

      return 0;
}


Generated by  Doxygen 1.6.0   Back to index