Lines Matching refs:sock

31 static int svc_create(struct net *net, struct socket *sock, int protocol,
41 static int svc_shutdown(struct socket *sock, int how) in svc_shutdown() argument
50 struct sock *sk = sk_atm(vcc); in svc_disconnect()
75 static int svc_release(struct socket *sock) in svc_release() argument
77 struct sock *sk = sock->sk; in svc_release()
81 vcc = ATM_SD(sock); in svc_release()
90 vcc_release(sock); in svc_release()
95 static int svc_bind(struct socket *sock, struct sockaddr *sockaddr, in svc_bind() argument
99 struct sock *sk = sock->sk; in svc_bind()
107 if (sock->state == SS_CONNECTED) { in svc_bind()
111 if (sock->state != SS_UNCONNECTED) { in svc_bind()
115 vcc = ATM_SD(sock); in svc_bind()
151 static int svc_connect(struct socket *sock, struct sockaddr *sockaddr, in svc_connect() argument
155 struct sock *sk = sock->sk; in svc_connect()
157 struct atm_vcc *vcc = ATM_SD(sock); in svc_connect()
167 switch (sock->state) { in svc_connect()
179 sock->state = SS_UNCONNECTED; in svc_connect()
209 sock->state = SS_CONNECTING; in svc_connect()
272 error = vcc_connect(sock, vcc->itf, vcc->vpi, vcc->vci); in svc_connect()
274 sock->state = SS_CONNECTED; in svc_connect()
282 static int svc_listen(struct socket *sock, int backlog) in svc_listen() argument
285 struct sock *sk = sock->sk; in svc_listen()
286 struct atm_vcc *vcc = ATM_SD(sock); in svc_listen()
322 static int svc_accept(struct socket *sock, struct socket *newsock, int flags, in svc_accept() argument
325 struct sock *sk = sock->sk; in svc_accept()
328 struct atm_vcc *old_vcc = ATM_SD(sock); in svc_accept()
421 static int svc_getname(struct socket *sock, struct sockaddr *sockaddr, in svc_getname() argument
427 memcpy(addr, peer ? &ATM_SD(sock)->remote : &ATM_SD(sock)->local, in svc_getname()
434 struct sock *sk = sk_atm(vcc); in svc_change_qos()
453 static int svc_setsockopt(struct socket *sock, int level, int optname, in svc_setsockopt() argument
456 struct sock *sk = sock->sk; in svc_setsockopt()
457 struct atm_vcc *vcc = ATM_SD(sock); in svc_setsockopt()
490 error = vcc_setsockopt(sock, level, optname, optval, optlen); in svc_setsockopt()
498 static int svc_getsockopt(struct socket *sock, int level, int optname, in svc_getsockopt() argument
501 struct sock *sk = sock->sk; in svc_getsockopt()
506 error = vcc_getsockopt(sock, level, optname, optval, optlen); in svc_getsockopt()
517 if (copy_to_user(optval, &ATM_SD(sock)->sap, sizeof(struct atm_sap))) { in svc_getsockopt()
526 static int svc_addparty(struct socket *sock, struct sockaddr *sockaddr, in svc_addparty() argument
530 struct sock *sk = sock->sk; in svc_addparty()
531 struct atm_vcc *vcc = ATM_SD(sock); in svc_addparty()
556 static int svc_dropparty(struct socket *sock, int ep_ref) in svc_dropparty() argument
559 struct sock *sk = sock->sk; in svc_dropparty()
560 struct atm_vcc *vcc = ATM_SD(sock); in svc_dropparty()
583 static int svc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) in svc_ioctl() argument
587 struct atm_vcc *vcc = ATM_SD(sock); in svc_ioctl()
595 error = svc_addparty(sock, (struct sockaddr *)&sa, sizeof(sa), in svc_ioctl()
603 error = svc_dropparty(sock, ep_ref); in svc_ioctl()
606 error = vcc_ioctl(sock, cmd, arg); in svc_ioctl()
613 static int svc_compat_ioctl(struct socket *sock, unsigned int cmd, in svc_compat_ioctl() argument
623 return svc_ioctl(sock, cmd, arg); in svc_compat_ioctl()
625 return vcc_compat_ioctl(sock, cmd, arg); in svc_compat_ioctl()
656 static int svc_create(struct net *net, struct socket *sock, int protocol, in svc_create() argument
664 sock->ops = &svc_proto_ops; in svc_create()
665 error = vcc_create(net, sock, protocol, AF_ATMSVC, kern); in svc_create()
668 ATM_SD(sock)->local.sas_family = AF_ATMSVC; in svc_create()
669 ATM_SD(sock)->remote.sas_family = AF_ATMSVC; in svc_create()