1 %% Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
2 %% Copyright (C) 2013 YAMAMOTO Takashi <yamamoto at valinux co jp>
4 %% Licensed under the Apache License, Version 2.0 (the "License");
5 %% you may not use this file except in compliance with the License.
6 %% You may obtain a copy of the License at
8 %% http://www.apache.org/licenses/LICENSE-2.0
10 %% Unless required by applicable law or agreed to in writing, software
11 %% distributed under the License is distributed on an "AS IS" BASIS,
12 %% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14 %% See the License for the specific language governing permissions and
15 %% limitations under the License.
20 -include_lib("flower/include/flower_packet.hrl").
30 buffer_id = ?OFP_NO_BUFFER,in_port = controller,
32 [#ofp_action_output{port = all,max_len = 65535}],
34 <<242,11,164,208,63,112,242,11,164,125,248,234,8,0,69,0,
35 0,84,248,26,0,0,255,1,175,139,10,0,0,1,10,0,0,2,8,0,2,
36 8,247,96,0,0,49,214,2,0,0,0,0,0,171,141,45,49,0,0,0,0,
37 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,
38 34,35,36,37,38,39,40,41,42,43,44,45,46,47,0,0,0,0,0,0,
41 cookie = cookie(<<0,0,0,0,0,0,0,0>>),
42 command = add,idle_timeout = 0,
43 hard_timeout = 0,priority = 123,buffer_id = 65535,
44 out_port = all,flags = [],
47 wildcards = 16#3ffff7,
48 dl_dst = <<"\362\v\244}\370\352">>,
49 % XXX ryu and flower have different defaults for the
52 dl_src = <<0:6/unit:8>>
54 actions = [#ofp_action_output{port = 6,max_len = 65535}]},
57 buffer_id = 2,total_len=42,reason = action,in_port = 99,
59 <<255,255,255,255,255,255,242,11,164,125,248,234,8,6,0,
60 1,8,0,6,4,0,1,242,11,164,125,248,234,10,0,0,1,0,0,0,0,
64 #ofp_switch_features{ % features_reply
65 datapath_id = 16#ff12345678,n_buffers = 0,n_tables = 255,
67 [arp_match_ip,ip_reasm,stp,flow_stats],
69 [enqueue,set_nw_src,set_vlan_vid,output],
72 port_no = 7,hw_addr = <<"\362\v\244\320?p">>,
76 curr = [autoneg,copper,'100mb_fd'],
77 advertised = [autoneg,copper],
78 supported = [autoneg,copper,'100mb_fd'],
79 peer = [autoneg,copper,'100mb_fd']},
81 port_no = 6,hw_addr = <<"\362\v\244}\370\352">>,
85 curr = [autoneg,copper,'100mb_fd'],
86 advertised = [autoneg,copper],
87 supported = [autoneg,copper,'100mb_fd'],
88 peer = [autoneg,copper,'100mb_fd']}]}
90 lists:foldl(fun x:do/2, {1, 0}, List).