00001 /* 00002 * File: McDisconnectFrame.h 00003 * Author: cwioro 00004 * 00005 * Created on September 1, 2014, 1:18 PM 00006 */ 00007 00008 #ifndef MCDISCONNECTFRAME_H 00009 #define MCDISCONNECTFRAME_H 00010 00011 struct mc_disc_header { 00012 uint8_t frame_type; 00013 uint32_t id; 00014 unsigned char mac_destination[6]; 00015 uint8_t flag_field; 00016 uint32_t mc_group_name_len; 00017 00018 } __attribute__((packed)); 00019 00020 class McDisconnectFrame : public EthernetFrame { 00021 public: 00022 00023 McDisconnectFrame(unsigned char* next_hop, std::string mc_g); 00024 McDisconnectFrame(unsigned char* buffer); 00025 std::string getFrameAsNetworkString(unsigned char* source); 00026 using EthernetFrame::GetCrc32; 00027 virtual ~McDisconnectFrame(); 00028 00029 struct mc_disc_header header_; 00030 00031 std::string mc_group_; 00032 bool disconnect_uplink; 00033 bool disconnect_downlink; 00034 00035 uint16_t buffer_str_len_; 00036 00037 00038 static uint32_t HEADER_FIXED_LEN; 00039 static uint32_t stat_id_count; 00040 00041 }; 00042 00043 uint32_t McDisconnectFrame::HEADER_FIXED_LEN = sizeof (eh_header) + sizeof (mc_disc_header); 00044 uint32_t McDisconnectFrame::stat_id_count = 0; 00045 00046 #endif /* MCDISCONNECTFRAME_H */ 00047