1 /* $NetBSD: fwiso_ioctl.h,v 1.1 2002/12/04 00:28:44 haya Exp $ */
2
3 /*-
4 * Copyright (c) 2001
5 * HAYAKAWA Koichi. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGE.
29 */
30
31
32 #ifndef _DEV_IEEE1394_FWISO_IOCTL_H_
33 #define _DEV_IEEE1394_FWISO_IOCTL_H_
34
35 #define FWISO_IFNAMESIZ 15
36 struct fwiso_if {
37 char fi_name[FWISO_IFNAMESIZ];
38 };
39
40 #define FWISOSETIF _IOW('I', 1, struct fwiso_if)
41 #define FWISOGETIF _IOWR('I', 2, struct fwiso_if)
42 #define FWISOSETMODE _IOW('I', 3, int)
43 #define FWISOGETMODE _IOR('I', 4, int)
44 #define FWISOSETCHANNEL _IOW('I', 5, int)
45 #define FWISOGETCHANNEL _IOR('I', 6, int)
46 #define FWISOSETTAG _IOW('I', 7, int)
47 #define FWISOGETTAG _IOR('I', 8, int)
48 #define FWISOSETSPD _IOW('I', 9, int)
49 #define FWISOGETSPD _IOR('I', 10, int)
50
51 /* for FWISOSETMODE and FWISOGETMODE */
52 #define FWISO_MODE_RAW 0
53 #define FWISO_MODE_DV 1 /* SD DV format without header */
54 #define FWISO_MODE_DV_RAW 2 /* SD DV format with header */
55 #define FWISO_MODE_MPEG2TS 3
56 #define FWISO_MODE_MAX 4
57
58 /* for FWISOSETCHANNEL and FWISOGETCHANNEL */
59 #define FWISO_CHANNEL_ANY 64
60
61 /* for FWISOSETTAG and FWISOGETTAG */
62 #define FWISO_TAG0 0x01
63 #define FWISO_TAG1 0x02
64 #define FWISO_TAG2 0x04
65 #define FWISO_TAG3 0x08
66
67 #define FWISO_CIF FWISO_TAG1
68 #define FWISO_GASP FWISO_TAG3
69
70 /*
71 * for FWISOSETSPD and FWISOGETSPD. Same as IEEE1394_SPD_S* in
72 * ieee1394reg.h.
73 */
74 #define FWISO_SPD_S100 0
75 #define FWISO_SPD_S200 1
76 #define FWISO_SPD_S400 2
77 #define FWISO_SPD_S800 3
78 #define FWISO_SPD_S1600 4
79 #define FWISO_SPD_S3200 5
80
81 /* header attached when FWISO_MODE_RAW is chosen */
82 struct fwiso_header {
83 u_int32_t fh_header[4];
84 /* actual header and data below */
85 };
86
87 #define fh_timestamp fh_header[0]
88 #define fh_speed fh_header[1] /* FWISO_SPD_S* */
89 #define fh_capture_size fh_header[2] /* link layer header + data */
90 #define fh_iso_header fh_header[3] /* link layer header */
91
92 #endif /*_DEV_IEEE1394_FWISO_IOCTL_H_ */
93
Cache object: a8620d387a352f33718b1fcc0c66990a
|