Lines Matching refs:cfg_encap_proto
67 static uint8_t cfg_encap_proto; variable
285 if (cfg_encap_proto) { in build_packet()
288 if (cfg_encap_proto == IPPROTO_GRE) in build_packet()
290 else if (cfg_encap_proto == IPPROTO_UDP) in build_packet()
332 if (!cfg_encap_proto) in build_packet()
337 build_ipv4_header(buf + el3_len, cfg_encap_proto, in build_packet()
344 build_ipv6_header(buf + el3_len, cfg_encap_proto, in build_packet()
351 switch (cfg_encap_proto) { in build_packet()
646 cfg_encap_proto = IPPROTO_GRE; in parse_opts()
648 cfg_encap_proto = IPPROTO_UDP; in parse_opts()
650 cfg_encap_proto = IPPROTO_IPIP; in parse_opts()
652 cfg_encap_proto = IPPROTO_IP; /* == 0 */ in parse_opts()
718 if (cfg_encap_proto && cfg_l3_outer == AF_UNSPEC) in parse_opts()
720 else if ((!cfg_encap_proto) && cfg_l3_outer != AF_UNSPEC) in parse_opts()
722 else if ((!cfg_encap_proto) && cfg_l3_extra != AF_UNSPEC) in parse_opts()
727 if (cfg_l3_inner == AF_INET6 && cfg_encap_proto == IPPROTO_IPIP) in parse_opts()
728 cfg_encap_proto = IPPROTO_IPV6; in parse_opts()
752 fprintf(stderr, "encap proto: %u\n", cfg_encap_proto); in print_opts()