src/virtual-net-device/model/virtual-net-device.cc
changeset 7193 04871cc0be94
parent 6852 8f1a53d3f6ca
child 7256 b04ba6772f8c
equal deleted inserted replaced
7192:618768dcbbac 7193:04871cc0be94
    44     .AddConstructor<VirtualNetDevice> ()
    44     .AddConstructor<VirtualNetDevice> ()
    45     .AddAttribute ("Mtu", "The MAC-level Maximum Transmission Unit",
    45     .AddAttribute ("Mtu", "The MAC-level Maximum Transmission Unit",
    46                    UintegerValue (1500),
    46                    UintegerValue (1500),
    47                    MakeUintegerAccessor (&VirtualNetDevice::SetMtu,
    47                    MakeUintegerAccessor (&VirtualNetDevice::SetMtu,
    48                                          &VirtualNetDevice::GetMtu),
    48                                          &VirtualNetDevice::GetMtu),
    49                    MakeUintegerChecker<uint16_t> ())                   
    49                    MakeUintegerChecker<uint16_t> ())
    50     .AddTraceSource ("MacTx", 
    50     .AddTraceSource ("MacTx", 
    51                      "Trace source indicating a packet has arrived for transmission by this device",
    51                      "Trace source indicating a packet has arrived for transmission by this device",
    52                      MakeTraceSourceAccessor (&VirtualNetDevice::m_macTxTrace))
    52                      MakeTraceSourceAccessor (&VirtualNetDevice::m_macTxTrace))
    53     .AddTraceSource ("MacPromiscRx", 
    53     .AddTraceSource ("MacPromiscRx", 
    54                      "A packet has been received by this device, has been passed up from the physical layer "
    54                      "A packet has been received by this device, has been passed up from the physical layer "
    65                      "Trace source simulating a non-promiscuous packet sniffer attached to the device",
    65                      "Trace source simulating a non-promiscuous packet sniffer attached to the device",
    66                      MakeTraceSourceAccessor (&VirtualNetDevice::m_snifferTrace))
    66                      MakeTraceSourceAccessor (&VirtualNetDevice::m_snifferTrace))
    67     .AddTraceSource ("PromiscSniffer", 
    67     .AddTraceSource ("PromiscSniffer", 
    68                      "Trace source simulating a promiscuous packet sniffer attached to the device",
    68                      "Trace source simulating a promiscuous packet sniffer attached to the device",
    69                      MakeTraceSourceAccessor (&VirtualNetDevice::m_promiscSnifferTrace))
    69                      MakeTraceSourceAccessor (&VirtualNetDevice::m_promiscSnifferTrace))
    70     ;
    70   ;
    71   return tid;
    71   return tid;
    72 }
    72 }
    73 
    73 
    74 VirtualNetDevice::VirtualNetDevice ()
    74 VirtualNetDevice::VirtualNetDevice ()
    75 {
    75 {
   226   return Mac48Address ("ff:ff:ff:ff:ff:ff");
   226   return Mac48Address ("ff:ff:ff:ff:ff:ff");
   227 }
   227 }
   228 
   228 
   229 Address VirtualNetDevice::GetMulticast (Ipv6Address addr) const
   229 Address VirtualNetDevice::GetMulticast (Ipv6Address addr) const
   230 {
   230 {
   231   return Mac48Address ("ff:ff:ff:ff:ff:ff");  
   231   return Mac48Address ("ff:ff:ff:ff:ff:ff");
   232 }
   232 }
   233 
   233 
   234 
   234 
   235 bool
   235 bool
   236 VirtualNetDevice::IsPointToPoint (void) const
   236 VirtualNetDevice::IsPointToPoint (void) const