📄 tlv.h
字号:
/* * sbc req/rsp */#define PACK_SBC_1(buf, v) do {PACK_TLV_U8((buf), 1, (v));} while (0) /* bandwidth allocation support */#define PACK_SBC_2(buf, v) do {PACK_TLV_U16((buf), 2, (v));} while (0) /* subscribe transition gaps */#define PACK_SBC_3(buf, v) do {PACK_TLV_U32((buf), 3, (v));} while (0) /* maximum transmit power */#define PACK_SBC_4(buf, v) do {PACK_TLV_U8((buf), 4, (v));} while (0) /* Capabilities for construction and transmission of MAC PDUs */#define PACK_SBC_15(buf, v) do {PACK_TLV_U8((buf), 15, (v));} while (0) /* pkm flow control */#define PACK_SBC_16(buf, v) do {PACK_TLV_U8((buf), 16, (v));} while (0) /* authorization policy support */#define PACK_SBC_17(buf, v) do {PACK_TLV_U8((buf), 17, (v));} while (0) /* maximum number of supported security associations */#define PACK_SBC_25(buf, p1, p2, p3, p4)\ do {\ UINT8* l;\ PACK_UINT8((buf), 25);\ l = buf;\ if (p1) PACK_TLV_U8((buf), 1, *(p1));\ if (p2) PACK_TLV_U8((buf), 2, *(p2));\ if (p3) PACK_TLV_U8((buf), 1, *(p1));\ if (p4) PACK_TLV_U16((buf), 2, *(p2));\ *l = (buf) - (l + 1);\ } while (0) /* security negotiation parameters */#define PACK_SBC_26(buf, v) do {PACK_TLV_U8((buf), 26, (v));} while (0) /* power save class types capability */#define PACK_SBC_27(buf, v) do {PACK_TLV_U8((buf), 27, (v));} while (0) /* extension capability */#define PACK_SBC_28(buf, v) do {PACK_TLV_U8((buf), 28, (v));} while (0) /* HO trigger metric support */#define PACK_SBC_147(buf, v) do {PACK_TLV_U8((buf), 147, (v));} while (0) /* current transmit power */#define PACK_SBC_150(buf, v) do {PACK_TLV_U8((buf), 150, (v));} while (0) /* ofdma ms fft sizes */#define PACK_SBC_151(buf, v) do {\ if (v & 0xff00) PACK_TLV_U16((buf), 151, (v));\ else PACK_TLV_U8((buf), 151, (v));\ } while (0) /* ofdma ss demodulator */#define PACK_SBC_152(buf, v) do {PACK_TLV_U8((buf), 152, (v));} while (0) /* ofdma ss modulator */#define PACK_SBC_153(buf, v) do {PACK_TLV_U8((buf), 153, (v));} while (0) /* the number of ul h-arq channels */#define PACK_SBC_154(buf, v) do {PACK_TLV_U8((buf), 154, (v));} while (0) /* ofdma ss permutation */#define PACK_SBC_156(buf, v) do {PACK_TLV_U16((buf), 156, (v));} while (0) /* ofdma ss demodulator for MIMO support */#define PACK_SBC_157(buf, v) do {PACK_TLV_U8((buf), 157, (v));} while (0) /* ofdma ss MIMO uplink support */#define PACK_SBC_158(buf, v) do {PACK_TLV_U8((buf), 158, (v));} while (0) /* ofdma aas private map support */#define PACK_SBC_159(buf, v) do {PACK_TLV_U16((buf), 159, (v));} while (0) /* ofdma aas capabilites */#define PACK_SBC_160(buf, v) do {PACK_TLV_U8((buf), 160, (v));} while (0) /* ofdma ss CINR measurement capability */#define PACK_SBC_161(buf, v) do {PACK_TLV_U8((buf), 161, (v));} while (0) /* the number of dl h-arq channels */#define PACK_SBC_162(buf, v) do {PACK_TLV_U16((buf), 162, (v));} while (0) /* harq incremental redundancy buffer capability */#define PACK_SBC_163(buf, v) do {PACK_TLV_U16((buf), 163, (v));} while (0) /* harq chase combining and CC-IR buffer capability */#define PACK_SBC_167(buf, v) do {PACK_TLV_U8((buf), 167, (v));} while (0) /* association type support */#define PACK_SBC_170(buf, v) do {PACK_TLV_U8((buf), 170, (v));} while (0) /* ofdma map capability 1 */#define PACK_SBC_171(buf, v) do {PACK_TLV_U8((buf), 171, (v));} while (0) /* ofdma map capability 2 */#define PACK_SBC_172(buf, v) do {PACK_TLV_U8((buf), 172, (v));} while (0) /* support for extented harq ie */#define PACK_SBC_173(buf, v) do {PACK_TLV_U8((buf), 173, (v));} while (0) /* uplink control channel support */#define PACK_SBC_174(buf, v) do {PACK_TLV_U16((buf), 174, (v));} while (0) /* ofdma ms csit capability */#define PACK_SBC_175(buf, v) do {PACK_TLV_U8((buf), 175, (v));} while (0) /* maximum number of burst per frame capability in HARQ */#define PACK_SBC_176(buf, v) do {PACK_TLV_U24((buf), 176, (v));} while (0) /* the MIMO capability of ofdma ms demodulator */#define PACK_SBC_177(buf, v) do {PACK_TLV_U8((buf), 177, (v));} while (0) /* ofdma ss modulator for mimo support */#define PACK_SBC_178(buf, v) do {PACK_TLV_U8((buf), 178, (v));} while (0) /* sdma pilot capability */#define PACK_SBC_179(buf, v) do {PACK_TLV_U8((buf), 179, (v));} while (0) /* ofdma multiple downlink burst profile capability *//* * power saving class parameters */#define PACK_PWR_SAV_1(buf, v) do {PACK_TLV_U8((buf), 1, (v));} while (0) /* flags */#define PACK_PWR_SAV_2(buf, v) do {PACK_TLV_U8((buf), 2, (v));} while (0) /* power saving class id */#define PACK_PWR_SAV_3(buf, v) do {PACK_TLV_U8((buf), 3, (v));} while (0) /* power saving class type */#define PACK_PWR_SAV_4(buf, v) do {PACK_TLV_U8((buf), 4, (v));} while (0) /* start frame number */#define PACK_PWR_SAV_5(buf, v) do {PACK_TLV_U8((buf), 5, (v));} while (0) /* initial sleep window */#define PACK_PWR_SAV_6(buf, v) do {PACK_TLV_U8((buf), 6, (v));} while (0) /* listening window */#define PACK_PWR_SAV_7(buf, v) do {PACK_TLV_U8((buf), 7, (v));} while (0) /* final sleep window base */#define PACK_PWR_SAV_8(buf, v) do {PACK_TLV_U8((buf), 8, (v));} while (0) /* final sleep window exponent */#define PACK_PWR_SAV_9(buf, v) do {PACK_TLV_U8((buf), 9, (v));} while (0) /* SLPID */#define PACK_PWR_SAV_10(buf, v) do {PACK_TLV_U8((buf), 10, (v));} while (0) /* CID */#define PACK_PWR_SAV_11(buf, v) do {PACK_TLV_U8((buf), 11, (v));} while (0) /* direction */#define PACK_PWR_SAV(buf, t, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)\ do {\ UINT8* l;\ PACK_UINT8((buf), (t));\ l = buf;\ if (p1) PACK_PWR_SAV_1(buf, *p1);\ if (p2) PACK_PWR_SAV_2(buf, *p2);\ if (p3) PACK_PWR_SAV_3(buf, *p3);\ if (p4) PACK_PWR_SAV_4(buf, *p4);\ if (p5) PACK_PWR_SAV_5(buf, *p5);\ if (p6) PACK_PWR_SAV_6(buf, *p6);\ if (p7) PACK_PWR_SAV_7(buf, *p7);\ if (p8) PACK_PWR_SAV_8(buf, *p8);\ if (p9) PACK_PWR_SAV_9(buf, *p9);\ if (p10) PACK_PWR_SAV_10(buf, *p10);\ if (p11) PACK_PWR_SAV_11(buf, *p11);\ *l = (buf) - (l + 1);\ } while (0)/* * ranging request */#define PACK_RNG_REQ_1(buf, v) do {PACK_TLV_U8((buf), 1, (v));} while (0) /* requested downlink burst profile */#define PACK_RNG_REQ_2(buf, p) do {PACK_TLV_BYTES_L0((buf), 2, (p), 6);} while (0) /* ss mac address */#define PACK_RNG_REQ_3(buf, v) do {PACK_TLV_U8((buf), 3, (v));} while (0) /* ranging anomalies */#define PACK_RNG_REQ_4(buf, v) do {PACK_TLV_U8((buf), 4, (v));} while (0) /* AAS broadcast capability */#define PACK_RNG_REQ_5(buf, p) do {PACK_TLV_BYTES_L0((buf), 5, (p), 6);} while (0) /* serving bs id */#define PACK_RNG_REQ_6(buf, v) do {PACK_TLV_U8((buf), 6, (v));} while (0) /* ranging purpose indication */#define PACK_RNG_REQ_7(buf, v) do {PACK_TLV_U8((buf), 7, (v));} while (0) /* HO ID */#define PACK_RNG_REQ_8(buf, v) do {PACK_TLV_U8((buf), 8, (v));} while (0) /* power down indicator */#define PACK_RNG_REQ_9(buf, p) do {PACK_TLV_BYTES_L0((buf), 9, (p), 6);} while (0) /* paging controller id */#define PACK_RNG_REQ_10(buf, v) do {PACK_TLV_U16((buf), 10, (v));} while (0) /* mac hash skip threshold */#define PACK_RNG_REQ_11(buf, v) do {PACK_TLV_U8((buf), 11, (v));} while (0) /* enabled action triggered */#define PACK_RNG_REQ_12(buf, v) do {PACK_TLV_U8((buf), 12, (v));} while (0) /* requested downlink repetition coding level */#define PACK_RNG_REQ_21(buf, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)\ PACK_PWR_SAV((buf), 21, (p1), (p2), (p3), (p4), (p5), (p6), (p7), (p8), (p9), (p10), (p11)) /* power saving class parameters *//* * ranging response */#define PACK_RNG_RSP_1(buf, v) do {PACK_TLV_U32((buf), 1, (v));} while (0) /* timing adjust */#define PACK_RNG_RSP_2(buf, v) do {PACK_TLV_U8((buf), 2, (v));} while (0) /* power level adjust */#define PACK_RNG_RSP_3(buf, v) do {PACK_TLV_U32((buf), 3, (v));} while (0) /* offset frequency adjust */#define PACK_RNG_RSP_4(buf, v) do {PACK_TLV_U8((buf), 4, (v));} while (0) /* ranging status */#define PACK_RNG_RSP_5(buf, v) do {PACK_TLV_U32((buf), 5, (v));} while (0) /* downlink frequency override */#define PACK_RNG_RSP_6(buf, v) do {PACK_TLV_U8((buf), 6, (v));} while (0) /* uplink channel id override */#define PACK_RNG_RSP_7(buf, v) do {PACK_TLV_U16((buf), 7, (v));} while (0) /* downlink operational burst profile */#define PACK_RNG_RSP_8(buf, p) do {PACK_TLV_BYTES_L0((buf), 8, (p), 6);} while (0) /* ss mac address */#define PACK_RNG_RSP_9(buf, v) do {PACK_TLV_U16((buf), 9, (v));} while (0) /* basic cid */#define PACK_RNG_RSP_10(buf, v) do {PACK_TLV_U16((buf), 10, (v));} while (0) /* primary management cid */#define PACK_RNG_RSP_11(buf, v) do {PACK_TLV_U8((buf), 11, (v));} while (0) /* AAS broadcast permission */#define PACK_RNG_RSP_17(buf, v) do {PACK_TLV_U8((buf), 17, (v));} while (0) /* service level prediction */#define PACK_RNG_RSP_18(buf, v) do {PACK_TLV_U32((buf), 18, (v));} while (0) /* global service class name */#define PACK_RNG_RSP_20(buf, v) do {PACK_TLV_U8((buf), 20, (v));} while (0) /* resource retain flag */#define PACK_RNG_RSP_21(buf, v) do {PACK_TLV_U16((buf), 21, (v));} while (0) /* HO process optimization */#define PACK_RNG_RSP_22(buf, v) do {PACK_TLV_U8((buf), 22, (v));} while (0) /* HO ID */#define PACK_RNG_RSP_23(buf, v) do {PACK_TLV_U8((buf), 23, (v));} while (0) /* location update response */#define PACK_RNG_RSP_24(buf, p) do {PACK_TLV_BYTES_L0((buf), 24, (p), 5);} /* paging information */#define PACK_RNG_RSP_25(buf, p) do {PACK_TLV_BYTES_L0((buf), 25, (p), 6);} /* paging controller ID */#define PACK_RNG_RSP_26(buf, v) do {PACK_TLV_U16((buf), 26, (v));} while (0) /* next periodic ranging */#define PACK_RNG_RSP_27(buf, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)\ PACK_PWR_SAV((buf), 27, (p1), (p2), (p3), (p4), (p5), (p6), (p7), (p8), (p9), (p10), (p11)) /* power saving class parameters */#define PACK_RNG_RSP_28(buf, v) do {PACK_TLV_U16((buf), 28, (v));} while (0) /* MAC hash skip threshold */#define PACK_RNG_RSP_29(buf, v) do {/* add the header&length by yourself */} while (0) /* SBC-RSP encoding */#define PACK_RNG_RSP_30(buf, v) do {/* add the header&length by yourself */} while (0) /* REG-RSP encoding */#define PACK_RNG_RSP_31(buf, p1, p2) \ do {\ UINT8* l;\ PACK_UINT8((buf), 31);\ l = buf;\ if (p1) PACK_TLV_BYTES_L0((buf), 1, (p1), 8);\ if (p2) PACK_TLV_BYTES_L0((buf), 2, (p2), 8);\ *l = (buf) - (l + 1);\ } while (0) /* SA challenge tuple */#define PACK_RNG_RSP_32(buf, v) do {PACK_TLV_U8((buf), 32, (v));} while (0) /* enabled action triggered */#define PACK_RNG_RSP_33(buf, v) do {PACK_TLV_U16((buf), 33, (v));} while (0) /* downlink operational burst profile for ofdma */#define PACK_RNG_RSP_150(buf, v) do {PACK_TLV_U32((buf), 150, (v));} while (0) /* ranging code attributes *//* * macro definitions for ranging response */#define RNG_STAT_CONT 1#define RNG_STAT_ABORT 2#define RNG_STAT_SUCC 3#define RNG_STAT_RETRY 4/* * function definitions about message/tlv builders */void build_rng_rsp(wxbuff_t *wxb, ssinfo_t *ss);void build_sbc_rsp(wxbuff_t *wxb, ssinfo_t *ss);void build_reg_rsp(wxbuff_t *wxb, ssinfo_t *ss);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -