svr4_sockio.c (194739) | svr4_sockio.c (195699) |
---|---|
1/*- 2 * Copyright (c) 1998 Mark Newton 3 * Copyright (c) 1995 Christos Zoulas 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 13 unchanged lines hidden (view full) --- 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1998 Mark Newton 3 * Copyright (c) 1995 Christos Zoulas 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 13 unchanged lines hidden (view full) --- 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/compat/svr4/svr4_sockio.c 194739 2009-06-23 17:03:45Z bz $"); | 30__FBSDID("$FreeBSD: head/sys/compat/svr4/svr4_sockio.c 195699 2009-07-14 22:48:30Z rwatson $"); |
31 32#include <sys/param.h> 33#include <sys/proc.h> 34#include <sys/systm.h> 35#include <sys/file.h> 36#include <sys/filedesc.h> 37#include <sys/sockio.h> 38#include <sys/socket.h> --- 45 unchanged lines hidden (view full) --- 84{ 85 int error; 86 87 *retval = 0; 88 89 switch (cmd) { 90 case SVR4_SIOCGIFNUM: 91 { | 31 32#include <sys/param.h> 33#include <sys/proc.h> 34#include <sys/systm.h> 35#include <sys/file.h> 36#include <sys/filedesc.h> 37#include <sys/sockio.h> 38#include <sys/socket.h> --- 45 unchanged lines hidden (view full) --- 84{ 85 int error; 86 87 *retval = 0; 88 89 switch (cmd) { 90 case SVR4_SIOCGIFNUM: 91 { |
92 INIT_VNET_NET(curvnet); | |
93 struct ifnet *ifp; 94 struct ifaddr *ifa; 95 int ifnum = 0; 96 97 /* 98 * This does not return the number of physical 99 * interfaces (if_index), but the number of interfaces 100 * + addresses like ifconf() does, because this number --- 70 unchanged lines hidden --- | 92 struct ifnet *ifp; 93 struct ifaddr *ifa; 94 int ifnum = 0; 95 96 /* 97 * This does not return the number of physical 98 * interfaces (if_index), but the number of interfaces 99 * + addresses like ifconf() does, because this number --- 70 unchanged lines hidden --- |