文章目录
- 帧结构
- MAC头部
- 管理帧
帧结构
Wi-Fi的帧分为三部分组成:MAC头部+frame body+FCS,其中MAC是固定格式的,frame body是可变长度。
MAC头部有frame control,duration,address1,address2,address3,和seq ctrl字段组成。
MAC头部
以beacon帧为例:
- Protocol Version: (协议版本)通常为0
- Type: 帧类型,管理帧00,控制帧: 01,数据帧10
- Subtype: 帧的子类型,每种大类帧又分为多个小类
- To DS: 管理帧和控制帧都是0,数据帧表示是从发往AP的
- From DS: 管理帧和控制帧都是0,数据帧表示是从AP发来的
- More Fragment: 用于说明长帧被分段的情况,是否还有其它的帧,如果有则该值设置为1
- Retry(重传域): 表示该分段是先前传输分段的重发帧
- Power Management: 表示传输帧以后,站所采用的电源管理模式,1表示终端处于节能状态,0表示处于正常状态
- More Data: 表示有很多帧缓存到站中。即至少还有一个数据帧要发送给STA是设置为1
- Protected Frame: 1表示是加密的数据帧
- Order(序号域): 在长帧分段传送时,该域设置为1表示接受者应该严格按照顺序处理该帧,否则设置为0
管理帧
Type value | Type description | Subtype value | Subtype description |
---|---|---|---|
00 | Management | 0000 | Association Request |
0001 | Association Response | ||
0010 | Reassociation Request | ||
0011 | Reassociation Response | ||
0100 | Probe Request | ||
0101 | Probe Response | ||
0110 | Timing Advertisement | ||
0111 | Reserved | ||
1000 | Beacon | ||
1001 | ATIM | ||
1010 | Disassociation | ||
1011 | Authentication | ||
1100 | Deauthentication | ||
1101 | Action | ||
1110 | Action No Ack | ||
1111 | Reserved |