llc_s_ev.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #ifndef LLC_S_EV_H
  2. #define LLC_S_EV_H
  3. /*
  4. * Copyright (c) 1997 by Procom Technology,Inc.
  5. * 2001 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
  6. *
  7. * This program can be redistributed or modified under the terms of the
  8. * GNU General Public License as published by the Free Software Foundation.
  9. * This program is distributed without any warranty or implied warranty
  10. * of merchantability or fitness for a particular purpose.
  11. *
  12. * See the GNU General Public License for more details.
  13. */
  14. #include <linux/skbuff.h>
  15. /* Defines SAP component events */
  16. /* Types of events (possible values in 'ev->type') */
  17. #define LLC_SAP_EV_TYPE_SIMPLE 1
  18. #define LLC_SAP_EV_TYPE_CONDITION 2
  19. #define LLC_SAP_EV_TYPE_PRIM 3
  20. #define LLC_SAP_EV_TYPE_PDU 4 /* command/response PDU */
  21. #define LLC_SAP_EV_TYPE_ACK_TMR 5
  22. #define LLC_SAP_EV_TYPE_RPT_STATUS 6
  23. #define LLC_SAP_EV_ACTIVATION_REQ 1
  24. #define LLC_SAP_EV_RX_UI 2
  25. #define LLC_SAP_EV_UNITDATA_REQ 3
  26. #define LLC_SAP_EV_XID_REQ 4
  27. #define LLC_SAP_EV_RX_XID_C 5
  28. #define LLC_SAP_EV_RX_XID_R 6
  29. #define LLC_SAP_EV_TEST_REQ 7
  30. #define LLC_SAP_EV_RX_TEST_C 8
  31. #define LLC_SAP_EV_RX_TEST_R 9
  32. #define LLC_SAP_EV_DEACTIVATION_REQ 10
  33. struct llc_sap_state_ev {
  34. u8 prim;
  35. u8 prim_type;
  36. u8 type;
  37. u8 reason;
  38. u8 ind_cfm_flag;
  39. struct llc_addr saddr;
  40. struct llc_addr daddr;
  41. };
  42. static __inline__ struct llc_sap_state_ev *llc_sap_ev(struct sk_buff *skb)
  43. {
  44. return (struct llc_sap_state_ev *)skb->cb;
  45. }
  46. struct llc_sap;
  47. typedef int (*llc_sap_ev_t)(struct llc_sap *sap, struct sk_buff *skb);
  48. int llc_sap_ev_activation_req(struct llc_sap *sap, struct sk_buff *skb);
  49. int llc_sap_ev_rx_ui(struct llc_sap *sap, struct sk_buff *skb);
  50. int llc_sap_ev_unitdata_req(struct llc_sap *sap, struct sk_buff *skb);
  51. int llc_sap_ev_xid_req(struct llc_sap *sap, struct sk_buff *skb);
  52. int llc_sap_ev_rx_xid_c(struct llc_sap *sap, struct sk_buff *skb);
  53. int llc_sap_ev_rx_xid_r(struct llc_sap *sap, struct sk_buff *skb);
  54. int llc_sap_ev_test_req(struct llc_sap *sap, struct sk_buff *skb);
  55. int llc_sap_ev_rx_test_c(struct llc_sap *sap, struct sk_buff *skb);
  56. int llc_sap_ev_rx_test_r(struct llc_sap *sap, struct sk_buff *skb);
  57. int llc_sap_ev_deactivation_req(struct llc_sap *sap, struct sk_buff *skb);
  58. #endif /* LLC_S_EV_H */