~ubuntu-branches/ubuntu/maverick/tgt/maverick

« back to all changes in this revision

Viewing changes to usr/iscsi/transport.h

  • Committer: Bazaar Package Importer
  • Author(s): Frederik Schüler, Ben Hutchings, Frederik Schüler
  • Date: 2009-12-09 10:29:39 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20091209102939-1wtaliuphn6e480v
Tags: 1:0.9.11-1
[ Ben Hutchings ]
* New upstream version (Closes: #501149)
  - Adds -D_GNU_SOURCE to compiler options (Closes: #526562)
* Add myself to Uploaders
* Fix syntax of usage messages (Closes: #493375)
* Use GPL-compatible digest code instead of OpenSSL (Closes: #556294)
* Update Standards-Version to 3.8.3
  - Add Homepage field
* Enable FCoE driver
* Update package description
  - Fix grammar
  - Mention 'SCSI' in the short description
  - Update list of drivers

[ Frederik Schüler ]
* Switch to debhelper 7.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#ifndef __TRANSPORT_H
2
2
#define __TRANSPORT_H
3
3
 
 
4
#include <sys/socket.h>
 
5
#include "list.h"
 
6
 
 
7
struct iscsi_connection;
 
8
struct iscsi_task;
 
9
 
4
10
struct iscsi_transport {
 
11
        struct list_head iscsi_transport_siblings;
 
12
 
5
13
        const char *name;
6
14
        int rdma;
 
15
        int data_padding;
7
16
 
8
17
        int (*ep_init) (void);
9
 
        size_t (*ep_read) (int ep, void *buf, size_t nbytes);
10
 
        size_t (*ep_write_begin) (int ep, void *buf, size_t nbytes);
11
 
        void (*ep_write_end)(int ep);
12
 
        size_t (*ep_close) (int ep);
13
 
        int (*ep_show) (int ep, char *buf, int rest);
 
18
        void (*ep_exit) (void);
 
19
        int (*ep_login_complete)(struct iscsi_connection *conn);
 
20
        struct iscsi_task *(*alloc_task)(struct iscsi_connection *conn,
 
21
                                         size_t ext_len);
 
22
        void (*free_task)(struct iscsi_task *task);
 
23
        size_t (*ep_read)(struct iscsi_connection *conn, void *buf,
 
24
                          size_t nbytes);
 
25
        size_t (*ep_write_begin)(struct iscsi_connection *conn, void *buf,
 
26
                                 size_t nbytes);
 
27
        void (*ep_write_end)(struct iscsi_connection *conn);
 
28
        int (*ep_rdma_read)(struct iscsi_connection *conn);
 
29
        int (*ep_rdma_write)(struct iscsi_connection *conn);
 
30
        size_t (*ep_close)(struct iscsi_connection *conn);
 
31
        void (*ep_release)(struct iscsi_connection *conn);
 
32
 
 
33
        int (*ep_show)(struct iscsi_connection *conn, char *buf, int rest);
 
34
        void (*ep_event_modify)(struct iscsi_connection *conn, int events);
 
35
        void *(*alloc_data_buf)(struct iscsi_connection *conn, size_t sz);
 
36
        void (*free_data_buf)(struct iscsi_connection *conn, void *buf);
 
37
        int (*ep_getsockname)(struct iscsi_connection *conn,
 
38
                              struct sockaddr *sa, socklen_t *len);
 
39
        int (*ep_getpeername)(struct iscsi_connection *conn,
 
40
                              struct sockaddr *sa, socklen_t *len);
14
41
};
15
42
 
16
 
extern struct iscsi_transport iscsi_tcp;
 
43
extern int iscsi_transport_register(struct iscsi_transport *);
17
44
 
18
45
#endif