Projet

Général

Profil

« Précédent | Suivant » 

Révision 8135339c

Ajouté par Ermal il y a presque 10 ans

Add print icmp as part of Ticket #3663 and also avoid warnings during build

Voir les différences:

pfPorts/filterlog/files/print-ip6.c
46 46
	register const struct in6_addr *addr;
47 47
	char ip6addr[INET6_ADDRSTRLEN];
48 48

  
49
	dp = (struct ip6_rthdr *)bp;
49
	dp = (const struct ip6_rthdr *)bp;
50 50
	len = dp->ip6r_len;
51 51

  
52 52
	/* 'ep' points to the end of available data. */
......
63 63
#endif
64 64
	case IPV6_RTHDR_TYPE_0:
65 65
	case IPV6_RTHDR_TYPE_2:			/* Mobile IPv6 ID-20 */
66
		dp0 = (struct ip6_rthdr0 *)dp;
66
		dp0 = (const struct ip6_rthdr0 *)dp;
67 67

  
68 68
		sbuf_printf(sbuf, "0x%0x,",
69 69
			    EXTRACT_32BITS(&dp0->ip6r0_reserved));
......
71 71
		if (len % 2 == 1)
72 72
			goto trunc;
73 73
		len >>= 1;
74
		addr = (struct in6_addr *)(dp0+1);
74
		addr = (const struct in6_addr *)(dp0+1);
75 75
		for (i = 0; i < len; i++) {
76
			if ((u_char *)(addr + 1) > ep)
76
			if ((const u_char *)(addr + 1) > ep)
77 77
				goto trunc;
78 78

  
79 79
			memset(ip6addr, 0, INET6_ADDRSTRLEN);
......
272 272
		{
273 273
			const struct udphdr *up;
274 274

  
275
			up = (struct udphdr *)cp;
275
			up = (const struct udphdr *)cp;
276 276
			sbuf_printf(sbuf, "%d,%d,%d", EXTRACT_16BITS(&up->uh_sport), EXTRACT_16BITS(&up->uh_dport),
277 277
				EXTRACT_16BITS(&up->uh_ulen));
278 278

  

Formats disponibles : Unified diff