]> sjero.net Git - dccp2tcp/blobdiff - encap.h
Minor Makefile change for greater compatibility
[dccp2tcp] / encap.h
diff --git a/encap.h b/encap.h
index baf092c93dbd4a34476dce3c0358192d8c9b7580..010cac2531da54cddf152568b34d82fb69d59cef 100644 (file)
--- a/encap.h
+++ b/encap.h
@@ -1,10 +1,24 @@
 /******************************************************************************
-Author: Samuel Jero
+Utility to convert a DCCP flow to a TCP flow for DCCP analysis via
+               tcptrace. Header file for Encapsulation Functions for DCCP to TCP conversion.
 
-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: Header file for Encapsulation Functions for DCCP to TCP conversion
+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
 ******************************************************************************/
 #ifndef ENCAP_H_
 #define ENCAP_H_
@@ -38,6 +52,10 @@ Description: Header file for Encapsulation Functions for DCCP to TCP conversion
  *                                             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
@@ -58,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_ */