be_iscsi.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /**
  2. * Copyright (C) 2005 - 2009 ServerEngines
  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 (jayamohank@serverengines.com)
  11. *
  12. * Contact Information:
  13. * linux-drivers@serverengines.com
  14. *
  15. * ServerEngines
  16. * 209 N. Fair Oaks Ave
  17. * Sunnyvale, CA 94085
  18. *
  19. */
  20. #ifndef _BE_ISCSI_
  21. #define _BE_ISCSI_
  22. #include "be_main.h"
  23. #include "be_mgmt.h"
  24. #define BE2_IPV4 0x1
  25. #define BE2_IPV6 0x10
  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_conn_get_param(struct iscsi_cls_conn *cls_conn,
  42. enum iscsi_param param, char *buf);
  43. int beiscsi_get_host_param(struct Scsi_Host *shost,
  44. enum iscsi_host_param param, char *buf);
  45. int beiscsi_set_param(struct iscsi_cls_conn *cls_conn,
  46. enum iscsi_param param, char *buf, int buflen);
  47. int beiscsi_conn_start(struct iscsi_cls_conn *cls_conn);
  48. void beiscsi_conn_stop(struct iscsi_cls_conn *cls_conn, int flag);
  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