Lines Matching refs:freq

373 fl_create(struct net *net, struct sock *sk, struct in6_flowlabel_req *freq,  in fl_create()  argument
381 olen = optlen - CMSG_ALIGN(sizeof(*freq)); in fl_create()
404 if (copy_from_user(fl->opt+1, optval+CMSG_ALIGN(sizeof(*freq)), olen)) in fl_create()
426 err = fl6_renew(fl, freq->flr_linger, freq->flr_expires); in fl_create()
429 fl->share = freq->flr_share; in fl_create()
430 addr_type = ipv6_addr_type(&freq->flr_dst); in fl_create()
436 fl->dst = freq->flr_dst; in fl_create()
499 int ipv6_flowlabel_opt_get(struct sock *sk, struct in6_flowlabel_req *freq, in ipv6_flowlabel_opt_get() argument
506 freq->flr_label = np->rcv_flowinfo & IPV6_FLOWLABEL_MASK; in ipv6_flowlabel_opt_get()
511 freq->flr_label = np->flow_label; in ipv6_flowlabel_opt_get()
520 freq->flr_label = sfl->fl->label; in ipv6_flowlabel_opt_get()
521 freq->flr_dst = sfl->fl->dst; in ipv6_flowlabel_opt_get()
522 freq->flr_share = sfl->fl->share; in ipv6_flowlabel_opt_get()
523 freq->flr_expires = (sfl->fl->expires - jiffies) / HZ; in ipv6_flowlabel_opt_get()
524 freq->flr_linger = sfl->fl->linger / HZ; in ipv6_flowlabel_opt_get()
541 struct in6_flowlabel_req freq; in ipv6_flowlabel_opt() local
548 if (optlen < sizeof(freq)) in ipv6_flowlabel_opt()
551 if (copy_from_user(&freq, optval, sizeof(freq))) in ipv6_flowlabel_opt()
554 switch (freq.flr_action) { in ipv6_flowlabel_opt()
556 if (freq.flr_flags & IPV6_FL_F_REFLECT) { in ipv6_flowlabel_opt()
570 if (sfl->fl->label == freq.flr_label) { in ipv6_flowlabel_opt()
571 if (freq.flr_label == (np->flow_label&IPV6_FLOWLABEL_MASK)) in ipv6_flowlabel_opt()
586 if (sfl->fl->label == freq.flr_label) { in ipv6_flowlabel_opt()
587 err = fl6_renew(sfl->fl, freq.flr_linger, freq.flr_expires); in ipv6_flowlabel_opt()
594 if (freq.flr_share == IPV6_FL_S_NONE && in ipv6_flowlabel_opt()
596 fl = fl_lookup(net, freq.flr_label); in ipv6_flowlabel_opt()
598 err = fl6_renew(fl, freq.flr_linger, freq.flr_expires); in ipv6_flowlabel_opt()
606 if (freq.flr_flags & IPV6_FL_F_REFLECT) { in ipv6_flowlabel_opt()
620 if (freq.flr_label & ~IPV6_FLOWLABEL_MASK) in ipv6_flowlabel_opt()
624 (freq.flr_label & IPV6_FLOWLABEL_STATELESS_FLAG)) in ipv6_flowlabel_opt()
627 fl = fl_create(net, sk, &freq, optval, optlen, &err); in ipv6_flowlabel_opt()
632 if (freq.flr_label) { in ipv6_flowlabel_opt()
636 if (sfl->fl->label == freq.flr_label) { in ipv6_flowlabel_opt()
637 if (freq.flr_flags&IPV6_FL_F_EXCL) { in ipv6_flowlabel_opt()
650 fl1 = fl_lookup(net, freq.flr_label); in ipv6_flowlabel_opt()
654 if (freq.flr_flags&IPV6_FL_F_EXCL) in ipv6_flowlabel_opt()
682 if (!(freq.flr_flags&IPV6_FL_F_CREATE)) in ipv6_flowlabel_opt()
693 fl1 = fl_intern(net, fl, freq.flr_label); in ipv6_flowlabel_opt()
697 if (!freq.flr_label) { in ipv6_flowlabel_opt()