xref: /freebsd/sys/dev/firewire/iec68113.h (revision 763bbd2f4f7e9cd2be35b41d00439acfe3493a2d)
1 /*
2  * Copyright (c) 1998-2001 Katsushi Kobayashi and Hidetoshi Shimokawa
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  * 3. All advertising materials mentioning features or use of this software
14  *    must display the acknowledgement as bellow:
15  *
16  *    This product includes software developed by K. Kobayashi and H. Shimokawa
17  *
18  * 4. The name of the author may not be used to endorse or promote products
19  *    derived from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
25  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31  * POSSIBILITY OF SUCH DAMAGE.
32  *
33  * $FreeBSD$
34  *
35  */
36 struct ciphdr {
37 #if BYTE_ORDER == LITTLE_ENDIAN
38 	u_int32_t src:8,
39 		  len:8,
40 		  dummy:8,
41 		  dbc:8;
42 	u_int32_t :16,
43 		  cyc:16;
44 #else
45 	u_int32_t dbc:8,
46 		  dummy:8,
47 		  len:8,
48 		  src:8;
49 	u_int32_t cyc:16,
50 		  :16;
51 #endif
52 };
53 struct dvdbc{
54 #if BYTE_ORDER == BIG_ENDIAN
55 	u_int32_t :8,
56 		  dbn:8,
57 		  rsv0:3,
58 		  z:1,
59 		  dseq:4,
60 		  seq:4,
61 		  rsv1:1,
62 		  sct:3;
63 #else
64 	u_int32_t seq:4,
65 		  :1,
66 		  sct:3,
67 		  :3,
68 		  z:1,
69 		  dseq:4,
70 		  dbn:8,
71 		  :8;
72 #endif
73 	u_int32_t ld[19];
74 };
75