Lines Matching full:hdr

29     const auto& hdr = stdplus::raw::refFrom<nlmsghdr, Aligned>(msgs);  in processMsg()  local
30 if (hdr.nlmsg_len < sizeof(hdr)) in processMsg()
34 hdr.nlmsg_len, sizeof(hdr))); in processMsg()
36 if (msgs.size() < hdr.nlmsg_len) in processMsg()
40 hdr.nlmsg_len)); in processMsg()
42 auto msg = msgs.substr(NLMSG_HDRLEN, hdr.nlmsg_len - NLMSG_HDRLEN); in processMsg()
43 msgs.remove_prefix(NLMSG_ALIGN(hdr.nlmsg_len)); in processMsg()
47 if (hdr.nlmsg_flags & NLM_F_MULTI) in processMsg()
51 if (hdr.nlmsg_type == NLMSG_NOOP) in processMsg()
55 else if (hdr.nlmsg_type == NLMSG_DONE) in processMsg()
64 else if (hdr.nlmsg_type == NLMSG_ERROR) in processMsg()
74 if (!done && !(hdr.nlmsg_flags & NLM_F_MULTI)) in processMsg()
80 cb(hdr, msg); in processMsg()
93 msghdr hdr{}; in requestSend() local
94 hdr.msg_name = reinterpret_cast<sockaddr*>(&dst); in requestSend()
95 hdr.msg_namelen = sizeof(dst); in requestSend()
96 hdr.msg_iov = &iov; in requestSend()
97 hdr.msg_iovlen = 1; in requestSend()
99 if (sendmsg(sock, &hdr, 0) < 0) in requestSend()
142 msghdr hdr{}; in receive() local
143 hdr.msg_name = &from; in receive()
144 hdr.msg_namelen = sizeof(from); in receive()
145 hdr.msg_iov = &iov; in receive()
146 hdr.msg_iovlen = 1; in receive()
153 ssize_t recvd = recvmsg(sock, &hdr, 0); in receive()
185 const auto& hdr = stdplus::raw::refFrom<rtattr, Aligned>(data); in extractRtAttr() local
186 if (hdr.rta_len < RTA_LENGTH(0)) in extractRtAttr()
189 "rtattr shorter than header: {} < {}", hdr.rta_len, RTA_LENGTH(0))); in extractRtAttr()
191 if (data.size() < hdr.rta_len) in extractRtAttr()
195 hdr.rta_len)); in extractRtAttr()
197 auto attr = data.substr(RTA_LENGTH(0), hdr.rta_len - RTA_LENGTH(0)); in extractRtAttr()
198 data.remove_prefix(RTA_ALIGN(hdr.rta_len)); in extractRtAttr()
199 return {hdr, attr}; in extractRtAttr()