Deleted Added
full compact
if_llatbl.c (201282) if_llatbl.c (205066)
1/*
2 * Copyright (c) 2004 Luigi Rizzo, Alessandro Cerri. All rights reserved.
3 * Copyright (c) 2004-2008 Qing Li. All rights reserved.
4 * Copyright (c) 2008 Kip Macy. 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:

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

20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27#include <sys/cdefs.h>
1/*
2 * Copyright (c) 2004 Luigi Rizzo, Alessandro Cerri. All rights reserved.
3 * Copyright (c) 2004-2008 Qing Li. All rights reserved.
4 * Copyright (c) 2008 Kip Macy. 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:

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

20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/net/if_llatbl.c 201282 2009-12-30 21:35:34Z qingli $");
28__FBSDID("$FreeBSD: head/sys/net/if_llatbl.c 205066 2010-03-12 05:03:26Z kmacy $");
29
30#include "opt_inet.h"
31#include "opt_inet6.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/malloc.h>
36#include <sys/mbuf.h>

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

106 if (lle->la_hold != NULL)
107 m_freem(lle->la_hold);
108
109 LLE_FREE_LOCKED(lle);
110}
111
112/*
113 * Update an llentry for address dst (equivalent to rtalloc for new-arp)
29
30#include "opt_inet.h"
31#include "opt_inet6.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/malloc.h>
36#include <sys/mbuf.h>

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

106 if (lle->la_hold != NULL)
107 m_freem(lle->la_hold);
108
109 LLE_FREE_LOCKED(lle);
110}
111
112/*
113 * Update an llentry for address dst (equivalent to rtalloc for new-arp)
114 * Caller must pass in a valid struct llentry *
114 * Caller must pass in a valid struct llentry * (or NULL)
115 *
116 * if found the llentry * is returned referenced and unlocked
117 */
118int
119llentry_update(struct llentry **llep, struct lltable *lt,
115 *
116 * if found the llentry * is returned referenced and unlocked
117 */
118int
119llentry_update(struct llentry **llep, struct lltable *lt,
120 struct sockaddr *dst, struct ifnet *ifp)
120 struct sockaddr_storage *dst, struct ifnet *ifp)
121{
122 struct llentry *la;
123
124 IF_AFDATA_RLOCK(ifp);
125 la = lla_lookup(lt, LLE_EXCLUSIVE,
126 (struct sockaddr *)dst);
127 IF_AFDATA_RUNLOCK(ifp);
128 if ((la == NULL) &&

--- 256 unchanged lines hidden ---
121{
122 struct llentry *la;
123
124 IF_AFDATA_RLOCK(ifp);
125 la = lla_lookup(lt, LLE_EXCLUSIVE,
126 (struct sockaddr *)dst);
127 IF_AFDATA_RUNLOCK(ifp);
128 if ((la == NULL) &&

--- 256 unchanged lines hidden ---