src/internet/model/tcp-l4-protocol.h
author Natale Patriciello <natale.patriciello@gmail.com>
Wed, 08 Jul 2015 06:48:40 -0700
changeset 11499 e5def623f9e8
parent 11498 97a672449c14
child 11501 37a230604f8e
permissions -rw-r--r--
Instead of directly manage the m_socketList member from TcpSocketBase, interact with it through public methods of TcpL4Protocol.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7385
10beb0e53130 standardize emacs c++ mode comments
Vedran Miletić <rivanvx@gmail.com>
parents: 7176
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2224
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
     2
/*
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
     3
 * Copyright (c) 2007 Georgia Tech Research Corporation
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
     4
 *
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License version 2 as
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
     7
 * published by the Free Software Foundation;
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
     8
 *
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    12
 * GNU General Public License for more details.
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    13
 *
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    17
 *
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    18
 * Author: Raj Bhattacharjea <raj.b@gatech.edu>
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    19
 */
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    20
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    21
#ifndef TCP_L4_PROTOCOL_H
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    22
#define TCP_L4_PROTOCOL_H
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    23
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    24
#include <stdint.h>
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    25
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    26
#include "ns3/packet.h"
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    27
#include "ns3/ipv4-address.h"
7717
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7386
diff changeset
    28
#include "ns3/ipv6-address.h"
2224
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    29
#include "ns3/ptr.h"
2556
b13dd6239954 get rid of DefaultValue usage in internet-node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2542
diff changeset
    30
#include "ns3/object-factory.h"
7717
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7386
diff changeset
    31
#include "ip-l4-protocol.h"
5856
7fd20c798a7d bug 742: Implementation of SO_BINDTODEVICE
Antti Mäkelä <zarhan@cc.hut.fi>
parents: 4741
diff changeset
    32
#include "ns3/net-device.h"
2224
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    33
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    34
namespace ns3 {
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    35
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    36
class Node;
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    37
class Socket;
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    38
class TcpHeader;
4740
34acfd7ad508 export headers from internet-stack
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4558
diff changeset
    39
class Ipv4EndPointDemux;
7717
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7386
diff changeset
    40
class Ipv6EndPointDemux;
4740
34acfd7ad508 export headers from internet-stack
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4558
diff changeset
    41
class Ipv4Interface;
6694
a814f37d15bf merge new TCP code
Josh Pelkey <jpelkey@gatech.edu>
parents: 6445
diff changeset
    42
class TcpSocketBase;
4740
34acfd7ad508 export headers from internet-stack
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4558
diff changeset
    43
class Ipv4EndPoint;
7717
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7386
diff changeset
    44
class Ipv6EndPoint;
3266
1ae7df5cf87b Update the internet-stack documentation
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 3260
diff changeset
    45
2224
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    46
/**
3691
372f4475dc47 Doxygen for internet-stack
Tom Henderson <tomh@tomh.org>
parents: 3588
diff changeset
    47
 * \ingroup tcp
3266
1ae7df5cf87b Update the internet-stack documentation
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 3260
diff changeset
    48
 * \brief A layer between the sockets interface and IP
1ae7df5cf87b Update the internet-stack documentation
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 3260
diff changeset
    49
 * 
1ae7df5cf87b Update the internet-stack documentation
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 3260
diff changeset
    50
 * This class allocates "endpoint" objects (ns3::Ipv4EndPoint) for TCP,
1ae7df5cf87b Update the internet-stack documentation
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 3260
diff changeset
    51
 * and SHOULD checksum packets its receives from the socket layer going down
6273
8d70de29d514 spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents: 6008
diff changeset
    52
 * the stack , but currently checksumming is disabled.  It also receives 
3266
1ae7df5cf87b Update the internet-stack documentation
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 3260
diff changeset
    53
 * packets from IP, and forwards them up to the endpoints.
1ae7df5cf87b Update the internet-stack documentation
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 3260
diff changeset
    54
*/
1ae7df5cf87b Update the internet-stack documentation
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 3260
diff changeset
    55
7717
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7386
diff changeset
    56
class TcpL4Protocol : public IpL4Protocol {
2224
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    57
public:
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    58
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    59
   * \brief Get the type ID.
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    60
   * \return the object TypeId
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    61
   */
2498
e01570293b98 convert InternetNode to Attributes.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2224
diff changeset
    62
  static TypeId GetTypeId (void);
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    63
  static const uint8_t PROT_NUMBER; //!< protocol number (0x6)
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    64
2498
e01570293b98 convert InternetNode to Attributes.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2224
diff changeset
    65
  TcpL4Protocol ();
2224
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    66
  virtual ~TcpL4Protocol ();
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    67
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    68
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    69
   * Set node associated with this stack
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    70
   * \param node the node
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    71
   */
2592
3ebf97150166 get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2556
diff changeset
    72
  void SetNode (Ptr<Node> node);
3ebf97150166 get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2556
diff changeset
    73
2498
e01570293b98 convert InternetNode to Attributes.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2224
diff changeset
    74
  virtual int GetProtocolNumber (void) const;
e01570293b98 convert InternetNode to Attributes.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2224
diff changeset
    75
2224
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    76
  /**
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    77
   * \brief Create a TCP socket
6768
805f5fc7f670 remove stale doxygen and comments pertaining to TCP
Tom Henderson <tomh@tomh.org>
parents: 6723
diff changeset
    78
   * \return A smart Socket pointer to a TcpSocket allocated by this instance
2224
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    79
   * of the TCP protocol
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    80
   */
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    81
  Ptr<Socket> CreateSocket (void);
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    82
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    83
   * \brief Create a TCP socket
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    84
   * \return A smart Socket pointer to a TcpSocket allocated by this instance
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    85
   * of the TCP protocol
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    86
   *
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    87
   * \warning using a socketTypeId other than TCP is a bad idea.
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    88
   *
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    89
   * \param socketTypeId the socket TypeId
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    90
   */
6694
a814f37d15bf merge new TCP code
Josh Pelkey <jpelkey@gatech.edu>
parents: 6445
diff changeset
    91
  Ptr<Socket> CreateSocket (TypeId socketTypeId);
2224
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    92
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    93
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    94
   * \brief Allocate an IPv4 Endpoint
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    95
   * \return the Endpoint
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    96
   */
2224
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
    97
  Ipv4EndPoint *Allocate (void);
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    98
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
    99
   * \brief Allocate an IPv4 Endpoint
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   100
   * \param address address to use
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   101
   * \return the Endpoint
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   102
   */
2608
408589d1dfff merge with HEAD
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2592
diff changeset
   103
  Ipv4EndPoint *Allocate (Ipv4Address address);
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   104
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   105
   * \brief Allocate an IPv4 Endpoint
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   106
   * \param port port to use
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   107
   * \return the Endpoint
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   108
   */
2224
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
   109
  Ipv4EndPoint *Allocate (uint16_t port);
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   110
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   111
   * \brief Allocate an IPv4 Endpoint
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   112
   * \param address address to use
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   113
   * \param port port to use
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   114
   * \return the Endpoint
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   115
   */
2608
408589d1dfff merge with HEAD
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2592
diff changeset
   116
  Ipv4EndPoint *Allocate (Ipv4Address address, uint16_t port);
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   117
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   118
   * \brief Allocate an IPv4 Endpoint
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   119
   * \param localAddress local address to use
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   120
   * \param localPort local port to use
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   121
   * \param peerAddress remote address to use
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   122
   * \param peerPort remote port to use
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   123
   * \return the Endpoint
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   124
   */
2224
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
   125
  Ipv4EndPoint *Allocate (Ipv4Address localAddress, uint16_t localPort,
2608
408589d1dfff merge with HEAD
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2592
diff changeset
   126
                          Ipv4Address peerAddress, uint16_t peerPort);
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   127
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   128
   * \brief Allocate an IPv6 Endpoint
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   129
   * \return the Endpoint
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   130
   */
7717
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7386
diff changeset
   131
  Ipv6EndPoint *Allocate6 (void);
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   132
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   133
   * \brief Allocate an IPv6 Endpoint
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   134
   * \param address address to use
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   135
   * \return the Endpoint
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   136
   */
7717
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7386
diff changeset
   137
  Ipv6EndPoint *Allocate6 (Ipv6Address address);
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   138
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   139
   * \brief Allocate an IPv6 Endpoint
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   140
   * \param port port to use
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   141
   * \return the Endpoint
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   142
   */
7717
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7386
diff changeset
   143
  Ipv6EndPoint *Allocate6 (uint16_t port);
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   144
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   145
   * \brief Allocate an IPv6 Endpoint
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   146
   * \param address address to use
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   147
   * \param port port to use
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   148
   * \return the Endpoint
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   149
   */
7717
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7386
diff changeset
   150
  Ipv6EndPoint *Allocate6 (Ipv6Address address, uint16_t port);
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   151
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   152
   * \brief Allocate an IPv6 Endpoint
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   153
   * \param localAddress local address to use
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   154
   * \param localPort local port to use
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   155
   * \param peerAddress remote address to use
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   156
   * \param peerPort remote port to use
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   157
   * \return the Endpoint
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   158
   */
7717
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7386
diff changeset
   159
  Ipv6EndPoint *Allocate6 (Ipv6Address localAddress, uint16_t localPort,
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7386
diff changeset
   160
                           Ipv6Address peerAddress, uint16_t peerPort);
2224
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
   161
11498
97a672449c14 Interface API change. This removes the (unused) Send function, and makes SendPacket (used by TcpSocketBase) a public method of the class TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11411
diff changeset
   162
  /** Send a packet via TCP (IPv4)
97a672449c14 Interface API change. This removes the (unused) Send function, and makes SendPacket (used by TcpSocketBase) a public method of the class TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11411
diff changeset
   163
   *
97a672449c14 Interface API change. This removes the (unused) Send function, and makes SendPacket (used by TcpSocketBase) a public method of the class TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11411
diff changeset
   164
   * \param pkt The packet to send
97a672449c14 Interface API change. This removes the (unused) Send function, and makes SendPacket (used by TcpSocketBase) a public method of the class TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11411
diff changeset
   165
   * \param outgoing The packet header
97a672449c14 Interface API change. This removes the (unused) Send function, and makes SendPacket (used by TcpSocketBase) a public method of the class TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11411
diff changeset
   166
   * \param saddr The source Ipv4Address
97a672449c14 Interface API change. This removes the (unused) Send function, and makes SendPacket (used by TcpSocketBase) a public method of the class TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11411
diff changeset
   167
   * \param daddr The destination Ipv4Address
97a672449c14 Interface API change. This removes the (unused) Send function, and makes SendPacket (used by TcpSocketBase) a public method of the class TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11411
diff changeset
   168
   * \param oif The output interface bound. Defaults to null (unspecified).
97a672449c14 Interface API change. This removes the (unused) Send function, and makes SendPacket (used by TcpSocketBase) a public method of the class TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11411
diff changeset
   169
   */
97a672449c14 Interface API change. This removes the (unused) Send function, and makes SendPacket (used by TcpSocketBase) a public method of the class TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11411
diff changeset
   170
  void SendPacket (Ptr<Packet> pkt, const TcpHeader &outgoing,
97a672449c14 Interface API change. This removes the (unused) Send function, and makes SendPacket (used by TcpSocketBase) a public method of the class TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11411
diff changeset
   171
                   Ipv4Address saddr, Ipv4Address, Ptr<NetDevice> oif = 0);
97a672449c14 Interface API change. This removes the (unused) Send function, and makes SendPacket (used by TcpSocketBase) a public method of the class TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11411
diff changeset
   172
97a672449c14 Interface API change. This removes the (unused) Send function, and makes SendPacket (used by TcpSocketBase) a public method of the class TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11411
diff changeset
   173
  /** Send a packet via TCP (IPv6)
97a672449c14 Interface API change. This removes the (unused) Send function, and makes SendPacket (used by TcpSocketBase) a public method of the class TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11411
diff changeset
   174
   *
97a672449c14 Interface API change. This removes the (unused) Send function, and makes SendPacket (used by TcpSocketBase) a public method of the class TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11411
diff changeset
   175
   * \param pkt The packet to send
97a672449c14 Interface API change. This removes the (unused) Send function, and makes SendPacket (used by TcpSocketBase) a public method of the class TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11411
diff changeset
   176
   * \param outgoing The packet header
97a672449c14 Interface API change. This removes the (unused) Send function, and makes SendPacket (used by TcpSocketBase) a public method of the class TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11411
diff changeset
   177
   * \param saddr The source Ipv4Address
97a672449c14 Interface API change. This removes the (unused) Send function, and makes SendPacket (used by TcpSocketBase) a public method of the class TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11411
diff changeset
   178
   * \param daddr The destination Ipv4Address
97a672449c14 Interface API change. This removes the (unused) Send function, and makes SendPacket (used by TcpSocketBase) a public method of the class TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11411
diff changeset
   179
   * \param oif The output interface bound. Defaults to null (unspecified).
97a672449c14 Interface API change. This removes the (unused) Send function, and makes SendPacket (used by TcpSocketBase) a public method of the class TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11411
diff changeset
   180
   */
97a672449c14 Interface API change. This removes the (unused) Send function, and makes SendPacket (used by TcpSocketBase) a public method of the class TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11411
diff changeset
   181
  void SendPacket (Ptr<Packet> pkt, const TcpHeader &outgoing,
97a672449c14 Interface API change. This removes the (unused) Send function, and makes SendPacket (used by TcpSocketBase) a public method of the class TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11411
diff changeset
   182
                   Ipv6Address saddr, Ipv6Address daddr, Ptr<NetDevice> oif = 0);
97a672449c14 Interface API change. This removes the (unused) Send function, and makes SendPacket (used by TcpSocketBase) a public method of the class TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11411
diff changeset
   183
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   184
  /**
11499
e5def623f9e8 Instead of directly manage the m_socketList member from TcpSocketBase, interact with it through public methods of TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11498
diff changeset
   185
   * \brief Make a socket capable to being demultiplexed
e5def623f9e8 Instead of directly manage the m_socketList member from TcpSocketBase, interact with it through public methods of TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11498
diff changeset
   186
   *
e5def623f9e8 Instead of directly manage the m_socketList member from TcpSocketBase, interact with it through public methods of TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11498
diff changeset
   187
   * Called after a socket has been bound, it is inserted in an internal vector.
e5def623f9e8 Instead of directly manage the m_socketList member from TcpSocketBase, interact with it through public methods of TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11498
diff changeset
   188
   *
e5def623f9e8 Instead of directly manage the m_socketList member from TcpSocketBase, interact with it through public methods of TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11498
diff changeset
   189
   * \param socket Socket to be added
e5def623f9e8 Instead of directly manage the m_socketList member from TcpSocketBase, interact with it through public methods of TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11498
diff changeset
   190
   */
e5def623f9e8 Instead of directly manage the m_socketList member from TcpSocketBase, interact with it through public methods of TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11498
diff changeset
   191
  void AddSocket (Ptr<TcpSocketBase> socket);
e5def623f9e8 Instead of directly manage the m_socketList member from TcpSocketBase, interact with it through public methods of TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11498
diff changeset
   192
e5def623f9e8 Instead of directly manage the m_socketList member from TcpSocketBase, interact with it through public methods of TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11498
diff changeset
   193
  /**
e5def623f9e8 Instead of directly manage the m_socketList member from TcpSocketBase, interact with it through public methods of TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11498
diff changeset
   194
   * \brief Remove a socket from the internal list
e5def623f9e8 Instead of directly manage the m_socketList member from TcpSocketBase, interact with it through public methods of TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11498
diff changeset
   195
   *
e5def623f9e8 Instead of directly manage the m_socketList member from TcpSocketBase, interact with it through public methods of TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11498
diff changeset
   196
   * \param socket socket to Remove
e5def623f9e8 Instead of directly manage the m_socketList member from TcpSocketBase, interact with it through public methods of TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11498
diff changeset
   197
   * \return true if the socket has been removed
e5def623f9e8 Instead of directly manage the m_socketList member from TcpSocketBase, interact with it through public methods of TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11498
diff changeset
   198
   */
e5def623f9e8 Instead of directly manage the m_socketList member from TcpSocketBase, interact with it through public methods of TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11498
diff changeset
   199
  bool RemoveSocket(Ptr<TcpSocketBase> socket);
e5def623f9e8 Instead of directly manage the m_socketList member from TcpSocketBase, interact with it through public methods of TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11498
diff changeset
   200
e5def623f9e8 Instead of directly manage the m_socketList member from TcpSocketBase, interact with it through public methods of TcpL4Protocol.
Natale Patriciello <natale.patriciello@gmail.com>
parents: 11498
diff changeset
   201
  /**
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   202
   * \brief Remove an IPv4 Endpoint.
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   203
   * \param endPoint the end point to remove
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   204
   */
2224
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
   205
  void DeAllocate (Ipv4EndPoint *endPoint);
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   206
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   207
   * \brief Remove an IPv6 Endpoint.
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   208
   * \param endPoint the end point to remove
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   209
   */
7717
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7386
diff changeset
   210
  void DeAllocate (Ipv6EndPoint *endPoint);
2224
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
   211
7717
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7386
diff changeset
   212
  virtual enum IpL4Protocol::RxStatus Receive (Ptr<Packet> p,
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   213
                                               Ipv4Header const &header,
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   214
                                               Ptr<Ipv4Interface> incomingInterface);
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   215
  virtual enum IpL4Protocol::RxStatus Receive (Ptr<Packet> p,
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   216
                                               Ipv6Header const &header,
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   217
                                               Ptr<Ipv6Interface> incomingInterface);
2224
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
   218
9095
8462a1160246 bug 1359 TCP cannot receive ICMP
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   219
  virtual void ReceiveIcmp (Ipv4Address icmpSource, uint8_t icmpTtl,
8462a1160246 bug 1359 TCP cannot receive ICMP
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   220
                            uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo,
8462a1160246 bug 1359 TCP cannot receive ICMP
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   221
                            Ipv4Address payloadSource,Ipv4Address payloadDestination,
8462a1160246 bug 1359 TCP cannot receive ICMP
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   222
                            const uint8_t payload[8]);
8462a1160246 bug 1359 TCP cannot receive ICMP
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   223
  virtual void ReceiveIcmp (Ipv6Address icmpSource, uint8_t icmpTtl,
8462a1160246 bug 1359 TCP cannot receive ICMP
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   224
                            uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo,
8462a1160246 bug 1359 TCP cannot receive ICMP
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   225
                            Ipv6Address payloadSource,Ipv6Address payloadDestination,
8462a1160246 bug 1359 TCP cannot receive ICMP
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   226
                            const uint8_t payload[8]);
8462a1160246 bug 1359 TCP cannot receive ICMP
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   227
7717
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7386
diff changeset
   228
  // From IpL4Protocol
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7386
diff changeset
   229
  virtual void SetDownTarget (IpL4Protocol::DownTargetCallback cb);
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7386
diff changeset
   230
  virtual void SetDownTarget6 (IpL4Protocol::DownTargetCallback6 cb);
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7386
diff changeset
   231
  // From IpL4Protocol
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7386
diff changeset
   232
  virtual IpL4Protocol::DownTargetCallback GetDownTarget (void) const;
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7386
diff changeset
   233
  virtual IpL4Protocol::DownTargetCallback6 GetDownTarget6 (void) const;
6723
fff5c512f345 bug 967: decouple Ipv4L4Protocols from Ipv4L3Protocol::Send() via a new callback
Tom Henderson <tomh@tomh.org>
parents: 6694
diff changeset
   234
2224
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
   235
protected:
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
   236
  virtual void DoDispose (void);
4472
e20a31541404 src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents: 4283
diff changeset
   237
  /* 
e20a31541404 src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents: 4283
diff changeset
   238
   * This function will notify other components connected to the node that a new stack member is now connected
e20a31541404 src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents: 4283
diff changeset
   239
   * This will be used to notify Layer 3 protocol of layer 4 protocol stack to connect them together.
e20a31541404 src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents: 4283
diff changeset
   240
   */
e20a31541404 src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents: 4283
diff changeset
   241
  virtual void NotifyNewAggregate ();
2224
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
   242
private:
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   243
  Ptr<Node> m_node; //!< the node this stack is associated with
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   244
  Ipv4EndPointDemux *m_endPoints; //!< A list of IPv4 end points.
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   245
  Ipv6EndPointDemux *m_endPoints6; //!< A list of IPv6 end points.
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   246
  TypeId m_rttTypeId; //!< The RTT Estimator TypeId
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   247
  TypeId m_socketTypeId; //!< The socket TypeId
2224
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
   248
private:
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   249
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   250
   * \brief Copy constructor
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   251
   *
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   252
   * Defined and not implemented to avoid misuse
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   253
   */
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   254
  TcpL4Protocol (const TcpL4Protocol &);
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   255
  /**
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   256
   * \brief Copy constructor
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   257
   *
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   258
   * Defined and not implemented to avoid misuse
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   259
   * \returns
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   260
   */
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   261
  TcpL4Protocol &operator = (const TcpL4Protocol &);
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   262
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   263
  std::vector<Ptr<TcpSocketBase> > m_sockets;      //!< list of sockets
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   264
  IpL4Protocol::DownTargetCallback m_downTarget;   //!< Callback to send packets over IPv4
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9145
diff changeset
   265
  IpL4Protocol::DownTargetCallback6 m_downTarget6; //!< Callback to send packets over IPv6
2224
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
   266
};
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
   267
7386
2310ed220a61 standardize ns-3 namespace declaration format
Vedran Miletić <rivanvx@gmail.com>
parents: 7385
diff changeset
   268
} // namespace ns3
2224
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
   269
6f97d21a99c2 Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff changeset
   270
#endif /* TCP_L4_PROTOCOL_H */