Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /* net/atm/common.h - ATM sockets (common part for PVC and SVC) */
0003 
0004 /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
0005 
0006 
0007 #ifndef NET_ATM_COMMON_H
0008 #define NET_ATM_COMMON_H
0009 
0010 #include <linux/net.h>
0011 #include <linux/poll.h> /* for poll_table */
0012 
0013 
0014 int vcc_create(struct net *net, struct socket *sock, int protocol, int family, int kern);
0015 int vcc_release(struct socket *sock);
0016 int vcc_connect(struct socket *sock, int itf, short vpi, int vci);
0017 int vcc_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
0018         int flags);
0019 int vcc_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len);
0020 __poll_t vcc_poll(struct file *file, struct socket *sock, poll_table *wait);
0021 int vcc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
0022 int vcc_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
0023 int vcc_setsockopt(struct socket *sock, int level, int optname,
0024            sockptr_t optval, unsigned int optlen);
0025 int vcc_getsockopt(struct socket *sock, int level, int optname,
0026            char __user *optval, int __user *optlen);
0027 void vcc_process_recv_queue(struct atm_vcc *vcc);
0028 
0029 int atmpvc_init(void);
0030 void atmpvc_exit(void);
0031 int atmsvc_init(void);
0032 void atmsvc_exit(void);
0033 int atm_sysfs_init(void);
0034 void atm_sysfs_exit(void);
0035 
0036 #ifdef CONFIG_PROC_FS
0037 int atm_proc_init(void);
0038 void atm_proc_exit(void);
0039 #else
0040 static inline int atm_proc_init(void)
0041 {
0042     return 0;
0043 }
0044 
0045 static inline void atm_proc_exit(void)
0046 {
0047     /* nothing */
0048 }
0049 #endif /* CONFIG_PROC_FS */
0050 
0051 /* SVC */
0052 int svc_change_qos(struct atm_vcc *vcc,struct atm_qos *qos);
0053 
0054 void atm_dev_release_vccs(struct atm_dev *dev);
0055 
0056 #endif