00001 /* 00002 Copyright (C) 2006-2007 Werner Dittmann 00003 00004 This program is free software: you can redistribute it and/or modify 00005 it under the terms of the GNU General Public License as published by 00006 the Free Software Foundation, either version 3 of the License, or 00007 (at your option) any later version. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 GNU General Public License for more details. 00013 00014 You should have received a copy of the GNU General Public License 00015 along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00018 /* 00019 * @author: Werner Dittmann <Werner.Dittmann@t-online.de> 00020 */ 00021 00022 #include <libzrtpcpp/ZrtpPacketClearAck.h> 00023 00024 ZrtpPacketClearAck::ZrtpPacketClearAck() { 00025 DEBUGOUT((fprintf(stdout, "Creating ClearAck packet without data\n"))); 00026 00027 zrtpHeader = &data.hdr; // the standard header 00028 00029 setZrtpId(); 00030 setLength((sizeof(ClearAckPacket_t) / ZRTP_WORD_SIZE) - 1); 00031 setMessageType((uint8_t*)ClearAckMsg); 00032 } 00033 00034 ZrtpPacketClearAck::ZrtpPacketClearAck(uint8_t *data) { 00035 DEBUGOUT((fprintf(stdout, "Creating Conf2Ack packet from data\n"))); 00036 00037 zrtpHeader = (zrtpPacketHeader_t *)&((ClearAckPacket_t*)data)->hdr; // the standard header 00038 } 00039 00040 ZrtpPacketClearAck::~ZrtpPacketClearAck() { 00041 DEBUGOUT((fprintf(stdout, "Deleting ClearAck packet: alloc: %x\n", allocated))); 00042 }