00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef PCAP_FRAME_ITERATOR_HH_
00023 # define PCAP_FRAME_ITERATOR_HH_
00024
00025 # include <trace-tools/pcap/frame_descriptor.hh>
00026 # include <trace-tools/tool/iterator_base.hh>
00027
00028 namespace pcapxx
00029 {
00030
00031 template <class D>
00032 struct descriptor;
00033
00035 namespace internals
00036 {
00037
00038 template <class D, class B>
00039 struct frame_iterator;
00040
00041 }
00042 }
00043
00044 namespace tool
00045 {
00046
00048 template <class D, class B>
00049 struct types< pcapxx::internals::frame_iterator<D, B> >
00050 {
00051 typedef pcapxx::frame_descriptor value_type;
00052 typedef pcapxx::descriptor<D> iterable_type;
00053 };
00054
00055 }
00056
00057 namespace pcapxx
00058 {
00059 namespace internals
00060 {
00061
00063 template <class Desc, class Bottom = tool::bottom>
00064 struct frame_iterator:
00065 tt_inherit(public tool::iterator_base, frame_iterator<Desc, Bottom>)
00066 {
00067 typedef tt_get_exact(Bottom, frame_iterator<Desc, Bottom>) exact_type;
00068
00070 frame_iterator(descriptor<Desc>& desc, bool end);
00071
00073 void increment();
00074
00075 template <class D, class B>
00076 friend
00077 void
00078 fill(void*, const pkthdr*, const void*);
00079
00080 };
00081
00090 template <class D, class B>
00091 void
00092 fill(void*, const pkthdr*, const void*);
00093
00094 }
00095
00096 }
00097
00098 # include "frame_iterator.hxx"
00099
00100 #endif // ! PCAP_FRAME_ITERATOR_HH_