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) 2012 Hajime Tazaki | 3 * Copyright (c) 2012 Hajime Tazaki |
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 }; | 107 }; |
108 | 108 |
109 | 109 |
110 Ipv6RawSocketImplTest::Ipv6RawSocketImplTest () | 110 Ipv6RawSocketImplTest::Ipv6RawSocketImplTest () |
111 : TestCase ("Ipv6 Raw socket implementation")· | 111 : TestCase ("Ipv6 Raw socket implementation")· |
112 { | 112 { |
113 } | 113 } |
114 | 114 |
115 void Ipv6RawSocketImplTest::ReceivePacket (Ptr<Socket> socket, Ptr<Packet> packe
t, const Address &from) | 115 void Ipv6RawSocketImplTest::ReceivePacket (Ptr<Socket> socket, Ptr<Packet> packe
t, const Address &from) |
116 { | 116 { |
| 117 NS_UNUSED (from); |
117 m_receivedPacket = packet; | 118 m_receivedPacket = packet; |
118 } | 119 } |
119 | 120 |
120 void Ipv6RawSocketImplTest::ReceivePacket2 (Ptr<Socket> socket, Ptr<Packet> pack
et, const Address &from) | 121 void Ipv6RawSocketImplTest::ReceivePacket2 (Ptr<Socket> socket, Ptr<Packet> pack
et, const Address &from) |
121 { | 122 { |
| 123 NS_UNUSED (from); |
122 m_receivedPacket2 = packet; | 124 m_receivedPacket2 = packet; |
123 } | 125 } |
124 | 126 |
125 void Ipv6RawSocketImplTest::ReceivePkt (Ptr<Socket> socket) | 127 void Ipv6RawSocketImplTest::ReceivePkt (Ptr<Socket> socket) |
126 { | 128 { |
127 uint32_t availableData; | 129 uint32_t availableData; |
128 availableData = socket->GetRxAvailable (); | 130 availableData = socket->GetRxAvailable (); |
129 m_receivedPacket = socket->Recv (2, MSG_PEEK); | 131 m_receivedPacket = socket->Recv (2, MSG_PEEK); |
130 NS_ASSERT (m_receivedPacket->GetSize () == 2); | 132 NS_ASSERT (m_receivedPacket->GetSize () == 2); |
131 m_receivedPacket = socket->Recv (std::numeric_limits<uint32_t>::max (), 0); | 133 m_receivedPacket = socket->Recv (std::numeric_limits<uint32_t>::max (), 0); |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 { | 305 { |
304 public: | 306 public: |
305 Ipv6RawTestSuite () : TestSuite ("ipv6-raw", UNIT) | 307 Ipv6RawTestSuite () : TestSuite ("ipv6-raw", UNIT) |
306 { | 308 { |
307 AddTestCase (new Ipv6RawSocketImplTest, TestCase::QUICK); | 309 AddTestCase (new Ipv6RawSocketImplTest, TestCase::QUICK); |
308 } | 310 } |
309 }; | 311 }; |
310 | 312 |
311 static Ipv6RawTestSuite g_ipv6rawTestSuite; //!< Static variable for test initia
lization | 313 static Ipv6RawTestSuite g_ipv6rawTestSuite; //!< Static variable for test initia
lization |
312 | 314 |
OLD | NEW |