ReactOS 0.4.16-dev-320-g3bd9ddc
|
Go to the source code of this file.
Classes | |
struct | sk_buff_head |
struct | skb_frag_struct |
struct | skb_shared_info |
struct | sk_buff |
struct | sockaddr |
struct | msghdr |
struct | proto |
struct | tcp_sack_block |
struct | tcp_opt |
struct | socket_lock_t |
struct | sock |
struct | dst_entry |
struct | dst_ops |
struct | tcp_ehash_bucket |
struct | tcp_bind_bucket |
struct | tcp_bind_hashbucket |
struct | tcp_hashinfo |
struct | tcp_tw_bucket |
struct | or_calltable |
struct | tcp_v4_open_req |
struct | open_request |
struct | tcp_func |
struct | tcp_skb_cb |
struct | tcp_listen_opt |
Typedefs | |
typedef struct skb_frag_struct | skb_frag_t |
typedef struct sockaddr | _sockaddr |
typedef int(* | sk_read_actor_t) (read_descriptor_t *, struct sk_buff *, unsigned int, size_t) |
Enumerations | |
enum | tcp_ack_state_t { TCP_ACK_SCHED = 1 , TCP_ACK_TIMER = 2 , TCP_ACK_PUSHED = 4 } |
enum | tcp_tw_status { TCP_TW_SUCCESS = 0 , TCP_TW_RST = 1 , TCP_TW_ACK = 2 , TCP_TW_SYN = 3 } |
#define SKB_DATA_ALIGN | ( | X | ) | (((X) + (SMP_CACHE_BYTES-1)) & ~(SMP_CACHE_BYTES-1)) |
#define SKB_FRAG_ASSERT | ( | skb | ) | do { if (skb_shinfo(skb)->frag_list) out_of_line_bug(); } while (0) |
#define SKB_LINEAR_ASSERT | ( | skb | ) | do { if (skb_is_nonlinear(skb)) out_of_line_bug(); } while (0) |
#define SKB_MAX_ALLOC (SKB_MAX_ORDER(0,2)) |
#define SKB_MAX_ORDER | ( | X, | |
ORDER | |||
) | (((PAGE_SIZE<<(ORDER)) - (X) - sizeof(struct skb_shared_info))&~(SMP_CACHE_BYTES-1)) |
#define SKB_PAGE_ASSERT | ( | skb | ) | do { if (skb_shinfo(skb)->nr_frags) out_of_line_bug(); } while (0) |
#define skb_shinfo | ( | SKB | ) | ((struct skb_shared_info *)((SKB)->end)) |
#define tcp_bhash (tcp_hashinfo.__tcp_bhash) |
#define tcp_bhash_size (tcp_hashinfo.__tcp_bhash_size) |
#define tcp_ehash (tcp_hashinfo.__tcp_ehash) |
#define tcp_ehash_size (tcp_hashinfo.__tcp_ehash_size) |
#define TCP_FIN_TIMEOUT TCP_TIMEWAIT_LEN |
#define TCP_IPV4_MATCH | ( | __sk, | |
__cookie, | |||
__saddr, | |||
__daddr, | |||
__ports, | |||
__dif | |||
) |
#define TCP_IPV6_MATCH | ( | __sk, | |
__saddr, | |||
__daddr, | |||
__ports, | |||
__dif | |||
) |
#define tcp_lhash_users (tcp_hashinfo.__tcp_lhash_users) |
#define tcp_lhash_wait (tcp_hashinfo.__tcp_lhash_wait) |
#define TCP_LHTABLE_SIZE 32 /* Yes, really, this is all you need. */ |
#define tcp_listening_hash (tcp_hashinfo.__tcp_listening_hash) |
#define tcp_openreq_alloc | ( | ) | kmem_cache_alloc(tcp_openreq_cachep, SLAB_ATOMIC) |
#define tcp_openreq_fastfree | ( | req | ) | kmem_cache_free(tcp_openreq_cachep, req) |
#define TCP_ORPHAN_RETRIES |
#define TCP_PAWS_MSL |
#define TCP_PAWS_WINDOW |
#define tcp_portalloc_lock (tcp_hashinfo.__tcp_portalloc_lock) |
#define TCP_RESOURCE_PROBE_INTERVAL |
#define TCP_RETR1 |
#define TCP_RETR2 |
#define TCP_SKB_CB | ( | __skb | ) | ((struct tcp_skb_cb *)&((__skb)->cb[0])) |
#define TCP_SYN_RETRIES |
#define TCP_SYNACK_RETRIES |
#define TCP_TW_RECYCLE_SLOTS (1<<TCP_TW_RECYCLE_SLOTS_LOG) |
#define TCP_TWKILL_PERIOD (TCP_TIMEWAIT_LEN/TCP_TWKILL_SLOTS) |
#define TCPCB_EVER_RETRANS 0x80 /* Ever retransmitted frame */ |
#define TCPCB_RETRANS (TCPCB_SACKED_RETRANS|TCPCB_EVER_RETRANS) |
#define TCPCB_SACKED_RETRANS 0x02 /* SKB retransmitted */ |
#define TCPOPT_TIMESTAMP 8 /* Better RTT estimations/PAWS */ |
typedef struct skb_frag_struct skb_frag_t |
Enumerator | |
---|---|
TCP_ACK_SCHED | |
TCP_ACK_TIMER | |
TCP_ACK_PUSHED |
Definition at line 2449 of file tcpcore.h.
Referenced by __pskb_trim(), and __skb_trim().
struct tcp_ehash_bucket __attribute__ | ( | (__aligned__(8)) | ) |
__dev_alloc_skb - allocate an skbuff for sending @length: length to allocate @gfp_mask: get_free_pages mask, passed to alloc_skb
Allocate a new &sk_buff and assign it a usage count of one. The buffer has unspecified headroom built in. Users should allocate the headroom they think they need without accounting for the built in space. The built in space is used for optimisations.
NULL is returned in there is no free memory.
Definition at line 1045 of file tcpcore.h.
Referenced by dev_alloc_skb().
Referenced by kfree_skb().
Definition at line 869 of file tcpcore.h.
Referenced by pskb_pull().
Referenced by __pskb_pull(), and pskb_may_pull().
Definition at line 962 of file tcpcore.h.
Referenced by pskb_trim().
Definition at line 647 of file tcpcore.h.
Referenced by skb_append().
|
static |
__skb_dequeue - remove from the head of the queue @list: list to dequeue from
Remove the head of the list. This function does not take any locks so must be used with appropriate locks held only. The head item is returned or NULL if the list is empty.
Definition at line 568 of file tcpcore.h.
Referenced by __skb_queue_purge(), skb_dequeue(), and tcp_listen_wlock().
|
static |
__skb_dequeue_tail - remove from the tail of the queue @list: list to dequeue from
Remove the tail of the list. This function does not take any locks so must be used with appropriate locks held only. The tail item is returned or NULL if the list is empty.
Definition at line 729 of file tcpcore.h.
Referenced by skb_dequeue_tail().
|
static |
Definition at line 612 of file tcpcore.h.
Referenced by __skb_append(), and skb_insert().
|
static |
__skb_queue_head - queue a buffer at the list head @list: list to use @newsk: buffer to queue
Queue a buffer at the start of a list. This function takes no locks and you must therefore hold required locks before calling it.
A buffer cannot be placed on two lists at the same time.
Definition at line 476 of file tcpcore.h.
Referenced by skb_queue_head().
|
static |
__skb_purge - empty a list @list: list to empty
Delete all buffers on an &sk_buff list. Each buffer is removed from the list and one reference dropped. This function does not take the list lock and the caller must hold the relevant locks to use it.
|
static |
__skb_queue_tail - queue a buffer at the list tail @list: list to use @newsk: buffer to queue
Queue a buffer at the end of a list. This function takes no locks and you must therefore hold required locks before calling it.
A buffer cannot be placed on two lists at the same time.
Definition at line 524 of file tcpcore.h.
Referenced by skb_queue_tail().
|
static |
Definition at line 677 of file tcpcore.h.
Referenced by __skb_dequeue_tail(), and skb_unlink().
|
static |
Definition at line 2395 of file tcpcore.h.
Referenced by adns__makefinal_block(), adns__makefinal_str(), af_glyph_hints_align_strong_points(), af_latin_hint_edges(), call_test(), FT_List_Insert(), FT_List_Remove(), FT_List_Up(), TrayNotifyDlg::InsertItem(), psh_glyph_compute_extrema(), psh_glyph_compute_inflections(), psh_glyph_interpolate_normal_points(), sanity_check(), T1_Set_MM_Design(), test_AbortWaitCts(), test_LoopbackRead(), test_QueueUserWorkItem(), test_read_write(), test_ReadTimeOut(), test_WaitBreak(), test_WaitCommEvent(), test_WaitCts(), test_WaitDcd(), test_WaitDsr(), test_WaitRing(), test_WaitRx(), and test_waittxempty().
Referenced by __dev_alloc_skb(), and tcp_alloc_skb().
Definition at line 2390 of file tcpcore.h.
Referenced by adns__makefinal_block(), adns__makefinal_str(), af_glyph_hints_align_strong_points(), af_latin_hint_edges(), call_test(), else_break(), FT_List_Add(), FT_List_Remove(), FT_List_Up(), HTMLSelectElement_add(), LexcmpTest::lexcmp1(), LexcmpTest::lexcmp2(), psh_glyph_compute_extrema(), psh_glyph_compute_inflections(), psh_glyph_interpolate_normal_points(), sanity_check(), T1_Set_MM_Design(), test_AbortWaitCts(), test_LoopbackRead(), test_QueueUserWorkItem(), test_read_write(), test_ReadTimeOut(), test_WaitBreak(), test_WaitCommEvent(), test_WaitCts(), test_WaitDcd(), test_WaitDsr(), test_WaitRing(), test_WaitRx(), test_waittxempty(), and TEXT_NextLineW().
unsigned int datagram_poll | ( | struct file * | file, |
struct socket * | sock, | ||
struct poll_table_struct * | wait | ||
) |
dev_alloc_skb - allocate an skbuff for sending @length: length to allocate
Allocate a new &sk_buff and assign it a usage count of one. The buffer has unspecified headroom built in. Users should allocate the headroom they think they need without accounting for the built in space. The built in space is used for optimisations.
NULL is returned in there is no free memory. Although this function allocates memory it can be called from an interrupt.
Definition at line 1069 of file tcpcore.h.
kfree_skb - free an sk_buff @skb: buffer to free
Drop a reference to the buffer and free it if the usage count has hit zero.
Definition at line 297 of file tcpcore.h.
Referenced by __skb_queue_purge(), skb_queue_purge(), skb_share_check(), and skb_unshare().
Referenced by kfree_skb_fast().
|
static |
Referenced by skb_cow().
Definition at line 878 of file tcpcore.h.
Definition at line 973 of file tcpcore.h.
skb_append - append a buffer @old: buffer to insert after @newsk: buffer to insert
Place a packet after a given packet in a list. The list locks are taken and this function is atomic with respect to other list locked calls. A buffer cannot be placed on two lists at the same time.
Definition at line 663 of file tcpcore.h.
skb_cloned - is the buffer a clone @skb: buffer to check
Returns true if the buffer was generated with skb_clone() and is one of multiple shared copies of the buffer. Cloned buffers are shared data so must not be written to under normal circumstances.
Definition at line 319 of file tcpcore.h.
Referenced by skb_cow(), and skb_unshare().
unsigned int skb_copy_and_csum_bits | ( | const struct sk_buff * | skb, |
int | offset, | ||
u8 * | to, | ||
int | len, | ||
unsigned int | csum | ||
) |
int skb_copy_and_csum_datagram | ( | const struct sk_buff * | skb, |
int | offset, | ||
u8 * | to, | ||
int | len, | ||
unsigned int * | csump | ||
) |
int skb_copy_datagram_iovec | ( | const struct sk_buff * | from, |
int | offset, | ||
struct iovec * | to, | ||
int | size | ||
) |
struct sk_buff * skb_copy_expand | ( | const struct sk_buff * | skb, |
int | newheadroom, | ||
int | newtailroom, | ||
int | priority | ||
) |
skb_cow - copy header of skb when it is required @skb: buffer to cow @headroom: needed headroom
If the skb passed lacks sufficient headroom or its data part is shared, data is reallocated. If reallocation fails, an error is returned and original skb is not changed.
The result is skb with writable area skb->head...skb->tail and at least @headroom of space at head.
Definition at line 1092 of file tcpcore.h.
|
static |
skb_dequeue - remove from the head of the queue @list: list to dequeue from
Remove the head of the list. The list lock is taken so the function may be used safely with other locking list functions. The head item is returned or NULL if the list is empty.
Definition at line 597 of file tcpcore.h.
Referenced by skb_queue_purge().
|
static |
skb_dequeue - remove from the head of the queue @list: list to dequeue from
Remove the head of the list. The list lock is taken so the function may be used safely with other locking list functions. The tail item is returned or NULL if the list is empty.
Definition at line 746 of file tcpcore.h.
skb_get - reference buffer @skb: buffer to reference
Makes another reference to a socket buffer and returns a pointer to the buffer.
Definition at line 762 of file tcpcore.h.
Referenced by __pskb_pull(), and pskb_may_pull().
skb_insert - insert a buffer @old: buffer to insert before @newsk: buffer to insert
Place a packet before a given packet in a list. The list locks are taken and this function is atomic with respect to other list locked calls A buffer cannot be placed on two lists at the same time.
Definition at line 634 of file tcpcore.h.
Definition at line 757 of file tcpcore.h.
Referenced by skb_tailroom().
skb_linearize - convert paged skb to linear one @skb: buffer to linarize @gfp: allocation mode
If there is no free memory -ENOMEM is returned, otherwise zero is returned and the old skb data released.
skb_orphan - orphan a buffer @skb: buffer to orphan
If a buffer currently has an owner then we call the owner's destructor function and make the @skb unowned. The buffer continues to exist but is no longer charged to its former owner.
|
static |
skb_peek @list_: list to peek at
Peek an &sk_buff. Unlike most other operations you MUST be careful with this one. A peek leaves the buffer on the list and someone else may run off with it. You must hold the appropriate locks or have a private queue to do this.
Returns NULL for an empty list or a pointer to the head element. The reference count is not incremented and the reference is therefore volatile. Use with caution.
|
static |
skb_peek_tail @list_: list to peek at
Peek an &sk_buff. Unlike most other operations you MUST be careful with this one. A peek leaves the buffer on the list and someone else may run off with it. You must hold the appropriate locks or have a private queue to do this.
Returns NULL for an empty list or a pointer to the tail element. The reference count is not incremented and the reference is therefore volatile. Use with caution.
Definition at line 430 of file tcpcore.h.
Referenced by __skb_dequeue_tail().
skb_pull - remove data from the start of a buffer @skb: buffer to use @len: amount of data to remove
This function removes data from the start of a buffer, returning the memory to the headroom. A pointer to the next data in the buffer is returned. Once the data has been pulled future pushes will overwrite the old data.
Definition at line 860 of file tcpcore.h.
skb_put - add data to a buffer @skb: buffer to use @len: amount of data to add
This function extends the used data area of the buffer. If this would exceed the total buffer size the kernel will panic. A pointer to the first byte of the extra data is returned.
Definition at line 794 of file tcpcore.h.
|
static |
|
static |
skb_queue_head - queue a buffer at the list head @list: list to use @newsk: buffer to queue
Queue a buffer at the start of the list. This function takes the list lock and can be used safely with other locking &sk_buff functions safely.
A buffer cannot be placed on two lists at the same time.
Definition at line 503 of file tcpcore.h.
|
static |
|
static |
skb_queue_len - get queue length @list_: list to measure
Return the length of an &sk_buff queue.
|
static |
skb_purge - empty a list @list: list to empty
Delete all buffers on an &sk_buff list. Each buffer is removed from the list and one reference dropped. This function takes the list lock and is atomic with respect to other list locking functions.
Definition at line 1008 of file tcpcore.h.
|
static |
skb_queue_tail - queue a buffer at the list tail @list: list to use @newsk: buffer to queue
Queue a buffer at the tail of the list. This function takes the list lock and can be used safely with other locking &sk_buff functions safely.
A buffer cannot be placed on two lists at the same time.
Definition at line 550 of file tcpcore.h.
skb_reserve - adjust headroom @skb: buffer to alter @len: bytes to move
Increase the headroom of an empty &sk_buff by reducing the tail room. This is only allowed for an empty buffer.
Definition at line 927 of file tcpcore.h.
Referenced by __dev_alloc_skb(), and tcp_alloc_page().
skb_share_check - check if buffer is shared and if so clone it @skb: buffer to check @pri: priority for memory allocation
If the buffer is shared the buffer is cloned and the old copy drops a reference. A new clone with a single reference is returned. If the buffer is not shared the original buffer is returned. When being called from interrupt status or with spinlocks held pri must be GFP_ATOMIC.
NULL is returned on a memory allocation failure.
skb_shared - is the buffer shared @skb: buffer to check
Returns true if more than one person has a reference to this buffer.
Definition at line 332 of file tcpcore.h.
Referenced by skb_share_check().
skb_tailroom - bytes at buffer end @skb: buffer to check
Return the number of bytes of free space at the tail of an sk_buff
skb_trim - remove end from a buffer @skb: buffer to alter @len: new length
Cut the length of a buffer down by removing data from the tail. If the buffer is already under the length specified it is not modified.
Definition at line 954 of file tcpcore.h.