00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef AVS_HEADER_HH_
00023 # define AVS_HEADER_HH_
00024
00025 # include <wipal/phy/phy.hh>
00026
00027
00028 namespace avs
00029 {
00030 struct header;
00031 }
00032
00033
00034
00035 namespace tool
00036 {
00037
00038 template <>
00039 struct types<avs::header>
00040 {
00041 typedef phy::uint64_time<> time_type;
00042 };
00043
00044 }
00045
00046
00047
00048
00050 namespace avs
00051 {
00052
00054 struct header: public phy::header<avs::header>
00055 {
00056
00058
00059 typedef avs::header exact_type;
00060 typedef WP_TYPE_(time_type, exact_type) time_type;
00061
00062 size_t len_impl(size_t, bool) const;
00063 time_type time_get_impl(bool) const;
00064 void time_set_impl(const time_type&, bool);
00065 static bool eq_time(const pcapxx::frame_descriptor& lhs,
00066 const pcapxx::frame_descriptor& rhs,
00067 tool::endian::endianness phy_end,
00068 unsigned prec);
00070
00072 uint64_t mactime_get() const;
00073
00074
00076 struct v2_extra_fields
00077 {
00078
00079 uint32_t sequence;
00080 uint32_t drops;
00081 uint8_t receiver_addr[6];
00082 uint8_t pad[2];
00083
00084 } __attribute__ ((__packed__));
00085
00086 uint32_t version;
00087 uint32_t length;
00088 uint64_t mactime;
00089 uint64_t hosttime;
00090 uint32_t phytype;
00091 uint32_t channel;
00092 uint32_t datarate;
00093 uint32_t antenna;
00094 uint32_t priority;
00095 uint32_t ssi_type;
00096 uint32_t ssi_signal;
00097 uint32_t ssi_noise;
00098 uint32_t preamble;
00099 uint32_t encoding;
00100 v2_extra_fields v2_fields[];
00101
00102 } __attribute__ ((__packed__));
00103
00104 }
00105
00106 # include "avs_header.hxx"
00107
00108 #endif // ! AVS_HEADER_HH_