src/devices/p2p/p2p-net-device.h
author Tom Henderson <tomh@tomh.org>
Fri, 15 Jun 2007 13:19:57 -0700
changeset 773 18ad0b94e2ae
parent 767 c36570ed4f5e
child 926 1fdec986d774
permissions -rw-r--r--
back out unfinished p2p changes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
     2
/*
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
     3
 * Copyright (c) 2007 University of Washington
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
     4
 *
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
     6
 * it under the terms of the GNU General Public License version 2 as
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
     7
 * published by the Free Software Foundation;
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
     8
 *
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    12
 * GNU General Public License for more details.
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    13
 *
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    14
 * You should have received a copy of the GNU General Public License
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    15
 * along with this program; if not, write to the Free Software
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    17
 *
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    18
 * Author: Craig Dowell <craigdo@ee.washington.edu>
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    19
 */
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    20
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
    21
#ifndef POINT_TO_POINT_NET_DEVICE_H
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
    22
#define POINT_TO_POINT_NET_DEVICE_H
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    23
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    24
#include <string.h>
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    25
#include "ns3/mac-address.h"
729
b5e744285e92 rename i-node to node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 728
diff changeset
    26
#include "ns3/node.h"
331
d75ee9d8efa4 move p2p to new dir
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 252
diff changeset
    27
#include "ns3/net-device.h"
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    28
#include "ns3/callback.h"
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    29
#include "ns3/packet.h"
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    30
#include "ns3/callback-trace-source.h"
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 369
diff changeset
    31
#include "ns3/nstime.h"
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 369
diff changeset
    32
#include "ns3/data-rate.h"
543
a730800a31d5 Node* -> Ptr<Node>
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 517
diff changeset
    33
#include "ns3/ptr.h"
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    34
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    35
namespace ns3 {
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    36
402
f47285751901 add NetDevice::GetChannel method and doxygen-document it
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 379
diff changeset
    37
class Queue;
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
    38
class PointToPointChannel;
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    39
409
1cbb9ed862d0 add empty template for doxygen doc
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 402
diff changeset
    40
/**
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    41
 * \class PointToPointNetDevice
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    42
 * \brief A Device for a Point to Point Network Link.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    43
 *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    44
 * Ns-3 takes a four-layer view of a protocol stack.  This is the same model
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    45
 * that TCP uses.  In this view, layers 5-7 of the OSI reference model are
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    46
 * grouped together into an application layer; layer four (transport / TCP) is
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    47
 * broken out; layer three (network / IP) is broken out; and layers 1-2 are
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    48
 * grouped together.  We call this grouping of layers one and two a NetDevice
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    49
 * and represent it as a class in the system.
409
1cbb9ed862d0 add empty template for doxygen doc
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 402
diff changeset
    50
 *
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    51
 * The NetDevice class is specialized according to the needs of the specific
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    52
 * kind of network link.  In this case, the link is a PointToPoint link.  The
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    53
 * PointToPoint link is a family of classes that includes this class, the
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    54
 * PointToPointNetDevice, a PointToPointChannel class that represents the 
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    55
 * actual medium across which bits are sent, a PointToPointIpv4Interface class
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    56
 * that provides the hook to tie a general purpose node to this specific
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    57
 * link, and finally, a PointToPointTopology object that is responsible for
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    58
 * putting all of the pieces together.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    59
 *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    60
 * This is the PointToPointNetDevice class that represents, essentially, the
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    61
 * PC card that is used to connect to the PointToPoint network.
409
1cbb9ed862d0 add empty template for doxygen doc
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 402
diff changeset
    62
 */
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
    63
class PointToPointNetDevice : public NetDevice {
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    64
public:
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    65
  /**
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    66
   * Enumeration of the types of traces supported in the class.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    67
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    68
   */
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    69
  enum TraceType {
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    70
    QUEUE, /**< Trace queue events on the attached queue */
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    71
    RX,    /**< Trace packet reception events (from the channel) */
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    72
  };
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    73
  /**
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    74
   * Construct a PointToPointNetDevice
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    75
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    76
   * This is the constructor for the PointToPointNetDevice.  It takes as a
728
95c426b1cb60 rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 607
diff changeset
    77
   * parameter the Node to which this device is connected.  Ownership of the
95c426b1cb60 rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 607
diff changeset
    78
   * Node pointer is not implied and the node must not be deleded.
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    79
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    80
   * @see PointToPointTopology::AddPointToPointLink ()
728
95c426b1cb60 rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 607
diff changeset
    81
   * @param node the Node to which this device is connected.
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    82
   */
773
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
    83
  PointToPointNetDevice (Ptr<Node> node);
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    84
  /**
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    85
   * Copy Construct a PointToPointNetDevice
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    86
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    87
   * This is the copy constructor for the PointToPointNetDevice.  This is
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    88
   * primarily used in topology creation.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    89
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    90
   * @see PointToPointTopology::AddPointToPointLink ()
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    91
   * @param nd the object to be copied
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    92
   */
379
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents: 378
diff changeset
    93
  PointToPointNetDevice (const PointToPointNetDevice& nd);
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    94
  /**
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    95
   * Destroy a PointToPointNetDevice
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    96
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    97
   * This is the destructor for the PointToPointNetDevice.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
    98
   */
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
    99
  virtual ~PointToPointNetDevice();
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   100
  /**
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   101
   * Assignment Operator for a PointToPointNetDevice
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   102
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   103
   * This is the assignment operator for the PointToPointNetDevice.  This is
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   104
   * to allow
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   105
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   106
   * @param nd the object to be copied
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   107
   */
773
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   108
  PointToPointNetDevice& operator= (PointToPointNetDevice nd);
409
1cbb9ed862d0 add empty template for doxygen doc
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 402
diff changeset
   109
  /**
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   110
   * Set the Data Rate used for transmission of packets.  The data rate is
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   111
   * set in the Attach () method from the corresponding field in the channel
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   112
   * to which the device is attached.  It can be overridden using this method.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   113
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   114
   * @see Attach ()
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   115
   * @param bps the data rate at which this object operates
409
1cbb9ed862d0 add empty template for doxygen doc
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 402
diff changeset
   116
   */
773
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   117
  void SetDataRate(DataRate bps);
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   118
  /**
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   119
   * Set the inteframe gap used to separate packets.  The interframe gap
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   120
   * defines the minimum space required between packets sent by this device.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   121
   * It is usually set in the Attach () method based on the speed of light
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   122
   * delay of the channel to which the device is attached.  It can be 
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   123
   * overridden using this method if desired.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   124
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   125
   * @see Attach ()
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   126
   * @param t the interframe gap time
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   127
   */
773
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   128
  void SetInterframeGap(Time t);
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   129
  /**
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   130
   * Attach the device to a channel.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   131
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   132
   * The PointToPointTopology object creates a PointToPointChannel and two
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   133
   * PointtoPointNetDevices.  In order to introduce these components to each
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   134
   * other, the topology object calls Attach () on each PointToPointNetDevice.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   135
   * Inside this method, the Net Device calls out to the PointToPointChannel
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   136
   * to introduce itself.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   137
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   138
   * @see PointToPointTopology::AddPointToPointLink ()
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   139
   * @see SetDataRate ()
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   140
   * @see SetInterframeGap ()
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   141
   * @param ch a pointer to the channel to which this object is being attached.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   142
   */
568
e1660959ecbb use Ptr<> everywhere Object or NsUnknown are used
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 543
diff changeset
   143
  bool Attach(Ptr<PointToPointChannel> ch);
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   144
  /**
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   145
   * Attach a queue to the PointToPointNetDevice.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   146
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   147
   * The PointToPointNetDevice "owns" a queue.  This queue is created by the
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   148
   * PointToPointTopology object and implements a queueing method such as
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   149
   * DropTail or RED.  The PointToPointNetDevice assumes ownership of this
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   150
   * queue and must delete it when the device is destroyed.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   151
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   152
   * @see PointToPointTopology::AddPointToPointLink ()
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   153
   * @see Queue
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   154
   * @see DropTailQueue
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   155
   * @param queue a pointer to the queue for which object is assuming
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   156
   *        ownership.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   157
   */
581
15240a33f517 make Queue derive from Interface
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 568
diff changeset
   158
  void AddQueue(Ptr<Queue> queue);
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   159
  /**
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   160
   * Receive a packet from a connected PointToPointChannel.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   161
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   162
   * The PointToPointNetDevice receives packets from its connected channel
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   163
   * and forwards them up the protocol stack.  This is the public method
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   164
   * used by the channel to indicate that the last bit of a packet has 
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   165
   * arrived at the device.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   166
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   167
   * @see PointToPointChannel
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   168
   * @param p a reference to the received packet
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   169
   */
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   170
  void Receive (Packet& p);
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   171
protected:
517
702e96b8960f finish Dispose -> DoDispose rework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 465
diff changeset
   172
  virtual void DoDispose (void);
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   173
  /**
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   174
   * Get a copy of the attached Queue.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   175
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   176
   * This method is provided for any derived class that may need to get
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   177
   * direct access to the underlying queue.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   178
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   179
   * @see PointToPointTopology
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   180
   * @returns a pointer to the queue.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   181
   */
581
15240a33f517 make Queue derive from Interface
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 568
diff changeset
   182
  Ptr<Queue> GetQueue(void) const; 
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   183
  /**
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   184
   * Get a copy of the attached Channel
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   185
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   186
   * This method is provided for any derived class that may need to get
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   187
   * direct access to the connected channel
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   188
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   189
   * @see PointToPointChannel
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   190
   * @returns a pointer to the channel
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   191
   */
568
e1660959ecbb use Ptr<> everywhere Object or NsUnknown are used
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 543
diff changeset
   192
  virtual Ptr<Channel> DoGetChannel(void) const;
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   193
private:
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   194
  /**
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   195
   * Send a Packet Down the Wire.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   196
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   197
   * The SendTo method is defined as the standard way that the level three
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   198
   * protocol uses to tell a NetDevice to send a packet.  SendTo is declared
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   199
   * as abstract in the NetDevice class and we declare it here.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   200
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   201
   * @see NetDevice
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   202
   * @param p a reference to the packet to send
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   203
   * @param dest a reference to the MacAddress of the destination device
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   204
   * @returns true if success, false on failure
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   205
   */
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   206
  virtual bool SendTo (Packet& p, const MacAddress& dest);
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   207
  /**
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   208
   * Start Sending a Packet Down the Wire.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   209
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   210
   * The TransmitStart method is the method that is used internally in the
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   211
   * PointToPointNetDevice to begin the process of sending a packet out on
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   212
   * the channel.  The corresponding method is called on the channel to let
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   213
   * it know that the physical device this class represents has virually
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   214
   * started sending signals.  An event is scheduled for the time at which
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   215
   * the bits have been completely transmitted.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   216
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   217
   * @see PointToPointChannel::TransmitStart ()
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   218
   * @see TransmitCompleteEvent ()
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   219
   * @param p a reference to the packet to send
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   220
   * @returns true if success, false on failure
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   221
   */
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 369
diff changeset
   222
  bool TransmitStart (Packet &p);
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   223
  /**
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   224
   * Stop Sending a Packet Down the Wire and Begin the Interframe Gap.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   225
   *
773
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   226
   * The TransmitCompleteEvent method is used internally to finish the process
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   227
   * of sending a packet out on the channel.  During execution of this method
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   228
   * the TransmitEnd method is called on the channel to let it know that the
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   229
   * physical device this class represents has virually finished sending 
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   230
   * signals.  The channel uses this event to begin its speed of light delay
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   231
   * timer after which it notifies the Net Device at the other end of the 
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   232
   * link that the bits have arrived.  During this method, the net device 
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   233
   * also schedules the TransmitReadyEvent at which time the transmitter 
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   234
   * becomes ready to send the next packet.
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   235
   *
773
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   236
   * @see PointToPointChannel::TransmitEnd ()
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   237
   * @see TransmitReadyEvent ()
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   238
   * @returns true if success, false on failure
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   239
   */
773
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   240
  void TransmitCompleteEvent (void);
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   241
  /**
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   242
   * Cause the Transmitter to Become Ready to Send Another Packet.
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   243
   *
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   244
   * The TransmitReadyEvent method is used internally to re-enable the 
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   245
   * transmit machine of the net device.  It is scheduled after a suitable
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   246
   * interframe gap after the completion of the previous transmission.
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   247
   * The queue is checked at this time, and if there is a packet waiting on
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   248
   * the queue, the transmission process is begun.
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   249
   *
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   250
   * @see TransmitStart ()
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   251
   */
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   252
  void TransmitReadyEvent (void);
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   253
  /**
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   254
   * Create a Trace Resolver for events in the net device.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   255
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   256
   * @see class TraceResolver
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   257
   */
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   258
  virtual TraceResolver *DoCreateTraceResolver (TraceContext const &context);
445
10cd9049a0ad add NetDevice::NeedsArp method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 419
diff changeset
   259
  virtual bool DoNeedsArp (void) const;
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   260
  /**
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   261
   * Enumeration of the states of the transmit machine of the net device.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   262
   */
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 369
diff changeset
   263
  enum TxMachineState
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 369
diff changeset
   264
    {
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   265
      READY, /**< The transmitter is ready to begin transmission of a packet */
773
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   266
      BUSY,  /**< The transmitter is busy transmitting a packet */
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   267
      GAP    /**< The transmitter is in the interframe gap time */
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 369
diff changeset
   268
    };
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   269
  /**
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   270
   * The state of the Net Device transmit state machine.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   271
   * @see TxMachineState
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   272
   */
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 369
diff changeset
   273
  TxMachineState m_txMachineState;
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   274
  /**
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   275
   * The data rate that the Net Device uses to simulate packet transmission
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   276
   * timing.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   277
   * @see class DataRate
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   278
   */
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 369
diff changeset
   279
  DataRate       m_bps;
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   280
  /**
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   281
   * The interframe gap that the Net Device uses to throttle packet
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   282
   * transmission
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   283
   * @see class Time
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   284
   */
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 369
diff changeset
   285
  Time           m_tInterframeGap;
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   286
  /**
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   287
   * The PointToPointChannel to which this PointToPointNetDevice has been
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   288
   * attached.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   289
   * @see class PointToPointChannel
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   290
   */
568
e1660959ecbb use Ptr<> everywhere Object or NsUnknown are used
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 543
diff changeset
   291
  Ptr<PointToPointChannel> m_channel;
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   292
  /**
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   293
   * The Queue which this PointToPointNetDevice uses as a packet source.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   294
   * Management of this Queue has been delegated to the PointToPointNetDevice
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   295
   * and it has the responsibility for deletion.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   296
   * @see class Queue
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   297
   * @see class DropTailQueue
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   298
   */
581
15240a33f517 make Queue derive from Interface
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 568
diff changeset
   299
  Ptr<Queue> m_queue;
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   300
  /**
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   301
   * The trace source for the packet reception events that the device can
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   302
   * fire.
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   303
   *
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   304
   * @see class CallBackTraceSource
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   305
   * @see class TraceResolver
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 409
diff changeset
   306
   */
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   307
  CallbackTraceSource<Packet &> m_rxTrace;
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   308
};
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   309
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   310
}; // namespace ns3
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   311
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
   312
#endif // POINT_TO_POINT_NET_DEVICE_H
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   313