common.h 1.6 KB

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