nsh.api revision aec524e0
1
2
3/** \brief /** \brief Set or delete an NSH header entry keyed by NSP/NSI
4    @param client_index - opaque cookie to identify the sender
5    @param context - sender context, to match reply w/ request
6    @param is_add - add address if non-zero, else delete
7    @param nsp_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI 
8    @param md_type - metadata type [1|2] - only MDType1 supported today
9    @param ver_o_c - version, O-bit and C-bit (see nsh_packet.h)
10    @param length - header length in n x 32bits, should be 6 for MDtype1
11    @param next_protocol - next protocol encapsulated behind NSH header: 1=Ethernet, 2=IP4, 3=IP6
12    @param c1 - 32bit Metadata type1 field (context1)
13    @param c2 - 32bit Metadata type1 field (context2)
14    @param c3 - 32bit Metadata type1 field (context3)
15    @param c4 - 32bit Metadata type1 field (context4)
16    @param tlvs - Metadata Type 2 only, Type Length Value metadata. Not currently supported
17*/
18define nsh_add_del_entry {
19    u32 client_index;
20    u32 context;
21    u8 is_add;
22    u32 nsp_nsi;
23    u8 md_type;
24    u8 ver_o_c;
25    u8 length;
26    u8 next_protocol;
27    u32 c1;
28    u32 c2;
29    u32 c3;
30    u32 c4;
31};
32
33/** \brief Reply from adding NSH entry (nsh_add_del_entry)
34    @param context - sender context, to match reply w/ request
35    @param retval - 0 means all ok
36*/
37define nsh_add_del_entry_reply {
38    u32 context;
39    i32 retval;
40};
41
42
43define nsh_entry_dump {
44    u32 client_index;
45    u32 context;
46};
47
48define nsh_entry_details {
49    u32 context;
50    u32 nsp_nsi;
51    u8 md_type;
52    u8 ver_o_c;
53    u8 length;
54    u8 next_protocol;
55    u32 c1;
56    u32 c2;
57    u32 c3;
58    u32 c4;
59};
60
61/** \brief Set or delete a mapping from one NSH header to another and its egress (decap to inner packet, encap NSH with outer header)
62    @param client_index - opaque cookie to identify the sender
63    @param context - sender context, to match reply w/ request
64    @param is_add - add address if non-zero, else delete
65    @param nsh_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI
66    @param mapped_nsp_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI this may be ~0
67       if next action is to decap to NSH next protocol
68       Note the following heuristic:
69       	    - if nsp_nsi == mapped_nsp_nsi then use-case is like SFC SFF
70    	    - if nsp_nsi != mapped_nsp_nsi then use-case is like SFC SF
71       Note: these are heuristics. Rules about NSI decrement are out of scope
72    @param sw_if_index - index number of outer encap for NSH egress
73    @param next_node - explicitly which node to send to
74      Note the above parameters are instantiated by "encap-gre-intf <x>" means sw_if_index x, next_node gre-input
75*/
76define nsh_add_del_map {
77    u32 client_index;
78    u32 context;
79    u8 is_add;
80    u32 nsp_nsi;
81    u32 mapped_nsp_nsi;
82    u32 sw_if_index;
83    u32 next_node;
84};
85
86/** \brief Reply from adding NSH map (nsh_add_del_map)
87    @param context - sender context, to match reply w/ request
88    @param retval - 0 means all ok
89*/
90define nsh_add_del_map_reply {
91    u32 context;
92    i32 retval;
93};
94
95define nsh_map_dump {
96    u32 client_index;
97    u32 context;
98};
99
100define nsh_map_details {
101    u32 context;
102    u32 nsp_nsi;
103    u32 mapped_nsp_nsi;
104    u32 sw_if_index;
105    u32 next_node;
106};
107