ifpfsync.c (233847) | ifpfsync.c (288305) |
---|---|
1/* 2 * Copyright (c) 2003 Ryan McBride. All rights reserved. 3 * Copyright (c) 2004 Max Laier. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/* 2 * Copyright (c) 2003 Ryan McBride. All rights reserved. 3 * Copyright (c) 2004 Max Laier. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sbin/ifconfig/ifpfsync.c 233847 2012-04-03 18:10:48Z glebius $ | 26 * $FreeBSD: head/sbin/ifconfig/ifpfsync.c 288305 2015-09-27 07:51:18Z ngie $ |
27 */ 28 | 27 */ 28 |
29#include <sys/types.h> | 29#include <sys/param.h> |
30#include <sys/ioctl.h> 31#include <sys/socket.h> 32 33#include <net/if.h> 34#include <netinet/in.h> 35#include <net/pfvar.h> 36#include <net/if_pfsync.h> 37#include <net/route.h> --- 184 unchanged lines hidden (view full) --- 222 .af_name = "af_pfsync", 223 .af_af = AF_UNSPEC, 224 .af_other_status = pfsync_status, 225}; 226 227static __constructor void 228pfsync_ctor(void) 229{ | 30#include <sys/ioctl.h> 31#include <sys/socket.h> 32 33#include <net/if.h> 34#include <netinet/in.h> 35#include <net/pfvar.h> 36#include <net/if_pfsync.h> 37#include <net/route.h> --- 184 unchanged lines hidden (view full) --- 222 .af_name = "af_pfsync", 223 .af_af = AF_UNSPEC, 224 .af_other_status = pfsync_status, 225}; 226 227static __constructor void 228pfsync_ctor(void) 229{ |
230#define N(a) (sizeof(a) / sizeof(a[0])) | |
231 int i; 232 | 230 int i; 231 |
233 for (i = 0; i < N(pfsync_cmds); i++) | 232 for (i = 0; i < nitems(pfsync_cmds); i++) |
234 cmd_register(&pfsync_cmds[i]); 235 af_register(&af_pfsync); | 233 cmd_register(&pfsync_cmds[i]); 234 af_register(&af_pfsync); |
236#undef N | |
237} | 235} |