#include <linux/types.h>#include <linux/slab.h>#include <linux/interrupt.h>#include <linux/spinlock.h>#include <linux/random.h>#include <linux/sched.h>#include <linux/timer.h>#include <linux/time.h>#include <linux/kernel.h>#include <linux/mm.h>#include <net/inetpeer.h>Go to the source code of this file.
Defines | |
| #define | node_height(x) x->avl_height |
| #define | peer_avl_empty (&peer_fake_node) |
| #define | PEER_MAXDEPTH 40 |
| #define | PEER_MAX_CLEANUP_WORK 30 |
| #define | lookup(daddr) |
| #define | lookup_rightempty(start) |
| #define | link_to_pool(n) |
Functions | |
| void | peer_check_expire (unsigned long dummy) |
| void __init | inet_initpeers (void) |
| void | unlink_from_unused (struct inet_peer *p) |
| void | peer_avl_rebalance (struct inet_peer **stack[], struct inet_peer ***stackend) |
| void | unlink_from_pool (struct inet_peer *p) |
| int | cleanup_once (unsigned long ttl) |
| inet_peer * | inet_getpeer (__u32 daddr, int create) |
Variables | |
| spinlock_t | inet_peer_idlock = SPIN_LOCK_UNLOCKED |
| kmem_cache_t * | peer_cachep |
| inet_peer | peer_fake_node |
| inet_peer * | peer_root = peer_avl_empty |
| rwlock_t | peer_pool_lock = RW_LOCK_UNLOCKED |
| volatile int | peer_total |
| int | inet_peer_threshold = 65536 + 128 |
| int | inet_peer_minttl = 120 * HZ |
| int | inet_peer_maxttl = 10 * 60 * HZ |
| inet_peer * | inet_peer_unused_head |
| inet_peer ** | inet_peer_unused_tailp = &inet_peer_unused_head |
| spinlock_t | inet_peer_unused_lock = SPIN_LOCK_UNLOCKED |
| timer_list | peer_periodic_timer |
| int | inet_peer_gc_mintime |
|
|
Value: Definition at line 267 of file inetpeer.c. Referenced by inet_getpeer(). |
|
|
Value: Definition at line 156 of file inetpeer.c. Referenced by inet_getpeer(), and unlink_from_pool(). |
|
|
Value: Definition at line 175 of file inetpeer.c. Referenced by unlink_from_pool(). |
|
|
Definition at line 75 of file inetpeer.c. Referenced by peer_avl_rebalance(). |
|
|
Definition at line 81 of file inetpeer.c. Referenced by inet_getpeer(), and unlink_from_pool(). |
|
|
Definition at line 97 of file inetpeer.c. Referenced by peer_check_expire(). |
|
|
Definition at line 84 of file inetpeer.c. Referenced by inet_getpeer(), and unlink_from_pool(). |
|
|
Definition at line 335 of file inetpeer.c. References inet_peer_unused_head, inet_peer_unused_lock, inet_peer_unused_tailp, unlink_from_pool(), inet_peer::unused_next, and inet_peer::unused_prevp. Referenced by inet_getpeer(), and peer_check_expire().
|
|
||||||||||||
|
Definition at line 371 of file inetpeer.c. References cleanup_once(), inet_peer_threshold, link_to_pool, lookup, peer_avl_empty, peer_cachep, PEER_MAXDEPTH, peer_pool_lock, peer_total, and unlink_from_unused(). Referenced by rt_bind_peer(), tcp_v4_remember_stamp(), and tcp_v4_tw_remember_stamp().
|
|
|
Definition at line 108 of file inetpeer.c. References inet_peer_gc_maxtime, inet_peer_threshold, net_random(), peer_cachep, and peer_periodic_timer. Referenced by ip_init().
|
|
||||||||||||
|
Definition at line 191 of file inetpeer.c. References inet_peer::avl_left, inet_peer::avl_right, and node_height. Referenced by unlink_from_pool().
|
|
|
Definition at line 432 of file inetpeer.c. References cleanup_once(), inet_peer_gc_maxtime, inet_peer_gc_mintime, inet_peer_maxttl, inet_peer_minttl, inet_peer_threshold, PEER_MAX_CLEANUP_WORK, peer_periodic_timer, and peer_total.
|
|
|
Definition at line 277 of file inetpeer.c. References inet_peer::avl_height, inet_peer::avl_left, inet_peer::avl_right, inet_putpeer(), lookup, lookup_rightempty, peer_avl_empty, peer_avl_rebalance(), peer_cachep, PEER_MAXDEPTH, peer_pool_lock, peer_total, inet_peer::refcnt, and inet_peer::v4daddr. Referenced by cleanup_once().
|
|
|
Definition at line 140 of file inetpeer.c. References inet_peer_unused_lock, inet_peer_unused_tailp, inet_peer::unused_next, and inet_peer::unused_prevp. Referenced by inet_getpeer().
|
|
|
Initial value: Definition at line 104 of file inetpeer.c. Referenced by peer_check_expire(). |
|
|
Definition at line 71 of file inetpeer.c. Referenced by inet_getid(). |
|
|
Definition at line 91 of file inetpeer.c. Referenced by peer_check_expire(). |
|
|
Definition at line 90 of file inetpeer.c. Referenced by peer_check_expire(). |
|
|
Definition at line 88 of file inetpeer.c. Referenced by inet_getpeer(), inet_initpeers(), and peer_check_expire(). |
|
|
Definition at line 94 of file inetpeer.c. Referenced by cleanup_once(). |
|
|
Definition at line 96 of file inetpeer.c. Referenced by cleanup_once(), inet_putpeer(), and unlink_from_unused(). |
|
|
Definition at line 95 of file inetpeer.c. Referenced by cleanup_once(), inet_putpeer(), and unlink_from_unused(). |
|
|
Definition at line 73 of file inetpeer.c. Referenced by inet_getpeer(), inet_initpeers(), and unlink_from_pool(). |
|
|
Initial value: Definition at line 76 of file inetpeer.c. |
|
|
Initial value: Definition at line 100 of file inetpeer.c. Referenced by inet_initpeers(), and peer_check_expire(). |
|
|
Definition at line 83 of file inetpeer.c. Referenced by inet_getpeer(), and unlink_from_pool(). |
|
|
Definition at line 82 of file inetpeer.c. |
|
|
Definition at line 86 of file inetpeer.c. Referenced by inet_getpeer(), peer_check_expire(), and unlink_from_pool(). |
1.3.8