⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mac802_16pkt.h~

📁 This documentation is based on the following versions:- pre-release of the wimax model developed by
💻 H~
📖 第 1 页 / 共 2 页
字号:
/** Code BS using index in scan response */struct mac802_16_mob_scn_rsp_bs_index {  u_char neighbor_bs_index;  u_char scanning_type: 3; //0: scanning without association                           //1: scanning+assoc level 0                           //2: scanning+assoc level 1                           //3: scanning+assoc level 2                           //4-7: reserved  /* next present if scanning is 2 or 3*/  u_char rdv_time;  u_char cdma_code;  u_char transmission_opp_offset;};/** Code BS using full address in scan response */struct mac802_16_mob_scn_rsp_bs_full {  int recommended_bs_id;   /* 6 bytes */  u_char scanning_type: 3; //0: scanning without association                           //1: scanning+assoc level 0                           //2: scanning+assoc level 1                           //3: scanning+assoc level 2                           //4-7: reserved  /* next present if scanning is 2 or 3*/  u_char rdv_time;  u_char cdma_code;  u_char transmission_opp_offset;};/** Scan response frame */struct mac802_16_mob_scn_rsp_frame {  u_char type; //55  u_char scan_duration; //units of frames  u_char report_mode: 2;  u_char report_period;  u_char report_metric;  /*next information present only if scan duration !=0*/  u_char start_frame: 4;  u_char interleaving_interval;  u_char scan_iteration;  u_char n_recommended_bs_index;  //next if n_recommended_bs_index !=0  u_char ccc_mob_nbr_adv;  mac802_16_mob_scn_rsp_bs_index rec_bs_index[MAX_NBR];  u_char n_recommended_bs_full;  mac802_16_mob_scn_rsp_bs_full rec_bs_full[MAX_NBR];  /* end if scan duration !=0 */  /* TLV information */};/** Measurements about current BS */struct mac802_16_mob_scn_rep_current_bs {  u_char temp_bsid: 4;  u_char bs_cinr_mean; //if report_metric[0]==1  u_char bs_rssi_mean; //if report_metric[1]==1  u_char relative_delay; //if report_metric[2]==1  u_char bs_rtd; //if report_metric[3]==1};/** Measurements about neighbor BS using index */struct mac802_16_mob_scn_rep_bs_index {  u_char neighbor_bs_index;  u_char bs_cinr_mean; //if report_metric[0]==1  u_char bs_rssi_mean; //if report_metric[1]==1  u_char relative_delay; //if report_metric[2]==1};/** Measurements about neighbor BS using full address */struct mac802_16_mob_scn_rep_bs_full {  int neighbor_bs_id; /* 6 bytes */  u_char bs_cinr_mean; //if report_metric[0]==1  u_char bs_rssi_mean; //if report_metric[1]==1  u_char relative_delay; //if report_metric[2]==1};/** Scan report frame */struct mac802_16_mob_scn_rep_frame {  u_char type; //60  u_char report_mode: 1;  u_char comp_nbr_bsid_ind: 1;  u_char n_current_bs: 3;  u_char report_metric: 8;  mac802_16_mob_scn_res_current_bs current_bs[MAX_NBR];  u_char n_neighbor_bs_index;  //next if n_recommended_bs_index !=0  u_char ccc_mob_nbr_adv;  mac802_16_mob_scn_rep_bs_index nbr_bs_index[MAX_NBR];  u_char n_recommended_bs_full;  mac802_16_mob_scn_rep_bs_full nbr_bs_full[MAX_NBR];  /* other TLV information */};/** Code BS using index in association result report */struct mac802_16_mob_asc_rep_bs_index {  u_char neighbor_bs_index;  uint32_t timing_adjust;  u_char power_level_adjust;  uint32_t offset_freq_adjust;  u_char rng_status;  u_char service_level_prediction;};/** Code BS using address in association result report */struct mac802_16_mob_asc_rep_bs_full {  int neighbor_bs_id; /* 6 bytes */  uint32_t timing_adjust;  u_char power_level_adjust;  uint32_t offset_freq_adjust;  u_char rng_status;  u_char service_level_prediction;};/** Association result report frame */struct mac802_16_mob_asc_rep_frame {  u_char type; //66  u_char n_recommended_bs_index;  //next if n_recommended_bs_index !=0  u_char ccc_mob_nbr_adv;  mac802_16_mob_asc_rep_bs_index rec_bs_index[MAX_NBR];  u_char n_recommended_bs_full;  mac802_16_mob_asc_rep_bs_full rec_bs_full[MAX_NBR];}; /** Code request in mode 000 (HO request) */struct mac802_16_mob_bsho_req_mode_000 {  int neighbor_bsid; /* 6 bytes */  u_char service_level_prediction;  u_char preamble_index;  u_char ho_process_optimization;  u_char net_assisted_ho_supported: 1;  u_char ho_id_included_indicator: 1;  u_char ho_autho_policy_indicator: 1;  //if ho_id_included_indicator==1  u_char ho_id;  //if ho_autho_policy_indicator==1  u_char ho_autho_policy_support;};/** Structure for BSHO request */struct mac802_16_mob_bsho_req_mode_new_bs {  int neighbor_bsid; /* 6 bytes */  u_char temp_bsid: 3; };/** Structure for BSHO request */struct mac802_16_mob_bsho_req_mode_new_bs2 {  int neighbor_bsid; /* 6 bytes */  u_char temp_bsid: 3;  uint16_t new_cid[MAX_NBR];  uint16_t new_said[MAX_NBR]; };/** Structure for BSHO request */struct mac802_16_mob_bsho_req_mode_new_bs3 {  int neighbor_bsid; /* 6 bytes */  u_char temp_bsid: 3;  uint16_t new_cid[MAX_NBR];  uint16_t new_said[MAX_NBR];  int cqich_id; //variable   u_char feedback_channel_off: 6;  u_char period: 2;  u_char frame_offset: 3;  u_char duration: 3;  u_char mimo_permutation_feedback: 2; };/** Structure for BSHO request */struct mac802_16_mob_bsho_req_mode_current_bs {  u_char temp_bsid: 3;};/** BSHO request frame */struct mac802_16_mob_bsho_req_frame {  u_char type; //56  u_char net_assisted_ho_supported: 1;  u_char mode: 3;  //if mode == 0b000  u_char ho_op_mode: 1;  u_char n_recommended;  u_char resource_retain_flag: 1;  mac802_16_mob_bsho_req_mode_000 n_rec[];  //if mode == 0b001  u_char tmp_bsid: 3;  u_char ak_change_indicator: 1;  u_char n_cids;  uint16_t cids[MAX_NBR];  u_char n_saids;  uint16_t saids[MAX_NBR];    //if mode == 0b010: attribute defined in mode 0b001  //u_char tmp_bsid: 3;  //u_char ak_change_indicator: 1;    //if mode == 0b011  u_char n_new_bs: 3;  mac802_16_mob_bsho_req_mode_new_bs new_bs[MAX_NBR];  u_char n_current_bs: 3;  mac802_16_mob_bsho_req_mode_current_bs current_bs[MAX_NBR];  //also include the following elements defined in mode 0b001  //u_char tmp_bsid: 3;  //u_char ak_change_indicator: 1;  //u_char n_cids;  //uint16_t cids[MAX_NBR];  //u_char n_saids;  //uint16_t saids[MAX_NBR];    //if mode == 0b100, include the following attributes (already defined)  //u_char n_new_bs: 3;  //mac802_16_mob_bsho_req_mode_new_bs new_bs[MAX_NBR];  //u_char n_current_bs: 3;  //mac802_16_mob_bsho_req_mode_current_bs current_bs[MAX_NBR];  //u_char tmp_bsid: 3;  //u_char ak_change_indicator: 1;    //if mode == 0b101  //u_char n_new_bs: 3;  //u_char n_cids;  //u_char n_saids;  mac802_16_mob_bsho_req_mode_new_bs2 new_bs2[MAX_NBR];  //u_char n_current_bs: 3;  //mac802_16_mob_bsho_req_mode_current_bs current_bs[];  //u_char tmp_bsid: 3;  //u_char ak_change_indicator: 1;    //if mode == 0b110  //u_char n_new_bs: 3;  //u_char n_cids;  //u_char n_saids;  mac802_16_mob_bsho_req_mode_new_bs3 new_bs3[MAX_NBR];  //u_char n_current_bs: 3;  //mac802_16_mob_bsho_req_mode_current_bs current_bs[];  //u_char tmp_bsid: 3;  //u_char ak_change_indicator: 1;  u_char action_time: 7;  /* TLV information */};/** Structure for MSHO request */struct mac802_16_mob_msho_req_bs_index {  u_char neighbor_bs_index;  u_char preamble_index;  u_char bs_cinr_mean; //if report_metric[0]==1  u_char bs_rssi_mean; //if report_metric[1]==1  u_char relative_delay; //if report_metric[2]==1  u_char service_level_prediction: 3;  u_char arrival_time_diff_ind: 1;  //next if arrival_time_diff_ind==1  u_char arrival_time_diff: 4;};/** Structure for MSHO request */struct mac802_16_mob_msho_req_current_bs {  u_char temp_bsid: 4;  u_char bs_cinr_mean; //if report_metric[0]==1  u_char bs_rssi_mean; //if report_metric[1]==1  u_char relative_delay; //if report_metric[2]==1  u_char bs_rtd; //if report_metric[3]==1};/** MSHO request frame */struct mac802_16_mob_msho_req_frame {  u_char type; //57  u_char report_metric;  u_char n_new_bs_index;  //next if n_recommended_bs_index !=0  u_char ccc_mob_nbr_adv;  mac802_16_mob_msho_req_bs_index bs_index[MAX_NBR];  //end   u_char n_new_bs_full;  mac802_16_mob_msho_req_bs_index bs_full[MAX_NBR];  u_char n_current_bs;  mac802_16_mob_msho_req_current_bs bs_current[MAX_NBR];  /* other TLV information */};/** Structure for BSHO response */struct mac802_16_mob_bsho_rsp_rec {  int neighbor_bsid; /* 6 bytes */  u_char preamble_index;  u_char service_level_prediction;  u_char ho_process_optimization;  u_char net_assisted_ho_supported: 1;  u_char ho_id_included_indicator: 1;  //if ho_id_included_indicator==1  u_char ho_id;  //end if  u_char ho_autho_policy_indicator: 1;  //if ho_autho_policy_indicator==1  u_char ho_autho_policy_support;  //end if  };/** Structure for BSHO response */struct mac802_16_mob_bsho_rsp_mode_new_bs2 {  int neighbor_bsid; /* 6 bytes */  u_char temp_bsid: 3;  uint16_t new_cid[];};/** BSHO response frame */struct mac802_16_mob_bsho_rsp_frame {  u_char type; //58  u_char mode: 3;    //if mode == 0b000  u_char ho_operation_mode: 1;  u_char n_recommended;  u_char resource_retain_flag: 1;  mac802_16_mob_bsho_rsp_rec n_rec[MAX_NBR];  //if mode == 0b001  u_char tmp_bsid: 3;  u_char ak_change_indicator: 1;  u_char n_cids;  uint16_t cids[MAX_NBR];  u_char n_saids;  uint16_t saids[MAX_NBR];  //if mode == 0b010  //u_char tmp_bsid: 3;  //u_char ak_change_indicator: 1;  //if mode == 0b011  u_char n_new_bs: 3;  mac802_16_mob_bsho_req_mode_new_bs new_bs[MAX_NBR];  u_char n_current_bs: 3;  mac802_16_mob_bsho_req_mode_current_bs current_bs[MAX_NBR];  //also include the following elements defined in mode 0b001  //u_char tmp_bsid: 3;  //u_char ak_change_indicator: 1;  //u_char n_cids;  //uint16_t cids[MAX_NBR];  //u_char n_saids;  //uint16_t saids[MAX_NBR];  //if mode == 0b100  //u_char n_new_bs: 3;  //mac802_16_mob_bsho_req_mode_new_bs new_bs[MAX_NBR]; //same struct as req  //u_char n_current_bs: 3;  //mac802_16_mob_bsho_req_mode_current_bs current_bs[MAX_NBR]; //same as req  //u_char tmp_bsid: 3;  //u_char ak_change_indicator: 1;  //if mode == 0b101  //u_char n_new_bs: 3;  //u_char n_cids;  mac802_16_mob_bsho_rsp_mode_new_bs2 new_bs2[MAX_NBR];  //u_char n_current_bs: 3;  //mac802_16_mob_bsho_req_mode_current_bs current_bs[MAX_NBR];  //u_char tmp_bsid: 3;  //u_char ak_change_indicator: 1;    //if mode == 0b110  //u_char n_new_bs: 3;  //u_char n_cids;  //u_char n_saids;  mac802_16_mob_bsho_req_mode_new_bs3 new_bs3[MAX_NBR]; //same as request  //u_char n_current_bs: 3;  //mac802_16_mob_bsho_req_mode_current_bs current_bs[MAX_NBR];  //u_char tmp_bsid: 3;  //u_char ak_change_indicator: 1;  u_char action_time: 7;  /* TLV information */};/** Structure for Handover indication */struct mac802_16_mob_ho_ind_bs {  u_char temp_bsid: 3;};/** HO indication frame */struct mac802_16_mob_ho_ind_frame {  u_char type; //59  u_char mode: 2;  //if mode==0b00  u_char ho_ind_type: 2;  u_char rng_param_valid_ind: 2;  //next valid if ho_ind_type==0b00  int target_bsid; /* 6 bytes */    //if mode==0b01  u_char mdhofbss_ind_type: 2;  //next valid if mdhofbss_ind_type==0b00  u_char bsid: 3;  u_char action_time;  //end valid if mdhofbss_ind_type==0b00  //if mode==0b10  //u_char mdhofbss_ind_type: 2;  //next valid if mdhofbss_ind_type==0b00  u_char diversity_set_included;  //next valid if diversity_set_included==1  u_char anchor_bsid: 3;  u_char n_bs;  mac802_16_mob_ho_ind_bs bs[MAX_NBR];  //end valid if diversity_set_included==1  //u_char action_time;  //end valid if mdhofbss_ind_type==0b00  u_char preamble_index;    /* TLV information */};/** This class contains helpers for manipulating 802.16 messages *  and getting the packet size  */class Mac802_16pkt { public:  /**   * Return the size of the MOB_NBR-ADV frame   * @param frame The frame    */  static int getMOB_NBR_ADV_size(mac802_16_mob_nbr_adv_frame *frame);  /**   * Return the size of the MOB_SCN-REQ    * @param frame The frame    */  static int getMOB_SCN_REQ_size(mac802_16_mob_scn_req_frame *frame);  /**   * Return the size of the MOB_SCN-RSP    * @param frame The frame    */  static int getMOB_SCN_RSP_size(mac802_16_mob_scn_rsp_frame *frame);  /**   * Return the size of the MOB_MSHO-REQ    * @param frame The frame    */  static int getMOB_MSHO_REQ_size(mac802_16_mob_msho_req_frame *frame);  /**   * Return the size of the MOB_BSHO-RSP    * @param frame The frame    */  static int getMOB_BSHO_RSP_size(mac802_16_mob_bsho_rsp_frame *frame);  /**   * Return the size of the MOB_HO-IND    * @param frame The frame    */  static int getMOB_HO_IND_size(mac802_16_mob_ho_ind_frame *frame);};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -