Lines Matching refs:len
32 socklen_t len = 0, old_len; in broadcast_groups_get() local
38 if (getsockopt(nl->fd, SOL_NETLINK, NETLINK_LIST_MEMBERSHIPS, NULL, &len) < 0) { in broadcast_groups_get()
46 if (len == 0) in broadcast_groups_get()
49 groups = new0(uint32_t, len); in broadcast_groups_get()
53 old_len = len; in broadcast_groups_get()
55 if (getsockopt(nl->fd, SOL_NETLINK, NETLINK_LIST_MEMBERSHIPS, groups, &len) < 0) in broadcast_groups_get()
58 if (old_len != len) in broadcast_groups_get()
61 for (unsigned i = 0; i < len; i++) in broadcast_groups_get()
281 size_t len, allocated; in socket_read_message() local
295 len = (size_t) r; in socket_read_message()
298 if (!greedy_realloc((void**) &nl->rbuffer, len, sizeof(uint8_t))) in socket_read_message()
309 len = (size_t) r; in socket_read_message()
311 if (len > allocated) in socket_read_message()
315 if (NLMSG_OK(nl->rbuffer, len) && nl->rbuffer->nlmsg_flags & NLM_F_MULTI) { in socket_read_message()
326 … nlmsghdr *new_msg = nl->rbuffer; NLMSG_OK(new_msg, len) && !done; new_msg = NLMSG_NEXT(new_msg, l… in socket_read_message()
383 if (len > 0) in socket_read_message()
384 log_debug("sd-netlink: discarding %zu bytes of incoming message", len); in socket_read_message()