X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fflowgen.pl;h=d397515ae9982eeac4deac760c12d26d2d827167;hb=8758e8a373338e409d7f2863ee91e01060f35628;hp=a14faa7093b89ac93b6dc62408fbb5d0cd2fd1ab;hpb=50f06e1642e246bb9969035c9e3db7c44e7b95e0;p=openvswitch diff --git a/tests/flowgen.pl b/tests/flowgen.pl index a14faa70..d397515a 100755 --- a/tests/flowgen.pl +++ b/tests/flowgen.pl @@ -32,19 +32,19 @@ print PACKETS pack('NnnNNNN', output(DL_HEADER => '802.2'); -for my $dl_header qw(802.2+SNAP Ethernet) { +for my $dl_header (qw(802.2+SNAP Ethernet)) { my %a = (DL_HEADER => $dl_header); - for my $dl_vlan qw(none zero nonzero) { + for my $dl_vlan (qw(none zero nonzero)) { my %b = (%a, DL_VLAN => $dl_vlan); # Non-IP case. output(%b, DL_TYPE => 'non-ip'); - for my $ip_options qw(no yes) { + for my $ip_options (qw(no yes)) { my %c = (%b, DL_TYPE => 'ip', IP_OPTIONS => $ip_options); - for my $ip_fragment qw(no first middle last) { + for my $ip_fragment (qw(no first middle last)) { my %d = (%c, IP_FRAGMENT => $ip_fragment); - for my $tp_proto qw(TCP TCP+options UDP ICMP other) { + for my $tp_proto (qw(TCP TCP+options UDP ICMP other)) { output(%d, TP_PROTO => $tp_proto); } } @@ -84,15 +84,15 @@ sub output { $flow{NW_PROTO} = 42; } elsif ($attrs{TP_PROTO} eq 'TCP' || $attrs{TP_PROTO} eq 'TCP+options') { - $flow{NW_PROTO} = 6; # IP_TYPE_TCP + $flow{NW_PROTO} = 6; # IPPROTO_TCP $flow{TP_SRC} = 6667; $flow{TP_DST} = 9998; } elsif ($attrs{TP_PROTO} eq 'UDP') { - $flow{NW_PROTO} = 17; # IP_TYPE_UDP + $flow{NW_PROTO} = 17; # IPPROTO_UDP $flow{TP_SRC} = 1112; $flow{TP_DST} = 2223; } elsif ($attrs{TP_PROTO} eq 'ICMP') { - $flow{NW_PROTO} = 1; # IP_TYPE_ICMP + $flow{NW_PROTO} = 1; # IPPROTO_ICMP $flow{TP_SRC} = 8; # echo request $flow{TP_DST} = 0; # code } else {