Lines Matching refs:hdr

18 #define GET_CONTAINER(m, i) ((struct rtattr*)((uint8_t*)(m)->hdr + (m)->containers[i].offset))
70 m->hdr = malloc0(size); in message_new_full()
71 if (!m->hdr) in message_new_full()
74 m->hdr->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK; in message_new_full()
75 m->hdr->nlmsg_len = size; in message_new_full()
76 m->hdr->nlmsg_type = nlmsg_type; in message_new_full()
108 (*ret)->hdr->nlmsg_seq = serial; in message_new_synthetic_error()
110 err = NLMSG_DATA((*ret)->hdr); in message_new_synthetic_error()
118 assert_return(m->hdr, -EINVAL); in sd_netlink_message_request_dump()
120 IN_SET(m->hdr->nlmsg_type, in sd_netlink_message_request_dump()
125 SET_FLAG(m->hdr->nlmsg_flags, NLM_F_DUMP, dump); in sd_netlink_message_request_dump()
136 free(m->hdr); in sd_netlink_message_unref()
153 *type = m->hdr->nlmsg_type; in sd_netlink_message_get_type()
162 m->hdr->nlmsg_flags = flags; in sd_netlink_message_set_flags()
182 assert(m->hdr); in add_rtattr()
184 assert(NLMSG_ALIGN(m->hdr->nlmsg_len) == m->hdr->nlmsg_len); in add_rtattr()
188 message_length = m->hdr->nlmsg_len + RTA_SPACE(data_length); in add_rtattr()
195 new_hdr = realloc(m->hdr, message_length); in add_rtattr()
198 m->hdr = new_hdr; in add_rtattr()
201 rta = (struct rtattr *) ((uint8_t *) m->hdr + m->hdr->nlmsg_len); in add_rtattr()
210 offset = m->hdr->nlmsg_len; in add_rtattr()
211 m->hdr->nlmsg_len = message_length; in add_rtattr()
690 m->hdr->nlmsg_len -= rta_len; in sd_netlink_message_cancel_array()
723 rta = (struct rtattr*)((uint8_t *) m->hdr + attribute->offset); in netlink_message_read_internal()
1158 attributes[attr].offset = (uint8_t *) rta - (uint8_t *) m->hdr; in netlink_container_parse()
1318 assert(m->hdr); in message_get_serial()
1320 return m->hdr->nlmsg_seq; in message_get_serial()
1325 assert_return(m->hdr, 0); in sd_netlink_message_is_error()
1327 return m->hdr->nlmsg_type == NLMSG_ERROR; in sd_netlink_message_is_error()
1334 assert_return(m->hdr, -EINVAL); in sd_netlink_message_get_errno()
1339 err = NLMSG_DATA(m->hdr); in sd_netlink_message_get_errno()
1345 struct nlmsgerr *err = NLMSG_DATA(m->hdr); in netlink_message_parse_error()
1349 if (!(m->hdr->nlmsg_flags & NLM_F_ACK_TLVS)) in netlink_message_parse_error()
1353 if (!(m->hdr->nlmsg_flags & NLM_F_CAPPED)) in netlink_message_parse_error()
1356 if (m->hdr->nlmsg_len <= NLMSG_SPACE(hlen)) in netlink_message_parse_error()
1361 (struct rtattr*)((uint8_t*) NLMSG_DATA(m->hdr) + hlen), in netlink_message_parse_error()
1362 NLMSG_PAYLOAD(m->hdr, hlen)); in netlink_message_parse_error()
1384 assert(m->hdr); in sd_netlink_message_rewind()
1386 r = type_system_root_get_type_system_and_header_size(nl, m->hdr->nlmsg_type, in sd_netlink_message_rewind()
1396 … (struct rtattr*)((uint8_t*) NLMSG_DATA(m->hdr) + NLMSG_ALIGN(size)), in sd_netlink_message_rewind()
1397 NLMSG_PAYLOAD(m->hdr, size)); in sd_netlink_message_rewind()