Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
udp.h File Reference
#include <linux/list.h>
#include <linux/bug.h>
#include <net/inet_sock.h>
#include <net/sock.h>
#include <net/snmp.h>
#include <net/ip.h>
#include <linux/ipv6.h>
#include <linux/seq_file.h>
#include <linux/poll.h>

Go to the source code of this file.

Data Structures

struct  udp_skb_cb
 
struct  udp_hslot
 
struct  udp_table
 
struct  udp_seq_afinfo
 
struct  udp_iter_state
 

Macros

#define UDP_SKB_CB(__skb)   ((struct udp_skb_cb *)((__skb)->cb))
 
#define UDP_CSUM_NOXMIT   1
 
#define UDP_CSUM_NORCV   2
 
#define UDP_CSUM_DEFAULT   0
 
#define UDP_INC_STATS_USER(net, field, is_udplite)
 
#define UDP_INC_STATS_BH(net, field, is_udplite)
 
#define UDP6_INC_STATS_BH(net, field, is_udplite)
 
#define UDP6_INC_STATS_USER(net, field, __lite)
 
#define UDPX_INC_STATS_BH(sk, field)   UDP_INC_STATS_BH(sock_net(sk), field, 0)
 

Functions

struct udp_hslot __attribute__ ((aligned(2 *sizeof(long))))
 
void udp_table_init (struct udp_table *, const char *)
 
void udp_lib_unhash (struct sock *sk)
 
void udp_lib_rehash (struct sock *sk, u16 new_hash)
 
int udp_lib_get_port (struct sock *sk, unsigned short snum, int(*)(const struct sock *, const struct sock *), unsigned int hash2_nulladdr)
 
int udp_get_port (struct sock *sk, unsigned short snum, int(*saddr_cmp)(const struct sock *, const struct sock *))
 
void udp_err (struct sk_buff *, u32)
 
int udp_sendmsg (struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len)
 
void udp_flush_pending_frames (struct sock *sk)
 
int udp_rcv (struct sk_buff *skb)
 
int udp_ioctl (struct sock *sk, int cmd, unsigned long arg)
 
int udp_disconnect (struct sock *sk, int flags)
 
unsigned int udp_poll (struct file *file, struct socket *sock, poll_table *wait)
 
int udp_lib_getsockopt (struct sock *sk, int level, int optname, char __user *optval, int __user *optlen)
 
int udp_lib_setsockopt (struct sock *sk, int level, int optname, char __user *optval, unsigned int optlen, int(*push_pending_frames)(struct sock *))
 
struct sockudp4_lib_lookup (struct net *net, __be32 saddr, __be16 sport, __be32 daddr, __be16 dport, int dif)
 
struct sock__udp4_lib_lookup (struct net *net, __be32 saddr, __be16 sport, __be32 daddr, __be16 dport, int dif, struct udp_table *tbl)
 
struct sockudp6_lib_lookup (struct net *net, const struct in6_addr *saddr, __be16 sport, const struct in6_addr *daddr, __be16 dport, int dif)
 
struct sock__udp6_lib_lookup (struct net *net, const struct in6_addr *saddr, __be16 sport, const struct in6_addr *daddr, __be16 dport, int dif, struct udp_table *tbl)
 
int udp_seq_open (struct inode *inode, struct file *file)
 
void udp_init (void)
 
int udp4_ufo_send_check (struct sk_buff *skb)
 
struct sk_buffudp4_ufo_fragment (struct sk_buff *skb, netdev_features_t features)
 
void udp_encap_enable (void)
 

Variables

struct hlist_nulls_head head
 
int count
 
spinlock_t lock
 
struct udp_table __attribute__
 
struct udp_table udp_table
 
struct proto udp_prot
 
atomic_long_t udp_memory_allocated
 
long sysctl_udp_mem [3]
 
int sysctl_udp_rmem_min
 
int sysctl_udp_wmem_min
 

Macro Definition Documentation

#define UDP6_INC_STATS_BH (   net,
  field,
  is_udplite 
)
Value:
do { \
if (is_udplite) SNMP_INC_STATS_BH((net)->mib.udplite_stats_in6, field);\
else SNMP_INC_STATS_BH((net)->mib.udp_stats_in6, field); \
} while(0)

Definition at line 218 of file udp.h.

#define UDP6_INC_STATS_USER (   net,
  field,
  __lite 
)
Value:
do { \
if (__lite) SNMP_INC_STATS_USER((net)->mib.udplite_stats_in6, field); \
else SNMP_INC_STATS_USER((net)->mib.udp_stats_in6, field); \
} while(0)

Definition at line 222 of file udp.h.

#define UDP_CSUM_DEFAULT   0

Definition at line 105 of file udp.h.

#define UDP_CSUM_NORCV   2

Definition at line 102 of file udp.h.

#define UDP_CSUM_NOXMIT   1

Definition at line 99 of file udp.h.

#define UDP_INC_STATS_BH (   net,
  field,
  is_udplite 
)
Value:
do { \
if (is_udplite) SNMP_INC_STATS_BH((net)->mib.udplite_statistics, field); \
else SNMP_INC_STATS_BH((net)->mib.udp_statistics, field); } while(0)

Definition at line 214 of file udp.h.

#define UDP_INC_STATS_USER (   net,
  field,
  is_udplite 
)
Value:
do { \
if (is_udplite) SNMP_INC_STATS_USER((net)->mib.udplite_statistics, field); \
else SNMP_INC_STATS_USER((net)->mib.udp_statistics, field); } while(0)

Definition at line 211 of file udp.h.

#define UDP_SKB_CB (   __skb)    ((struct udp_skb_cb *)((__skb)->cb))

Definition at line 52 of file udp.h.

#define UDPX_INC_STATS_BH (   sk,
  field 
)    UDP_INC_STATS_BH(sock_net(sk), field, 0)

Definition at line 236 of file udp.h.

Function Documentation

struct sock* __udp4_lib_lookup ( struct net net,
__be32  saddr,
__be16  sport,
__be32  daddr,
__be16  dport,
int  dif,
struct udp_table tbl 
)
read

Definition at line 451 of file udp.c.

struct sock* __udp6_lib_lookup ( struct net net,
const struct in6_addr saddr,
__be16  sport,
const struct in6_addr daddr,
__be16  dport,
int  dif,
struct udp_table tbl 
)
read

Definition at line 242 of file udp.c.

struct sock* udp4_lib_lookup ( struct net net,
__be32  saddr,
__be16  sport,
__be32  daddr,
__be16  dport,
int  dif 
)
read

Definition at line 535 of file udp.c.

struct sk_buff* udp4_ufo_fragment ( struct sk_buff skb,
netdev_features_t  features 
)
read

Definition at line 2266 of file udp.c.

int udp4_ufo_send_check ( struct sk_buff skb)

Definition at line 2247 of file udp.c.

struct sock* udp6_lib_lookup ( struct net net,
const struct in6_addr saddr,
__be16  sport,
const struct in6_addr daddr,
__be16  dport,
int  dif 
)
read

Definition at line 325 of file udp.c.

int udp_disconnect ( struct sock sk,
int  flags 
)

Definition at line 1277 of file udp.c.

void udp_encap_enable ( void  )

Definition at line 1396 of file udp.c.

void udp_err ( struct sk_buff ,
u32   
)

Definition at line 654 of file udp.c.

void udp_flush_pending_frames ( struct sock sk)

Definition at line 662 of file udp.c.

int udp_get_port ( struct sock sk,
unsigned short  snum,
int(*)(const struct sock *, const struct sock *)  saddr_cmp 
)
void udp_init ( void  )

Definition at line 2232 of file udp.c.

int udp_ioctl ( struct sock sk,
int  cmd,
unsigned long  arg 
)

Definition at line 1132 of file udp.c.

int udp_lib_get_port ( struct sock sk,
unsigned short  snum,
int(*)(const struct sock *, const struct sock *)  ,
unsigned int  hash2_nulladdr 
)
int udp_lib_getsockopt ( struct sock sk,
int  level,
int  optname,
char __user optval,
int __user optlen 
)

Definition at line 1851 of file udp.c.

void udp_lib_rehash ( struct sock sk,
u16  new_hash 
)

Definition at line 1330 of file udp.c.

int udp_lib_setsockopt ( struct sock sk,
int  level,
int  optname,
char __user optval,
unsigned int  optlen,
int(*)(struct sock *)  push_pending_frames 
)

Definition at line 1748 of file udp.c.

void udp_lib_unhash ( struct sock sk)

Definition at line 1301 of file udp.c.

unsigned int udp_poll ( struct file file,
struct socket sock,
poll_table wait 
)

Definition at line 1926 of file udp.c.

int udp_rcv ( struct sk_buff skb)

Definition at line 1733 of file udp.c.

int udp_sendmsg ( struct kiocb iocb,
struct sock sk,
struct msghdr msg,
size_t  len 
)

Definition at line 797 of file udp.c.

int udp_seq_open ( struct inode inode,
struct file file 
)
void udp_table_init ( struct udp_table ,
const char  
)

Definition at line 2205 of file udp.c.

Variable Documentation

int count

Definition at line 67 of file udp.h.

Definition at line 66 of file udp.h.

spinlock_t lock

Definition at line 68 of file udp.h.

long sysctl_udp_mem

Definition at line 117 of file udp.c.

int sysctl_udp_rmem_min
int sysctl_udp_wmem_min
atomic_long_t udp_memory_allocated

Definition at line 126 of file udp.c.

struct proto udp_prot

Definition at line 1941 of file udp.c.