class <Agent/DSRAgent> DSRAgent : public Tap, public Agent


Inheritance:


Public Fields

static DSRAgent_List agthead

Public Methods

virtual int command(int argc, const char*const* argv)
DSRAgent()
LIST_ENTRY(DSRAgent)
virtual void recv(Packet*, Handler* callback = 0)
void sendOutBCastPkt(Packet *p)
void tap(const Packet *p)
void Terminate(void)
~DSRAgent()

Private Fields

ID err_from
data from the last route err sent to us
GratReplyHoldDown grat_hold[RTREP_HOLDOFF_SIZE]
int grat_hold_victim
PriQueue* ifq
output interface queue
NsObject* ll
our link layer output
Trace* logtarget
ID net_id
will eventually need to handle multiple infs, but this is okay for now 1/28/98 -dam our IP addr and MAC addr
MobileNode* node_
extensions for wired cum wireless sim mode
int num_heldoff_rt_replies
int off_ip_
int off_ll_
int off_mac_
int off_sr_
NsObject* port_dmux_
extensions for mobileIP my port dmux
RequestTable request_table
internal state *******
RouteCache* route_cache
Time route_error_data_time
time err data was filled in
bool route_error_held
are we holding a rt err to propagate?
int route_request_num
number for our next route_request
RtRepHoldoff rtrep_holdoff[RTREP_HOLDOFF_SIZE]
not used 1/27/98
SendBufEntry send_buf[SEND_BUF_SIZE]
SendBufferTimer send_buf_timer
friend class SendBufferTimer

Private Methods

void acceptRouteReply(SRPacket &p)
try to obtain a route for packet pkt is freed or handed off as needed, unless in_buffer == true in which case they are not touched
int diff_subnet(ID dest, ID myid)
void dropSendBuff(SRPacket &p)
friend int FilterFailure(Packet *p, void *data)
void getRouteForPacket(SRPacket &p, ID dest, bool retry)
turn p into a route request and launch it, max_prop of request is set as specified p.pkt is freed or handed off
void handleForwarding(SRPacket& p)
void handlePacketReceipt(SRPacket& p)
obtain a source route to p's destination and send it off
void handlePktWithoutSR(SRPacket& p, bool retry)
all handle<blah> functions either free or hand off the p
void handleRouteRequest(SRPacket &p)
void handleRteRequestForOutsideDomain(SRPacket& p)
virtual void handPktToDmux(SRPacket& p)
bool ignoreRouteRequestp(SRPacket& p)
void processBrokenRouteError(SRPacket& p)
see if can reply to this route request from our cache if so, do it and return true, otherwise, return false - frees or hands off p
bool replyFromRouteCache(SRPacket &p)
take the route in p, add us to the end of it and return the route to the sender of p doesn't free p.pkt
void returnSrcRouteToRequestor(SRPacket &p)
enter the packet's source route into our cache - see if any packets are waiting to be sent out with this source route - doesn't free the p
void returnSrcRteForOutsideDomainToRequestor(SRPacket &p)
process route reqs for destination outside domain, incase Iam a base-stn
friend void RouteReplyHoldoffCallback(Node *node, Time time, EventData *data)
void scheduleRouteReply(Time t, Packet *new_p)
void sendBufferCheck()
void sendOutPacketWithRoute(SRPacket& p, bool fresh, Time delay = 0.0)
assumes p is a route_request: answers true if it should be ignored. does not update the request table (you have to do that yourself if you want this packet ignored in the future)
void sendOutRtReq(SRPacket &p, int max_prop = MAX_SR_LEN)
take packet and send it out packet must a have a route in it fresh determines whether route is reset first time at which packet is sent is scheduled delay secs in the future pkt.p is freed or handed off
void sendRouteShortening(SRPacket &p, int heard_at, int xmit_at)
void snoopForRouteReplies(Time t, Packet *p)
schedule a time to send new_p if we haven't heard a better answer in the mean time. Do not modify new_p after calling this
void stickPacketInSendBuffer(SRPacket& p)
log p as being dropped by the sendbuffer in DSR agent
void testinit()
void trace(char* fmt, ...)
void undeliverablePkt(Packet *p, int mine)
mark our route cache reflect the failure of the link between srh[cur_addr] and srh[next_addr], and then create a route err message to send to the orginator of the pkt (srh[0]) p
void xmitFailed(Packet *pkt)
take the error packet and proccess our part of it. if needed, send the remainder of the errors to the next person doesn't free p.pkt
friend void XmitFailureCallback(Packet *pkt, void *data)

Inherited from Tap:


Inherited from Agent:

Public Fields

Agent instvar agent_port_
Agent instvar dst_addr_
Agent instvar dst_port_
Agent instvar namTrace_
Agent instvar tg_

Public Methods

inline nsaddr_t& addr()
Agent instproc attach-app {s_type}
Agent instproc attach-source {s_type}
Agent instproc attach-tbf { tbf }
Agent instproc attach-trace { file }
virtual void attachApp(Application* app)
virtual void close()
Agent instproc connect d
virtual void connect(nsaddr_t dst)
inline nsaddr_t& daddr()
inline nsaddr_t& dport()
Agent instproc dst-port {}
Agent instproc init args
virtual void listen()
inline nsaddr_t& port()
Agent instproc port {}
void send(Packet* p, Handler* h)
virtual void send(int nbytes)
virtual void send(int sz, AppData *data)
virtual void sendmsg(int sz, AppData*, const char* flags = 0)
virtual void sendmsg(int nbytes, const char *flags = 0)
virtual void sendto(int sz, AppData*, const char* flags = 0)
virtual void sendto(int nbytes, const char* flags, nsaddr_t dst)
Agent instproc set args
void set_pkttype(packet_t pkttype)
virtual int& size()
virtual void timeout(int tno)
Agent instproc traffic-source agent

Protected Fields

Application* app_
Tcl_Channel channel_
int class_
int defttl_
ns_addr_t dst_
int fid_
int flags_
ns_addr_t here_
OldValue* oldValueList_
int prio_
int seqno_
int size_
char* traceName_
packet_t type_
static int uidcnt_

Protected Methods

void addAgentTrace(const char *name)
Packet* allocpkt(int)
Packet* allocpkt()
virtual int delay_bind_dispatch(const char *varName, const char *localName, TclObject *tracer)
virtual void delay_bind_init_all()
void deleteAgentTrace()
void dumpTracedVars()
virtual void idle()
void initpkt(Packet*)
void insertOldValue(TracedVar *v, const char *value)
OldValue* lookupOldValue(TracedVar *v)
void monitorAgentTrace()
virtual void recvBytes(int bytes)

Private Methods

void flushAVar(TracedVar *v)

Inherited from Connector:

Public Methods

virtual void drop(Packet* p)
inline NsObject* target()

Protected Fields

NsObject* drop_
NsObject* target_

Protected Methods

virtual void drop(Packet* p, const char *s)

Inherited from NsObject:

Public Methods

virtual void debug(const char *fmt, ...)
int isdebug()

Protected Fields

int debug_
int off_cmn_
int off_flags_

Protected Methods

void handle(Event*)
virtual void reset()

Inherited from Handler:


Documentation

virtual int command(int argc, const char*const* argv)

virtual void recv(Packet*, Handler* callback = 0)

void tap(const Packet *p)

void Terminate(void)

void sendOutBCastPkt(Packet *p)

DSRAgent()

~DSRAgent()

Trace* logtarget

int off_mac_

int off_ll_

int off_ip_

int off_sr_

ID net_id
will eventually need to handle multiple infs, but this is okay for now 1/28/98 -dam our IP addr and MAC addr

NsObject* ll
our link layer output

PriQueue* ifq
output interface queue

MobileNode* node_
extensions for wired cum wireless sim mode

int diff_subnet(ID dest, ID myid)

NsObject* port_dmux_
extensions for mobileIP my port dmux

RequestTable request_table
internal state *******

RouteCache* route_cache

SendBufEntry send_buf[SEND_BUF_SIZE]

SendBufferTimer send_buf_timer

int route_request_num
number for our next route_request

int num_heldoff_rt_replies

RtRepHoldoff rtrep_holdoff[RTREP_HOLDOFF_SIZE]
not used 1/27/98

GratReplyHoldDown grat_hold[RTREP_HOLDOFF_SIZE]

int grat_hold_victim

bool route_error_held
are we holding a rt err to propagate?

ID err_from
data from the last route err sent to us

Time route_error_data_time
time err data was filled in

void handlePktWithoutSR(SRPacket& p, bool retry)
all handle<blah> functions either free or hand off the p.pkt handed to them

void handlePacketReceipt(SRPacket& p)
obtain a source route to p's destination and send it off

void handleForwarding(SRPacket& p)

void handleRouteRequest(SRPacket &p)

void handleRteRequestForOutsideDomain(SRPacket& p)

void returnSrcRteForOutsideDomainToRequestor(SRPacket &p)
process route reqs for destination outside domain, incase Iam a base-stn

bool ignoreRouteRequestp(SRPacket& p)

void sendOutPacketWithRoute(SRPacket& p, bool fresh, Time delay = 0.0)
assumes p is a route_request: answers true if it should be ignored. does not update the request table (you have to do that yourself if you want this packet ignored in the future)

void sendOutRtReq(SRPacket &p, int max_prop = MAX_SR_LEN)
take packet and send it out packet must a have a route in it fresh determines whether route is reset first time at which packet is sent is scheduled delay secs in the future pkt.p is freed or handed off

void getRouteForPacket(SRPacket &p, ID dest, bool retry)
turn p into a route request and launch it, max_prop of request is set as specified p.pkt is freed or handed off

void acceptRouteReply(SRPacket &p)
try to obtain a route for packet pkt is freed or handed off as needed, unless in_buffer == true in which case they are not touched

void returnSrcRouteToRequestor(SRPacket &p)
enter the packet's source route into our cache - see if any packets are waiting to be sent out with this source route - doesn't free the p.pkt

bool replyFromRouteCache(SRPacket &p)
take the route in p, add us to the end of it and return the route to the sender of p doesn't free p.pkt

void processBrokenRouteError(SRPacket& p)
see if can reply to this route request from our cache if so, do it and return true, otherwise, return false - frees or hands off p.pkt i ff returns true

void xmitFailed(Packet *pkt)
take the error packet and proccess our part of it. if needed, send the remainder of the errors to the next person doesn't free p.pkt

void undeliverablePkt(Packet *p, int mine)
mark our route cache reflect the failure of the link between srh[cur_addr] and srh[next_addr], and then create a route err message to send to the orginator of the pkt (srh[0]) p.pkt freed or handed off

void dropSendBuff(SRPacket &p)

void stickPacketInSendBuffer(SRPacket& p)
log p as being dropped by the sendbuffer in DSR agent

void sendBufferCheck()

void sendRouteShortening(SRPacket &p, int heard_at, int xmit_at)

void testinit()

void trace(char* fmt, ...)

virtual void handPktToDmux(SRPacket& p)

friend void XmitFailureCallback(Packet *pkt, void *data)

friend int FilterFailure(Packet *p, void *data)

friend class SendBufferTimer

void scheduleRouteReply(Time t, Packet *new_p)

void snoopForRouteReplies(Time t, Packet *p)
schedule a time to send new_p if we haven't heard a better answer in the mean time. Do not modify new_p after calling this

friend void RouteReplyHoldoffCallback(Node *node, Time time, EventData *data)

LIST_ENTRY(DSRAgent)

static DSRAgent_List agthead


Direct child classes:
BS_DSRAgent

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

Adapted for the NS documentation page

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de