Lines Matching refs:npt
376 check_ifmsg(void *hdr, struct nl_pstate *npt) in check_ifmsg() argument
382 nlmsg_report_err_msg(npt, in check_ifmsg()
452 rtnl_handle_getlink(struct nlmsghdr *hdr, struct nlpcb *nlp, struct nl_pstate *npt) in rtnl_handle_getlink() argument
459 error = nl_parse_nlmsg(hdr, &ifmsg_parser, npt, &attrs); in rtnl_handle_getlink()
465 .nw = npt->nw, in rtnl_handle_getlink()
533 rtnl_handle_dellink(struct nlmsghdr *hdr, struct nlpcb *nlp, struct nl_pstate *npt) in rtnl_handle_dellink() argument
540 error = nl_parse_nlmsg(hdr, &ifmsg_parser, npt, &attrs); in rtnl_handle_dellink()
589 struct nlattr_bmask *bm, struct nlpcb *nlp, struct nl_pstate *npt) in create_link() argument
592 NLMSG_REPORT_ERR_MSG(npt, "empty IFLA_IFNAME attribute"); in create_link()
596 NLMSG_REPORT_ERR_MSG(npt, "empty IFLA_INFO_KIND attribute"); in create_link()
604 .npt = npt, in create_link()
607 nl_store_ifp_cookie(npt, ifd.ifp); in create_link()
614 struct nlattr_bmask *bm, struct nlpcb *nlp, struct nl_pstate *npt) in modify_link() argument
625 NLMSG_REPORT_ERR_MSG(npt, "empty ifi_index field"); in modify_link()
634 NLMSG_REPORT_ERR_MSG(npt, "unable to find interface #%u", in modify_link()
643 NLMSG_REPORT_ERR_MSG(npt, "unable to find interface %s", in modify_link()
659 struct ifc_data_nl ifd = { .lattrs = lattrs, .bm = bm, .npt = npt }; in modify_link()
661 ifd.error = nl_modify_ifp_generic(ifp, lattrs, bm, npt); in modify_link()
670 rtnl_handle_newlink(struct nlmsghdr *hdr, struct nlpcb *nlp, struct nl_pstate *npt) in rtnl_handle_newlink() argument
676 error = nl_parse_nlmsg(hdr, &ifmsg_parser, npt, &attrs); in rtnl_handle_newlink()
682 return (create_link(hdr, &attrs, &bm, nlp, npt)); in rtnl_handle_newlink()
684 return (modify_link(hdr, &attrs, &bm, nlp, npt)); in rtnl_handle_newlink()
702 struct nl_pstate *npt) in check_sa_family() argument
707 nlmsg_report_err_msg(npt, "wrong family for %s attribute: %d != %d", in check_sa_family()
729 nlattr_get_cinfo(struct nlattr *nla, struct nl_pstate *npt, in nlattr_get_cinfo() argument
733 NLMSG_REPORT_ERR_MSG(npt, "nla type %d size(%u) is not ifa_cacheinfo", in nlattr_get_cinfo()
769 post_p_ifa(void *_attrs, struct nl_pstate *npt) in post_p_ifa() argument
773 if (!check_sa_family(attrs->ifa_address, attrs->ifa_family, "IFA_ADDRESS", npt)) in post_p_ifa()
775 if (!check_sa_family(attrs->ifa_local, attrs->ifa_family, "IFA_LOCAL", npt)) in post_p_ifa()
777 if (!check_sa_family(attrs->ifa_broadcast, attrs->ifa_family, "IFA_BROADADDR", npt)) in post_p_ifa()
1060 rtnl_handle_getaddr(struct nlmsghdr *hdr, struct nlpcb *nlp, struct nl_pstate *npt) in rtnl_handle_getaddr() argument
1066 error = nl_parse_nlmsg(hdr, &ifa_parser, npt, &attrs); in rtnl_handle_getaddr()
1072 .nw = npt->nw, in rtnl_handle_getaddr()
1113 if_t ifp, struct nlpcb *nlp, struct nl_pstate *npt) in handle_newaddr_inet() argument
1120 nlmsg_report_err_msg(npt, "invalid ifa_prefixlen"); in handle_newaddr_inet()
1129 nlmsg_report_err_msg(npt, "Empty IFA_LOCAL/IFA_ADDRESS"); in handle_newaddr_inet()
1150 nlmsg_report_err_msg(npt, "Empty IFA_LOCAL/IFA_ADDRESS"); in handle_newaddr_inet()
1168 sin_brd = (struct sockaddr_in *)npt_alloc(npt, sizeof(*sin_brd)); in handle_newaddr_inet()
1197 if_t ifp, struct nlpcb *nlp, struct nl_pstate *npt) in handle_deladdr_inet() argument
1205 nlmsg_report_err_msg(npt, "empty IFA_ADDRESS/IFA_LOCAL"); in handle_deladdr_inet()
1218 if_t ifp, struct nlpcb *nlp, struct nl_pstate *npt) in handle_newaddr_inet6() argument
1223 nlmsg_report_err_msg(npt, "invalid ifa_prefixlen"); in handle_newaddr_inet6()
1248 nlmsg_report_err_msg(npt, "Empty IFA_LOCAL/IFA_ADDRESS"); in handle_newaddr_inet6()
1281 if_t ifp, struct nlpcb *nlp, struct nl_pstate *npt) in handle_deladdr_inet6() argument
1289 nlmsg_report_err_msg(npt, "Empty IFA_LOCAL/IFA_ADDRESS"); in handle_deladdr_inet6()
1301 rtnl_handle_addr(struct nlmsghdr *hdr, struct nlpcb *nlp, struct nl_pstate *npt) in rtnl_handle_addr() argument
1307 error = nl_parse_nlmsg(hdr, &ifa_parser, npt, &attrs); in rtnl_handle_addr()
1316 nlmsg_report_err_msg(npt, "Unable to find interface with index %u", in rtnl_handle_addr()
1336 error = handle_newaddr_inet(hdr, &attrs, ifp, nlp, npt); in rtnl_handle_addr()
1338 error = handle_deladdr_inet(hdr, &attrs, ifp, nlp, npt); in rtnl_handle_addr()
1344 error = handle_newaddr_inet6(hdr, &attrs, ifp, nlp, npt); in rtnl_handle_addr()
1346 error = handle_deladdr_inet6(hdr, &attrs, ifp, nlp, npt); in rtnl_handle_addr()