Lines Matching refs:c

1013 	struct km_event c;  in xfrm_add_sa()  local
1041 c.seq = nlh->nlmsg_seq; in xfrm_add_sa()
1042 c.portid = nlh->nlmsg_pid; in xfrm_add_sa()
1043 c.event = nlh->nlmsg_type; in xfrm_add_sa()
1045 km_state_notify(x, &c); in xfrm_add_sa()
1091 struct km_event c; in xfrm_del_sa() local
1111 c.seq = nlh->nlmsg_seq; in xfrm_del_sa()
1112 c.portid = nlh->nlmsg_pid; in xfrm_del_sa()
1113 c.event = nlh->nlmsg_type; in xfrm_del_sa()
1114 km_state_notify(x, &c); in xfrm_del_sa()
2232 struct km_event c; in xfrm_add_policy() local
2263 c.event = nlh->nlmsg_type; in xfrm_add_policy()
2264 c.seq = nlh->nlmsg_seq; in xfrm_add_policy()
2265 c.portid = nlh->nlmsg_pid; in xfrm_add_policy()
2266 km_policy_notify(xp, p->dir, &c); in xfrm_add_policy()
2554 struct km_event c; in xfrm_get_policy() local
2617 c.data.byid = p->index; in xfrm_get_policy()
2618 c.event = nlh->nlmsg_type; in xfrm_get_policy()
2619 c.seq = nlh->nlmsg_seq; in xfrm_get_policy()
2620 c.portid = nlh->nlmsg_pid; in xfrm_get_policy()
2621 km_policy_notify(xp, p->dir, &c); in xfrm_get_policy()
2634 struct km_event c; in xfrm_flush_sa() local
2644 c.data.proto = p->proto; in xfrm_flush_sa()
2645 c.event = nlh->nlmsg_type; in xfrm_flush_sa()
2646 c.seq = nlh->nlmsg_seq; in xfrm_flush_sa()
2647 c.portid = nlh->nlmsg_pid; in xfrm_flush_sa()
2648 c.net = net; in xfrm_flush_sa()
2649 km_state_notify(NULL, &c); in xfrm_flush_sa()
2670 static int build_aevent(struct sk_buff *skb, struct xfrm_state *x, const struct km_event *c) in build_aevent() argument
2676 nlh = nlmsg_put(skb, c->portid, c->seq, XFRM_MSG_NEWAE, sizeof(*id), 0); in build_aevent()
2688 id->flags = c->data.aevent; in build_aevent()
2750 struct km_event c; in xfrm_get_ae() local
2774 c.data.aevent = p->flags; in xfrm_get_ae()
2775 c.seq = nlh->nlmsg_seq; in xfrm_get_ae()
2776 c.portid = nlh->nlmsg_pid; in xfrm_get_ae()
2778 err = build_aevent(r_skb, x, &c); in xfrm_get_ae()
2792 struct km_event c; in xfrm_new_ae() local
2833 c.event = nlh->nlmsg_type; in xfrm_new_ae()
2834 c.seq = nlh->nlmsg_seq; in xfrm_new_ae()
2835 c.portid = nlh->nlmsg_pid; in xfrm_new_ae()
2836 c.data.aevent = XFRM_AE_CU; in xfrm_new_ae()
2837 km_state_notify(x, &c); in xfrm_new_ae()
2849 struct km_event c; in xfrm_flush_policy() local
2864 c.data.type = type; in xfrm_flush_policy()
2865 c.event = nlh->nlmsg_type; in xfrm_flush_policy()
2866 c.seq = nlh->nlmsg_seq; in xfrm_flush_policy()
2867 c.portid = nlh->nlmsg_pid; in xfrm_flush_policy()
2868 c.net = net; in xfrm_flush_policy()
2869 km_policy_notify(NULL, 0, &c); in xfrm_flush_policy()
3469 struct netlink_dump_control c = { in xfrm_user_rcv_msg() local
3480 err = netlink_dump_start(net->xfrm.nlsk, skb, nlh, &c); in xfrm_user_rcv_msg()
3535 static int build_expire(struct sk_buff *skb, struct xfrm_state *x, const struct km_event *c) in build_expire() argument
3541 nlh = nlmsg_put(skb, c->portid, 0, XFRM_MSG_EXPIRE, sizeof(*ue), 0); in build_expire()
3547 ue->hard = (c->data.hard != 0) ? 1 : 0; in build_expire()
3574 static int xfrm_exp_state_notify(struct xfrm_state *x, const struct km_event *c) in xfrm_exp_state_notify() argument
3583 if (build_expire(skb, x, c) < 0) { in xfrm_exp_state_notify()
3591 static int xfrm_aevent_state_notify(struct xfrm_state *x, const struct km_event *c) in xfrm_aevent_state_notify() argument
3601 err = build_aevent(skb, x, c); in xfrm_aevent_state_notify()
3607 static int xfrm_notify_sa_flush(const struct km_event *c) in xfrm_notify_sa_flush() argument
3609 struct net *net = c->net; in xfrm_notify_sa_flush()
3619 nlh = nlmsg_put(skb, c->portid, c->seq, XFRM_MSG_FLUSHSA, sizeof(*p), 0); in xfrm_notify_sa_flush()
3626 p->proto = c->data.proto; in xfrm_notify_sa_flush()
3691 static int xfrm_notify_sa(struct xfrm_state *x, const struct km_event *c) in xfrm_notify_sa() argument
3703 if (c->event == XFRM_MSG_DELSA) { in xfrm_notify_sa()
3714 nlh = nlmsg_put(skb, c->portid, c->seq, c->event, headlen, 0); in xfrm_notify_sa()
3720 if (c->event == XFRM_MSG_DELSA) { in xfrm_notify_sa()
3750 static int xfrm_send_state_notify(struct xfrm_state *x, const struct km_event *c) in xfrm_send_state_notify() argument
3753 switch (c->event) { in xfrm_send_state_notify()
3755 return xfrm_exp_state_notify(x, c); in xfrm_send_state_notify()
3757 return xfrm_aevent_state_notify(x, c); in xfrm_send_state_notify()
3761 return xfrm_notify_sa(x, c); in xfrm_send_state_notify()
3763 return xfrm_notify_sa_flush(c); in xfrm_send_state_notify()
3766 c->event); in xfrm_send_state_notify()
3916 int dir, const struct km_event *c) in build_polexpire() argument
3919 int hard = c->data.hard; in build_polexpire()
3923 nlh = nlmsg_put(skb, c->portid, 0, XFRM_MSG_POLEXPIRE, sizeof(*upe), 0); in build_polexpire()
3950 static int xfrm_exp_policy_notify(struct xfrm_policy *xp, int dir, const struct km_event *c) in xfrm_exp_policy_notify() argument
3960 err = build_polexpire(skb, xp, dir, c); in xfrm_exp_policy_notify()
3966 static int xfrm_notify_policy(struct xfrm_policy *xp, int dir, const struct km_event *c) in xfrm_notify_policy() argument
3978 if (c->event == XFRM_MSG_DELPOLICY) { in xfrm_notify_policy()
3990 nlh = nlmsg_put(skb, c->portid, c->seq, c->event, headlen, 0); in xfrm_notify_policy()
3996 if (c->event == XFRM_MSG_DELPOLICY) { in xfrm_notify_policy()
4002 if (c->data.byid) in xfrm_notify_policy()
4037 static int xfrm_notify_policy_flush(const struct km_event *c) in xfrm_notify_policy_flush() argument
4039 struct net *net = c->net; in xfrm_notify_policy_flush()
4048 nlh = nlmsg_put(skb, c->portid, c->seq, XFRM_MSG_FLUSHPOLICY, 0, 0); in xfrm_notify_policy_flush()
4052 err = copy_to_user_policy_type(c->data.type, skb); in xfrm_notify_policy_flush()
4065 static int xfrm_send_policy_notify(struct xfrm_policy *xp, int dir, const struct km_event *c) in xfrm_send_policy_notify() argument
4068 switch (c->event) { in xfrm_send_policy_notify()
4072 return xfrm_notify_policy(xp, dir, c); in xfrm_send_policy_notify()
4074 return xfrm_notify_policy_flush(c); in xfrm_send_policy_notify()
4076 return xfrm_exp_policy_notify(xp, dir, c); in xfrm_send_policy_notify()
4079 c->event); in xfrm_send_policy_notify()
4186 static bool xfrm_is_alive(const struct km_event *c) in xfrm_is_alive() argument
4188 return (bool)xfrm_acquire_is_on(c->net); in xfrm_is_alive()