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

int nlmsg_ok ( const struct nlmsghdr nlh,
int  remaining 
)

check if the netlink message fits into the remaining bytes

  • nlh netlink message header
  • remaining number of bytes remaining in message stream

Definition at line 259 of file msg.c.

References nlmsghdr::nlmsg_len.

Referenced by nl_recvmsgs().

{
      return (remaining >= sizeof(struct nlmsghdr) &&
            nlh->nlmsg_len >= sizeof(struct nlmsghdr) &&
            nlh->nlmsg_len <= remaining);
}


Generated by  Doxygen 1.6.0   Back to index