00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef WIFI_FRAME_HASH_HH_
00023 # define WIFI_FRAME_HASH_HH_
00024
00025 # include <openssl/md5.h>
00026 # include <boost/array.hpp>
00027
00028 # include <wipal/wifi/frame/unique_id/unique_id.hh>
00029
00030 namespace wifi
00031 {
00032
00033 namespace frame
00034 {
00035
00036 namespace internals
00037 {
00038
00039 struct hash_value: public boost::array<unsigned char, MD5_DIGEST_LENGTH>
00040 {
00041 hash_value(const void* data, size_t len);
00042 };
00043
00044 }
00045
00046 typedef unique_id<internals::hash_value> hsh_id;
00047
00048 template <>
00049 struct unique_id_factory<hsh_id>
00050 {
00051 template <class HeaderType, class D>
00052 boost::optional<hsh_id>
00053 build(const pcapxx::frame_descriptor<D>& desc,
00054 addr_mapping& mapping);
00055 };
00056
00057 }
00058
00059 }
00060
00061 WP_HASH_NAMESPACE_BEGIN
00062
00063 template <>
00064 struct hash< wifi::frame::internals::hash_value >
00065 {
00066 size_t
00067 operator () (const wifi::frame::internals::hash_value&) const;
00068 };
00069
00070 WP_HASH_NAMESPACE_END
00071
00072 # include "hash.hxx"
00073
00074 #endif // ! WIFI_FRAME_HASH_HH_