pfctl_radix.c (a8a95277363be2c92b3c06bd9cd1a32d1c6c6ecd) | pfctl_radix.c (6463b6b59152fb1695bbe0de78f6e2675c5a765a) |
---|---|
1/* $OpenBSD: pfctl_radix.c,v 1.27 2005/05/21 21:03:58 henning Exp $ */ 2 3/*- 4 * SPDX-License-Identifier: BSD-2-Clause 5 * 6 * Copyright (c) 2002 Cedric Berger 7 * All rights reserved. 8 * --- 273 unchanged lines hidden (view full) --- 282 pfr_report_error(tbl, &io, "get astats from"); 283 return (-1); 284 } 285 *size = io.pfrio_size; 286 return (0); 287} 288 289int | 1/* $OpenBSD: pfctl_radix.c,v 1.27 2005/05/21 21:03:58 henning Exp $ */ 2 3/*- 4 * SPDX-License-Identifier: BSD-2-Clause 5 * 6 * Copyright (c) 2002 Cedric Berger 7 * All rights reserved. 8 * --- 273 unchanged lines hidden (view full) --- 282 pfr_report_error(tbl, &io, "get astats from"); 283 return (-1); 284 } 285 *size = io.pfrio_size; 286 return (0); 287} 288 289int |
290pfr_clr_astats(struct pfr_table *tbl, struct pfr_addr *addr, int size, 291 int *nzero, int flags) 292{ 293 struct pfioc_table io; 294 295 if (size < 0 || (size && !tbl) || addr == NULL) { 296 errno = EINVAL; 297 return (-1); 298 } 299 bzero(&io, sizeof io); 300 io.pfrio_flags = flags; 301 io.pfrio_table = *tbl; 302 io.pfrio_buffer = addr; 303 io.pfrio_esize = sizeof(*addr); 304 io.pfrio_size = size; 305 if (ioctl(dev, DIOCRCLRASTATS, &io) == -1) 306 return (-1); 307 if (nzero) 308 *nzero = io.pfrio_nzero; 309 return (0); 310} 311 312int |
|
290pfr_clr_tstats(struct pfr_table *tbl, int size, int *nzero, int flags) 291{ 292 struct pfioc_table io; 293 294 if (size < 0 || (size && !tbl)) { 295 errno = EINVAL; 296 return (-1); 297 } --- 278 unchanged lines hidden --- | 313pfr_clr_tstats(struct pfr_table *tbl, int size, int *nzero, int flags) 314{ 315 struct pfioc_table io; 316 317 if (size < 0 || (size && !tbl)) { 318 errno = EINVAL; 319 return (-1); 320 } --- 278 unchanged lines hidden --- |