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/gfp.h>
#include <linux/kernel.h>
#include <linux/net.h>
#include <linux/poll.h>
#include <net/sock.h>
#include <net/tcp_states.h>
#include <linux/phonet.h>
#include <linux/export.h>
#include <net/phonet/phonet.h>
#include <net/phonet/pep.h>
#include <net/phonet/pn_dev.h>

Go to the source code of this file.

Macros

#define PN_HASHSIZE   16
 
#define PN_HASHMASK   (PN_HASHSIZE-1)
 

Functions

void __init pn_sock_init (void)
 
struct sockpn_find_sock_by_sa (struct net *net, const struct sockaddr_pn *spn)
 
void pn_deliver_sock_broadcast (struct net *net, struct sk_buff *skb)
 
void pn_sock_hash (struct sock *sk)
 
 EXPORT_SYMBOL (pn_sock_hash)
 
void pn_sock_unhash (struct sock *sk)
 
 EXPORT_SYMBOL (pn_sock_unhash)
 
 EXPORT_SYMBOL (phonet_stream_ops)
 
int pn_sock_get_port (struct sock *sk, unsigned short sport)
 
 EXPORT_SYMBOL (pn_sock_get_port)
 
struct sockpn_find_sock_by_res (struct net *net, u8 res)
 
int pn_sock_bind_res (struct sock *sk, u8 res)
 
int pn_sock_unbind_res (struct sock *sk, u8 res)
 
void pn_sock_unbind_all_res (struct sock *sk)
 

Variables

struct proto_ops phonet_dgram_ops
 
struct proto_ops phonet_stream_ops
 

Macro Definition Documentation

#define PN_HASHMASK   (PN_HASHSIZE-1)

Definition at line 51 of file socket.c.

#define PN_HASHSIZE   16

Definition at line 50 of file socket.c.

Function Documentation

EXPORT_SYMBOL ( pn_sock_hash  )
EXPORT_SYMBOL ( pn_sock_unhash  )
EXPORT_SYMBOL ( phonet_stream_ops  )
EXPORT_SYMBOL ( pn_sock_get_port  )
void pn_deliver_sock_broadcast ( struct net net,
struct sk_buff skb 
)

Definition at line 116 of file socket.c.

struct sock* pn_find_sock_by_res ( struct net net,
u8  res 
)
read

Definition at line 653 of file socket.c.

struct sock* pn_find_sock_by_sa ( struct net net,
const struct sockaddr_pn spn 
)
read

Definition at line 77 of file socket.c.

int pn_sock_bind_res ( struct sock sk,
u8  res 
)

Definition at line 670 of file socket.c.

int pn_sock_get_port ( struct sock sk,
unsigned short  sport 
)

Definition at line 493 of file socket.c.

void pn_sock_hash ( struct sock sk)

Definition at line 145 of file socket.c.

void __init pn_sock_init ( void  )

Definition at line 59 of file socket.c.

void pn_sock_unbind_all_res ( struct sock sk)

Definition at line 712 of file socket.c.

int pn_sock_unbind_res ( struct sock sk,
u8  res 
)

Definition at line 691 of file socket.c.

void pn_sock_unhash ( struct sock sk)

Definition at line 155 of file socket.c.

Variable Documentation

Definition at line 55 of file socket.c.

struct mutex lock

Definition at line 56 of file socket.c.

struct proto_ops phonet_dgram_ops
Initial value:
= {
.family = AF_PHONET,
.owner = THIS_MODULE,
.release = pn_socket_release,
.bind = pn_socket_bind,
.connect = sock_no_connect,
.socketpair = sock_no_socketpair,
.accept = sock_no_accept,
.getname = pn_socket_getname,
.poll = datagram_poll,
.ioctl = pn_socket_ioctl,
.listen = sock_no_listen,
.shutdown = sock_no_shutdown,
.setsockopt = sock_no_setsockopt,
.getsockopt = sock_no_getsockopt,
.sendmsg = pn_socket_sendmsg,
.recvmsg = sock_common_recvmsg,
.mmap = sock_no_mmap,
.sendpage = sock_no_sendpage,
}

Definition at line 441 of file socket.c.

struct proto_ops phonet_stream_ops
Initial value:
= {
.family = AF_PHONET,
.owner = THIS_MODULE,
.release = pn_socket_release,
.bind = pn_socket_bind,
.connect = pn_socket_connect,
.socketpair = sock_no_socketpair,
.accept = pn_socket_accept,
.getname = pn_socket_getname,
.poll = pn_socket_poll,
.ioctl = pn_socket_ioctl,
.listen = pn_socket_listen,
.shutdown = sock_no_shutdown,
.setsockopt = sock_common_setsockopt,
.getsockopt = sock_common_getsockopt,
.sendmsg = pn_socket_sendmsg,
.recvmsg = sock_common_recvmsg,
.mmap = sock_no_mmap,
.sendpage = sock_no_sendpage,
}

Definition at line 466 of file socket.c.

struct sock* sk[256]

Definition at line 647 of file socket.c.