McAckFrame.h
Go to the documentation of this file.
00001 /* 
00002  * File:   McAckFrame.h
00003  * Author: cwioro
00004  *
00005  * Created on August 27, 2014, 10:26 AM
00006  */
00007 
00008 #ifndef MCACKFRAME_H
00009 #define MCACKFRAME_H
00010 
00011 struct mc_ack_header {
00012     uint8_t frame_type;
00013     unsigned char mac_destination_[6];
00014     uint32_t packet_id;
00015     uint32_t frame_seq_num;
00016     uint8_t flag_field;
00017     uint32_t hostname_source_len;
00018     uint32_t mc_group_len;
00019 
00020 } __attribute__((packed));
00021 
00022 class McAckFrame : public EthernetFrame {
00023 public:
00024 
00025  
00026     McAckFrame(unsigned char* source, unsigned char* dest, std::string hostname_src, std::string group_n, uint32_t p_id, uint32_t seq_n);
00027     McAckFrame(unsigned char* buffer);
00028     virtual ~McAckFrame();
00029 
00030 
00031     struct mc_ack_header header_;
00032     std::string hostname_source_;
00033     std::string mc_group_;
00034 
00035 
00036     bool cr_flag_;
00037 
00038     uint16_t buffer_str_len_;
00039 
00040     static uint32_t HEADER_FIXED_LEN;
00041 
00042 
00043     using EthernetFrame::GetCrc32;
00044     std::string getFrameAsNetworkString();
00045    
00046     void print_frame();
00047 
00048 
00049 
00050 private:
00051 
00052 };
00053 
00054 uint32_t McAckFrame::HEADER_FIXED_LEN = sizeof (eh_header) + sizeof (mc_ack_header);
00055 
00056 #endif  /* MCACKFRAME_H */
00057 


adhoc_communication
Author(s): Guenter Cwioro , Torsten Andre
autogenerated on Thu Aug 27 2015 11:56:40