if_llatbl.h (219819) | if_llatbl.h (222143) |
---|---|
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 219819 2011-03-21 09:40:01Z jeff $"); | 28__FBSDID("$FreeBSD: head/sys/net/if_llatbl.h 222143 2011-05-20 19:12:20Z qingli $"); |
29 30#ifndef _NET_IF_LLATBL_H_ 31#define _NET_IF_LLATBL_H_ 32 33#include "opt_ofed.h" 34 35#include <sys/_rwlock.h> 36#include <netinet/in.h> --- 113 unchanged lines hidden (view full) --- 150 struct llentries lle_head[LLTBL_HASHTBL_SIZE]; 151 int llt_af; 152 struct ifnet *llt_ifp; 153 154 struct llentry * (*llt_new)(const struct sockaddr *, u_int); 155 void (*llt_free)(struct lltable *, struct llentry *); 156 void (*llt_prefix_free)(struct lltable *, 157 const struct sockaddr *prefix, | 29 30#ifndef _NET_IF_LLATBL_H_ 31#define _NET_IF_LLATBL_H_ 32 33#include "opt_ofed.h" 34 35#include <sys/_rwlock.h> 36#include <netinet/in.h> --- 113 unchanged lines hidden (view full) --- 150 struct llentries lle_head[LLTBL_HASHTBL_SIZE]; 151 int llt_af; 152 struct ifnet *llt_ifp; 153 154 struct llentry * (*llt_new)(const struct sockaddr *, u_int); 155 void (*llt_free)(struct lltable *, struct llentry *); 156 void (*llt_prefix_free)(struct lltable *, 157 const struct sockaddr *prefix, |
158 const struct sockaddr *mask); | 158 const struct sockaddr *mask, 159 u_int flags); |
159 struct llentry * (*llt_lookup)(struct lltable *, u_int flags, 160 const struct sockaddr *l3addr); 161 int (*llt_rtcheck)(struct ifnet *, u_int flags, 162 const struct sockaddr *); 163 int (*llt_dump)(struct lltable *, 164 struct sysctl_req *); 165}; 166MALLOC_DECLARE(M_LLTABLE); --- 12 unchanged lines hidden (view full) --- 179#define LLE_EXCLUSIVE 0x2000 /* return lle xlocked */ 180 181#define LLATBL_HASH(key, mask) \ 182 (((((((key >> 8) ^ key) >> 8) ^ key) >> 8) ^ key) & mask) 183 184struct lltable *lltable_init(struct ifnet *, int); 185void lltable_free(struct lltable *); 186void lltable_prefix_free(int, struct sockaddr *, | 160 struct llentry * (*llt_lookup)(struct lltable *, u_int flags, 161 const struct sockaddr *l3addr); 162 int (*llt_rtcheck)(struct ifnet *, u_int flags, 163 const struct sockaddr *); 164 int (*llt_dump)(struct lltable *, 165 struct sysctl_req *); 166}; 167MALLOC_DECLARE(M_LLTABLE); --- 12 unchanged lines hidden (view full) --- 180#define LLE_EXCLUSIVE 0x2000 /* return lle xlocked */ 181 182#define LLATBL_HASH(key, mask) \ 183 (((((((key >> 8) ^ key) >> 8) ^ key) >> 8) ^ key) & mask) 184 185struct lltable *lltable_init(struct ifnet *, int); 186void lltable_free(struct lltable *); 187void lltable_prefix_free(int, struct sockaddr *, |
187 struct sockaddr *); | 188 struct sockaddr *, u_int); |
188#if 0 189void lltable_drain(int); 190#endif 191int lltable_sysctl_dumparp(int, struct sysctl_req *); 192 193size_t llentry_free(struct llentry *); 194int llentry_update(struct llentry **, struct lltable *, 195 struct sockaddr_storage *, struct ifnet *); --- 12 unchanged lines hidden --- | 189#if 0 190void lltable_drain(int); 191#endif 192int lltable_sysctl_dumparp(int, struct sysctl_req *); 193 194size_t llentry_free(struct llentry *); 195int llentry_update(struct llentry **, struct lltable *, 196 struct sockaddr_storage *, struct ifnet *); --- 12 unchanged lines hidden --- |