nsh.api revision 0588a165
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    u32 tlv_length;
32    u8 tlv[tlv_length];
33};
34
35/** \brief Reply from adding NSH entry (nsh_add_del_entry)
36    @param context - sender context, to match reply w/ request
37    @param retval - 0 means all ok
38*/
39define nsh_add_del_entry_reply {
40    u32 context;
41    i32 retval;
42};
43
44
45define nsh_entry_dump {
46    u32 client_index;
47    u32 context;
48};
49
50define nsh_entry_details {
51    u32 context;
52    u32 nsp_nsi;
53    u8 md_type;
54    u8 ver_o_c;
55    u8 length;
56    u8 next_protocol;
57    u32 c1;
58    u32 c2;
59    u32 c3;
60    u32 c4;
61    u32 tlv_length;
62    u8 tlv[tlv_length];
63};
64
65/** \brief Set or delete a mapping from one NSH header to another and its egress (decap to inner packet, encap NSH with outer header)
66    @param client_index - opaque cookie to identify the sender
67    @param context - sender context, to match reply w/ request
68    @param is_add - add address if non-zero, else delete
69    @param nsh_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI
70    @param mapped_nsp_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI this may be ~0
71       if next action is to decap to NSH next protocol
72       Note the following heuristic:
73       	    - if nsp_nsi == mapped_nsp_nsi then use-case is like SFC SFF
74    	    - if nsp_nsi != mapped_nsp_nsi then use-case is like SFC SF
75       Note: these are heuristics. Rules about NSI decrement are out of scope
76    @param sw_if_index - index number of outer encap for NSH egress
77    @param next_node - explicitly which node to send to
78      Note the above parameters are instantiated by "encap-gre-intf <x>" means sw_if_index x, next_node gre-input
79*/
80define nsh_add_del_map {
81    u32 client_index;
82    u32 context;
83    u8 is_add;
84    u32 nsp_nsi;
85    u32 mapped_nsp_nsi;
86    u32 sw_if_index;
87    u32 next_node;
88};
89
90/** \brief Reply from adding NSH map (nsh_add_del_map)
91    @param context - sender context, to match reply w/ request
92    @param retval - 0 means all ok
93*/
94define nsh_add_del_map_reply {
95    u32 context;
96    i32 retval;
97};
98
99define nsh_map_dump {
100    u32 client_index;
101    u32 context;
102};
103
104define nsh_map_details {
105    u32 context;
106    u32 nsp_nsi;
107    u32 mapped_nsp_nsi;
108    u32 sw_if_index;
109    u32 next_node;
110};
111
112/** \brief Control ping from client to api server request
113    @param client_index - opaque cookie to identify the sender
114    @param context - sender context, to match reply w/ request
115*/
116define nsh_control_ping {
117    u32 client_index;
118    u32 context;
119};
120
121/** \brief Control ping from the client to the server response
122    @param client_index - opaque cookie to identify the sender
123    @param context - sender context, to match reply w/ request
124    @param retval - return code for the request
125    @param vpe_pid - the pid of the vpe, returned by the server
126*/
127define nsh_control_ping_reply {
128    u32 context;
129    i32 retval;
130    u32 client_index;
131    u32 vpe_pid;
132};
133