conn_md.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #ifndef __CONN_MD_H_
  2. #define __CONN_MD_H_
  3. #include "conn_md_exp.h"
  4. #include "conn_md_dump.h"
  5. /*-----------------------Data Structure Definition-----------------------*/
  6. typedef enum {
  7. USER_MIN,
  8. USER_REGED,
  9. USER_ENABLED,
  10. USER_DISABLED,
  11. USER_UNREGED,
  12. USER_MAX,
  13. } USER_STATE;
  14. typedef struct _CONN_MD_USER_ {
  15. uint32 u_id;
  16. USER_STATE state;
  17. CONN_MD_BRIDGE_OPS ops;
  18. struct list_head entry;
  19. } CONN_MD_USER, *P_CONN_MD_USER;
  20. typedef struct _CONN_MD_MSG_ {
  21. ipc_ilm_t ilm;
  22. struct list_head entry;
  23. local_para_struct local_para;
  24. } CONN_MD_MSG, *P_CONN_MD_MSG;
  25. typedef struct _CONN_MD_QUEUE_ {
  26. struct list_head list;
  27. struct mutex lock;
  28. uint32 counter;
  29. } CONN_MD_QUEUE, *P_CONN_MD_QUEUE;
  30. typedef struct _CONN_MD_USER_LIST_ {
  31. uint32 counter;
  32. struct list_head list;
  33. struct mutex lock; /*lock for user add/delete/check */
  34. } CONN_MD_USER_LIST, *P_CONN_MD_USER_LIST;
  35. typedef struct _CONN_MD_STRUCT_ {
  36. /*con-md-thread used for tx queue handle */
  37. struct task_struct *p_task;
  38. struct completion tx_comp;
  39. CONN_MD_USER_LIST user_list;
  40. CONN_MD_QUEUE act_queue;
  41. CONN_MD_QUEUE msg_queue;
  42. P_CONN_MD_DMP_MSG_LOG p_msg_dmp_sys;
  43. } CONN_MD_STRUCT, *P_CONN_MD_STRUCT;
  44. extern int conn_md_send_msg(ipc_ilm_t *ilm);
  45. extern int conn_md_del_user(uint32 u_id);
  46. extern int conn_md_add_user(uint32 u_id, CONN_MD_BRIDGE_OPS *p_ops);
  47. extern int conn_md_dmp_msg_logged(uint32 src_id, uint32 dst_id);
  48. extern int conn_md_dmp_msg_active(uint32 src_id, uint32 dst_id);
  49. extern int conn_md_dmp_msg_queued(uint32 src_id, uint32 dst_id);
  50. #endif