--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/kLRHv4D9CEU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
T.
--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
Hi,I'd suggest to check src/internet/model/ripng*. The fact that I wrote it is just a coincidence.The first question (if RouteInput and RouteOutput are enough), the answer is no.These two functions are "just" the one used by IP to find a route (i.e., forwarding). The routing table itself is updated by other means.If the protocol is reactive, the route search will be triggered by RouteInput or RouteOutput. If the protocol is proactive, the RT will be updated by timers (usually).One way to think to the whole system is this: You can think to the routing protocol implementation as 3 separate entities: one is the RT, one is the routing application and the third is the RouteInput/Output.In proactive routing, there is an app that continuously do its job and keeps the RT updated.In reactive routing the RouteInput/Output will trigger some function in the above mentioned app to fill the RT.The RT is updated by the app, and used by RouteInput/Output.This is an indirect answer to your question: sockets are used by the app. There's always an app implementing the protocol... and that app can open and manage its sockets, just like any normal application. Some protocols will need UDP sockets, some TCP sockets, some raw IP sockets. it depends on the particular protocol.
On Wednesday, June 17, 2015 at 11:30:40 PM UTC+2, Tommaso Pecorella wrote:Hi,I'd suggest to check src/internet/model/ripng*. The fact that I wrote it is just a coincidence.The first question (if RouteInput and RouteOutput are enough), the answer is no.These two functions are "just" the one used by IP to find a route (i.e., forwarding). The routing table itself is updated by other means.If the protocol is reactive, the route search will be triggered by RouteInput or RouteOutput. If the protocol is proactive, the RT will be updated by timers (usually).One way to think to the whole system is this: You can think to the routing protocol implementation as 3 separate entities: one is the RT, one is the routing application and the third is the RouteInput/Output.In proactive routing, there is an app that continuously do its job and keeps the RT updated.In reactive routing the RouteInput/Output will trigger some function in the above mentioned app to fill the RT.The RT is updated by the app, and used by RouteInput/Output.This is an indirect answer to your question: sockets are used by the app. There's always an app implementing the protocol... and that app can open and manage its sockets, just like any normal application. Some protocols will need UDP sockets, some TCP sockets, some raw IP sockets. it depends on the particular protocol.This makes me very clear about the mechanism of the routing protocol, thanks a lot for your explanations.
Actually, if there will be a small tutorial on the RigNg routing protocol corresponding to explain the modules and idea of design as you said above (like why we have these functions here, and what are their roles ...), that will be great, because now by reading the source code, guessing what are they doing is the major tasks we are digging. :) But anyway, thanks again.
Hi,I'd suggest to check src/internet/model/ripng*. The fact that I wrote it is just a coincidence.The first question (if RouteInput and RouteOutput are enough), the answer is no.These two functions are "just" the one used by IP to find a route (i.e., forwarding). The routing table itself is updated by other means.If the protocol is reactive, the route search will be triggered by RouteInput or RouteOutput. If the protocol is proactive, the RT will be updated by timers (usually).One way to think to the whole system is this: You can think to the routing protocol implementation as 3 separate entities: one is the RT, one is the routing application and the third is the RouteInput/Output.In proactive routing, there is an app that continuously do its job and keeps the RT updated.In reactive routing the RouteInput/Output will trigger some function in the above mentioned app to fill the RT.The RT is updated by the app, and used by RouteInput/Output.This is an indirect answer to your question: sockets are used by the app. There's always an app implementing the protocol... and that app can open and manage its sockets, just like any normal application. Some protocols will need UDP sockets, some TCP sockets, some raw IP sockets. it depends on the particular protocol.
First of all, thanks for the quick response.Ok. Now, I understand that it is possible for NotifyAddAddress to be clled before NotifyInterfaceUp.But now I have another doubt:I'm using AODV as a base for the development of my routing protocol.When NotifyAddAddress or NotifyInterfaceUp are called, a socket is bound to the interface hearing for packets.Specifically, I bind the sockets to the interface broadcast address (e.g., 10.0.255.255 with mask 255.255.0.0).When I send HELLO messages through those sockets, packets skip RouteOutput function.
But on the other end, when a node receives those packets, they are passed to the RouteInput function.
Thus, the socket callback for receiving packets is never called.
Can anyone understand why?
Thanks. Now I understand.Just another question:If I bind my sockets to the interface broadcast address (e.g., 10.0.255.255 with mask 255.255.0.0), when I send packets through these sockets, those packets will skip RouteOutput.But if I bind the sockets to Ipv4Address::GetAny(), when I send packets through these sockets, they will go through RouteOutput.Why does this happen?
Since I'm talking about sending HELLO (beacon) messages, I use these sockets for that. And as I would expect, in RouteOutput I will have no routing table to decide anything.How do I route these broadcast HELLO messages in RouteOuput?
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/kLRHv4D9CEU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
WifiMacHelper wifiMac = NqosWifiMacHelper::Default ();
wifiMac.SetType ("ns3::AdhocWifiMac");
YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
wifiPhy.SetChannel (wifiChannel.Create ());
WifiHelper wifi = WifiHelper::Default ();
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode",
StringValue ("OfdmRate6Mbps"),
"RtsCtsThreshold", UintegerValue (0));
NetDeviceContainer devices;
devices = wifi.Install (wifiPhy, wifiMac, nodes);
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode",
StringValue ("OfdmRate6Mbps"),
"NonUnicastMode",
WifiModeValue(WifiMode("OfdmRate6Mbps")));
7.79318s RoutingProtocol:SendHelloMsg(): node-5 Bcast HELLO pckt:607 215:50:0
7.79318s YansWifiPhy:StartReceivePreambleAndHeader(0x258ae10, 0x2580980, -89.4754, OfdmRate6Mbps, 0, 0)
7.79318s YansWifiPhy:StartReceivePreambleAndHeader(): sync to signal (power=1.42055e-12W)
7.79318s YansWifiPhy:StartReceivePreambleAndHeader(0x257d430, 0x262d100, -91.478, OfdmRate6Mbps, 0, 0)
7.79318s YansWifiPhy:StartReceivePreambleAndHeader(): sync to signal (power=8.9577e-13W)
7.79318s YansWifiPhy:StartReceivePreambleAndHeader(0x25768b0, 0x25579c0, -92.606, OfdmRate6Mbps, 0, 0)
7.79318s YansWifiPhy:StartReceivePreambleAndHeader(): sync to signal (power=6.90882e-13W)
7.79318s YansWifiPhy:StartReceivePreambleAndHeader(0x2579e90, 0x2576820, -96.7539, OfdmRate6Mbps, 0, 0)
7.79318s YansWifiPhy:StartReceivePreambleAndHeader(): sync to signal (power=2.65832e-13W)
7.79318s YansWifiPhy:StartReceivePreambleAndHeader(0x25f7200, 0x2598ef0, -96.7539, OfdmRate6Mbps, 0, 0)
7.79318s YansWifiPhy:StartReceivePreambleAndHeader(): sync to signal (power=2.65832e-13W)
7.79318s YansWifiPhy:StartReceivePreambleAndHeader(0x2580b50, 0x2587c10, -100.697, OfdmRate6Mbps, 0, 0)
7.79318s YansWifiPhy:StartReceivePreambleAndHeader(): drop packet because signal power too Small (1.07224e-13<2.51189e-13)
7.79318s YansWifiPhy:StartReceivePreambleAndHeader(0x258e410, 0x25aa2b0, -101.619, OfdmRate6Mbps, 0, 0)
7.79318s YansWifiPhy:StartReceivePreambleAndHeader(): drop packet because signal power too Small (8.67219e-14<2.51189e-13)
7.79318s YansWifiPhy:StartReceivePreambleAndHeader(0x25fa490, 0x2580f50, -102.308, OfdmRate6Mbps, 0, 0)
7.79318s YansWifiPhy:StartReceivePreambleAndHeader(): drop packet because signal power too Small (7.39958e-14<2.51189e-13)
7.79318s YansWifiPhy:StartReceivePreambleAndHeader(0x2587810, 0x258e810, -102.846, OfdmRate6Mbps, 0, 0)
7.79318s YansWifiPhy:StartReceivePreambleAndHeader(): drop packet because signal power too Small (6.53779e-14<2.51189e-13)
7.7932s YansWifiPhy:StartReceivePacket(0x258ae10, 0x2580980, OfdmRate6Mbps, 0, 0)
7.7932s YansWifiPhy:StartReceivePacket(): snr(dB)=5.49054, per=8.39777e-07
7.7932s YansWifiPhy:StartReceivePacket(): receiving plcp payload
7.7932s YansWifiPhy:StartReceivePacket(0x257d430, 0x262d100, OfdmRate6Mbps, 0, 0)
7.7932s YansWifiPhy:StartReceivePacket(): snr(dB)=3.48795, per=0.00216338
7.7932s YansWifiPhy:StartReceivePacket(): receiving plcp payload
7.7932s YansWifiPhy:StartReceivePacket(0x25768b0, 0x25579c0, OfdmRate6Mbps, 0, 0)
7.7932s YansWifiPhy:StartReceivePacket(): snr(dB)=2.36003, per=0.10283
7.7932s YansWifiPhy:StartReceivePacket(): receiving plcp payload
7.7932s YansWifiPhy:StartReceivePacket(0x2579e90, 0x2576820, OfdmRate6Mbps, 0, 0)
7.7932s YansWifiPhy:StartReceivePacket(): snr(dB)=-1.78794, per=1
7.7932s YansWifiPhy:StartReceivePacket(): drop packet because plcp preamble/header reception failed
7.7932s YansWifiPhy:StartReceivePacket(0x25f7200, 0x2598ef0, OfdmRate6Mbps, 0, 0)
7.7932s YansWifiPhy:StartReceivePacket(): snr(dB)=-1.78794, per=1
7.7932s YansWifiPhy:StartReceivePacket(): drop packet because plcp preamble/header reception failed
7.79332s YansWifiPhy:EndReceive(0x258ae10, 0x2580980, 0x25be7a0)
7.79332s YansWifiPhy:EndReceive(): mode=6000000, snr(dB)=5.49054, per=2.39959e-05, size=81
7.79332s AdhocWifiMac:Receive(0x25883d0, 0x2580980, 0x7ffc6349ecf0)
7.79332s RegularWifiMac:ForwardUp(0x25883d0, 0x2580980, 00:00:00:00:00:05)
7.79332s RoutingProtocol:RouteInput(0x261d430, node-7, 607, 10.0.255.255, 04-06-00:00:00:00:00:07)
7.79332s RoutingProtocol:RouteInput(): node-7 LCB pckt:607 (HELLO) to 10.0.255.255
7.79332s RoutingProtocol:RecvPacket(): node-7 Update neighbors table 10.0.0.5--215:50:0
7.79332s YansWifiPhy:EndReceive(0x257d430, 0x262d100, 0x25be6b0)
7.79332s YansWifiPhy:EndReceive(): mode=6000000, snr(dB)=3.48795, per=0.0600085, size=81
7.79332s AdhocWifiMac:Receive(0x257aa60, 0x262d100, 0x7ffc6349ecf0)
7.79332s RegularWifiMac:ForwardUp(0x257aa60, 0x262d100, 00:00:00:00:00:05)
7.79332s RoutingProtocol:RouteInput(0x26164f0, node-3, 607, 10.0.255.255, 04-06-00:00:00:00:00:03)
7.79332s RoutingProtocol:RouteInput(): node-3 LCB pckt:607 (HELLO) to 10.0.255.255
7.79332s RoutingProtocol:RecvPacket(): node-3 Update neighbors table 10.0.0.5--215:50:0
7.79332s YansWifiPhy:EndReceive(0x25768b0, 0x25579c0, 0x2623c40)
7.79332s YansWifiPhy:EndReceive(): mode=6000000, snr(dB)=2.36003, per=0.954978, size=81
7.79332s AdhocWifiMac:Receive(0x2574020, 0x25579c0, 0x7ffc6349ecf0)
7.79332s RegularWifiMac:ForwardUp(0x2574020, 0x25579c0, 00:00:00:00:00:05)
7.79332s RoutingProtocol:RouteInput(0x2612c00, node-1, 607, 10.0.255.255, 04-06-00:00:00:00:00:01)
7.79332s RoutingProtocol:RouteInput(): node-1 LCB pckt:607 (HELLO) to 10.0.255.255
7.79332s RoutingProtocol:RecvPacket(): node-1 Update neighbors table 10.0.0.5--215:50:0
7.79332s YansWifiPhy:EndReceive(0x2579e90, 0x2576820, 0x2577f90)
7.79332s YansWifiPhy:EndReceive(0x25f7200, 0x2598ef0, 0x261e2d0)
WifiPhyStateHelper::SwitchFromRxEndOk