src/node/wscript
author Florian Westphal <fw@strlen.de>
Wed Jul 15 18:46:14 2009 +0200 (2009-07-15)
changeset 4685 ae536d9e0d6d
parent 4573 01e876191f2e
permissions -rw-r--r--
nsc: move nsc glue code from nsc-tcp-l4-protocol to node/nsc-glue.cc.

known problems:
- sim_interface.h is duplicated
- nsc-glue.cc adds hooks in node.cc, "hijacks" incoming packets
- nsc-glue exports NSCs INetStack (instead of wrapping it completely)
- nsc-tcp-l4-protocol and nsc-tcp-socket-impl make calls into nsc-glue
- nsc-tcp-socket-impl should really be "nsc-socket-core" (or something
like that)

needs fixing on nsc side:
- no support for multiple interfaces yet (also not yet supported
on nsc side)
- nsc initialisation still tied to IP (Adding an Interface and assigning the
IP address is a single step; it should be separate)

maybe there is more.

There is a NSC_NEXT define in nsc-glue.h, its main purpose is to flag
the places where the NSC API needs to be adapted to support multiple
interfaces in nsc.
     1 ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
     2 
     3 def build(bld):
     4     node = bld.create_ns3_module('node', ['core', 'common', 'simulator'])
     5     node.source = [
     6         'address.cc',
     7         'mac48-address.cc',
     8         'mac64-address.cc',
     9         'inet-socket-address.cc',
    10         'packet-socket-address.cc',
    11         'node.cc',
    12         'ipv4-address.cc',
    13         'ipv4-interface-address.cc',
    14         'ipv4-address-generator.cc',
    15         'ipv4-header.cc',
    16         'net-device.cc',
    17 	'address-utils.cc',
    18         'llc-snap-header.cc',
    19         'ethernet-header.cc',
    20         'ethernet-trailer.cc',
    21         'ipv4-route.cc',
    22         'ipv4-routing-protocol.cc',
    23         'queue.cc',
    24         'drop-tail-queue.cc',
    25         'channel.cc',
    26         'node-list.cc',
    27         'socket.cc',
    28         'socket-factory.cc',
    29         'packet-socket-factory.cc',
    30         'packet-socket.cc',
    31         'udp-socket.cc',
    32         'udp-socket-factory.cc',
    33         'tcp-socket.cc',
    34         'tcp-socket-factory.cc',
    35         'ipv4.cc',
    36         'application.cc',
    37         'simple-channel.cc',
    38         'simple-net-device.cc',
    39         'inet6-socket-address.cc',
    40         'ipv6-address.cc',
    41         'ipv6-header.cc',
    42         'ipv4-raw-socket-factory.cc',
    43         ]
    44 
    45     headers = bld.new_task_gen('ns3header')
    46     headers.module = 'node'
    47     headers.source = [
    48         'address.h',
    49         'mac48-address.h',
    50         'mac64-address.h',
    51         'inet-socket-address.h',
    52         'packet-socket-address.h',
    53         'node.h',
    54         'ipv4-address.h',
    55         'ipv4-interface-address.h',
    56         'ipv4-address-generator.h',
    57         'ipv4-header.h',
    58         'net-device.h',
    59 	'address-utils.h',
    60         'ipv4-route.h',
    61         'ipv4-routing-protocol.h',
    62         'queue.h',
    63         'drop-tail-queue.h',
    64         'llc-snap-header.h',
    65         'ethernet-header.h',
    66         'ethernet-trailer.h',
    67         'channel.h',
    68         'node-list.h',
    69         'socket.h',
    70         'socket-factory.h',
    71         'packet-socket-factory.h',
    72         'udp-socket.h',
    73         'udp-socket-factory.h',
    74         'tcp-socket.h',
    75         'tcp-socket-factory.h',
    76         'ipv4.h',
    77         'application.h',
    78         'simple-channel.h',
    79         'simple-net-device.h',
    80         'inet6-socket-address.h',
    81         'ipv6-address.h',
    82         'ipv6-header.h',
    83         'ipv4-raw-socket-factory.h',
    84         ]
    85 
    86     if bld.env['WITH_NSC']:
    87         node.source.append ('nsc-glue.cc')
    88         node.source.append ('nsc-sysctl.cc')
    89         node.uselib = 'DL'