be_iscsi.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /**
  2. * Copyright (C) 2005 - 2011 Emulex
  3. * All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License version 2
  7. * as published by the Free Software Foundation. The full GNU General
  8. * Public License is included in this distribution in the file called COPYING.
  9. *
  10. * Written by: Jayamohan Kallickal (jayamohan.kallickal@emulex.com)
  11. *
  12. * Contact Information:
  13. * linux-drivers@emulex.com
  14. *
  15. * Emulex
  16. * 3333 Susan Street
  17. * Costa Mesa, CA 92626
  18. */
  19. #ifndef _BE_ISCSI_
  20. #define _BE_ISCSI_
  21. #include "be_main.h"
  22. #include "be_mgmt.h"
  23. #define BE2_IPV4 0x1
  24. #define BE2_IPV6 0x10
  25. umode_t be2iscsi_attr_is_visible(int param_type, int param);
  26. void beiscsi_offload_connection(struct beiscsi_conn *beiscsi_conn,
  27. struct beiscsi_offload_params *params);
  28. void beiscsi_offload_iscsi(struct beiscsi_hba *phba, struct iscsi_conn *conn,
  29. struct beiscsi_conn *beiscsi_conn,
  30. unsigned int fw_handle);
  31. struct iscsi_cls_session *beiscsi_session_create(struct iscsi_endpoint *ep,
  32. uint16_t cmds_max,
  33. uint16_t qdepth,
  34. uint32_t initial_cmdsn);
  35. void beiscsi_session_destroy(struct iscsi_cls_session *cls_session);
  36. struct iscsi_cls_conn *beiscsi_conn_create(struct iscsi_cls_session
  37. *cls_session, uint32_t cid);
  38. int beiscsi_conn_bind(struct iscsi_cls_session *cls_session,
  39. struct iscsi_cls_conn *cls_conn,
  40. uint64_t transport_fd, int is_leading);
  41. int beiscsi_ep_get_param(struct iscsi_endpoint *ep, enum iscsi_param param,
  42. char *buf);
  43. int beiscsi_get_host_param(struct Scsi_Host *shost,
  44. enum iscsi_host_param param, char *buf);
  45. int beiscsi_get_macaddr(char *buf, struct beiscsi_hba *phba);
  46. int beiscsi_set_param(struct iscsi_cls_conn *cls_conn,
  47. enum iscsi_param param, char *buf, int buflen);
  48. int beiscsi_conn_start(struct iscsi_cls_conn *cls_conn);
  49. struct iscsi_endpoint *beiscsi_ep_connect(struct Scsi_Host *shost,
  50. struct sockaddr *dst_addr,
  51. int non_blocking);
  52. int beiscsi_ep_poll(struct iscsi_endpoint *ep, int timeout_ms);
  53. void beiscsi_ep_disconnect(struct iscsi_endpoint *ep);
  54. void beiscsi_conn_get_stats(struct iscsi_cls_conn *cls_conn,
  55. struct iscsi_stats *stats);
  56. #endif