Notes:
1)CCID2 ONLY
2)DCCP MUST use 48 bit sequence numbers
- 3)Checksums are not computed (they are zeroed)
- 4)DCCP DATA packets are not implemented (Linux doesn't use them)
- 5)DCCP Ack packets show up as TCP packets containing one byte
+ 3)DCCP DATA packets are not implemented (Linux doesn't use them)
+ 4)DCCP Ack packets show up as TCP packets containing one byte
******************************************************************************/
#ifndef _DCCP2TCP_H
#define _DCCP2TCP_H
#include <ctype.h>
#include <pcap.h>
#include <linux/dccp.h>
+#include "checksums.h"
#define MAX_PACKET 1600 /*Maximum size of TCP packet */
CLOSE,
};
+/*Connection Types (i.e. CCID)*/
+enum con_type{
+ UNKNOWN,
+ CCID2,
+ CCID3,
+};
+
/*Host---half of a connection*/
struct host{
int id_len; /*Length of ID*/
int size; /*Size of Sequence Number Table*/
int cur; /*Current TCP Sequence Number*/
enum con_state state; /*Connection state*/
+ enum con_type type; /*Connection type*/
};
/*Connection structure*/
extern struct connection *chead;/*connection list*/
-
/*debug printf
* Levels:
* 0) Always print even if debug isn't specified
int update_state(struct host* hst, enum con_state st);
void cleanup_connections();
+/*Per-CCID convert functions*/
+int ccid2_convert_packet(struct packet *new, const struct const_packet* old);
+
#endif