Lines Matching defs:c

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