Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(249)

Delta Between Two Patch Sets: src/devices/switch/wscript

Issue 1872049: ns-3-openflow
Left Patch Set: new OFSID library creation/linking system Created 13 years, 7 months ago
Right Patch Set: Fixed two merge errors, and namespace ofi is now in ns3 Created 13 years, 1 month ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/devices/switch/waf ('k') | src/wscript » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 1 ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
2 2
3 import os 3 import os
4 import Options 4 import Options
5 5
6 def set_options(opt): 6 def set_options(opt):
7 opt.add_option('--with-openflow', 7 opt.add_option('--with-openflow',
8 help=('Path to OFSID source for NS-3 OpenFlow Integration sup port'), 8 help=('Path to OFSID source for NS-3 OpenFlow Integration sup port'),
9 dest='with_openflow', default=None)· 9 dest='with_openflow', default=None)·
10 10
11 def configure(conf): 11 def configure(conf):
12 if Options.options.with_openflow: 12 if Options.options.with_openflow:
13 if os.path.isdir(Options.options.with_openflow): 13 if os.path.isdir(Options.options.with_openflow):
14 conf.check_message("libopenflow.a location", '', True, ("%s (given)" % Options.options.with_openflow)) 14 conf.check_message("libopenflow.a location", '', True, ("%s (given)" % Options.options.with_openflow))
15 conf.env['WITH_OPENFLOW'] = os.path.abspath(Options.options.with_ope nflow) 15 conf.env['WITH_OPENFLOW'] = os.path.abspath(Options.options.with_ope nflow)
16 else: 16 else:
17 openflow_dir = os.path.join('..','openflow') 17 openflow_dir = os.path.join('..','openflow')
18 if os.path.isdir(openflow_dir): 18 if os.path.isdir(openflow_dir):
19 conf.check_message("openflow location", '', True, ("%s (guessed) " % openflow_dir)) 19 conf.check_message("openflow location", '', True, ("%s (guessed) " % openflow_dir))
20 conf.env['WITH_OPENFLOW'] = os.path.abspath(openflow_dir) 20 conf.env['WITH_OPENFLOW'] = os.path.abspath(openflow_dir)
21 » » del openflow_dir 21 » del openflow_dir
Lalith Suresh 2010/08/13 05:45:07 "del openflow_dir" can be outside the if block.
22 if not conf.env['WITH_OPENFLOW']: 22 if not conf.env['WITH_OPENFLOW']:
23 conf.check_message("openflow location", '', False) 23 conf.check_message("openflow location", '', False)
24 conf.report_optional_feature("openflow", "NS-3 OpenFlow Integration", Fa lse, 24 conf.report_optional_feature("openflow", "NS-3 OpenFlow Integration", Fa lse,
25 "OpenFlow not enabled (see option --with-op enflow)") 25 "OpenFlow not enabled (see option --with-op enflow)")
26 return· 26 return·
27 27
28 test_code = ''' 28 test_code = '''
29 #include "openflow.h" 29 #include "openflow.h"
30 #include "nicira-ext.h"
31 #include "ericsson-ext.h"
32
30 extern "C" 33 extern "C"
31 { 34 {
32 #define private _private 35 #define private _private
33 #define delete _delete 36 #define delete _delete
34 #define list List 37 #define list List
35
36 #include "nicira-ext.h"
37 #include "ericsson-ext.h"
38 38
39 #include "csum.h" 39 #include "csum.h"
40 #include "poll-loop.h" 40 #include "poll-loop.h"
41 #include "rconn.h" 41 #include "rconn.h"
42 #include "stp.h" 42 #include "stp.h"
43 #include "vconn.h" 43 #include "vconn.h"
44 #include "xtoxll.h" 44 #include "xtoxll.h"
45 45
46 #include "chain.h" 46 #include "chain.h"
47 #include "table.h" 47 #include "table.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 if bld.env['OPENFLOW'] and bld.env['DL'] and bld.env['XML2']: 105 if bld.env['OPENFLOW'] and bld.env['DL'] and bld.env['XML2']:
106 obj.uselib = 'OPENFLOW DL XML2'· 106 obj.uselib = 'OPENFLOW DL XML2'·
107 107
108 headers = bld.new_task_gen('ns3header') 108 headers = bld.new_task_gen('ns3header')
109 headers.module = 'switch' 109 headers.module = 'switch'
110 headers.source = [ 110 headers.source = [
111 'openflow-interface.h', 111 'openflow-interface.h',
112 'switch-net-device.h', 112 'switch-net-device.h',
113 'switch-helper.h', 113 'switch-helper.h',
114 ] 114 ]
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b