Lines Matching refs:nh
82 struct nlmsghdr *nh; in bpf_netlink_recv() local
97 for (nh = (struct nlmsghdr *)buf; NLMSG_OK(nh, len); in bpf_netlink_recv()
98 nh = NLMSG_NEXT(nh, len)) { in bpf_netlink_recv()
99 if (nh->nlmsg_pid != nl_pid) { in bpf_netlink_recv()
103 if (nh->nlmsg_seq != seq) { in bpf_netlink_recv()
107 if (nh->nlmsg_flags & NLM_F_MULTI) in bpf_netlink_recv()
109 switch (nh->nlmsg_type) { in bpf_netlink_recv()
111 err = (struct nlmsgerr *)NLMSG_DATA(nh); in bpf_netlink_recv()
115 libbpf_nla_dump_errormsg(nh); in bpf_netlink_recv()
123 ret = _fn(nh, fn, cookie); in bpf_netlink_recv()
140 struct nlmsghdr nh; in __bpf_set_link_xdp_fd_replace() member
151 req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)); in __bpf_set_link_xdp_fd_replace()
152 req.nh.nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK; in __bpf_set_link_xdp_fd_replace()
153 req.nh.nlmsg_type = RTM_SETLINK; in __bpf_set_link_xdp_fd_replace()
154 req.nh.nlmsg_pid = 0; in __bpf_set_link_xdp_fd_replace()
155 req.nh.nlmsg_seq = ++seq; in __bpf_set_link_xdp_fd_replace()
161 + NLMSG_ALIGN(req.nh.nlmsg_len)); in __bpf_set_link_xdp_fd_replace()
189 req.nh.nlmsg_len += NLA_ALIGN(nla->nla_len); in __bpf_set_link_xdp_fd_replace()
191 if (send(sock, &req, req.nh.nlmsg_len, 0) < 0) { in __bpf_set_link_xdp_fd_replace()