steth/steth/agent/common/constants.py
changzhi1990 057d7ed8d4 dhcp check and packet driver
Add send and sniff packet driver:
 * Scapy
 * pypcap

Complete agent driver unittest
Modify test-requirements mock==1.0.1

VXLAN support waiting for scapy 3.2.2 upload to pypi

Change-Id: I5e6f707fff08a60135655217e72660b301a4071d
2016-01-27 15:52:15 +08:00

33 lines
1.1 KiB
Python

# Copyright 2016 UnitedStack, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# Virtuel Interface Prefix
TAP_DEVICE_PREFIX = 'tap'
QBR_DEVICE_PREFIX = 'qbr'
QVB_DEVICE_PREFIX = 'qvb'
QVO_DEVICE_PREFIX = 'qvo'
VIF_PREFIX_LEN = 3
DEVICE_NAME_LEN = 14
# DHCP Message Type
# Reference: http://www.networksorcery.com/enp/rfc/rfc1533.txt
DHCP_MESSATE_TYPE = ['', 'DHCPDISCOVER', 'DHCPOFFER', 'DHCPREQUEST',
'DHCPDECLINE', 'DHCPACK', 'DHCPNAK', 'DHCPRELEASE']
DHCP_NS_PREFIX = 'qdhcp-'
# Reference: http://www.networksorcery.com/enp/rfc/rfc826.txt
ARP_OP_TYPE = ['', 'REQUEST', 'REPLY']