/******************************************************************************
-Author: Samuel Jero
+Utility to convert a DCCP flow to a TCP flow for DCCP analysis via
+ tcptrace. Encapsulation Functions for DCCP conversion to TCP.
-Date: 11/2012
+Copyright (C) 2012 Samuel Jero <sj323707@ohio.edu>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
-Description: Encapsulation Functions for DCCP conversion to TCP
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+Author: Samuel Jero <sj323707@ohio.edu>
+Date: 11/2012
+
+Notes:
+ 1)CCID2 ONLY
+ 2)DCCP MUST use 48 bit sequence numbers
+ 3)DCCP DATA packets are not implemented (Linux doesn't use them)
+ 4)DCCP Ack packets show up as TCP packets containing one byte
******************************************************************************/
#include "dccp2tcp.h"
#include "encap.h"
+#include "checksums.h"
#include <pcap/sll.h>
#include <netinet/ip6.h>
/*Adjust IPv4 header to account for packet's total length*/
iph->tot_len=htons(new->length);
+ /*Compute IPv4 Checksum*/
+ iph->check=0;
+ iph->check=ipv4_chksum(new->data,iph->ihl*4);
+
/*Cleanup*/
free(nnew.src_id);
free(nnew.dest_id);