pfkey.c (98e0ffaefb0f241cda3a72395d3be04192ae0d47) pfkey.c (4ffc6e480d2775e27c5b46600050489261e58463)
1/* $NetBSD: inet.c,v 1.35.2.1 1999/04/29 14:57:08 perry Exp $ */
2/* $KAME: ipsec.c,v 1.25 2001/03/12 09:04:39 itojun Exp $ */
3/*-
4 * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 114 unchanged lines hidden (view full) ---

123 xo_emit("{T:/%s}:\n", name);
124 xo_open_container(name);
125 kread_counters(off, (char *)&pfkeystat, sizeof(pfkeystat));
126
127#define p(f, m) if (pfkeystat.f || sflag <= 1) \
128 xo_emit(m, (uintmax_t)pfkeystat.f, plural(pfkeystat.f))
129
130 /* userland -> kernel */
1/* $NetBSD: inet.c,v 1.35.2.1 1999/04/29 14:57:08 perry Exp $ */
2/* $KAME: ipsec.c,v 1.25 2001/03/12 09:04:39 itojun Exp $ */
3/*-
4 * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 114 unchanged lines hidden (view full) ---

123 xo_emit("{T:/%s}:\n", name);
124 xo_open_container(name);
125 kread_counters(off, (char *)&pfkeystat, sizeof(pfkeystat));
126
127#define p(f, m) if (pfkeystat.f || sflag <= 1) \
128 xo_emit(m, (uintmax_t)pfkeystat.f, plural(pfkeystat.f))
129
130 /* userland -> kernel */
131 p(out_total, "\t{:sent-requests//%ju} "
131 p(out_total, "\t{:sent-requests/%ju} "
132 "{N:/request%s sent from userland}\n");
133 p(out_bytes, "\t{:sent-bytes/%ju} "
134 "{N:/byte%s sent from userland}\n");
135 for (first = 1, type = 0;
136 type<sizeof(pfkeystat.out_msgtype)/sizeof(pfkeystat.out_msgtype[0]);
137 type++) {
138 if (pfkeystat.out_msgtype[type] <= 0)
139 continue;

--- 20 unchanged lines hidden (view full) ---

160 p(out_tooshort, "\t{:dropped-too-short/%ju} "
161 "{N:/message%s too short}\n");
162 p(out_nomem, "\t{:dropped-no-memory/%ju} "
163 "{N:/message%s with memory allocation failure}\n");
164 p(out_dupext, "\t{:dropped-duplicate-extension/%ju} "
165 "{N:/message%s with duplicate extension}\n");
166 p(out_invexttype, "\t{:dropped-bad-extension/%ju} "
167 "{N:/message%s with invalid extension type}\n");
132 "{N:/request%s sent from userland}\n");
133 p(out_bytes, "\t{:sent-bytes/%ju} "
134 "{N:/byte%s sent from userland}\n");
135 for (first = 1, type = 0;
136 type<sizeof(pfkeystat.out_msgtype)/sizeof(pfkeystat.out_msgtype[0]);
137 type++) {
138 if (pfkeystat.out_msgtype[type] <= 0)
139 continue;

--- 20 unchanged lines hidden (view full) ---

160 p(out_tooshort, "\t{:dropped-too-short/%ju} "
161 "{N:/message%s too short}\n");
162 p(out_nomem, "\t{:dropped-no-memory/%ju} "
163 "{N:/message%s with memory allocation failure}\n");
164 p(out_dupext, "\t{:dropped-duplicate-extension/%ju} "
165 "{N:/message%s with duplicate extension}\n");
166 p(out_invexttype, "\t{:dropped-bad-extension/%ju} "
167 "{N:/message%s with invalid extension type}\n");
168 p(out_invsatype, "\t:dropped-bad-sa-type/%ju} "
168 p(out_invsatype, "\t{:dropped-bad-sa-type/%ju} "
169 "{N:/message%s with invalid sa type}\n");
170 p(out_invaddr, "\t{:dropped-bad-address-extension/%ju} "
171 "{N:/message%s with invalid address extension}\n");
172
173 /* kernel -> userland */
174 p(in_total, "\t{:received-requests/%ju} "
175 "{N:/request%s sent to userland}\n");
176 p(in_bytes, "\t{:received-bytes/%ju} "

--- 32 unchanged lines hidden ---
169 "{N:/message%s with invalid sa type}\n");
170 p(out_invaddr, "\t{:dropped-bad-address-extension/%ju} "
171 "{N:/message%s with invalid address extension}\n");
172
173 /* kernel -> userland */
174 p(in_total, "\t{:received-requests/%ju} "
175 "{N:/request%s sent to userland}\n");
176 p(in_bytes, "\t{:received-bytes/%ju} "

--- 32 unchanged lines hidden ---