summaryrefslogtreecommitdiffstats
path: root/src/raw1394_private.h
blob: 616ac759a1435b1de41f75b6dd3fd57cd14ed5e7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef _RAW1394_PRIVATE_H
#define _RAW1394_PRIVATE_H

struct raw1394_handle {
        int fd;
        int protocol_version;
        unsigned int generation;

        nodeid_t local_id;
        int num_of_nodes;
        nodeid_t irm_id;

        bus_reset_handler_t bus_reset_handler;
        tag_handler_t tag_handler;
        fcp_handler_t fcp_handler;
        iso_handler_t iso_handler[64];

        struct raw1394_request req;
        quadlet_t buffer[2048];

        void *userdata;
};

struct sync_cb_data {
        int done;
        int errcode;
};

int _raw1394_sync_cb(struct raw1394_handle*, struct sync_cb_data*, int);

#define HBUF_SIZE 8192
#define CLEAR_REQ(reqp) memset((reqp), 0, sizeof(struct raw1394_request))

#if SIZEOF_VOID_P == 4
#define int2ptr(x) ((void *)(__u32)x)
#define ptr2int(x) ((__u64)(__u32)x)
#else
#define int2ptr(x) ((void *)x)
#define ptr2int(x) ((__u64)x)
#endif

#endif /* _RAW1394_PRIVATE_H */