Deleted Added
full compact
pf_print_state.c (223637) pf_print_state.c (240233)
1/* $OpenBSD: pf_print_state.c,v 1.52 2008/08/12 16:40:18 david Exp $ */
2
3/*
4 * Copyright (c) 2001 Daniel Hartmeier
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

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

26 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
28 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
30 *
31 */
32
33#include <sys/cdefs.h>
1/* $OpenBSD: pf_print_state.c,v 1.52 2008/08/12 16:40:18 david Exp $ */
2
3/*
4 * Copyright (c) 2001 Daniel Hartmeier
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

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

26 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
28 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
30 *
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/contrib/pf/pfctl/pf_print_state.c 223637 2011-06-28 11:57:25Z bz $");
34__FBSDID("$FreeBSD: head/contrib/pf/pfctl/pf_print_state.c 240233 2012-09-08 06:41:54Z glebius $");
35
36#include <sys/types.h>
37#include <sys/socket.h>
38#ifdef __FreeBSD__
39#include <sys/endian.h>
40#define betoh64 be64toh
41#endif
42#include <net/if.h>

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

114 }
115 break;
116 case PF_ADDR_NOROUTE:
117 printf("no-route");
118 return;
119 case PF_ADDR_URPFFAILED:
120 printf("urpf-failed");
121 return;
35
36#include <sys/types.h>
37#include <sys/socket.h>
38#ifdef __FreeBSD__
39#include <sys/endian.h>
40#define betoh64 be64toh
41#endif
42#include <net/if.h>

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

114 }
115 break;
116 case PF_ADDR_NOROUTE:
117 printf("no-route");
118 return;
119 case PF_ADDR_URPFFAILED:
120 printf("urpf-failed");
121 return;
122 case PF_ADDR_RTLABEL:
123 printf("route \"%s\"", addr->v.rtlabelname);
124 return;
125 default:
126 printf("?");
127 return;
128 }
129
130 /* mask if not _both_ address and mask are zero */
131 if (addr->type != PF_ADDR_RANGE &&
132 !(PF_AZERO(&addr->v.a.addr, AF_INET6) &&

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

334 betoh64(bytes[1]));
335#endif
336 if (ntohl(s->anchor) != -1)
337 printf(", anchor %u", ntohl(s->anchor));
338 if (ntohl(s->rule) != -1)
339 printf(", rule %u", ntohl(s->rule));
340 if (s->state_flags & PFSTATE_SLOPPY)
341 printf(", sloppy");
122 default:
123 printf("?");
124 return;
125 }
126
127 /* mask if not _both_ address and mask are zero */
128 if (addr->type != PF_ADDR_RANGE &&
129 !(PF_AZERO(&addr->v.a.addr, AF_INET6) &&

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

331 betoh64(bytes[1]));
332#endif
333 if (ntohl(s->anchor) != -1)
334 printf(", anchor %u", ntohl(s->anchor));
335 if (ntohl(s->rule) != -1)
336 printf(", rule %u", ntohl(s->rule));
337 if (s->state_flags & PFSTATE_SLOPPY)
338 printf(", sloppy");
342 if (s->state_flags & PFSTATE_PFLOW)
343 printf(", pflow");
344 if (s->sync_flags & PFSYNC_FLAG_SRCNODE)
345 printf(", source-track");
346 if (s->sync_flags & PFSYNC_FLAG_NATSRCNODE)
347 printf(", sticky-address");
348 printf("\n");
349 }
350 if (opts & PF_OPT_VERBOSE2) {
351 u_int64_t id;

--- 29 unchanged lines hidden ---
339 if (s->sync_flags & PFSYNC_FLAG_SRCNODE)
340 printf(", source-track");
341 if (s->sync_flags & PFSYNC_FLAG_NATSRCNODE)
342 printf(", sticky-address");
343 printf("\n");
344 }
345 if (opts & PF_OPT_VERBOSE2) {
346 u_int64_t id;

--- 29 unchanged lines hidden ---