-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpydatapath.py
More file actions
executable file
·53 lines (45 loc) · 1.64 KB
/
pydatapath.py
File metadata and controls
executable file
·53 lines (45 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/python
####################################################################################
##
## https://github.com/NetASM/pydatapath
##
## File:
## pydatapath.py
##
## Project:
## Pydatapath: pyretic extensions for programmable datapaths
##
## Author:
## Muhammad Shahbaz
##
## Copyright notice:
## Copyright (C) 2014 Georgia Institute of Technology
## Network Operations and Internet Security Lab
##
## Licence:
## This file is a part of the NetASM development base package.
##
## This file is free code: you can redistribute it and/or modify it under
## the terms of the GNU Lesser General Public License version 2.1 as
## published by the Free Software Foundation.
##
## This package is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with the Pydatapath source package. If not, see
## http://www.gnu.org/licenses/.
import sys
from pydatapath.utils.bash import get_path
if __name__ == '__main__':
# Check if pox is setup (i.e., located in the PYTHONPATH)
if get_path('pox'): pass
# Check if pydatapath is setup (i.e., located in the PYTHONPATH)
if get_path('pydatapath'): pass
# Stop listening for OpenFlow connections
if '--no-openflow' not in sys.argv:
sys.argv.insert(1, '--no-openflow')
from pox.boot import boot
boot()