author | Gustavo J. A. M. Carneiro <gjc@inescporto.pt> |
Fri, 11 Jul 2008 18:39:19 +0100 | |
changeset 3416 | 926ccb845111 |
parent 3398 | 266c6a334762 |
child 3820 | c04ecfdce1ef |
permissions | -rw-r--r-- |
3129 | 1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 |
/* |
|
3 |
* Copyright (c) 2006 Georgia Tech Research Corporation |
|
4 |
* 2007 INRIA |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or modify |
|
7 |
* it under the terms of the GNU General Public License version 2 as |
|
8 |
* published by the Free Software Foundation; |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 |
* |
|
19 |
* Authors: George F. Riley<riley@ece.gatech.edu> |
|
20 |
* Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
|
21 |
*/ |
|
22 |
||
3130
881cc06cd651
rename UdpSocket to UdpSocketImpl
Tom Henderson <tomh@tomh.org>
parents:
3129
diff
changeset
|
23 |
#ifndef __UDP_SOCKET_H__ |
881cc06cd651
rename UdpSocket to UdpSocketImpl
Tom Henderson <tomh@tomh.org>
parents:
3129
diff
changeset
|
24 |
#define __UDP_SOCKET_H__ |
3129 | 25 |
|
26 |
#include "socket.h" |
|
27 |
#include "ns3/traced-callback.h" |
|
28 |
#include "ns3/callback.h" |
|
29 |
#include "ns3/ptr.h" |
|
30 |
#include "ns3/object.h" |
|
31 |
||
32 |
namespace ns3 { |
|
33 |
||
34 |
class Node; |
|
35 |
class Packet; |
|
36 |
||
37 |
/** |
|
3183 | 38 |
* \ingroup socket |
39 |
* |
|
3129 | 40 |
* \brief (abstract) base class of all UdpSockets |
41 |
* |
|
42 |
* This class exists solely for hosting UdpSocket attributes that can |
|
43 |
* be reused across different implementations. |
|
44 |
*/ |
|
3130
881cc06cd651
rename UdpSocket to UdpSocketImpl
Tom Henderson <tomh@tomh.org>
parents:
3129
diff
changeset
|
45 |
class UdpSocket : public Socket |
3129 | 46 |
{ |
47 |
public: |
|
48 |
static TypeId GetTypeId (void); |
|
49 |
||
3130
881cc06cd651
rename UdpSocket to UdpSocketImpl
Tom Henderson <tomh@tomh.org>
parents:
3129
diff
changeset
|
50 |
UdpSocket (void); |
881cc06cd651
rename UdpSocket to UdpSocketImpl
Tom Henderson <tomh@tomh.org>
parents:
3129
diff
changeset
|
51 |
virtual ~UdpSocket (void); |
3129 | 52 |
|
3136
a59b9ce95b6b
Move Tcp attributes from factory to TcpSocket
Tom Henderson <tomh@tomh.org>
parents:
3130
diff
changeset
|
53 |
private: |
3129 | 54 |
// Indirect the attribute setting and getting through private virtual methods |
55 |
virtual void SetRcvBufSize (uint32_t size) = 0; |
|
56 |
virtual uint32_t GetRcvBufSize (void) const = 0; |
|
57 |
virtual void SetIpTtl (uint32_t ipTtl) = 0; |
|
58 |
virtual uint32_t GetIpTtl (void) const = 0; |
|
59 |
virtual void SetIpMulticastTtl (uint32_t ipTtl) = 0; |
|
60 |
virtual uint32_t GetIpMulticastTtl (void) const = 0; |
|
61 |
||
62 |
}; |
|
63 |
||
64 |
} //namespace ns3 |
|
65 |
||
66 |
#endif /* UDP_SOCKET_H */ |
|
67 |
||
68 |