00001 /* -*- Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */ 00002 /* 00003 * Copyright (c) Xerox Corporation 1997. All rights reserved. 00004 * 00005 * License is granted to copy, to use, and to make and to use derivative 00006 * works for research and evaluation purposes, provided that Xerox is 00007 * acknowledged in all documentation pertaining to any such copy or 00008 * derivative work. Xerox grants no other licenses expressed or 00009 * implied. The Xerox trade name should not be used in any advertising 00010 * without its written permission. 00011 * 00012 * XEROX CORPORATION MAKES NO REPRESENTATIONS CONCERNING EITHER THE 00013 * MERCHANTABILITY OF THIS SOFTWARE OR THE SUITABILITY OF THIS SOFTWARE 00014 * FOR ANY PARTICULAR PURPOSE. The software is provided "as is" without 00015 * express or implied warranty of any kind. 00016 * 00017 * These notices must be retained in any copies of any part of this 00018 * software. 00019 */ 00020 00021 #ifndef ns_signalmod_h 00022 #define ns_signalmod_h 00023 00024 //no of pending flows decisions 00025 #define NFLOWS 500 00026 00027 struct pending { 00028 int flowid; 00029 int status; 00030 }; 00031 00032 class SALink : public Connector { 00033 public: 00034 SALink(); 00035 int command(int argc, const char*const* argv); 00036 void trace(TracedVar* v); 00037 00038 protected: 00039 void recv(Packet *,Handler *); 00040 ADC *adc_; 00041 int RTT; 00042 pending pending_[NFLOWS]; 00043 int lookup(int); 00044 int get_nxt(); 00045 TracedInt numfl_; 00046 Tcl_Channel tchan_; 00047 int onumfl_; /* XXX: store previous value of numfl_ for nam */ 00048 int src_; /* id of node we're connected to (for nam traces) */ 00049 int dst_; /* id of node at end of the link */ 00050 int last_; /* previous ac decision on this link */ 00051 }; 00052 00053 00054 #endif
1.3.3