ifmcstat.c (191672) | ifmcstat.c (192923) |
---|---|
1/* $KAME: ifmcstat.c,v 1.48 2006/11/15 05:13:59 itojun Exp $ */ 2 3/* 4 * Copyright (c) 2007-2009 Bruce Simpson. 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 17 unchanged lines hidden (view full) --- 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> | 1/* $KAME: ifmcstat.c,v 1.48 2006/11/15 05:13:59 itojun Exp $ */ 2 3/* 4 * Copyright (c) 2007-2009 Bruce Simpson. 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 17 unchanged lines hidden (view full) --- 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/usr.sbin/ifmcstat/ifmcstat.c 191672 2009-04-29 19:19:13Z bms $"); | 34__FBSDID("$FreeBSD: head/usr.sbin/ifmcstat/ifmcstat.c 192923 2009-05-27 18:57:13Z bms $"); |
35 36#include <sys/types.h> 37#include <sys/param.h> 38#include <sys/sysctl.h> 39#include <sys/socket.h> 40#include <sys/queue.h> 41#include <sys/tree.h> 42 --- 216 unchanged lines hidden (view full) --- 259 /*NOTREACHED*/ 260 } 261 } 262 263 if (af == AF_LINK && vflag) 264 usage(); 265 266#ifdef WITH_KVM | 35 36#include <sys/types.h> 37#include <sys/param.h> 38#include <sys/sysctl.h> 39#include <sys/socket.h> 40#include <sys/queue.h> 41#include <sys/tree.h> 42 --- 216 unchanged lines hidden (view full) --- 259 /*NOTREACHED*/ 260 } 261 } 262 263 if (af == AF_LINK && vflag) 264 usage(); 265 266#ifdef WITH_KVM |
267 if (!Kflag) | 267 if (Kflag) |
268 error = ifmcstat_kvm(kernel, core); 269 /* 270 * If KVM failed, and user did not explicitly specify a core file, 271 * or force KVM backend to be disabled, try the sysctl backend. 272 */ | 268 error = ifmcstat_kvm(kernel, core); 269 /* 270 * If KVM failed, and user did not explicitly specify a core file, 271 * or force KVM backend to be disabled, try the sysctl backend. 272 */ |
273 if (Kflag || (error != 0 && (core == NULL && kernel == NULL))) | 273 if (!Kflag || (error != 0 && (core == NULL && kernel == NULL))) |
274#endif 275 error = ifmcstat_getifmaddrs(); 276 if (error != 0) 277 exit(EX_OSERR); 278 279 exit(EX_OK); 280 /*NOTREACHED*/ 281} --- 960 unchanged lines hidden --- | 274#endif 275 error = ifmcstat_getifmaddrs(); 276 if (error != 0) 277 exit(EX_OSERR); 278 279 exit(EX_OK); 280 /*NOTREACHED*/ 281} --- 960 unchanged lines hidden --- |