atmsvc.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. /* atmsvc.h - ATM signaling kernel-demon interface definitions */
  3. /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
  4. #ifndef _LINUX_ATMSVC_H
  5. #define _LINUX_ATMSVC_H
  6. #include <linux/atmapi.h>
  7. #include <linux/atm.h>
  8. #include <linux/atmioc.h>
  9. #define ATMSIGD_CTRL _IO('a',ATMIOC_SPECIAL)
  10. /* become ATM signaling demon control socket */
  11. enum atmsvc_msg_type { as_catch_null, as_bind, as_connect, as_accept, as_reject,
  12. as_listen, as_okay, as_error, as_indicate, as_close,
  13. as_itf_notify, as_modify, as_identify, as_terminate,
  14. as_addparty, as_dropparty };
  15. struct atmsvc_msg {
  16. enum atmsvc_msg_type type;
  17. atm_kptr_t vcc;
  18. atm_kptr_t listen_vcc; /* indicate */
  19. int reply; /* for okay and close: */
  20. /* < 0: error before active */
  21. /* (sigd has discarded ctx) */
  22. /* ==0: success */
  23. /* > 0: error when active (still */
  24. /* need to close) */
  25. struct sockaddr_atmpvc pvc; /* indicate, okay (connect) */
  26. struct sockaddr_atmsvc local; /* local SVC address */
  27. struct atm_qos qos; /* QOS parameters */
  28. struct atm_sap sap; /* SAP */
  29. unsigned int session; /* for p2pm */
  30. struct sockaddr_atmsvc svc; /* SVC address */
  31. } __ATM_API_ALIGN;
  32. /*
  33. * Message contents: see ftp://icaftp.epfl.ch/pub/linux/atm/docs/isp-*.tar.gz
  34. */
  35. /*
  36. * Some policy stuff for atmsigd and for net/atm/svc.c. Both have to agree on
  37. * what PCR is used to request bandwidth from the device driver. net/atm/svc.c
  38. * tries to do better than that, but only if there's no routing decision (i.e.
  39. * if signaling only uses one ATM interface).
  40. */
  41. #define SELECT_TOP_PCR(tp) ((tp).pcr ? (tp).pcr : \
  42. (tp).max_pcr && (tp).max_pcr != ATM_MAX_PCR ? (tp).max_pcr : \
  43. (tp).min_pcr ? (tp).min_pcr : ATM_MAX_PCR)
  44. #endif