vfs: check userland buffers before reading them.
[haiku.git] / headers / private / firewire / firewire_module.h
blob9f9daa2178f4e99b6affd69364be2a8eef08ede9
1 /* Kernel driver for firewire
3 * Copyright (C) 2007 JiSheng Zhang <jszhang3@gmail.com>. All rights reserved
4 * Distributed under the terms of the MIT license.
5 */
6 #ifndef _FW_MODULE_H
7 #define _FW_MODULE_H
8 #include <KernelExport.h>
9 #include <module.h>
10 #include <bus_manager.h>
12 #include "firewire.h"
15 #define FIREWIRE_MODULE_NAME "bus_managers/firewire/v1"
17 struct fw_module_info{
19 bus_manager_info binfo;
21 struct fw_device * (*fw_noderesolve_nodeid)(struct firewire_comm *fc, int dst);
23 struct fw_device * (*fw_noderesolve_eui64)(struct firewire_comm *fc, struct fw_eui64 *eui);
25 int (*fw_asyreq)(struct firewire_comm *fc, int sub, struct fw_xfer *xfer);
27 void (*fw_xferwake)(struct fw_xfer *xfer);
28 int (*fw_xferwait)(struct fw_xfer *xfer);
30 struct fw_bind * (*fw_bindlookup)(struct firewire_comm *fc, uint16_t dest_hi, uint32_t dest_lo);
32 int (*fw_bindadd)(struct firewire_comm *fc, struct fw_bind *fwb);
34 int (*fw_bindremove)(struct firewire_comm *fc, struct fw_bind *fwb);
36 int (*fw_xferlist_add)(struct fw_xferlist *q,
37 int slen, int rlen, int n,
38 struct firewire_comm *fc, void *sc, void (*hand)(struct fw_xfer *));
40 void (*fw_xferlist_remove)(struct fw_xferlist *q);
42 struct fw_xfer * (*fw_xfer_alloc)();
44 struct fw_xfer * (*fw_xfer_alloc_buf)(int send_len, int recv_len);
46 void (*fw_xfer_done)(struct fw_xfer *xfer);
48 void (*fw_xfer_unload)(struct fw_xfer* xfer);
50 void (*fw_xfer_free_buf)( struct fw_xfer* xfer);
52 void (*fw_xfer_free)( struct fw_xfer* xfer);
54 void (*fw_asy_callback_free)(struct fw_xfer *xfer);
56 int (*fw_open_isodma)(struct firewire_comm *fc, int tx);
58 int (*get_handle)(int socket, struct firewire_softc **handle);
60 struct fwdma_alloc_multi * (*fwdma_malloc_multiseg)(int alignment,
61 int esize, int n);
63 void (*fwdma_free_multiseg)(struct fwdma_alloc_multi *);
65 #endif