~james-page/ubuntu/saucy/openvswitch/1.12-snapshot

« back to all changes in this revision

Viewing changes to include/openvswitch/types.h

  • Committer: James Page
  • Date: 2013-08-21 10:16:57 UTC
  • mfrom: (1.1.20)
  • Revision ID: james.page@canonical.com-20130821101657-3o0z0qeiv5zkwlzi
New upstream snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (c) 2010, 2011 Nicira, Inc.
 
2
 * Copyright (c) 2010, 2011, 2013 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.
60
60
        ovs_be32 hi, lo;
61
61
} ovs_32aligned_be64;
62
62
 
 
63
/* ofp_port_t represents the port number of a OpenFlow switch.
 
64
 * odp_port_t represents the port number on the datapath.
 
65
 * ofp11_port_t represents the OpenFlow-1.1 port number. */
 
66
typedef uint16_t OVS_BITWISE ofp_port_t;
 
67
typedef uint32_t OVS_BITWISE odp_port_t;
 
68
typedef uint32_t OVS_BITWISE ofp11_port_t;
 
69
 
 
70
/* Macro functions that cast int types to ofp/odp/ofp11 types. */
 
71
#define OFP_PORT_C(X) ((OVS_FORCE ofp_port_t) (X))
 
72
#define ODP_PORT_C(X) ((OVS_FORCE odp_port_t) (X))
 
73
#define OFP11_PORT_C(X) ((OVS_FORCE ofp11_port_t) (X))
 
74
 
63
75
#endif /* openvswitch/types.h */