if_llatbl.h (205066) | if_llatbl.h (213929) |
---|---|
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 205066 2010-03-12 05:03:26Z kmacy $"); | 28__FBSDID("$FreeBSD: head/sys/net/if_llatbl.h 213929 2010-10-16 18:42:09Z 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; --- 144 unchanged lines hidden (view full) --- 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 *, 188 struct sockaddr *); | 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; --- 144 unchanged lines hidden (view full) --- 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 *, 188 struct sockaddr *); |
189#if 0 |
|
189void lltable_drain(int); | 190void lltable_drain(int); |
191#endif |
|
190int lltable_sysctl_dumparp(int, struct sysctl_req *); 191 192void llentry_free(struct llentry *); 193int llentry_update(struct llentry **, struct lltable *, 194 struct sockaddr_storage *, struct ifnet *); 195 196/* 197 * Generic link layer address lookup function. 198 */ 199static __inline struct llentry * 200lla_lookup(struct lltable *llt, u_int flags, const struct sockaddr *l3addr) 201{ 202 return llt->llt_lookup(llt, flags, l3addr); 203} 204 205int lla_rt_output(struct rt_msghdr *, struct rt_addrinfo *); 206#endif /* _NET_IF_LLATBL_H_ */ | 192int lltable_sysctl_dumparp(int, struct sysctl_req *); 193 194void llentry_free(struct llentry *); 195int llentry_update(struct llentry **, struct lltable *, 196 struct sockaddr_storage *, struct ifnet *); 197 198/* 199 * Generic link layer address lookup function. 200 */ 201static __inline struct llentry * 202lla_lookup(struct lltable *llt, u_int flags, const struct sockaddr *l3addr) 203{ 204 return llt->llt_lookup(llt, flags, l3addr); 205} 206 207int lla_rt_output(struct rt_msghdr *, struct rt_addrinfo *); 208#endif /* _NET_IF_LLATBL_H_ */ |