datapath-protocol: Rename to <linux/openvswitch.h>.
[sliver-openvswitch.git] / include / linux / types.h
1 /*
2  * Copyright (c) 2011 Nicira Networks.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef LINUX_TYPES_H
18 #define LINUX_TYPES_H 1
19
20 /* On Linux, this header file just includes <linux/types.h>.
21  *
22  * On other platforms, this header file implements just enough of
23  * <linux/types.h> to allow <linux/openvswitch.h> to work, that is, it defines
24  * the __u<N> and __be<N> types. */
25
26 #if __KERNEL__ || HAVE_LINUX_TYPES_H
27 #include_next <linux/types.h>
28 #else  /* no <linux/types.h> */
29 #include <stdint.h>
30
31 #ifdef __CHECKER__
32 #define __bitwise__ __attribute__((bitwise))
33 #else
34 #define __bitwise__
35 #endif
36
37 typedef uint8_t  __u8;
38 typedef uint16_t __u16;
39 typedef uint32_t __u32;
40 typedef uint64_t __u64;
41
42 typedef uint16_t __bitwise__ __be16;
43 typedef uint32_t __bitwise__ __be32;
44 typedef uint64_t __bitwise__ __be64;
45 #endif  /* no <linux/types.h> */
46
47 #endif /* <linux/types.h> */