Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
socket.c File Reference
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/wait.h>
#include <linux/time.h>
#include <linux/ip.h>
#include <linux/capability.h>
#include <linux/fcntl.h>
#include <linux/poll.h>
#include <linux/init.h>
#include <linux/crypto.h>
#include <linux/slab.h>
#include <linux/file.h>
#include <net/ip.h>
#include <net/icmp.h>
#include <net/route.h>
#include <net/ipv6.h>
#include <net/inet_common.h>
#include <linux/socket.h>
#include <linux/export.h>
#include <net/sock.h>
#include <net/sctp/sctp.h>
#include <net/sctp/sm.h>

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 

Functions

struct sctp_associationsctp_id2assoc (struct sock *sk, sctp_assoc_t id)
 
SCTP_STATIC int sctp_bind (struct sock *sk, struct sockaddr *addr, int addr_len)
 
int sctp_asconf_mgmt (struct sctp_sock *sp, struct sctp_sockaddr_entry *addrw)
 
SCTP_STATIC int sctp_setsockopt_bindx (struct sock *sk, struct sockaddr __user *addrs, int addrs_size, int op)
 
SCTP_STATIC int __sctp_setsockopt_connectx (struct sock *sk, struct sockaddr __user *addrs, int addrs_size, sctp_assoc_t *assoc_id)
 
SCTP_STATIC int sctp_setsockopt_connectx_old (struct sock *sk, struct sockaddr __user *addrs, int addrs_size)
 
SCTP_STATIC int sctp_setsockopt_connectx (struct sock *sk, struct sockaddr __user *addrs, int addrs_size)
 
SCTP_STATIC int sctp_getsockopt_connectx3 (struct sock *sk, int len, char __user *optval, int __user *optlen)
 
SCTP_STATIC void sctp_close (struct sock *sk, long timeout)
 
SCTP_STATIC int sctp_msghdr_parse (const struct msghdr *, sctp_cmsgs_t *)
 
SCTP_STATIC int sctp_sendmsg (struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t msg_len)
 
SCTP_STATIC int sctp_recvmsg (struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len, int noblock, int flags, int *addr_len)
 
SCTP_STATIC int sctp_setsockopt (struct sock *sk, int level, int optname, char __user *optval, unsigned int optlen)
 
SCTP_STATIC int sctp_connect (struct sock *sk, struct sockaddr *addr, int addr_len)
 
SCTP_STATIC int sctp_disconnect (struct sock *sk, int flags)
 
SCTP_STATIC struct socksctp_accept (struct sock *sk, int flags, int *err)
 
SCTP_STATIC int sctp_ioctl (struct sock *sk, int cmd, unsigned long arg)
 
SCTP_STATIC int sctp_init_sock (struct sock *sk)
 
SCTP_STATIC void sctp_destroy_sock (struct sock *sk)
 
SCTP_STATIC void sctp_shutdown (struct sock *sk, int how)
 
int sctp_do_peeloff (struct sock *sk, sctp_assoc_t id, struct socket **sockp)
 
 EXPORT_SYMBOL (sctp_do_peeloff)
 
SCTP_STATIC int sctp_getsockopt (struct sock *sk, int level, int optname, char __user *optval, int __user *optlen)
 
SCTP_STATIC int sctp_listen_start (struct sock *sk, int backlog)
 
int sctp_inet_listen (struct socket *sock, int backlog)
 
unsigned int sctp_poll (struct file *file, struct socket *sock, poll_table *wait)
 
void sctp_put_port (struct sock *sk)
 
void sctp_sock_rfree (struct sk_buff *skb)
 
void sctp_data_ready (struct sock *sk, int len)
 
void sctp_write_space (struct sock *sk)
 
void sctp_copy_sock (struct sock *newsk, struct sock *sk, struct sctp_association *asoc)
 

Variables

struct kmem_cachesctp_bucket_cachep
 
long sysctl_sctp_mem [3]
 
int sysctl_sctp_rmem [3]
 
int sysctl_sctp_wmem [3]
 
struct percpu_counter sctp_sockets_allocated
 
struct proto sctp_prot
 

Macro Definition Documentation

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 60 of file socket.c.

Function Documentation

SCTP_STATIC int __sctp_setsockopt_connectx ( struct sock sk,
struct sockaddr __user addrs,
int  addrs_size,
sctp_assoc_t assoc_id 
)

Definition at line 1312 of file socket.c.

EXPORT_SYMBOL ( sctp_do_peeloff  )
SCTP_STATIC struct sock* sctp_accept ( struct sock sk,
int  flags,
int err 
)
read

Definition at line 3764 of file socket.c.

int sctp_asconf_mgmt ( struct sctp_sock sp,
struct sctp_sockaddr_entry addrw 
)

Definition at line 868 of file socket.c.

SCTP_STATIC int sctp_bind ( struct sock sk,
struct sockaddr addr,
int  addr_len 
)

Definition at line 283 of file socket.c.

SCTP_STATIC void sctp_close ( struct sock sk,
long  timeout 
)

Definition at line 1464 of file socket.c.

SCTP_STATIC int sctp_connect ( struct sock sk,
struct sockaddr addr,
int  addr_len 
)

Definition at line 3725 of file socket.c.

void sctp_copy_sock ( struct sock newsk,
struct sock sk,
struct sctp_association asoc 
)

Definition at line 6773 of file socket.c.

void sctp_data_ready ( struct sock sk,
int  len 
)

Definition at line 6590 of file socket.c.

SCTP_STATIC void sctp_destroy_sock ( struct sock sk)

Definition at line 3993 of file socket.c.

SCTP_STATIC int sctp_disconnect ( struct sock sk,
int  flags 
)

Definition at line 3752 of file socket.c.

int sctp_do_peeloff ( struct sock sk,
sctp_assoc_t  id,
struct socket **  sockp 
)

Definition at line 4252 of file socket.c.

SCTP_STATIC int sctp_getsockopt ( struct sock sk,
int  level,
int  optname,
char __user optval,
int __user optlen 
)

Definition at line 5635 of file socket.c.

SCTP_STATIC int sctp_getsockopt_connectx3 ( struct sock sk,
int  len,
char __user optval,
int __user optlen 
)

Definition at line 1386 of file socket.c.

struct sctp_association* sctp_id2assoc ( struct sock sk,
sctp_assoc_t  id 
)
read

Definition at line 210 of file socket.c.

int sctp_inet_listen ( struct socket sock,
int  backlog 
)

Definition at line 6037 of file socket.c.

SCTP_STATIC int sctp_init_sock ( struct sock sk)

Definition at line 3859 of file socket.c.

SCTP_STATIC int sctp_ioctl ( struct sock sk,
int  cmd,
unsigned long  arg 
)

Definition at line 3817 of file socket.c.

SCTP_STATIC int sctp_listen_start ( struct sock sk,
int  backlog 
)

Definition at line 5979 of file socket.c.

SCTP_STATIC int sctp_msghdr_parse ( const struct msghdr msg,
sctp_cmsgs_t cmsgs 
)

Definition at line 6263 of file socket.c.

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

Definition at line 6096 of file socket.c.

void sctp_put_port ( struct sock sk)

Definition at line 6196 of file socket.c.

SCTP_STATIC int sctp_recvmsg ( struct kiocb iocb,
struct sock sk,
struct msghdr msg,
size_t  len,
int  noblock,
int  flags,
int addr_len 
)

Definition at line 2034 of file socket.c.

SCTP_STATIC int sctp_sendmsg ( struct kiocb iocb,
struct sock sk,
struct msghdr msg,
size_t  msg_len 
)

Definition at line 1575 of file socket.c.

SCTP_STATIC int sctp_setsockopt ( struct sock sk,
int  level,
int  optname,
char __user optval,
unsigned int  optlen 
)

Definition at line 3565 of file socket.c.

SCTP_STATIC int sctp_setsockopt_bindx ( struct sock sk,
struct sockaddr __user addrs,
int  addrs_size,
int  op 
)

Definition at line 965 of file socket.c.

SCTP_STATIC int sctp_setsockopt_connectx ( struct sock sk,
struct sockaddr __user addrs,
int  addrs_size 
)

Definition at line 1363 of file socket.c.

SCTP_STATIC int sctp_setsockopt_connectx_old ( struct sock sk,
struct sockaddr __user addrs,
int  addrs_size 
)

Definition at line 1350 of file socket.c.

SCTP_STATIC void sctp_shutdown ( struct sock sk,
int  how 
)

Definition at line 4028 of file socket.c.

void sctp_sock_rfree ( struct sk_buff skb)

Definition at line 6515 of file socket.c.

void sctp_write_space ( struct sock sk)

Definition at line 6604 of file socket.c.

Variable Documentation

struct kmem_cache* sctp_bucket_cachep
struct proto sctp_prot
Initial value:
= {
.name = "SCTP",
.owner = THIS_MODULE,
.close = sctp_close,
.connect = sctp_connect,
.disconnect = sctp_disconnect,
.accept = sctp_accept,
.ioctl = sctp_ioctl,
.init = sctp_init_sock,
.destroy = sctp_destroy_sock,
.shutdown = sctp_shutdown,
.setsockopt = sctp_setsockopt,
.getsockopt = sctp_getsockopt,
.sendmsg = sctp_sendmsg,
.recvmsg = sctp_recvmsg,
.bind = sctp_bind,
.backlog_rcv = sctp_backlog_rcv,
.hash = sctp_hash,
.unhash = sctp_unhash,
.get_port = sctp_get_port,
.obj_size = sizeof(struct sctp_sock),
.sysctl_mem = sysctl_sctp_mem,
.sysctl_rmem = sysctl_sctp_rmem,
.sysctl_wmem = sysctl_sctp_wmem,
.memory_pressure = &sctp_memory_pressure,
.enter_memory_pressure = sctp_enter_memory_pressure,
.memory_allocated = &sctp_memory_allocated,
.sockets_allocated = &sctp_sockets_allocated,
}

Definition at line 6954 of file socket.c.

struct percpu_counter sctp_sockets_allocated

Definition at line 122 of file socket.c.

long sysctl_sctp_mem[3]

Definition at line 84 of file protocol.c.

int sysctl_sctp_rmem[3]

Definition at line 85 of file protocol.c.

int sysctl_sctp_wmem[3]

Definition at line 86 of file protocol.c.