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) 2011 Yufei Cheng | 3 * Copyright (c) 2011 Yufei Cheng |
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 15 matching lines...) Expand all Loading... |
26 * Work supported in part by NSF FIND (Future Internet Design) Program | 26 * Work supported in part by NSF FIND (Future Internet Design) Program |
27 * under grant CNS-0626918 (Postmodern Internet Architecture), | 27 * under grant CNS-0626918 (Postmodern Internet Architecture), |
28 * NSF grant CNS-1050226 (Multilayer Network Resilience Analysis and Experimenta
tion on GENI), | 28 * NSF grant CNS-1050226 (Multilayer Network Resilience Analysis and Experimenta
tion on GENI), |
29 * US Department of Defense (DoD), and ITTC at The University of Kansas. | 29 * US Department of Defense (DoD), and ITTC at The University of Kansas. |
30 */ | 30 */ |
31 | 31 |
32 #ifndef DSR_H | 32 #ifndef DSR_H |
33 #define DSR_H | 33 #define DSR_H |
34 | 34 |
35 /** | 35 /** |
36 * \ingroup routing | 36 * \defgroup dsr DSR Routing |
37 * \defgroup dsr DSR | |
38 *· | 37 *· |
39 * This model implements the base specification of the Dynamic Source Routing (D
SR) | 38 * This section documents the API of the ns-3 DSR module. For a |
40 * protocol. Implementation is based on RFC4728. | 39 * generic functional description, please refer to the ns-3 model |
41 * | 40 * library document. |
42 * Class dsr::DsrRouting implements all functionality of service packet exchange
and inherits Ipv4L4Protocol. | |
43 * | |
44 * Class dsr::DsrOptions implements functionality of packet processing and talk
to DsrRouting to send/receive packets | |
45 * | |
46 * Class dsr::DsrFsHeader defines the fixed-size header and identify the up-laye
r protocol | |
47 * | |
48 * Class dsr::DsrOptionHeader takes care of different dsr options and process di
fferent header according to specification from rfc | |
49 * | |
50 * Class dsr::DsrSendBuffer is a buffer to save data packet as well as route err
or packet when there is no route to forward the packet | |
51 * | |
52 * Class dsr::DsrMaintainBuffer is a buffer to save data packet for next-hop not
ification when the data packet has already sent out of send buffer | |
53 * | |
54 * Class dsr::RouteCache is the essential part to save routes found for data pac
ket, dsr responds to several routes for a single destination | |
55 * | |
56 * Class dsr::RreqTable implements the functionalities to avoid duplicate route
requests and control route request rate for a single destination | |
57 * | |
58 * Protocol operation depends on the many adjustable parameters. We support para
meters, with their default values, from | |
59 * RFC and parameters that enable/disable protocol features or tune for specific
simulation scenarios, such as the max size | |
60 * of send buffer and its timeout value. The full parameter list is in DsrRoutin
g.cc file. | |
61 * | |
62 * DSR discovers routes totally on demand. Therefore, our DSR model buffers all
packets, while a route request packet (RREQ) | |
63 * is disseminated. We implement a packet buffer in dsr-rsendbuff.cc. The packet
queue implements garbage collection of old | |
64 * packets and a queue size limit. When the packet is sent out from the send buf
fer, it will be queued in maintenance buffer for | |
65 * next hop acknowledgment | |
66 * | |
67 * Route Cache implementation support garbage collection of old entries and stat
e machine, defined in standard. | |
68 * It implements as a STL map container. The key is the destination IP address. | |
69 * | |
70 * Protocol operation strongly depends on broken link detection mechanism. We im
plement all the three heuristics. | |
71 * First, we use layer 2 feedback when possible. Link considered to be broken
, if frame transmission results in a transmission | |
72 * failure for all retries. This mechanism meant for active links and work mu
ch more faster, than first method. | |
73 * Layer 2 feedback implementation relies on TxErrHeader trace source, curren
tly it is supported in AdhocWifiMac only. | |
74 * | |
75 * Second, passive acknowledgment should be used whenever possible. The node
turns on "promiscuous" receive mode, in which it can receive | |
76 * packet not destined for itself, and when the node assures the delivery of
that data packet to its destination, it cancels the passive | |
77 * acknowledgment timer. | |
78 * | |
79 * Last, we use network layer acknowledge scheme to notify the receipt of a p
acket. Route request packet will not | |
80 * be acknowledge or retransmitted. | |
81 * | |
82 * Following optional protocol optimizations aren't implemented: | |
83 * - Flow state | |
84 * - First Hop External (F), Last Hop External (L) flags | |
85 * - Handling unknown DSR options | |
86 * - Two types of error headers: | |
87 * 1. flow state not supported option | |
88 * 2. unsupported option (not going to happen in simulation) | |
89 * | |
90 * DSR operates with direct access to IP header, and operates between network an
d transport layer. | |
91 * | |
92 * Implementation changes | |
93 * - The DsrFsHeader has added 3 fields: message type, source id, destination i
d, and these changes only for post-processing | |
94 * - message type is used to identify the data packet from control packet | |
95 * - source id is used to identify the real source of the data packet since
we have to deliver the packet hop-by-hop and the ipv4header | |
96 * is not carrying the real source and destination ip address as needed | |
97 * - destination id is for same reason of above | |
98 * | |
99 * Changes: | |
100 * - Route Reply header is not work-aligned in DSR rfc, change it to word-alig
ned in implementation | |
101 * - dsr works as a shim header between transport and network protocol, it nee
ds its own forwarding mechanism, | |
102 * we are changing the packet transmission to hop-by-hop delivery, so we add
ed two fields in dsr fixed header | |
103 * to notify packet delivery | |
104 * 1. message type to notify the type of this packet: data packet or control
one | |
105 * 2. source id to identify the real source address of this packet | |
106 * 3. destination id to identify the real destination | |
107 * | |
108 */ | 41 */ |
109 | 42 |
110 #endif /* DSR_H */ | 43 #endif /* DSR_H */ |
LEFT | RIGHT |