Enhanced Ethereal icon for Windows
Support for time stamping packets in text2pcap
Fix to text2pcap to handle colons after offset field
+ Make IP-over-PPP work with the TCP graph code
}
Pavel Novotny <Pavel.Novotny[AT]icn.siemens.de> {
* By Pavel Mores <pvl@uh.cz>
* Win32 port: rwh@unifiedtech.com
*
- * $Id: tcp_graph.c,v 1.2 2001/12/08 09:39:23 guy Exp $
+ * $Id: tcp_graph.c,v 1.3 2001/12/09 01:20:14 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#define ETHERTYPE_IP 0x0800
+/* reverse engineered from capture file, not too difficult :) */
+struct ppp_header {
+ guint8 ppp_type; /* Protocol on PPP connection */
+};
+#define PPPTYPE_IP 0x21
+
+
#undef BITFIELDS
/* from <netinet/ip.h> */
g->type = graph_type;
if (!get_headers (cfile.pd, ¤t)) {
- /* currently selected packet is neither TCP over IP over Ethernet II
- * nor TCP over IP alone (= IP over PPP) - should display some
+ /* currently selected packet is neither TCP over IP over Ethernet II/PPP
+ * nor TCP over IP alone - should display some
* kind of warning dialog */
printf ("packet selected is not a TCP segment\n");
return;
static int get_headers (char *pd, struct segment *hdrs)
{
struct ether_header *e;
+ struct ppp_header *p;
struct iphdr *ip;
struct tcphdr *tcp;
e = (struct ether_header * )pd;
+ p = (struct ppp_header * )pd;
if (ntohs (e->ether_type) == ETHERTYPE_IP) {
ip = (struct iphdr * )((struct ether_header * )pd + 1);
} else if (((struct iphdr *)e)->protocol == IPPROTO_TCP) {
ip = (struct iphdr *)e;
+ } else if ( (p->ppp_type == PPPTYPE_IP) && /* IP Protocol over PPP */
+ (((struct iphdr *)(p+1))->protocol == IPPROTO_TCP) ) { /* TCP Protocol over IP */
+ ip = (struct iphdr *)(p+1);
} else {
/* printf ("not IP over Ethernet II or PPP\n"); */
return FALSE;