Lines Matching refs:nlh
197 struct nlmsghdr *nlh; in rtnl_route() local
204 nlh = mnl_nlmsg_put_header(buf); in rtnl_route()
205 nlh->nlmsg_type = type; in rtnl_route()
207 nlh->nlmsg_flags = NLM_F_ACK; in rtnl_route()
209 nlh->nlmsg_flags |= NLM_F_REQUEST | NLM_F_CREATE | NLM_F_REPLACE; in rtnl_route()
211 nlh->nlmsg_seq = seq = time(NULL); in rtnl_route()
213 rtm = mnl_nlmsg_put_extra_header(nlh, sizeof(struct rtmsg)); in rtnl_route()
226 mnl_attr_put(nlh, RTA_DST, sizeof(struct in6_addr), &dst_in6); in rtnl_route()
229 mnl_attr_put_u32(nlh, RTA_DST, dst_ip); in rtnl_route()
232 mnl_attr_put_u32(nlh, RTA_OIF, iface); in rtnl_route()
237 mnl_attr_put(nlh, RTA_GATEWAY, sizeof(struct in6_addr), &gw_in6); in rtnl_route()
240 mnl_attr_put_u32(nlh, RTA_GATEWAY, gw_ip); in rtnl_route()
255 if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) in rtnl_route()