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) 2007 INRIA | 3 * Copyright (c) 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 * \param p packet | 176 * \param p packet |
177 * \param daddr destination address | 177 * \param daddr destination address |
178 * \returns 0 on success, -1 on failure | 178 * \returns 0 on success, -1 on failure |
179 */ | 179 */ |
180 int DoSendTo (Ptr<Packet> p, const Address &daddr); | 180 int DoSendTo (Ptr<Packet> p, const Address &daddr); |
181 /** | 181 /** |
182 * \brief Send a packet to a specific destination and port (IPv4) | 182 * \brief Send a packet to a specific destination and port (IPv4) |
183 * \param p packet | 183 * \param p packet |
184 * \param daddr destination address | 184 * \param daddr destination address |
185 * \param dport destination port | 185 * \param dport destination port |
| 186 * \param tos ToS |
186 * \returns 0 on success, -1 on failure | 187 * \returns 0 on success, -1 on failure |
187 */ | 188 */ |
188 int DoSendTo (Ptr<Packet> p, Ipv4Address daddr, uint16_t dport); | 189 int DoSendTo (Ptr<Packet> p, Ipv4Address daddr, uint16_t dport, uint8_t tos); |
189 /** | 190 /** |
190 * \brief Send a packet to a specific destination and port (IPv6) | 191 * \brief Send a packet to a specific destination and port (IPv6) |
191 * \param p packet | 192 * \param p packet |
192 * \param daddr destination address | 193 * \param daddr destination address |
193 * \param dport destination port | 194 * \param dport destination port |
194 * \returns 0 on success, -1 on failure | 195 * \returns 0 on success, -1 on failure |
195 */ | 196 */ |
196 int DoSendTo (Ptr<Packet> p, Ipv6Address daddr, uint16_t dport); | 197 int DoSendTo (Ptr<Packet> p, Ipv6Address daddr, uint16_t dport); |
197 | 198 |
198 /** | 199 /** |
(...skipping 21 matching lines...) Expand all Loading... |
220 // Connections to other layers of TCP/IP | 221 // Connections to other layers of TCP/IP |
221 Ipv4EndPoint* m_endPoint; //!< the IPv4 endpoint | 222 Ipv4EndPoint* m_endPoint; //!< the IPv4 endpoint |
222 Ipv6EndPoint* m_endPoint6; //!< the IPv6 endpoint | 223 Ipv6EndPoint* m_endPoint6; //!< the IPv6 endpoint |
223 Ptr<Node> m_node; //!< the associated node | 224 Ptr<Node> m_node; //!< the associated node |
224 Ptr<UdpL4Protocol> m_udp; //!< the associated UDP L4 protocol | 225 Ptr<UdpL4Protocol> m_udp; //!< the associated UDP L4 protocol |
225 Callback<void, Ipv4Address,uint8_t,uint8_t,uint8_t,uint32_t> m_icmpCallback;
//!< ICMP callback | 226 Callback<void, Ipv4Address,uint8_t,uint8_t,uint8_t,uint32_t> m_icmpCallback;
//!< ICMP callback |
226 Callback<void, Ipv6Address,uint8_t,uint8_t,uint8_t,uint32_t> m_icmpCallback6;
//!< ICMPv6 callback | 227 Callback<void, Ipv6Address,uint8_t,uint8_t,uint8_t,uint32_t> m_icmpCallback6;
//!< ICMPv6 callback |
227 | 228 |
228 Address m_defaultAddress; //!< Default address | 229 Address m_defaultAddress; //!< Default address |
229 uint16_t m_defaultPort; //!< Default port | 230 uint16_t m_defaultPort; //!< Default port |
| 231 uint8_t m_defaultTos; //!< Default ToS (IPv4 only) |
230 TracedCallback<Ptr<const Packet> > m_dropTrace; //!< Trace for dropped packets | 232 TracedCallback<Ptr<const Packet> > m_dropTrace; //!< Trace for dropped packets |
231 | 233 |
232 mutable enum SocketErrno m_errno; //!< Socket error code | 234 mutable enum SocketErrno m_errno; //!< Socket error code |
233 bool m_shutdownSend; //!< Send no longer allowed | 235 bool m_shutdownSend; //!< Send no longer allowed |
234 bool m_shutdownRecv; //!< Receive no longer allowed | 236 bool m_shutdownRecv; //!< Receive no longer allowed |
235 bool m_connected; //!< Connection established | 237 bool m_connected; //!< Connection established |
236 bool m_allowBroadcast; //!< Allow send broadcast packets | 238 bool m_allowBroadcast; //!< Allow send broadcast packets |
237 | 239 |
238 std::queue<Ptr<Packet> > m_deliveryQueue; //!< Queue for incoming packets | 240 std::queue<Ptr<Packet> > m_deliveryQueue; //!< Queue for incoming packets |
239 uint32_t m_rxAvailable; //!< Number of available bytes to be
received | 241 uint32_t m_rxAvailable; //!< Number of available bytes to be
received |
240 | 242 |
241 // Socket attributes | 243 // Socket attributes |
242 uint32_t m_rcvBufSize; //!< Receive buffer size | 244 uint32_t m_rcvBufSize; //!< Receive buffer size |
243 uint8_t m_ipMulticastTtl; //!< Multicast TTL | 245 uint8_t m_ipMulticastTtl; //!< Multicast TTL |
244 int32_t m_ipMulticastIf; //!< Multicast Interface | 246 int32_t m_ipMulticastIf; //!< Multicast Interface |
245 bool m_ipMulticastLoop; //!< Allow multicast loop | 247 bool m_ipMulticastLoop; //!< Allow multicast loop |
246 bool m_mtuDiscover; //!< Allow MTU discovery | 248 bool m_mtuDiscover; //!< Allow MTU discovery |
247 }; | 249 }; |
248 | 250 |
249 } // namespace ns3 | 251 } // namespace ns3 |
250 | 252 |
251 #endif /* UDP_SOCKET_IMPL_H */ | 253 #endif /* UDP_SOCKET_IMPL_H */ |
OLD | NEW |