author | Craig Dowell <craigdo@ee.washington.edu> |
Tue, 27 Jan 2009 20:26:34 -0800 | |
changeset 4164 | 1f6ae48061a9 |
parent 4163 | 8c48682b3d42 |
child 4186 | f1d57182d491 |
permissions | -rw-r--r-- |
4163
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
1 |
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
2 |
|
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
3 |
def configure(conf): |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
4 |
if conf.env['ENABLE_THREADING']: |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
5 |
conf.env['ENABLE_TAP'] = conf.check(header_name='linux/if_ether.h', |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
6 |
define_name='HAVE_IF_ETHER_H') |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
7 |
conf.report_optional_feature("TapBridge", "Tap Bridge", |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
8 |
conf.env['ENABLE_TAP'], |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
9 |
"<linux/if_ether.h> include not detected") |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
10 |
else: |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
11 |
conf.report_optional_feature("TapBridge", "Tap Bridge", |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
12 |
False, |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
13 |
"needs threading support which is not available") |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
14 |
|
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
15 |
def build(bld): |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
16 |
module = bld.create_ns3_module('tap-bridge', ['node']) |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
17 |
module.source = [ |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
18 |
] |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
19 |
headers = bld.new_task_gen('ns3header') |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
20 |
headers.module = 'tap-bridge' |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
21 |
headers.source = [ |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
22 |
'tap.h', |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
23 |
] |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
24 |
|
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
25 |
env = bld.env_of_name('default') |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
26 |
if env['ENABLE_TAP']: |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
27 |
module.source.extend([ |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
28 |
'tap-bridge.cc', |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
29 |
'tap-encode-decode.cc', |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
30 |
]) |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
31 |
headers.source.extend([ |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
32 |
'tap-bridge.h', |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
33 |
]) |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
34 |
|
4164
1f6ae48061a9
checkpoint tap bridge
Craig Dowell <craigdo@ee.washington.edu>
parents:
4163
diff
changeset
|
35 |
obj = bld.create_suid_program('tap-creator') |
4163
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
36 |
obj.source = [ |
4164
1f6ae48061a9
checkpoint tap bridge
Craig Dowell <craigdo@ee.washington.edu>
parents:
4163
diff
changeset
|
37 |
'tap-creator.cc', |
4163
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
38 |
'tap-encode-decode.cc', |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
39 |
] |
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
40 |
|
8c48682b3d42
checkpoint tap development
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
41 |