if_llatbl.h (215207) | if_llatbl.h (216859) |
---|---|
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.h 215207 2010-11-12 22:03:02Z gnn $"); | 28__FBSDID("$FreeBSD: head/sys/net/if_llatbl.h 216859 2010-12-31 21:57:54Z bz $"); |
29 30#ifndef _NET_IF_LLATBL_H_ 31#define _NET_IF_LLATBL_H_ 32 33#include <sys/_rwlock.h> 34#include <netinet/in.h> 35 36struct ifnet; --- 74 unchanged lines hidden (view full) --- 111#define LLE_FREE_LOCKED(lle) do { \ 112 if ((lle)->lle_refcnt <= 1) \ 113 (lle)->lle_tbl->llt_free((lle)->lle_tbl, (lle));\ 114 else { \ 115 (lle)->lle_refcnt--; \ 116 LLE_WUNLOCK(lle); \ 117 } \ 118 /* guard against invalid refs */ \ | 29 30#ifndef _NET_IF_LLATBL_H_ 31#define _NET_IF_LLATBL_H_ 32 33#include <sys/_rwlock.h> 34#include <netinet/in.h> 35 36struct ifnet; --- 74 unchanged lines hidden (view full) --- 111#define LLE_FREE_LOCKED(lle) do { \ 112 if ((lle)->lle_refcnt <= 1) \ 113 (lle)->lle_tbl->llt_free((lle)->lle_tbl, (lle));\ 114 else { \ 115 (lle)->lle_refcnt--; \ 116 LLE_WUNLOCK(lle); \ 117 } \ 118 /* guard against invalid refs */ \ |
119 lle = 0; \ | 119 lle = NULL; \ |
120} while (0) 121 122#define LLE_FREE(lle) do { \ 123 LLE_WLOCK(lle); \ | 120} while (0) 121 122#define LLE_FREE(lle) do { \ 123 LLE_WLOCK(lle); \ |
124 if ((lle)->lle_refcnt <= 1) \ 125 (lle)->lle_tbl->llt_free((lle)->lle_tbl, (lle));\ 126 else { \ 127 (lle)->lle_refcnt--; \ 128 LLE_WUNLOCK(lle); \ 129 } \ 130 /* guard against invalid refs */ \ 131 lle = NULL; \ | 124 LLE_FREE_LOCKED(lle); \ |
132} while (0) 133 134 135#define ln_timer_ch lle_timer.ln_timer_ch 136#define la_timer lle_timer.la_timer 137 138/* XXX bad name */ 139#define L3_ADDR(lle) ((struct sockaddr *)(&lle[1])) --- 70 unchanged lines hidden --- | 125} while (0) 126 127 128#define ln_timer_ch lle_timer.ln_timer_ch 129#define la_timer lle_timer.la_timer 130 131/* XXX bad name */ 132#define L3_ADDR(lle) ((struct sockaddr *)(&lle[1])) --- 70 unchanged lines hidden --- |