improved some comments

This commit is contained in:
Arnout Engelen
2005-04-03 09:49:34 +00:00
parent c66bc829ea
commit 91d30576d2
2 changed files with 6 additions and 10 deletions

View File

@@ -7,8 +7,6 @@
#include <pcap.h> #include <pcap.h>
#include "decpcap.h" #include "decpcap.h"
/* data container for callback-references */
/* functions to set up a handle (which is basically just a pcap handle) */ /* functions to set up a handle (which is basically just a pcap handle) */
struct dp_handle * dp_open_live(char * device, int snaplen, int promisc, int to_ms, char * ebuf) struct dp_handle * dp_open_live(char * device, int snaplen, int promisc, int to_ms, char * ebuf)
@@ -68,7 +66,7 @@ void dp_parse_tcp (struct dp_handle * handle, const dp_header * header, const u_
if (done) if (done)
return; return;
} }
// TODO // TODO: maybe `pass on' payload to lower-level protocol parsing
} }
void dp_parse_ip (struct dp_handle * handle, const dp_header * header, const u_char * packet) void dp_parse_ip (struct dp_handle * handle, const dp_header * header, const u_char * packet)
@@ -89,7 +87,7 @@ void dp_parse_ip (struct dp_handle * handle, const dp_header * header, const u_c
dp_parse_tcp (handle, header, payload); dp_parse_tcp (handle, header, payload);
break; break;
default: default:
// TODO // TODO: maybe support for non-tcp IP packets
break; break;
} }
} }
@@ -112,7 +110,7 @@ void dp_parse_ip6 (struct dp_handle * handle, const dp_header * header, const u_
dp_parse_tcp (handle, header, payload); dp_parse_tcp (handle, header, payload);
break; break;
default: default:
// TODO // TODO: maybe support for non-tcp ipv6 packets
break; break;
} }
} }
@@ -143,7 +141,7 @@ void dp_parse_ethernet (struct dp_handle * handle, const dp_header * header, con
dp_parse_ip6 (handle, header, payload); dp_parse_ip6 (handle, header, payload);
break; break;
default: default:
// TODO // TODO: maybe support for other protocols apart from IPv4 and IPv6
break; break;
} }
} }
@@ -189,7 +187,7 @@ void dp_parse_ppp (struct dp_handle * handle, const dp_header * header, const u_
dp_parse_ip6 (handle, header, payload); dp_parse_ip6 (handle, header, payload);
break; break;
default: default:
// TODO // TODO: support for other than IPv4 and IPv6
break; break;
} }
} }

View File

@@ -278,9 +278,7 @@ int main (int argc, char** argv)
if (newhandle != NULL) if (newhandle != NULL)
{ {
/* The following code solves sf.net bug 1019381, but is only available /* The following code solves sf.net bug 1019381, but is only available
* in newer versions of libpcap */ * in newer versions (from 0.8 it seems) of libpcap */
// TODO ARN
if (dp_setnonblock (newhandle, 1, errbuf) == -1) if (dp_setnonblock (newhandle, 1, errbuf) == -1)
{ {
// ERROR // ERROR