#include <hdr_sr.h>
Collaboration diagram for hdr_sr:

|
Here is the call graph for this function:

|
|
Definition at line 155 of file hdr_sr.h. Referenced by dump(), Path::fillSR(), Path::Path(), DSRAgent::tap(), DSRAgent::testinit(), DSRProto::testinit(), DSRAgent::undeliverablePkt(), DSRAgent::xmitFailed(), and DSRAgent::xmitFlowFailed().
00155 { return addrs_; }
|
|
||||||||||||
|
Definition at line 235 of file hdr_sr.h. References MAX_SR_LEN, and num_addrs_. Referenced by AddSR::recv(), DSRAgent::testinit(), and DSRProto::testinit().
00235 {
00236 assert(num_addrs_ < MAX_SR_LEN-1);
00237 addrs_[num_addrs_].addr_type = type;
00238 addrs_[num_addrs_++].addr = a;
00239 }
|
|
|
Definition at line 154 of file hdr_sr.h. References cur_addr_.
00154 { return cur_addr_; }
|
|
|
Definition at line 149 of file hdr_sr.h. References cur_addr_. Referenced by Path::fillSR(), DSRAgent::handleFlowForwarding(), Path::Path(), SRForwarder::recv(), AddSR::recv(), DSRAgent::sendOutPacketWithRoute(), DSRAgent::tap(), DSRAgent::undeliverablePkt(), DSRAgent::xmitFailed(), and DSRAgent::xmitFlowFailed().
00149 { return cur_addr_; }
|
|
|
Definition at line 167 of file hdr_sr.h. References route_error::err_links_. Referenced by CMUTrace::format_dsr(), DSRAgent::processBrokenRouteError(), DSRAgent::replyFromRouteCache(), DSRAgent::sendOutRtReq(), and DSRAgent::xmitFailed().
00167 {return sr_error_.err_links_; }
|
|
|
Definition at line 60 of file hdr_sr.cc.
00061 {
00062 static char buf[100];
00063 dump(buf);
00064 return (buf);
00065 }
|
|
|
Definition at line 68 of file hdr_sr.cc. References addrs(), cur_addr_, and num_addrs_. Referenced by SRForwarder::handlePktWithoutSR(), SRForwarder::recv(), AddSR::recv(), DSRAgent::sendOutPacketWithRoute(), and DSRAgent::xmitFailed().
00069 {
00070 char *ptr = buf;
00071 *ptr++ = '[';
00072 for (int i = 0; i < num_addrs_; i++)
00073 {
00074 ptr += sprintf(ptr, "%s%d ",
00075 (i == cur_addr_) ? "|" : "",
00076 addrs()[i].addr);
00077 }
00078 *ptr++ = ']';
00079 *ptr = '\0';
00080 }
|
Here is the call graph for this function:

|
|
Definition at line 181 of file hdr_sr.h. References flow_default_err::flow_default_valid_. Referenced by DSRAgent::handlePacketReceipt(), init(), DSRAgent::processUnknownFlowError(), DSRAgent::sendUnknownFlow(), and size().
00181 { return sr_fdef_unk.flow_default_valid_; }
|
|
|
Definition at line 170 of file hdr_sr.h. References flow_header::flow_valid_. Referenced by DSRAgent::handleFlowForwarding(), DSRAgent::handleForwarding(), init(), DSRAgent::processBrokenRouteError(), DSRAgent::processFlowARS(), DSRAgent::processUnknownFlowError(), DSRAgent::sendOutPacketWithRoute(), DSRAgent::sendUnknownFlow(), size(), DSRAgent::undeliverablePkt(), DSRAgent::xmitFailed(), and DSRAgent::xmitFlowFailed().
00170 { return sr_flow_.flow_valid_; }
|
|
|
Definition at line 171 of file hdr_sr.h. References flow_header::flow_id_, and u_int16_t. Referenced by DSRAgent::handleFlowForwarding(), DSRAgent::processFlowARS(), DSRAgent::sendOutPacketWithRoute(), and DSRAgent::xmitFlowFailed().
|
|
|
Definition at line 174 of file hdr_sr.h. References flow_timeout::flow_timeout_valid_. Referenced by DSRAgent::handleFlowForwarding(), init(), DSRAgent::processBrokenRouteError(), DSRAgent::processUnknownFlowError(), DSRAgent::sendOutPacketWithRoute(), DSRAgent::sendUnknownFlow(), size(), DSRAgent::undeliverablePkt(), and DSRAgent::xmitFailed().
00174 { return sr_ftime_.flow_timeout_valid_; }
|
|
|
Definition at line 175 of file hdr_sr.h. References flow_timeout::timeout_. Referenced by DSRAgent::handleFlowForwarding(), and DSRAgent::sendOutPacketWithRoute().
|
|
|
Definition at line 177 of file hdr_sr.h. References flow_unknown::flow_unknown_valid_. Referenced by DSRAgent::handlePacketReceipt(), init(), DSRAgent::processUnknownFlowError(), DSRAgent::sendUnknownFlow(), and size().
00177 { return sr_funk_.flow_unknown_valid_; }
|
|
|
Definition at line 225 of file hdr_sr.h. References cur_addr_, nsaddr_t, and num_addrs_. Referenced by DSRAgent::handleFlowForwarding(), SRForwarder::recv(), and DSRAgent::sendOutPacketWithRoute().
|
|
|
Definition at line 230 of file hdr_sr.h. References cur_addr_, and num_addrs_. Referenced by DSRAgent::handleFlowForwarding(), and DSRAgent::sendOutPacketWithRoute().
|
|
|
Definition at line 172 of file hdr_sr.h. References flow_header::hopCount_. Referenced by DSRAgent::handleFlowForwarding(), DSRAgent::processFlowARS(), and DSRAgent::sendOutPacketWithRoute().
|
|
|
Definition at line 241 of file hdr_sr.h. References cur_addr_, flow_default_unknown(), flow_header(), flow_timeout(), flow_unknown(), num_addrs_, num_route_errors(), route_error(), route_reply(), route_reply_len(), route_request(), salvaged_, and valid_. Referenced by DSRAgent::getRouteForPacket(), SRForwarder::handlePktWithoutSR(), DSRAgent::recv(), DSRAgent::replyFromRouteCache(), DSRAgent::returnSrcRouteToRequestor(), DSRAgent::sendRouteShortening(), DSRAgent::testinit(), and DSRProto::testinit().
00241 {
00242 valid_ = 1;
00243 salvaged_ = 0;
00244 num_addrs_ = 0;
00245 cur_addr_ = 0;
00246
00247 route_request() = 0;
00248 route_reply() = 0;
00249 route_reply_len() = 0;
00250 route_error() = 0;
00251 num_route_errors() = 0;
00252
00253 flow_timeout() = 0;
00254 flow_unknown() = 0;
00255 flow_default_unknown() = 0;
00256 flow_header() = 0;
00257 }
|
Here is the call graph for this function:

|
|
Definition at line 159 of file hdr_sr.h. References route_request::req_ttl_. Referenced by DSRAgent::handleRouteRequest(), and DSRAgent::sendOutRtReq().
00159 {return sr_request_.req_ttl_; }
|
|
|
Definition at line 153 of file hdr_sr.h. References num_addrs_.
00153 { return num_addrs_; }
|
|
|
Definition at line 148 of file hdr_sr.h. References num_addrs_. Referenced by Path::fillSR(), CMUTrace::format_dsr(), DSRAgent::handleFlowForwarding(), DSRAgent::handleForwarding(), Path::Path(), DSRAgent::processFlowARS(), AddSR::recv(), DSRAgent::sendOutPacketWithRoute(), DSRAgent::sendUnknownFlow(), DSRAgent::tap(), DSRAgent::testinit(), DSRProto::testinit(), DSRAgent::xmitFailed(), and DSRAgent::xmitFlowFailed().
00148 { return num_addrs_; }
|
|
|
Definition at line 182 of file hdr_sr.h. References flow_default_err::err_count_. Referenced by DSRAgent::processUnknownFlowError(), DSRAgent::sendUnknownFlow(), and size().
00182 { return sr_fdef_unk.err_count_; }
|
|
|
Definition at line 178 of file hdr_sr.h. References flow_unknown::err_count_. Referenced by DSRAgent::processUnknownFlowError(), DSRAgent::sendUnknownFlow(), and size().
00178 { return sr_funk_.err_count_; }
|
|
|
Definition at line 166 of file hdr_sr.h. References route_error::err_count_. Referenced by CMUTrace::format_dsr(), init(), DSRAgent::processBrokenRouteError(), DSRAgent::replyFromRouteCache(), DSRAgent::sendOutRtReq(), size(), and DSRAgent::xmitFailed().
00166 {return sr_error_.err_count_; }
|
|
|
Definition at line 142 of file hdr_sr.h. References offset_.
00142 { return offset_; }
|
|
|
Definition at line 163 of file hdr_sr.h. References route_reply::rep_addrs_. Referenced by DSRAgent::acceptRouteReply(), CMUTrace::format_dsr(), DSRAgent::replyFromRouteCache(), DSRAgent::returnSrcRouteToRequestor(), DSRAgent::sendRouteShortening(), DSRAgent::tap(), and DSRAgent::undeliverablePkt().
00163 {return sr_reply_.rep_addrs_; }
|
|
|
Definition at line 165 of file hdr_sr.h. References route_error::err_valid_. Referenced by CMUTrace::format_dsr(), DSRAgent::handlePacketReceipt(), init(), DSRAgent::processBrokenRouteError(), DSRAgent::recv(), DSRAgent::replyFromRouteCache(), DSRAgent::sendOutPacketWithRoute(), DSRAgent::sendOutRtReq(), size(), DSRAgent::tap(), DSRAgent::undeliverablePkt(), and DSRAgent::xmitFailed().
00165 {return sr_error_.err_valid_; }
|
|
|
Definition at line 161 of file hdr_sr.h. References route_reply::rep_valid_. Referenced by DSRAgent::acceptRouteReply(), CMUTrace::format_dsr(), DSRAgent::handlePacketReceipt(), init(), DSRAgent::replyFromRouteCache(), DSRAgent::returnSrcRouteToRequestor(), DSRAgent::sendOutPacketWithRoute(), DSRAgent::sendRouteShortening(), DSRAgent::sendUnknownFlow(), size(), DSRAgent::tap(), DSRAgent::undeliverablePkt(), and DSRAgent::xmitFailed().
00161 {return sr_reply_.rep_valid_; }
|
|
|
Definition at line 162 of file hdr_sr.h. References route_reply::rep_rtlen_. Referenced by DSRAgent::acceptRouteReply(), CMUTrace::format_dsr(), init(), DSRAgent::replyFromRouteCache(), DSRAgent::returnSrcRouteToRequestor(), DSRAgent::sendRouteShortening(), size(), DSRAgent::tap(), and DSRAgent::undeliverablePkt().
00162 {return sr_reply_.rep_rtlen_; }
|
|
|
Definition at line 157 of file hdr_sr.h. References route_request::req_valid_. Referenced by CMUTrace::format_dsr(), DSRAgent::handlePacketReceipt(), DSRAgent::handleRouteRequest(), init(), SRForwarder::recv(), DSRAgent::recv(), AddSR::recv(), DSRAgent::replyFromRouteCache(), DSRAgent::sendOutPacketWithRoute(), DSRAgent::sendOutRtReq(), DSRAgent::sendUnknownFlow(), size(), DSRAgent::tap(), DSRAgent::undeliverablePkt(), and DSRAgent::xmitFailed().
00157 {return sr_request_.req_valid_; }
|
|
|
Definition at line 158 of file hdr_sr.h. References route_request::req_id_. Referenced by DSRAgent::acceptRouteReply(), CMUTrace::format_dsr(), DSRAgent::handlePacketReceipt(), DSRAgent::handleRouteRequest(), DSRAgent::ignoreRouteRequestp(), DSRAgent::replyFromRouteCache(), DSRAgent::returnSrcRouteToRequestor(), DSRAgent::sendOutRtReq(), and DSRAgent::sendRouteShortening().
00158 {return sr_request_.req_id_; }
|
|
|
Definition at line 152 of file hdr_sr.h. References salvaged_.
00152 { return salvaged_; }
|
|
|
Definition at line 147 of file hdr_sr.h. References salvaged_. Referenced by DSRAgent::handleFlowForwarding(), and DSRAgent::undeliverablePkt().
00147 { return salvaged_; }
|
|
|
Definition at line 185 of file hdr_sr.h. References flow_default_unknown(), flow_header(), flow_timeout(), flow_unknown(), num_addrs_, num_default_unknown(), num_flow_unknown(), num_route_errors(), route_error(), route_reply(), route_reply_len(), route_request(), and SR_HDR_SZ. Referenced by DSRAgent::handleForwarding(), DSRAgent::handlePacketReceipt(), DSRAgent::returnSrcRouteToRequestor(), DSRAgent::sendOutPacketWithRoute(), DSRAgent::undeliverablePkt(), and DSRAgent::xmitFlowFailed().
00185 {
00186 int sz = 0;
00187 if (num_addrs_ || route_request() ||
00188 route_reply() || route_error() ||
00189 flow_timeout() || flow_unknown() || flow_default_unknown())
00190 sz += SR_HDR_SZ;
00191
00192 if (num_addrs_) sz += 4 * (num_addrs_ - 1);
00193 if (route_reply()) sz += 5 + 4 * route_reply_len();
00194 if (route_request()) sz += 8;
00195 if (route_error()) sz += 16 * num_route_errors();
00196 if (flow_timeout()) sz += 4;
00197 if (flow_unknown()) sz += 14 * num_flow_unknown();
00198 if (flow_default_unknown()) sz += 12 * num_default_unknown();
00199
00200 if (flow_header()) sz += 4;
00201
00202 sz = ((sz+3)&(~3)); // align...
00203 assert(sz >= 0);
00204 #if 0
00205 printf("Size: %d (%d %d %d %d %d %d %d %d %d)\n", sz,
00206 (num_addrs_ || route_request() ||
00207 route_reply() || route_error() ||
00208 flow_timeout() || flow_unknown() ||
00209 flow_default_unknown()) ? SR_HDR_SZ : 0,
00210 num_addrs_ ? 4 * (num_addrs_ - 1) : 0,
00211 route_reply() ? 5 + 4 * route_reply_len() : 0,
00212 route_request() ? 8 : 0,
00213 route_error() ? 16 * num_route_errors() : 0,
00214 flow_timeout() ? 4 : 0,
00215 flow_unknown() ? 14 * num_flow_unknown() : 0,
00216 flow_default_unknown() ? 12 * num_default_unknown() : 0,
00217 flow_header() ? 4 : 0);
00218 #endif
00219
00220 return sz;
00221 }
|
Here is the call graph for this function:

|
|
Definition at line 183 of file hdr_sr.h. References flow_default_err::err_flows_. Referenced by DSRAgent::processUnknownFlowError(), and DSRAgent::sendUnknownFlow().
00183 { return sr_fdef_unk.err_flows_; }
|
|
|
Definition at line 179 of file hdr_sr.h. References flow_unknown::err_flows_. Referenced by DSRAgent::processUnknownFlowError(), and DSRAgent::sendUnknownFlow().
00179 { return sr_funk_.err_flows_; }
|
|
|
Definition at line 151 of file hdr_sr.h. References valid_.
00151 { return valid_; }
|
|
|
Definition at line 146 of file hdr_sr.h. References valid_. Referenced by DSRAgent::handlePacketReceipt(), DSRAgent::handlePktWithoutSR(), Path::Path(), SRForwarder::recv(), DSRAgent::recv(), AddSR::recv(), DSRAgent::sendOutPacketWithRoute(), DSRAgent::sendOutRtReq(), and DSRAgent::tap().
00146 { return valid_; }
|
|
|
|
|
|
Definition at line 128 of file hdr_sr.h. Referenced by cur_addr(), dump(), get_next_addr(), get_next_type(), and init(). |
|
|
Definition at line 127 of file hdr_sr.h. Referenced by append_addr(), dump(), get_next_addr(), get_next_type(), init(), num_addrs(), and size(). |
|
|
Definition at line 35 of file hdr_sr.cc. Referenced by access(), offset(), and SRHeaderClass::SRHeaderClass(). |
|
|
Definition at line 125 of file hdr_sr.h. Referenced by init(), and salvaged(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.3