~ubuntu-branches/ubuntu/wily/openvswitch/wily

« back to all changes in this revision

Viewing changes to include/openvswitch/types.h

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2015-08-10 11:35:15 UTC
  • mfrom: (1.1.30)
  • Revision ID: package-import@ubuntu.com-20150810113515-575vj06oq29emxsn
Tags: 2.4.0~git20150810.97bab95-0ubuntu1
* New upstream snapshot from 2.4 branch:
  - d/*: Align any relevant packaging changes with upstream.
* d/*: wrap-and-sort.
* d/openvswitch-{common,vswitch}.install: Correct install location for
  bash completion files.
* d/tests/openflow.py: Explicitly use ovs-testcontroller as provided
  by 2.4.0 release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (c) 2010, 2011, 2013 Nicira, Inc.
 
2
 * Copyright (c) 2010, 2011, 2013, 2014 Nicira, Inc.
3
3
 *
4
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
5
 * you may not use this file except in compliance with the License.
17
17
#ifndef OPENVSWITCH_TYPES_H
18
18
#define OPENVSWITCH_TYPES_H 1
19
19
 
20
 
#include <linux/types.h>
21
20
#include <sys/types.h>
22
21
#include <stdint.h>
23
22
 
30
29
#endif
31
30
 
32
31
/* The ovs_be<N> types indicate that an object is in big-endian, not
33
 
 * native-endian, byte order.  They are otherwise equivalent to uint<N>_t.
34
 
 *
35
 
 * We bootstrap these from the Linux __be<N> types.  If we instead define our
36
 
 * own independently then __be<N> and ovs_be<N> become mutually
37
 
 * incompatible. */
38
 
typedef __be16 ovs_be16;
39
 
typedef __be32 ovs_be32;
40
 
typedef __be64 ovs_be64;
 
32
 * native-endian, byte order.  They are otherwise equivalent to uint<N>_t. */
 
33
typedef uint16_t OVS_BITWISE ovs_be16;
 
34
typedef uint32_t OVS_BITWISE ovs_be32;
 
35
typedef uint64_t OVS_BITWISE ovs_be64;
41
36
 
42
37
#define OVS_BE16_MAX ((OVS_FORCE ovs_be16) 0xffff)
43
38
#define OVS_BE32_MAX ((OVS_FORCE ovs_be32) 0xffffffff)
86
81
#endif
87
82
} ovs_32aligned_u64;
88
83
 
 
84
typedef union {
 
85
    uint32_t u32[4];
 
86
    struct {
 
87
        uint64_t lo, hi;
 
88
    } u64;
 
89
} ovs_u128;
 
90
 
89
91
/* A 64-bit value, in network byte order, that is only aligned on a 32-bit
90
92
 * boundary. */
91
93
typedef struct {