]> sjero.net Git - dccp2tcp/blobdiff - dccp2tcp.c
Update Changelog, Release Notes, and File Headers for release 1.5
[dccp2tcp] / dccp2tcp.c
index dbd90dfc39832683cacbefdefdd7202add5f7f63..17563f2584a1a455eaa2c5972d709685f2eb9cdf 100644 (file)
@@ -1,7 +1,7 @@
 /******************************************************************************
 Author: Samuel Jero
 
-Date: 7/2011
+Date: 11/2011
 
 Description: Program to convert a DCCP flow to a TCP flow for DCCP analysis via
                tcptrace.
@@ -10,9 +10,8 @@ Notes:
        1)CCID2 ONLY
        2)DCCP MUST use 48 bit sequence numbers
        3)Checksums are not computed (they are zeroed)
-       4)Only implements those packet types normally used in a session
+       4)DCCP DATA packets are not implemented (Linux doesn't use them)
        5)DCCP Ack packets show up as TCP packets containing one byte
-       6)Very little error checking of packet headers
 ******************************************************************************/
 #include "dccp2tcp.h"
 
@@ -56,8 +55,9 @@ int main(int argc, char *argv[])
 
        /*loop through commandline options*/
        for(int i=1; i < argc; i++){
-               if(argv[i][0]!='-'){
-                       if(dfile==NULL){ /*assign first non-dash argument to the dccp file*/
+               if(argv[i][0]!='-' || (argv[i][0]=='-' && strlen(argv[i])==1)){
+                       if(dfile==NULL  || argv[i][0]=='-'){
+                               /*assign first non-dash (or only dash) argument to the dccp file*/
                                dfile=argv[i];
                        }else{
                                if(tfile==NULL){