|
Lines 173-179
EmuNetDevice::EmuNetDevice ()
|
Link Here
|
|---|
|
| 173 |
m_sock (-1), |
173 |
m_sock (-1), |
| 174 |
m_readThread (0), |
174 |
m_readThread (0), |
| 175 |
m_ifIndex (std::numeric_limits<uint32_t>::max ()), // absurdly large value |
175 |
m_ifIndex (std::numeric_limits<uint32_t>::max ()), // absurdly large value |
| 176 |
m_sll_ifindex (-1) |
176 |
m_sll_ifindex (-1), |
|
|
177 |
m_isBroadcast (false), |
| 178 |
m_isMulticast (false) |
| 177 |
{ |
179 |
{ |
| 178 |
NS_LOG_FUNCTION (this); |
180 |
NS_LOG_FUNCTION (this); |
| 179 |
Start (m_tStart); |
181 |
Start (m_tStart); |
|
Lines 293-299
EmuNetDevice::StartDevice (void)
|
Link Here
|
|---|
|
| 293 |
{ |
295 |
{ |
| 294 |
NS_FATAL_ERROR ("EmuNetDevice::StartDevice(): " << m_deviceName << " is not in promiscuous mode"); |
296 |
NS_FATAL_ERROR ("EmuNetDevice::StartDevice(): " << m_deviceName << " is not in promiscuous mode"); |
| 295 |
} |
297 |
} |
| 296 |
|
298 |
if ((ifr.ifr_flags & IFF_MULTICAST) == 1) |
|
|
299 |
{ |
| 300 |
m_isMulticast = true; |
| 301 |
} |
| 302 |
if ((ifr.ifr_flags & IFF_BROADCAST) == 1) |
| 303 |
{ |
| 304 |
m_isBroadcast = true; |
| 305 |
} |
| 297 |
// |
306 |
// |
| 298 |
// Now spin up a read thread to read packets. |
307 |
// Now spin up a read thread to read packets. |
| 299 |
// |
308 |
// |
|
|
| 918 |
bool |
927 |
bool |
| 919 |
EmuNetDevice::IsBroadcast (void) const |
928 |
EmuNetDevice::IsBroadcast (void) const |
| 920 |
{ |
929 |
{ |
| 921 |
return true; |
930 |
return m_isBroadcast; |
| 922 |
} |
931 |
} |
| 923 |
|
932 |
|
| 924 |
Address |
933 |
Address |
|
|
| 930 |
bool |
939 |
bool |
| 931 |
EmuNetDevice::IsMulticast (void) const |
940 |
EmuNetDevice::IsMulticast (void) const |
| 932 |
{ |
941 |
{ |
| 933 |
return false; |
942 |
return m_isMulticast; |
| 934 |
} |
943 |
} |
| 935 |
|
944 |
|
| 936 |
Address |
945 |
Address |