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) 2006 INRIA | 3 * Copyright (c) 2006 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 NS_LOG_FUNCTION (&i << &ad); | 77 NS_LOG_FUNCTION (&i << &ad); |
78 uint8_t ipv6[16]; | 78 uint8_t ipv6[16]; |
79 i.Read (ipv6, 16); | 79 i.Read (ipv6, 16); |
80 ad.Set (ipv6); | 80 ad.Set (ipv6); |
81 } | 81 } |
82 void ReadFrom (Buffer::Iterator &i, Address &ad, uint32_t len) | 82 void ReadFrom (Buffer::Iterator &i, Address &ad, uint32_t len) |
83 { | 83 { |
84 NS_LOG_FUNCTION (&i << &ad << len); | 84 NS_LOG_FUNCTION (&i << &ad << len); |
85 uint8_t mac[Address::MAX_SIZE]; | 85 uint8_t mac[Address::MAX_SIZE]; |
86 i.Read (mac, len); | 86 i.Read (mac, len); |
87 ad.CopyFrom (mac, (uint8_t)len); | 87 ad.CopyFrom (mac, static_cast<uint8_t> (len)); |
88 } | 88 } |
89 void ReadFrom (Buffer::Iterator &i, Mac64Address &ad) | 89 void ReadFrom (Buffer::Iterator &i, Mac64Address &ad) |
90 { | 90 { |
91 NS_LOG_FUNCTION (&i << &ad); | 91 NS_LOG_FUNCTION (&i << &ad); |
92 uint8_t mac[8]; | 92 uint8_t mac[8]; |
93 i.Read (mac, 8); | 93 i.Read (mac, 8); |
94 ad.CopyFrom (mac); | 94 ad.CopyFrom (mac); |
95 } | 95 } |
96 void ReadFrom (Buffer::Iterator &i, Mac48Address &ad) | 96 void ReadFrom (Buffer::Iterator &i, Mac48Address &ad) |
97 { | 97 { |
(...skipping 22 matching lines...) Expand all Loading... |
120 Ipv4Address ipv4 = inetAddr.GetIpv4 (); | 120 Ipv4Address ipv4 = inetAddr.GetIpv4 (); |
121 return ipv4.IsMulticast (); | 121 return ipv4.IsMulticast (); |
122 } | 122 } |
123 // IPv6 case can go here, in future | 123 // IPv6 case can go here, in future |
124 return false; | 124 return false; |
125 } | 125 } |
126 | 126 |
127 } // namespace addressUtils | 127 } // namespace addressUtils |
128 | 128 |
129 } // namespace ns3 | 129 } // namespace ns3 |
LEFT | RIGHT |