H A D | actions.c | 192 static int set_mpls(struct sk_buff *skb, struct sw_flow_key *flow_key, set_mpls() argument 213 flow_key->mpls.top_lse = lse; set_mpls() 252 static int set_eth_addr(struct sk_buff *skb, struct sw_flow_key *flow_key, set_eth_addr() argument 271 ether_addr_copy(flow_key->eth.src, eth_hdr(skb)->h_source); set_eth_addr() 272 ether_addr_copy(flow_key->eth.dst, eth_hdr(skb)->h_dest); set_eth_addr() 367 static int set_ipv4(struct sk_buff *skb, struct sw_flow_key *flow_key, set_ipv4() argument 391 flow_key->ipv4.addr.src = new_addr; set_ipv4() 399 flow_key->ipv4.addr.dst = new_addr; set_ipv4() 404 flow_key->ip.tos = nh->tos; set_ipv4() 408 flow_key->ip.ttl = nh->ttl; set_ipv4() 419 static int set_ipv6(struct sk_buff *skb, struct sw_flow_key *flow_key, set_ipv6() argument 446 memcpy(&flow_key->ipv6.addr.src, masked, set_ipv6() 447 sizeof(flow_key->ipv6.addr.src)); set_ipv6() 468 memcpy(&flow_key->ipv6.addr.dst, masked, set_ipv6() 469 sizeof(flow_key->ipv6.addr.dst)); set_ipv6() 474 flow_key->ip.tos = ipv6_get_dsfield(nh); set_ipv6() 479 flow_key->ipv6.label = set_ipv6() 484 flow_key->ip.ttl = nh->hop_limit; set_ipv6() 497 static int set_udp(struct sk_buff *skb, struct sw_flow_key *flow_key, set_udp() argument 518 flow_key->tp.src = src; set_udp() 522 flow_key->tp.dst = dst; set_udp() 530 flow_key->tp.src = src; set_udp() 531 flow_key->tp.dst = dst; set_udp() 539 static int set_tcp(struct sk_buff *skb, struct sw_flow_key *flow_key, set_tcp() argument 556 flow_key->tp.src = src; set_tcp() 561 flow_key->tp.dst = dst; set_tcp() 568 static int set_sctp(struct sk_buff *skb, struct sw_flow_key *flow_key, set_sctp() argument 594 flow_key->tp.src = sh->source; set_sctp() 595 flow_key->tp.dst = sh->dest; set_sctp() 724 struct sw_flow_key *flow_key, execute_set_action() 740 struct sw_flow_key *flow_key, execute_masked_set_action() 748 flow_key->phy.priority = skb->priority; execute_masked_set_action() 753 flow_key->phy.skb_mark = skb->mark; execute_masked_set_action() 762 err = set_eth_addr(skb, flow_key, nla_data(a), execute_masked_set_action() 767 err = set_ipv4(skb, flow_key, nla_data(a), execute_masked_set_action() 772 err = set_ipv6(skb, flow_key, nla_data(a), execute_masked_set_action() 777 err = set_tcp(skb, flow_key, nla_data(a), execute_masked_set_action() 782 err = set_udp(skb, flow_key, nla_data(a), execute_masked_set_action() 787 err = set_sctp(skb, flow_key, nla_data(a), execute_masked_set_action() 792 err = set_mpls(skb, flow_key, nla_data(a), get_mask(a, execute_masked_set_action() 723 execute_set_action(struct sk_buff *skb, struct sw_flow_key *flow_key, const struct nlattr *a) execute_set_action() argument 739 execute_masked_set_action(struct sk_buff *skb, struct sw_flow_key *flow_key, const struct nlattr *a) execute_masked_set_action() argument
|