Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
VPP-307: Documentation for vnet/vnet/vxlan-gpe
[vpp.git]
/
vnet
/
vnet
/
vxlan-gpe
/
vxlan_gpe_packet.h
diff --git
a/vnet/vnet/vxlan-gpe/vxlan_gpe_packet.h
b/vnet/vnet/vxlan-gpe/vxlan_gpe_packet.h
index
3403cc9
..
e5501b9
100644
(file)
--- a/
vnet/vnet/vxlan-gpe/vxlan_gpe_packet.h
+++ b/
vnet/vnet/vxlan-gpe/vxlan_gpe_packet.h
@@
-12,10
+12,15
@@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+/**
+ * @file
+ * @brief VXLAN GPE packet header structure
+ *
+*/
#ifndef included_vxlan_gpe_packet_h
#define included_vxlan_gpe_packet_h
#ifndef included_vxlan_gpe_packet_h
#define included_vxlan_gpe_packet_h
-/*
+/*
*
* From draft-quinn-vxlan-gpe-03.txt
*
* 0 1 2 3
* From draft-quinn-vxlan-gpe-03.txt
*
* 0 1 2 3
@@
-52,25
+57,45
@@
* 0x4 : Network Service Header [NSH]
*/
* 0x4 : Network Service Header [NSH]
*/
-#define foreach_vxlan_gpe_protocol \
+/**
+ * @brief VXLAN GPE support inner protocol definition.
+ * 1 - IP4
+ * 2 - IP6
+ * 3 - ETHERNET
+ * 4 - NSH
+ */
+#define foreach_vxlan_gpe_protocol \
_ (0x01, IP4) \
_ (0x02, IP6) \
_ (0x03, ETHERNET) \
_ (0x01, IP4) \
_ (0x02, IP6) \
_ (0x03, ETHERNET) \
-_ (0x04, NSH)
+_ (0x04, NSH)
+/**
+ * @brief Struct for VXLAN GPE support inner protocol definition.
+ * 1 - IP4
+ * 2 - IP6
+ * 3 - ETHERNET
+ * 4 - NSH
+ */
typedef enum {
#define _(n,f) VXLAN_GPE_PROTOCOL_##f = n,
foreach_vxlan_gpe_protocol
#undef _
} vxlan_gpe_protocol_t;
typedef enum {
#define _(n,f) VXLAN_GPE_PROTOCOL_##f = n,
foreach_vxlan_gpe_protocol
#undef _
} vxlan_gpe_protocol_t;
+/**
+ * @brief VXLAN GPE Header definition
+ */
typedef struct {
u8 flags;
typedef struct {
u8 flags;
+ /** Version and Reserved */
u8 ver_res;
u8 ver_res;
+ /** Reserved */
u8 res;
u8 res;
- /* see vxlan_gpe_protocol_t */
+ /*
*
see vxlan_gpe_protocol_t */
u8 protocol;
u8 protocol;
+ /** VNI and Reserved */
u32 vni_res;
} vxlan_gpe_header_t;
u32 vni_res;
} vxlan_gpe_header_t;