📄 hdr-802_16.h
字号:
contention data and request */};/*************************************************************************This structure contains all the configurable parameters of the BS node*************************************************************************//*! This structure contains all the configurable parameters of the BS node */struct bs_conf_param { struct mgmt_conf_param mgtparam; struct map_conf_param mapparam; };/*************************************************************************Simulation output statistics variable*************************************************************************//*! Simulation output statistics variable */struct bs_statistics { double avg_interdpr_map; /* Avg interdeparture between MAPs*/ u_int32_t avg_datagrants; /* per MAP*/ u_int32_t num_req; /* Number of requests for bandwidth per sec*/ u_int32_t avg_contentionslots; /* Per map*/ u_int32_t data_sent; /* bytes sent per sec*/ u_int32_t fragmented_count; /* Number of fragmented frames received*/ u_int32_t concatenation_count; /* Number of concatenated frames received*/ u_char num_IE; /* per MAP */ u_int32_t num_creq; /* Num of contention request received */ u_int32_t num_piggyreq; /* Num of piggy request received */ u_int32_t num_creqgrant; /* Num of contention request granted*/ u_int32_t num_creqdenied; /* Num of contention request denied*/ u_int32_t total_num_cslots; /* Total number of contention slots that were assigned over the simulation */ u_int32_t total_num_mgmtslots; /* Total number of management slots that were assigned over the simualtion */ };/*************************************************************************Scheduling algorithm data structures*************************************************************************//*! Scheduling algorithm data structures */typedef struct job* jptr;struct job { double release_time; /* The time after which the job can be processed*/ double period; /* For periodic jobs*/ double deadline; /* Request should be satisfied by this time */ u_int32_t mini_slots; /* Number of minislots requested */ jptr next; /* Next job in the queue */ u_int16_t flow_id; /* Flow id of requesting SS */ SchedType sclass; /* UGS or RT-VBR or BEST-EFFORT */ u_char type; /* Type of request, DATA or Unicast req slots */ u_char flag; /* To delete or not..*/ u_char retry_count; double ugsjitter; /* The jitter in the grant, valid only for UGS flows */ //$A3 int jitterSamples; double last_jittercaltime; /* Last time avg jitter was calculated */};/**************************************************************************************************************************************************/typedef struct map_list * mapptr;struct map_list { double alloc_stime; /* When can the allocation be started in MAP*/ double alloc_etime; /* When can the allocation be ended in MAP*/ double release_time; /* The time after which the job can be processed*/ double deadline; /* Request should be satisfied by this time */ u_int32_t nslots; mapptr next; u_int16_t flow_id; u_int16_t flag; /* To indicate whether this is hole or not This is the IUC*/};/*************************************************************************List of token timer requests *************************************************************************///#ifdef RATE_CONTROL //-------------------------------------------------/*! List of token timer requests */typedef struct token_timer_list* tkptr;struct token_timer_list { double expiration_time; /*stime + rtime */ tkptr next; int cindex; /* ssindex of the DownFlowTable for which Token timer has been set */ int findex; /* flindex of the DownFlowTable for which Token timer has been set */};/*************************************************************************Packet queue structure *************************************************************************//*! Packet queue structure */typedef struct bsqnode * qlist;struct bsqnode { Packet *pkt; double enq_time; /* Time at which this pkt was enqued */ int cindex; int findex; qlist next;};//#endif //--------------------------------------------------------------/************************************************************************* $A6*************************************************************************/typedef struct bs_snd_timer_list* bs_sptr;struct bs_snd_timer_list { double expiration_time; /* stime + rtime */ bs_sptr next; int cindex; /* index of the SSRecord for which SEND timer has been set */ int findex; /*flow index of the SSRecord[tindex].d_rec*/};/************************************************************************* $A8 - auxiliar struct to compute the priority of the rtPS and nrtPS in the intermediate queue*************************************************************************//*! $A8 - auxiliar struct to compute the priority of the rtPS and nrtPS in the intermediate queue */typedef struct active_flows* acflows_ptr;struct active_flows{ acflows_ptr next; /*Next flow */ u_int16_t flow_id; /*Flow id of requesting SS */ u_int16_t backlogged_tmp; /*number of slots backlogged for this flow*/ int16_t granted_bw_tmp; /*number of slots granted for this flow during a time window T*/};/************************************************************************* $A8 - auxiliar struct to compute the priority of the rtPS and nrtPS in the intermediate queue*************************************************************************//*! $A8 - auxiliar struct to compute the priority of the rtPS and nrtPS in the intermediate queue */struct priority_array{ int priority; jptr job_pointer;};typedef struct priority_array* priority_array_p;/*=======================END BS data structures=========================*//*=======================SS data structures=========================*//**************************************************************************************************************************************************/typedef struct snd_timer_list* sptr;struct snd_timer_list { double expiration_time; /* stime + rtime */ sptr next; u_char tindex; /* index of the UpFlowTable for which SEND timer has been set */};/**************************************************************************************************************************************************/typedef struct req_timer_list* rptr;struct req_timer_list { double expiration_time; /* stime + rtime */ rptr next; u_char rindex; /* index of the UpFlowTable for which REQ timer has been set */};/**************************************************************************************************************************************************/struct upstream_sflow { struct upstream_flow_record upstream_record; struct allocation_time* alloc_list; //PacketQueue *q_; plist packet_list; u_int16_t max_qsize; /* variable indicates the maximum queue size */ Packet* pkt; Packet* frag_pkt; char debug; /* To debug the flow */ double map_acktime; double req_time; /* Time when a request for bandwidth has been sent */ double avg_queuing_delay; /* Avg queuing delay per packet for this service flow*/ u_int32_t queuing_samples; /* Num of samples used to compute the avg queuing delay */ double avg_req_stime; /* Avg time for a request to be serviced*/ double enque_time; /* Time at which the packet being sent now was enqued, used to compute access delay */ u_int32_t num_delay_samples; /* Num of delay samples, used to compute the avg access delay */ u_int32_t curr_gsize; /* This denotes how much data(in bytes) could be sent when the SEND timer expires */ u_int32_t num_pkt_snt; /* Number of packets for which request for banwidth has to be sent */ u_int32_t drop_count; u_int32_t seq_num; u_int32_t frag_data; double last_mfrtime; u_int32_t avg_pkts; /* Avg number of frames sent per sec */ u_int32_t avg_bytes; /* Avg number of bytes/s */ u_int32_t num_bytes; u_int32_t num_pkts; /* STATISTICS */ u_int32_t SID_num_sent_bytes; u_int32_t SID_num_sent_pkts; u_int32_t avg_slotspermap; /* Avg number of slots per map */ //$A0 : to support ACK filtering.... u_int32_t totalACKs; /* Total num of TCP acks that arrived to be sent */ u_int32_t totalACKsFiltered; /* Total num of TCP acks that were filtered/removed */ u_int32_t total_piggyreq; /* Total num of piggy req sent */ u_int32_t total_creq; /* Total num of contention req sent */ u_int32_t total_fcoll; /* Total num of first collisions */ u_int32_t avg_fcont; /* avg num of slots skipped during first contention back-off */ u_int32_t fcont_count; /* Number of first contentions done */ u_int32_t total_collision_drops; /* Total number of packets droppeddue to transmission attempt exceeding 16 */ u_int32_t total_queue_drops; /* Total number of packets dropped due to service-flow queue overflow */ int bs_addr; u_int16_t max_concat_threshhold; u_char state; /* The current state for this service flow */ u_int32_t bk_offwin; /* Current bk-off window */ u_int32_t bk_offcounter; u_int32_t bk_offend; u_int32_t bk_offstart; u_char num_retries; u_char max_retries; u_char contention_on; /* (For best-effort flows only), Indicates whether a req has been sent in contention-slots */ u_char pending; /* Denotes whether any data grant is pending for this flow */ Event intr; Event rintr; double ugsjitter; /* The jitter in the grant, valid only for UGS flows */ //$A3 int jitterSamples; double last_granttime; /* Last grant observed at this time (to make sure that we do not use the same data grant again in the calculation) */ double nominal_alloctime; /* Grant shud have ben allocated at this time */ double last_jittercaltime; /* Last time avg jitter was calculated *///$A0//#ifdef US_RATE_CONTROL double acceptance_rate; double prev_acceptance_rate; float wt_factor; u_int32_t num_slots_req; double tokens_; double rate_; int bucket_; double lastupdatetime_; int init_; char ratecontrol; /* To indicate whether rate-control is ON or not *///#endif //$A8 int totalPacketsInConcatFrames; int totalConcatFrames; //$A9 int not_requested_pkts; /*To indicate for how many bytes BW was not requested yet*/ //$A10 u_int16_t aggreqinterval; /*aggregate bw request interval (in number of reqs)*/ u_int16_t req_counter; /*request counter used to define when to send aggregate requests*/ };/*************************************************************************To store the Upstream flow information so that it could be sent to BS during the Registration Phase*************************************************************************//*! To store the Upstream flow information so that it could be sent to BS during the Registration Phase */struct downstream_sflow { struct downstream_flow_record downstream_record;};/*=======================END SS data structures=========================*//*======================END DATA STRUCTURES DECLARATIONS==================*/#endif /* end __hdr_mac802_16_h */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -