A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
ipv4-raw-socket-impl.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
#ifndef IPV4_RAW_SOCKET_IMPL_H
3
#define IPV4_RAW_SOCKET_IMPL_H
4
5
#include "ns3/socket.h"
6
#include "ns3/ipv4-header.h"
7
#include "ns3/ipv4-route.h"
8
#include "ns3/ipv4-interface.h"
9
#include <list>
10
11
namespace
ns3 {
12
13
class
NetDevice;
14
class
Node;
15
16
class
Ipv4RawSocketImpl
:
public
Socket
17
{
18
public
:
19
static
TypeId
GetTypeId
(
void
);
20
21
Ipv4RawSocketImpl
();
22
23
void
SetNode
(
Ptr<Node>
node);
24
25
virtual
enum
Socket::SocketErrno
GetErrno
(
void
)
const
;
26
virtual
enum
Socket::SocketType
GetSocketType
(
void
)
const
;
27
virtual
Ptr<Node>
GetNode
(
void
)
const
;
28
virtual
int
Bind
(
const
Address
&address);
29
virtual
int
Bind
();
30
virtual
int
Bind6
();
31
virtual
int
GetSockName
(
Address
&address)
const
;
32
virtual
int
Close
(
void
);
33
virtual
int
ShutdownSend
(
void
);
34
virtual
int
ShutdownRecv
(
void
);
35
virtual
int
Connect
(
const
Address
&address);
36
virtual
int
Listen
(
void
);
37
virtual
uint32_t
GetTxAvailable
(
void
)
const
;
38
virtual
int
Send
(
Ptr<Packet>
p, uint32_t flags);
39
virtual
int
SendTo
(
Ptr<Packet>
p, uint32_t flags,
40
const
Address
&toAddress);
41
virtual
uint32_t
GetRxAvailable
(
void
)
const
;
42
virtual
Ptr<Packet>
Recv
(uint32_t maxSize, uint32_t flags);
43
virtual
Ptr<Packet>
RecvFrom
(uint32_t maxSize, uint32_t flags,
44
Address
&fromAddress);
45
46
void
SetProtocol
(uint16_t protocol);
47
bool
ForwardUp
(
Ptr<const Packet>
p,
Ipv4Header
ipHeader,
Ptr<Ipv4Interface>
incomingInterface);
48
virtual
bool
SetAllowBroadcast
(
bool
allowBroadcast);
49
virtual
bool
GetAllowBroadcast
()
const
;
50
51
private
:
52
virtual
void
DoDispose
(
void
);
53
54
struct
Data
{
55
Ptr<Packet>
packet
;
56
Ipv4Address
fromIp
;
57
uint16_t
fromProtocol
;
58
};
59
60
enum
Socket::SocketErrno
m_err
;
61
Ptr<Node>
m_node
;
62
Ipv4Address
m_src
;
63
Ipv4Address
m_dst
;
64
uint16_t
m_protocol
;
65
std::list<struct Data>
m_recv
;
66
bool
m_shutdownSend
;
67
bool
m_shutdownRecv
;
68
uint32_t
m_icmpFilter
;
69
bool
m_iphdrincl
;
70
};
71
72
}
// namespace ns3
73
74
#endif
/* IPV4_RAW_SOCKET_IMPL_H */
src
internet
model
ipv4-raw-socket-impl.h
Generated on Tue May 14 2013 11:08:22 for ns-3 by
1.8.1.2