/******************************************************************************
Author: Samuel Jero
-Date: 2/2011
+Date: 4/2011
Description: Header file for program to convert a DCCP flow to a TCP flow for DCCP
analysis via tcptrace.
Notes:
- 1)Supports only a single DCCP contection per capture
+ 1)Supports only a single DCCP connection per capture
2)Source Port!=Destination Port
3)DCCP MUST use 48 bit sequence numbers
4)Checksums are not computed (they are zeroed)
#define MAX_PACKET 1600 /*Maximum size of TCP packet */
-#define TBL_SZ 10000 /*Size of Sequence Number Table*/
+#define TBL_SZ 40000 /*Size of Sequence Number Table*/
/*sequence number table structure */
struct tbl{
- __be32 old; /*DCCP sequence number */
- u_int32_t new; /*TCP sequence number */
- int size; /*packet size*/
- enum dccp_pkt_type type; /*packet type*/
+ __be32 old; /*DCCP sequence number */
+ u_int32_t new; /*TCP sequence number */
+ int size; /*packet size*/
+ enum dccp_pkt_type type; /*packet type*/
};
/*Option flags*/
extern int debug; /*set to 1 to turn on debugging information*/
-extern int yellow; /*tcptrace yellow line as currently acked packet*/
+extern int yellow; /*tcptrace yellow line as currently acked packet*/
extern int green; /*tcptrace green line as currently acked packet*/
extern int sack; /*add TCP SACKS*/
*/
void dbgprintf(int level, const char *fmt, ...);
+/* Encapsulation functions*/
+int eth_ip_encap_pre(struct pcap_pkthdr *h, u_char **nptr, int *nlength, const u_char **optr, int *length);
+int eth_ip_encap_post(struct pcap_pkthdr *h, u_char** nptr, int *nlength);
+
+/*The Conversion Function*/
+void convert_packet(struct pcap_pkthdr *h, u_char **ndata, int *nlength, const u_char **odata, int *length);
#endif