atmsvc.h 1.7 KB

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