^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /* net/atm/common.h - ATM sockets (common part for PVC and SVC) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) #ifndef NET_ATM_COMMON_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #define NET_ATM_COMMON_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <linux/net.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <linux/poll.h> /* for poll_table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) int vcc_create(struct net *net, struct socket *sock, int protocol, int family, int kern);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) int vcc_release(struct socket *sock);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) int vcc_connect(struct socket *sock, int itf, short vpi, int vci);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) int vcc_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) int flags);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) int vcc_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) __poll_t vcc_poll(struct file *file, struct socket *sock, poll_table *wait);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) int vcc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) int vcc_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) int vcc_setsockopt(struct socket *sock, int level, int optname,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) sockptr_t optval, unsigned int optlen);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) int vcc_getsockopt(struct socket *sock, int level, int optname,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) char __user *optval, int __user *optlen);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) void vcc_process_recv_queue(struct atm_vcc *vcc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) int atmpvc_init(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) void atmpvc_exit(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) int atmsvc_init(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) void atmsvc_exit(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) int atm_sysfs_init(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) void atm_sysfs_exit(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) #ifdef CONFIG_PROC_FS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) int atm_proc_init(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) void atm_proc_exit(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) static inline int atm_proc_init(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) static inline void atm_proc_exit(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) /* nothing */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) #endif /* CONFIG_PROC_FS */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) /* SVC */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) int svc_change_qos(struct atm_vcc *vcc,struct atm_qos *qos);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) void atm_dev_release_vccs(struct atm_dev *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) #endif