Deleted Added
sdiff udiff text old ( 126354 ) new ( 126355 )
full compact
1/* $FreeBSD: head/contrib/pf/pfctl/pfctl_table.c 126355 2004-02-28 17:32:53Z mlaier $ */
2/* $OpenBSD: pfctl_table.c,v 1.50 2003/08/29 21:47:36 cedric Exp $ */
3
4/*
5 * Copyright (c) 2002 Cedric Berger
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

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

44#include <errno.h>
45#include <netdb.h>
46#include <stdarg.h>
47#include <stdio.h>
48#include <stdlib.h>
49#include <string.h>
50#include <time.h>
51
52#if defined(__FreeBSD__)
53#include <inttypes.h>
54#else
55#define PRIu64 "llu"
56#endif
57
58#include "pfctl_parser.h"
59#include "pfctl.h"
60
61extern void usage(void);
62static int pfctl_table(int, char *[], char *, const char *, char *,
63 const char *, const char *, int);
64static void print_table(struct pfr_table *, int, int);
65static void print_tstats(struct pfr_tstats *, int);

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

349 if (!debug && !(ts->pfrts_flags & PFR_TFLAG_ACTIVE))
350 return;
351 print_table(&ts->pfrts_t, 1, debug);
352 printf("\tAddresses: %d\n", ts->pfrts_cnt);
353 printf("\tCleared: %s", ctime(&time));
354 printf("\tReferences: [ Anchors: %-18d Rules: %-18d ]\n",
355 ts->pfrts_refcnt[PFR_REFCNT_ANCHOR],
356 ts->pfrts_refcnt[PFR_REFCNT_RULE]);
357 printf("\tEvaluations: [ NoMatch: %-18"PRIu64" Match: %-18"PRIu64" ]\n",
358 ts->pfrts_nomatch, ts->pfrts_match);
359 for (dir = 0; dir < PFR_DIR_MAX; dir++)
360 for (op = 0; op < PFR_OP_TABLE_MAX; op++)
361 printf("\t%-12s [ Packets: %-18"PRIu64" Bytes: %-18"PRIu64" ]\n",
362 stats_text[dir][op],
363 ts->pfrts_packets[dir][op],
364 ts->pfrts_bytes[dir][op]);
365}
366
367int
368load_addr(struct pfr_buffer *b, int argc, char *argv[], char *file,
369 int nonetwork)

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

431{
432 time_t time = as->pfras_tzero;
433 int dir, op;
434
435 print_addrx(&as->pfras_a, NULL, dns);
436 printf("\tCleared: %s", ctime(&time));
437 for (dir = 0; dir < PFR_DIR_MAX; dir++)
438 for (op = 0; op < PFR_OP_ADDR_MAX; op++)
439 printf("\t%-12s [ Packets: %-18"PRIu64" Bytes: %-18"PRIu64" ]\n",
440 stats_text[dir][op],
441 as->pfras_packets[dir][op],
442 as->pfras_bytes[dir][op]);
443}
444
445void
446radix_perror(void)
447{

--- 84 unchanged lines hidden ---