00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef PRISM_HEADER_HH_
00023 # define PRISM_HEADER_HH_
00024
00025 # include <wipal/phy/phy.hh>
00026
00028 namespace prism
00029 {
00035 struct item
00036 {
00038 uint32_t get(bool swapped) const;
00039
00041 item& set(uint32_t value, bool swapped);
00042
00043 protected:
00044 uint32_t did;
00045 uint16_t status;
00046 uint16_t len;
00047 uint32_t data;
00048 };
00049
00051 struct header
00052 {
00053 enum
00054 {
00056 devnamelen_max = 16
00057 };
00058
00059 uint32_t msgcode;
00060 uint32_t msglen;
00061 uint8_t devname[devnamelen_max];
00062 item hosttime;
00063 item mactime;
00064 item channel;
00065 item rssi;
00066 item sq;
00067 item signal;
00068 item noise;
00069 item rate;
00070 item istx;
00071 item frmlen;
00072 };
00073
00086 bool
00087 eq_80211(const header* lhs, size_t lhs_caplen,
00088 const header* rhs, size_t rhs_caplen);
00089
00105 bool
00106 eq_time_and_80211(const header* lhs, size_t lhs_caplen, bool lhs_swapped,
00107 const header* rhs, size_t rhs_caplen, bool rhs_swapped,
00108 unsigned precision = phy::eq_time_default_precision,
00109 bool check_hosttime = false);
00110
00111 }
00112
00113 # include "prism_header.hxx"
00114
00115 #endif // ! PRISM_HEADER_HH_