src/applications/packet-sink/packet-sink.cc
changeset 2965 4b28e9740e3b
parent 2728 153993e8be6f
child 3097 1b1661bbfa33
equal deleted inserted replaced
2964:4e8cb1577144 2965:4b28e9740e3b
    41 {
    41 {
    42   static TypeId tid = TypeId ("ns3::PacketSink")
    42   static TypeId tid = TypeId ("ns3::PacketSink")
    43     .SetParent<Application> ()
    43     .SetParent<Application> ()
    44     .AddConstructor<PacketSink> ()
    44     .AddConstructor<PacketSink> ()
    45     .AddAttribute ("Local", "The Address on which to Bind the rx socket.",
    45     .AddAttribute ("Local", "The Address on which to Bind the rx socket.",
    46                    Address (),
    46                    AddressValue (),
    47                    MakeAddressAccessor (&PacketSink::m_local),
    47                    MakeAddressAccessor (&PacketSink::m_local),
    48                    MakeAddressChecker ())
    48                    MakeAddressChecker ())
    49     .AddAttribute ("Protocol", "The type id of the protocol to use for the rx socket.",
    49     .AddAttribute ("Protocol", "The type id of the protocol to use for the rx socket.",
    50                    Udp::GetTypeId (),
    50                    TypeIdValue (Udp::GetTypeId ()),
    51                    MakeTypeIdAccessor (&PacketSink::m_tid),
    51                    MakeTypeIdAccessor (&PacketSink::m_tid),
    52                    MakeTypeIdChecker ())
    52                    MakeTypeIdChecker ())
    53     .AddTraceSource ("Rx", "A packet has been received",
    53     .AddTraceSource ("Rx", "A packet has been received",
    54                      MakeTraceSourceAccessor (&PacketSink::m_rxTrace))
    54                      MakeTraceSourceAccessor (&PacketSink::m_rxTrace))
    55     ;
    55     ;