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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
  | 
--- pfctl/pfctl.c	Sat Jun 21 17:29:45 2003
+++ pfctl/pfctl.c	Sat Jun 21 18:31:19 2003
@@ -46,6 +46,7 @@
 #include <err.h>
 #include <errno.h>
 #include <fcntl.h>
+#include <inttypes.h>
 #include <limits.h>
 #include <netdb.h>
 #include <stdio.h>
@@ -565,8 +566,8 @@
 		    rule->qname, rule->qid, rule->pqname, rule->pqid);
 	}
 	if (opts & PF_OPT_VERBOSE)
-		printf("[ Evaluations: %-8llu  Packets: %-8llu  "
-			    "Bytes: %-10llu  States: %-6u]\n\n",
+		printf("[ Evaluations: %-8"PRIu64"  Packets: %-8"PRIu64"  "
+			    "Bytes: %-10"PRIu64"  States: %-6u]\n\n",
 			    rule->evaluations, rule->packets,
 			    rule->bytes, rule->states);
 }
@@ -630,7 +631,7 @@
 		case 1:
 			if (pr.rule.label[0]) {
 				printf("%s ", pr.rule.label);
-				printf("%llu %llu %llu\n",
+				printf("%"PRIu64" %"PRIu64" %"PRIu64"\n",
 				    pr.rule.evaluations, pr.rule.packets,
 				    pr.rule.bytes);
 			}
@@ -662,7 +663,7 @@
 		case 1:
 			if (pr.rule.label[0]) {
 				printf("%s ", pr.rule.label);
-				printf("%llu %llu %llu\n",
+				printf("%"PRIu64" %"PRIu64" %"PRIu64"\n",
 				    pr.rule.evaluations, pr.rule.packets,
 				    pr.rule.bytes);
 			}
--- pfctl/pfctl_parser.c	Sat Jun 21 17:29:45 2003
+++ pfctl/pfctl_parser.c	Sat Jun 21 18:32:00 2003
@@ -49,6 +49,7 @@
 #include <stdarg.h>
 #include <errno.h>
 #include <err.h>
+#include <inttypes.h>
 #include <ifaddrs.h>
 
 #if defined(__FreeBSD__)
@@ -503,29 +504,29 @@
 	if (s->ifname[0] != 0) {
 		printf("Interface Stats for %-16s %5s %16s\n",
 		    s->ifname, "IPv4", "IPv6");
-		printf("  %-25s %14llu %16llu\n", "Bytes In",
+		printf("  %-25s %14"PRIu64" %16"PRIu64"\n", "Bytes In",
 		    s->bcounters[0][0], s->bcounters[1][0]);
-		printf("  %-25s %14llu %16llu\n", "Bytes Out",
+		printf("  %-25s %14"PRIu64" %16"PRIu64"\n", "Bytes Out",
 		    s->bcounters[0][1], s->bcounters[1][1]);
 		printf("  Packets In\n");
-		printf("    %-23s %14llu %16llu\n", "Passed",
+		printf("    %-23s %14"PRIu64" %16"PRIu64"\n", "Passed",
 		    s->pcounters[0][0][PF_PASS],
 		    s->pcounters[1][0][PF_PASS]);
-		printf("    %-23s %14llu %16llu\n", "Blocked",
+		printf("    %-23s %14"PRIu64" %16"PRIu64"\n", "Blocked",
 		    s->pcounters[0][0][PF_DROP],
 		    s->pcounters[1][0][PF_DROP]);
 		printf("  Packets Out\n");
-		printf("    %-23s %14llu %16llu\n", "Passed",
+		printf("    %-23s %14"PRIu64" %16"PRIu64"\n", "Passed",
 		    s->pcounters[0][1][PF_PASS],
 		    s->pcounters[1][1][PF_PASS]);
-		printf("    %-23s %14llu %16llu\n\n", "Blocked",
+		printf("    %-23s %14"PRIu64" %16"PRIu64"\n\n", "Blocked",
 		    s->pcounters[0][1][PF_DROP],
 		    s->pcounters[1][1][PF_DROP]);
 	}
 	printf("%-27s %14s %16s\n", "State Table", "Total", "Rate");
 	printf("  %-25s %14u %14s\n", "current entries", s->states, "");
 	for (i = 0; i < FCNT_MAX; i++) {
-		printf("  %-25s %14lld ", pf_fcounters[i],
+		printf("  %-25s %14"PRId64" ", pf_fcounters[i],
 			    s->fcounters[i]);
 		if (runtime > 0)
 			printf("%14.1f/s\n",
@@ -535,7 +536,7 @@
 	}
 	printf("Counters\n");
 	for (i = 0; i < PFRES_MAX; i++) {
-		printf("  %-25s %14lld ", pf_reasons[i],
+		printf("  %-25s %14"PRId64" ", pf_reasons[i],
 		    s->counters[i]);
 		if (runtime > 0)
 			printf("%14.1f/s\n",
--- pfctl/pfctl_qstats.c	Sat Jun 21 17:29:45 2003
+++ pfctl/pfctl_qstats.c	Sat Jun 21 18:32:19 2003
@@ -40,6 +40,7 @@
 #include <arpa/inet.h>
 
 #include <err.h>
+#include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -280,8 +281,8 @@
 {
 	double	interval;
 
-	printf("[ pkts: %10llu  bytes: %10llu  "
-	    "dropped pkts: %6llu bytes: %6llu ]\n",
+	printf("[ pkts: %10"PRIu64"  bytes: %10"PRIu64"  "
+	    "dropped pkts: %6"PRIu64" bytes: %6"PRIu64" ]\n",
 	    cur.data.cbq_stats.xmit_cnt.packets,
 	    cur.data.cbq_stats.xmit_cnt.bytes,
 	    cur.data.cbq_stats.drop_cnt.packets,
@@ -306,8 +307,8 @@
 {
 	double	interval;
 
-	printf("[ pkts: %10llu  bytes: %10llu  "
-	    "dropped pkts: %6llu bytes: %6llu ]\n",
+	printf("[ pkts: %10"PRIu64"  bytes: %10"PRIu64"  "
+	    "dropped pkts: %6"PRIu64" bytes: %6"PRIu64" ]\n",
 	    cur.data.priq_stats.xmitcnt.packets,
 	    cur.data.priq_stats.xmitcnt.bytes,
 	    cur.data.priq_stats.dropcnt.packets,
--- pfctl/pfctl_table.c	Sat Jun 21 17:29:45 2003
+++ pfctl/pfctl_table.c	Sat Jun 21 18:32:36 2003
@@ -42,6 +42,7 @@
 #include <ctype.h>
 #include <err.h>
 #include <errno.h>
+#include <inttypes.h>
 #include <netdb.h>
 #include <stdarg.h>
 #include <stdio.h>
@@ -363,11 +364,11 @@
 	printf("\tAddresses:   %d\n", ts->pfrts_cnt);
 	printf("\tReferences:  %d\n", ts->pfrts_refcnt);
 	printf("\tCleared:     %s", ctime(&time));
-	printf("\tEvaluations: [ NoMatch: %-18llu Match: %-18llu ]\n",
+	printf("\tEvaluations: [ NoMatch: %-18"PRIu64" Match: %-18"PRIu64" ]\n",
 	    ts->pfrts_nomatch, ts->pfrts_match);
 	for (dir = 0; dir < PFR_DIR_MAX; dir++)
 		for (op = 0; op < PFR_OP_TABLE_MAX; op++)
-			printf("\t%-12s [ Packets: %-18llu Bytes: %-18llu ]\n",
+			printf("\t%-12s [ Packets: %-18"PRIu64" Bytes: %-18"PRIu64" ]\n",
 			    stats_text[dir][op],
 			    ts->pfrts_packets[dir][op],
 			    ts->pfrts_bytes[dir][op]);
@@ -541,7 +542,7 @@
 	printf("\tCleared:     %s", ctime(&time));
 	for (dir = 0; dir < PFR_DIR_MAX; dir++)
 		for (op = 0; op < PFR_OP_ADDR_MAX; op++)
-			printf("\t%-12s [ Packets: %-18llu Bytes: %-18llu ]\n",
+			printf("\t%-12s [ Packets: %-18"PRIu64" Bytes: %-18"PRIu64" ]\n",
 			    stats_text[dir][op],
 			    as->pfras_packets[dir][op],
 			    as->pfras_bytes[dir][op]);
 
  |