我想知道Wireshark是如何解析802.11个数据包的。
例如,探测请求数据包的序列号为: 2327。
在数据包详细信息中,十六进制是"70 91",而在ASCII中是“p”。
那么wireshark如何从数据包中获得值"2327“?在C中有类似的例子吗?
发布于 2011-02-21 09:39:16
802.11顺序控制字段是包含两个子字段的16位小端字段-高12位包含序列号,低4位包含片段号。在这种情况下:
发布于 2011-02-22 19:32:59
@caf是对的,无论如何,我发布了关于如何提取序列号的代码。
//this is the subfields
typedef struct seqctl_subfields
{
unsigned fragment:4;
unsigned seq_num:12;
};
struct seqctl_fields *se = (struct seqctl_fields*)p->sc // where p is a struct of the 802.11 header,p->sc points to the sequence control field of the 802.11 header
std::cout << se->seq_num << std::endl;https://stackoverflow.com/questions/5056181
复制相似问题