Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
inet_timewait_sock.h File Reference
#include <linux/kmemcheck.h>
#include <linux/list.h>
#include <linux/timer.h>
#include <linux/types.h>
#include <linux/workqueue.h>
#include <net/inet_sock.h>
#include <net/sock.h>
#include <net/tcp_states.h>
#include <net/timewait_sock.h>
#include <linux/atomic.h>

Go to the source code of this file.

Data Structures

struct  inet_timewait_death_row
 
struct  inet_timewait_sock
 

Macros

#define INET_TWDR_RECYCLE_SLOTS_LOG   5
 
#define INET_TWDR_RECYCLE_SLOTS   (1 << INET_TWDR_RECYCLE_SLOTS_LOG)
 
#define INET_TWDR_TWKILL_SLOTS   8 /* Please keep this a power of 2. */
 
#define INET_TWDR_TWKILL_QUOTA   100
 
#define tw_family   __tw_common.skc_family
 
#define tw_state   __tw_common.skc_state
 
#define tw_reuse   __tw_common.skc_reuse
 
#define tw_bound_dev_if   __tw_common.skc_bound_dev_if
 
#define tw_node   __tw_common.skc_nulls_node
 
#define tw_bind_node   __tw_common.skc_bind_node
 
#define tw_refcnt   __tw_common.skc_refcnt
 
#define tw_hash   __tw_common.skc_hash
 
#define tw_prot   __tw_common.skc_prot
 
#define tw_net   __tw_common.skc_net
 
#define tw_daddr   __tw_common.skc_daddr
 
#define tw_rcv_saddr   __tw_common.skc_rcv_saddr
 
#define tw_tclass   tw_tos
 
#define inet_twsk_for_each(tw, node, head)   hlist_nulls_for_each_entry(tw, node, head, tw_node)
 
#define inet_twsk_for_each_inmate(tw, node, jail)   hlist_for_each_entry(tw, node, jail, tw_death_node)
 
#define inet_twsk_for_each_inmate_safe(tw, node, safe, jail)   hlist_for_each_entry_safe(tw, node, safe, jail, tw_death_node)
 

Functions

void inet_twdr_hangman (unsigned long data)
 
void inet_twdr_twkill_work (struct work_struct *work)
 
void inet_twdr_twcal_tick (unsigned long data)
 
void inet_twsk_put (struct inet_timewait_sock *tw)
 
int inet_twsk_unhash (struct inet_timewait_sock *tw)
 
int inet_twsk_bind_unhash (struct inet_timewait_sock *tw, struct inet_hashinfo *hashinfo)
 
struct inet_timewait_sockinet_twsk_alloc (const struct sock *sk, const int state)
 
void __inet_twsk_hashdance (struct inet_timewait_sock *tw, struct sock *sk, struct inet_hashinfo *hashinfo)
 
void inet_twsk_schedule (struct inet_timewait_sock *tw, struct inet_timewait_death_row *twdr, const int timeo, const int timewait_len)
 
void inet_twsk_deschedule (struct inet_timewait_sock *tw, struct inet_timewait_death_row *twdr)
 
void inet_twsk_purge (struct inet_hashinfo *hashinfo, struct inet_timewait_death_row *twdr, int family)
 

Macro Definition Documentation

#define INET_TWDR_RECYCLE_SLOTS   (1 << INET_TWDR_RECYCLE_SLOTS_LOG)

Definition at line 35 of file inet_timewait_sock.h.

#define INET_TWDR_RECYCLE_SLOTS_LOG   5

Definition at line 34 of file inet_timewait_sock.h.

#define INET_TWDR_TWKILL_QUOTA   100

Definition at line 64 of file inet_timewait_sock.h.

#define INET_TWDR_TWKILL_SLOTS   8 /* Please keep this a power of 2. */

Definition at line 62 of file inet_timewait_sock.h.

#define inet_twsk_for_each (   tw,
  node,
  head 
)    hlist_nulls_for_each_entry(tw, node, head, tw_node)

Definition at line 175 of file inet_timewait_sock.h.

#define inet_twsk_for_each_inmate (   tw,
  node,
  jail 
)    hlist_for_each_entry(tw, node, jail, tw_death_node)

Definition at line 178 of file inet_timewait_sock.h.

#define inet_twsk_for_each_inmate_safe (   tw,
  node,
  safe,
  jail 
)    hlist_for_each_entry_safe(tw, node, safe, jail, tw_death_node)

Definition at line 181 of file inet_timewait_sock.h.

#define tw_bind_node   __tw_common.skc_bind_node

Definition at line 108 of file inet_timewait_sock.h.

#define tw_bound_dev_if   __tw_common.skc_bound_dev_if

Definition at line 106 of file inet_timewait_sock.h.

#define tw_daddr   __tw_common.skc_daddr

Definition at line 113 of file inet_timewait_sock.h.

#define tw_family   __tw_common.skc_family

Definition at line 103 of file inet_timewait_sock.h.

#define tw_hash   __tw_common.skc_hash

Definition at line 110 of file inet_timewait_sock.h.

#define tw_net   __tw_common.skc_net

Definition at line 112 of file inet_timewait_sock.h.

#define tw_node   __tw_common.skc_nulls_node

Definition at line 107 of file inet_timewait_sock.h.

#define tw_prot   __tw_common.skc_prot

Definition at line 111 of file inet_timewait_sock.h.

#define tw_rcv_saddr   __tw_common.skc_rcv_saddr

Definition at line 114 of file inet_timewait_sock.h.

#define tw_refcnt   __tw_common.skc_refcnt

Definition at line 109 of file inet_timewait_sock.h.

#define tw_reuse   __tw_common.skc_reuse

Definition at line 105 of file inet_timewait_sock.h.

#define tw_state   __tw_common.skc_state

Definition at line 104 of file inet_timewait_sock.h.

#define tw_tclass   tw_tos

Definition at line 136 of file inet_timewait_sock.h.

Function Documentation

void __inet_twsk_hashdance ( struct inet_timewait_sock tw,
struct sock sk,
struct inet_hashinfo hashinfo 
)

Definition at line 126 of file inet_timewait_sock.c.

void inet_twdr_hangman ( unsigned long  data)

Definition at line 263 of file inet_timewait_sock.c.

void inet_twdr_twcal_tick ( unsigned long  data)

Definition at line 421 of file inet_timewait_sock.c.

void inet_twdr_twkill_work ( struct work_struct work)

Definition at line 292 of file inet_timewait_sock.c.

struct inet_timewait_sock* inet_twsk_alloc ( const struct sock sk,
const int  state 
)
read

Definition at line 173 of file inet_timewait_sock.c.

int inet_twsk_bind_unhash ( struct inet_timewait_sock tw,
struct inet_hashinfo hashinfo 
)

inet_twsk_bind_unhash - unhash a timewait socket from bind hash : timewait socket : hashinfo pointer

unhash a timewait socket from bind hash, if hashed. bind hash lock must be held by caller. Returns 1 if caller should call inet_twsk_put() after lock release.

Definition at line 51 of file inet_timewait_sock.c.

void inet_twsk_deschedule ( struct inet_timewait_sock tw,
struct inet_timewait_death_row twdr 
)

Definition at line 327 of file inet_timewait_sock.c.

void inet_twsk_purge ( struct inet_hashinfo hashinfo,
struct inet_timewait_death_row twdr,
int  family 
)

Definition at line 481 of file inet_timewait_sock.c.

void inet_twsk_put ( struct inet_timewait_sock tw)

Definition at line 114 of file inet_timewait_sock.c.

void inet_twsk_schedule ( struct inet_timewait_sock tw,
struct inet_timewait_death_row twdr,
const int  timeo,
const int  timewait_len 
)

Definition at line 341 of file inet_timewait_sock.c.

int inet_twsk_unhash ( struct inet_timewait_sock tw)

inet_twsk_unhash - unhash a timewait socket from established hash : timewait socket

unhash a timewait socket from established hash, if hashed. ehash lock must be held by caller. Returns 1 if caller should call inet_twsk_put() after lock release.

Definition at line 28 of file inet_timewait_sock.c.