X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=encap.h;h=010cac2531da54cddf152568b34d82fb69d59cef;hb=5e3bc5722d048a5b9581cbe27c64de5048d444b0;hp=018acc80c02721d03014a6957062862d7dcf34a1;hpb=afe4574b894da1c172ae694503b323c599bc67dc;p=dccp2tcp
diff --git a/encap.h b/encap.h
index 018acc8..010cac2 100644
--- a/encap.h
+++ b/encap.h
@@ -19,13 +19,6 @@ along with this program. If not, see .
Author: Samuel Jero
Date: 11/2012
-
-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
******************************************************************************/
#ifndef ENCAP_H_
#define ENCAP_H_
@@ -59,6 +52,10 @@ Notes:
* need to set this field. Typically this would be an
* IP address.
*
+ * char* (*print_id)(char* buf, int len, u_char* id, int id_len):
+ * This is a function to pretty-print the destination or
+ * source ID to the given buffer.
+ *
* struct const_packet *old: The Old packet. It contains the following fields.
*
* u_char* data: This is a pointer to the buffer containing the
@@ -79,8 +76,13 @@ int convert_packet(struct packet *new, const struct const_packet *old);
/*Standard Encapsulation Functions*/
int ethernet_encap(struct packet *new, const struct const_packet *old);
+int ethernet_vlan_encap(struct packet *new, const struct const_packet *old);
int linux_cooked_encap(struct packet *new, const struct const_packet *old);
int ipv4_encap(struct packet *new, const struct const_packet *old);
int ipv6_encap(struct packet *new, const struct const_packet *old);
+/*Standard Print Functions*/
+char* print_ipv6(char* buf, int len, u_char* id, int id_len);
+char* print_ipv4(char* buf, int len, u_char* id, int id_len);
+
#endif /* ENCAP_H_ */