• Home
  • Raw
  • Download

Lines Matching refs:nlh

679 static int xfrm_add_sa(struct sk_buff *skb, struct nlmsghdr *nlh,  in xfrm_add_sa()  argument
683 struct xfrm_usersa_info *p = nlmsg_data(nlh); in xfrm_add_sa()
697 if (nlh->nlmsg_type == XFRM_MSG_NEWSA) in xfrm_add_sa()
714 c.seq = nlh->nlmsg_seq; in xfrm_add_sa()
715 c.portid = nlh->nlmsg_pid; in xfrm_add_sa()
716 c.event = nlh->nlmsg_type; in xfrm_add_sa()
758 static int xfrm_del_sa(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_del_sa() argument
765 struct xfrm_usersa_id *p = nlmsg_data(nlh); in xfrm_del_sa()
784 c.seq = nlh->nlmsg_seq; in xfrm_del_sa()
785 c.portid = nlh->nlmsg_pid; in xfrm_del_sa()
786 c.event = nlh->nlmsg_type; in xfrm_del_sa()
993 struct nlmsghdr *nlh; in dump_one_state() local
996 nlh = nlmsg_put(skb, NETLINK_CB(in_skb).portid, sp->nlmsg_seq, in dump_one_state()
998 if (nlh == NULL) in dump_one_state()
1001 p = nlmsg_data(nlh); in dump_one_state()
1005 nlmsg_cancel(skb, nlh); in dump_one_state()
1008 nlmsg_end(skb, nlh); in dump_one_state()
1012 err = xtr->alloc_compat(skb, nlh); in dump_one_state()
1016 nlmsg_cancel(skb, nlh); in dump_one_state()
1046 info.nlmsg_seq = cb->nlh->nlmsg_seq; in xfrm_dump_sa()
1055 err = nlmsg_parse_deprecated(cb->nlh, 0, attrs, XFRMA_MAX, in xfrm_dump_sa()
1157 struct nlmsghdr *nlh; in build_spdinfo() local
1162 nlh = nlmsg_put(skb, portid, seq, XFRM_MSG_NEWSPDINFO, sizeof(u32), 0); in build_spdinfo()
1163 if (nlh == NULL) /* shouldn't really happen ... */ in build_spdinfo()
1166 f = nlmsg_data(nlh); in build_spdinfo()
1195 nlmsg_cancel(skb, nlh); in build_spdinfo()
1199 nlmsg_end(skb, nlh); in build_spdinfo()
1203 static int xfrm_set_spdinfo(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_set_spdinfo() argument
1248 static int xfrm_get_spdinfo(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_get_spdinfo() argument
1253 u32 *flags = nlmsg_data(nlh); in xfrm_get_spdinfo()
1255 u32 seq = nlh->nlmsg_seq; in xfrm_get_spdinfo()
1280 struct nlmsghdr *nlh; in build_sadinfo() local
1284 nlh = nlmsg_put(skb, portid, seq, XFRM_MSG_NEWSADINFO, sizeof(u32), 0); in build_sadinfo()
1285 if (nlh == NULL) /* shouldn't really happen ... */ in build_sadinfo()
1288 f = nlmsg_data(nlh); in build_sadinfo()
1299 nlmsg_cancel(skb, nlh); in build_sadinfo()
1303 nlmsg_end(skb, nlh); in build_sadinfo()
1307 static int xfrm_get_sadinfo(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_get_sadinfo() argument
1312 u32 *flags = nlmsg_data(nlh); in xfrm_get_sadinfo()
1314 u32 seq = nlh->nlmsg_seq; in xfrm_get_sadinfo()
1327 static int xfrm_get_sa(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_get_sa() argument
1331 struct xfrm_usersa_id *p = nlmsg_data(nlh); in xfrm_get_sa()
1340 resp_skb = xfrm_state_netlink(skb, x, nlh->nlmsg_seq); in xfrm_get_sa()
1351 static int xfrm_alloc_userspi(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_alloc_userspi() argument
1366 p = nlmsg_data(nlh); in xfrm_alloc_userspi()
1402 resp_skb = xfrm_state_netlink(skb, x, nlh->nlmsg_seq); in xfrm_alloc_userspi()
1703 static int xfrm_add_policy(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_add_policy() argument
1707 struct xfrm_userpolicy_info *p = nlmsg_data(nlh); in xfrm_add_policy()
1728 excl = nlh->nlmsg_type == XFRM_MSG_NEWPOLICY; in xfrm_add_policy()
1738 c.event = nlh->nlmsg_type; in xfrm_add_policy()
1739 c.seq = nlh->nlmsg_seq; in xfrm_add_policy()
1740 c.portid = nlh->nlmsg_pid; in xfrm_add_policy()
1826 struct nlmsghdr *nlh; in dump_one_policy() local
1829 nlh = nlmsg_put(skb, NETLINK_CB(in_skb).portid, sp->nlmsg_seq, in dump_one_policy()
1831 if (nlh == NULL) in dump_one_policy()
1834 p = nlmsg_data(nlh); in dump_one_policy()
1846 nlmsg_cancel(skb, nlh); in dump_one_policy()
1849 nlmsg_end(skb, nlh); in dump_one_policy()
1853 err = xtr->alloc_compat(skb, nlh); in dump_one_policy()
1857 nlmsg_cancel(skb, nlh); in dump_one_policy()
1892 info.nlmsg_seq = cb->nlh->nlmsg_seq; in xfrm_dump_policy()
1930 struct nlmsghdr *nlh; in xfrm_notify_userpolicy() local
1938 nlh = nlmsg_put(skb, 0, 0, XFRM_MSG_GETDEFAULT, sizeof(*up), 0); in xfrm_notify_userpolicy()
1939 if (nlh == NULL) { in xfrm_notify_userpolicy()
1944 up = nlmsg_data(nlh); in xfrm_notify_userpolicy()
1949 nlmsg_end(skb, nlh); in xfrm_notify_userpolicy()
1964 static int xfrm_set_default(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_set_default() argument
1968 struct xfrm_userpolicy_default *up = nlmsg_data(nlh); in xfrm_set_default()
1985 static int xfrm_get_default(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_get_default() argument
1994 u32 seq = nlh->nlmsg_seq; in xfrm_get_default()
2015 static int xfrm_get_policy(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_get_policy() argument
2028 p = nlmsg_data(nlh); in xfrm_get_policy()
2029 delete = nlh->nlmsg_type == XFRM_MSG_DELPOLICY; in xfrm_get_policy()
2073 resp_skb = xfrm_policy_netlink(skb, xp, p->dir, nlh->nlmsg_seq); in xfrm_get_policy()
2087 c.event = nlh->nlmsg_type; in xfrm_get_policy()
2088 c.seq = nlh->nlmsg_seq; in xfrm_get_policy()
2089 c.portid = nlh->nlmsg_pid; in xfrm_get_policy()
2098 static int xfrm_flush_sa(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_flush_sa() argument
2103 struct xfrm_usersa_flush *p = nlmsg_data(nlh); in xfrm_flush_sa()
2113 c.event = nlh->nlmsg_type; in xfrm_flush_sa()
2114 c.seq = nlh->nlmsg_seq; in xfrm_flush_sa()
2115 c.portid = nlh->nlmsg_pid; in xfrm_flush_sa()
2139 struct nlmsghdr *nlh; in build_aevent() local
2142 nlh = nlmsg_put(skb, c->portid, c->seq, XFRM_MSG_NEWAE, sizeof(*id), 0); in build_aevent()
2143 if (nlh == NULL) in build_aevent()
2146 id = nlmsg_data(nlh); in build_aevent()
2190 nlmsg_end(skb, nlh); in build_aevent()
2194 nlmsg_cancel(skb, nlh); in build_aevent()
2198 static int xfrm_get_ae(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_get_ae() argument
2208 struct xfrm_aevent_id *p = nlmsg_data(nlh); in xfrm_get_ae()
2230 c.seq = nlh->nlmsg_seq; in xfrm_get_ae()
2231 c.portid = nlh->nlmsg_pid; in xfrm_get_ae()
2242 static int xfrm_new_ae(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_new_ae() argument
2251 struct xfrm_aevent_id *p = nlmsg_data(nlh); in xfrm_new_ae()
2262 if (!(nlh->nlmsg_flags&NLM_F_REPLACE)) in xfrm_new_ae()
2282 c.event = nlh->nlmsg_type; in xfrm_new_ae()
2283 c.seq = nlh->nlmsg_seq; in xfrm_new_ae()
2284 c.portid = nlh->nlmsg_pid; in xfrm_new_ae()
2293 static int xfrm_flush_policy(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_flush_policy() argument
2313 c.event = nlh->nlmsg_type; in xfrm_flush_policy()
2314 c.seq = nlh->nlmsg_seq; in xfrm_flush_policy()
2315 c.portid = nlh->nlmsg_pid; in xfrm_flush_policy()
2321 static int xfrm_add_pol_expire(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_add_pol_expire() argument
2326 struct xfrm_user_polexpire *up = nlmsg_data(nlh); in xfrm_add_pol_expire()
2380 km_policy_expired(xp, p->dir, up->hard, nlh->nlmsg_pid); in xfrm_add_pol_expire()
2387 static int xfrm_add_sa_expire(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_add_sa_expire() argument
2393 struct xfrm_user_expire *ue = nlmsg_data(nlh); in xfrm_add_sa_expire()
2408 km_state_expired(x, ue->hard, nlh->nlmsg_pid); in xfrm_add_sa_expire()
2421 static int xfrm_add_acquire(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_add_acquire() argument
2431 struct xfrm_user_acquire *ua = nlmsg_data(nlh); in xfrm_add_acquire()
2526 static int xfrm_do_migrate(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_do_migrate() argument
2529 struct xfrm_userpolicy_id *pi = nlmsg_data(nlh); in xfrm_do_migrate()
2572 static int xfrm_do_migrate(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_do_migrate() argument
2628 struct nlmsghdr *nlh; in build_migrate() local
2631 nlh = nlmsg_put(skb, 0, 0, XFRM_MSG_MIGRATE, sizeof(*pol_id), 0); in build_migrate()
2632 if (nlh == NULL) in build_migrate()
2635 pol_id = nlmsg_data(nlh); in build_migrate()
2660 nlmsg_end(skb, nlh); in build_migrate()
2664 nlmsg_cancel(skb, nlh); in build_migrate()
2807 static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_user_rcv_msg() argument
2816 type = nlh->nlmsg_type; in xfrm_user_rcv_msg()
2833 nlh64 = xtr->rcv_msg_compat(nlh, link->nla_max, in xfrm_user_rcv_msg()
2839 nlh = nlh64; in xfrm_user_rcv_msg()
2844 (nlh->nlmsg_flags & NLM_F_DUMP)) { in xfrm_user_rcv_msg()
2856 err = netlink_dump_start(net->xfrm.nlsk, skb, nlh, &c); in xfrm_user_rcv_msg()
2860 err = nlmsg_parse_deprecated(nlh, xfrm_msg_min[type], attrs, in xfrm_user_rcv_msg()
2871 err = link->doit(skb, nlh, attrs); in xfrm_user_rcv_msg()
2906 struct nlmsghdr *nlh; in build_expire() local
2909 nlh = nlmsg_put(skb, c->portid, 0, XFRM_MSG_EXPIRE, sizeof(*ue), 0); in build_expire()
2910 if (nlh == NULL) in build_expire()
2913 ue = nlmsg_data(nlh); in build_expire()
2927 nlmsg_end(skb, nlh); in build_expire()
2968 struct nlmsghdr *nlh; in xfrm_notify_sa_flush() local
2976 nlh = nlmsg_put(skb, c->portid, c->seq, XFRM_MSG_FLUSHSA, sizeof(*p), 0); in xfrm_notify_sa_flush()
2977 if (nlh == NULL) { in xfrm_notify_sa_flush()
2982 p = nlmsg_data(nlh); in xfrm_notify_sa_flush()
2985 nlmsg_end(skb, nlh); in xfrm_notify_sa_flush()
3042 struct nlmsghdr *nlh; in xfrm_notify_sa() local
3060 nlh = nlmsg_put(skb, c->portid, c->seq, c->event, headlen, 0); in xfrm_notify_sa()
3062 if (nlh == NULL) in xfrm_notify_sa()
3065 p = nlmsg_data(nlh); in xfrm_notify_sa()
3069 id = nlmsg_data(nlh); in xfrm_notify_sa()
3087 nlmsg_end(skb, nlh); in xfrm_notify_sa()
3135 struct nlmsghdr *nlh; in build_acquire() local
3138 nlh = nlmsg_put(skb, 0, 0, XFRM_MSG_ACQUIRE, sizeof(*ua), 0); in build_acquire()
3139 if (nlh == NULL) in build_acquire()
3142 ua = nlmsg_data(nlh); in build_acquire()
3162 nlmsg_cancel(skb, nlh); in build_acquire()
3166 nlmsg_end(skb, nlh); in build_acquire()
3261 struct nlmsghdr *nlh; in build_polexpire() local
3264 nlh = nlmsg_put(skb, c->portid, 0, XFRM_MSG_POLEXPIRE, sizeof(*upe), 0); in build_polexpire()
3265 if (nlh == NULL) in build_polexpire()
3268 upe = nlmsg_data(nlh); in build_polexpire()
3280 nlmsg_cancel(skb, nlh); in build_polexpire()
3285 nlmsg_end(skb, nlh); in build_polexpire()
3311 struct nlmsghdr *nlh; in xfrm_notify_policy() local
3329 nlh = nlmsg_put(skb, c->portid, c->seq, c->event, headlen, 0); in xfrm_notify_policy()
3331 if (nlh == NULL) in xfrm_notify_policy()
3334 p = nlmsg_data(nlh); in xfrm_notify_policy()
3338 id = nlmsg_data(nlh); in xfrm_notify_policy()
3365 nlmsg_end(skb, nlh); in xfrm_notify_policy()
3377 struct nlmsghdr *nlh; in xfrm_notify_policy_flush() local
3385 nlh = nlmsg_put(skb, c->portid, c->seq, XFRM_MSG_FLUSHPOLICY, 0, 0); in xfrm_notify_policy_flush()
3387 if (nlh == NULL) in xfrm_notify_policy_flush()
3393 nlmsg_end(skb, nlh); in xfrm_notify_policy_flush()
3432 struct nlmsghdr *nlh; in build_report() local
3434 nlh = nlmsg_put(skb, 0, 0, XFRM_MSG_REPORT, sizeof(*ur), 0); in build_report()
3435 if (nlh == NULL) in build_report()
3438 ur = nlmsg_data(nlh); in build_report()
3445 nlmsg_cancel(skb, nlh); in build_report()
3449 nlmsg_end(skb, nlh); in build_report()
3478 struct nlmsghdr *nlh; in build_mapping() local
3480 nlh = nlmsg_put(skb, 0, 0, XFRM_MSG_MAPPING, sizeof(*um), 0); in build_mapping()
3481 if (nlh == NULL) in build_mapping()
3484 um = nlmsg_data(nlh); in build_mapping()
3496 nlmsg_end(skb, nlh); in build_mapping()