-/* 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);
+/*Function to parse encapsulation*/
+int do_encap(int link, struct packet *new, const struct const_packet *old);
+
+/*Connection functions*/
+int get_host(u_char *src_id, u_char* dest_id, int id_len, int src_port, int dest_port,
+ enum dccp_pkt_type pkt_type, struct hcon **fwd, struct hcon **rev);
+struct connection *add_connection(u_char *src_id, u_char* dest_id, int id_len,
+ int src_port, int dest_port);
+int update_state(struct hcon* hst, enum con_state st);
+void cleanup_connections();
+
+/*Half Connection/Sequence number functions*/
+u_int32_t initialize_hcon(struct hcon *hcn, d_seq_num initial);
+u_int32_t add_new_seq(struct hcon *hcn, d_seq_num num, int size, enum dccp_pkt_type type);
+u_int32_t convert_ack(struct hcon *hcn, d_seq_num num, struct hcon *o_hcn);
+int acked_packet_size(struct hcon *hcn, d_seq_num num);
+unsigned int interp_ack_vect(u_char* hdr);