backing up
[vsorcdistro/.git] / ryu / build / lib.linux-armv7l-2.7 / ryu / ofproto / ofproto_common.py
1 # Copyright (C) 2011, 2012 Nippon Telegraph and Telephone Corporation.
2 # Copyright (C) 2011 Isaku Yamahata <yamahata at valinux co jp>
3 #
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
7 #
8 #    http://www.apache.org/licenses/LICENSE-2.0
9 #
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
13 # implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16
17 from struct import calcsize
18
19
20 OFP_HEADER_PACK_STR = '!BBHI'
21 OFP_HEADER_SIZE = 8
22 assert calcsize(OFP_HEADER_PACK_STR) == OFP_HEADER_SIZE
23
24 # Note: IANA assigned port number for OpenFlow is 6653
25 # from OpenFlow 1.3.3 (EXT-133).
26 # Some applications may still use 6633 as the de facto standard though.
27 OFP_TCP_PORT = 6653
28 OFP_SSL_PORT = 6653
29 OFP_TCP_PORT_OLD = 6633
30 OFP_SSL_PORT_OLD = 6633
31
32 # Vendor/Experimenter IDs
33 # https://rs.opennetworking.org/wiki/display/PUBLIC/ONF+Registry
34 NX_EXPERIMENTER_ID = 0x00002320  # Nicira
35 NX_NSH_EXPERIMENTER_ID = 0x005ad650  # Nicira Ext for Network Service Header
36 BSN_EXPERIMENTER_ID = 0x005c16c7  # Big Switch Networks
37 ONF_EXPERIMENTER_ID = 0x4f4e4600  # OpenFlow Extensions for 1.3.X Pack 1