• Home
  • Raw
  • Download

Lines Matching refs:nlh

782 static int xfrm_add_sa(struct sk_buff *skb, struct nlmsghdr *nlh,  in xfrm_add_sa()  argument
786 struct xfrm_usersa_info *p = nlmsg_data(nlh); in xfrm_add_sa()
800 if (nlh->nlmsg_type == XFRM_MSG_NEWSA) in xfrm_add_sa()
817 c.seq = nlh->nlmsg_seq; in xfrm_add_sa()
818 c.portid = nlh->nlmsg_pid; in xfrm_add_sa()
819 c.event = nlh->nlmsg_type; in xfrm_add_sa()
861 static int xfrm_del_sa(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_del_sa() argument
868 struct xfrm_usersa_id *p = nlmsg_data(nlh); in xfrm_del_sa()
887 c.seq = nlh->nlmsg_seq; in xfrm_del_sa()
888 c.portid = nlh->nlmsg_pid; in xfrm_del_sa()
889 c.event = nlh->nlmsg_type; in xfrm_del_sa()
1198 struct nlmsghdr *nlh; in dump_one_state() local
1201 nlh = nlmsg_put(skb, NETLINK_CB(in_skb).portid, sp->nlmsg_seq, in dump_one_state()
1203 if (nlh == NULL) in dump_one_state()
1206 p = nlmsg_data(nlh); in dump_one_state()
1210 nlmsg_cancel(skb, nlh); in dump_one_state()
1213 nlmsg_end(skb, nlh); in dump_one_state()
1217 err = xtr->alloc_compat(skb, nlh); in dump_one_state()
1221 nlmsg_cancel(skb, nlh); in dump_one_state()
1251 info.nlmsg_seq = cb->nlh->nlmsg_seq; in xfrm_dump_sa()
1260 err = nlmsg_parse_deprecated(cb->nlh, 0, attrs, XFRMA_MAX, in xfrm_dump_sa()
1362 struct nlmsghdr *nlh; in build_spdinfo() local
1367 nlh = nlmsg_put(skb, portid, seq, XFRM_MSG_NEWSPDINFO, sizeof(u32), 0); in build_spdinfo()
1368 if (nlh == NULL) /* shouldn't really happen ... */ in build_spdinfo()
1371 f = nlmsg_data(nlh); in build_spdinfo()
1400 nlmsg_cancel(skb, nlh); in build_spdinfo()
1404 nlmsg_end(skb, nlh); in build_spdinfo()
1408 static int xfrm_set_spdinfo(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_set_spdinfo() argument
1462 static int xfrm_get_spdinfo(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_get_spdinfo() argument
1468 u32 *flags = nlmsg_data(nlh); in xfrm_get_spdinfo()
1470 u32 seq = nlh->nlmsg_seq; in xfrm_get_spdinfo()
1495 struct nlmsghdr *nlh; in build_sadinfo() local
1499 nlh = nlmsg_put(skb, portid, seq, XFRM_MSG_NEWSADINFO, sizeof(u32), 0); in build_sadinfo()
1500 if (nlh == NULL) /* shouldn't really happen ... */ in build_sadinfo()
1503 f = nlmsg_data(nlh); in build_sadinfo()
1514 nlmsg_cancel(skb, nlh); in build_sadinfo()
1518 nlmsg_end(skb, nlh); in build_sadinfo()
1522 static int xfrm_get_sadinfo(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_get_sadinfo() argument
1528 u32 *flags = nlmsg_data(nlh); in xfrm_get_sadinfo()
1530 u32 seq = nlh->nlmsg_seq; in xfrm_get_sadinfo()
1543 static int xfrm_get_sa(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_get_sa() argument
1547 struct xfrm_usersa_id *p = nlmsg_data(nlh); in xfrm_get_sa()
1556 resp_skb = xfrm_state_netlink(skb, x, nlh->nlmsg_seq); in xfrm_get_sa()
1567 static int xfrm_alloc_userspi(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_alloc_userspi() argument
1583 p = nlmsg_data(nlh); in xfrm_alloc_userspi()
1621 resp_skb = xfrm_state_netlink(skb, x, nlh->nlmsg_seq); in xfrm_alloc_userspi()
1964 static int xfrm_add_policy(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_add_policy() argument
1969 struct xfrm_userpolicy_info *p = nlmsg_data(nlh); in xfrm_add_policy()
1990 excl = nlh->nlmsg_type == XFRM_MSG_NEWPOLICY; in xfrm_add_policy()
2002 c.event = nlh->nlmsg_type; in xfrm_add_policy()
2003 c.seq = nlh->nlmsg_seq; in xfrm_add_policy()
2004 c.portid = nlh->nlmsg_pid; in xfrm_add_policy()
2093 struct nlmsghdr *nlh; in dump_one_policy() local
2096 nlh = nlmsg_put(skb, NETLINK_CB(in_skb).portid, sp->nlmsg_seq, in dump_one_policy()
2098 if (nlh == NULL) in dump_one_policy()
2101 p = nlmsg_data(nlh); in dump_one_policy()
2115 nlmsg_cancel(skb, nlh); in dump_one_policy()
2118 nlmsg_end(skb, nlh); in dump_one_policy()
2122 err = xtr->alloc_compat(skb, nlh); in dump_one_policy()
2126 nlmsg_cancel(skb, nlh); in dump_one_policy()
2161 info.nlmsg_seq = cb->nlh->nlmsg_seq; in xfrm_dump_policy()
2199 struct nlmsghdr *nlh; in xfrm_notify_userpolicy() local
2207 nlh = nlmsg_put(skb, 0, 0, XFRM_MSG_GETDEFAULT, sizeof(*up), 0); in xfrm_notify_userpolicy()
2208 if (nlh == NULL) { in xfrm_notify_userpolicy()
2213 up = nlmsg_data(nlh); in xfrm_notify_userpolicy()
2218 nlmsg_end(skb, nlh); in xfrm_notify_userpolicy()
2233 static int xfrm_set_default(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_set_default() argument
2237 struct xfrm_userpolicy_default *up = nlmsg_data(nlh); in xfrm_set_default()
2254 static int xfrm_get_default(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_get_default() argument
2263 u32 seq = nlh->nlmsg_seq; in xfrm_get_default()
2284 static int xfrm_get_policy(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_get_policy() argument
2298 p = nlmsg_data(nlh); in xfrm_get_policy()
2299 delete = nlh->nlmsg_type == XFRM_MSG_DELPOLICY; in xfrm_get_policy()
2343 resp_skb = xfrm_policy_netlink(skb, xp, p->dir, nlh->nlmsg_seq); in xfrm_get_policy()
2357 c.event = nlh->nlmsg_type; in xfrm_get_policy()
2358 c.seq = nlh->nlmsg_seq; in xfrm_get_policy()
2359 c.portid = nlh->nlmsg_pid; in xfrm_get_policy()
2368 static int xfrm_flush_sa(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_flush_sa() argument
2374 struct xfrm_usersa_flush *p = nlmsg_data(nlh); in xfrm_flush_sa()
2384 c.event = nlh->nlmsg_type; in xfrm_flush_sa()
2385 c.seq = nlh->nlmsg_seq; in xfrm_flush_sa()
2386 c.portid = nlh->nlmsg_pid; in xfrm_flush_sa()
2410 struct nlmsghdr *nlh; in build_aevent() local
2413 nlh = nlmsg_put(skb, c->portid, c->seq, XFRM_MSG_NEWAE, sizeof(*id), 0); in build_aevent()
2414 if (nlh == NULL) in build_aevent()
2417 id = nlmsg_data(nlh); in build_aevent()
2461 nlmsg_end(skb, nlh); in build_aevent()
2465 nlmsg_cancel(skb, nlh); in build_aevent()
2469 static int xfrm_get_ae(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_get_ae() argument
2479 struct xfrm_aevent_id *p = nlmsg_data(nlh); in xfrm_get_ae()
2501 c.seq = nlh->nlmsg_seq; in xfrm_get_ae()
2502 c.portid = nlh->nlmsg_pid; in xfrm_get_ae()
2513 static int xfrm_new_ae(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_new_ae() argument
2522 struct xfrm_aevent_id *p = nlmsg_data(nlh); in xfrm_new_ae()
2535 if (!(nlh->nlmsg_flags & NLM_F_REPLACE)) { in xfrm_new_ae()
2559 c.event = nlh->nlmsg_type; in xfrm_new_ae()
2560 c.seq = nlh->nlmsg_seq; in xfrm_new_ae()
2561 c.portid = nlh->nlmsg_pid; in xfrm_new_ae()
2570 static int xfrm_flush_policy(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_flush_policy() argument
2591 c.event = nlh->nlmsg_type; in xfrm_flush_policy()
2592 c.seq = nlh->nlmsg_seq; in xfrm_flush_policy()
2593 c.portid = nlh->nlmsg_pid; in xfrm_flush_policy()
2599 static int xfrm_add_pol_expire(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_add_pol_expire() argument
2605 struct xfrm_user_polexpire *up = nlmsg_data(nlh); in xfrm_add_pol_expire()
2659 km_policy_expired(xp, p->dir, up->hard, nlh->nlmsg_pid); in xfrm_add_pol_expire()
2666 static int xfrm_add_sa_expire(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_add_sa_expire() argument
2673 struct xfrm_user_expire *ue = nlmsg_data(nlh); in xfrm_add_sa_expire()
2691 km_state_expired(x, ue->hard, nlh->nlmsg_pid); in xfrm_add_sa_expire()
2704 static int xfrm_add_acquire(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_add_acquire() argument
2715 struct xfrm_user_acquire *ua = nlmsg_data(nlh); in xfrm_add_acquire()
2813 static int xfrm_do_migrate(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_do_migrate() argument
2816 struct xfrm_userpolicy_id *pi = nlmsg_data(nlh); in xfrm_do_migrate()
2862 static int xfrm_do_migrate(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_do_migrate() argument
2918 struct nlmsghdr *nlh; in build_migrate() local
2921 nlh = nlmsg_put(skb, 0, 0, XFRM_MSG_MIGRATE, sizeof(*pol_id), 0); in build_migrate()
2922 if (nlh == NULL) in build_migrate()
2925 pol_id = nlmsg_data(nlh); in build_migrate()
2950 nlmsg_end(skb, nlh); in build_migrate()
2954 nlmsg_cancel(skb, nlh); in build_migrate()
3099 static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_user_rcv_msg() argument
3108 type = nlh->nlmsg_type; in xfrm_user_rcv_msg()
3127 nlh64 = xtr->rcv_msg_compat(nlh, link->nla_max, in xfrm_user_rcv_msg()
3133 nlh = nlh64; in xfrm_user_rcv_msg()
3139 (nlh->nlmsg_flags & NLM_F_DUMP)) { in xfrm_user_rcv_msg()
3151 err = netlink_dump_start(net->xfrm.nlsk, skb, nlh, &c); in xfrm_user_rcv_msg()
3155 err = nlmsg_parse_deprecated(nlh, xfrm_msg_min[type], attrs, in xfrm_user_rcv_msg()
3166 err = link->doit(skb, nlh, attrs, extack); in xfrm_user_rcv_msg()
3201 struct nlmsghdr *nlh; in build_expire() local
3204 nlh = nlmsg_put(skb, c->portid, 0, XFRM_MSG_EXPIRE, sizeof(*ue), 0); in build_expire()
3205 if (nlh == NULL) in build_expire()
3208 ue = nlmsg_data(nlh); in build_expire()
3222 nlmsg_end(skb, nlh); in build_expire()
3263 struct nlmsghdr *nlh; in xfrm_notify_sa_flush() local
3271 nlh = nlmsg_put(skb, c->portid, c->seq, XFRM_MSG_FLUSHSA, sizeof(*p), 0); in xfrm_notify_sa_flush()
3272 if (nlh == NULL) { in xfrm_notify_sa_flush()
3277 p = nlmsg_data(nlh); in xfrm_notify_sa_flush()
3280 nlmsg_end(skb, nlh); in xfrm_notify_sa_flush()
3337 struct nlmsghdr *nlh; in xfrm_notify_sa() local
3355 nlh = nlmsg_put(skb, c->portid, c->seq, c->event, headlen, 0); in xfrm_notify_sa()
3357 if (nlh == NULL) in xfrm_notify_sa()
3360 p = nlmsg_data(nlh); in xfrm_notify_sa()
3364 id = nlmsg_data(nlh); in xfrm_notify_sa()
3382 nlmsg_end(skb, nlh); in xfrm_notify_sa()
3430 struct nlmsghdr *nlh; in build_acquire() local
3433 nlh = nlmsg_put(skb, 0, 0, XFRM_MSG_ACQUIRE, sizeof(*ua), 0); in build_acquire()
3434 if (nlh == NULL) in build_acquire()
3437 ua = nlmsg_data(nlh); in build_acquire()
3459 nlmsg_cancel(skb, nlh); in build_acquire()
3463 nlmsg_end(skb, nlh); in build_acquire()
3558 struct nlmsghdr *nlh; in build_polexpire() local
3561 nlh = nlmsg_put(skb, c->portid, 0, XFRM_MSG_POLEXPIRE, sizeof(*upe), 0); in build_polexpire()
3562 if (nlh == NULL) in build_polexpire()
3565 upe = nlmsg_data(nlh); in build_polexpire()
3579 nlmsg_cancel(skb, nlh); in build_polexpire()
3584 nlmsg_end(skb, nlh); in build_polexpire()
3610 struct nlmsghdr *nlh; in xfrm_notify_policy() local
3628 nlh = nlmsg_put(skb, c->portid, c->seq, c->event, headlen, 0); in xfrm_notify_policy()
3630 if (nlh == NULL) in xfrm_notify_policy()
3633 p = nlmsg_data(nlh); in xfrm_notify_policy()
3637 id = nlmsg_data(nlh); in xfrm_notify_policy()
3666 nlmsg_end(skb, nlh); in xfrm_notify_policy()
3678 struct nlmsghdr *nlh; in xfrm_notify_policy_flush() local
3686 nlh = nlmsg_put(skb, c->portid, c->seq, XFRM_MSG_FLUSHPOLICY, 0, 0); in xfrm_notify_policy_flush()
3688 if (nlh == NULL) in xfrm_notify_policy_flush()
3694 nlmsg_end(skb, nlh); in xfrm_notify_policy_flush()
3733 struct nlmsghdr *nlh; in build_report() local
3735 nlh = nlmsg_put(skb, 0, 0, XFRM_MSG_REPORT, sizeof(*ur), 0); in build_report()
3736 if (nlh == NULL) in build_report()
3739 ur = nlmsg_data(nlh); in build_report()
3746 nlmsg_cancel(skb, nlh); in build_report()
3750 nlmsg_end(skb, nlh); in build_report()
3779 struct nlmsghdr *nlh; in build_mapping() local
3781 nlh = nlmsg_put(skb, 0, 0, XFRM_MSG_MAPPING, sizeof(*um), 0); in build_mapping()
3782 if (nlh == NULL) in build_mapping()
3785 um = nlmsg_data(nlh); in build_mapping()
3797 nlmsg_end(skb, nlh); in build_mapping()