author | Gustavo J. A. M. Carneiro <gjc@inescporto.pt> |
Mon, 24 Nov 2008 12:09:47 +0000 | |
changeset 3916 | a1e72a0595a6 |
parent 3854 | c049b25f2ded |
child 4064 | 10222f483860 |
permissions | -rw-r--r-- |
3827
4b603cd4ee42
give up on merging tap and emulated, break apart
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
1 |
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
4b603cd4ee42
give up on merging tap and emulated, break apart
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
2 |
|
3854 | 3 |
def configure(conf): |
4 |
e = conf.create_header_configurator() |
|
5 |
e.mandatory = False |
|
6 |
e.name = 'linux/if_ether.h' |
|
7 |
e.define = 'HAVE_IF_ETHER_H' |
|
8 |
conf.env['ENABLE_EMU'] = e.run() |
|
3916
a1e72a0595a6
Disable EmuNetDevice Python bindings if the netdevice is not compiled in (bug #413)
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3854
diff
changeset
|
9 |
conf.report_optional_feature("EmuNetDevice", "Emulated Net Device", |
3854 | 10 |
conf.env['ENABLE_EMU'], |
11 |
"<linux/if_ether.h> include not detected") |
|
3827
4b603cd4ee42
give up on merging tap and emulated, break apart
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
12 |
|
4b603cd4ee42
give up on merging tap and emulated, break apart
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
13 |
def build(bld): |
3830
8862b9be62bb
rework to address suid root issues
Craig Dowell <craigdo@ee.washington.edu>
parents:
3827
diff
changeset
|
14 |
module = bld.create_ns3_module('emu', ['node']) |
3827
4b603cd4ee42
give up on merging tap and emulated, break apart
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
15 |
module.source = [ |
4b603cd4ee42
give up on merging tap and emulated, break apart
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
16 |
] |
3830
8862b9be62bb
rework to address suid root issues
Craig Dowell <craigdo@ee.washington.edu>
parents:
3827
diff
changeset
|
17 |
headers = bld.create_obj('ns3header') |
8862b9be62bb
rework to address suid root issues
Craig Dowell <craigdo@ee.washington.edu>
parents:
3827
diff
changeset
|
18 |
headers.module = 'emu' |
8862b9be62bb
rework to address suid root issues
Craig Dowell <craigdo@ee.washington.edu>
parents:
3827
diff
changeset
|
19 |
headers.source = [ |
3854 | 20 |
'emu.h', |
3830
8862b9be62bb
rework to address suid root issues
Craig Dowell <craigdo@ee.washington.edu>
parents:
3827
diff
changeset
|
21 |
] |
8862b9be62bb
rework to address suid root issues
Craig Dowell <craigdo@ee.washington.edu>
parents:
3827
diff
changeset
|
22 |
|
3854 | 23 |
env = bld.env_of_name('default') |
24 |
if env['ENABLE_EMU']: |
|
25 |
module.source.extend([ |
|
26 |
'emu-net-device.cc', |
|
27 |
'emu-encode-decode.cc', |
|
28 |
]) |
|
29 |
headers.source.extend([ |
|
30 |
'emu-net-device.h', |
|
31 |
]) |
|
32 |
||
33 |
obj = bld.create_suid_program('emu-sock-creator') |
|
34 |
obj.source = [ |
|
35 |
'emu-sock-creator.cc', |
|
36 |
'emu-encode-decode.cc', |
|
37 |
] |
|
38 |
||
39 |