8 #include <linux/atmdev.h>
9 #include <linux/errno.h>
10 #include <linux/kernel.h>
13 #include <linux/bitops.h>
14 #include <linux/export.h>
21 static int pvc_shutdown(
struct socket *
sock,
int how)
29 struct sock *
sk = sock->
sk;
47 addr->sap_addr.
vpi = vcc->
vpi;
49 addr->sap_addr.
vci = vcc->
vci;
58 static int pvc_connect(
struct socket *sock,
struct sockaddr *sockaddr,
59 int sockaddr_len,
int flags)
61 return pvc_bind(sock, sockaddr, sockaddr_len);
64 static int pvc_setsockopt(
struct socket *sock,
int level,
int optname,
65 char __user *optval,
unsigned int optlen)
67 struct sock *sk = sock->
sk;
76 static int pvc_getsockopt(
struct socket *sock,
int level,
int optname,
77 char __user *optval,
int __user *optlen)
79 struct sock *sk = sock->
sk;
88 static int pvc_getname(
struct socket *sock,
struct sockaddr *sockaddr,
89 int *sockaddr_len,
int peer)
92 struct atm_vcc *vcc = ATM_SD(sock);
98 memset(addr, 0,
sizeof(*addr));
100 addr->sap_addr.
itf = vcc->
dev->number;
101 addr->sap_addr.
vpi = vcc->
vpi;
102 addr->sap_addr.
vci = vcc->
vci;
106 static const struct proto_ops pvc_proto_ops = {
112 .connect = pvc_connect,
115 .getname = pvc_getname,
122 .shutdown = pvc_shutdown,
123 .setsockopt = pvc_setsockopt,
124 .getsockopt = pvc_getsockopt,
138 sock->
ops = &pvc_proto_ops;
144 .create = pvc_create,