OLD | NEW |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2005,2006,2007 INRIA | 3 * Copyright (c) 2005,2006,2007 INRIA |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "ns3/packet.h" | 26 #include "ns3/packet.h" |
27 #include "ns3/ipv4-address.h" | 27 #include "ns3/ipv4-address.h" |
28 #include "ns3/ptr.h" | 28 #include "ns3/ptr.h" |
29 #include "ipv4-end-point-demux.h" | 29 #include "ipv4-end-point-demux.h" |
30 #include "ipv4-l4-protocol.h" | 30 #include "ipv4-l4-protocol.h" |
31 | 31 |
32 namespace ns3 { | 32 namespace ns3 { |
33 | 33 |
34 class Node; | 34 class Node; |
35 class Socket; | 35 class Socket; |
| 36 class Ipv4Route; |
36 /** | 37 /** |
37 * \ingroup udp | 38 * \ingroup udp |
38 * \brief Implementation of the UDP protocol | 39 * \brief Implementation of the UDP protocol |
39 */ | 40 */ |
40 class UdpL4Protocol : public Ipv4L4Protocol { | 41 class UdpL4Protocol : public Ipv4L4Protocol { |
41 public: | 42 public: |
42 static TypeId GetTypeId (void); | 43 static TypeId GetTypeId (void); |
43 static const uint8_t PROT_NUMBER; | 44 static const uint8_t PROT_NUMBER; |
44 | 45 |
45 UdpL4Protocol (); | 46 UdpL4Protocol (); |
(...skipping 23 matching lines...) Expand all Loading... |
69 * \brief Send a packet via UDP | 70 * \brief Send a packet via UDP |
70 * \param packet The packet to send | 71 * \param packet The packet to send |
71 * \param saddr The source Ipv4Address | 72 * \param saddr The source Ipv4Address |
72 * \param daddr The destination Ipv4Address | 73 * \param daddr The destination Ipv4Address |
73 * \param sport The source port number | 74 * \param sport The source port number |
74 * \param dport The destination port number | 75 * \param dport The destination port number |
75 */ | 76 */ |
76 void Send (Ptr<Packet> packet, | 77 void Send (Ptr<Packet> packet, |
77 Ipv4Address saddr, Ipv4Address daddr,· | 78 Ipv4Address saddr, Ipv4Address daddr,· |
78 uint16_t sport, uint16_t dport); | 79 uint16_t sport, uint16_t dport); |
| 80 void Send (Ptr<Packet> packet, |
| 81 Ipv4Address saddr, Ipv4Address daddr,· |
| 82 uint16_t sport, uint16_t dport, Ptr<Ipv4Route> route); |
79 /** | 83 /** |
80 * \brief Receive a packet up the protocol stack | 84 * \brief Receive a packet up the protocol stack |
81 * \param p The Packet to dump the contents into | 85 * \param p The Packet to dump the contents into |
82 * \param source The source's Ipv4Address | 86 * \param source The source's Ipv4Address |
83 * \param destination The destinations Ipv4Address | 87 * \param destination The destinations Ipv4Address |
84 * \param interface the interface from which the packet is coming. | 88 * \param interface the interface from which the packet is coming. |
85 */ | 89 */ |
86 // inherited from Ipv4L4Protocol | 90 // inherited from Ipv4L4Protocol |
87 virtual enum Ipv4L4Protocol::RxStatus Receive(Ptr<Packet> p,· | 91 virtual enum Ipv4L4Protocol::RxStatus Receive(Ptr<Packet> p,· |
88 Ipv4Address const &source, | 92 Ipv4Address const &source, |
(...skipping 19 matching lines...) Expand all Loading... |
108 virtual void DoDispose (void); | 112 virtual void DoDispose (void); |
109 private: | 113 private: |
110 Ptr<Node> m_node; | 114 Ptr<Node> m_node; |
111 Ipv4EndPointDemux *m_endPoints; | 115 Ipv4EndPointDemux *m_endPoints; |
112 bool m_calcChecksum; | 116 bool m_calcChecksum; |
113 }; | 117 }; |
114 | 118 |
115 }; // namespace ns3 | 119 }; // namespace ns3 |
116 | 120 |
117 #endif /* UDP_L4_PROTOCOL_H */ | 121 #endif /* UDP_L4_PROTOCOL_H */ |
OLD | NEW |