LEFT | RIGHT |
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 INRIA | 3 * Copyright (c) 2005 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 |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
15 * along with this program; if not, write to the Free Software | 15 * along with this program; if not, write to the Free Software |
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 * | 17 * |
18 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> | 18 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
19 */ | 19 */ |
20 | 20 |
21 #include "udp-header.h" | 21 #include "udp-header.h" |
22 #include "ns3/address-utils.h" | 22 #include "ns3/address-utils.h" |
23 | 23 |
24 namespace ns3 { | 24 namespace ns3 { |
25 | 25 |
26 NS_OBJECT_ENSURE_REGISTERED (UdpHeader); | 26 NS_OBJECT_ENSURE_REGISTERED (UdpHeader) |
| 27 ; |
27 | 28 |
28 /* The magic values below are used only for debugging. | 29 /* The magic values below are used only for debugging. |
29 * They can be used to easily detect memory corruption | 30 * They can be used to easily detect memory corruption |
30 * problems so you can see the patterns in memory. | 31 * problems so you can see the patterns in memory. |
31 */ | 32 */ |
32 UdpHeader::UdpHeader () | 33 UdpHeader::UdpHeader () |
33 : m_sourcePort (0xfffd), | 34 : m_sourcePort (0xfffd), |
34 m_destinationPort (0xfffd), | 35 m_destinationPort (0xfffd), |
35 m_payloadSize (0), | 36 m_payloadSize (0), |
36 m_checksum (0), | 37 m_checksum (0), |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 return GetSerializedSize (); | 237 return GetSerializedSize (); |
237 } | 238 } |
238 | 239 |
239 uint16_t | 240 uint16_t |
240 UdpHeader::GetChecksum () | 241 UdpHeader::GetChecksum () |
241 { | 242 { |
242 return m_checksum; | 243 return m_checksum; |
243 } | 244 } |
244 | 245 |
245 } // namespace ns3 | 246 } // namespace ns3 |
LEFT | RIGHT |