Deleted Added
full compact
nfs_diskless.c (177253) nfs_diskless.c (181803)
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

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 * from: @(#)autoconf.c 7.1 (Berkeley) 5/9/91
33 */
34
35#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

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 * from: @(#)autoconf.c 7.1 (Berkeley) 5/9/91
33 */
34
35#include <sys/cdefs.h>
36__FBSDID("$FreeBSD: head/sys/nfsclient/nfs_diskless.c 177253 2008-03-16 10:58:09Z rwatson $");
36__FBSDID("$FreeBSD: head/sys/nfsclient/nfs_diskless.c 181803 2008-08-17 23:27:27Z bz $");
37
38#include "opt_bootp.h"
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/kernel.h>
43#include <sys/malloc.h>
44#include <sys/mount.h>
45
46#include <sys/socket.h>
37
38#include "opt_bootp.h"
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/kernel.h>
43#include <sys/malloc.h>
44#include <sys/mount.h>
45
46#include <sys/socket.h>
47#include <sys/vimage.h>
47#include <net/if.h>
48#include <net/if_dl.h>
49#include <net/if_types.h>
50#include <net/if_var.h>
51#include <net/ethernet.h>
52#include <netinet/in.h>
53#include <rpc/rpcclnt.h>
54#include <nfs/rpcv2.h>

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

171 bcopy(&netmask, &nd->myif.ifra_mask, sizeof(netmask));
172
173 if (hwaddr_to_sockaddr("boot.netif.hwaddr", &ourdl)) {
174 printf("nfs_diskless: no hardware address\n");
175 return;
176 }
177 ifa = NULL;
178 IFNET_RLOCK();
48#include <net/if.h>
49#include <net/if_dl.h>
50#include <net/if_types.h>
51#include <net/if_var.h>
52#include <net/ethernet.h>
53#include <netinet/in.h>
54#include <rpc/rpcclnt.h>
55#include <nfs/rpcv2.h>

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

172 bcopy(&netmask, &nd->myif.ifra_mask, sizeof(netmask));
173
174 if (hwaddr_to_sockaddr("boot.netif.hwaddr", &ourdl)) {
175 printf("nfs_diskless: no hardware address\n");
176 return;
177 }
178 ifa = NULL;
179 IFNET_RLOCK();
179 TAILQ_FOREACH(ifp, &ifnet, if_link) {
180 TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
180 TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
181 if (ifa->ifa_addr->sa_family == AF_LINK) {
182 sdl = (struct sockaddr_dl *)ifa->ifa_addr;
183 if ((sdl->sdl_type == ourdl.sdl_type) &&
184 (sdl->sdl_alen == ourdl.sdl_alen) &&
185 !bcmp(LLADDR(sdl),
186 LLADDR(&ourdl),
187 sdl->sdl_alen)) {

--- 150 unchanged lines hidden ---
181 TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
182 if (ifa->ifa_addr->sa_family == AF_LINK) {
183 sdl = (struct sockaddr_dl *)ifa->ifa_addr;
184 if ((sdl->sdl_type == ourdl.sdl_type) &&
185 (sdl->sdl_alen == ourdl.sdl_alen) &&
186 !bcmp(LLADDR(sdl),
187 LLADDR(&ourdl),
188 sdl->sdl_alen)) {

--- 150 unchanged lines hidden ---