Merge "VNF_Catalogue Codebase"
[samplevnf.git] / VNFs / DPPD-PROX / vxlangpe_nsh.h
1 /*
2 // Copyright (c) 2010-2017 Intel Corporation
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 _VXLANGPE_NSH_H_
18 #define _VXLANGPE_NSH_H_
19
20 struct nsh_hdr {
21         uint16_t version :2;
22         uint16_t oa_flag :1;
23         uint16_t cm_flag :1;
24         uint16_t reserved :6;
25         uint16_t length :6;
26         uint8_t md_type;
27         uint8_t next_proto;
28         uint32_t sfp_index :24;
29         uint32_t sf_index :8;
30         uint32_t ctx_1;
31         uint32_t ctx_2;
32         uint32_t ctx_3;
33         uint32_t ctx_4;
34 } __attribute__((__packed__));
35
36 struct vxlan_gpe_hdr {
37         uint8_t flag_0;
38         uint8_t flag_1;
39         uint8_t reserved;
40         uint8_t next_proto;
41         uint32_t vni_res;
42 } __attribute__((__packed__));
43
44 #endif /* _VXLANGPE_NSH_H_ */