summaryrefslogtreecommitdiff
blob: 1882436fd3bf3e6021ef6aa17967f9ba183fe0b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
diff -urN traceproto-1.1.1.orig/tp_packet.c traceproto-1.1.1/tp_packet.c
--- traceproto-1.1.1.orig/tp_packet.c	2005-01-31 01:03:57.248742848 -0500
+++ traceproto-1.1.1/tp_packet.c	2005-01-31 01:06:39.184124928 -0500
@@ -103,7 +103,7 @@
 		state.low_ttl = YES;
 
 //	tcp_hdr = ( struct libnet_tcp_hdr * ) & raw_packet[ 0 ];
-	tcp_hdr = ( struct libnet_tcp_hdr * ) tp_align ( raw_packet,
+	tcp_hdr = ( struct libnet_tcp_hdr * ) tp_align ( (char *)raw_packet,
 					0,
 					sizeof ( struct libnet_tcp_hdr ) );
 
@@ -165,7 +165,7 @@
 		state.low_ttl = YES;
 
 //	udp_hdr = ( struct libnet_udp_hdr * ) & raw_packet[ 0 ];
-	udp_hdr = ( struct libnet_udp_hdr * ) tp_align ( raw_packet,
+	udp_hdr = ( struct libnet_udp_hdr * ) tp_align ( (char *)raw_packet,
 					0,
 					sizeof ( struct libnet_udp_hdr ) );
 
@@ -268,12 +268,12 @@
  * off of the packet
  */
 //	eth_hdr = ( struct libnet_802_3_hdr * ) raw_packet;
-	eth_hdr = ( struct libnet_802_3_hdr * ) tp_align ( raw_packet,
+	eth_hdr = ( struct libnet_802_3_hdr * ) tp_align ( (char *)raw_packet,
 					0,
 					sizeof ( struct libnet_802_3_hdr ) );
 
 //	state.ip_hdr = ( struct libnet_ipv4_hdr * ) & raw_packet[ eth_offset ];
-	state.ip_hdr = ( struct libnet_ipv4_hdr * ) tp_align ( raw_packet,
+	state.ip_hdr = ( struct libnet_ipv4_hdr * ) tp_align ( (char *)raw_packet,
 					eth_offset,
 					sizeof ( struct libnet_ipv4_hdr ) );
 
@@ -294,19 +294,19 @@
 	{
 	case IPPROTO_ICMP:
 //		return parse_icmp_packet ( ( const u_char * ) & raw_packet [ ipv4_offset ] );
-		return parse_icmp_packet ( ( const u_char * ) tp_align ( raw_packet,
+		return parse_icmp_packet ( ( const u_char * ) tp_align ( (char *)raw_packet,
 							ipv4_offset,
 							sizeof ( struct libnet_icmpv4_hdr ) ) );
 		break;
 	case IPPROTO_TCP:
 //		return parse_tcp_packet ( ( const u_char * ) & raw_packet [ ipv4_offset ] );
-		return parse_tcp_packet ( ( const u_char * ) tp_align ( raw_packet,
+		return parse_tcp_packet ( ( const u_char * ) tp_align ( (char *)raw_packet,
 							ipv4_offset,
 							sizeof ( struct libnet_tcp_hdr ) ) );
 		break;
 	case IPPROTO_UDP:
 //		return parse_udp_packet ( ( const u_char * ) & raw_packet [ ipv4_offset ] );
-		return parse_udp_packet ( ( const u_char * ) tp_align ( raw_packet,
+		return parse_udp_packet ( ( const u_char * ) tp_align ( (char *)raw_packet,
 							ipv4_offset,
 							sizeof ( struct libnet_udp_hdr ) ) );
 		break;