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
00026 namespace prism
00027 {
00033 struct item
00034 {
00036 uint32_t get(bool swapped) const;
00037
00039 item& set(uint32_t value, bool swapped);
00040
00041 protected:
00042 uint32_t did;
00043 uint16_t status;
00044 uint16_t len;
00045 uint32_t data;
00046 };
00047
00049 struct header
00050 {
00051 enum
00052 {
00054 devnamelen_max = 16
00055 };
00056
00057 uint32_t msgcode;
00058 uint32_t msglen;
00059 uint8_t devname[devnamelen_max];
00060 item hosttime;
00061 item mactime;
00062 item channel;
00063 item rssi;
00064 item sq;
00065 item signal;
00066 item noise;
00067 item rate;
00068 item istx;
00069 item frmlen;
00070 };
00071
00084 bool
00085 eq_80211(const header* lhs, size_t lhs_caplen,
00086 const header* rhs, size_t rhs_caplen);
00087
00103 bool
00104 eq_time_and_80211(const header* lhs, size_t lhs_caplen, bool lhs_swapped,
00105 const header* rhs, size_t rhs_caplen, bool rhs_swapped,
00106 bool check_hosttime = false,
00107 unsigned precision = 40);
00108
00109 }
00110
00111 # include "prism_header.hxx"
00112
00113 #endif // ! PRISM_HEADER_HH_